Fix an assortment of compiler warnings.
A few potential bugs were removed in the process. Much code cleanup remains to be done.
This commit is contained in:
parent
de95b19cee
commit
7d459d7d36
47 changed files with 608 additions and 591 deletions
|
|
@ -218,7 +218,7 @@ new(int size)
|
|||
static char errbuf[LINELEN];
|
||||
|
||||
if (space == NULL) {
|
||||
sprintf(errbuf,"Rogue ran out of memory (used = %d, wanted = %d).",
|
||||
sprintf(errbuf,"Rogue ran out of memory (used = %ld, wanted = %d).",
|
||||
md_memused(), size);
|
||||
fatal(errbuf);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ struct cell {
|
|||
char x_pos;
|
||||
};
|
||||
struct bordercells {
|
||||
char num_pos; /* number of frontier cells next to you */
|
||||
unsigned char num_pos; /* number of frontier cells next to you */
|
||||
struct cell conn[4]; /* the y,x position of above cell */
|
||||
} border_cells;
|
||||
|
||||
|
|
|
|||
|
|
@ -327,9 +327,10 @@ picked_up:
|
|||
start_daemon(eat_gold, obj, AFTER);
|
||||
}
|
||||
/* For the axe start a fuse to change player to a fighter. */
|
||||
if (obj->o_which == AXE_AKLAD)
|
||||
if (obj->o_which == AXE_AKLAD) {
|
||||
newclass = C_FIGHTER;
|
||||
fuse(changeclass, &newclass, roll(20, 20), AFTER);
|
||||
}
|
||||
if (cur_weapon != NULL) {
|
||||
msg("The artifact insists you release your current weapon.");
|
||||
if (!dropcheck(cur_weapon)) {
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ writelog(unsigned long amount, int flags, short monst)
|
|||
else
|
||||
return;
|
||||
/* Write */
|
||||
fprintf(logfile, "%d %d %s %d %s %d %d %d %c %s\n", time(NULL), amount,
|
||||
fprintf(logfile, "%ld %ld %s %d %s %d %d %d %c %s\n", time(NULL), amount,
|
||||
whoami, pstats.s_lvl, char_class[char_type].name, level, max_level,
|
||||
quest_item, had_quest, fate);
|
||||
fclose(logfile);
|
||||
|
|
|
|||
144
arogue7/rogue.c
144
arogue7/rogue.c
|
|
@ -625,81 +625,81 @@ char *cnames[NUM_CHARTYPES-1][NUM_CNAMES] = {
|
|||
} ;
|
||||
|
||||
struct h_list helpstr[] = {
|
||||
'?', " prints help",
|
||||
'/', " identify object",
|
||||
'=', " identify screen character",
|
||||
'h', " left",
|
||||
'j', " down",
|
||||
'k', " up",
|
||||
'l', " right",
|
||||
'y', " up & left",
|
||||
'u', " up & right",
|
||||
'b', " down & left",
|
||||
'n', " down & right",
|
||||
'H', " run left",
|
||||
'J', " run down",
|
||||
'K', " run up",
|
||||
'L', " run right",
|
||||
'Y', " run up & left",
|
||||
'U', " run up & right",
|
||||
'B', " run down & left",
|
||||
'N', " run down & right",
|
||||
't', "<dir> throw something",
|
||||
'f', "<dir> forward until find something",
|
||||
'z', "<dir> zap a wand or staff",
|
||||
'>', " go down a staircase",
|
||||
'<', " go up a staircase",
|
||||
's', " search for trap/secret door",
|
||||
'.', " rest for a while",
|
||||
'i', " inventory",
|
||||
'I', " inventory single item",
|
||||
'q', " quaff potion",
|
||||
'r', " read paper",
|
||||
'e', " eat food",
|
||||
'w', " wield a weapon",
|
||||
'W', " wear something",
|
||||
'T', " take off something",
|
||||
'd', " drop object",
|
||||
'P', " pick up object(s)",
|
||||
CTRL('N'), " name object or monster",
|
||||
'm', " mark object (specific)",
|
||||
'o', " examine/set options",
|
||||
'c', " chant",
|
||||
'C', " cast a spell",
|
||||
'p', " pray",
|
||||
'a', " affect the undead",
|
||||
'^', " set a trap",
|
||||
'G', " sense gold",
|
||||
'D', " dip something (into a pool)",
|
||||
'*', " count up gold pieces",
|
||||
CTRL('T'), "<dir> take (steal) from (direction)",
|
||||
CTRL('U'), " use miscellaneous magic item",
|
||||
CTRL('L'), " redraw screen",
|
||||
CTRL('R'), " repeat last message",
|
||||
ESCAPE, " cancel command",
|
||||
'v', " print program version number",
|
||||
'!', " shell escape",
|
||||
'S', " save game",
|
||||
'Q', " quit",
|
||||
0, 0
|
||||
{ '?', " prints help" },
|
||||
{ '/', " identify object" },
|
||||
{ '=', " identify screen character" },
|
||||
{ 'h', " left" },
|
||||
{ 'j', " down" },
|
||||
{ 'k', " up" },
|
||||
{ 'l', " right" },
|
||||
{ 'y', " up & left" },
|
||||
{ 'u', " up & right" },
|
||||
{ 'b', " down & left" },
|
||||
{ 'n', " down & right" },
|
||||
{ 'H', " run left" },
|
||||
{ 'J', " run down" },
|
||||
{ 'K', " run up" },
|
||||
{ 'L', " run right" },
|
||||
{ 'Y', " run up & left" },
|
||||
{ 'U', " run up & right" },
|
||||
{ 'B', " run down & left" },
|
||||
{ 'N', " run down & right" },
|
||||
{ 't', "<dir> throw something" },
|
||||
{ 'f', "<dir> forward until find something" },
|
||||
{ 'z', "<dir> zap a wand or staff" },
|
||||
{ '>', " go down a staircase" },
|
||||
{ '<', " go up a staircase" },
|
||||
{ 's', " search for trap/secret door" },
|
||||
{ '.', " rest for a while" },
|
||||
{ 'i', " inventory" },
|
||||
{ 'I', " inventory single item" },
|
||||
{ 'q', " quaff potion" },
|
||||
{ 'r', " read paper" },
|
||||
{ 'e', " eat food" },
|
||||
{ 'w', " wield a weapon" },
|
||||
{ 'W', " wear something" },
|
||||
{ 'T', " take off something" },
|
||||
{ 'd', " drop object" },
|
||||
{ 'P', " pick up object(s)" },
|
||||
{ CTRL('N'), " name object or monster" },
|
||||
{ 'm', " mark object (specific)" },
|
||||
{ 'o', " examine/set options" },
|
||||
{ 'c', " chant" },
|
||||
{ 'C', " cast a spell" },
|
||||
{ 'p', " pray" },
|
||||
{ 'a', " affect the undead" },
|
||||
{ '^', " set a trap" },
|
||||
{ 'G', " sense gold" },
|
||||
{ 'D', " dip something (into a pool)" },
|
||||
{ '*', " count up gold pieces" },
|
||||
{ CTRL('T'), "<dir> take (steal) from (direction)" },
|
||||
{ CTRL('U'), " use miscellaneous magic item" },
|
||||
{ CTRL('L'), " redraw screen" },
|
||||
{ CTRL('R'), " repeat last message" },
|
||||
{ ESCAPE, " cancel command" },
|
||||
{ 'v', " print program version number" },
|
||||
{ '!', " shell escape" },
|
||||
{ 'S', " save game" },
|
||||
{ 'Q', " quit" },
|
||||
{ 0, 0 }
|
||||
} ;
|
||||
|
||||
struct h_list wiz_help[] = {
|
||||
CTRL('A'), " system activity",
|
||||
CTRL('C'), " move to another dungeon level",
|
||||
CTRL('D'), " down 1 dungeon level",
|
||||
CTRL('E'), " food remaining",
|
||||
CTRL('F'), " display entire level",
|
||||
CTRL('H'), " jump 9 experience levels",
|
||||
CTRL('I'), " inventory of level",
|
||||
CTRL('J'), " teleport",
|
||||
CTRL('M'), " recharge staff",
|
||||
CTRL('P'), " toggle wizard status",
|
||||
CTRL('U'), " up 1 dungeon level",
|
||||
CTRL('X'), " detect monsters",
|
||||
CTRL('Z'), " identify",
|
||||
'M', " make object",
|
||||
0, 0
|
||||
{ CTRL('A'), " system activity" },
|
||||
{ CTRL('C'), " move to another dungeon level" },
|
||||
{ CTRL('D'), " down 1 dungeon level" },
|
||||
{ CTRL('E'), " food remaining" },
|
||||
{ CTRL('F'), " display entire level" },
|
||||
{ CTRL('H'), " jump 9 experience levels" },
|
||||
{ CTRL('I'), " inventory of level" },
|
||||
{ CTRL('J'), " teleport" },
|
||||
{ CTRL('M'), " recharge staff" },
|
||||
{ CTRL('P'), " toggle wizard status" },
|
||||
{ CTRL('U'), " up 1 dungeon level" },
|
||||
{ CTRL('X'), " detect monsters" },
|
||||
{ CTRL('Z'), " identify" },
|
||||
{ 'M', " make object" },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue