diff options
-rw-r--r-- | games/rogue/monster.c | 78 | ||||
-rw-r--r-- | games/rogue/object.c | 5 | ||||
-rw-r--r-- | games/rogue/pack.c | 3 | ||||
-rw-r--r-- | games/rogue/rogue.h | 4 | ||||
-rw-r--r-- | games/rogue/room.c | 18 | ||||
-rw-r--r-- | games/rogue/score.c | 5 | ||||
-rw-r--r-- | games/rogue/throw.c | 6 |
7 files changed, 72 insertions, 47 deletions
diff --git a/games/rogue/monster.c b/games/rogue/monster.c index b634a1eb6f2..e422f4af0f4 100644 --- a/games/rogue/monster.c +++ b/games/rogue/monster.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monster.c,v 1.3 1998/08/22 08:55:34 pjanzen Exp $ */ +/* $OpenBSD: monster.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $ */ /* $NetBSD: monster.c,v 1.3 1995/04/22 10:27:45 cgd Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)monster.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: monster.c,v 1.3 1998/08/22 08:55:34 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: monster.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $"; #endif #endif /* not lint */ @@ -92,36 +92,58 @@ char *m_names[] = { }; object mon_tab[MONSTERS] = { - {(ASLEEP|WAKENS|WANDERS|RUSTS),"0d0",25,'A',20,9,18,100,0,0,0,0,0}, - {(ASLEEP|WANDERS|FLITS|FLIES),"1d3",10,'B',2,1,8,60,0,0,0,0,0}, - {(ASLEEP|WANDERS),"3d3/2d5",32,'C',15,7,16,85,0,10,0,0,0}, - {(ASLEEP|WAKENS|FLAMES),"4d6/4d9",145,'D',5000,21,126,100,0,90,0,0,0}, - {(ASLEEP|WAKENS),"1d3",11,'E',2,1,7,65,0,0,0,0,0}, - {(HOLDS|STATIONARY),"5d5",73,'F',91,12,126,80,0,0,0,0,0}, + {(ASLEEP|WAKENS|WANDERS|RUSTS),"0d0",25,'A',20,9,18,100,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WANDERS|FLITS|FLIES),"1d3",10,'B',2,1,8,60,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WANDERS),"3d3/2d5",32,'C',15,7,16,85,0,10,0,0,0,0,0,0,0,0, + 0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS|FLAMES),"4d6/4d9",145,'D',5000,21,126,100,0,90,0,0, + 0,0,0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS),"1d3",11,'E',2,1,7,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,NULL}, + {(HOLDS|STATIONARY),"5d5",73,'F',91,12,126,80,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,NULL}, {(ASLEEP|WAKENS|WANDERS|FLIES),"5d5/5d5",115,'G', - 2000,20,126,85,0,10,0,0,0}, - {(ASLEEP|WAKENS|WANDERS),"1d3/1d2",15,'H',3,1,10,67,0,0,0,0,0}, - {(ASLEEP|FREEZES),"0d0",15,'I',5,2,11,68,0,0,0,0,0}, - {(ASLEEP|WANDERS),"3d10/4d5",132,'J',3000,21,126,100,0,0,0,0,0}, - {(ASLEEP|WAKENS|WANDERS|FLIES),"1d4",10,'K',2,1,6,60,0,0,0,0,0}, - {(ASLEEP|STEALS_GOLD),"0d0",25,'L',21,6,16,75,0,0,0,0,0}, + 2000,20,126,85,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS|WANDERS),"1d3/1d2",15,'H',3,1,10,67,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|FREEZES),"0d0",15,'I',5,2,11,68,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,NULL}, + {(ASLEEP|WANDERS),"3d10/4d5",132,'J',3000,21,126,100,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS|WANDERS|FLIES),"1d4",10,'K',2,1,6,60,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|STEALS_GOLD),"0d0",25,'L',21,6,16,75,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,NULL}, {(ASLEEP|WAKENS|WANDERS|CONFUSES),"4d4/3d7",97,'M', - 250,18,126,85,0,25,0,0,0}, - {(ASLEEP|STEALS_ITEM),"0d0",25,'N',39,10,19,75,0,100,0,0,0}, - {(ASLEEP|WANDERS|WAKENS|SEEKS_GOLD),"1d6",25,'O',5,4,13,70,0,10,0,0,0}, - {(ASLEEP|INVISIBLE|WANDERS|FLITS),"5d4",76,'P',120,15,24,80,0,50,0,0,0}, - {(ASLEEP|WAKENS|WANDERS),"3d5",30,'Q',20,8,17,78,0,20,0,0,0}, - {(ASLEEP|WAKENS|WANDERS|STINGS),"2d5",19,'R',10,3,12,70,0,0,0,0,0}, - {(ASLEEP|WAKENS|WANDERS),"1d3",8,'S',2,1,9,50,0,0,0,0,0}, - {(ASLEEP|WAKENS|WANDERS),"4d6/1d4",75,'T',125,13,22,75,0,33,0,0,0}, + 250,18,126,85,0,25,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|STEALS_ITEM),"0d0",25,'N',39,10,19,75,0,100,0,0,0,0,0,0,0, + 0,0,0,0,0,0,NULL}, + {(ASLEEP|WANDERS|WAKENS|SEEKS_GOLD),"1d6",25,'O',5,4,13,70,0,10,0, + 0,0,0,0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|INVISIBLE|WANDERS|FLITS),"5d4",76,'P',120,15,24,80,0,50,0, + 0,0,0,0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS|WANDERS),"3d5",30,'Q',20,8,17,78,0,20,0,0,0,0,0,0, + 0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS|WANDERS|STINGS),"2d5",19,'R',10,3,12,70,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS|WANDERS),"1d3",8,'S',2,1,9,50,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,NULL}, + {(ASLEEP|WAKENS|WANDERS),"4d6/1d4",75,'T',125,13,22,75,0,33,0,0,0, + 0,0,0,0,0,0,0,0,0,0,NULL}, {(ASLEEP|WAKENS|WANDERS),"4d10",90,'U', - 200,17,26,85,0,33,0,0,0}, + 200,17,26,85,0,33,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL}, {(ASLEEP|WAKENS|WANDERS|DRAINS_LIFE),"1d14/1d4",55,'V', - 350,19,126,85,0,18,0,0,0}, - {(ASLEEP|WANDERS|DROPS_LEVEL),"2d8",45,'W',55,14,23,75,0,0,0,0,0}, - {(ASLEEP|IMITATES),"4d6",42,'X',110,16,25,75,0,0,0,0,0}, - {(ASLEEP|WANDERS),"3d6",35,'Y',50,11,20,80,0,20,0,0,0}, - {(ASLEEP|WAKENS|WANDERS),"1d7",21,'Z',8,5,14,69,0,0,0,0,0} + 350,19,126,85,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|WANDERS|DROPS_LEVEL),"2d8",45,'W',55,14,23,75,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,NULL}, + {(ASLEEP|IMITATES),"4d6",42,'X',110,16,25,75,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,NULL}, + {(ASLEEP|WANDERS),"3d6",35,'Y',50,11,20,80,0,20,0,0,0,0,0,0,0,0,0, + 0,0,0,0,NULL}, + {(ASLEEP|WAKENS|WANDERS),"1d7",21,'Z',8,5,14,69,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,NULL} }; void diff --git a/games/rogue/object.c b/games/rogue/object.c index a74bb3a7077..4801d086492 100644 --- a/games/rogue/object.c +++ b/games/rogue/object.c @@ -1,4 +1,4 @@ -/* $OpenBSD: object.c,v 1.3 1998/08/22 08:55:36 pjanzen Exp $ */ +/* $OpenBSD: object.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $ */ /* $NetBSD: object.c,v 1.3 1995/04/22 10:27:50 cgd Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)object.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: object.c,v 1.3 1998/08/22 08:55:36 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: object.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $"; #endif #endif /* not lint */ @@ -269,6 +269,7 @@ object_at(pack, row, col) object * get_letter_object(ch) + int ch; { object *obj; diff --git a/games/rogue/pack.c b/games/rogue/pack.c index 111a672bd84..fbc3f483b5d 100644 --- a/games/rogue/pack.c +++ b/games/rogue/pack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pack.c,v 1.4 2000/04/07 04:34:16 pjanzen Exp $ */ +/* $OpenBSD: pack.c,v 1.5 2001/08/10 18:32:46 pjanzen Exp $ */ /* $NetBSD: pack.c,v 1.3 1995/04/22 10:27:54 cgd Exp $ */ /* @@ -64,6 +64,7 @@ char *curse_message = "you can't, it appears to be cursed"; object * add_to_pack(obj, pack, condense) object *obj, *pack; + int condense; { object *op; diff --git a/games/rogue/rogue.h b/games/rogue/rogue.h index 6b40d6e27ce..d4713abc3ad 100644 --- a/games/rogue/rogue.h +++ b/games/rogue/rogue.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rogue.h,v 1.4 2001/08/10 18:17:56 pjanzen Exp $ */ +/* $OpenBSD: rogue.h,v 1.5 2001/08/10 18:32:46 pjanzen Exp $ */ /* $NetBSD: rogue.h,v 1.4 1995/04/24 12:25:04 cgd Exp $ */ /* @@ -252,7 +252,7 @@ typedef struct obj object; #define INIT_STR 16 #define INIT_EXPLEVEL 1 #define INIT_EXP 0 -#define INIT_PACK {0} +#define INIT_PACK {0, (char *)NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (struct obj *)NULL} #define INIT_GOLD 0 #define INIT_CHAR '@' #define INIT_MOVES 1250 diff --git a/games/rogue/room.c b/games/rogue/room.c index 09e130c93ec..d7f56ceeaf1 100644 --- a/games/rogue/room.c +++ b/games/rogue/room.c @@ -1,4 +1,4 @@ -/* $OpenBSD: room.c,v 1.3 1998/08/22 08:55:45 pjanzen Exp $ */ +/* $OpenBSD: room.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $ */ /* $NetBSD: room.c,v 1.3 1995/04/22 10:28:17 cgd Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)room.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: room.c,v 1.3 1998/08/22 08:55:45 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: room.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $"; #endif #endif /* not lint */ @@ -72,31 +72,31 @@ struct option { } options[NOPTS] = { { "Show position only at end of run (\"jump\"): ", - 1, (char **) 0, &jump + 1, (char **) NULL, &jump }, { "Follow turnings in passageways (\"passgo\"): ", - 1, (char **) 0, &passgo + 1, (char **) NULL, &passgo }, { "Don't print skull when killed (\"noskull\" or \"notombstone\"): ", - 1, (char **) 0, &no_skull + 1, (char **) NULL, &no_skull }, { "Ask player before saying 'Okay, bye-bye!' (\"askquit\"): ", - 1, (char **) 0, &ask_quit + 1, (char **) NULL, &ask_quit }, { "Name (\"name\"): ", - 0, &nick_name + 0, &nick_name, (boolean *) NULL }, { "Fruit (\"fruit\"): ", - 0, &fruit + 0, &fruit, (boolean *) NULL }, { "Save file (\"file\"): ", - 0, &save_file + 0, &save_file, (boolean *) NULL } }; diff --git a/games/rogue/score.c b/games/rogue/score.c index cc91908d864..c530ab2fb29 100644 --- a/games/rogue/score.c +++ b/games/rogue/score.c @@ -1,4 +1,4 @@ -/* $OpenBSD: score.c,v 1.5 2001/08/08 21:20:05 pjanzen Exp $ */ +/* $OpenBSD: score.c,v 1.6 2001/08/10 18:32:46 pjanzen Exp $ */ /* $NetBSD: score.c,v 1.5 1995/04/22 10:28:26 cgd Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: score.c,v 1.5 2001/08/08 21:20:05 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: score.c,v 1.6 2001/08/10 18:32:46 pjanzen Exp $"; #endif #endif /* not lint */ @@ -334,6 +334,7 @@ insert_score(scores, n_names, n_name, rank, n, monster, other) char *n_name; short rank, n; object *monster; + int other; { short i; char buf[128]; diff --git a/games/rogue/throw.c b/games/rogue/throw.c index e6e11dfe7e0..9ad22b9b149 100644 --- a/games/rogue/throw.c +++ b/games/rogue/throw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: throw.c,v 1.3 1998/08/22 08:55:49 pjanzen Exp $ */ +/* $OpenBSD: throw.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $ */ /* $NetBSD: throw.c,v 1.3 1995/04/22 10:28:32 cgd Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)throw.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: throw.c,v 1.3 1998/08/22 08:55:49 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: throw.c,v 1.4 2001/08/10 18:32:46 pjanzen Exp $"; #endif #endif /* not lint */ @@ -241,7 +241,7 @@ flop_weapon(weapon, row, col) dch = get_dungeon_char(row, col); if (mon) { mch = mvinch(row, col); - if (monster = object_at(&level_monsters, row, col)) { + if ((monster = object_at(&level_monsters, row, col))) { monster->trail_char = dch; } if ((mch < 'A') || (mch > 'Z')) { |