Angband
Data Structures | Macros | Typedefs | Functions | Variables
ui-display.c File Reference

Handles the setting up updating, and cleaning up of the game display. More...

#include "angband.h"
#include "buildid.h"
#include "cave.h"
#include "cmd-core.h"
#include "game-event.h"
#include "game-world.h"
#include "grafmode.h"
#include "hint.h"
#include "init.h"
#include "mon-lore.h"
#include "mon-predicate.h"
#include "mon-util.h"
#include "monster.h"
#include "obj-desc.h"
#include "obj-gear.h"
#include "obj-pile.h"
#include "obj-util.h"
#include "player-calcs.h"
#include "player-timed.h"
#include "player-util.h"
#include "player.h"
#include "project.h"
#include "savefile.h"
#include "target.h"
#include "ui-birth.h"
#include "ui-display.h"
#include "ui-game.h"
#include "ui-input.h"
#include "ui-map.h"
#include "ui-mon-list.h"
#include "ui-mon-lore.h"
#include "ui-object.h"
#include "ui-obj-list.h"
#include "ui-output.h"
#include "ui-player.h"
#include "ui-prefs.h"
#include "ui-store.h"
#include "ui-term.h"
#include "wizard.h"

Data Structures

struct  side_handler_t
 Struct of sidebar handlers. More...
 
struct  state_info
 Struct to describe different timed effects. More...
 
struct  minimap_flags
 

Macros

#define S(s)   s, sizeof(s)
 

Status line display functions

More...
 
#define PRINT_STATE(sym, data, index, row, col)
 

Typedefs

typedef size_t status_f (int row, int col)
 Descriptive typedef for status handlers. More...
 

Functions

void cnv_stat (int val, char *out_val, size_t out_len)
 Converts stat num into a six-char (right justified) string. More...
 
static void prt_field (const char *info, int row, int col)
 

Sidebar display functions

More...
 
static void prt_stat (int stat, int row, int col)
 Print character stat in given row, column. More...
 
static void prt_title (int row, int col)
 Prints "title", including "wizard" or "winner" as needed. More...
 
static void prt_level (int row, int col)
 Prints level. More...
 
static void prt_exp (int row, int col)
 Display the experience. More...
 
static void prt_gold (int row, int col)
 Prints current gold. More...
 
static void prt_equippy (int row, int col)
 Equippy chars (ASCII representation of gear in equipment slot order) More...
 
static void prt_ac (int row, int col)
 Prints current AC. More...
 
static void prt_hp (int row, int col)
 Prints current hitpoints. More...
 
static void prt_sp (int row, int col)
 Prints players max/cur spell points. More...
 
byte monster_health_attr (void)
 Calculate the monster bar color separately, for ports. More...
 
static void prt_health (int row, int col)
 Redraw the "monster health bar". More...
 
static void prt_speed (int row, int col)
 Prints the speed of a character. More...
 
static void prt_depth (int row, int col)
 Prints depth in stat area. More...
 
static void prt_str (int row, int col)
 Some simple wrapper functions. More...
 
static void prt_dex (int row, int col)
 
static void prt_wis (int row, int col)
 
static void prt_int (int row, int col)
 
static void prt_con (int row, int col)
 
static void prt_race (int row, int col)
 
static void prt_class (int row, int col)
 
static void update_sidebar (game_event_type type, game_event_data *data, void *user)
 This prints the sidebar, using a clever method which means that it will only print as much as can be displayed on <24-line screens. More...
 
static void hp_colour_change (game_event_type type, game_event_data *data, void *user)
 Redraw player, since the player's color indicates approximate health. More...
 
static size_t prt_recall (int row, int col)
 Print recall status. More...
 
static size_t prt_descent (int row, int col)
 Print deep descent status. More...
 
static size_t prt_cut (int row, int col)
 Print cut indicator. More...
 
static size_t prt_stun (int row, int col)
 Print stun indicator. More...
 
static size_t prt_hunger (int row, int col)
 Prints status of hunger. More...
 
static size_t prt_state (int row, int col)
 Prints Resting, or 'count' status Display is always exactly 10 characters wide (see below) More...
 
static size_t prt_level_feeling (int row, int col)
 Prints level feelings at status if they are enabled. More...
 
static size_t prt_study (int row, int col)
 Print how many spells the player can study. More...
 
static size_t prt_tmd (int row, int col)
 Print all timed effects. More...
 
static size_t prt_unignore (int row, int col)
 Print "unignoring" status. More...
 
static void update_statusline (game_event_type type, game_event_data *data, void *user)
 Print the status line. More...
 
static void update_maps (game_event_type type, game_event_data *data, void *user)
 

Map redraw. More...

 
static byte get_flicker (byte a)
 
static void do_animation (void)
 This animates monsters and/or items as necessary. More...
 
void allow_animations (void)
 Set animations to allowed. More...
 
void disallow_animations (void)
 Set animations to disallowed. More...
 
static void animate (game_event_type type, game_event_data *data, void *user)
 Update animations on request. More...
 
void idle_update (void)
 This is used when the user is idle to allow for simple animations. More...
 
static void bolt_pict (int y, int x, int ny, int nx, int typ, byte *a, wchar_t *c)
 Find the attr/char pair to use for a spell effect. More...
 
static void display_explosion (game_event_type type, game_event_data *data, void *user)
 Draw an explosion. More...
 
static void display_bolt (game_event_type type, game_event_data *data, void *user)
 Draw a moving spell effect (bolt or beam) More...
 
static void display_missile (game_event_type type, game_event_data *data, void *user)
 Draw a moving missile. More...
 
static void update_inven_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void update_equip_subwindow (game_event_type type, game_event_data *data, void *user)
 
void toggle_inven_equip (void)
 Flip "inven" and "equip" in any sub-windows. More...
 
static void update_itemlist_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void update_monlist_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void update_monster_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void update_object_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void update_messages_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void update_minimap_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void update_player0_subwindow (game_event_type type, game_event_data *data, void *user)
 Display player in sub-windows (mode 0) More...
 
static void update_player1_subwindow (game_event_type type, game_event_data *data, void *user)
 Display player in sub-windows (mode 1) More...
 
static void update_player_compact_subwindow (game_event_type type, game_event_data *data, void *user)
 Display the left-hand-side of the main term, in more compact fashion. More...
 
static void flush_subwindow (game_event_type type, game_event_data *data, void *user)
 
static void subwindow_flag_changed (int win_idx, u32b flag, bool new_state)
 
static void subwindow_set_flags (int win_idx, u32b new_flags)
 Set the flags for one Term, calling "subwindow_flag_changed" with each flag that has changed setting so that it can do any housekeeping to do with displaying the new thing or no longer displaying the old one. More...
 
void subwindows_set_flags (u32b *new_flags, size_t n_subwindows)
 Called with an array of the new flags for all the subwindows, in order to set them to the new values, with a chance to perform housekeeping. More...
 
static void init_angband_aux (const char *why)
 

Showing and updating the splash screen. More...

 
static void splashscreen_note (game_event_type type, game_event_data *data, void *user)
 
static void show_splashscreen (game_event_type type, game_event_data *data, void *user)
 
static void refresh (game_event_type type, game_event_data *data, void *user)
 

Visual updates betweeen player turns. More...

 
static void repeated_command_display (game_event_type type, game_event_data *data, void *user)
 
static void new_level_display_update (game_event_type type, game_event_data *data, void *user)
 Housekeeping on arriving on a new level. More...
 
static void cheat_death (game_event_type type, game_event_data *data, void *user)
 

Temporary (hopefully) hackish solutions. More...

 
static void check_panel (game_event_type type, game_event_data *data, void *user)
 
static void see_floor_items (game_event_type type, game_event_data *data, void *user)
 
static void process_character_pref_files (void)
 

Initialising

More...
 
static void ui_enter_init (game_event_type type, game_event_data *data, void *user)
 
static void ui_leave_init (game_event_type type, game_event_data *data, void *user)
 
static void ui_enter_world (game_event_type type, game_event_data *data, void *user)
 
static void ui_leave_world (game_event_type type, game_event_data *data, void *user)
 
static void ui_enter_game (game_event_type type, game_event_data *data, void *user)
 
static void ui_leave_game (game_event_type type, game_event_data *data, void *user)
 
void init_display (void)
 

Variables

static game_event_type player_events []
 There are a few functions installed to be triggered by several of the basic player events. More...
 
static game_event_type statusline_events []
 
const char * stat_names [STAT_MAX]
 Abbreviations of healthy stats. More...
 
const char * stat_names_reduced [STAT_MAX]
 Abbreviations of damaged stats. More...
 
static const struct side_handler_t side_handlers []
 
static const struct state_info cut_data []
 TMD_CUT descriptions. More...
 
static const struct state_info stun_data []
 TMD_STUN descriptions. More...
 
static const struct state_info hunger_data []
 player->hunger descriptions More...
 
static const struct state_info effects []
 For the various TMD_* effects. More...
 
static const byte obj_feeling_color []
 
static const byte mon_feeling_color []
 
static status_fstatus_handlers []
 
static bool animations_allowed = true
 

Animations. More...

 
static byte flicker = 0
 
static byte color_flicker [MAX_COLORS][3]
 
static bool flip_inven
 

Subwindow displays

More...
 
static struct minimap_flags minimap_data [ANGBAND_TERM_MAX]
 
const char * window_flag_desc [32]
 Certain "screens" always use the main screen, including News, Birth, Dungeon, Tomb-stone, High-scores, Macros, Colors, Visuals, Options. More...
 

Detailed Description

Handles the setting up updating, and cleaning up of the game display.

Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke Copyright (c) 2007 Antony Sidwell

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.

Macro Definition Documentation

#define PRINT_STATE (   sym,
  data,
  index,
  row,
  col 
)
Value:
{ \
size_t i; \
\
for (i = 0; i < N_ELEMENTS(data); i++) \
{ \
if (index sym data[i].value) \
{ \
if (data[i].str[0]) \
{ \
c_put_str(data[i].attr, data[i].str, row, col); \
return data[i].len; \
} \
else \
{ \
return 0; \
} \
} \
} \
}
png_bytepp row
Definition: libpng12/png.h:1784
#define N_ELEMENTS(a)
Useful fairly generic macros
Definition: h-basic.h:214
png_uint_32 i
Definition: libpng12/png.h:2821
static term_data data[MAX_TERM_DATA]
Definition: main-nds.c:156
void c_put_str(byte attr, const char *str, int row, int col)
Simple text display
Definition: ui-output.c:361
png_voidp int value
Definition: libpng12/png.h:2145
int index
Definition: obj-info.c:68

Referenced by prt_cut(), prt_hunger(), and prt_stun().

#define S (   s)    s, sizeof(s)


Status line display functions

Simple macro to initialise structs

Typedef Documentation

typedef size_t status_f(int row, int col)

Descriptive typedef for status handlers.

Function Documentation

void allow_animations ( void  )

Set animations to allowed.

Referenced by target_set_interactive().

static void animate ( game_event_type  type,
game_event_data data,
void user 
)
static

Update animations on request.

References do_animation().

Referenced by ui_enter_world(), and ui_leave_world().

static void bolt_pict ( int  y,
int  x,
int  ny,
int  nx,
int  typ,
byte a,
wchar_t *  c 
)
static

Find the attr/char pair to use for a spell effect.

It is moving (or has moved) from (x, y) to (nx, ny); if the distance is not "one", we (may) return "*".

References BOLT_0, BOLT_135, BOLT_45, BOLT_90, BOLT_NO_MOTION, chars, projection::color, GRAPHICS_NONE, proj_to_attr, proj_to_char, projections, and use_graphics.

Referenced by display_bolt(), and display_explosion().

static void cheat_death ( game_event_type  type,
game_event_data data,
void user 
)
static


Temporary (hopefully) hackish solutions.


References EVENT_MESSAGE_FLUSH, event_signal(), msg, and wiz_cheat_death().

Referenced by ui_enter_world(), and ui_leave_world().

static void check_panel ( game_event_type  type,
game_event_data data,
void user 
)
static

References verify_panel().

Referenced by ui_enter_world(), and ui_leave_world().

void cnv_stat ( int  val,
char *  out_val,
size_t  out_len 
)

Converts stat num into a six-char (right justified) string.

References strnfmt().

Referenced by display_player_stat_info(), and prt_stat().

void disallow_animations ( void  )

Set animations to disallowed.

Referenced by target_set_interactive().

static void display_bolt ( game_event_type  type,
game_event_data data,
void user 
)
static
static void display_explosion ( game_event_type  type,
game_event_data data,
void user 
)
static
static void display_missile ( game_event_type  type,
game_event_data data,
void user 
)
static
static void do_animation ( void  )
static
static void flush_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static

References Term, Term_activate(), and Term_fresh().

Referenced by subwindow_flag_changed().

static byte get_flicker ( byte  a)
static

Referenced by do_animation().

static void hp_colour_change ( game_event_type  type,
game_event_data data,
void user 
)
static

Redraw player, since the player's color indicates approximate health.

Note that using this command is only for when graphics mode is off, as otherwise it causes the character to be a black square.

References cave, GRAPHICS_NONE, OPT, player::px, player::py, square_light_spot(), and use_graphics.

Referenced by ui_enter_world(), and ui_leave_world().

void idle_update ( void  )

This is used when the user is idle to allow for simple animations.

Currently the only thing it really does is animate shimmering monsters.

References character_dungeon, do_animation(), GRAPHICS_NONE, msg_flag, OPT, redraw_stuff(), Term_fresh(), and use_graphics.

static void init_angband_aux ( const char *  why)
static


Showing and updating the splash screen.


Explain a broken "lib" folder and quit (see below).

References quit_fmt().

Referenced by show_splashscreen().

void init_display ( void  )
byte monster_health_attr ( void  )
static void new_level_display_update ( game_event_type  type,
game_event_data data,
void user 
)
static
static void process_character_pref_files ( void  )
static


Initialising

Process the user pref files relevant to a newly loaded character

References buf, player::full_name, my_strcat(), my_strcpy(), path_filename_index(), player_safe_name(), process_pref_file(), savefile, and strnfmt().

Referenced by ui_leave_init().

static void prt_ac ( int  row,
int  col 
)
static
static void prt_class ( int  row,
int  col 
)
static
static void prt_con ( int  row,
int  col 
)
static

References prt_stat().

static size_t prt_cut ( int  row,
int  col 
)
static

Print cut indicator.

References PRINT_STATE, and player::timed.

static void prt_depth ( int  row,
int  col 
)
static

Prints depth in stat area.

References player::depth, format(), my_strcpy(), put_str(), and strnfmt().

static size_t prt_descent ( int  row,
int  col 
)
static

Print deep descent status.

References c_put_str(), COLOUR_WHITE, and player::deep_descent.

static void prt_dex ( int  row,
int  col 
)
static

References prt_stat().

static void prt_equippy ( int  row,
int  col 
)
static

Equippy chars (ASCII representation of gear in equipment slot order)

References player::body, COLOUR_WHITE, player_body::count, i, object_attr(), object_char(), slot_object(), Term_putch(), tile_height, and tile_width.

Referenced by update_player_compact_subwindow().

static void prt_exp ( int  row,
int  col 
)
static
static void prt_field ( const char *  info,
int  row,
int  col 
)
static


Sidebar display functions

Print character info at given row, column in a 13 char field

References c_put_str(), COLOUR_L_BLUE, and COLOUR_WHITE.

Referenced by prt_class(), prt_race(), prt_title(), and update_player_compact_subwindow().

static void prt_gold ( int  row,
int  col 
)
static

Prints current gold.

References player::au, c_put_str(), COLOUR_L_GREEN, put_str(), and strnfmt().

Referenced by update_player_compact_subwindow().

static void prt_health ( int  row,
int  col 
)
static

Redraw the "monster health bar".

The "monster health bar" provides visual feedback on the "health" of the monster currently being "tracked". There are several ways to "track" a monster, including targetting it, attacking it, and affecting it (and nobody else) with a ranged attack. When nothing is being tracked, we clear the health bar. If the monster being tracked is not currently visible, a special health bar is shown.

References monster::attr, COLOUR_WHITE, player_upkeep::health_who, monster::hp, monster::maxhp, monster_health_attr(), monster_is_visible(), Term_erase(), Term_putstr(), player::timed, and player::upkeep.

Referenced by update_player_compact_subwindow().

static void prt_hp ( int  row,
int  col 
)
static
static size_t prt_hunger ( int  row,
int  col 
)
static

Prints status of hunger.

References player::food, and PRINT_STATE.

static void prt_int ( int  row,
int  col 
)
static

References prt_stat().

static void prt_level ( int  row,
int  col 
)
static
static size_t prt_level_feeling ( int  row,
int  col 
)
static
static void prt_race ( int  row,
int  col 
)
static
static size_t prt_recall ( int  row,
int  col 
)
static

Print recall status.

References c_put_str(), COLOUR_WHITE, and player::word_recall.

static void prt_sp ( int  row,
int  col 
)
static
static void prt_speed ( int  row,
int  col 
)
static
static void prt_stat ( int  stat,
int  row,
int  col 
)
static
static size_t prt_state ( int  row,
int  col 
)
static

Prints Resting, or 'count' status Display is always exactly 10 characters wide (see below)

This function was a major bottleneck when resting, so a lot of the text formatting code was optimized in place below.

References state_info::attr, c_put_str(), cmd_get_nrepeats(), COLOUR_WHITE, i, I2D, my_strcpy(), player_is_resting(), player_resting_count(), REST_ALL_POINTS, REST_COMPLETE, REST_SOME_POINTS, strnfmt(), and text.

static void prt_str ( int  row,
int  col 
)
static

Some simple wrapper functions.

References prt_stat().

static size_t prt_study ( int  row,
int  col 
)
static
static size_t prt_stun ( int  row,
int  col 
)
static

Print stun indicator.

References PRINT_STATE, and player::timed.

static void prt_title ( int  row,
int  col 
)
static

Prints "title", including "wizard" or "winner" as needed.

References player::class, player::lev, p, prt_field(), PY_MAX_LEVEL, player_class::title, player::total_winner, and player::wizard.

Referenced by update_player_compact_subwindow().

static size_t prt_tmd ( int  row,
int  col 
)
static
static size_t prt_unignore ( int  row,
int  col 
)
static

Print "unignoring" status.

References put_str(), state_info::str, and player::unignoring.

static void prt_wis ( int  row,
int  col 
)
static

References prt_stat().

static void refresh ( game_event_type  type,
game_event_data data,
void user 
)
static


Visual updates betweeen player turns.


References move_cursor_relative(), OPT, row, target_get(), target_sighted(), and Term_fresh().

Referenced by ui_enter_world(), and ui_leave_world().

static void repeated_command_display ( game_event_type  type,
game_event_data data,
void user 
)
static

References msg_flag, and prt().

Referenced by ui_enter_world(), and ui_leave_world().

static void see_floor_items ( game_event_type  type,
game_event_data data,
void user 
)
static
static void show_splashscreen ( game_event_type  type,
game_event_data data,
void user 
)
static
static void splashscreen_note ( game_event_type  type,
game_event_data data,
void user 
)
static
static void subwindow_flag_changed ( int  win_idx,
u32b  flag,
bool  new_state 
)
static
static void subwindow_set_flags ( int  win_idx,
u32b  new_flags 
)
static

Set the flags for one Term, calling "subwindow_flag_changed" with each flag that has changed setting so that it can do any housekeeping to do with displaying the new thing or no longer displaying the old one.

