diff 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
line wrap: on
line diff
--- a/srogue/rogue.ext	Thu Apr 15 20:55:34 2021 -0400
+++ b/srogue/rogue.ext	Sat Apr 17 15:41:12 2021 -0400
@@ -62,14 +62,14 @@
 char   *charge_str(struct object *obj);
 void    check_level(void);
 void    chg_abil(int what, int amt, int how);
-void    chg_hpt(int howmany, bool alsomax, char what);
+void    chg_hpt(int howmany, bool alsomax, unsigned char what);
 void    command(void);
 bool    cordok(int y, int x);
 void    create_obj(bool fscr);
 void    cur_null(struct object *op);
 void    dbotline(WINDOW *scr, char *message);
 bool    dead_end(char ch);
-void    death(char monst);
+void    death(unsigned char monst);
 void    del_pack(struct linked_list *what);
 bool    diag_ok(struct coord *sp, struct coord *ep);
 void    dip_it(void);
@@ -208,7 +208,7 @@
 bool    save(int which);
 bool    save_game(void);
 bool    save_throw(int which, struct thing *tp);
-void    score(int amount, int aflag, char monst);
+void    score(int amount, int aflag, unsigned char monst);
 void    sell_it(void);
 void    setoflg(struct object *what, long bit);
 void    setup(void);
@@ -244,4 +244,4 @@
 void    whatis(struct linked_list *what);
 void    wield(void);
 char    winat(int y, int x);
-void    writelog(int amount, int aflag, char monst);
+void    writelog(int amount, int aflag, unsigned char monst);