#ifndef WH_DISPLAY_H_0ca50488_ #define WH_DISPLAY_H_0ca50488_ /* * APIs exported by display.c, and associated definitions. */ #include #include "structs.h" /* * Values for the second argument to loc_char(). ORDINARY is used for * routine game display; DEBUG for debugging investigation, and MAP * for looking at maps. */ typedef enum { LC_ORDINARY = 1, LC_DEBUG, LC_MAP, } LCHOW; /* * Return values from the third argument to display_list(). */ typedef enum { DL_K_IGNORE = 1, DL_K_CONTINUE, DL_K_ABORT, } DLKS; /* * Return values from the first argument to display_list(). */ typedef enum { DL_L_MORE = 1, DL_L_DONE, } DLLS; /* * Interactively align a map to visible reality. Arguments: the map, * pointers to x and y offset variables, and a prompt string. */ extern int place_map(OBJ *, int *, int *, const char *); /* * Display/examine a map. Argument is the map. */ extern void view_map(OBJ *); /* * Compute and return the display character for a given location and * display method. */ extern char loc_char(LOC *, LCHOW); /* * Clear the display, eg, when the player switches levels. */ extern void cleardisp(void); /* * Draw those portions of a level which are mapepd or visible. */ extern void drawmapped(LEVEL *); /* * Update the display according to the data saved by upddisp/upddisp1. */ extern void showdisp(void); /* * Update the display according to data in the arguments. * * showdisp2(fv,cv,ox,oy) updates according to flags fv, characters cv, * offset (ox,oy). This does not refer to the dungeon at all; its * actions are driven entirely off the arguments. * * The flags are zero or more of the DF_* bits. */ extern void showdisp2(unsigned char (*)[LEV_Y], char (*)[LEV_Y], int, int); #define DF_LIT 0x01 // Lit; display with standout. /* * Initialize the display routines. */ extern void initdisplay(void); /* * Update the display for a cell if it's visible (if not, do nothing). */ extern void upddisp(LOC *); /* * Display a level for debugging. */ extern void lvdisp(LEVEL *); /* * Update the display for a cell which may have changed (this is used, * eg, when a monster moves, to perform any display updates). */ extern void upddisp1(LOC *l); /* * Set the subtype for a wall location (first arg) when seen from * another location (second arg). */ extern void checkwall_from(LOC *, LOC *); /* * Display a list of lines. This can be used to just display text or * to choose from a list, depending on the arguments. */ extern void display_list(DLLS (*)(FILE *), const char *, DLKS (*)(int)); /* * A keystroke function for display_list() designed for just displaying * text lines. */ extern DLKS dl_justmore(int); #endif