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

Player knowledge functions. More...

#include "angband.h"
#include "cave.h"
#include "cmds.h"
#include "game-input.h"
#include "grafmode.h"
#include "init.h"
#include "mon-lore.h"
#include "mon-util.h"
#include "monster.h"
#include "obj-desc.h"
#include "obj-ignore.h"
#include "obj-knowledge.h"
#include "obj-info.h"
#include "obj-make.h"
#include "obj-pile.h"
#include "obj-tval.h"
#include "obj-util.h"
#include "object.h"
#include "player-calcs.h"
#include "player-history.h"
#include "store.h"
#include "target.h"
#include "trap.h"
#include "ui-context.h"
#include "ui-history.h"
#include "ui-menu.h"
#include "ui-mon-list.h"
#include "ui-mon-lore.h"
#include "ui-object.h"
#include "ui-obj-list.h"
#include "ui-options.h"
#include "ui-output.h"
#include "ui-prefs.h"
#include "ui-score.h"
#include "ui-store.h"
#include "ui-target.h"
#include "wizard.h"

Data Structures

struct  group_funcs
 The first part of this file contains the knowledge menus. More...
 
struct  member_funcs
 
struct  join
 Helper class for generating joins. More...
 

Macros

#define swap(a, b)   (swapspace = (void*)(a)), ((a) = (b)), ((b) = swapspace)
 
#define MISSING   -17
 
#define STORE_KNOWLEDGE_ROW   7
 

Main knowledge menus

More...
 
#define GET_ITEM_PARAMS   (USE_EQUIP | USE_INVEN | USE_QUIVER | USE_FLOOR | SHOW_QUIVER | SHOW_EMPTY | IS_HARMLESS)
 
#define PANEL_SIZE   11
 Number of basic grids per panel, vertically and horizontally. More...
 

Typedefs

typedef struct join join_t
 Helper class for generating joins. More...
 

Functions

static int default_item_id (int oid)
 

Knowledge menu utilities

More...
 
static int default_group_id (int oid)
 
static int feat_order (int feat)
 Return a specific ordering for the features. More...
 
static int actual_width (int width)
 Return the actual width of a symbol. More...
 
static int actual_height (int height)
 Return the actual height of a symbol. More...
 
static int logical_width (int width)
 From an actual width, return the logical width. More...
 
static int logical_height (int height)
 From an actual height, return the logical height. More...
 
static void display_tiles (int col, int row, int height, int width, byte attr_top, byte char_left)
 Display tiles. More...
 
static void place_tile_cursor (int col, int row, byte a, byte c, byte attr_top, byte char_left)
 Place the cursor at the correct position for tile picking. More...
 
static void remove_tiles (int col, int row, bool *picker_ptr, int width, int height)
 Remove the tile display and clear the screen. More...
 
static bool tile_picker_command (ui_event ke, bool *tile_picker_ptr, int height, int width, byte *attr_top_ptr, byte *char_left_ptr, byte *cur_attr_ptr, byte *cur_char_ptr, int col, int row, int *delay)
 Do tile picker command – Change tiles. More...
 
static void display_glyphs (int col, int row, int height, int width, byte a, wchar_t c)
 Display glyph and colours. More...
 
static bool glyph_command (ui_event ke, bool *glyph_picker_ptr, int height, int width, byte *cur_attr_ptr, wchar_t *cur_char_ptr, int col, int row)
 Do glyph picker command – Change glyphs. More...
 
static void display_group_member (struct menu *menu, int oid, bool cursor, int row, int col, int wid)
 
static const char * recall_prompt (int oid)
 
static void display_knowledge (const char *title, int *obj_list, int o_count, group_funcs g_funcs, member_funcs o_funcs, const char *otherfields)
 Interactive group by. More...
 
static void display_monster (int col, int row, bool cursor, int oid)
 Display a monster. More...
 
static int m_cmp_race (const void *a, const void *b)
 
static wchar_t * m_xchar (int oid)
 
static bytem_xattr (int oid)
 
static const char * race_name (int gid)
 
static void mon_lore (int oid)
 
static void mon_summary (int gid, const int *item_list, int n, int top, int row, int col)
 
static int count_known_monsters (void)
 
static void do_cmd_knowledge_monsters (const char *name, int row)
 Display known monsters. More...
 
static void get_artifact_display_name (char *o_name, size_t namelen, int a_idx)
 