References angband_term, i, subwindow_flag_changed(), Term, Term_activate(), Term_clear(), Term_fresh(), minimap_flags::win_idx, and window_flag.

Referenced by subwindows_set_flags().

void subwindows_set_flags ( u32b new_flags,
size_t  n_subwindows 
)

Called with an array of the new flags for all the subwindows, in order to set them to the new values, with a chance to perform housekeeping.

References angband_term, subwindow_set_flags(), and window_flag.

Referenced by do_cmd_options_win(), finish_parse_prefs(), and textui_init().

void toggle_inven_equip ( void  )
static void ui_enter_game ( game_event_type  type,
game_event_data data,
void user 
)
static
static void ui_enter_init ( game_event_type  type,
game_event_data data,
void user 
)
static
static void ui_enter_world ( game_event_type  type,
game_event_data data,
void user 
)
static
static void ui_leave_game ( game_event_type  type,
game_event_data data,
void user 
)
static
static void ui_leave_init ( game_event_type  type,
game_event_data data,
void user 
)
static
static void ui_leave_world ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_equip_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_inven_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_itemlist_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_maps ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_messages_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_minimap_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_monlist_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_monster_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_object_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_player0_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static

Display player in sub-windows (mode 0)

References display_player(), Term, Term_activate(), and Term_fresh().

Referenced by subwindow_flag_changed().

static void update_player1_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static

Display player in sub-windows (mode 1)

References display_player(), Term, Term_activate(), and Term_fresh().

Referenced by subwindow_flag_changed().

static void update_player_compact_subwindow ( game_event_type  type,
game_event_data data,
void user 
)
static
static void update_sidebar ( game_event_type  type,
game_event_data data,
void user 
)
static

This prints the sidebar, using a clever method which means that it will only print as much as can be displayed on <24-line screens.

Each row is given a priority; the least important higher numbers and the most important lower numbers. As the screen gets smaller, the rows start to disappear in the order of lowest to highest importance.

References term::hgt, side_handler_t::hook, i, N_ELEMENTS, side_handler_t::priority, row, side_handlers, Term, Term_get_size(), and side_handler_t::type.

Referenced by ui_enter_world(), and ui_leave_world().

static void update_statusline ( game_event_type  type,
game_event_data data,
void user 
)
static

Print the status line.

References term::hgt, i, N_ELEMENTS, prt(), row, status_handlers, and Term.

Referenced by ui_enter_world(), and ui_leave_world().

Variable Documentation

bool animations_allowed = true
static


Animations.


byte color_flicker[MAX_COLORS][3]
static
const struct state_info cut_data[]
static
Initial value:
=
{
{ 1000, S("Mortal wound"), COLOUR_L_RED },
{ 200, S("Deep gash"), COLOUR_RED },
{ 100, S("Severe cut"), COLOUR_RED },
{ 50, S("Nasty cut"), COLOUR_ORANGE },
{ 25, S("Bad cut"), COLOUR_ORANGE },
{ 10, S("Light cut"), COLOUR_YELLOW },
{ 0, S("Graze"), COLOUR_YELLOW },
}
#define COLOUR_YELLOW
Definition: z-color.h:34
#define COLOUR_RED
Definition: z-color.h:27
#define COLOUR_L_RED
Definition: z-color.h:35
#define S(s)
Status line display functions
Definition: ui-display.c:605
#define COLOUR_ORANGE
Definition: z-color.h:26

TMD_CUT descriptions.

const struct state_info effects[]
static

For the various TMD_* effects.

byte flicker = 0
static
bool flip_inven
static


Subwindow displays

true when we're supposed to display the equipment in the inventory window, or vice-versa.

Referenced by toggle_inven_equip().

