]> granicus.if.org Git - nethack/commitdiff
Make SINKS unconditional.
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Sat, 14 Feb 2015 04:30:38 +0000 (23:30 -0500)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Sat, 28 Feb 2015 00:33:06 +0000 (19:33 -0500)
23 files changed:
dat/oracles.txt
include/config.h
include/extern.h
src/cmd.c
src/dig.c
src/do.c
src/dogmove.c
src/dokick.c
src/drawing.c
src/fountain.c
src/hack.c
src/invent.c
src/mklev.c
src/mthrowu.c
src/music.c
src/objnam.c
src/potion.c
src/sit.c
src/sounds.c
src/zap.c
util/lev_main.c
util/makedefs.c
win/share/tilemap.c

index d307c7a9fb1ca349d1548de59bba10ec70ec61db..d4d5ae2505545f9b9011e112d5d955e8760248c1 100644 (file)
@@ -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
index 3e06382b8649769e186f8423c652f76e44698f27..5fb8bd9a870cfd7a2d62fc16f36d8435653ee833 100644 (file)
@@ -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 */
index 866da61ec031ec4f3054a6cad09e4161c17f08f3..8ffac991d73aa00f0cef142597710b1fdb410a89 100644 (file)
@@ -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 ### */
 
index 78981c274de28f409d4fd1ff7f18da96e28e6b8a..2abb73a078b464a39a914f546e47b9c4b5180ed6 100644 (file)
--- 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");
index ae4571218658cc0b82277ca56e60bd012dd49af0..dee64940c4d72e32163b5f851c57c558a823cb47 100644 (file)
--- 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.");
index 1f51c14ccd25b55f378ecc0a29cb529b70e07f91..35b0b9c407efca457e8d71cf45a0b84ff05c479c 100644 (file)
--- 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()
index 6baa47651a7f8f2ec00a43872d5a714f243b6123..79590539309c51a8b21e95a86603cb01bddf1b3a 100644 (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 */
 };
 
index 1b122e799975f6eee492f49ee50a60533a7a5389..d0b20a604469ac72f3b9e5f0a08bdc9331c27814 100644 (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)
index 2d104be20ea6ab3cb168bed2037c66e8f29b35c3..80e82133f7b604f3e5af0e39df6653f59f08b658 100644 (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 */
index 14fb6707ece5efb1099938dcc48b91d74dc6e06f..c49efac69ac5328610072aafc5ae03bb74e76573 100644 (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*/
index fc62e71a43eaa432e8f6b9ca4beee8daef22fcf6..1bbfa1977b82256ec6e8040cc87eece2c5d1ab55 100644 (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;
 
index c6eea5989b971b9120b7eacd34ac8435a49de970..90cb9ff1cad5746aa1c6c4353f14dc78474563bb 100644 (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) &&
index 8e3b267d1b6e16e6119a7eae5cc7ad89e6b33fa4..1d895dc2c05a852edf3cbe31fba7b12740e5d3d6 100644 (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)
index 02339c0ad428d45415868c62aab7adf4b94bc649..8a9ed67368439391bb920fcae603ed0a40c3c015 100644 (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;
index 4491b8909c3e695ef3ee25acab7b50dce774998b..94f6282d142e7276f40cdc62fe717c6d80971d2d 100644 (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;
 
index 94c2f4fb610dee94467cfd4693148c637a15d2e8..e1b00a77708ea990fec3685138a9b176da414020 100644 (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;
index 396dbfa5341bcba09294cf69f5c43cf5bd029765..7a40146352842b3ac39c82dfd566e9c416a1112c 100644 (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) {
index c91a96a2481b6296d9a457bc7aad157f24619bd5..72c94c56b9e5d51ca085ee73d53bb13f85041053 100644 (file)
--- 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);
index bd20178c0da9aadeeccbeca09fa62eec96588bc5..efb4963725ac0d43c43200da30723a7e6da13547 100644 (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.",
index 41723a56629df465d3ef58b9ca13a3aabb9212dd..c19557fd06b3df817e4ada6857776c77da1025a9 100644 (file)
--- 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);
index d192e1e3eb37aaa8cb718f5f87c1d37da2a20b3c..fa539f5e2543dfabe71283c93b04e7981ca2da61 100644 (file)
@@ -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);
index 57493448b5e5a3808d1c36a55d63af1097a89342..6ddff76c03a3ab8ed5a8a82dfa21a2a0c52ebf37 100644 (file)
@@ -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;
index 97fc7acc4158cd0298fa958d02d60643c48d6a1f..19872f96ad4dffe9dd2a8f605d5662452ae6c66d 100644 (file)
@@ -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;
                        }
                }