static void display_artifact (int col, int row, bool cursor, int oid)
 Display an artifact label. More...
 
static struct objectfind_artifact (struct artifact *artifact)
 Look for an artifact. More...
 
static void desc_art_fake (int a_idx)
 Show artifact lore. More...
 
static int a_cmp_tval (const void *a, const void *b)
 
static const char * kind_name (int gid)
 
static int art2gid (int oid)
 
static bool artifact_is_known (int a_idx)
 Check if the given artifact idx is something we should "Know" about. More...
 
static int collect_known_artifacts (int *artifacts, size_t artifacts_len)
 If 'artifacts' is NULL, it counts the number of known artifacts, otherwise it collects the list of known artifacts into 'artifacts' as well. More...
 
static void do_cmd_knowledge_artifacts (const char *name, int row)
 Display known artifacts. More...
 
static const char * ego_grp_name (int gid)
 

EGO ITEMS

More...
 
static void display_ego_item (int col, int row, bool cursor, int oid)
 
static void desc_ego_fake (int oid)
 Describe fake ego item "lore". More...
 
static int e_cmp_tval (const void *a, const void *b)
 
static void do_cmd_knowledge_ego_items (const char *name, int row)
 Display known ego_items. More...
 
static void display_object (int col, int row, bool cursor, int oid)
 

ORDINARY OBJECTS

More...
 
static void desc_obj_fake (int k_idx)
 Describe fake object. More...
 
static int o_cmp_tval (const void *a, const void *b)
 
static int obj2gid (int oid)
 
static wchar_t * o_xchar (int oid)
 
static byteo_xattr (int oid)
 
static const char * o_xtra_prompt (int oid)
 Display special prompt for object inscription. More...
 
static void o_xtra_act (struct keypress ch, int oid)
 Special key actions for object inscription. More...
 
void textui_browse_object_knowledge (const char *name, int row)
 Display known objects. More...
 
static void display_rune (int col, int row, bool cursor, int oid)
 Display the runes in a group. More...
 
static const char * rune_var_name (int gid)
 
static int rune_var (int oid)
 
static void rune_lore (int oid)
 
static const char * rune_xtra_prompt (int oid)
 Display special prompt for rune inscription. More...
 
static void rune_xtra_act (struct keypress ch, int oid)
 Special key actions for rune inscription. More...
 
static void do_cmd_knowledge_runes (const char *name, int row)
 Display rune knowledge. More...
 
static void display_feature (int col, int row, bool cursor, int oid)
 Display the features in a group. More...
 
static int f_cmp_fkind (const void *a, const void *b)
 
static const char * fkind_name (int gid)
 
static bytef_xattr (int oid)
 
static wchar_t * f_xchar (int oid)
 
static void feat_lore (int oid)
 
static const char * feat_prompt (int oid)
 
static void f_xtra_act (struct keypress ch, int oid)
 Special key actions for cycling lighting. More...
 
static void do_cmd_knowledge_features (const char *name, int row)
 Interact with feature visuals. More...
 
static void display_trap (int col, int row, bool cursor, int oid)
 Display the features in a group. More...
 
static int trap_order (int trap)
 
static int t_cmp_tkind (const void *a, const void *b)
 
static const char * tkind_name (int gid)
 
static bytet_xattr (int oid)
 
static wchar_t * t_xchar (int oid)
 
static void trap_lore (int oid)
 
static const char * trap_prompt (int oid)
 
static void t_xtra_act (struct keypress ch, int oid)
 Special key actions for cycling lighting. More...
 
static void do_cmd_knowledge_traps (const char *name, int row)
 Interact with trap visuals. More...
 
static void do_cmd_knowledge_store (const char *name, int row)
 
static void do_cmd_knowledge_scores (const char *name, int row)
 
static void do_cmd_knowledge_history (const char *name, int row)
 
static void cleanup_cmds (void)
 Keep macro counts happy. More...
 
void textui_knowledge_init (void)
 
void textui_browse_knowledge (void)
 Display the "player knowledge" menu, greying out items that won't display anything. More...
 
void do_cmd_message_one (void)
 

Other knowledge functions

More...
 
void do_cmd_messages (void)
 Show previous messages to the user. More...
 
void do_cmd_inven (void)
 Display inventory. More...
 
void do_cmd_equip (void)
 Display equipment. More...
 
void do_cmd_quiver (void)
 Display equipment. More...
 
void do_cmd_look (void)
 Look command. More...
 
void do_cmd_locate (void)
 Allow the player to examine other sectors on the map. More...
 
static int cmp_mexp (const void *a, const void *b)
 
static int cmp_level (const void *a, const void *b)
 
static int cmp_tkill (const void *a, const void *b)
 
static int cmp_pkill (const void *a, const void *b)
 
int cmp_monsters (const void *a, const void *b)
 
static void lookup_symbol (char sym, char *buf, size_t max)
 Search the monster, item, and feature types to find the meaning for the given symbol. More...
 
void do_cmd_query_symbol (void)
 Identify a character, allow recall of monsters. More...
 
void do_cmd_center_map (void)
 Centers the map on the player. More...
 
void do_cmd_monlist (void)
 Display the main-screen monster list. More...
 
void do_cmd_itemlist (void)
 Display the main-screen item list. More...
 

Variables

static join_tdefault_join
 A default group-by. More...
 
static byte attr_idx = 0
 Clipboard variables for copy & paste in visual mode. More...
 
static byte char_idx = 0
 
struct {
   const wchar_t *   chars
 
   const char *   name
 
monster_group []
 

MONSTERS

More...
 
static const grouper object_text_order []
 

ARTIFACTS

More...
 
static intobj_group_order = NULL
 
static const char * rune_group_text []
 

OBJECT RUNES

More...
 
static const char * feature_group_text []
 

TERRAIN FEATURES

More...
 
static enum grid_light_level f_uik_lighting = LIGHTING_LIT
 Disgusting hack to allow 4 in 1 editing of terrain visuals. More...
 
static const char * trap_group_text []
 

TRAPS

More...
 
static enum grid_light_level t_uik_lighting = LIGHTING_LIT
 Disgusting hack to allow 4 in 1 editing of trap visuals. More...
 
static menu_action knowledge_actions []
 Definition of the "player knowledge" menu. More...
 
static struct menu knowledge_menu
 

Detailed Description

Player knowledge functions.

Copyright (c) 2000-2007 Eytan Zweig, Andrew Doull, Pete Mack. Copyright (c) 2010 Peter Denison, Chris Carr.

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 GET_ITEM_PARAMS   (USE_EQUIP | USE_INVEN | USE_QUIVER | USE_FLOOR | SHOW_QUIVER | SHOW_EMPTY | IS_HARMLESS)
#define MISSING   -17

Referenced by display_knowledge().

#define PANEL_SIZE   11

Number of basic grids per panel, vertically and horizontally.

Referenced by do_cmd_locate().

#define STORE_KNOWLEDGE_ROW   7


Main knowledge menus

Referenced by do_cmd_knowledge_store().

#define swap (   a,
 
)    (swapspace = (void*)(a)), ((a) = (b)), ((b) = swapspace)

Typedef Documentation

typedef struct join join_t

Helper class for generating joins.

Function Documentation

static int a_cmp_tval ( const void a,
const void b 
)
static
static int actual_height ( int  height)
static

Return the actual height of a symbol.

References tile_height.

Referenced by display_tiles(), place_tile_cursor(), and tile_picker_command().

static int actual_width ( int  width)
static

Return the actual width of a symbol.

References tile_width.

Referenced by display_tiles(), place_tile_cursor(), and tile_picker_command().

static int art2gid ( int  oid)
static

References a_info, and artifact::tval.

Referenced by do_cmd_knowledge_artifacts().

static bool artifact_is_known ( int  a_idx)
static

Check if the given artifact idx is something we should "Know" about.

References a_info, find_artifact(), object_is_known_artifact(), and player::wizard.

Referenced by collect_known_artifacts().

static void cleanup_cmds ( void  )
static

Keep macro counts happy.

References mem_free().

Referenced by textui_knowledge_init().

static int cmp_level ( const void a,
const void b 
)
static

References cmp_mexp(), level, and r_info.

Referenced by cmp_monsters(), cmp_tkill(), and do_cmd_query_symbol().

static int cmp_mexp ( const void a,
const void b 
)
static

References r_info.

Referenced by cmp_level().

int cmp_monsters ( const void a,
const void b 
)

References cmp_level().

Referenced by spoil_mon_desc(), and spoil_mon_info().

static int cmp_pkill ( const void a,
const void b 
)
static

References cmp_tkill(), and l_list.

Referenced by do_cmd_query_symbol().

static int cmp_tkill ( const void a,
const void b 
)
static

References cmp_level(), and l_list.

Referenced by cmp_pkill().

static int collect_known_artifacts ( int artifacts,
size_t  artifacts_len 
)
static

If 'artifacts' is NULL, it counts the number of known artifacts, otherwise it collects the list of known artifacts into 'artifacts' as well.

References a_info, angband_constants::a_max, artifact_is_known(), OPT, and z_info.

Referenced by do_cmd_knowledge_artifacts(), and textui_browse_knowledge().

static int count_known_monsters ( void  )
static
static int default_group_id ( int  oid)
static
static int default_item_id ( int  oid)
static


Knowledge menu utilities

References join::oid.

Referenced by desc_ego_fake(), display_ego_item(), display_monster(), e_cmp_tval(), m_cmp_race(), and mon_lore().

static void desc_art_fake ( int  a_idx)
static
static void desc_ego_fake ( int  oid)
static
static void desc_obj_fake ( int  k_idx)
static
static void display_artifact ( int  col,
int  row,
bool  cursor,
int  oid 
)
static

Display an artifact label.

References c_prt(), curs_attrs, CURS_KNOWN, get_artifact_display_name(), and int.

Referenced by do_cmd_knowledge_artifacts().

static void display_ego_item ( int  col,
int  row,
bool  cursor,
int  oid 
)
static
static void display_feature ( int  col,
int  row,
bool  cursor,
int  oid 
)
static
static void display_glyphs ( int  col,
int  row,
int  height,
int  width,
byte  a,
wchar_t  c 
)
static

Display glyph and colours.

References big_pad(), height, i, MAX_COLORS, prt(), Term_erase(), Term_gotoxy(), and Term_locate().

Referenced by display_knowledge().

static void display_group_member ( struct menu menu,
int  oid,
bool  cursor,
int  row,
int  col,
int  wid 
)
static
static void display_knowledge ( const char *  title,
int obj_list,
int  o_count,
group_funcs  g_funcs,
member_funcs  o_funcs,
const char *  otherfields 
)
static
static void display_monster ( int  col,
int  row,
bool  cursor,
int  oid 
)
static
static void display_object ( int  col,
int  row,
bool  cursor,
int  oid 
)
static
static void display_rune ( int  col,
int  row,
bool  cursor,
int  oid 
)
static

Display the runes in a group.

References c_prt(), c_put_str(), COLOUR_YELLOW, curs_attrs, CURS_KNOWN, int, quark_str(), rune_name(), and rune_note().

Referenced by do_cmd_knowledge_runes().

static void display_tiles ( int  col,
int  row,
int  height,
int  width,
byte  attr_top,
byte  char_left 
)
static
static void display_trap ( int  col,
int  row,
bool  cursor,
int  oid 
)
static
void do_cmd_center_map ( void  )

Centers the map on the player.

References center_panel().

Referenced by context_menu_player().

void do_cmd_equip ( void  )
void do_cmd_inven ( void  )
void do_cmd_itemlist ( void  )

Display the main-screen item list.

References term::hgt, object_list_show_interactive(), screen_load(), screen_save(), Term, and term::wid.

static void do_cmd_knowledge_artifacts ( const char *  name,
int  row 
)
static
static void do_cmd_knowledge_ego_items ( const char *  name,
int  row 
)
static
static void do_cmd_knowledge_features ( const char *  name,
int  row 
)
static
static void do_cmd_knowledge_history ( const char *  name,
int  row 
)
static

References history_display().

static void do_cmd_knowledge_monsters ( const char *  name,
int  row 
)
static
static void do_cmd_knowledge_runes ( const char *  name,
int  row 
)
static
static void do_cmd_knowledge_scores ( const char *  name,
int  row 
)
static

References show_scores().

static void do_cmd_knowledge_store ( const char *  name,
int  row 
)
static
static void do_cmd_knowledge_traps ( const char *  name,
int  row 
)
static
void do_cmd_locate ( void  )
void do_cmd_look ( void  )

Look command.

References msg, TARGET_LOOK, and target_set_interactive().

void do_cmd_message_one ( void  )


Other knowledge functions

Recall the most recent message

References c_prt(), format(), message_color(), and message_str().

void do_cmd_messages ( void  )

Show previous messages to the user.

The screen format uses line 0 and 23 for headers and prompts, skips line 1 and 22, and uses line 2 thru 21 for old messages.

