diff srogue/monsters.c @ 311:28e22fb35989

Fix one more batch of compiler warnings. A few of these were potential bugs.
author John "Elwin" Edwards
date Tue, 04 May 2021 21:03:47 -0400
parents e52a8a7ad4c5
children
line wrap: on
line diff
--- a/srogue/monsters.c	Mon May 03 19:05:37 2021 -0400
+++ b/srogue/monsters.c	Tue May 04 21:03:47 2021 -0400
@@ -24,7 +24,7 @@
  *	Pick a monster to show up.  The lower the level,
  *	the meaner the monster.
  */
-char
+int
 rnd_mon(bool wander, bool baddie)
 {
 	/* baddie; TRUE when from a polymorph stick */
@@ -85,7 +85,7 @@
  *	Pick a new monster and add it to the list
  */
 struct linked_list *
-new_monster(char type, struct coord *cp, bool treas)
+new_monster(int indx, struct coord *cp, bool treas)
 {
 	reg struct linked_list *item;
 	reg struct thing *tp;
@@ -97,9 +97,9 @@
 	attach(mlist, item);
 	tp = THINGPTR(item);
 	st = &tp->t_stats;
-	mp = &monsters[type];		/* point to this monsters structure */
+	mp = &monsters[indx];		/* point to this monsters structure */
 	tp->t_type = mp->m_show;
-	tp->t_indx = type;
+	tp->t_indx = indx;
 	tp->t_pos = *cp;
 	tp->t_room = roomin(cp);
 	tp->t_oldch = mvwinch(cw, cp->y, cp->x) & A_CHARTEXT;