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