This command shows you which commands you are viewing, and allows you to "search" for strings in the recall.

Note that messages may be longer than 80 characters, but they are displayed using "infinite" length, with a special sub-command to "slide" the virtual display to the left or right.

Attempt to only highlight the matching portions of the string.

References ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, askfor_aux(), mouseclick::button, keypress::code, COLOUR_YELLOW, menu::count, ESCAPE, EVT_KBRD, EVT_MOUSE, format(), i, inkey_ex(), int, KC_ENTER, KC_PGDOWN, KC_PGUP, ui_event::key, message_color(), message_count(), message_str(), messages_num(), ui_event::mouse, msg, my_stristr(), NULL, prt(), screen_load(), screen_save(), Term_clear(), Term_get_size(), Term_putstr(), ui_event::type, and mouseclick::y.

Referenced by death_messages(), and store_process_command_key().

void do_cmd_monlist ( void  )

Display the main-screen monster list.

References term::hgt, monster_list_show_interactive(), screen_load(), screen_save(), Term, and term::wid.

void do_cmd_query_symbol ( void  )

Identify a character, allow recall of monsters.

Several "special" responses recall "multiple" monsters: ^A (all monsters) ^U (all unique monsters) ^N (all non-unique monsters)

The responses may be sorted in several ways, see below.

Note that the player ghosts are ignored, since they do not exist.

References monster_lore::all_known, buf, char_matches_key(), cmp_level(), cmp_pkill(), keypress::code, monster_race::d_char, ESCAPE, monster_race::flags, get_com(), handle_stuff(), i, inkey(), KTRL, l_list, lookup_symbol(), lore_show_interactive(), lore_title(), mem_free(), mem_zalloc(), monster_race_track(), my_strcpy(), NULL, OPT, prt(), put_str(), r_info, angband_constants::r_max, rf_has, RF_UNIQUE, SCREEN_REGION, monster_lore::sights, sort(), textblock_append(), textblock_free(), textblock_new(), textui_textblock_place(), player::upkeep, and z_info.

void do_cmd_quiver ( void  )
static int e_cmp_tval ( const void a,
const void b 
)
static
static const char* ego_grp_name ( int  gid)
static


EGO ITEMS

References grouper::name.

Referenced by desc_ego_fake(), and do_cmd_knowledge_ego_items().

static int f_cmp_fkind ( const void a,
const void b 
)
static
static byte* f_xattr ( int  oid)
static

References f_uik_lighting, and feat_x_attr.

Referenced by do_cmd_knowledge_features().

static wchar_t* f_xchar ( int  oid)
static

References f_uik_lighting, and feat_x_char.

Referenced by do_cmd_knowledge_features().

static void f_xtra_act ( struct keypress  ch,
int  oid 
)
static

Special key actions for cycling lighting.

References keypress::code, LIGHTING_DARK, LIGHTING_LIT, LIGHTING_LOS, and LIGHTING_TORCH.

Referenced by do_cmd_knowledge_features().

static void feat_lore ( int  oid)
static
static int feat_order ( int  feat)
static

Return a specific ordering for the features.

References feature::d_char, and f_info.

Referenced by do_cmd_knowledge_features(), and f_cmp_fkind().

static const char* feat_prompt ( int  oid)
static

References void().

Referenced by do_cmd_knowledge_features().

static struct object* find_artifact ( struct artifact artifact)
static
static const char* fkind_name ( int  gid)
static
static void get_artifact_display_name ( char *  o_name,
size_t  namelen,
int  a_idx 
)
static
static bool glyph_command ( ui_event  ke,
bool *  glyph_picker_ptr,
int  height,
int  width,
byte cur_attr_ptr,
wchar_t *  cur_char_ptr,
int  col,
int  row 
)
static
static const char* kind_name ( int  gid)
static
static int logical_height ( int  height)
static

From an actual height, return the logical height.

References tile_height.

Referenced by display_tiles(), and tile_picker_command().

static int logical_width ( int  width)
static

From an actual width, return the logical width.

References tile_width.

Referenced by display_tiles(), glyph_command(), and tile_picker_command().

static void lookup_symbol ( char  sym,
char *  buf,
size_t  max 
)
static

Search the monster, item, and feature types to find the meaning for the given symbol.

Note: We currently search items first, then features, then monsters, and we return the first hit for a symbol. This is to prevent mimics and lurkers from matching a symbol instead of the item or feature it is mimicking.

Todo: concatenate all matches into buf. This will be much easier once we can loop through item tvals instead of items (see note below.)

Todo: Should this take the user's pref files into account?

References char_matches_key(), monster_base::d_char, f_info, angband_constants::f_max, i, k_info, angband_constants::k_max, monster_base::name, monster_base::next, rb_info, streq, strnfmt(), monster_base::text, tval_find_name(), and z_info.

Referenced by do_cmd_query_symbol().

static int m_cmp_race ( const void a,
const void b 
)
static
static byte* m_xattr ( int  oid)
static

References monster_x_attr, and join::oid.

Referenced by do_cmd_knowledge_monsters().

static wchar_t* m_xchar ( int  oid)
static

References monster_x_char, and join::oid.

Referenced by do_cmd_knowledge_monsters().

static void mon_lore ( int  oid)
static
static void mon_summary ( int  gid,
const int item_list,
int  n,
int  top,
int  row,
int  col 
)
static
static int o_cmp_tval ( const void a,
const void b 
)
static
static byte* o_xattr ( int  oid)
static
static wchar_t* o_xchar ( int  oid)
static
static void o_xtra_act ( struct keypress  ch,
int  oid 
)
static
static const char* o_xtra_prompt ( int  oid)
static

Display special prompt for object inscription.

References object_kind::aware, object_kind::note_aware, object_kind::note_unaware, and objkind_byid().

Referenced by textui_browse_object_knowledge().

static int obj2gid ( int  oid)
static
static void place_tile_cursor ( int  col,
int  row,
byte  a,
byte  c,
byte  attr_top,
byte  char_left 
)
static

Place the cursor at the correct position for tile picking.

References actual_height(), actual_width(), i, and Term_gotoxy().

Referenced by display_knowledge().

static const char* race_name ( int  gid)
static

References monster_group.

Referenced by do_cmd_knowledge_monsters(), and rd_monster().

static const char* recall_prompt ( int  oid)
static
static void remove_tiles ( int  col,
int  row,
bool *  picker_ptr,
int  width,
int  height 
)
static

Remove the tile display and clear the screen.

References bigcurs, height, i, and Term_erase().

Referenced by glyph_command(), and tile_picker_command().

static void rune_lore ( int  oid)
static
static int rune_var ( int  oid)
static

Referenced by do_cmd_knowledge_runes().

static const char* rune_var_name ( int  gid)
static

Referenced by do_cmd_knowledge_runes().

static void rune_xtra_act ( struct keypress  ch,
int  oid 
)
static
static const char* rune_xtra_prompt ( int  oid)
static

Display special prompt for rune inscription.

References rune_note().

Referenced by do_cmd_knowledge_runes().

static int t_cmp_tkind ( const void a,
const void b 
)
static
static byte* t_xattr ( int  oid)
static

References t_uik_lighting, and trap_x_attr.

Referenced by do_cmd_knowledge_traps().

static wchar_t* t_xchar ( int  oid)
static

References t_uik_lighting, and trap_x_char.

Referenced by do_cmd_knowledge_traps().

static void t_xtra_act ( struct keypress  ch,
int  oid 
)
static

Special key actions for cycling lighting.

References keypress::code, LIGHTING_DARK, LIGHTING_LIT, LIGHTING_LOS, and LIGHTING_TORCH.

Referenced by do_cmd_knowledge_traps().

void textui_browse_knowledge ( void  )
void textui_browse_object_knowledge ( const char *  name,
int  row 
)
void textui_knowledge_init ( void  )
static bool tile_picker_command ( ui_event  ke,
bool *  tile_picker_ptr,
int  height,
int  width,
byte attr_top_ptr,
byte char_left_ptr,
byte cur_attr_ptr,
byte cur_char_ptr,
int  col,
int  row,
int delay 
)
static
static const char* tkind_name ( int  gid)
static

Referenced by do_cmd_knowledge_traps().

static void trap_lore ( int  oid)
static
static int trap_order ( int  trap)
static
static const char* trap_prompt ( int  oid)
static

References void().

Referenced by do_cmd_knowledge_traps().

Variable Documentation

byte attr_idx = 0
static

Clipboard variables for copy & paste in visual mode.

Referenced by display_knowledge(), and tile_picker_command().

byte char_idx = 0
static
const wchar_t* chars

