Moved petname_used to decl.c

This commit is contained in:
Bart House
2018-11-22 15:49:43 -08:00
parent 79e0a11c15
commit 48c89acef4
3 changed files with 6 additions and 2 deletions
+3
View File
@@ -192,6 +192,8 @@ E NEARDATA char dogname[];
E NEARDATA char catname[]; E NEARDATA char catname[];
E NEARDATA char horsename[]; E NEARDATA char horsename[];
E char preferred_pet; E char preferred_pet;
E int petname_used;
E const char *occtxt; /* defined when occupation != NULL */ E const char *occtxt; /* defined when occupation != NULL */
E const char *nomovemsg; E const char *nomovemsg;
E char lock[]; E char lock[];
@@ -440,6 +442,7 @@ struct early_opt {
/* encumbrance */ /* encumbrance */
E int oldcap; E int oldcap;
#undef E #undef E
#endif /* DECL_H */ #endif /* DECL_H */
+3 -1
View File
@@ -207,6 +207,7 @@ NEARDATA char dogname[PL_PSIZ] = DUMMY;
NEARDATA char catname[PL_PSIZ] = DUMMY; NEARDATA char catname[PL_PSIZ] = DUMMY;
NEARDATA char horsename[PL_PSIZ] = DUMMY; NEARDATA char horsename[PL_PSIZ] = DUMMY;
char preferred_pet; /* '\0', 'c', 'd', 'n' (none) */ char preferred_pet; /* '\0', 'c', 'd', 'n' (none) */
int petname_used = 0;
/* monsters that went down/up together with @ */ /* monsters that went down/up together with @ */
NEARDATA struct monst *mydogs = (struct monst *) 0; NEARDATA struct monst *mydogs = (struct monst *) 0;
/* monsters that are moving to another dungeon level */ /* monsters that are moving to another dungeon level */
@@ -572,7 +573,8 @@ decl_early_init()
ZEROARRAYN(dogname, PL_PSIZ); ZEROARRAYN(dogname, PL_PSIZ);
ZEROARRAYN(catname, PL_PSIZ); ZEROARRAYN(catname, PL_PSIZ);
ZEROARRAYN(horsename, PL_PSIZ); ZEROARRAYN(horsename, PL_PSIZ);
preferred_pet = 0; ZERO(preferred_pet);
ZERO(petname_used);
ZEROPTR(mydogs); ZEROPTR(mydogs);
ZEROPTR(migrating_mons); ZEROPTR(migrating_mons);
-1
View File
@@ -160,7 +160,6 @@ makedog()
register struct obj *otmp; register struct obj *otmp;
const char *petname; const char *petname;
int pettype; int pettype;
static int petname_used = 0;
if (preferred_pet == 'n') if (preferred_pet == 'n')
return ((struct monst *) 0); return ((struct monst *) 0);