Home | History | Annotate | Line # | Download | only in larn
extern.h revision 1.7
      1 /*	$NetBSD: extern.h,v 1.7 2008/01/28 05:38:53 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 makemaze(int);
     41 void eat(int, int);
     42 int cannedlevel(int);
     43 void treasureroom(int);
     44 void troom(int, int, int, int, int, int);
     45 void makeobject(int);
     46 void fillmroom(int, int, int);
     47 void froom(int, int, int);
     48 int fillmonst(int);
     49 void sethp(int);
     50 void checkgen(void);
     51 
     52 /* data.c */
     53 
     54 /* diag.c */
     55 void diag(void);
     56 int dcount(int);
     57 void diagdrawscreen(void);
     58 int savegame(char *);
     59 void restoregame(char *);
     60 void greedy(void);
     61 void fsorry(void);
     62 void fcheat(void);
     63 
     64 /* display.c */
     65 void bottomline(void);
     66 void bottomhp(void);
     67 void bottomspell(void);
     68 void bottomdo(void);
     69 void bot_linex(void);
     70 void bottomgold(void);
     71 void bot_hpx(void);
     72 void bot_spellx(void);
     73 void botside(void);
     74 void draws(int, int, int, int);
     75 void drawscreen(void);
     76 void showcell(int, int);
     77 void show1cell(int, int);
     78 void showplayer(void);
     79 int moveplayer(int);
     80 void seemagic(int);
     81 void seepage(void);
     82 
     83 /* fortune.c */
     84 const char *fortune(void);
     85 
     86 /* global.c */
     87 void raiselevel(void);
     88 void loselevel(void);
     89 void raiseexperience(long);
     90 void loseexperience(long);
     91 void losehp(int);
     92 void losemhp(int);
     93 void raisehp(int);
     94 void raisemhp(int);
     95 void raisespells(int);
     96 void raisemspells(int);
     97 void losespells(int);
     98 void losemspells(int);
     99 int makemonst(int);
    100 void positionplayer(void);
    101 void recalc(void);
    102 void quit(void);
    103 void more(void);
    104 int take(int, int);
    105 int drop_object(int);
    106 void enchantarmor(void);
    107 void enchweapon(void);
    108 int pocketfull(void);
    109 int nearbymonst(void);
    110 int stealsomething(void);
    111 int emptyhanded(void);
    112 void creategem(void);
    113 void adjustcvalues(int, int);
    114 void gettokstr(char *);
    115 int getpassword(void);
    116 int getyn(void);
    117 int packweight(void);
    118 int rnd(int);
    119 int rund(int);
    120 
    121 /* help.c */
    122 void help(void);
    123 void welcome(void);
    124 void retcont(void);
    125 int openhelp(void);
    126 
    127 /* io.c */
    128 void setupvt100(void);
    129 void clearvt100(void);
    130 int lgetchar(void);
    131 void scbr(void);
    132 void sncbr(void);
    133 void newgame(void);
    134 void lprintf(const char *, ...) __attribute__((__format__(__printf__, 1, 2)));
    135 void lprint(long);
    136 void lwrite(char *, int);
    137 long lgetc(void);
    138 long larn_lrint(void);
    139 void lrfill(char *, int);
    140 char *lgetw(void);
    141 char *lgetl(void);
    142 int lcreat(char *);
    143 int lopen(char *);
    144 int lappend(char *);
    145 void lrclose(void);
    146 void lwclose(void);
    147 void lprcat(const char *);
    148 void cursor(int, int);
    149 void cursors(void);
    150 void init_term(void);
    151 void cl_line(int, int);
    152 void cl_up(int, int);
    153 void cl_dn(int, int);
    154 void standout(const char *);
    155 void set_score_output(void);
    156 void lflush(void);
    157 int xputchar(int);
    158 void flush_buf(void);
    159 char *tmcapcnv(char *, char *);
    160 void beep(void);
    161 
    162 /* main.c */
    163 int main(int, char **);
    164 void showstr(void);
    165 void qshowstr(void);
    166 void t_setup(int);
    167 void t_endup(int);
    168 void showwear(void);
    169 void showwield(void);
    170 void showread(void);
    171 void showeat(void);
    172 void showquaff(void);
    173 void show1(int, const char *[]);
    174 void show3(int);
    175 void randmonst(void);
    176 void parse(void);
    177 void parse2(void);
    178 void run(int);
    179 void wield(void);
    180 void ydhi(int);
    181 void ycwi(int);
    182 void wear(void);
    183 void dropobj(void);
    184 void readscr(void);
    185 void eatcookie(void);
    186 void quaff(void);
    187 int whatitem(const char *);
    188 unsigned long readnum(long);
    189 void szero(char *);
    190 
    191 /* monster.c */
    192 void createmonster(int);
    193 int cgood(int, int, int, int);
    194 void createitem(int, int);
    195 void cast(void);
    196 void speldamage(int);
    197 void loseint(void);
    198 int isconfuse(void);
    199 int nospell(int, int);
    200 int fullhit(int);
    201 void direct(int, int, const char *, int);
    202 void godirect(int, int, const char *, int, int);
    203 void ifblind(int, int);
    204 void tdirect(int);
    205 void omnidirect(int, int, const char *);
    206 int vxy(int *, int *);
    207 void dirpoly(int);
    208 void hitmonster(int, int);
    209 int hitm(int, int, int);
    210 void hitplayer(int, int);
    211 void dropsomething(int);
    212 void dropgold(int);
    213 void something(int);
    214 int newobject(int, int *);
    215 int spattack(int, int, int);
    216 void checkloss(int);
    217 int annihilate(void);
    218 int newsphere(int, int, int, int);
    219 int rmsphere(int, int);
    220 void sphboom(int, int);
    221 void genmonst(void);
    222 
    223 /* moreobj.c */
    224 void oaltar(void);
    225 void othrone(int);
    226 void odeadthrone(void);
    227 void ochest(void);
    228 void ofountain(void);
    229 void fntchange(int);
    230 
    231 /* movem.c */
    232 void movemonst(void);
    233 void movemt(int, int);
    234 void mmove(int, int, int, int);
    235 void movsphere(void);
    236 
    237 /* nap.c */
    238 void nap(int);
    239 
    240 /* object.c */
    241 void lookforobject(void);
    242 void finditem(int);
    243 void ostairs(int);
    244 void oteleport(int);
    245 void opotion(int);
    246 void quaffpotion(int);
    247 void oscroll(int);
    248 void adjusttime(long);
    249 void read_scroll(int);
    250 void oorb(void);
    251 void opit(void);
    252 void obottomless(void);
    253 void oelevator(int);
    254 void ostatue(void);
    255 void omirror(void);
    256 void obook(void);
    257 void readbook(int);
    258 void ocookie(void);
    259 void ogold(int);
    260 void ohome(void);
    261 void iopts(void);
    262 void ignore(void);
    263 
    264 /* regen.c */
    265 void regen(void);
    266 
    267 /* savelev.c */
    268 void savelevel(void);
    269 void getlevel(void);
    270 
    271 /* scores.c */
    272 int readboard(void);
    273 int writeboard(void);
    274 int makeboard(void);
    275 int hashewon(void);
    276 long paytaxes(long);
    277 int winshou(void);
    278 int shou(int);
    279 void showscores(void);
    280 void showallscores(void);
    281 int sortboard(void);
    282 void newscore(long, char *, int, int);
    283 void new1sub(long, int, char *, long);
    284 void new2sub(long, int, char *, int);
    285 void died(int);
    286 void diedsub(int);
    287 void diedlog(void);
    288 int getplid(char *);
    289 
    290 /* signal.c */
    291 void sigsetup(void);
    292 
    293 /* store.c */
    294 void dnd_2hed(void);
    295 void dnd_hed(void);
    296 void dndstore(void);
    297 void sch_hed(void);
    298 void oschool(void);
    299 void obank(void);
    300 void obank2(void);
    301 void ointerest(void);
    302 void obanksub(void);
    303 void appraise(int);
    304 void otradepost(void);
    305 void cnsitm(void);
    306 void olrs(void);
    307 
    308 /* tok.c */
    309 int yylex(void);
    310 void flushall(void);
    311 void sethard(int);
    312 void readopts(void);
    313