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
|
|
@ -238,7 +238,7 @@ do_fuses(int flag)
|
|||
void
|
||||
activity(void)
|
||||
{
|
||||
sprintf(outstring,"Daemons = %d : Fuses = %d : Memory Items = %d : Memory Used = %d",
|
||||
sprintf(outstring,"Daemons = %d : Fuses = %d : Memory Items = %d : Memory Used = %ld",
|
||||
demoncnt,fusecnt,total,md_memused());
|
||||
msg(outstring);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ struct cell {
|
|||
};
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -607,7 +607,7 @@ void writelog(unsigned long amount, int flags, short monst) {
|
|||
else
|
||||
return;
|
||||
|
||||
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, class, level, max_level, quest_item, had_quest,
|
||||
fate);
|
||||
fclose(logfile);
|
||||
|
|
|
|||
138
arogue5/rogue.c
138
arogue5/rogue.c
|
|
@ -420,78 +420,78 @@ char *cnames[4][11] = {
|
|||
} ;
|
||||
|
||||
struct h_list helpstr[] = {
|
||||
'?', " prints help",
|
||||
'/', " identify object",
|
||||
'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)",
|
||||
'c', " call object (generic)",
|
||||
'm', " mark object (specific)",
|
||||
'o', " examine/set options",
|
||||
'C', " cast a spell",
|
||||
'p', " pray",
|
||||
'a', " affect the undead",
|
||||
'^', " set a trap",
|
||||
'G', " sense gold",
|
||||
'D', " dip something (into a pool)",
|
||||
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" },
|
||||
{ '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)" },
|
||||
{ 'c', " call object (generic)" },
|
||||
{ 'm', " mark object (specific)" },
|
||||
{ 'o', " examine/set options" },
|
||||
{ 'C', " cast a spell" },
|
||||
{ 'p', " pray" },
|
||||
{ 'a', " affect the undead" },
|
||||
{ '^', " set a trap" },
|
||||
{ 'G', " sense gold" },
|
||||
{ 'D', " dip something (into a pool)" },
|
||||
{ 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('N'), " 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('N'), " 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 }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -548,50 +548,50 @@ badcheck(char *name, struct magic_item *magic, int bound)
|
|||
}
|
||||
|
||||
struct h_list helpstr[] = {
|
||||
'?', " prints help",
|
||||
'/', " identify object",
|
||||
'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",
|
||||
'p', "<dir> zap a wand in a direction",
|
||||
'z', " zap a wand or staff",
|
||||
'>', " go down a staircase",
|
||||
's', " search for trap/secret door",
|
||||
'.', " rest for a turn",
|
||||
'i', " inventory",
|
||||
'I', " inventory single item",
|
||||
'q', " quaff potion",
|
||||
'r', " read paper",
|
||||
'e', " eat food",
|
||||
'w', " wield a weapon",
|
||||
'W', " wear armor",
|
||||
'T', " take armor off",
|
||||
'P', " put on ring",
|
||||
'R', " remove ring",
|
||||
'd', " drop object",
|
||||
'c', " call object",
|
||||
'o', " examine/set options",
|
||||
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" },
|
||||
{ '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" },
|
||||
{ 'p', "<dir> zap a wand in a direction" },
|
||||
{ 'z', " zap a wand or staff" },
|
||||
{ '>', " go down a staircase" },
|
||||
{ 's', " search for trap/secret door" },
|
||||
{ '.', " rest for a turn" },
|
||||
{ 'i', " inventory" },
|
||||
{ 'I', " inventory single item" },
|
||||
{ 'q', " quaff potion" },
|
||||
{ 'r', " read paper" },
|
||||
{ 'e', " eat food" },
|
||||
{ 'w', " wield a weapon" },
|
||||
{ 'W', " wear armor" },
|
||||
{ 'T', " take armor off" },
|
||||
{ 'P', " put on ring" },
|
||||
{ 'R', " remove ring" },
|
||||
{ 'd', " drop object" },
|
||||
{ 'c', " call object" },
|
||||
{ 'o', " examine/set options" },
|
||||
{ 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 }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ _new(size_t size)
|
|||
|
||||
if (space == NULL)
|
||||
{
|
||||
sprintf(prbuf, "Rogue ran out of memory (%d). Fatal error!", md_memused());
|
||||
sprintf(prbuf, "Rogue ran out of memory (%ld). Fatal error!", md_memused());
|
||||
fatal(prbuf);
|
||||
}
|
||||
total++;
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ void writelog(int amount, int flags, int monst)
|
|||
if (waswizard)
|
||||
return;
|
||||
#ifdef LOGFILE
|
||||
sprintf(logmessage, "%d %d %s %d ", time(NULL), amount, whoami,
|
||||
sprintf(logmessage, "%ld %d %s %d ", time(NULL), amount, whoami,
|
||||
pstats.s_lvl);
|
||||
if (flags == 0) /* died */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ inv_name(struct object *obj, int drop)
|
|||
when FOOD:
|
||||
if (obj->o_which == 1)
|
||||
if (obj->o_count == 1)
|
||||
sprintf(prbuf, "A%s %s", vowelstr(fruit), fruit);
|
||||
sprintf(prbuf, "A%s %.76s", vowelstr(fruit), fruit);
|
||||
else
|
||||
sprintf(prbuf, "%d %ss", obj->o_count, fruit);
|
||||
sprintf(prbuf, "%d %.66ss", obj->o_count, fruit);
|
||||
else
|
||||
if (obj->o_count == 1)
|
||||
strcpy(prbuf, "Some food");
|
||||
|
|
|
|||
|
|
@ -38,18 +38,18 @@ static struct init_weps {
|
|||
int iw_launch;
|
||||
int iw_flags;
|
||||
} init_dam[MAXWEAPONS] = {
|
||||
"2d4", "1d3", NONE, 0, /* Mace */
|
||||
"1d10", "1d2", NONE,0, /* Long sword */
|
||||
"1d1", "1d1", NONE, 0, /* Bow */
|
||||
"1d1", "1d6", BOW, ISMANY|ISMISL, /* Arrow */
|
||||
"1d6", "1d4", NONE, ISMISL, /* Dagger */
|
||||
"1d2", "1d4", SLING,ISMANY|ISMISL, /* Rock */
|
||||
"3d6", "1d2", NONE, 0, /* 2h sword */
|
||||
"0d0", "0d0", NONE, 0, /* Sling */
|
||||
"1d1", "1d3", NONE, ISMANY|ISMISL, /* Dart */
|
||||
"1d1", "1d1", NONE, 0, /* Crossbow */
|
||||
"1d2", "1d10", CROSSBOW, ISMANY|ISMISL,/* Crossbow bolt */
|
||||
"1d8", "1d6", NONE, ISMISL, /* Spear */
|
||||
{ "2d4", "1d3", NONE, 0 }, /* Mace */
|
||||
{ "1d10", "1d2", NONE,0 }, /* Long sword */
|
||||
{ "1d1", "1d1", NONE, 0 }, /* Bow */
|
||||
{ "1d1", "1d6", BOW, ISMANY|ISMISL }, /* Arrow */
|
||||
{ "1d6", "1d4", NONE, ISMISL }, /* Dagger */
|
||||
{ "1d2", "1d4", SLING,ISMANY|ISMISL }, /* Rock */
|
||||
{ "3d6", "1d2", NONE, 0 }, /* 2h sword */
|
||||
{ "0d0", "0d0", NONE, 0 }, /* Sling */
|
||||
{ "1d1", "1d3", NONE, ISMANY|ISMISL }, /* Dart */
|
||||
{ "1d1", "1d1", NONE, 0 }, /* Crossbow */
|
||||
{ "1d2", "1d10", CROSSBOW, ISMANY|ISMISL }, /* Crossbow bolt */
|
||||
{ "1d8", "1d6", NONE, ISMISL } /* Spear */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
122
rogue4/extern.c
122
rogue4/extern.c
|
|
@ -145,21 +145,25 @@ struct stats max_stats = INIT_STATS; /* The maximum for the player */
|
|||
|
||||
struct room *oldrp; /* Roomin(&oldpos) */
|
||||
struct room rooms[MAXROOMS]; /* One for each room -- A level */
|
||||
#define NON {0, 0}
|
||||
#define NON12 { NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, NON, NON }
|
||||
struct room passages[MAXPASS] = /* One for each passage */
|
||||
{
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, 0 }
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 },
|
||||
{ {0, 0}, {0, 0}, {0, 0}, 0, ISGONE|ISDARK, 0, NON12 }
|
||||
};
|
||||
#undef NON12
|
||||
#undef NON
|
||||
|
||||
#define ___ 1
|
||||
#define XX 10
|
||||
|
|
@ -276,51 +280,51 @@ struct magic_item ws_magic[MAXSTICKS] = {
|
|||
};
|
||||
|
||||
struct h_list helpstr[] = {
|
||||
'?', " prints help",
|
||||
'/', " identify object",
|
||||
'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 in a direction",
|
||||
'^', "<dir> identify trap type",
|
||||
's', " search for trap/secret door",
|
||||
'>', " go down a staircase",
|
||||
'<', " go up a staircase",
|
||||
'.', " 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 armor",
|
||||
'T', " take armor off",
|
||||
'P', " put on ring",
|
||||
'R', " remove ring",
|
||||
'd', " drop object",
|
||||
'c', " call object",
|
||||
'D', " recall what's been discovered",
|
||||
'o', " examine/set options",
|
||||
CTRL('L'), " redraw screen",
|
||||
CTRL('R'), " repeat last message",
|
||||
ESCAPE, " cancel command",
|
||||
'!', " shell escape",
|
||||
'S', " save game",
|
||||
'Q', " quit",
|
||||
0, 0
|
||||
{ '?', " prints help" },
|
||||
{ '/', " identify object" },
|
||||
{ '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 in a direction" },
|
||||
{ '^', "<dir> identify trap type" },
|
||||
{ 's', " search for trap/secret door" },
|
||||
{ '>', " go down a staircase" },
|
||||
{ '<', " go up a staircase" },
|
||||
{ '.', " 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 armor" },
|
||||
{ 'T', " take armor off" },
|
||||
{ 'P', " put on ring" },
|
||||
{ 'R', " remove ring" },
|
||||
{ 'd', " drop object" },
|
||||
{ 'c', " call object" },
|
||||
{ 'D', " recall what's been discovered" },
|
||||
{ 'o', " examine/set options" },
|
||||
{ CTRL('L'), " redraw screen" },
|
||||
{ CTRL('R'), " repeat last message" },
|
||||
{ ESCAPE, " cancel command" },
|
||||
{ '!', " shell escape" },
|
||||
{ 'S', " save game" },
|
||||
{ 'Q', " quit" },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ eat(void)
|
|||
else
|
||||
msg("yum, that tasted good");
|
||||
|
||||
if (--obj->o_count < 1)
|
||||
if (--obj->o_count < 1)
|
||||
{
|
||||
detach(pack, obj);
|
||||
discard(obj);
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ void
|
|||
conn(int r1, int r2)
|
||||
{
|
||||
register struct room *rpf, *rpt = NULL;
|
||||
register char rmt;
|
||||
unsigned char rmt;
|
||||
register int distance = 0, turn_spot = 0, turn_distance = 0, index;
|
||||
register int rm;
|
||||
register char direc;
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ void writelog(int amount, int flags, char monst)
|
|||
if (log_file == NULL)
|
||||
return;
|
||||
/* otherwise writing should work */
|
||||
sprintf(logmessage, "%d %d %s %d ", time(NULL), amount, whoami,
|
||||
sprintf(logmessage, "%ld %d %s %d ", time(NULL), amount, whoami,
|
||||
pstats.s_lvl);
|
||||
if (flags == 0) /* died */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ inv_name(THING *obj, bool drop)
|
|||
when FOOD:
|
||||
if (obj->o_which == 1)
|
||||
if (obj->o_count == 1)
|
||||
sprintf(pb, "A%s %s", vowelstr(fruit), fruit);
|
||||
sprintf(pb, "A%s %.76s", vowelstr(fruit), fruit);
|
||||
else
|
||||
sprintf(pb, "%d %ss", obj->o_count, fruit);
|
||||
sprintf(pb, "%d %.66ss", obj->o_count, fruit);
|
||||
else
|
||||
if (obj->o_count == 1)
|
||||
strcpy(pb, "Some food");
|
||||
|
|
|
|||
|
|
@ -23,16 +23,16 @@ static struct init_weps {
|
|||
char iw_launch; /* Launching weapon */
|
||||
int iw_flags; /* Miscellaneous flags */
|
||||
} init_dam[MAXWEAPONS] = {
|
||||
"2d4", "1d3", NONE, 0, /* Mace */
|
||||
"3d4", "1d2", NONE, 0, /* Long sword */
|
||||
"1d1", "1d1", NONE, 0, /* Bow */
|
||||
"1d1", "2d3", BOW, ISMANY|ISMISL, /* Arrow */
|
||||
"1d6", "1d4", NONE, ISMISL, /* Dagger */
|
||||
"4d4", "1d2", NONE, 0, /* 2h sword */
|
||||
"1d1", "1d3", NONE, ISMANY|ISMISL, /* Dart */
|
||||
"1d1", "1d1", NONE, 0, /* Crossbow */
|
||||
"1d2", "2d5", CROSSBOW, ISMANY|ISMISL, /* Crossbow bolt */
|
||||
"2d3", "1d6", NONE, ISMISL, /* Spear */
|
||||
{ "2d4", "1d3", NONE, 0 }, /* Mace */
|
||||
{ "3d4", "1d2", NONE, 0 }, /* Long sword */
|
||||
{ "1d1", "1d1", NONE, 0 }, /* Bow */
|
||||
{ "1d1", "2d3", BOW, ISMANY|ISMISL },/* Arrow */
|
||||
{ "1d6", "1d4", NONE, ISMISL }, /* Dagger */
|
||||
{ "4d4", "1d2", NONE, 0 }, /* 2h sword */
|
||||
{ "1d1", "1d3", NONE, ISMANY|ISMISL },/* Dart */
|
||||
{ "1d1", "1d1", NONE, 0 }, /* Crossbow */
|
||||
{ "1d2", "2d5", CROSSBOW, ISMANY|ISMISL },/* Crossbow bolt */
|
||||
{ "2d3", "1d6", NONE, ISMISL } /* Spear */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ void writelog(int amount, int flags, int monst)
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
sprintf(logmessage, "%d %d %.80s %d ", time(NULL), amount, whoami,
|
||||
sprintf(logmessage, "%ld %d %.80s %d ", time(NULL), amount, whoami,
|
||||
pstats.s_lvl);
|
||||
if (flags == 0) /* dead */
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ restore(const char *file)
|
|||
if (strcmp(file, "-r") == 0)
|
||||
file = file_name;
|
||||
|
||||
md_tstphold();
|
||||
md_tstphold();
|
||||
|
||||
if ((inf = fopen(file,"r")) == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -179,52 +179,52 @@ struct monster monsters[MAXMONS + 1] = {
|
|||
#undef _r
|
||||
|
||||
struct h_list helpstr[] = {
|
||||
'?', " prints help",
|
||||
'/', " identify object",
|
||||
'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",
|
||||
'p', "<dir> zap a wand in a direction",
|
||||
'z', " zap a wand or staff",
|
||||
'>', " go down a staircase",
|
||||
's', " search for trap/secret door",
|
||||
'.', " (dot) rest for a while",
|
||||
'i', " inventory pack",
|
||||
'I', " inventory single item",
|
||||
'q', " quaff potion",
|
||||
'r', " read a scroll",
|
||||
'e', " eat food",
|
||||
'w', " wield a weapon",
|
||||
'W', " wear armor",
|
||||
'T', " take armor off",
|
||||
'P', " put on ring",
|
||||
'R', " remove ring",
|
||||
'd', " drop object",
|
||||
'c', " call object",
|
||||
'O', " examine/set options",
|
||||
'a', " display maximum stats",
|
||||
'D', " dip object in pool",
|
||||
CTRL('L')," redraw screen",
|
||||
ESCAPE, " cancel command",
|
||||
'!', " shell escape",
|
||||
'S', " save game",
|
||||
'Q', " quit",
|
||||
0, 0
|
||||
{ '?', " prints help" },
|
||||
{ '/', " identify object" },
|
||||
{ '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" },
|
||||
{ 'p', "<dir> zap a wand in a direction" },
|
||||
{ 'z', " zap a wand or staff" },
|
||||
{ '>', " go down a staircase" },
|
||||
{ 's', " search for trap/secret door" },
|
||||
{ '.', " (dot) rest for a while" },
|
||||
{ 'i', " inventory pack" },
|
||||
{ 'I', " inventory single item" },
|
||||
{ 'q', " quaff potion" },
|
||||
{ 'r', " read a scroll" },
|
||||
{ 'e', " eat food" },
|
||||
{ 'w', " wield a weapon" },
|
||||
{ 'W', " wear armor" },
|
||||
{ 'T', " take armor off" },
|
||||
{ 'P', " put on ring" },
|
||||
{ 'R', " remove ring" },
|
||||
{ 'd', " drop object" },
|
||||
{ 'c', " call object" },
|
||||
{ 'O', " examine/set options" },
|
||||
{ 'a', " display maximum stats" },
|
||||
{ 'D', " dip object in pool" },
|
||||
{ CTRL('L')," redraw screen" },
|
||||
{ ESCAPE, " cancel command" },
|
||||
{ '!', " shell escape" },
|
||||
{ 'S', " save game" },
|
||||
{ 'Q', " quit" },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
char *s_names[MAXSCROLLS]; /* Names of the scrolls */
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ new(int size)
|
|||
register char *space = ALLOC(size);
|
||||
|
||||
if (space == NULL) {
|
||||
sprintf(prbuf,"Rogue ran out of memory (%d).", md_memused());
|
||||
sprintf(prbuf,"Rogue ran out of memory (%ld).", md_memused());
|
||||
fatal(prbuf);
|
||||
}
|
||||
total++;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ main(int argc, char *argv[], char *envp[])
|
|||
register char *env;
|
||||
register struct linked_list *item;
|
||||
register struct object *obj;
|
||||
char alldone, wpt;
|
||||
char alldone;
|
||||
int wpt;
|
||||
char *getpass(), *xcrypt(), *strrchr();
|
||||
char *homedir = roguehome();
|
||||
|
||||
|
|
|
|||
35
srogue/rip.c
35
srogue/rip.c
|
|
@ -63,7 +63,8 @@ void showpack(bool winner, char *howso);
|
|||
void
|
||||
death(char monst)
|
||||
{
|
||||
reg char dp, *killer;
|
||||
reg char *killer;
|
||||
int dp;
|
||||
struct tm *lt;
|
||||
time_t date;
|
||||
char buf[LINLEN];
|
||||
|
|
@ -180,21 +181,21 @@ score(int amount, int aflag, char monst)
|
|||
for (scp = top_ten; scp <= &top_ten[9]; scp++)
|
||||
if (amount > scp->sc_score)
|
||||
break;
|
||||
if (scp <= &top_ten[9]) {
|
||||
for (sc2 = &top_ten[9]; sc2 > scp; sc2--)
|
||||
*sc2 = *(sc2-1);
|
||||
scp->sc_score = amount;
|
||||
strcpy(scp->sc_name, whoami);
|
||||
scp->sc_flags = aflag;
|
||||
if (aflag == WINNER)
|
||||
scp->sc_level = max_level;
|
||||
else
|
||||
scp->sc_level = level;
|
||||
scp->sc_monster = monst;
|
||||
scp->sc_uid = playuid;
|
||||
scp->sc_explvl = him->s_lvl;
|
||||
scp->sc_exppts = him->s_exp;
|
||||
time(&scp->sc_date);
|
||||
if (scp <= &top_ten[9]) {
|
||||
for (sc2 = &top_ten[9]; sc2 > scp; sc2--)
|
||||
*sc2 = *(sc2-1);
|
||||
scp->sc_score = amount;
|
||||
strcpy(scp->sc_name, whoami);
|
||||
scp->sc_flags = aflag;
|
||||
if (aflag == WINNER)
|
||||
scp->sc_level = max_level;
|
||||
else
|
||||
scp->sc_level = level;
|
||||
scp->sc_monster = monst;
|
||||
scp->sc_uid = playuid;
|
||||
scp->sc_explvl = him->s_lvl;
|
||||
scp->sc_exppts = him->s_exp;
|
||||
time(&scp->sc_date);
|
||||
}
|
||||
}
|
||||
ignore();
|
||||
|
|
@ -228,7 +229,7 @@ void writelog(int amount, int aflag, char monst)
|
|||
#ifdef LOGFILE
|
||||
if (logfile == NULL)
|
||||
return;
|
||||
sprintf(logmessage, "%d %d %s %d ", time(NULL), amount, whoami,
|
||||
sprintf(logmessage, "%ld %d %s %d ", time(NULL), amount, whoami,
|
||||
him->s_lvl);
|
||||
if (amulet)
|
||||
sprintf(mlev, " [max %d] with the Amulet", max_level);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ inv_name(struct object *obj, bool drop)
|
|||
if (wh == 1) {
|
||||
if (obj->o_count == 1)
|
||||
q = vowelstr(fruit);
|
||||
sprintf(prbuf, "%s%s %s%s", nm, q, fruit, pl);
|
||||
sprintf(prbuf, "%s%s %.72s%s", nm, q, fruit, pl);
|
||||
}
|
||||
else {
|
||||
if (obj->o_count == 1)
|
||||
|
|
|
|||
|
|
@ -338,7 +338,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 */
|
||||
} mborder;
|
||||
|
||||
|
|
|
|||
|
|
@ -288,10 +288,10 @@ baf_print_item(struct object *obj_p, bag_arg *type, int id)
|
|||
|
||||
if (*type->iarg == 0)
|
||||
sprintf(inv_temp, "%c%c) %s", obj_p->o_type,
|
||||
print_letters[id], inv_name(obj_p, LOWERCASE), FALSE);
|
||||
print_letters[id], inv_name(obj_p, LOWERCASE));
|
||||
else
|
||||
sprintf(inv_temp, "%c) %s", print_letters[id],
|
||||
inv_name(obj_p, LOWERCASE), FALSE);
|
||||
inv_name(obj_p, LOWERCASE));
|
||||
|
||||
add_line(inv_temp);
|
||||
return(TRUE);
|
||||
|
|
|
|||
|
|
@ -1143,8 +1143,8 @@ get_hurl(struct thing *tp)
|
|||
if (off(*tp, ISCHARMED) && oil)
|
||||
return(oil);
|
||||
|
||||
if (off(*tp, ISCHARMED) && grenade)
|
||||
return(grenade);
|
||||
if (off(*tp, ISCHARMED) && grenade)
|
||||
return(grenade);
|
||||
|
||||
if (footbow && fbbolt)
|
||||
return(fbbolt);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ puta_player(void)
|
|||
wclrtoeol(hw);
|
||||
|
||||
sprintf(pbuf,
|
||||
"Int: %d Str: %d Wis: %d Dex: %d Con: %d Cha: %d Pow: %d Hpt: %d",
|
||||
"Int: %d Str: %d Wis: %d Dex: %d Con: %d Cha: %d Pow: %d Hpt: %ld",
|
||||
pstats.s_intel,
|
||||
pstats.s_str,
|
||||
pstats.s_wisdom,
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ status(int display)
|
|||
mvwaddstr(cw, LINES - 2, 0, buf);
|
||||
wclrtoeol(cw);
|
||||
|
||||
sprintf(buf, "Lvl:%d Au:%d Hpt:%3d(%3d) Pow:%d(%d) Ac:%d Exp:%d+%ld %s",
|
||||
sprintf(buf, "Lvl:%d Au:%ld Hpt:%3ld(%3ld) Pow:%d(%d) Ac:%d Exp:%d+%ld %s",
|
||||
level,
|
||||
purse,
|
||||
stat_ptr->s_hpt, max_ptr->s_hpt,
|
||||
|
|
|
|||
|
|
@ -1417,11 +1417,11 @@ sell(struct thing *tp)
|
|||
if (selection[i].count > 1)
|
||||
strcat(dbuf, "s");
|
||||
|
||||
sprintf(buffer, "%-50s Price: %d", dbuf, selection[i].worth);
|
||||
sprintf(buffer, "%-50.80s Price: %d", dbuf, selection[i].worth);
|
||||
waddstr(hw, buffer);
|
||||
}
|
||||
|
||||
sprintf(buffer, "Purse: %d", purse);
|
||||
sprintf(buffer, "Purse: %ld", purse);
|
||||
mvwaddstr(hw, nitems + 3, 0, buffer);
|
||||
mvwaddstr(hw, 0, 0, "How about one of the following goods? ");
|
||||
wrefresh(hw);
|
||||
|
|
|
|||
|
|
@ -29,15 +29,19 @@ int get_score(opt_arg *opt, WINDOW *win);
|
|||
/* description of an option and what to do with it */
|
||||
static OPTION optlist[] =
|
||||
{
|
||||
{"jump","Show position only at end of run (jump): ", &jump,put_bool,get_bool},
|
||||
{"inven","Style of inventories (inven): ", &inv_type, put_inv, get_inv},
|
||||
{"askme","Ask me about unidentified things (askme): ",&askme,put_bool,get_bool},
|
||||
{"doorstop","Stop running when adjacent (doorstop): ",&doorstop,put_bool,get_bool},
|
||||
{"name", "Name (name): ", &whoami, put_str, get_restr},
|
||||
{"fruit", "Fruit (fruit): ", &fruit, put_str, get_str},
|
||||
{"file", "Save file (file): ", &file_name, put_str, get_restr},
|
||||
{"score", "Score file (score): ", &score_file, put_str, get_score},
|
||||
{"class", "Character class (class): ",&char_type, put_abil, get_abil}
|
||||
{"jump","Show position only at end of run (jump): ", { &jump },
|
||||
put_bool, get_bool},
|
||||
{"inven","Style of inventories (inven): ", { &inv_type },
|
||||
put_inv, get_inv},
|
||||
{"askme","Ask me about unidentified things (askme): ", { &askme},
|
||||
put_bool, get_bool},
|
||||
{"doorstop","Stop running when adjacent (doorstop): ", { &doorstop },
|
||||
put_bool, get_bool},
|
||||
{"name", "Name (name): ", { &whoami }, put_str, get_restr},
|
||||
{"fruit", "Fruit (fruit): ", { &fruit }, put_str, get_str},
|
||||
{"file", "Save file (file): ", { &file_name }, put_str, get_restr},
|
||||
{"score", "Score file (score): ", { &score_file }, put_str, get_score},
|
||||
{"class", "Character class (class): ", { &char_type }, put_abil, get_abil}
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -215,33 +215,33 @@ quaff(struct thing *quaffer, int which, int flags)
|
|||
case 2: ctype = C_CLERIC; break;
|
||||
case 3: ctype = C_THIEF; break;
|
||||
}
|
||||
switch (ctype)
|
||||
{
|
||||
case C_FIGHTER:add_strength(cursed); break;
|
||||
case C_PALADIN:add_strength(cursed); break;
|
||||
case C_RANGER:add_strength(cursed); break;
|
||||
case C_MAGICIAN:add_intelligence(cursed); break;
|
||||
case C_ILLUSION:add_intelligence(cursed); break;
|
||||
case C_CLERIC:add_wisdom(cursed); break;
|
||||
case C_DRUID:add_wisdom(cursed); break;
|
||||
case C_THIEF:add_dexterity(cursed); break;
|
||||
case C_ASSASIN:add_dexterity(cursed); break;
|
||||
case C_NINJA:add_dexterity(cursed); break;
|
||||
default: msg("You're a strange type!"); break;
|
||||
}
|
||||
switch (ctype)
|
||||
{
|
||||
case C_FIGHTER:add_strength(cursed); break;
|
||||
case C_PALADIN:add_strength(cursed); break;
|
||||
case C_RANGER:add_strength(cursed); break;
|
||||
case C_MAGICIAN:add_intelligence(cursed); break;
|
||||
case C_ILLUSION:add_intelligence(cursed); break;
|
||||
case C_CLERIC:add_wisdom(cursed); break;
|
||||
case C_DRUID:add_wisdom(cursed); break;
|
||||
case C_THIEF:add_dexterity(cursed); break;
|
||||
case C_ASSASIN:add_dexterity(cursed); break;
|
||||
case C_NINJA:add_dexterity(cursed); break;
|
||||
default: msg("You're a strange type!"); break;
|
||||
}
|
||||
|
||||
if (rnd(100) < 10)
|
||||
add_const(cursed);
|
||||
|
||||
if (rnd(100) < 60)
|
||||
curp->s_arm += (cursed ? 1 : -1);
|
||||
|
||||
if (!cursed)
|
||||
know_items[TYP_POTION][P_GAINABIL] = TRUE;
|
||||
}
|
||||
|
||||
if (rnd(100) < 10)
|
||||
add_const(cursed);
|
||||
|
||||
if (rnd(100) < 60)
|
||||
curp->s_arm += (cursed ? 1 : -1);
|
||||
|
||||
if (!cursed)
|
||||
know_items[TYP_POTION][P_GAINABIL] = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case P_MONSTDET:
|
||||
|
||||
|
|
|
|||
|
|
@ -408,8 +408,8 @@ writelog(long amount, int lvl, int flags, int monst)
|
|||
}
|
||||
else
|
||||
return;
|
||||
fprintf(file_log, "%d %d %s %d %s %d %d %d %s\n", time(NULL), amount,
|
||||
whoami, lvl, which_class(player.t_ctype), level, max_level,
|
||||
fprintf(file_log, "%ld %ld %s %d %s %d %d %d %s\n", time(NULL), amount,
|
||||
whoami, lvl, which_class(player.t_ctype), level, max_level,
|
||||
has_artifact, fate);
|
||||
fclose(file_log);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ find_object(struct linked_list *list, int num)
|
|||
if ( (num < 1) || (list == NULL) )
|
||||
return(NULL);
|
||||
|
||||
num--;
|
||||
num--;
|
||||
|
||||
for(cnt = 0; cnt < num; cnt++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ buy_more:
|
|||
for(i=0,m_item=magic_array; i < array_size; i++, m_item++)
|
||||
if (!is_spell && m_item->mi_worth > 0)
|
||||
{
|
||||
sprintf(buf, "%3d) %8d %s", i, m_item->mi_worth,
|
||||
sprintf(buf, "%3d) %8ld %s", i, m_item->mi_worth,
|
||||
m_item->mi_name);
|
||||
add_line(buf);
|
||||
}
|
||||
|
|
@ -267,7 +267,7 @@ buy_more:
|
|||
for (i = 0; i < array_size; i++)
|
||||
if (!is_spell && armors[i].a_worth > 0)
|
||||
{
|
||||
sprintf(buf, "%3d) %8d %s", i, armors[i].a_worth,
|
||||
sprintf(buf, "%3d) %8ld %s", i, armors[i].a_worth,
|
||||
armors[i].a_name);
|
||||
|
||||
add_line(buf);
|
||||
|
|
@ -278,7 +278,7 @@ buy_more:
|
|||
for (i = 0; i < array_size; i++)
|
||||
if (!is_spell && weaps[i].w_worth > 0)
|
||||
{
|
||||
sprintf(buf, "%3d) %8d %s", i, weaps[i].w_worth,
|
||||
sprintf(buf, "%3d) %8ld %s", i, weaps[i].w_worth,
|
||||
weaps[i].w_name);
|
||||
add_line(buf);
|
||||
}
|
||||
|
|
@ -646,7 +646,7 @@ describe_it(struct object *obj)
|
|||
else
|
||||
charp = normal_d[rnd(sizeof(normal_d) / sizeof(char *))];
|
||||
|
||||
sprintf(buf, "It's a%s %s worth %d pieces of gold.",
|
||||
sprintf(buf, "It's a%s %s worth %ld pieces of gold.",
|
||||
vowelstr(charp), charp, obj->o_worth);
|
||||
|
||||
mvwaddstr(hw, 10, 0, inv_name(obj, TRUE));
|
||||
|
|
@ -794,11 +794,11 @@ trans_line(void)
|
|||
int adorned = is_wearing(R_ADORNMENT);
|
||||
|
||||
if (level == 0 && purse > 0)
|
||||
sprintf(buf, "You still have %d pieces of gold left.", purse);
|
||||
sprintf(buf, "You still have %ld pieces of gold left.", purse);
|
||||
else if (purse == 0)
|
||||
sprintf(buf, "You have no money left.");
|
||||
else if (!wizard)
|
||||
sprintf(buf, "You have %d transactions and %d gold pieces remaining.",
|
||||
sprintf(buf, "You have %d transactions and %ld gold pieces remaining.",
|
||||
max(0, (adorned ? MAXPURCH + 4 : MAXPURCH) - player.t_trans),
|
||||
EFFECTIVE_PURSE);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -696,12 +696,12 @@ eat_gold(struct object *obj)
|
|||
if (purse == 50)
|
||||
msg("%s.. Commands you to find more gold!! ", inv_name(obj, FALSE));
|
||||
if (purse == 0) {
|
||||
if (rnd(10) >= 7)
|
||||
msg("You feel the artifact gnawing away... ");
|
||||
if (rnd(10) >= 7)
|
||||
msg("You feel the artifact gnawing away... ");
|
||||
if (--pstats.s_hpt < 1) {
|
||||
pstats.s_hpt = -1;
|
||||
pstats.s_hpt = -1;
|
||||
death(D_RELIC);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
purse--;
|
||||
|
|
|
|||
258
xrogue/help.c
258
xrogue/help.c
|
|
@ -160,143 +160,143 @@ static char *game_begin ="To be updated...";
|
|||
|
||||
/* help list */
|
||||
static struct h_list helpstr[] = {
|
||||
'?', " Print help",
|
||||
'/', " Identify object",
|
||||
'=', " Identify a screen character",
|
||||
' ', "",
|
||||
'h', " Move left",
|
||||
'j', " Move down",
|
||||
'k', " Move up",
|
||||
'l', " Move right",
|
||||
'y', " Move up and left",
|
||||
'u', " Move up and right",
|
||||
'b', " Move down and left",
|
||||
'n', " Move down and 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",
|
||||
' ', "",
|
||||
'>', " Go down a staircase",
|
||||
'<', " Go up a staircase",
|
||||
'\\', " Game descriptions",
|
||||
'.', " Rest for a while",
|
||||
'*', " Count gold pieces",
|
||||
'a', " Affect the undead",
|
||||
'A', " Choose artifact (equipage)",
|
||||
'c', " Chant a mantra",
|
||||
'C', " Cast a spell",
|
||||
'd', " Drop something",
|
||||
'D', " Dip something (into a pool)",
|
||||
'e', " Eat food or fruit",
|
||||
'f', "<dir> Forward until find something",
|
||||
'F', " Frighten a monster",
|
||||
'g', " Give food to monster",
|
||||
'G', " Sense for gold",
|
||||
'i', " Inventory",
|
||||
'I', " Inventory (single item)",
|
||||
'm', " Mark an object (specific)",
|
||||
'o', " Examine and/or set options",
|
||||
'O', " Character type and quest item",
|
||||
'p', " Pray to the powers that be",
|
||||
'P', " Pick up object(s)",
|
||||
'q', " Quaff a potion",
|
||||
'Q', " Quit the game",
|
||||
'r', " Read a scroll",
|
||||
's', " Search for a trap/secret door",
|
||||
'S', " Save your game",
|
||||
't', "<dir> Throw something",
|
||||
'T', " Take off something",
|
||||
'v', " Print program version",
|
||||
'w', " Wield a weapon",
|
||||
'W', " Wear something",
|
||||
'X', " Sense for traps",
|
||||
'z', "<dir> Zap a wand or staff",
|
||||
' ', "",
|
||||
'^', " Set a trap",
|
||||
'$', " Price an item (trading post)",
|
||||
'#', " Buy an item (trading post)",
|
||||
'%', " Sell an item (trading post)",
|
||||
'!', " Shell escape",
|
||||
ESC, " Cancel command (Esc)",
|
||||
' ', "",
|
||||
CTRL('B'), " Current score (if you win)",
|
||||
CTRL('E'), " Current food level",
|
||||
CTRL('L'), " Redraw the screen",
|
||||
CTRL('N'), " Name an object or a monster",
|
||||
CTRL('O'), " Character affect status",
|
||||
CTRL('R'), " Repeat last message",
|
||||
CTRL('T'), "<dir> Take (steal) from (direction)",
|
||||
CTRL('U'), " Use a magic item",
|
||||
0, 0
|
||||
{ '?', " Print help" },
|
||||
{ '/', " Identify object" },
|
||||
{ '=', " Identify a screen character" },
|
||||
{ ' ', "" },
|
||||
{ 'h', " Move left" },
|
||||
{ 'j', " Move down" },
|
||||
{ 'k', " Move up" },
|
||||
{ 'l', " Move right" },
|
||||
{ 'y', " Move up and left" },
|
||||
{ 'u', " Move up and right" },
|
||||
{ 'b', " Move down and left" },
|
||||
{ 'n', " Move down and 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" },
|
||||
{ ' ', "" },
|
||||
{ '>', " Go down a staircase" },
|
||||
{ '<', " Go up a staircase" },
|
||||
{ '\\', " Game descriptions" },
|
||||
{ '.', " Rest for a while" },
|
||||
{ '*', " Count gold pieces" },
|
||||
{ 'a', " Affect the undead" },
|
||||
{ 'A', " Choose artifact (equipage)" },
|
||||
{ 'c', " Chant a mantra" },
|
||||
{ 'C', " Cast a spell" },
|
||||
{ 'd', " Drop something" },
|
||||
{ 'D', " Dip something (into a pool)" },
|
||||
{ 'e', " Eat food or fruit" },
|
||||
{ 'f', "<dir> Forward until find something" },
|
||||
{ 'F', " Frighten a monster" },
|
||||
{ 'g', " Give food to monster" },
|
||||
{ 'G', " Sense for gold" },
|
||||
{ 'i', " Inventory" },
|
||||
{ 'I', " Inventory (single item)" },
|
||||
{ 'm', " Mark an object (specific)" },
|
||||
{ 'o', " Examine and/or set options" },
|
||||
{ 'O', " Character type and quest item" },
|
||||
{ 'p', " Pray to the powers that be" },
|
||||
{ 'P', " Pick up object(s)" },
|
||||
{ 'q', " Quaff a potion" },
|
||||
{ 'Q', " Quit the game" },
|
||||
{ 'r', " Read a scroll" },
|
||||
{ 's', " Search for a trap/secret door" },
|
||||
{ 'S', " Save your game" },
|
||||
{ 't', "<dir> Throw something" },
|
||||
{ 'T', " Take off something" },
|
||||
{ 'v', " Print program version" },
|
||||
{ 'w', " Wield a weapon" },
|
||||
{ 'W', " Wear something" },
|
||||
{ 'X', " Sense for traps" },
|
||||
{ 'z', "<dir> Zap a wand or staff" },
|
||||
{ ' ', "" },
|
||||
{ '^', " Set a trap" },
|
||||
{ '$', " Price an item (trading post)" },
|
||||
{ '#', " Buy an item (trading post)" },
|
||||
{ '%', " Sell an item (trading post)" },
|
||||
{ '!', " Shell escape" },
|
||||
{ ESC, " Cancel command (Esc)" },
|
||||
{ ' ', "" },
|
||||
{ CTRL('B'), " Current score (if you win)" },
|
||||
{ CTRL('E'), " Current food level" },
|
||||
{ CTRL('L'), " Redraw the screen" },
|
||||
{ CTRL('N'), " Name an object or a monster" },
|
||||
{ CTRL('O'), " Character affect status" },
|
||||
{ CTRL('R'), " Repeat last message" },
|
||||
{ CTRL('T'), "<dir> Take (steal) from (direction)" },
|
||||
{ CTRL('U'), " Use a magic item" },
|
||||
{ 0, "" }
|
||||
} ;
|
||||
|
||||
/* wizard help list */
|
||||
static struct h_list wiz_help[] = {
|
||||
' ', "",
|
||||
'+', " Random fortunes",
|
||||
'M', " Make an object",
|
||||
'V', " Display vlevel and turns",
|
||||
CTRL('A'), " System activity",
|
||||
CTRL('C'), " Move to another dungeon level",
|
||||
CTRL('D'), " Go down 1 dungeon level",
|
||||
CTRL('F'), " Display the entire level",
|
||||
CTRL('G'), " Charge wands and staffs",
|
||||
CTRL('H'), " Jump 9 experience levels",
|
||||
CTRL('I'), " Inventory of level",
|
||||
CTRL('J'), " Teleport somewhere",
|
||||
CTRL('K'), " Identify an object",
|
||||
CTRL('M'), " Recharge wand or staff",
|
||||
CTRL('P'), " Toggle wizard status",
|
||||
CTRL('X'), " Detect monsters",
|
||||
CTRL('Y'), " Display food levels",
|
||||
0, 0
|
||||
{ ' ', "" },
|
||||
{ '+', " Random fortunes" },
|
||||
{ 'M', " Make an object" },
|
||||
{ 'V', " Display vlevel and turns" },
|
||||
{ CTRL('A'), " System activity" },
|
||||
{ CTRL('C'), " Move to another dungeon level" },
|
||||
{ CTRL('D'), " Go down 1 dungeon level" },
|
||||
{ CTRL('F'), " Display the entire level" },
|
||||
{ CTRL('G'), " Charge wands and staffs" },
|
||||
{ CTRL('H'), " Jump 9 experience levels" },
|
||||
{ CTRL('I'), " Inventory of level" },
|
||||
{ CTRL('J'), " Teleport somewhere" },
|
||||
{ CTRL('K'), " Identify an object" },
|
||||
{ CTRL('M'), " Recharge wand or staff" },
|
||||
{ CTRL('P'), " Toggle wizard status" },
|
||||
{ CTRL('X'), " Detect monsters" },
|
||||
{ CTRL('Y'), " Display food levels" },
|
||||
{ 0, "" }
|
||||
};
|
||||
|
||||
/* item help list */
|
||||
static struct item_list item_help[] = {
|
||||
'@', " You (visible)",
|
||||
'_', " You (invisible)",
|
||||
' ', "",
|
||||
':', " Food ration or fruit (eat)",
|
||||
'!', " Potion (quaff)",
|
||||
'?', " Scroll (read)",
|
||||
'=', " Ring (wear)",
|
||||
')', " Weapon (wield)",
|
||||
']', " Armor (wear)",
|
||||
'/', " Wand or staff (zap)",
|
||||
';', " Magic item (use)",
|
||||
',', " Artifact (quest item)",
|
||||
'*', " Gold or zapped missile",
|
||||
' ', "",
|
||||
'$', " Magical item in room",
|
||||
'>', " Blessed magical item",
|
||||
'<', " Cursed magical item",
|
||||
' ', " ",
|
||||
'`', " Dart trap",
|
||||
'{', " Arrow trap",
|
||||
'}', " Bear trap",
|
||||
'~', " Teleport trap",
|
||||
'$', " Sleeping gas trap",
|
||||
'>', " Trap door",
|
||||
'<', " Outer region entrance",
|
||||
'\'', " Maze entrance",
|
||||
'^', " Trading post entrance",
|
||||
'"', " Magic pool or lake",
|
||||
' ', " Solid rock or mountain",
|
||||
'.', " Floor of a room or meadow",
|
||||
'%', " Stairs (up or down)",
|
||||
'+', " Doorway",
|
||||
'&', " Secret doorway",
|
||||
'#', " Passage between rooms",
|
||||
'\\', " Forest",
|
||||
HORZWALL, " Horizontal wall of a room",
|
||||
VERTWALL, " Vertical wall of a room",
|
||||
0, 0
|
||||
{ '@', " You (visible)" },
|
||||
{ '_', " You (invisible)" },
|
||||
{ ' ', "" },
|
||||
{ ':', " Food ration or fruit (eat)" },
|
||||
{ '!', " Potion (quaff)" },
|
||||
{ '?', " Scroll (read)" },
|
||||
{ '=', " Ring (wear)" },
|
||||
{ ')', " Weapon (wield)" },
|
||||
{ ']', " Armor (wear)" },
|
||||
{ '/', " Wand or staff (zap)" },
|
||||
{ ';', " Magic item (use)" },
|
||||
{ ',', " Artifact (quest item)" },
|
||||
{ '*', " Gold or zapped missile" },
|
||||
{ ' ', "" },
|
||||
{ '$', " Magical item in room" },
|
||||
{ '>', " Blessed magical item" },
|
||||
{ '<', " Cursed magical item" },
|
||||
{ ' ', " " },
|
||||
{ '`', " Dart trap" },
|
||||
{ '{', " Arrow trap" },
|
||||
{ '}', " Bear trap" },
|
||||
{ '~', " Teleport trap" },
|
||||
{ '$', " Sleeping gas trap" },
|
||||
{ '>', " Trap door" },
|
||||
{ '<', " Outer region entrance" },
|
||||
{ '\'', " Maze entrance" },
|
||||
{ '^', " Trading post entrance" },
|
||||
{ '"', " Magic pool or lake" },
|
||||
{ ' ', " Solid rock or mountain" },
|
||||
{ '.', " Floor of a room or meadow" },
|
||||
{ '%', " Stairs (up or down)" },
|
||||
{ '+', " Doorway" },
|
||||
{ '&', " Secret doorway" },
|
||||
{ '#', " Passage between rooms" },
|
||||
{ '\\', " Forest" },
|
||||
{ HORZWALL, " Horizontal wall of a room" },
|
||||
{ VERTWALL, " Vertical wall of a room" },
|
||||
{ 0, "" }
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
|||
102
xrogue/init.c
102
xrogue/init.c
|
|
@ -37,67 +37,71 @@ enter a '\\' on any other screen.";
|
|||
*/
|
||||
|
||||
struct words rainbow[NCOLORS] = {
|
||||
"Amber", "Aquamarine", "Beige",
|
||||
"Black", "Blue", "Brown",
|
||||
"Clear", "Crimson", "Ecru",
|
||||
"Gold", "Green", "Grey",
|
||||
"Indigo", "Khaki", "Lavender",
|
||||
"Magenta", "Orange", "Pink",
|
||||
"Plaid", "Purple", "Red",
|
||||
"Silver", "Saffron", "Scarlet",
|
||||
"Tan", "Tangerine", "Topaz",
|
||||
"Turquoise", "Vermilion", "Violet",
|
||||
"White", "Yellow",
|
||||
{ "Amber" }, { "Aquamarine" }, { "Beige" },
|
||||
{ "Black" }, { "Blue" }, { "Brown" },
|
||||
{ "Clear" }, { "Crimson" }, { "Ecru" },
|
||||
{ "Gold" }, { "Green" }, { "Grey" },
|
||||
{ "Indigo" }, { "Khaki" }, { "Lavender" },
|
||||
{ "Magenta" }, { "Orange" }, { "Pink" },
|
||||
{ "Plaid" }, { "Purple" }, { "Red" },
|
||||
{ "Silver" }, { "Saffron" }, { "Scarlet" },
|
||||
{ "Tan" }, { "Tangerine" }, { "Topaz" },
|
||||
{ "Turquoise" }, { "Vermilion" }, { "Violet" },
|
||||
{ "White" }, { "Yellow" }
|
||||
};
|
||||
|
||||
struct words sylls[NSYLLS] = {
|
||||
"a", "ae", "ak", "an", "ax", "ach", "ano", "ars", "bha", "bar", "bre",
|
||||
"cha", "cre", "cum", "cow", "duh", "dha", "e", "ea", "em", "et", "ey",
|
||||
"eck", "etk", "egg", "exl", "fu", "fen", "fid", "gan", "gle", "h", "ha",
|
||||
"hr", "ht", "how", "hex", "hip", "hoc", "i", "ia", "ig", "it", "iz",
|
||||
"ion", "ink", "ivi", "iss", "je", "jin", "jha", "jyr", "ka", "kho", "kal",
|
||||
"kli", "lu", "lre", "lta", "lri", "m", "ma", "mh", "mi", "mr", "mar",
|
||||
"myr", "moh", "mul", "nep", "nes", "o", "oc", "om", "oq", "ox", "orn",
|
||||
"oxy", "olm", "ode", "po", "pie", "pod", "pot", "qar", "que", "ran", "rah",
|
||||
"rok", "sa", "sat", "sha", "sol", "sri", "ti", "tem", "tar", "tki", "tch",
|
||||
"tox", "u", "ub", "uh", "ur", "uv", "unk", "uwh", "ugh", "uyr", "va",
|
||||
"vil", "vit", "vom", "vux", "wah", "wex", "xu", "xed", "xen", "ya", "yep",
|
||||
"yih", "zef", "zen", "zil", "zym", "-"
|
||||
{"a"}, {"ae"}, {"ak"}, {"an"}, {"ax"}, {"ach"}, {"ano"}, {"ars"},
|
||||
{"bha"}, {"bar"}, {"bre"}, {"cha"}, {"cre"}, {"cum"}, {"cow"}, {"duh"},
|
||||
{"dha"}, {"e"}, {"ea"}, {"em"}, {"et"}, {"ey"}, {"eck"}, {"etk"},
|
||||
{"egg"}, {"exl"}, {"fu"}, {"fen"}, {"fid"}, {"gan"}, {"gle"}, {"h"},
|
||||
{"ha"}, {"hr"}, {"ht"}, {"how"}, {"hex"}, {"hip"}, {"hoc"}, {"i"},
|
||||
{"ia"}, {"ig"}, {"it"}, {"iz"}, {"ion"}, {"ink"}, {"ivi"}, {"iss"},
|
||||
{"je"}, {"jin"}, {"jha"}, {"jyr"}, {"ka"}, {"kho"}, {"kal"}, {"kli"},
|
||||
{"lu"}, {"lre"}, {"lta"}, {"lri"}, {"m"}, {"ma"}, {"mh"}, {"mi"},
|
||||
{"mr"}, {"mar"}, {"myr"}, {"moh"}, {"mul"}, {"nep"}, {"nes"}, {"o"},
|
||||
{"oc"}, {"om"}, {"oq"}, {"ox"}, {"orn"}, {"oxy"}, {"olm"}, {"ode"},
|
||||
{"po"}, {"pie"}, {"pod"}, {"pot"}, {"qar"}, {"que"}, {"ran"}, {"rah"},
|
||||
{"rok"}, {"sa"}, {"sat"}, {"sha"}, {"sol"}, {"sri"}, {"ti"}, {"tem"},
|
||||
{"tar"}, {"tki"}, {"tch"}, {"tox"}, {"u"}, {"ub"}, {"uh"}, {"ur"},
|
||||
{"uv"}, {"unk"}, {"uwh"}, {"ugh"}, {"uyr"}, {"va"}, {"vil"}, {"vit"},
|
||||
{"vom"}, {"vux"}, {"wah"}, {"wex"}, {"xu"}, {"xed"}, {"xen"}, {"ya"},
|
||||
{"yep"}, {"yih"}, {"zef"}, {"zen"}, {"zil"}, {"zym"}, {"-"}
|
||||
};
|
||||
|
||||
struct words stones[NSTONES] = {
|
||||
"Agate", "Alexandrite", "Amethyst",
|
||||
"Azurite", "Bloodstone", "Cairngorm",
|
||||
"Carnelian", "Chalcedony", "Chrysoberyl",
|
||||
"Chrysolite", "Chrysoprase", "Citrine",
|
||||
"Coral", "Diamond", "Emerald",
|
||||
"Garnet", "Heliotrope", "Hematite",
|
||||
"Hyacinth", "Jacinth", "Jade",
|
||||
"Jargoon", "Jasper", "Kryptonite",
|
||||
"Lapis lazuli", "Malachite", "Mocca stone",
|
||||
"Moonstone", "Obsidian", "Olivine",
|
||||
"Onyx", "Opal", "Pearl",
|
||||
"Peridot", "Quartz", "Rhodochrosite",
|
||||
"Rhodolite", "Ruby", "Sapphire",
|
||||
"Sardonyx", "Serpentine", "Spinel",
|
||||
"Tiger eye", "Topaz", "Tourmaline",
|
||||
"Turquoise", "Zircon",
|
||||
{ "Agate" }, { "Alexandrite" }, { "Amethyst" },
|
||||
{ "Azurite" }, { "Bloodstone" }, { "Cairngorm" },
|
||||
{ "Carnelian" }, { "Chalcedony" }, { "Chrysoberyl" },
|
||||
{ "Chrysolite" }, { "Chrysoprase" }, { "Citrine" },
|
||||
{ "Coral" }, { "Diamond" }, { "Emerald" },
|
||||
{ "Garnet" }, { "Heliotrope" }, { "Hematite" },
|
||||
{ "Hyacinth" }, { "Jacinth" }, { "Jade" },
|
||||
{ "Jargoon" }, { "Jasper" }, { "Kryptonite" },
|
||||
{ "Lapis lazuli" }, { "Malachite" }, { "Mocca stone" },
|
||||
{ "Moonstone" }, { "Obsidian" }, { "Olivine" },
|
||||
{ "Onyx" }, { "Opal" }, { "Pearl" },
|
||||
{ "Peridot" }, { "Quartz" }, { "Rhodochrosite" },
|
||||
{ "Rhodolite" }, { "Ruby" }, { "Sapphire" },
|
||||
{ "Sardonyx" }, { "Serpentine" }, { "Spinel" },
|
||||
{ "Tiger eye" }, { "Topaz" }, { "Tourmaline" },
|
||||
{ "Turquoise" }, { "Zircon" }
|
||||
};
|
||||
|
||||
struct words wood[NWOOD] = {
|
||||
"Avocado wood", "Balsa", "Banyan", "Birch",
|
||||
"Cedar", "Cherry", "Cinnabar", "Dogwood",
|
||||
"Driftwood", "Ebony", "Eucalyptus", "Hemlock",
|
||||
"Ironwood", "Mahogany", "Manzanita", "Maple",
|
||||
"Oak", "Pine", "Redwood", "Rosewood",
|
||||
"Teak", "Walnut", "Aloe", "Sandalwood",
|
||||
{"Avocado wood"}, {"Balsa"}, {"Banyan"}, {"Birch"},
|
||||
{"Cedar"}, {"Cherry"}, {"Cinnabar"}, {"Dogwood"},
|
||||
{"Driftwood"}, {"Ebony"}, {"Eucalyptus"}, {"Hemlock"},
|
||||
{"Ironwood"}, {"Mahogany"}, {"Manzanita"}, {"Maple"},
|
||||
{"Oak"}, {"Pine"}, {"Redwood"}, {"Rosewood"},
|
||||
{"Teak"}, {"Walnut"}, {"Aloe"}, {"Sandalwood"}
|
||||
};
|
||||
|
||||
struct words metal[NMETAL] = {
|
||||
"Aluminium", "Bone", "Brass", "Bronze",
|
||||
"Copper", "Chromium", "Iron", "Lead",
|
||||
"Magnesium", "Pewter", "Platinum", "Silver",
|
||||
"Steel", "Tin", "Titanium", "Zinc",
|
||||
{"Aluminium"}, {"Bone"}, {"Brass"}, {"Bronze"},
|
||||
{"Copper"}, {"Chromium"}, {"Iron"}, {"Lead"},
|
||||
{"Magnesium"}, {"Pewter"}, {"Platinum"}, {"Silver"},
|
||||
{"Steel"}, {"Tin"}, {"Titanium"}, {"Zinc"}
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ new(int size)
|
|||
register char *space = ALLOC(size);
|
||||
|
||||
if (space == NULL) {
|
||||
sprintf(prbuf,"Rogue ran out of memory (used = %d, wanted = %d).",
|
||||
sprintf(prbuf,"Rogue ran out of memory (used = %ld, wanted = %d).",
|
||||
md_memused(), size);
|
||||
fatal(prbuf);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ struct cell {
|
|||
char x_pos;
|
||||
};
|
||||
struct b_cellscells {
|
||||
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 */
|
||||
} b_cells;
|
||||
|
||||
|
|
|
|||
|
|
@ -521,9 +521,10 @@ quaff(int which, int kind, int flags, bool is_potion)
|
|||
fuse(sight, NULL, SEEDURATION, AFTER);
|
||||
light(&hero);
|
||||
}
|
||||
else
|
||||
else {
|
||||
msg("The darkness around you thickens. ");
|
||||
lengthen(sight, SEEDURATION);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (off(player, CANSEE)) {
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ writelog(unsigned long amount, int flags, short monst)
|
|||
else
|
||||
return;
|
||||
/* Write the line */
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@ struct character_types char_class[NUM_CHARTYPES] = {
|
|||
*/
|
||||
|
||||
struct words abilities[NUMABILITIES] = {
|
||||
"Intelligence", "Strength", "Wisdom", "Dexterity", "Constitution", "Charisma"
|
||||
{ "Intelligence" }, { "Strength" }, { "Wisdom" },
|
||||
{ "Dexterity" }, { "Constitution" }, { "Charisma" }
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue