]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - battlestar/room.c
Include <sys/endian.h>.
[bsdgames-darwin.git] / battlestar / room.c
index f464982e7dbcdc23a48ddad1a13b45727fbc326d..5cbaf85060dd2e8c70bb8723a538859aa1a786d2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: room.c,v 1.6 1997/10/11 02:07:35 lukem Exp $   */
+/*     $NetBSD: room.c,v 1.11 2003/08/07 09:37:03 agc Exp $    */
 
 /*
  * Copyright (c) 1983, 1993
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -38,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)room.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: room.c,v 1.6 1997/10/11 02:07:35 lukem Exp $");
+__RCSID("$NetBSD: room.c,v 1.11 2003/08/07 09:37:03 agc Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -48,16 +44,19 @@ void
 writedes()
 {
        int     compass;
-       char   *p;
+       const char   *p;
        int     c;
 
        printf("\n\t%s\n", location[position].name);
-       if (beenthere[position] < 3) {
+       if (beenthere[position] < ROOMDESC || verbose) {
                compass = NORTH;
                for (p = location[position].desc; (c = *p++) != 0;)
-                       if (c != '-' && c != '*' && c != '+')
-                               putchar(c);
-                       else {
+                       if (c != '-' && c != '*' && c != '+') {
+                               if (c == '=')
+                                       putchar('-');
+                               else
+                                       putchar(c);
+                       } else {
                                if (c != '*')
                                        printf(truedirec(compass, c));
                                compass++;
@@ -114,7 +113,7 @@ whichway(here)
        }
 }
 
-char   *
+const char   *
 truedirec(way, option)
        int     way;
        char    option;