const struct state_info hunger_data[]
static
Initial value:
=
{
{ PY_FOOD_FAINT, S("Faint"), COLOUR_RED },
{ PY_FOOD_WEAK, S("Weak"), COLOUR_ORANGE },
{ PY_FOOD_ALERT, S("Hungry"), COLOUR_YELLOW },
{ PY_FOOD_MAX, S("Full"), COLOUR_L_GREEN },
}
#define COLOUR_YELLOW
Definition: z-color.h:34
#define PY_FOOD_ALERT
Definition: player-timed.h:30
#define COLOUR_RED
Definition: z-color.h:27
#define PY_FOOD_FULL
Definition: player-timed.h:29
#define PY_FOOD_WEAK
Definition: player-timed.h:31
#define PY_FOOD_MAX
Player food values.
Definition: player-timed.h:28
#define S(s)
Status line display functions
Definition: ui-display.c:605
#define COLOUR_L_GREEN
Definition: z-color.h:36
#define PY_FOOD_FAINT
Definition: player-timed.h:32
#define COLOUR_ORANGE
Definition: z-color.h:26

player->hunger descriptions

struct minimap_flags minimap_data[ANGBAND_TERM_MAX]
static

Referenced by subwindow_flag_changed().

const byte mon_feeling_color[]
static
Initial value:
=
{
}
#define COLOUR_YELLOW
Definition: z-color.h:34
#define COLOUR_RED
Definition: z-color.h:27
#define COLOUR_WHITE
Definition: z-color.h:24
#define COLOUR_BLUE
Definition: z-color.h:29
#define COLOUR_ORANGE
Definition: z-color.h:26
#define COLOUR_GREEN
Definition: z-color.h:28

Referenced by prt_level_feeling().

const byte obj_feeling_color[]
static
Initial value:
=
{
COLOUR_L_BLUE
}
#define COLOUR_L_PURPLE
Definition: z-color.h:33
#define COLOUR_YELLOW
Definition: z-color.h:34
#define COLOUR_L_RED
Definition: z-color.h:35
#define COLOUR_WHITE
Definition: z-color.h:24
#define COLOUR_L_BLUE
Definition: z-color.h:37
#define COLOUR_L_GREEN
Definition: z-color.h:36
#define COLOUR_ORANGE
Definition: z-color.h:26

Referenced by prt_level_feeling().

game_event_type player_events[]
static
Initial value:
=
{
}
Definition: game-event.h:36
Definition: game-event.h:35
Definition: game-event.h:39
Definition: game-event.h:34
Definition: game-event.h:55
Definition: game-event.h:31
Definition: game-event.h:32
Definition: game-event.h:42
Definition: game-event.h:37
Definition: game-event.h:33
Definition: game-event.h:40
Definition: game-event.h:41
Definition: game-event.h:38

There are a few functions installed to be triggered by several of the basic player events.

For convenience, these have been grouped in this list.

Referenced by subwindow_flag_changed(), ui_enter_world(), and ui_leave_world().

const struct side_handler_t side_handlers[]
static
Initial value:
= {
{ prt_gold, 11, EVENT_GOLD },
{ NULL, 15, 0 },
{ prt_ac, 7, EVENT_AC },
{ prt_hp, 8, EVENT_HP },
{ prt_sp, 9, EVENT_MANA },
{ NULL, 21, 0 },
{ NULL, 20, 0 },
{ NULL, 22, 0 },
}
Definition: game-event.h:36
static void prt_speed(int row, int col)
Prints the speed of a character.
Definition: ui-display.c:444
static void prt_sp(int row, int col)
Prints players max/cur spell points.
Definition: ui-display.c:319
static void prt_class(int row, int col)
Definition: ui-display.c:498
Definition: game-event.h:35
static void prt_title(int row, int col)
Prints "title", including "wizard" or "winner" as needed.
Definition: ui-display.c:173
Definition: game-event.h:39
static void prt_equippy(int row, int col)
Equippy chars (ASCII representation of gear in equipment slot order)
Definition: ui-display.c:254
static void prt_depth(int row, int col)
Prints depth in stat area.
Definition: ui-display.c:472
Definition: game-event.h:34
static void prt_race(int row, int col)
Definition: ui-display.c:497
static void prt_wis(int row, int col)
Definition: ui-display.c:494
Definition: game-event.h:55
Definition: game-event.h:31
static void prt_dex(int row, int col)
Definition: ui-display.c:493
Definition: game-event.h:32
static void prt_str(int row, int col)
Some simple wrapper functions.
Definition: ui-display.c:492
static void prt_con(int row, int col)
Definition: ui-display.c:496
static void prt_gold(int row, int col)
Prints current gold.
Definition: ui-display.c:241
Definition: game-event.h:42
Definition: game-event.h:37
Definition: game-event.h:33
static void prt_int(int row, int col)
Definition: ui-display.c:495
Definition: game-event.h:40
static void prt_hp(int row, int col)
Prints current hitpoints.
Definition: ui-display.c:301
static void prt_level(int row, int col)
Prints level.
Definition: ui-display.c:192
NULL
Definition: list-summon-types.h:18
Definition: game-event.h:41
static void prt_ac(int row, int col)
Prints current AC.
Definition: ui-display.c:288
Definition: game-event.h:38
static void prt_health(int row, int col)
Redraw the "monster health bar".
Definition: ui-display.c:407
static void prt_exp(int row, int col)
Display the experience.
Definition: ui-display.c:211

