Mercurial > hg > early-roguelike
comparison srogue/rogue.ext @ 306:057c5114e244
Super-Rogue: fix some out-of-range constants.
Constants K_ARROW etc., for causes of death other than monsters, are in
the 240-255 range. They were often passed to functions taking char,
which is usually signed, making the values out of range.
The function declarations have been changed to unsigned char, which is
also the type used by the scoreboard code.
author | John "Elwin" Edwards |
---|---|
date | Sat, 17 Apr 2021 15:41:12 -0400 |
parents | d3968e9cb98d |
children | 28e22fb35989 |
comparison
equal
deleted
inserted
replaced
305:3900f3cfe07d | 306:057c5114e244 |
---|---|
60 void byebye(int how); | 60 void byebye(int how); |
61 bool cansee(int y, int x); | 61 bool cansee(int y, int x); |
62 char *charge_str(struct object *obj); | 62 char *charge_str(struct object *obj); |
63 void check_level(void); | 63 void check_level(void); |
64 void chg_abil(int what, int amt, int how); | 64 void chg_abil(int what, int amt, int how); |
65 void chg_hpt(int howmany, bool alsomax, char what); | 65 void chg_hpt(int howmany, bool alsomax, unsigned char what); |
66 void command(void); | 66 void command(void); |
67 bool cordok(int y, int x); | 67 bool cordok(int y, int x); |
68 void create_obj(bool fscr); | 68 void create_obj(bool fscr); |
69 void cur_null(struct object *op); | 69 void cur_null(struct object *op); |
70 void dbotline(WINDOW *scr, char *message); | 70 void dbotline(WINDOW *scr, char *message); |
71 bool dead_end(char ch); | 71 bool dead_end(char ch); |
72 void death(char monst); | 72 void death(unsigned char monst); |
73 void del_pack(struct linked_list *what); | 73 void del_pack(struct linked_list *what); |
74 bool diag_ok(struct coord *sp, struct coord *ep); | 74 bool diag_ok(struct coord *sp, struct coord *ep); |
75 void dip_it(void); | 75 void dip_it(void); |
76 void discard(struct linked_list *item); | 76 void discard(struct linked_list *item); |
77 void displevl(void); | 77 void displevl(void); |
206 void runto(struct coord *runner, struct coord *spot); | 206 void runto(struct coord *runner, struct coord *spot); |
207 void sapem(int fromfuse); | 207 void sapem(int fromfuse); |
208 bool save(int which); | 208 bool save(int which); |
209 bool save_game(void); | 209 bool save_game(void); |
210 bool save_throw(int which, struct thing *tp); | 210 bool save_throw(int which, struct thing *tp); |
211 void score(int amount, int aflag, char monst); | 211 void score(int amount, int aflag, unsigned char monst); |
212 void sell_it(void); | 212 void sell_it(void); |
213 void setoflg(struct object *what, long bit); | 213 void setoflg(struct object *what, long bit); |
214 void setup(void); | 214 void setup(void); |
215 char show(int y, int x); | 215 char show(int y, int x); |
216 bool showtop(int showname); | 216 bool showtop(int showname); |
242 void wear(void); | 242 void wear(void); |
243 void wghtchk(int fromfuse); | 243 void wghtchk(int fromfuse); |
244 void whatis(struct linked_list *what); | 244 void whatis(struct linked_list *what); |
245 void wield(void); | 245 void wield(void); |
246 char winat(int y, int x); | 246 char winat(int y, int x); |
247 void writelog(int amount, int aflag, char monst); | 247 void writelog(int amount, int aflag, unsigned char monst); |