Mercurial > hg > early-roguelike
diff rogue4/rogue.h @ 304:e52a8a7ad4c5
Fix many compiler warnings.
There should only be two changes in behavior:
arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly
applied to characters who are not monks instead of monks who are not
empty-handed.
urogue/fight.c: fixed an interaction with the "debug" macro that could
cause the wrong message to be displayed.
author | John "Elwin" Edwards |
---|---|
date | Wed, 14 Apr 2021 18:55:33 -0400 |
parents | d3968e9cb98d |
children |
line wrap: on
line diff
--- a/rogue4/rogue.h Sat Mar 20 22:36:52 2021 -0400 +++ b/rogue4/rogue.h Wed Apr 14 18:55:33 2021 -0400 @@ -10,6 +10,10 @@ * See the file LICENSE.TXT for full copyright and licensing information. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + typedef struct { const char *st_name; const int st_value; @@ -50,7 +54,7 @@ /* * All the fun defines */ -#define shint char /* short integer (for very small #s) */ +#define shint signed char /* short integer (for very small #s) */ #define when break;case #define otherwise break;default #define until(expr) while(!(expr)) @@ -83,7 +87,7 @@ #define moat(y,x) (_monst[((x) << 5) + (y)]) #define unc(cp) (cp).y, (cp).x #ifdef WIZARD -#define debug if (wizard) msg +#define debug if (wizard) msg #endif /* @@ -532,6 +536,9 @@ void genocide(void); bool get_dir(void); THING *get_item(char *purpose, int type); +#ifdef WIZARD +int get_num(short *opt, WINDOW *win); +#endif int get_str(char *opt, WINDOW *win); void give_pack(THING *tp); bool hit_monster(int y, int x, THING *obj); @@ -542,7 +549,7 @@ void init_player(void); void init_stones(void); void init_things(void); -void init_weapon(THING *weap, char type); +void init_weapon(THING *weap, signed char type); char *inv_name(THING *obj, bool drop); bool inventory(THING *list, int type); void invis_on(void); @@ -633,9 +640,6 @@ void wield(void); void writelog(int amount, int flags, char monst); -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif #include "extern.h" #ifndef PATH_MAX