]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - adventure/extern.h
Oops, I forgot to actually implement the checksumming code for the new
[bsdgames-darwin.git] / adventure / extern.h
1 /* $NetBSD: extern.h,v 1.15 2012/01/08 18:16:00 dholland Exp $ */
2
3 /*
4 * Copyright (c) 1997 Christos Zoulas. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are 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 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27 #include <string.h>
28
29 /* crc.c */
30 struct crcstate {
31 uint32_t crcval;
32 unsigned step;
33 };
34
35 void crc_start(struct crcstate *);
36 void crc_add(struct crcstate *, const void *, size_t);
37 uint32_t crc_get(struct crcstate *);
38
39 /* done.c */
40 int score(void);
41 void done(int) __dead;
42 void die(int);
43
44 /* init.c */
45 void init(void);
46 char *decr(int, int, int, int, int);
47 void trapdel(int);
48 void startup(void);
49
50 /* io.c */
51 void getin(char **, char **);
52 int yes(int, int, int);
53 int yesm(int, int, int);
54 void rdata(void);
55 #ifdef DEBUG
56 void twrite(int);
57 #endif
58 void rspeak(int);
59 void mspeak(int);
60 struct text;
61 void speak(const struct text *);
62 void pspeak(int, int);
63
64 /* save.c */
65 int save(const char *);
66 int restore(const char *);
67
68 /* subr.c */
69 int toting(int);
70 int here(int);
71 int at(int);
72 int liq(void);
73 int liqloc(int);
74 int forced(int);
75 int dark(void);
76 int pct(int);
77 int fdwarf(void);
78 int march(void);
79 void bug(int) __dead;
80 void checkhints(void);
81 int trsay(void);
82 int trtake(void);
83 int trdrop(void);
84 int tropen(void);
85 int trkill(void);
86 int trtoss(void);
87 int trfeed(void);
88 int trfill(void);
89 void closing(void);
90 void caveclose(void);
91
92 /* vocab.c */
93 void destroy(int);
94 void juggle(int);
95 void move(int, int);
96 int put(int, int, int);
97 void carry(int, int);
98 void drop(int, int);
99 int vocab(const char *, int, int);
100
101 /* These three used to be functions in vocab.c */
102 #define copystr(src, dest) strcpy((dest), (src))
103 #define weq(str1, str2) (!strncmp((str1), (str2), 5))
104 #define length(str) (strlen((str)) + 1)
105
106 /* wizard.c */
107 void datime(int *, int *);
108 void poof(void);
109 int Start(void);
110 void ciao(void);
111 int ran(int);