158 lines
7.3 KiB
C
158 lines
7.3 KiB
C
#include <ncurses.h>
|
|
#include "defs.h"
|
|
choice_t *addchoice(prompt_t *p, char ch, char *text, char *desc, void *data, char *longdesc);
|
|
void killchoice(prompt_t *p, int idx);
|
|
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 animflashcells(cell_t **cell, int ncells, int ch,int colour, char *seetext);
|
|
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);
|
|
void announcetime(int h, int m, int s, int showfull);
|
|
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, int forpray);
|
|
object_t *askobject(obpile_t *op, char *title, char *noobtext, int *count, char action, condset_t *cs, int includenothing);
|
|
object_t *doaskobject(obpile_t *op, char *prompt, char *noobtext, int *count, int showlong, int forpickup, int showpoints, char action, object_t *sellshop, enum SHOPACTION sellaction, condset_t *cs, int includenothing);
|
|
int askobjectmulti(obpile_t *op, char *prompt, condset_t *cs, int includenothing);
|
|
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);
|
|
cell_t *real_askcoords(char *prompt, char *subprompt, int targettype, lifeform_t *srclf, int minrange, int maxrange, enum LOFTYPE loftype, int wanttrail, cell_t **spectarg, int nspectargs);
|
|
char askdir(char *prompt, int maycancel, int usedrunk);
|
|
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, ... );
|
|
enum COMMAND chartocmd(char ch);
|
|
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 describejob(enum JOB jid);
|
|
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(int dir);
|
|
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);
|
|
int dothrow(obpile_t *op, object_t *o);
|
|
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 dumpcols(void);
|
|
void dumpskills(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);
|
|
int haschoice(prompt_t *p, char ch);
|
|
choice_t *haschoicedata(prompt_t *p, void *data);
|
|
void doheading(WINDOW *win, int *y, int x, char *what);
|
|
void doheadingsmall(WINDOW *win, int y, int x, char *format, char *heading);
|
|
void initcol(short c, short r, short g, short b);
|
|
void initcolpair(int pairidx, enum COLOUR fg, enum COLOUR bg );
|
|
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, object_t *sellshop, enum SHOPACTION sellaction);
|
|
char *makedesc_god(lifeform_t *god, char *retbuf);
|
|
char *makedesc_job(job_t *j, char *retbuf);
|
|
char *makedesc_ob(object_t *o, char *retbuf);
|
|
char *makedesc_race(enum RACE rid, char *retbuf, int showextra, int forplayersel);
|
|
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 select_new_spell(enum SPELLSCHOOL ss);
|
|
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 showpath(lifeform_t *lf);
|
|
void startpathfind(void);
|
|
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);
|
|
int real_warnabout(char *what, int lifetime, int doquestion);
|
|
void wingame(void);
|
|
char wrapprint(WINDOW *win, int *y, int *x, int newlineindent, char *format, ... );
|