HAMMER VFS - REDO/fsync precursor work
[dragonfly.git] / games / hunt / huntd / hunt.h
blob23a27254cc09d385de4da86a898eaad856dda39f
1 /*-
2 * Copyright (c) 1983-2003, Regents of the University of California.
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University of California, San Francisco nor
15 * the names of its contributors may be used to endorse or promote
16 * products derived from this software without specific prior written
17 * permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * $OpenBSD: hunt.h,v 1.5 2003/06/11 08:45:33 pjanzen Exp $
32 * $NetBSD: hunt.h,v 1.5 1998/09/13 15:27:28 hubertf Exp $
33 * $DragonFly: src/games/hunt/huntd/hunt.h,v 1.1 2008/09/02 21:50:21 dillon Exp $
37 * Preprocessor define dependencies
40 /* decrement version number for each change in startup protocol */
41 # define HUNT_VERSION (-1)
42 # define HUNT_PORT (('h' << 8) | 't')
44 # define ADDCH ('a' | 0200)
45 # define MOVE ('m' | 0200)
46 # define REFRESH ('r' | 0200)
47 # define CLRTOEOL ('c' | 0200)
48 # define ENDWIN ('e' | 0200)
49 # define CLEAR ('C' | 0200)
50 # define REDRAW ('R' | 0200)
51 # define LAST_PLAYER ('l' | 0200)
52 # define BELL ('b' | 0200)
53 # define READY ('g' | 0200)
55 # define SCREEN_HEIGHT 24
56 # define SCREEN_WIDTH 80
57 # define HEIGHT 23
58 # define WIDTH 51
59 # define SCREEN_WIDTH2 128 /* Next power of 2 >= SCREEN_WIDTH */
60 # define WIDTH2 64 /* Next power of 2 >= WIDTH (for fast access) */
62 # define NAMELEN 20
64 # define Q_QUIT 0
65 # define Q_CLOAK 1
66 # define Q_FLY 2
67 # define Q_SCAN 3
68 # define Q_MESSAGE 4
70 # define C_PLAYER 0
71 # define C_MONITOR 1
72 # define C_MESSAGE 2
73 # define C_SCORES 3
74 # define C_TESTMSG() (Query_driver ? C_MESSAGE :\
75 (Show_scores ? C_SCORES :\
76 (Am_monitor ? C_MONITOR :\
77 C_PLAYER)))
79 typedef int FLAG;
81 /* Objects within the maze: */
83 # define DOOR '#'
84 # define WALL1 '-'
85 # define WALL2 '|'
86 # define WALL3 '+'
87 # define WALL4 '/'
88 # define WALL5 '\\'
89 # define KNIFE 'K'
90 # define SHOT ':'
91 # define GRENADE 'o'
92 # define SATCHEL 'O'
93 # define BOMB '@'
94 # define MINE ';'
95 # define GMINE 'g'
96 # define SLIME '$'
97 # define LAVA '~'
98 # define DSHOT '?'
99 # define FALL 'F'
100 # define BOOT 'b'
101 # define BOOT_PAIR 'B'
103 # define SPACE ' '
105 # define ABOVE 'i'
106 # define BELOW '!'
107 # define RIGHT '}'
108 # define LEFTS '{'
109 # define FLYER '&'
110 # define is_player(c) (c == LEFTS || c == RIGHT ||\
111 c == ABOVE || c == BELOW || c == FLYER)
113 # ifndef TRUE
114 # define TRUE 1
115 # define FALSE 0
116 # endif