nexus/io.h

140 lines
6.2 KiB
C

#include <ncurses.h>
#include "defs.h"
void addchoice(prompt_t *p, char ch, char *text, char *desc, void *data, char *longdesc);
void addheading(prompt_t *p, char *text);
void addmsghist(char *text);
void addpromptq(prompt_t *p, char *q);
void anim(cell_t *src, cell_t *dst, char ch, int colour);
void animline(cell_t *src, cell_t *dst, int gradual, char ch, char ch2, int colour);
void animcells(cell_t *src, cell_t **dst, int ndst, int gradual, char ch, char ch2, int colour);
//void animradial(cell_t *src, int radius, int ch, int colour);
void animradial(cell_t *src, int radius, int ch, int colour, int dirtype, char *text, char *noseetext);
void animsky(cell_t *src, char ch, int colour);
//void announceob(enum OBTYPE oid);
void announcearrival(lifeform_t *lf, map_t *newmap);
int announceflaggain(lifeform_t *lf, flag_t *f);
int announceflagloss(lifeform_t *lf, flag_t *f);
int announceobflaggain(object_t *o, flag_t *f);
void announceobflagloss(object_t *o, flag_t *f);
int confirm_badfeeling(object_t *o);
int confirm_injury_action(enum BODYPART bp, enum DAMTYPE dt, char *actionname);
lifeform_t *askgod(char *prompt, int onlyprayed);
object_t *askobject(obpile_t *op, char *title, int *count, char action, long opts);
object_t *askobjectwithflag(obpile_t *op, char *title, int *count, char action, long opts, enum FLAG withflag);
object_t *doaskobject(obpile_t *op, char *title, int *count, int showlong, int forpickup, int showpoints, char action, long opts, ...);
int askobjectmulti(obpile_t *op, char *prompt, long opts);
char askchar(char *prompt, char *validchars, char *def, int showchars, int maycancel);
cell_t *askcoords(char *prompt, char *subprompt, int targettype, lifeform_t *srclf, int maxrange, enum LOFTYPE loftype, int wanttrail);
char *askstring(char *prompt, char punc, char *retbuf, int retbuflen, char *def);
vault_t *askvault(char *prompttext);
void centre(WINDOW *win, enum COLOUR col, int y, char *format, ... );
int chartodir(char ch);
char checkforkey(void);
int cleanupgfx(void);
void clearmsg(void);
void real_clearmsg(int force);
void clearretobs(void);
void cls(void);
int contains(enum OBCLASS *array, int nargs, enum OBCLASS want);
void describegod(lifeform_t *god);
void describeob(object_t *o);
void describerace(enum RACE rid);
void describeskill(enum SKILL skid, enum SKILLLEVEL levhilite);
void describespell(objecttype_t *ot);
void doattackcell(char dirch);
void doclose(void);
void docomms(lifeform_t *target);
void docomms_areainfo(char *who, flagpile_t *fp, lifeform_t *lf);
void docomms_areadangers(char *who, flagpile_t *fp, lifeform_t *lf);
void dodrop(obpile_t *op, int wantmulti, obpile_t *dst);
void doeat(obpile_t *op);
void doenter(lifeform_t *lf);
void doexplain(char *question);
void dofinaloblist(obpile_t *op);
void dofire(void);
void dohelp(char helpmode);
void doinventory(obpile_t *op);
void doknowledgelist(void);
void dolook(cell_t *where, int onpurpose);
void domagic(enum OBTYPE spellid, int cellx, int celly);
void domemmagic(void);
void domsghist(void);
void dooffer(void);
void dooperate(obpile_t *op);
void dooptions(void);
int dopickup(obpile_t *op, int forceask);
void donextguntarget(void);
void dopour(obpile_t *op);
void doquit(void);
void doquaff(obpile_t *op);
void doread(obpile_t *op);
void dorest(void);
int doselguntarget(void);
void dostairs(int dir);
int dotakeoff(obpile_t *op);
void dothrow(obpile_t *op);
int dowear(obpile_t *op);
int doweild(obpile_t *op);
int downline(int *y, int h, char *heading, char *subheading, char *bottomstring, char *cmdchars, char *retchar);
void drawbar(WINDOW *win, char *title, int cur, int max, int realmax, int lossamt, enum COLOUR textcol, enum COLOUR textcolwithbg, int barbg, int lossbg);
void drawglyph(glyph_t *g, int x, int y);
//void drawunviscell(cell_t *cell, int x, int y);
//void drawcellwithcontents(cell_t *cell, int x, int y);
void drawcursor(void);
void drawlevelfor(lifeform_t *lf);
void drawmsg(void);
void drawscreen(void);
void drawstatus(void);
int drop(object_t *o, int count);
void dumpbuildingusage(void);
void dumpoc(void);
void dumpspells(void);
void dumpweps(void);
void forceredraw(void);
enum COLOUR getattrcolour(enum ATTRBRACKET brack);
char getchoice(prompt_t *prompt);
char getchoicestr(prompt_t *prompt, int useshortcuts, int showlallatstart);
int getkey(int escseqok);
enum COLOUR getskilllevelcolour(enum SKILLLEVEL slev);
void handle_ctrl_y(int arg);
void handleinput(void);
void doheading(WINDOW *win, int *y, int x, char *what);
void doheadingsmall(WINDOW *win, int y, int x, char *format, char *heading);
void initgfx(void);
void initprompt(prompt_t *p, char *q1);
int keycodetokey(int keycode, int escseqok);
void listobs(WINDOW *win, object_t **mylist, int *sellist, int *selcount, int firstob, int *counter, int lastline, int *y, char *myletters, int forpickup, int showpoints);
char *makedesc_god(lifeform_t *god, char *retbuf);
char *makedesc_ob(object_t *o, char *retbuf);
char *makedesc_race(enum RACE rid, char *retbuf, int showextra);
char *makedesc_skill(enum SKILL skid, char *retbuf, enum SKILLLEVEL levhilite);
char *makedesc_spell(objecttype_t *ot, char *retbuf);
void makespellchoicelist(prompt_t *pr, lifeform_t *lf, char *ques, char *ques2, enum SPELLSCHOOL wantschool, int wantunknown, int wantlowmp, int wanttoohard,int mpcutoff);
void more(void);
void warn(char *format, ... );
void msg(char *format, ... );
void msgnocap(char *format, ... );
void msg_real(char *format, ... );
int needsbold(enum COLOUR col);
void nothinghappens(void);
void dblog(char *format, ... );
void dblog_nocr(char *format, ... );
void redraw(void);
void redrawpause(void);
void redrawresume(void);
void restoregamewindows(void);
int screenglyphmatches(int x, int y, glyph_t *g);
void setcol(WINDOW *win, enum COLOUR col);
void unsetcol(WINDOW *win, enum COLOUR col);
void setobcolour(WINDOW *win, object_t *o, int set);
int showhiscoreline(void *hilitescore, int ncols, char **argv, char **colname);
void showlfarmour(lifeform_t *lf);
void showlfstats(lifeform_t *lf, int showall);
void textwithcol(WINDOW *win, char *buf);
void textwithcol_real(WINDOW *win, char *buf, int resetcolatend);
void tombstone(lifeform_t *lf);
void updatestatus(void);
int updateviewfor(cell_t *cell);
int warnabout(char *what);
void wrapprint(WINDOW *win, int *y, int *x, char *format, ... );