-/* NetHack 3.6 mkmaze.c $NHDT-Date: 1461571093 2016/04/25 07:58:13 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.47 $ */
+/* NetHack 3.6 mkmaze.c $NHDT-Date: 1469930897 2016/07/31 02:08:17 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.50 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
iswall(x, y)
int x, y;
{
- register int type;
+ int type;
if (!isok(x, y))
return 0;
int x1, y1, x2, y2;
{
uchar type;
- register int x, y;
+ int x, y;
struct rm *lev;
/* sanity check on incoming variables */
int x1, y1, x2, y2;
{
uchar type;
- register int x,y;
+ int x, y;
struct rm *lev;
int FDECL((*loc_f), (int, int));
int bits;
STATIC_OVL boolean
okay(x, y, dir)
int x, y;
-register int dir;
+int dir;
{
mz_move(x, y, dir);
mz_move(x, y, dir);
void
fixup_special()
{
- register lev_region *r = lregions;
+ lev_region *r = lregions;
struct d_level lev;
- register int x, y;
+ int x, y;
struct mkroom *croom;
boolean added_branch = FALSE;
create_secret_door(croom, W_ANY);
} else if (on_level(&u.uz, &orcus_level)) {
- register struct monst *mtmp, *mtmp2;
+ struct monst *mtmp, *mtmp2;
/* it's a ghost town, get rid of shopkeepers */
for (mtmp = fmon; mtmp; mtmp = mtmp2) {
void
makemaz(s)
-register const char *s;
+const char *s;
{
int x, y;
char protofile[20];
int x, y;
schar typ;
{
- register int q, a, dir;
+ int q, a, dir;
int dirs[4];
if (!typ) {
&& levl[cc->x][cc->y].typ
!= (level.flags.corrmaze ? CORR : ROOM));
if (cpt >= 100) {
- register int x, y;
+ int x, y;
+
/* last try */
for (x = 0; x < (x_maze_max >> 1) - 1; x++)
for (y = 0; y < (y_maze_max >> 1) - 1; y++) {
void
bound_digging()
{
- register int x, y;
- register unsigned typ;
- register struct rm *lev;
+ int x, y;
+ unsigned typ;
+ struct rm *lev;
boolean found, nonwall;
int xmin, xmax, ymin, ymax;
for (n = rn2(3) + 2; n; n--) {
xchar x = rn1(COLNO - 4, 3);
xchar y = rn1(ROWNO - 4, 3);
+
if (levl[x][y].typ == LAVAPOOL) {
NhRegion *r = create_gas_cloud(x, y, 4 + rn2(5), rn1(10, 5));
+
clear_heros_fault(r);
snd = TRUE;
if (distu(x, y) < 15)
* other source files, but they are all so nicely encapsulated here.
*/
-#ifdef DEBUG
-/* to ease the work of debuggers at this stage */
-#define register
-#endif
-
#define CONS_OBJ 0
#define CONS_MON 1
#define CONS_HERO 2
movebubbles()
{
static boolean up;
- register struct bubble *b;
- register int x, y, i, j;
+ struct bubble *b;
+ int x, y, i, j;
struct trap *btrap;
static const struct rm water_pos = { cmap_to_glyph(S_water), WATER, 0, 0,
0, 0, 0, 0, 0, 0 };
*/
up = !up;
for (b = up ? bbubbles : ebubbles; b; b = up ? b->next : b->prev) {
- register int rx = rn2(3), ry = rn2(3);
+ int rx = rn2(3), ry = rn2(3);
mv_bubble(b, b->dx + 1 - (!b->dx ? rx : (rx ? 1 : 0)),
b->dy + 1 - (!b->dy ? ry : (ry ? 1 : 0)), FALSE);
void
water_friction()
{
- register int x, y, dx, dy;
- register boolean eff = FALSE;
+ int x, y, dx, dy;
+ boolean eff = FALSE;
if (Swimming && rn2(4))
return; /* natural swimmers have advantage */
save_waterlevel(fd, mode)
int fd, mode;
{
- register struct bubble *b;
+ struct bubble *b;
if (!Is_waterlevel(&u.uz) && !Is_airlevel(&u.uz))
return;
void
restore_waterlevel(fd)
-register int fd;
+int fd;
{
- register struct bubble *b = (struct bubble *) 0, *btmp;
- register int i;
- int n;
+ struct bubble *b = (struct bubble *) 0, *btmp;
+ int i, n;
if (!Is_waterlevel(&u.uz) && !Is_airlevel(&u.uz))
return;
waterbody_name(x, y)
xchar x, y;
{
- register struct rm *lev;
+ struct rm *lev;
schar ltyp;
if (!isok(x, y))
STATIC_OVL void
setup_waterlevel()
{
- register int x, y;
- register int xskip, yskip;
- register int water_glyph = cmap_to_glyph(S_water);
- register int air_glyph = cmap_to_glyph(S_air);
+ int x, y;
+ int xskip, yskip;
+ int water_glyph = cmap_to_glyph(S_water),
+ air_glyph = cmap_to_glyph(S_air);
/* ouch, hardcoded... */
STATIC_OVL void
unsetup_waterlevel()
{
- register struct bubble *b, *bb;
+ struct bubble *b, *bb;
/* free bubbles */
STATIC_OVL void
mk_bubble(x, y, n)
-register int x, y, n;
+int x, y, n;
{
/*
* These bit masks make visually pleasing bubbles on a normal aspect
* in situ, either. The first two elements tell the dimensions of
* the bubble's bounding box.
*/
- static uchar bm2[] = { 2, 1, 0x3 }, bm3[] = { 3, 2, 0x7, 0x7 },
+ static uchar bm2[] = { 2, 1, 0x3 },
+ bm3[] = { 3, 2, 0x7, 0x7 },
bm4[] = { 4, 3, 0x6, 0xf, 0x6 },
bm5[] = { 5, 3, 0xe, 0x1f, 0xe },
bm6[] = { 6, 4, 0x1e, 0x3f, 0x3f, 0x1e },
bm7[] = { 7, 4, 0x3e, 0x7f, 0x7f, 0x3e },
bm8[] = { 8, 4, 0x7e, 0xff, 0xff, 0x7e },
*bmask[] = { bm2, bm3, bm4, bm5, bm6, bm7, bm8 };
- register struct bubble *b;
+ struct bubble *b;
if (x >= bxmax || y >= bymax)
return;
*/
STATIC_OVL void
mv_bubble(b, dx, dy, ini)
-register struct bubble *b;
-register int dx, dy;
-register boolean ini;
+struct bubble *b;
+int dx, dy;
+boolean ini;
{
- register int x, y, i, j, colli = 0;
+ int x, y, i, j, colli = 0;
struct container *cons, *ctemp;
/* clouds move slowly */