From: Sean Hunt Date: Sat, 14 Feb 2015 04:30:38 +0000 (-0500) Subject: Make SINKS unconditional. X-Git-Tag: NetHack-3.6.0_RC01~669 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ee71d2757b70b18ceaedfb3ce8b2e4747cc006c;p=nethack Make SINKS unconditional. --- diff --git a/dat/oracles.txt b/dat/oracles.txt index d307c7a9f..d4d5ae250 100644 --- a/dat/oracles.txt +++ b/dat/oracles.txt @@ -48,7 +48,7 @@ It is well known that wily shopkeepers raise their prices whene'er they espy the garish apparel of the approaching tourist or the countenance of a disfavored patron. They favor the gentle of manner and the fair of face. The boor may expect unprofitable transactions. ------ SINKS +----- The cliche of the kitchen sink swallowing any unfortunate rings that contact its pernicious surface reflecteth greater truth than many homilies, yet even so, few have developed the skill to identify enchanted rings by the diff --git a/include/config.h b/include/config.h index 3e06382b8..5fb8bd9a8 100644 --- a/include/config.h +++ b/include/config.h @@ -418,7 +418,6 @@ typedef unsigned char uchar; /* display features */ #define LOADSYMSETS /* loadable symbol sets; only default symbols w/o this */ /* dungeon features */ -#define SINKS /* Kitchen sinks - Janet Walz */ /* dungeon levels */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ #define REINCARNATION /* Special Rogue-like levels */ diff --git a/include/extern.h b/include/extern.h index 866da61ec..8ffac991d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -784,10 +784,8 @@ E void FDECL(gush, (int,int,genericptr_t)); E void FDECL(dryup, (XCHAR_P,XCHAR_P, BOOLEAN_P)); E void NDECL(drinkfountain); E void FDECL(dipfountain, (struct obj *)); -#ifdef SINKS E void FDECL(breaksink, (int,int)); E void NDECL(drinksink); -#endif /* ### hack.c ### */ diff --git a/src/cmd.c b/src/cmd.c index 78981c274..2abb73a07 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -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"); diff --git a/src/dig.c b/src/dig.c index ae4571218..dee64940c 100644 --- a/src/dig.c +++ b/src/dig.c @@ -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."); diff --git a/src/do.c b/src/do.c index 1f51c14cc..35b0b9c40 100644 --- a/src/do.c +++ b/src/do.c @@ -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() diff --git a/src/dogmove.c b/src/dogmove.c index 6baa47651..795905393 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -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 */ }; diff --git a/src/dokick.c b/src/dokick.c index 1b122e799..d0b20a604 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -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) diff --git a/src/drawing.c b/src/drawing.c index 2d104be20..80e82133f 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -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 */ diff --git a/src/fountain.c b/src/fountain.c index 14fb6707e..c49efac69 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -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*/ diff --git a/src/hack.c b/src/hack.c index fc62e71a4..1bbfa1977 100644 --- a/src/hack.c +++ b/src/hack.c @@ -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; diff --git a/src/invent.c b/src/invent.c index c6eea5989..90cb9ff1c 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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) && diff --git a/src/mklev.c b/src/mklev.c index 8e3b267d1..1d895dc2c 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -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) diff --git a/src/mthrowu.c b/src/mthrowu.c index 02339c0ad..8a9ed6736 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -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; diff --git a/src/music.c b/src/music.c index 4491b8909..94f6282d1 100644 --- a/src/music.c +++ b/src/music.c @@ -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; diff --git a/src/objnam.c b/src/objnam.c index 94c2f4fb6..e1b00a777 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -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; diff --git a/src/potion.c b/src/potion.c index 396dbfa53..7a4014635 100644 --- a/src/potion.c +++ b/src/potion.c @@ -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) { diff --git a/src/sit.c b/src/sit.c index c91a96a24..72c94c56b 100644 --- a/src/sit.c +++ b/src/sit.c @@ -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); diff --git a/src/sounds.c b/src/sounds.c index bd20178c0..efb496372 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -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.", diff --git a/src/zap.c b/src/zap.c index 41723a566..c19557fd0 100644 --- a/src/zap.c +++ b/src/zap.c @@ -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); diff --git a/util/lev_main.c b/util/lev_main.c index d192e1e3e..fa539f5e2 100644 --- a/util/lev_main.c +++ b/util/lev_main.c @@ -494,12 +494,7 @@ char c; case '{' : return(FOUNTAIN); case '\\' : return(THRONE); case 'K' : -#ifdef SINKS return(SINK); -#else - yywarning("Sinks are not allowed in this version! Ignoring..."); - return(ROOM); -#endif case '}' : return(MOAT); case 'P' : return(POOL); case 'L' : return(LAVAPOOL); diff --git a/util/makedefs.c b/util/makedefs.c index 57493448b..6ddff76c0 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -990,9 +990,6 @@ make_version() /* levels and/or topology (0..4) */ #ifdef REINCARNATION | (1L << 1) -#endif -#ifdef SINKS - | (1L << 2) #endif /* monsters (5..9) */ #ifdef MAIL @@ -1329,9 +1326,6 @@ static const char *build_opts[] = { #ifdef SHELL "shell command", #endif -#ifdef SINKS - "sinks", -#endif #ifdef SUSPEND "suspend command", #endif @@ -1664,9 +1658,6 @@ h_filter(line) if (*line == '#') return TRUE; /* ignore comment lines */ if (sscanf(line, "----- %s", tag) == 1) { skip = FALSE; -#ifndef SINKS - if (!strcmp(tag, "SINKS")) skip = TRUE; -#endif } else if (skip && !strncmp(line, "-----", 5)) skip = FALSE; return skip; diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 97fc7acc4..19872f96a 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 tilemap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */ /* NetHack 3.5 tilemap.c $Date: 2009/05/06 10:59:02 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */ /* NetHack may be freely redistributed. See license for details. */ @@ -172,23 +172,10 @@ int set, entry; tilenum = 0; /* set-relative number */ for (i = 0; i < (MAXPCHARS - MAXEXPCHARS); i++) { if (set == OTH_GLYPH && tilenum == entry) { - if (*defsyms[i].explanation) + if (*defsyms[i].explanation) { return defsyms[i].explanation; - else { - /* if SINKS are turned off, this - * string won't be there (and can't be there - * to prevent symbol-identification and - * special-level mimic appearances from - * thinking the items exist) - */ - switch (i) { - case S_sink: - Sprintf(buf, "sink"); - break; - default: - Sprintf(buf, "cmap %d", tilenum); - break; - } + } else { + Sprintf(buf, "cmap %d", tilenum); return buf; } }