Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
303:e06ebc407615 | 304:e52a8a7ad4c5 |
---|---|
7 * Copyright (C) 1980, 1981, 1982 Michael Toy, Ken Arnold and Glenn Wichman | 7 * Copyright (C) 1980, 1981, 1982 Michael Toy, Ken Arnold and Glenn Wichman |
8 * All rights reserved. | 8 * All rights reserved. |
9 * | 9 * |
10 * See the file LICENSE.TXT for full copyright and licensing information. | 10 * See the file LICENSE.TXT for full copyright and licensing information. |
11 */ | 11 */ |
12 | |
13 #ifdef HAVE_CONFIG_H | |
14 #include "config.h" | |
15 #endif | |
12 | 16 |
13 typedef struct { | 17 typedef struct { |
14 const char *st_name; | 18 const char *st_name; |
15 const int st_value; | 19 const int st_value; |
16 } STONE; | 20 } STONE; |
48 #define MINUS 2 /* back up one option */ | 52 #define MINUS 2 /* back up one option */ |
49 | 53 |
50 /* | 54 /* |
51 * All the fun defines | 55 * All the fun defines |
52 */ | 56 */ |
53 #define shint char /* short integer (for very small #s) */ | 57 #define shint signed char /* short integer (for very small #s) */ |
54 #define when break;case | 58 #define when break;case |
55 #define otherwise break;default | 59 #define otherwise break;default |
56 #define until(expr) while(!(expr)) | 60 #define until(expr) while(!(expr)) |
57 #define next(ptr) (*ptr).l_next | 61 #define next(ptr) (*ptr).l_next |
58 #define prev(ptr) (*ptr).l_prev | 62 #define prev(ptr) (*ptr).l_prev |
81 #define chat(y,x) (_level[((x) << 5) + (y)]) | 85 #define chat(y,x) (_level[((x) << 5) + (y)]) |
82 #define flat(y,x) (_flags[((x) << 5) + (y)]) | 86 #define flat(y,x) (_flags[((x) << 5) + (y)]) |
83 #define moat(y,x) (_monst[((x) << 5) + (y)]) | 87 #define moat(y,x) (_monst[((x) << 5) + (y)]) |
84 #define unc(cp) (cp).y, (cp).x | 88 #define unc(cp) (cp).y, (cp).x |
85 #ifdef WIZARD | 89 #ifdef WIZARD |
86 #define debug if (wizard) msg | 90 #define debug if (wizard) msg |
87 #endif | 91 #endif |
88 | 92 |
89 /* | 93 /* |
90 * Things that appear on the screens | 94 * Things that appear on the screens |
91 */ | 95 */ |
530 void flush_type(void); | 534 void flush_type(void); |
531 void fuse(void (*func)(), int arg, int time, int type); | 535 void fuse(void (*func)(), int arg, int time, int type); |
532 void genocide(void); | 536 void genocide(void); |
533 bool get_dir(void); | 537 bool get_dir(void); |
534 THING *get_item(char *purpose, int type); | 538 THING *get_item(char *purpose, int type); |
539 #ifdef WIZARD | |
540 int get_num(short *opt, WINDOW *win); | |
541 #endif | |
535 int get_str(char *opt, WINDOW *win); | 542 int get_str(char *opt, WINDOW *win); |
536 void give_pack(THING *tp); | 543 void give_pack(THING *tp); |
537 bool hit_monster(int y, int x, THING *obj); | 544 bool hit_monster(int y, int x, THING *obj); |
538 void init_check(void); | 545 void init_check(void); |
539 void init_colors(void); | 546 void init_colors(void); |
540 void init_materials(void); | 547 void init_materials(void); |
541 void init_names(void); | 548 void init_names(void); |
542 void init_player(void); | 549 void init_player(void); |
543 void init_stones(void); | 550 void init_stones(void); |
544 void init_things(void); | 551 void init_things(void); |
545 void init_weapon(THING *weap, char type); | 552 void init_weapon(THING *weap, signed char type); |
546 char *inv_name(THING *obj, bool drop); | 553 char *inv_name(THING *obj, bool drop); |
547 bool inventory(THING *list, int type); | 554 bool inventory(THING *list, int type); |
548 void invis_on(void); | 555 void invis_on(void); |
549 bool is_current(THING *obj); | 556 bool is_current(THING *obj); |
550 bool is_magic(THING *obj); | 557 bool is_magic(THING *obj); |
631 void wear(void); | 638 void wear(void); |
632 void whatis(bool insist); | 639 void whatis(bool insist); |
633 void wield(void); | 640 void wield(void); |
634 void writelog(int amount, int flags, char monst); | 641 void writelog(int amount, int flags, char monst); |
635 | 642 |
636 #ifdef HAVE_CONFIG_H | |
637 #include "config.h" | |
638 #endif | |
639 #include "extern.h" | 643 #include "extern.h" |
640 | 644 |
641 #ifndef PATH_MAX | 645 #ifndef PATH_MAX |
642 #define PATH_MAX _MAX_PATH | 646 #define PATH_MAX _MAX_PATH |
643 #endif | 647 #endif |