Home | History | Annotate | Line # | Download | only in larn
extern.h revision 1.9
      1 /*	$NetBSD: extern.h,v 1.9 2008/02/03 20:11:04 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  * 3. All advertising materials mentioning features or use of this software
     15  *    must display the following acknowledgement:
     16  *	This product includes software developed by Christos Zoulas.
     17  * 4. The name of the author may not be used to endorse or promote products
     18  *    derived from this software without specific prior written permission.
     19  *
     20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     21  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     22  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     23  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     25  * NOT 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 OF
     29  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     30  */
     31 
     32 /* bill.c */
     33 void mailbill(void);
     34 
     35 /* config.c */
     36 
     37 /* create.c */
     38 void makeplayer(void);
     39 void newcavelevel(int);
     40 void eat(int, int);
     41 int fillmonst(int);
     42 
     43 /* data.c */
     44 
     45 /* diag.c */
     46 void diag(void);
     47 int dcount(int);
     48 void diagdrawscreen(void);
     49 int savegame(char *);
     50 void restoregame(char *);
     51 
     52 /* display.c */
     53 void bottomline(void);
     54 void bottomhp(void);
     55 void bottomspell(void);
     56 void bottomdo(void);
     57 void bot_linex(void);
     58 void bottomgold(void);
     59 void draws(int, int, int, int);
     60 void drawscreen(void);
     61 void showcell(int, int);
     62 void show1cell(int, int);
     63 void showplayer(void);
     64 int moveplayer(int);
     65 void seemagic(int);
     66 
     67 /* fortune.c */
     68 const char *fortune(void);
     69 
     70 /* global.c */
     71 void raiselevel(void);
     72 void loselevel(void);
     73 void raiseexperience(long);
     74 void loseexperience(long);
     75 void losehp(int);
     76 void losemhp(int);
     77 void raisehp(int);
     78 void raisemhp(int);
     79 void raisespells(int);
     80 void raisemspells(int);
     81 void losespells(int);
     82 void losemspells(int);
     83 int makemonst(int);
     84 void positionplayer(void);
     85 void recalc(void);
     86 void quit(void);
     87 void more(void);
     88 int take(int, int);
     89 int drop_object(int);
     90 void enchantarmor(void);
     91 void enchweapon(void);
     92 int pocketfull(void);
     93 int nearbymonst(void);
     94 int stealsomething(void);
     95 int emptyhanded(void);
     96 void creategem(void);
     97 void adjustcvalues(int, int);
     98 int getpassword(void);
     99 int getyn(void);
    100 int packweight(void);
    101 int rnd(int);
    102 int rund(int);
    103 
    104 /* help.c */
    105 void help(void);
    106 void welcome(void);
    107 void retcont(void);
    108 
    109 /* io.c */
    110 void setupvt100(void);
    111 void clearvt100(void);
    112 int lgetchar(void);
    113 void scbr(void);
    114 void sncbr(void);
    115 void newgame(void);
    116 void lprintf(const char *, ...) __attribute__((__format__(__printf__, 1, 2)));
    117 void lprint(long);
    118 void lwrite(char *, int);
    119 long lgetc(void);
    120 long larn_lrint(void);
    121 void lrfill(char *, int);
    122 char *lgetw(void);
    123 char *lgetl(void);
    124 int lcreat(char *);
    125 int lopen(char *);
    126 int lappend(char *);
    127 void lrclose(void);
    128 void lwclose(void);
    129 void lprcat(const char *);
    130 void cursor(int, int);
    131 void cursors(void);
    132 void init_term(void);
    133 void cl_line(int, int);
    134 void cl_up(int, int);
    135 void cl_dn(int, int);
    136 void standout(const char *);
    137 void set_score_output(void);
    138 void lflush(void);
    139 int xputchar(int);
    140 char *tmcapcnv(char *, char *);
    141 void beep(void);
    142 
    143 /* main.c */
    144 int main(int, char **);
    145 void showstr(void);
    146 void qshowstr(void);
    147 void t_setup(int);
    148 void t_endup(int);
    149 void showwear(void);
    150 void showwield(void);
    151 void showread(void);
    152 void showeat(void);
    153 void showquaff(void);
    154 void show1(int, const char *[]);
    155 void show3(int);
    156 void randmonst(void);
    157 void parse(void);
    158 void parse2(void);
    159 void run(int);
    160 void wield(void);
    161 void ydhi(int);
    162 void ycwi(int);
    163 void wear(void);
    164 void dropobj(void);
    165 void readscr(void);
    166 void eatcookie(void);
    167 void quaff(void);
    168 unsigned long readnum(long);
    169 void szero(char *);
    170 
    171 /* monster.c */
    172 void createmonster(int);
    173 void createitem(int, int);
    174 void cast(void);
    175 void speldamage(int);
    176 void loseint(void);
    177 int isconfuse(void);
    178 int nospell(int, int);
    179 int fullhit(int);
    180 void direct(int, int, const char *, int);
    181 void godirect(int, int, const char *, int, int);
    182 void ifblind(int, int);
    183 void tdirect(int);
    184 void omnidirect(int, int, const char *);
    185 int vxy(int *, int *);
    186 void dirpoly(int);
    187 void hitmonster(int, int);
    188 int hitm(int, int, int);
    189 void hitplayer(int, int);
    190 void dropgold(int);
    191 void something(int);
    192 int newobject(int, int *);
    193 void checkloss(int);
    194 int annihilate(void);
    195 int newsphere(int, int, int, int);
    196 int rmsphere(int, int);
    197 void sphboom(int, int);
    198 void genmonst(void);
    199 
    200 /* moreobj.c */
    201 void oaltar(void);
    202 void othrone(int);
    203 void odeadthrone(void);
    204 void ochest(void);
    205 void ofountain(void);
    206 void fntchange(int);
    207 
    208 /* movem.c */
    209 void movemonst(void);
    210 void movemt(int, int);
    211 void mmove(int, int, int, int);
    212 void movsphere(void);
    213 
    214 /* nap.c */
    215 void nap(int);
    216 
    217 /* object.c */
    218 void lookforobject(void);
    219 void finditem(int);
    220 void ostairs(int);
    221 void oteleport(int);
    222 void opotion(int);
    223 void quaffpotion(int);
    224 void oscroll(int);
    225 void adjusttime(long);
    226 void read_scroll(int);
    227 void oorb(void);
    228 void opit(void);
    229 void obottomless(void);
    230 void oelevator(int);
    231 void ostatue(void);
    232 void omirror(void);
    233 void obook(void);
    234 void readbook(int);
    235 void ocookie(void);
    236 void ogold(int);
    237 void ohome(void);
    238 void iopts(void);
    239 void ignore(void);
    240 
    241 /* regen.c */
    242 void regen(void);
    243 
    244 /* savelev.c */
    245 void savelevel(void);
    246 void getlevel(void);
    247 
    248 /* scores.c */
    249 int readboard(void);
    250 int writeboard(void);
    251 int makeboard(void);
    252 int hashewon(void);
    253 long paytaxes(long);
    254 int winshou(void);
    255 int shou(int);
    256 void showscores(void);
    257 void showallscores(void);
    258 int sortboard(void);
    259 void newscore(long, char *, int, int);
    260 void new1sub(long, int, char *, long);
    261 void new2sub(long, int, char *, int);
    262 void died(int);
    263 void diedsub(int);
    264 void diedlog(void);
    265 int getplid(char *);
    266 
    267 /* signal.c */
    268 void sigsetup(void);
    269 
    270 /* store.c */
    271 void dnd_2hed(void);
    272 void dnd_hed(void);
    273 void dndstore(void);
    274 void sch_hed(void);
    275 void oschool(void);
    276 void obank(void);
    277 void obank2(void);
    278 void ointerest(void);
    279 void obanksub(void);
    280 void appraise(int);
    281 void otradepost(void);
    282 void cnsitm(void);
    283 void olrs(void);
    284 
    285 /* tok.c */
    286 int yylex(void);
    287 void flushall(void);
    288 void sethard(int);
    289 void readopts(void);
    290