Make SINKS unconditional.

This commit is contained in:
Sean Hunt
2015-02-13 23:30:38 -05:00
parent b066b7c170
commit 5ee71d2757
23 changed files with 6 additions and 92 deletions

View File

@@ -876,11 +876,9 @@ wiz_map_levltyp(VOID_ARGS)
if (level.flags.nfountains) Sprintf(eos(dsc), " %c:%d",
defsyms[S_fountain].sym,
(int)level.flags.nfountains);
#ifdef SINKS
if (level.flags.nsinks) Sprintf(eos(dsc), " %c:%d",
defsyms[S_sink].sym,
(int)level.flags.nsinks);
#endif
if (level.flags.has_vault) Strcat(dsc, " vault");
if (level.flags.has_shop) Strcat(dsc, " shop");
if (level.flags.has_temple) Strcat(dsc, " temple");

View File

@@ -542,11 +542,9 @@ int ttyp;
SET_FOUNTAIN_WARNED(x,y); /* force dryup */
dryup(x, y, madeby_u);
return;
#ifdef SINKS
} else if (IS_SINK(lev->typ)) {
breaksink(x, y);
return;
#endif
} else if (lev->typ == DRAWBRIDGE_DOWN ||
(is_drawbridge_wall(x, y) >= 0)) {
int bx = x, by = y;
@@ -1533,11 +1531,9 @@ char *msg;
} else if (is_pool(cc->x,cc->y)) {
} else if (IS_GRAVE(ltyp)) {
#endif
#ifdef SINKS
} else if (IS_SINK(ltyp)) {
Strcpy(msg, "A tangled mass of plumbing remains below the sink.");
return FALSE;
#endif
} else if ((cc->x == xupladder && cc->y == yupladder) || /* "ladder up" */
(cc->x == xdnladder && cc->y == ydnladder)) { /* "ladder down" */
Strcpy(msg, "The ladder is unaffected.");

View File

@@ -8,10 +8,8 @@
#include "hack.h"
#include "lev.h"
#ifdef SINKS
STATIC_DCL void FDECL(trycall, (struct obj *));
STATIC_DCL void FDECL(dosinkring, (struct obj *));
#endif /* SINKS */
STATIC_PTR int FDECL(drop, (struct obj *));
STATIC_PTR int NDECL(wipeoff);
@@ -244,7 +242,6 @@ doaltarobj(obj) /* obj is an object dropped on an altar */
}
}
#ifdef SINKS
STATIC_OVL
void
trycall(obj)
@@ -396,7 +393,6 @@ giveback:
} else
useup(obj);
}
#endif
/* some common tests when trying to drop or throw items */
boolean
@@ -475,13 +471,11 @@ register struct obj *obj;
mbodypart(u.ustuck, STOMACH));
}
} else {
#ifdef SINKS
if((obj->oclass == RING_CLASS || obj->otyp == MEAT_RING) &&
IS_SINK(levl[u.ux][u.uy].typ)) {
dosinkring(obj);
return(1);
}
#endif
if (!can_reach_floor(TRUE)) {
/* we might be levitating due to #invoke Heart of Ahriman;
if so, levitation would end during call to freeinv()

View File

@@ -1001,9 +1001,7 @@ static struct qmchoices {
{PM_HOUSECAT, 0, PM_DOG, M_AP_MONSTER},
{PM_LARGE_CAT, 0, PM_LARGE_DOG, M_AP_MONSTER},
{PM_HOUSECAT, 0, PM_GIANT_RAT, M_AP_MONSTER},
#ifdef SINKS
{0, S_DOG, SINK, M_AP_FURNITURE}, /* sorry, no fire hydrants in NetHack */
#endif
{0, 0, TRIPE_RATION, M_AP_OBJECT}, /* leave this at end */
};

View File

@@ -688,9 +688,7 @@ char *buf;
else if (IS_THRONE(maploc->typ)) what = "a throne";
else if (IS_FOUNTAIN(maploc->typ)) what = "a fountain";
else if (IS_GRAVE(maploc->typ)) what = "a headstone";
#ifdef SINKS
else if (IS_SINK(maploc->typ)) what = "a sink";
#endif
else if (IS_ALTAR(maploc->typ)) what = "an altar";
else if (IS_DRAWBRIDGE(maploc->typ)) what = "a drawbridge";
else if (maploc->typ == STAIRS) what = "the stairs";
@@ -1054,7 +1052,6 @@ dokick()
}
goto ouch;
}
#ifdef SINKS
if(IS_SINK(maploc->typ)) {
int gend = poly_gender();
short washerndx = (gend == 1 || (gend == 2 && rn2(2))) ?
@@ -1107,7 +1104,6 @@ dokick()
}
goto ouch;
}
#endif
if (maploc->typ == STAIRS || maploc->typ == LADDER ||
IS_STWALL(maploc->typ)) {
if(!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN)

View File

@@ -169,11 +169,7 @@ const struct symdef defsyms[MAXPCHARS] = {
{'_', "altar", C(CLR_GRAY)}, /* altar */
{'|', "grave", C(CLR_GRAY)}, /* grave */
{'\\', "opulent throne",C(HI_GOLD)}, /* throne */
#ifdef SINKS
{'#', "sink", C(CLR_GRAY)}, /* sink */
#else
{'#', "", C(CLR_GRAY)}, /* sink */
#endif
/*30*/ {'{', "fountain", C(CLR_BLUE)}, /* fountain */
{'}', "water", C(CLR_BLUE)}, /* pool */
{'.', "ice", C(CLR_CYAN)}, /* ice */

View File

@@ -504,7 +504,6 @@ register struct obj *obj;
dryup(u.ux, u.uy, TRUE);
}
#ifdef SINKS
void
breaksink(x,y)
int x, y;
@@ -610,6 +609,5 @@ drinksink()
rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot");
}
}
#endif /* SINKS */
/*fountain.c*/

