-/* $NetBSD: level.c,v 1.3 1995/04/22 10:27:37 cgd Exp $ */
+/* $NetBSD: level.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
* 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.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
short cur_level = 0;
short max_level = 1;
short cur_room;
-char *new_level_message = 0;
+const char *new_level_message = 0;
short party_room = NO_ROOM;
short r_de;
-long level_points[MAX_EXP_LEVEL] = {
+const long level_points[MAX_EXP_LEVEL] = {
10L,
20L,
40L,
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++;
}
}
}
+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;
rooms[rn].right_col = right_col;
}
+int
connect_rooms(room1, room2)
-short room1, room2;
+ short room1, room2;
{
short row1, col1, row2, col2, dir;
return(1);
}
+void
clear_level()
{
short i, j;
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;
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;
}
}
+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;
}
}
+void
fill_out_level()
{
short i, rn;
}
}
+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;
}
}
+void
recursive_deadend(rn, offsets, srow, scol)
-short rn;
-short *offsets;
-short srow, scol;
+ short rn;
+ const short *offsets;
+ short srow, scol;
{
short i, de;
short drow, dcol, tunnel_dir;
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;
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;
}
}
+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;
}
}
+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;
mvaddch(rogue.row, rogue.col, rogue.fchar);
}
+int
drop_check()
{
if (wizard) {
return(0);
}
+int
check_up()
{
if (!wizard) {
return(0);
}
+void
add_exp(e, promotion)
-int e;
-boolean promotion;
+ int e;
+ boolean promotion;
{
char mbuf[40];
short new_exp;
}
}
+int
get_exp_level(e)
-long e;
+ long e;
{
short i;
return(i+1);
}
+int
hp_raise()
{
int hp;
return(hp);
}
+void
show_average_hp()
{
char mbuf[80];
message(mbuf, 0);
}
+void
mix_random_rooms()
{
short i, t;