Referenced by bolt_pict(), m_cmp_race(), and proj_display().

join_t* default_join
static

A default group-by.

enum grid_light_level f_uik_lighting = LIGHTING_LIT
static

Disgusting hack to allow 4 in 1 editing of terrain visuals.

Referenced by f_xattr(), and f_xchar().

const char* feature_group_text[]
static
Initial value:
=
{
"Floors",
"Doors",
"Stairs",
"Walls",
"Streamers",
"Obstructions",
"Stores",
"Other",
}
NULL
Definition: list-summon-types.h:18


TERRAIN FEATURES

Description of each feature group.

menu_action knowledge_actions[]
static
Initial value:
=
{
{ 0, 0, "Display object knowledge", textui_browse_object_knowledge },
{ 0, 0, "Display rune knowledge", do_cmd_knowledge_runes },
{ 0, 0, "Display artifact knowledge", do_cmd_knowledge_artifacts },
{ 0, 0, "Display ego item knowledge", do_cmd_knowledge_ego_items },
{ 0, 0, "Display monster knowledge", do_cmd_knowledge_monsters },
{ 0, 0, "Display feature knowledge", do_cmd_knowledge_features },
{ 0, 0, "Display trap knowledge", do_cmd_knowledge_traps },
{ 0, 0, "Display contents of general store", do_cmd_knowledge_store },
{ 0, 0, "Display contents of armourer", do_cmd_knowledge_store },
{ 0, 0, "Display contents of weaponsmith", do_cmd_knowledge_store },
{ 0, 0, "Display contents of temple", do_cmd_knowledge_store },
{ 0, 0, "Display contents of alchemist", do_cmd_knowledge_store },
{ 0, 0, "Display contents of magic shop", do_cmd_knowledge_store },
{ 0, 0, "Display contents of black market", do_cmd_knowledge_store },
{ 0, 0, "Display contents of home", do_cmd_knowledge_store },
{ 0, 0, "Display hall of fame", do_cmd_knowledge_scores },
{ 0, 0, "Display character history", do_cmd_knowledge_history },
}
static void do_cmd_knowledge_runes(const char *name, int row)
Display rune knowledge.
Definition: ui-knowledge.c:2117
static void do_cmd_knowledge_history(const char *name, int row)
Definition: ui-knowledge.c:2504
static void do_cmd_knowledge_store(const char *name, int row)
Definition: ui-knowledge.c:2494
void textui_browse_object_knowledge(const char *name, int row)
Display known objects.
Definition: ui-knowledge.c:1965
static void do_cmd_knowledge_traps(const char *name, int row)
Interact with trap visuals.
Definition: ui-knowledge.c:2460
static void do_cmd_knowledge_features(const char *name, int row)
Interact with feature visuals.
Definition: ui-knowledge.c:2279
static void do_cmd_knowledge_scores(const char *name, int row)
Definition: ui-knowledge.c:2499
static void do_cmd_knowledge_artifacts(const char *name, int row)
Display known artifacts.
Definition: ui-knowledge.c:1585
static void do_cmd_knowledge_monsters(const char *name, int row)
Display known monsters.
Definition: ui-knowledge.c:1274
static void do_cmd_knowledge_ego_items(const char *name, int row)
Display known ego_items.
Definition: ui-knowledge.c:1665

Definition of the "player knowledge" menu.

struct menu knowledge_menu
static
struct { ... } monster_group[]


MONSTERS

Description of each monster group.

Referenced by count_known_monsters(), do_cmd_knowledge_monsters(), m_cmp_race(), and race_name().

const char* name
int* obj_group_order = NULL
static
const grouper object_text_order[]
static


ARTIFACTS

These are used for all the object sections

const char* rune_group_text[]
static
Initial value:
=
{
"Combat",
"Modifiers",
"Resists",
"Brands",
"Slays",
"Curses",
"Other",
}
NULL
Definition: list-summon-types.h:18


OBJECT RUNES

Description of each rune group.

enum grid_light_level t_uik_lighting = LIGHTING_LIT
static

Disgusting hack to allow 4 in 1 editing of trap visuals.

Referenced by t_xattr(), and t_xchar().

const char* trap_group_text[]
static
Initial value:
=
{
"Runes",
"Locks",
"Traps",
"Other",
}
NULL
Definition: list-summon-types.h:18


TRAPS

Description of each feature group.