File src/display.c


Included Files


Preprocessor definitions

#define _map_location( x, y, show )

#define reset_glyph_bbox

#define more_than_one( x, y, a, b, c )

#define sign( z )

#define T_d 0

#define T_l 1

#define T_u 2

#define T_r 3

#define T_stone 0

#define T_tlcorn 1

#define T_trcorn 2

#define T_hwall 3

#define T_tdwall 4

#define C_bl 0

#define C_tl 1

#define C_tr 2

#define C_br 3

#define C_trcorn 0

#define C_brcorn 1

#define C_blcorn 2

#define C_tlwall 3

#define C_tuwall 4

#define C_crwall 5

#define only( sv, bits )

#define set_corner( idx, lev, which, outer, inner, name )


Type struct tmp_glyph

struct tmp_glyph
struct tmp_glyph 
   { 
     coord saved[80]; 
     int sidx; 
     int style; 
     int glyph; 
     struct tmp_glyph* prev; 
   } 

Typedef gbuf_entry

typedef struct {...} gbuf_entry
struct 
   { 
     xchar new; 
     int glyph; 
   } 

Global Variable seenv_matrix

unsigned char seenv_matrix[3][3]
Visible in:  src/display.c
Used in: set_seenv()src/display.c

Local Variables

tgfirst
static struct tmp_glyph tgfirst
Used in: tmp_at()

gbuf
static gbuf_entry gbuf[21][80]
Used in: clear_glyph_buffer()
  flush_screen()
  glyph_at()
  row_refresh()
  show_glyph()

gbuf_start
static char gbuf_start[21]
Used in: clear_glyph_buffer()
  flush_screen()
  show_glyph()

gbuf_stop
static char gbuf_stop[21]
Used in: clear_glyph_buffer()
  flush_screen()
  show_glyph()

nul_gbuf
static gbuf_entry nul_gbuf
Used in: clear_glyph_buffer()

wall_matrix
static const int wall_matrix[4][5]
Used in: wall_angle()

cross_matrix
static const int cross_matrix[4][6]
Used in: wall_angle()


Global Function back_to_glyph()

int back_to_glyph ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: wall_angle()src/display.c
  impossible()
Called by: magic_map_background()src/display.c
  map_background()src/display.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c

Global Function clear_glyph_buffer()

void clear_glyph_buffer ( void )
Prototyped in: include/extern.h
Called by: cls()src/display.c
  display_gamewindows()src/allmain.c
References Variables: gbufsrc/display.c
  gbuf_startsrc/display.c
  gbuf_stopsrc/display.c
  nul_gbufsrc/display.c

Global Function cls()

void cls ( void )
Prototyped in: include/extern.h
Calls: clear_glyph_buffer()src/display.c
Called by: docrt()src/display.c
  food_detect()src/detect.c
  gold_detect()src/detect.c
  monster_detect()src/detect.c
  object_detect()src/detect.c
  swallowed()src/display.c
  trap_detect()src/detect.c
  under_ground()src/display.c
  under_water()src/display.c
References Variables: WIN_MAPsrc/decl.c
  WIN_MESSAGEsrc/decl.c
  flagssrc/decl.c
  windowprocs

Global Function curs_on_u()

void curs_on_u ( void )
Prototyped in: include/extern.h
Calls: flush_screen()src/display.c

Global Function docrt()

void docrt ( void )
Prototyped in: include/extern.h
Calls: cls()src/display.c
  see_monsters()src/display.c
  show_glyph()src/display.c
  swallowed()src/display.c
  under_ground()src/display.c
  under_water()src/display.c
  on_level(), vision_recalc()
Called by: do_mapping()src/detect.c
  do_vicinity_map()src/detect.c
  doredraw()src/display.c
  food_detect()src/detect.c
  gold_detect()src/detect.c
  monster_detect()src/detect.c
  newgame()src/allmain.c
  object_detect()src/detect.c
  trap_detect()src/detect.c
References Variables: dungeon_topologysrc/decl.c
  flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c

Global Function doredraw()

int doredraw ( void )
Prototyped in: include/extern.h
Calls: docrt()src/display.c
Used in:  src/cmd.c

Global Function feel_location()

void feel_location ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: display_monster()src/display.c
  is_pool()src/dbridge.c
  map_background()src/display.c
  map_object()src/display.c
  map_trap()src/display.c
  set_seenv()src/display.c
  show_glyph()src/display.c
  dist2(), on_level(), sobj_at(), t_at()
