summaryrefslogtreecommitdiffstats
path: root/rogue/level.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-12 11:45:01 +0000
committerlukem <lukem@NetBSD.org>1997-10-12 11:45:01 +0000
commita0041450da452d421fa15f352d533a000c2e7921 (patch)
tree500a4c4a314b36a49f50552293c66aa268eb59f2 /rogue/level.c
parent8d2dd1244517d9cf4b4e1fd9a4914c5496e8dfac (diff)
downloadbsdgames-darwin-a0041450da452d421fa15f352d533a000c2e7921.tar.gz
bsdgames-darwin-a0041450da452d421fa15f352d533a000c2e7921.tar.zst
bsdgames-darwin-a0041450da452d421fa15f352d533a000c2e7921.zip
WARNSify (not an insignificant task...)
Diffstat (limited to 'rogue/level.c')
-rw-r--r--rogue/level.c75
1 files changed, 49 insertions, 26 deletions
diff --git a/rogue/level.c b/rogue/level.c
index b298bb04..42fff035 100644
--- a/rogue/level.c
+++ b/rogue/level.c
@@ -1,4 +1,4 @@
-/* $NetBSD: level.c,v 1.3 1995/04/22 10:27:37 cgd Exp $ */
+/* $NetBSD: level.c,v 1.4 1997/10/12 11:45:16 lukem Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -36,11 +36,12 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)level.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: level.c,v 1.3 1995/04/22 10:27:37 cgd Exp $";
+__RCSID("$NetBSD: level.c,v 1.4 1997/10/12 11:45:16 lukem Exp $");
#endif
#endif /* not lint */
@@ -93,16 +94,14 @@ long level_points[MAX_EXP_LEVEL] = {
short random_rooms[MAXROOMS] = {3, 7, 5, 2, 0, 6, 1, 4, 8};
-extern boolean being_held, wizard, detect_monster;
-extern boolean see_invisible;
-extern short bear_trap, levitate, extra_hp, less_hp, cur_room;
-
+void
make_level()
{
short i, j;
short must_1, must_2, must_3;
boolean big_room;
+ must_2 = must_3 = 0;
if (cur_level < LAST_DUNGEON) {
cur_level++;
}
@@ -194,14 +193,16 @@ make_level()
}
}
+void
make_room(rn, r1, r2, r3)
-short rn, r1, r2, r3;
+ short rn, r1, r2, r3;
{
short left_col, right_col, top_row, bottom_row;
short width, height;
short row_offset, col_offset;
short i, j, ch;
+ left_col = right_col = top_row = bottom_row = 0;
switch(rn) {
case 0:
left_col = 0;
@@ -303,8 +304,9 @@ END:
rooms[rn].right_col = right_col;
}
+int
connect_rooms(room1, room2)
-short room1, room2;
+ short room1, room2;
{
short row1, col1, row2, col2, dir;
@@ -350,6 +352,7 @@ short room1, room2;
return(1);
}
+void
clear_level()
{
short i, j;
@@ -376,10 +379,11 @@ clear_level()
clear();
}
+void
put_door(rm, dir, row, col)
-room *rm;
-short dir;
-short *row, *col;
+ room *rm;
+ short dir;
+ short *row, *col;
{
short wall_width;
@@ -413,8 +417,9 @@ short *row, *col;
rm->doors[dir/2].door_col = *col;
}
+void
draw_simple_passage(row1, col1, row2, col2, dir)
-short row1, col1, row2, col2, dir;
+ short row1, col1, row2, col2, dir;
{
short i, middle, t;
@@ -454,16 +459,21 @@ short row1, col1, row2, col2, dir;
}
}
+int
same_row(room1, room2)
+ int room1, room2;
{
return((room1 / 3) == (room2 / 3));
}
+int
same_col(room1, room2)
+ int room1, room2;
{
return((room1 % 3) == (room2 % 3));
}
+void
add_mazes()
{
short i, j;
@@ -495,6 +505,7 @@ add_mazes()
}
}
+void
fill_out_level()
{
short i, rn;
@@ -515,9 +526,10 @@ fill_out_level()
}
}
+void
fill_it(rn, do_rec_de)
-int rn;
-boolean do_rec_de;
+ int rn;
+ boolean do_rec_de;
{
short i, tunnel_dir, door_dir, drow, dcol;
short target_room, rooms_found = 0;
@@ -576,10 +588,11 @@ boolean do_rec_de;
}
}
+void
recursive_deadend(rn, offsets, srow, scol)
-short rn;
-short *offsets;
-short srow, scol;
+ short rn;
+ short *offsets;
+ short srow, scol;
{
short i, de;
short drow, dcol, tunnel_dir;
@@ -613,9 +626,9 @@ short srow, scol;
boolean
mask_room(rn, row, col, mask)
-short rn;
-short *row, *col;
-unsigned short mask;
+ short rn;
+ short *row, *col;
+ unsigned short mask;
{
short i, j;
@@ -631,8 +644,9 @@ unsigned short mask;
return(0);
}
+void
make_maze(r, c, tr, br, lc, rc)
-short r, c, tr, br, lc, rc;
+ short r, c, tr, br, lc, rc;
{
char dirs[4];
short i, t;
@@ -696,8 +710,9 @@ short r, c, tr, br, lc, rc;
}
}
+void
hide_boxed_passage(row1, col1, row2, col2, n)
-short row1, col1, row2, col2, n;
+ short row1, col1, row2, col2, n;
{
short i, j, t;
short row, col, row_cut, col_cut;
@@ -731,8 +746,9 @@ short row1, col1, row2, col2, n;
}
}
+void
put_player(nr)
-short nr; /* try not to put in this room */
+ short nr; /* try not to put in this room */
{
short rn = nr, misses;
short row, col;
@@ -763,6 +779,7 @@ short nr; /* try not to put in this room */
mvaddch(rogue.row, rogue.col, rogue.fchar);
}
+int
drop_check()
{
if (wizard) {
@@ -779,6 +796,7 @@ drop_check()
return(0);
}
+int
check_up()
{
if (!wizard) {
@@ -801,9 +819,10 @@ check_up()
return(0);
}
+void
add_exp(e, promotion)
-int e;
-boolean promotion;
+ int e;
+ boolean promotion;
{
char mbuf[40];
short new_exp;
@@ -832,8 +851,9 @@ boolean promotion;
}
}
+int
get_exp_level(e)
-long e;
+ long e;
{
short i;
@@ -845,6 +865,7 @@ long e;
return(i+1);
}
+int
hp_raise()
{
int hp;
@@ -853,6 +874,7 @@ hp_raise()
return(hp);
}
+void
show_average_hp()
{
char mbuf[80];
@@ -872,6 +894,7 @@ show_average_hp()
message(mbuf, 0);
}
+void
mix_random_rooms()
{
short i, t;