diff options
author | marcel <marcel@FreeBSD.org> | 1999-11-16 10:26:38 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 1999-11-16 10:26:38 +0000 |
commit | 520fff788fc8f2154247a6cff986abf634fdbb51 (patch) | |
tree | 839b85661e38597650d090e9cb482291451611bb /games/hack/hack.mklev.c | |
parent | 44fac3a89d25ca434f91c4f961a363ea590faae8 (diff) | |
download | FreeBSD-src-520fff788fc8f2154247a6cff986abf634fdbb51.zip FreeBSD-src-520fff788fc8f2154247a6cff986abf634fdbb51.tar.gz |
Add type int to those variables without a type. This is caused by the
frequent use of ``register var'' instead of ``register int var'' and
the removal of the register hint in the previous commit.
Diffstat (limited to 'games/hack/hack.mklev.c')
-rw-r--r-- | games/hack/hack.mklev.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/games/hack/hack.mklev.c b/games/hack/hack.mklev.c index 760c401..b9b3f04 100644 --- a/games/hack/hack.mklev.c +++ b/games/hack/hack.mklev.c @@ -41,7 +41,7 @@ makelevel() { struct mkroom *croom, *troom; unsigned tryct; - x,y; + int x,y; nroom = 0; doorindex = 0; @@ -290,7 +290,7 @@ struct mkroom *x,*y; coord finddpos(xl,yl,xh,yh) { coord ff; - x,y; + int x,y; x = (xl == xh) ? xl : (xl + rn2(xh-xl+1)); y = (yl == yh) ? yl : (yl + rn2(yh-yl+1)); @@ -315,7 +315,7 @@ gotit: /* see whether it is allowable to create a door at [x,y] */ okdoor(x,y) -x,y; +int x,y; { if(levl[x-1][y].typ == DOOR || levl[x+1][y].typ == DOOR || levl[x][y+1].typ == DOOR || levl[x][y-1].typ == DOOR || @@ -328,7 +328,7 @@ x,y; } dodoor(x,y,aroom) -x,y; +int x,y; struct mkroom *aroom; { if(doorindex >= DOORMAX) { @@ -341,12 +341,12 @@ struct mkroom *aroom; } dosdoor(x,y,aroom,type) -x,y; +int x,y; struct mkroom *aroom; -type; +int type; { struct mkroom *broom; - tmp; + int tmp; if(!IS_WALL(levl[x][y].typ)) /* avoid SDOORs with '+' as scrsym */ type = DOOR; @@ -369,8 +369,8 @@ maker(lowx,ddx,lowy,ddy) schar lowx,ddx,lowy,ddy; { struct mkroom *croom; - x, y, hix = lowx+ddx, hiy = lowy+ddy; - xlim = XLIM + secret, ylim = YLIM + secret; + int x, y, hix = lowx+ddx, hiy = lowy+ddy; + int xlim = XLIM + secret, ylim = YLIM + secret; if(nroom >= MAXNROFROOMS) return(0); if(lowx < XLIM) lowx = XLIM; @@ -443,7 +443,7 @@ chk: } makecorridors() { - a,b; + int a,b; nxcor = 0; for(a = 0; a < nroom-1; a++) @@ -465,13 +465,13 @@ makecorridors() { } join(a,b) -a,b; +int a,b; { coord cc,tt; - tx, ty, xx, yy; + int tx, ty, xx, yy; struct rm *crm; struct mkroom *croom, *troom; - dx, dy, dix, diy, cct; + int dx, dy, dix, diy, cct; croom = &rooms[a]; troom = &rooms[b]; @@ -552,7 +552,7 @@ a,b; /* do we have to change direction ? */ if(dy && dix > diy) { - ddx = (xx > tx) ? -1 : 1; + int ddx = (xx > tx) ? -1 : 1; crm = &levl[xx+ddx][yy]; if(!crm->typ || crm->typ == CORR || crm->typ == SCORR) { @@ -561,7 +561,7 @@ a,b; continue; } } else if(dx && diy > dix) { - ddy = (yy > ty) ? -1 : 1; + int ddy = (yy > ty) ? -1 : 1; crm = &levl[xx][yy+ddy]; if(!crm->typ || crm->typ == CORR || crm->typ == SCORR) { @@ -623,7 +623,7 @@ boolean with_trap; struct rm *rm; int vct = 8; coord dd; - dy,xx,yy; + int dy,xx,yy; struct trap *ttmp; if(doorindex < DOORMAX) @@ -666,7 +666,7 @@ boolean with_trap; /* make a trap somewhere (in croom if mazeflag = 0) */ mktrap(num,mazeflag,croom) -num,mazeflag; +int num,mazeflag; struct mkroom *croom; { struct trap *ttmp; |