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

character screens and dumps More...

#include "angband.h"
#include "buildid.h"
#include "game-world.h"
#include "init.h"
#include "obj-desc.h"
#include "obj-gear.h"
#include "obj-identify.h"
#include "obj-info.h"
#include "obj-util.h"
#include "player.h"
#include "player-timed.h"
#include "player-util.h"
#include "store.h"
#include "ui-display.h"
#include "ui-history.h"
#include "ui-input.h"
#include "ui-menu.h"
#include "ui-obj.h"
#include "ui-output.h"
#include "ui-player.h"

Data Structures

struct  panel_line
 Panel utilities. More...
struct  panel
struct  player_flag_record

Macros

#define RES_ROWS   9
#define BOUND(x, min, max)   MIN(max, MAX(min, x))
#define INFO_SCREENS   2 /* Number of screens in character info mode */

Functions

static struct panelpanel_allocate (int n)
static void panel_free (struct panel *p)
static void panel_line (struct panel *p, byte attr, const char *label, const char *fmt,...)
static void panel_space (struct panel *p)
static const char * likert (int x, int y, byte *attr)
static void display_player_equippy (int y, int x)
static void display_resistance_panel (const struct player_flag_record *rec, size_t size, const region *bounds)
static void display_player_flag_info (void)
void display_player_stat_info (void)
static void display_player_sust_info (void)
static void display_panel (const struct panel *p, bool left_adj, const region *bounds)
static const char * show_title (void)
static const char * show_adv_exp (void)
static const char * show_depth (void)
static const char * show_speed (void)
static byte max_color (int val, int max)
static struct panelget_panel_topleft (void)
static struct panelget_panel_midleft (void)
static struct panelget_panel_combat (void)
static struct panelget_panel_skills (void)
static struct panelget_panel_misc (void)
void display_player_xtra_info (void)
void display_player (int mode)
void write_character_dump (ang_file *fff)
 Write a character dump.
bool dump_save (const char *path)
 Save the lore to a file in the user directory.
void do_cmd_change_name (void)

Variables

static struct player_flag_record player_flag_table [RES_ROWS *4]
static const byte colour_table []
struct {
   region   bounds
   bool   align_left
   struct panel *(*   panel )(void)
panels []

Detailed Description

character screens and dumps

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

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 BOUND (   x,
  min,
  max 
)    MIN(max, MAX(min, x))

Referenced by get_panel_skills().

#define INFO_SCREENS   2 /* Number of screens in character info mode */

Referenced by do_cmd_change_name().

#define RES_ROWS   9

Function Documentation

static void display_panel ( const struct panel p,
bool  left_adj,
const region bounds 
)
static
void display_player ( int  mode)
static void display_player_equippy ( int  y,
int  x 
)
static
static void display_player_flag_info ( void  )
static
void display_player_stat_info ( void  )
static void display_player_sust_info ( void  )
static
void display_player_xtra_info ( void  )
static void display_resistance_panel ( const struct player_flag_record rec,
size_t  size,
const region bounds 
)
static
void do_cmd_change_name ( void  )
bool dump_save ( const char *  path)

Save the lore to a file in the user directory.

Parameters
pathis the path to the filename
Returns
TRUE on success, FALSE otherwise.

References FALSE, msg, text_lines_to_file(), TRUE, and write_character_dump().

Referenced by death_file(), and do_cmd_change_name().

static struct panel* get_panel_combat ( void  )
staticread
static struct panel* get_panel_midleft ( void  )
staticread
static struct panel* get_panel_misc ( void  )
staticread
static struct panel* get_panel_skills ( void  )
staticread
static struct panel* get_panel_topleft ( void  )
staticread
static const char* likert ( int  x,
int  y,
byte attr 
)
static

References COLOUR_L_GREEN, COLOUR_RED, and COLOUR_YELLOW.

Referenced by get_panel_skills().

static byte max_color ( int  val,
int  max 
)
static

References COLOUR_L_GREEN, and COLOUR_YELLOW.

Referenced by get_panel_midleft().

static struct panel* panel_allocate ( int  n)
staticread
static void panel_free ( struct panel p)
static
static void panel_line ( struct panel p,
byte  attr,
const char *  label,
const char *  fmt,
  ... 
)
static
static void panel_space ( struct panel p)
static

References panel::len, and panel::max.

Referenced by get_panel_combat(), and get_panel_midleft().

static const char* show_adv_exp ( void  )
static
static const char* show_depth ( void  )
static

References buffer, player::max_depth, and strnfmt().

Referenced by get_panel_midleft().

static const char* show_speed ( void  )
static
static const char* show_title ( void  )
static
void write_character_dump ( ang_file fff)

Variable Documentation

bool align_left
region bounds
const byte colour_table[]
static
struct panel*(* panel)(void)

Referenced by display_knowledge().

struct { ... } panels[]
struct player_flag_record player_flag_table[RES_ROWS *4]
static