View File

@@ -10,9 +10,7 @@
STATIC_DCL void NDECL(maybe_wail);
STATIC_DCL int NDECL(moverock);
STATIC_DCL int FDECL(still_chewing,(XCHAR_P,XCHAR_P));
#ifdef SINKS
STATIC_DCL void NDECL(dosinkfall);
#endif
STATIC_DCL boolean FDECL(findtravelpath, (BOOLEAN_P));
STATIC_DCL boolean FDECL(trapmove, (int,int,struct trap *));
STATIC_DCL void NDECL(switch_terrain);
@@ -468,7 +466,6 @@ register xchar ox, oy;
newsym(ox, oy);
}
#ifdef SINKS
static NEARDATA const char fell_on_sink[] = "fell onto a sink";
STATIC_OVL void
@@ -549,7 +546,6 @@ dosinkfall()
through float_down(), but make sure BFlying is up to date */
float_vs_flight();
}
#endif
boolean
may_dig(x,y)
@@ -1767,10 +1763,8 @@ boolean pick;
if (pooleffects(TRUE)) goto spotdone;
check_special_room(FALSE);
#ifdef SINKS
if(IS_SINK(levl[u.ux][u.uy].typ) && Levitation)
dosinkfall();
#endif
if (!in_steed_dismounting) { /* if dismounting, we'll check again later */
boolean pit;

View File

@@ -2364,10 +2364,8 @@ char *buf;
cmap = S_ice; /* "ice" */
else if (is_pool(x,y))
dfeature = "pool of water";
#ifdef SINKS
else if (IS_SINK(ltyp))
cmap = S_sink; /* "sink" */
#endif
else if (IS_ALTAR(ltyp)) {
Sprintf(altbuf, "%saltar to %s (%s)",
((lev->altarmask & AM_SHRINE) &&

View File

@@ -20,9 +20,7 @@
STATIC_DCL void FDECL(mkfount,(int,struct mkroom *));
#ifdef SINKS
STATIC_DCL void FDECL(mksink,(struct mkroom *));
#endif
STATIC_DCL void FDECL(mkaltar,(struct mkroom *));
STATIC_DCL void FDECL(mkgrave,(struct mkroom *));
STATIC_DCL void NDECL(makevtele);
@@ -790,9 +788,7 @@ skip0:
if(Is_rogue_level(&u.uz)) goto skip_nonrogue;
#endif
if(!rn2(10)) mkfount(0,croom);
#ifdef SINKS
if(!rn2(60)) mksink(croom);
#endif
if(!rn2(60)) mkaltar(croom);
x = 80 - (depth(&u.uz) * 2);
if (x < 2) x = 2;
@@ -1347,7 +1343,6 @@ register struct mkroom *croom;
level.flags.nfountains++;
}
#ifdef SINKS
STATIC_OVL void
mksink(croom)
register struct mkroom *croom;
@@ -1366,8 +1361,6 @@ register struct mkroom *croom;
level.flags.nsinks++;
}
#endif /* SINKS */
STATIC_OVL void
mkaltar(croom)

View File

@@ -431,11 +431,8 @@ struct obj *obj; /* missile (or stack providing it) */
/* missile might hit iron bars */
|| (levl[bhitpos.x+dx][bhitpos.y+dy].typ == IRONBARS &&
hits_bars(&singleobj, bhitpos.x, bhitpos.y, !rn2(5), 0))
#ifdef SINKS
/* Thrown objects "sink" */
|| IS_SINK(levl[bhitpos.x][bhitpos.y].typ)
#endif
) {
|| IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) {
if (singleobj) /* hits_bars might have destroyed it */
(void) drop_throw(singleobj, 0, bhitpos.x, bhitpos.y);
break;

View File

@@ -275,12 +275,10 @@ int force;
if (cansee(x,y))
pline_The("fountain falls into a chasm.");
goto do_pit;
#ifdef SINKS
case SINK :
if (cansee(x,y))
pline_The("kitchen sink falls into a chasm.");
goto do_pit;
#endif
case ALTAR :
if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) break;

View File

@@ -2913,7 +2913,6 @@ wiztrap:
newsym(x, y);
return(&zeroobj);
}
# ifdef SINKS
if (!BSTRCMPI(bp, p-4, "sink")) {
lev->typ = SINK;
level.flags.nsinks++;
@@ -2921,7 +2920,6 @@ wiztrap:
newsym(x, y);
return &zeroobj;
}
# endif
/* ("water" matches "potion of water" rather than terrain) */
if (!BSTRCMPI(bp, p-4, "pool") || !BSTRCMPI(bp, p-4, "moat")) {
lev->typ = !BSTRCMPI(bp, p-4, "pool") ? POOL : MOAT;

View File

@@ -399,7 +399,6 @@ dodrink()
return 1;
}
}
#ifdef SINKS
/* Or a kitchen sink? */
if (IS_SINK(levl[u.ux][u.uy].typ) &&
/* not as low as floor level but similar restrictions apply */
@@ -409,7 +408,6 @@ dodrink()
return 1;
}
}
#endif
/* Or are you surrounded by water? */
if (Underwater && !u.uswallow) {

View File

@@ -126,11 +126,9 @@ dosit()
(void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst);
if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS)
(void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst);
#ifdef SINKS
} else if(IS_SINK(typ)) {
You(sit_message, defsyms[S_sink].explanation);
Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside");
#endif
} else if(IS_ALTAR(typ)) {
You(sit_message, defsyms[S_altar].explanation);
altar_wrath(u.ux, u.uy);

View File

@@ -51,7 +51,6 @@ dosounds()
};
You_hear1(fountain_msg[rn2(3)+hallu]);
}
#ifdef SINK
if (level.flags.nsinks && !rn2(300)) {
static const char * const sink_msg[3] = {
"a slow drip.",
@@ -60,7 +59,6 @@ dosounds()
};
You_hear1(sink_msg[rn2(2)+hallu]);
}
#endif
if (level.flags.has_court && !rn2(200)) {
static const char * const throne_msg[4] = {
"the tones of courtly conversation.",

View File

@@ -3160,10 +3160,8 @@ struct obj **pobj; /* object tossed/used, set to NULL
(is_pool(bhitpos.x, bhitpos.y) ||
is_lava(bhitpos.x, bhitpos.y)))
break;
#ifdef SINKS
if(IS_SINK(typ) && weapon != FLASHED_LIGHT)
break; /* physical objects fall onto sink */
#endif
}
/* limit range of ball so hero won't make an invalid move */
if (weapon == THROWN_WEAPON && range > 0 &&
@@ -3273,10 +3271,8 @@ int dx, dy;
}
tmp_at(bhitpos.x, bhitpos.y);
delay_output();
#ifdef SINKS
if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ))
break; /* boomerang falls on sink */
#endif
/* ct==0, initial position, we want next delta to be same;
ct==5, opposite position, repeat delta undoes first one */
if (ct % 5 != 0) i += (counterclockwise ? -1 : 1);