Home | History | Annotate | Line # | Download | only in larn
      1 /*	$NetBSD: extern.h,v 1.16 2011/08/29 20:30:37 joerg 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 /* action.c */
     28 void act_remove_gems(int);
     29 void act_sit_throne(int);
     30 void act_drink_fountain(void);
     31 void act_wash_fountain(void);
     32 void act_desecrate_altar(void);
     33 void act_donation_pray(void);
     34 void act_just_pray(void);
     35 void act_ignore_altar(void);
     36 void act_open_chest(int, int);
     37 
     38 /* bill.c */
     39 __dead void mailbill(void);
     40 
     41 /* config.c */
     42 
     43 /* create.c */
     44 void makeplayer(void);
     45 void newcavelevel(int);
     46 void eat(int, int);
     47 int fillmonst(int);
     48 
     49 /* data.c */
     50 
     51 /* diag.c */
     52 void diag(void);
     53 int dcount(int);
     54 void diagdrawscreen(void);
     55 int savegame(char *);
     56 void restoregame(char *);
     57 
     58 /* display.c */
     59 void bottomline(void);
     60 void bottomhp(void);
     61 void bottomspell(void);
     62 void bottomdo(void);
     63 void bot_linex(void);
     64 void bottomgold(void);
     65 void draws(int, int, int, int);
     66 void drawscreen(void);
     67 void showcell(int, int);
     68 void show1cell(int, int);
     69 void showplayer(void);
     70 int moveplayer(int);
     71 void seemagic(int);
     72 
     73 /* fortune.c */
     74 const char *fortune(void);
     75 
     76 /* global.c */
     77 void raiselevel(void);
     78 void loselevel(void);
     79 void raiseexperience(long);
     80 void loseexperience(long);
     81 void losehp(int);
     82 void losemhp(int);
     83 void raisehp(int);
     84 void raisemhp(int);
     85 void raisemspells(int);
     86 void losemspells(int);
     87 int makemonst(int);
     88 void positionplayer(void);
     89 void recalc(void);
     90 void quit(void);
     91 void more(void);
     92 int take(int, int);
     93 int drop_object(int);
     94 void enchantarmor(void);
     95 void enchweapon(void);
     96 int pocketfull(void);
     97 int nearbymonst(void);
     98 int stealsomething(void);
     99 int emptyhanded(void);
    100 void creategem(void);
    101 void adjustcvalues(int, int);
    102 int getpassword(void);
    103 int getyn(void);
    104 int packweight(void);
    105 int rnd(int);
    106 int rund(int);
    107 
    108 /* help.c */
    109 void help(void);
    110 void welcome(void);
    111 
    112 /* io.c */
    113 void setupvt100(void);
    114 void clearvt100(void);
    115 int ttgetch(void);
    116 void scbr(void);
    117 void sncbr(void);
    118 void newgame(void);
    119 void lprintf(const char *, ...) __printflike(1, 2);
    120 void lprint(long);
    121 void lwrite(char *, int);
    122 long lgetc(void);
    123 long larn_lrint(void);
    124 void lrfill(char *, int);
    125 char *lgetw(void);
    126 char *lgetl(void);
    127 int lcreat(char *);
    128 int lopen(char *);
    129 int lappend(char *);
    130 void lrclose(void);
    131 void lwclose(void);
    132 void lprcat(const char *);
    133 void cursor(int, int);
    134 void cursors(void);
    135 void init_term(void);
    136 void cl_line(int, int);
    137 void cl_up(int, int);
    138 void cl_dn(int, int);
    139 void standout(const char *);
    140 void set_score_output(void);
    141 void lflush(void);
    142 char *tmcapcnv(char *, char *);
    143 void beep(void);
    144 
    145 /* main.c */
    146 int main(int, char **);
    147 void qshowstr(void);
    148 void show3(int);
    149 void parse2(void);
    150 unsigned long readnum(long);
    151 void szero(char *);
    152 
    153 /* monster.c */
    154 void createmonster(int);
    155 void createitem(int, int);
    156 void cast(void);
    157 void godirect(int, int, const char *, int, int);
    158 int vxy(int *, int *);
    159 void hitmonster(int, int);
    160 void hitplayer(int, int);
    161 void dropgold(int);
    162 void something(int);
    163 int newobject(int, int *);
    164 void checkloss(int);
    165 int annihilate(void);
    166 int newsphere(int, int, int, int);
    167 int rmsphere(int, int);
    168 
    169 /* moreobj.c */
    170 void oaltar(void);
    171 void othrone(int);
    172 void odeadthrone(void);
    173 void ochest(void);
    174 void ofountain(void);
    175 void fntchange(int);
    176 
    177 /* movem.c */
    178 void movemonst(void);
    179 
    180 /* nap.c */
    181 void nap(int);
    182 
    183 /* object.c */
    184 void lookforobject(void);
    185 void oteleport(int);
    186 void quaffpotion(int);
    187 void adjusttime(long);
    188 void read_scroll(int);
    189 void readbook(int);
    190 void iopts(void);
    191 void ignore(void);
    192 
    193 /* regen.c */
    194 void regen(void);
    195 
    196 /* savelev.c */
    197 void savelevel(void);
    198 void getlevel(void);
    199 
    200 /* scores.c */
    201 int makeboard(void);
    202 int hashewon(void);
    203 long paytaxes(long);
    204 void showscores(void);
    205 void showallscores(void);
    206 void died(int);
    207 void diedlog(void);
    208 int getplid(char *);
    209 
    210 /* signal.c */
    211 void sigsetup(void);
    212 
    213 /* store.c */
    214 void dndstore(void);
    215 void oschool(void);
    216 void obank(void);
    217 void obank2(void);
    218 void ointerest(void);
    219 void otradepost(void);
    220 void olrs(void);
    221 
    222 /* tok.c */
    223 int yylex(void);
    224 void flushall(void);
    225 void sethard(int);
    226 void readopts(void);
    227