Called by: dig()src/dig.c
  dosearch0()src/detect.c
  find_trap()src/detect.c
  mkcavepos()src/dig.c
  newsym()src/display.c
  use_stethoscope()src/apply.c
References Variables: dungeon_topologysrc/decl.c
  flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  uballsrc/decl.c
  ublindfsrc/decl.c
  uchainsrc/decl.c
  youmonstsrc/decl.c
  mons

Global Function flush_screen()

void flush_screen ( int cursor_on_u )
Prototyped in: include/extern.h
Calls: bot()src/botl.c
Called by: curs_on_u()src/display.c
  do_mapping()src/detect.c
  do_vicinity_map()src/detect.c
  mkcavearea()src/dig.c
  newgame()src/allmain.c
  parse()src/cmd.c
  shieldeff()src/display.c
  tmp_at()src/display.c
References Variables: WIN_MAPsrc/decl.c
  flagssrc/decl.c
  gbufsrc/display.c
  gbuf_startsrc/display.c
  gbuf_stopsrc/display.c
  usrc/decl.c
  windowprocs

Global Function glyph_at()

int glyph_at ( xchar x, xchar y )
Prototyped in: include/extern.h
Called by: check_map_spot()src/detect.c
  see_traps()src/display.c
References Variables: gbufsrc/display.c

Global Function magic_map_background()

void magic_map_background ( xchar x, xchar y, int show )
Prototyped in: include/extern.h
Calls: back_to_glyph()src/display.c
  show_glyph()src/display.c
Called by: show_map_spot()src/detect.c
References Variables: levelsrc/decl.c
  viz_arraysrc/decl.c

Global Function map_background()

void map_background ( xchar x, xchar y, int show )
Prototyped in: include/extern.h
Calls: back_to_glyph()src/display.c
  show_glyph()src/display.c
Called by: feel_location()src/display.c
  map_location()src/display.c
  newsym()src/display.c
  sokoban_detect()src/detect.c
  unmap_object()src/display.c
References Variables: levelsrc/decl.c

Global Function map_invisible()

void map_invisible ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: show_glyph()src/display.c
Called by: artifact_hit()src/artifact.c
  dosearch0()src/detect.c
  findone()src/detect.c
  newsym()src/display.c
  use_stethoscope()src/apply.c
  use_whip()src/apply.c
References Variables: levelsrc/decl.c

Global Function map_location()

void map_location ( int x, int y, int show )
Prototyped in: include/extern.h
Calls: is_pool()src/dbridge.c
  map_background()src/display.c
  map_object()src/display.c
  map_trap()src/display.c
  t_at()
References Variables: levelsrc/decl.c
  usrc/decl.c

Global Function map_object()

void map_object ( struct obj* obj, int show )
Prototyped in: include/extern.h
Calls: show_glyph()src/display.c
  dmgtype(), rn2()
Called by: display_monster()src/display.c
  feel_location()src/display.c
  food_detect()src/detect.c
  gold_detect()src/detect.c
  map_location()src/display.c
  move_bc()src/ball.c
  newsym()src/display.c
  object_detect()src/detect.c
  sense_trap()src/detect.c
  sokoban_detect()src/detect.c
References Variables: levelsrc/decl.c
  otg_tempsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function map_trap()

void map_trap ( struct trap* trap, int show )
Prototyped in: include/extern.h
Calls: show_glyph()src/display.c
  dmgtype(), rn2()
Called by: feel_location()src/display.c
  map_location()src/display.c
  newsym()src/display.c
  sense_trap()src/detect.c
  sokoban_detect()src/detect.c
  unmap_object()src/display.c
  wiz_map()src/cmd.c
References Variables: levelsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function newsym()

void newsym ( int x, int y )
Prototyped in: include/extern.h
Calls: display_monster()src/display.c
  display_warning()src/display.c
  feel_location()src/display.c
  is_pool()src/dbridge.c
  map_background()src/display.c
  map_invisible()src/display.c
  map_object()src/display.c
  map_trap()src/display.c
  show_glyph()src/display.c
  dist2(), dmgtype(), monsndx(), on_level(), rn2(), show_region(), t_at(), visible_region_at()
Called by: arti_invoke()src/artifact.c
  bury_objs()src/dig.c
  close_drawbridge()src/dbridge.c
  destroy_drawbridge()src/dbridge.c
  dig()src/dig.c
  dig_up_grave()src/dig.c
  digactualhole()src/dig.c
  dosearch0()src/detect.c
  drag_ball()src/ball.c
  drop_ball()src/ball.c
  fig_transform()src/apply.c
  find_trap()src/detect.c
  findone()src/detect.c
  food_detect()src/detect.c
  gold_detect()src/detect.c
  mdig_tunnel()src/dig.c
  mkcavearea()src/dig.c
  mkcavepos()src/dig.c
  move_bc()src/ball.c
  object_detect()src/detect.c
  open_drawbridge()src/dbridge.c
  openone()src/detect.c
  placebc()src/ball.c
  rot_corpse()src/dig.c
  savebones()src/bones.c
  see_monsters()src/display.c
  see_objects()src/display.c
  see_traps()src/display.c
  set_bc()src/ball.c
  set_trap()src/apply.c
  shieldeff()src/display.c
  show_map_spot()src/detect.c
  tmp_at()src/display.c
  trap_detect()src/detect.c
  under_ground()src/display.c
  under_water()src/display.c
  unearth_objs()src/dig.c
  unplacebc()src/ball.c
  use_grapple()src/apply.c
  use_stethoscope()src/apply.c
  zap_dig()src/dig.c
References Variables: dungeon_topologysrc/decl.c
  flagssrc/decl.c
  in_mklevsrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c
  mons

Global Function row_refresh()

void row_refresh ( int start, int stop, int y )
Prototyped in: include/extern.h
References Variables: WIN_MAPsrc/decl.c
  gbufsrc/display.c
  windowprocs

Global Function see_monsters()

void see_monsters ( void )
Prototyped in: include/extern.h
Calls: newsym()src/display.c
  see_wsegs()
Called by: docrt()src/display.c
  moveloop()src/allmain.c
  set_artifact_intrinsic()src/artifact.c
References Variables: levelsrc/decl.c

Global Function see_objects()

void see_objects ( void )
Prototyped in: include/extern.h
Calls: newsym()src/display.c
Called by: moveloop()src/allmain.c
References Variables: levelsrc/decl.c

Global Function see_traps()

void see_traps ( void )
Prototyped in: include/extern.h
Calls: glyph_at()src/display.c
  newsym()src/display.c
Called by: moveloop()src/allmain.c
References Variables: ftrapsrc/decl.c

Global Function set_mimic_blocking()

void set_mimic_blocking ( void )
Prototyped in: include/extern.h
Calls: block_point(), unblock_point()
References Variables: levelsrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function set_wall_state()

void set_wall_state ( void )
Prototyped in: include/extern.h
Calls: set_corn()src/display.c
  set_crosswall()src/display.c
  set_twall()src/display.c
  set_wall()src/display.c
References Variables: levelsrc/decl.c

Global Function shieldeff()

void shieldeff ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: flush_screen()src/display.c
  newsym()src/display.c
  show_glyph()src/display.c
Called by: artifact_hit()src/artifact.c
References Variables: shield_staticsrc/decl.c
  viz_arraysrc/decl.c
  windowprocs

Global Function show_glyph()

void show_glyph ( int x, int y, int glyph )
Prototyped in: include/extern.h
Calls: isok()src/cmd.c
  impossible()
Called by: display_monster()src/display.c
  display_warning()src/display.c
  docrt()src/display.c
  feel_location()src/display.c
  magic_map_background()src/display.c
  map_background()src/display.c
  map_invisible()src/display.c
  map_object()src/display.c
  map_trap()src/display.c
  monster_detect()src/detect.c
  newsym()src/display.c
  shieldeff()src/display.c
  swallowed()src/display.c
  tmp_at()src/display.c
  under_water()src/display.c
References Variables: gbufsrc/display.c
  gbuf_startsrc/display.c
  gbuf_stopsrc/display.c

Global Function swallowed()

void swallowed ( int first )
Prototyped in: include/extern.h
Calls: cls()src/display.c
  isok()src/cmd.c
  show_glyph()src/display.c
  swallow_to_glyph()src/display.c
  dmgtype(), monsndx(), rn2()
Called by: docrt()src/display.c
  moveloop()src/allmain.c
References Variables: usrc/decl.c
  youmonstsrc/decl.c

Global Function tmp_at()

void tmp_at ( int x, int y )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  flush_screen()src/display.c
  newsym()src/display.c
  show_glyph()src/display.c
  free(), panic()
Called by: zap_dig()src/dig.c
References Variables: tgfirstsrc/display.c
  viz_arraysrc/decl.c

Global Function under_ground()

void under_ground ( int mode )
Prototyped in: include/extern.h
Calls: cls()src/display.c
  newsym()src/display.c
Called by: docrt()src/display.c
  food_detect()src/detect.c
  gold_detect()src/detect.c
  monster_detect()src/detect.c
  moveloop()src/allmain.c
  object_detect()src/detect.c
  trap_detect()src/detect.c
References Variables: usrc/decl.c

Global Function under_water()

void under_water ( int mode )
Prototyped in: include/extern.h
Calls: cls()src/display.c
  is_pool()src/dbridge.c
  isok()src/cmd.c
  newsym()src/display.c
  show_glyph()src/display.c
  on_level()
Called by: docrt()src/display.c
  food_detect()src/detect.c
  gold_detect()src/detect.c
  monster_detect()src/detect.c
  moveloop()src/allmain.c
  object_detect()src/detect.c
  trap_detect()src/detect.c
References Variables: dungeon_topologysrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Global Function unmap_object()

void unmap_object ( int x, int y )
Prototyped in: include/extern.h
Calls: is_pool()src/dbridge.c
  map_background()src/display.c
  map_trap()src/display.c
  t_at()
Called by: clear_stale_map()src/detect.c
  dosearch0()src/detect.c
  findone()src/detect.c
  use_stethoscope()src/apply.c
References Variables: levelsrc/decl.c
  usrc/decl.c

Global Function zapdir_to_glyph()

int zapdir_to_glyph ( int dx, int dy, int beam_type )
Prototyped in: include/extern.h
Calls: impossible()

Local Function check_pos()

static int check_pos ( int x, int y, int which )
Prototyped in: src/display.c
Calls: isok()src/cmd.c
Called by: set_corn()src/display.c
  set_crosswall()src/display.c
  set_twall()src/display.c
  set_wall()src/display.c
References Variables: levelsrc/decl.c

Local Function display_monster()

static void display_monster ( xchar x, xchar y, struct monst* mon, int in_sight, xchar worm_tail )
Prototyped in: src/display.c
Calls: map_object()src/display.c
  show_glyph()src/display.c
  dist2(), dmgtype(), impossible(), monsndx(), rn2()
Called by: feel_location()src/display.c
  newsym()src/display.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c
  mons

Local Function display_warning()

static void display_warning ( struct monst* mon )
Prototyped in: src/display.c
Calls: show_glyph()src/display.c
  dist2(), dmgtype(), impossible(), monsndx(), rn2()
Called by: newsym()src/display.c
References Variables: flagssrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Local Function set_corn()

static int set_corn ( int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4 )
Prototyped in: src/display.c
Calls: check_pos()src/display.c
Called by: set_wall_state()src/display.c

Local Function set_crosswall()

static int set_crosswall ( int x, int y )
Prototyped in: src/display.c
Calls: check_pos()src/display.c
Called by: set_wall_state()src/display.c

Local Function set_seenv()

static void set_seenv ( struct rm* lev, int x0, int y0, int x, int y )
Prototyped in: src/display.c
Called by: feel_location()src/display.c
References Variables: seenv_matrixsrc/display.c

Local Function set_twall()

static int set_twall ( int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3 )
Prototyped in: src/display.c
Calls: check_pos()src/display.c
Called by: set_wall_state()src/display.c

Local Function set_wall()

static int set_wall ( int x, int y, int horiz )
Prototyped in: src/display.c
Calls: check_pos()src/display.c
Called by: set_wall_state()src/display.c

Local Function swallow_to_glyph()

static int swallow_to_glyph ( int mnum, int loc )
Prototyped in: src/display.c
Calls: dmgtype(), impossible(), rn2()
Called by: swallowed()src/display.c
References Variables: usrc/decl.c
  youmonstsrc/decl.c

Local Function t_warn()

static void t_warn ( struct rm* lev )
Prototyped in: src/display.c
Calls: impossible()
Called by: wall_angle()src/display.c

Local Function wall_angle()

static int wall_angle ( struct rm* lev )
Prototyped in: src/display.c
Calls: t_warn()src/display.c
  impossible()
Called by: back_to_glyph()src/display.c
References Variables: cross_matrixsrc/display.c
  wall_matrixsrc/display.c