Referenced by update_sidebar().

const char* stat_names[STAT_MAX]
Initial value:
=
{
"STR: ", "INT: ", "WIS: ", "DEX: ", "CON: "
}

Abbreviations of healthy stats.

Referenced by display_player_stat_info(), do_cmd_wiz_change_aux(), and prt_stat().

const char* stat_names_reduced[STAT_MAX]
Initial value:
=
{
"Str: ", "Int: ", "Wis: ", "Dex: ", "Con: "
}

Abbreviations of damaged stats.

Referenced by class_help(), display_player_stat_info(), prt_stat(), and race_help().

status_f* status_handlers[]
static
Initial value:
=
static size_t prt_cut(int row, int col)
Print cut indicator.
Definition: ui-display.c:742
static size_t prt_study(int row, int col)
Print how many spells the player can study.
Definition: ui-display.c:949
static size_t prt_recall(int row, int col)
Print recall status.
Definition: ui-display.c:714
static size_t prt_unignore(int row, int col)
Print "unignoring" status.
Definition: ui-display.c:990
static size_t prt_state(int row, int col)
Prints Resting, or 'count' status Display is always exactly 10 characters wide (see below) ...
Definition: ui-display.c:777
static size_t prt_level_feeling(int row, int col)
Prints level feelings at status if they are enabled.
Definition: ui-display.c:873
static size_t prt_tmd(int row, int col)
Print all timed effects.
Definition: ui-display.c:974
static size_t prt_stun(int row, int col)
Print stun indicator.
Definition: ui-display.c:752
static size_t prt_descent(int row, int col)
Print deep descent status.
Definition: ui-display.c:728
static size_t prt_hunger(int row, int col)
Prints status of hunger.
Definition: ui-display.c:762

Referenced by update_statusline().

game_event_type statusline_events[]
static
Initial value:
=
{
}
Definition: game-event.h:45
Definition: game-event.h:44
Definition: game-event.h:46
Definition: game-event.h:43

Referenced by ui_enter_world(), and ui_leave_world().

const struct state_info stun_data[]
static
Initial value:
=
{
{ 100, S("Knocked out"), COLOUR_RED },
{ 50, S("Heavy stun"), COLOUR_ORANGE },
{ 0, S("Stun"), COLOUR_ORANGE },
}
#define COLOUR_RED
Definition: z-color.h:27
#define S(s)
Status line display functions
Definition: ui-display.c:605
#define COLOUR_ORANGE
Definition: z-color.h:26

TMD_STUN descriptions.

const char* window_flag_desc[32]

Certain "screens" always use the main screen, including News, Birth, Dungeon, Tomb-stone, High-scores, Macros, Colors, Visuals, Options.

Later, special flags may allow sub-windows to "steal" stuff from the main window, including File dump (help), File dump (artifacts, uniques), Character screen, Small scale map, Previous Messages, Store screen, etc.

Referenced by do_cmd_options_win(), option_dump(), and parse_prefs_window().