[BACK]Return to rogue.h CVS log [TXT][DIR] Up to [contributed] / early-roguelike / rogue3

Annotation of early-roguelike/rogue3/rogue.h, Revision 1.1

1.1     ! rubenllo    1: /*
        !             2:  * Rogue definitions and variable declarations
        !             3:  *
        !             4:  * @(#)rogue.h 3.38 (Berkeley) 6/15/81
        !             5:  *
        !             6:  * Rogue: Exploring the Dungeons of Doom
        !             7:  * Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman
        !             8:  * All rights reserved.
        !             9:  *
        !            10:  * See the file LICENSE.TXT for full copyright and licensing information.
        !            11:  */
        !            12:
        !            13: #include "mdport.h"
        !            14:
        !            15: /*
        !            16:  * Maximum number of different things
        !            17:  */
        !            18: #define MAXROOMS 9
        !            19: #define MAXTHINGS 9
        !            20: #define MAXOBJ 9
        !            21: #define MAXPACK 23
        !            22: #define MAXTRAPS 10
        !            23: #define        NUMTHINGS 7     /* number of types of things (scrolls, rings, etc.) */
        !            24:
        !            25: /*
        !            26:  * return values for get functions
        !            27:  */
        !            28: #define        NORM    0       /* normal exit */
        !            29: #define        QUIT    1       /* quit option setting */
        !            30: #define        MINUS   2       /* back up one option */
        !            31:
        !            32: /*
        !            33:  * All the fun defines
        !            34:  */
        !            35: #define next(ptr) (*ptr).l_next
        !            36: #define prev(ptr) (*ptr).l_prev
        !            37: #define ldata(ptr) (*ptr).l_data
        !            38: #define inroom(rp, cp) (\
        !            39:     (cp)->x <= (rp)->r_pos.x + ((rp)->r_max.x - 1) && (rp)->r_pos.x <= (cp)->x \
        !            40:  && (cp)->y <= (rp)->r_pos.y + ((rp)->r_max.y - 1) && (rp)->r_pos.y <= (cp)->y)
        !            41: #define winat(y, x) (mvwinch(mw,y,x)==' '?mvwinch(stdscr,y,x):winch(mw))
        !            42: #define debug if (wizard) msg
        !            43: #define RN (((seed = seed*11109+13849) & 0x7fff) >> 1)
        !            44: #define unc(cp) (cp).y, (cp).x
        !            45: #define cmov(xy) move((xy).y, (xy).x)
        !            46: #define DISTANCE(y1, x1, y2, x2) ((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1))
        !            47: #define OBJPTR(what)    (struct object *)((*what).l_data)
        !            48: #define THINGPTR(what)  (struct thing *)((*what).l_data)
        !            49: #define when break;case
        !            50: #define otherwise break;default
        !            51: #define until(expr) while(!(expr))
        !            52: #define ce(a, b) ((a).x == (b).x && (a).y == (b).y)
        !            53: #define draw(window) wrefresh(window)
        !            54: #define hero player.t_pos
        !            55: #define pstats player.t_stats
        !            56: #define pack player.t_pack
        !            57: #define attach(a,b) _attach(&a,b)
        !            58: #define detach(a,b) _detach(&a,b)
        !            59: #define free_list(a) _free_list(&a)
        !            60: #ifndef max
        !            61: #define max(a, b) ((a) > (b) ? (a) : (b))
        !            62: #endif
        !            63: #define on(thing, flag) (((thing).t_flags & flag) != 0)
        !            64: #define off(thing, flag) (((thing).t_flags & flag) == 0)
        !            65: #undef  CTRL
        !            66: #define CTRL(ch) (ch & 037)
        !            67: #define ALLOC(x) malloc((unsigned int) x)
        !            68: #define FREE(x) free((char *) x)
        !            69: #define        EQSTR(a, b, c)  (strncmp(a, b, c) == 0)
        !            70: #define GOLDCALC (rnd(50 + 10 * level) + 2)
        !            71: #define ISRING(h,r) (cur_ring[h] != NULL && cur_ring[h]->o_which == r)
        !            72: #define ISWEARING(r) (ISRING(LEFT, r) || ISRING(RIGHT, r))
        !            73: #define newgrp() ++group
        !            74: #define o_charges o_ac
        !            75: #define ISMULT(type) (type == POTION || type == SCROLL || type == FOOD)
        !            76:
        !            77: /*
        !            78:  * Things that appear on the screens
        !            79:  */
        !            80: #define PASSAGE '#'
        !            81: #define DOOR '+'
        !            82: #define FLOOR '.'
        !            83: #define PLAYER '@'
        !            84: #define TRAP '^'
        !            85: #define TRAPDOOR '>'
        !            86: #define ARROWTRAP '{'
        !            87: #define SLEEPTRAP '$'
        !            88: #define BEARTRAP '}'
        !            89: #define TELTRAP '~'
        !            90: #define DARTTRAP '`'
        !            91: #define SECRETDOOR '&'
        !            92: #define STAIRS '%'
        !            93: #define GOLD '*'
        !            94: #define POTION '!'
        !            95: #define SCROLL '?'
        !            96: #define MAGIC '$'
        !            97: #define FOOD ':'
        !            98: #define WEAPON ')'
        !            99: #define ARMOR ']'
        !           100: #define AMULET ','
        !           101: #define RING '='
        !           102: #define STICK '/'
        !           103: #define CALLABLE -1
        !           104:
        !           105: /*
        !           106:  * Various constants
        !           107:  */
        !           108: #define        PASSWD          "mTBellIQOsLNA"
        !           109: #define BEARTIME 3
        !           110: #define SLEEPTIME 5
        !           111: #define HEALTIME 30
        !           112: #define HOLDTIME 2
        !           113: #define STPOS 0
        !           114: #define WANDERTIME 70
        !           115: #define BEFORE 1
        !           116: #define AFTER 2
        !           117: #define HUHDURATION 20
        !           118: #define SEEDURATION 850
        !           119: #define HUNGERTIME 1300
        !           120: #define MORETIME 150
        !           121: #define STOMACHSIZE 2000
        !           122: #define ESCAPE 27
        !           123: #define LEFT 0
        !           124: #define RIGHT 1
        !           125: #define BOLT_LENGTH 6
        !           126:
        !           127: /*
        !           128:  * Save against things
        !           129:  */
        !           130: #define VS_POISON 00
        !           131: #define VS_PARALYZATION 00
        !           132: #define VS_DEATH 00
        !           133: #define VS_PETRIFICATION 01
        !           134: #define VS_BREATH 02
        !           135: #define VS_MAGIC  03
        !           136:
        !           137: /*
        !           138:  * Various flag bits
        !           139:  */
        !           140: #define ISDARK 0000001
        !           141: #define ISCURSED 000001
        !           142: #define ISBLIND 0000001
        !           143: #define ISGONE 0000002
        !           144: #define ISKNOW  0000002
        !           145: #define ISRUN  0000004
        !           146: #define ISFOUND 0000010
        !           147: #define ISINVIS 0000020
        !           148: #define ISMEAN  0000040
        !           149: #define ISGREED 0000100
        !           150: #define ISBLOCK 0000200
        !           151: #define ISHELD  0000400
        !           152: #define ISHUH   0001000
        !           153: #define ISREGEN 0002000
        !           154: #define CANHUH  0004000
        !           155: #define CANSEE  0010000
        !           156: #define ISMISL  0020000
        !           157: #define ISCANC 0020000
        !           158: #define ISMANY  0040000
        !           159: #define ISSLOW 0040000
        !           160: #define ISHASTE 0100000
        !           161:
        !           162: /*
        !           163:  * Potion types
        !           164:  */
        !           165: #define P_CONFUSE 0
        !           166: #define P_PARALYZE 1
        !           167: #define P_POISON 2
        !           168: #define P_STRENGTH 3
        !           169: #define P_SEEINVIS 4
        !           170: #define P_HEALING 5
        !           171: #define P_MFIND 6
        !           172: #define P_TFIND 7
        !           173: #define P_RAISE 8
        !           174: #define P_XHEAL 9
        !           175: #define P_HASTE 10
        !           176: #define P_RESTORE 11
        !           177: #define P_BLIND 12
        !           178: #define P_NOP 13
        !           179: #define MAXPOTIONS 14
        !           180:
        !           181: /*
        !           182:  * Scroll types
        !           183:  */
        !           184: #define S_CONFUSE 0
        !           185: #define S_MAP 1
        !           186: #define S_LIGHT 2
        !           187: #define S_HOLD 3
        !           188: #define S_SLEEP 4
        !           189: #define S_ARMOR 5
        !           190: #define S_IDENT 6
        !           191: #define S_SCARE 7
        !           192: #define S_GFIND 8
        !           193: #define S_TELEP 9
        !           194: #define S_ENCH 10
        !           195: #define S_CREATE 11
        !           196: #define S_REMOVE 12
        !           197: #define S_AGGR 13
        !           198: #define S_NOP 14
        !           199: #define S_GENOCIDE 15
        !           200: #define MAXSCROLLS 16
        !           201:
        !           202: /*
        !           203:  * Weapon types
        !           204:  */
        !           205: #define MACE 0
        !           206: #define SWORD 1
        !           207: #define BOW 2
        !           208: #define ARROW 3
        !           209: #define DAGGER 4
        !           210: #define ROCK 5
        !           211: #define TWOSWORD 6
        !           212: #define SLING 7
        !           213: #define DART 8
        !           214: #define CROSSBOW 9
        !           215: #define BOLT 10
        !           216: #define SPEAR 11
        !           217: #define MAXWEAPONS 12
        !           218:
        !           219: /*
        !           220:  * Armor types
        !           221:  */
        !           222: #define LEATHER 0
        !           223: #define RING_MAIL 1
        !           224: #define STUDDED_LEATHER 2
        !           225: #define SCALE_MAIL 3
        !           226: #define CHAIN_MAIL 4
        !           227: #define SPLINT_MAIL 5
        !           228: #define BANDED_MAIL 6
        !           229: #define PLATE_MAIL 7
        !           230: #define MAXARMORS 8
        !           231:
        !           232: /*
        !           233:  * Ring types
        !           234:  */
        !           235: #define R_PROTECT 0
        !           236: #define R_ADDSTR 1
        !           237: #define R_SUSTSTR 2
        !           238: #define R_SEARCH 3
        !           239: #define R_SEEINVIS 4
        !           240: #define R_NOP 5
        !           241: #define R_AGGR 6
        !           242: #define R_ADDHIT 7
        !           243: #define R_ADDDAM 8
        !           244: #define R_REGEN 9
        !           245: #define R_DIGEST 10
        !           246: #define R_TELEPORT 11
        !           247: #define R_STEALTH 12
        !           248: #define MAXRINGS 13
        !           249:
        !           250: /*
        !           251:  * Rod/Wand/Staff types
        !           252:  */
        !           253:
        !           254: #define WS_LIGHT 0
        !           255: #define WS_HIT 1
        !           256: #define WS_ELECT 2
        !           257: #define WS_FIRE 3
        !           258: #define WS_COLD 4
        !           259: #define WS_POLYMORPH 5
        !           260: #define WS_MISSILE 6
        !           261: #define WS_HASTE_M 7
        !           262: #define WS_SLOW_M 8
        !           263: #define WS_DRAIN 9
        !           264: #define WS_NOP 10
        !           265: #define WS_TELAWAY 11
        !           266: #define WS_TELTO 12
        !           267: #define WS_CANCEL 13
        !           268: #define MAXSTICKS 14
        !           269:
        !           270: /*
        !           271:  * Now we define the structures and types
        !           272:  */
        !           273:
        !           274: /*
        !           275:  * Help list
        !           276:  */
        !           277:
        !           278: struct h_list {
        !           279:     int h_ch;
        !           280:     char *h_desc;
        !           281: };
        !           282:
        !           283: extern struct h_list helpstr[];
        !           284:
        !           285: /*
        !           286:  * Coordinate data type
        !           287:  */
        !           288: typedef struct {
        !           289:     int x;
        !           290:     int y;
        !           291: } coord;
        !           292:
        !           293: typedef struct {
        !           294:     int st_str;
        !           295:     int st_add;
        !           296: } str_t;
        !           297:
        !           298: /*
        !           299:  * Linked list data type
        !           300:  */
        !           301: struct linked_list {
        !           302:     struct linked_list *l_next;
        !           303:     struct linked_list *l_prev;
        !           304:     char *l_data;                      /* Various structure pointers */
        !           305: };
        !           306:
        !           307: /*
        !           308:  * Stuff about magic items
        !           309:  */
        !           310:
        !           311: struct magic_item {
        !           312:     char mi_name[30];
        !           313:     int mi_prob;
        !           314:     int mi_worth;
        !           315: };
        !           316:
        !           317: /*
        !           318:  * Room structure
        !           319:  */
        !           320: struct room {
        !           321:     coord r_pos;                       /* Upper left corner */
        !           322:     coord r_max;                       /* Size of room */
        !           323:     coord r_gold;                      /* Where the gold is */
        !           324:     int r_goldval;                     /* How much the gold is worth */
        !           325:     int r_flags;                       /* Info about the room */
        !           326:     int r_nexits;                      /* Number of exits */
        !           327:     coord r_exit[4];                   /* Where the exits are */
        !           328: };
        !           329:
        !           330: /*
        !           331:  * Array of all traps on this level
        !           332:  */
        !           333: struct trap {
        !           334:     coord tr_pos;                      /* Where trap is */
        !           335:     int tr_type;                       /* What kind of trap */
        !           336:     int tr_flags;                      /* Info about trap (i.e. ISFOUND) */
        !           337: };
        !           338:
        !           339: extern struct trap  traps[MAXTRAPS];
        !           340:
        !           341: /*
        !           342:  * Structure describing a fighting being
        !           343:  */
        !           344: struct stats {
        !           345:     str_t s_str;                       /* Strength */
        !           346:     int s_exp;                         /* Experience */
        !           347:     int s_lvl;                         /* Level of mastery */
        !           348:     int s_arm;                         /* Armor class */
        !           349:     int s_hpt;                         /* Hit points */
        !           350:     char s_dmg[30];                    /* String describing damage done */
        !           351: };
        !           352:
        !           353: /*
        !           354:  * Structure for monsters and player
        !           355:  */
        !           356: struct thing {
        !           357:     coord t_pos;                       /* Position */
        !           358:     int t_turn;                        /* If slowed, is it a turn to move */
        !           359:     int t_type;                        /* What it is */
        !           360:     int t_disguise;                    /* What mimic looks like */
        !           361:     int t_oldch;                       /* Character that was where it was */
        !           362:     coord *t_dest;                     /* Where it is running to */
        !           363:     int t_flags;                       /* State word */
        !           364:     struct stats t_stats;              /* Physical description */
        !           365:     struct linked_list *t_pack;                /* What the thing is carrying */
        !           366:        int t_reserved;         /* reserved for save/restore code */
        !           367: };
        !           368:
        !           369: /*
        !           370:  * Array containing information on all the various types of mosnters
        !           371:  */
        !           372: struct monster {
        !           373:     char m_name[20];                   /* What to call the monster */
        !           374:     int m_carry;                       /* Probability of carrying something */
        !           375:     int m_flags;                       /* Things about the monster */
        !           376:     struct stats m_stats;              /* Initial stats */
        !           377: };
        !           378:
        !           379: /*
        !           380:  * Structure for a thing that the rogue can carry
        !           381:  */
        !           382:
        !           383: struct object {
        !           384:     int o_type;                                /* What kind of object it is */
        !           385:     coord o_pos;                       /* Where it lives on the screen */
        !           386:     int o_launch;                      /* What you need to launch it */
        !           387:     char o_damage[8];                  /* Damage if used like sword */
        !           388:     char o_hurldmg[8];                 /* Damage if thrown */
        !           389:     int o_count;                       /* Count for plural objects */
        !           390:     int o_which;                       /* Which object of a type it is */
        !           391:     int o_hplus;                       /* Plusses to hit */
        !           392:     int o_dplus;                       /* Plusses to damage */
        !           393:     int o_ac;                          /* Armor class */
        !           394:     int o_flags;                       /* Information about objects */
        !           395:     int o_group;                       /* Group number for this object */
        !           396: };
        !           397:
        !           398: struct delayed_action {
        !           399:     int d_type;
        !           400:     void (*d_func)();
        !           401:     int d_arg;
        !           402:     int d_time;
        !           403: };
        !           404:
        !           405: /*
        !           406:  * Now all the global variables
        !           407:  */
        !           408:
        !           409: extern int                   a_chances[MAXARMORS];     /* Probabilities for armor */
        !           410: extern int                   a_class[MAXARMORS];       /* Armor class for various armors */
        !           411: extern char *                a_names[MAXARMORS];       /* Names of armor types */
        !           412: extern int                   after;                    /* True if we want after daemons */
        !           413: extern int                   amulet;                   /* He found the amulet */
        !           414: extern int                   askme;                    /* Ask about unidentified things */
        !           415: extern int                   between;
        !           416: extern coord                 ch_ret;
        !           417: extern int                   count;                    /* Number of times to repeat command */
        !           418: extern int                   cNCOLORS;
        !           419: extern int                   cNMETAL;
        !           420: extern int                   cNSTONES;
        !           421: extern int                   cNWOOD;
        !           422: extern struct object *       cur_armor;                        /* What a well dresssed rogue wears */
        !           423: extern struct object *       cur_ring[2];              /* Which rings are being worn */
        !           424: extern struct object *       cur_weapon;               /* Which weapon he is weilding */
        !           425: extern WINDOW *              cw;                       /* Window that the player sees */
        !           426: extern coord                 delta;                    /* Change indicated to get_dir() */
        !           427: extern int                   dnum;                     /* Dungeon number */
        !           428: extern int                   door_stop;                        /* Stop running when we pass a door */
        !           429: extern struct delayed_action d_list[20];
        !           430: extern int                   fight_flush;              /* True if toilet input */
        !           431: extern char                  file_name[256];           /* Save file name */
        !           432: extern int                   firstmove;                        /* First move after setting door_stop */
        !           433: extern int                   food_left;                        /* Amount of food in hero's stomach */
        !           434: extern char                  fruit[80];                        /* Favorite fruit */
        !           435: extern int                   fung_hit;                 /* Number of time fungi has hit */
        !           436: extern int                   group;                    /* Current group number */
        !           437: extern char                  home[];                   /* User's home directory */
        !           438: extern WINDOW *              hw;                       /* Used for the help command */
        !           439: extern char                  huh[80];                  /* The last message printed */
        !           440: extern int                   hungry_state;             /* How hungry is he */
        !           441: extern int                   in_shell;                 /* True if executing a shell */
        !           442: extern int                   inpack;                   /* Number of things in pack */
        !           443: extern int                   jump;                     /* Show running as series of jumps */
        !           444: extern int                   lastscore;                        /* Score before this turn */
        !           445: extern int                   level;                    /* What level rogue is on */
        !           446: extern FILE *                logfi;
        !           447: extern char                  lvl_mons[27];
        !           448: extern struct linked_list *  lvl_obj;                  /* List of objects on this level */
        !           449: extern int                   max_hp;                   /* Player's max hit points */
        !           450: extern int                   max_level;                        /* Deepest player has gone */
        !           451: extern struct stats          max_stats;                        /* The maximum for the player */
        !           452: extern char *                metal[];
        !           453: extern struct linked_list *  mlist;                    /* List of monsters on the level */
        !           454: extern struct monster        monsters[26];             /* The initial monster states */
        !           455: extern int                   mpos;                     /* Where cursor is on top line */
        !           456: extern WINDOW *              mw;                       /* Used to store mosnters */
        !           457: extern coord                 nh;
        !           458: extern int                   no_command;               /* Number of turns asleep */
        !           459: extern int                   no_food;                  /* Number of levels without food */
        !           460: extern int                   no_move;                  /* Number of turns held in place */
        !           461: extern int                   notify;                   /* True if player wants to know */
        !           462: extern int                   ntraps;                   /* Number of traps on this level */
        !           463: extern int                   num_checks;
        !           464: extern coord                 oldpos;                   /* Position before last look() call */
        !           465: extern struct room *         oldrp;                    /* Roomin(&oldpos) */
        !           466: extern char *                p_colors[MAXPOTIONS];     /* Colors of the potions */
        !           467: extern char *                p_guess[MAXPOTIONS];      /* Players guess at what potion is */
        !           468: extern int                   p_know[MAXPOTIONS];       /* Does he know what a potion does */
        !           469: extern struct magic_item     p_magic[MAXPOTIONS];      /* Names and chances for potions */
        !           470: extern struct thing          player;                   /* The rogue */
        !           471: extern int                   playing;                  /* True until he quits */
        !           472: extern char                  prbuf[80];                        /* Buffer for sprintfs */
        !           473: extern int                   purse;                    /* How much gold the rogue has */
        !           474: extern int                   quiet;                    /* Number of quiet turns */
        !           475: extern char *                r_guess[MAXRINGS];                /* Players guess at what ring is */
        !           476: extern int                   r_know[MAXRINGS];         /* Does he know what a ring does */
        !           477: extern struct magic_item     r_magic[MAXRINGS];                /* Names and chances for rings */
        !           478: extern char *                r_stones[MAXRINGS];       /* Stone settings of the rings */
        !           479: extern char *                rainbow[];
        !           480: extern char *                release;                  /* Release number of rogue */
        !           481: extern struct room           rooms[MAXROOMS];          /* One for each room -- A level */
        !           482: extern int                   runch;                    /* Direction player is running */
        !           483: extern int                   running;                  /* True if player is running */
        !           484: extern int                   seed;                     /* Random number seed */
        !           485: extern char *                s_guess[MAXSCROLLS];      /* Players guess at what scroll is */
        !           486: extern int                   s_know[MAXSCROLLS];       /* Does he know what a scroll does */
        !           487: extern struct magic_item     s_magic[MAXSCROLLS];      /* Names and chances for scrolls */
        !           488: extern char *                s_names[MAXSCROLLS];      /* Names of the scrolls */
        !           489: extern FILE *                scoreboard;
        !           490: extern int                   slow_invent;              /* Inventory one line at a time */
        !           491: extern char *                stones[];
        !           492: extern int                   take;                     /* Thing the rogue is taking */
        !           493: extern int                   terse;                    /* True if we should be int */
        !           494: extern struct magic_item     things[NUMTHINGS];                /* Chances for each type of item */
        !           495: extern int                   total;                    /* Total dynamic memory bytes */
        !           496: extern int                   use_savedir;              /* True if using system savedir */
        !           497: extern char *                w_names[MAXWEAPONS];      /* Names of the various weapons */
        !           498: extern char                  wand_mons[27];
        !           499: extern int                   waswizard;                        /* Was a wizard sometime */
        !           500: extern char                  whoami[80];               /* Name of player */
        !           501: extern int                   wizard;                   /* True if allows wizard commands */
        !           502: extern char *                wood[];
        !           503: extern char *                ws_guess[MAXSTICKS];      /* Players guess at what wand is */
        !           504: extern int                   ws_know[MAXSTICKS];       /* Does he know what a stick does */
        !           505: extern char *                ws_made[MAXSTICKS];       /* What sticks are made of */
        !           506: extern struct magic_item     ws_magic[MAXSTICKS];      /* Names and chances for sticks */
        !           507: extern char *                ws_type[MAXSTICKS];       /* Is it a wand or a staff */
        !           508:
        !           509: void                    _attach(struct linked_list **list, struct linked_list *item);
        !           510: void                    _detach(struct linked_list **list, struct linked_list *item);
        !           511: void                    _free_list(struct linked_list **ptr);
        !           512: char *                  _new(size_t size);
        !           513: int                     add_dam(str_t *str);
        !           514: bool                    add_haste(int potion);
        !           515: void                    add_pack(struct linked_list *item, int silent);
        !           516: void                    add_pass(void);
        !           517: void                    addmsg(char *fmt, ...);
        !           518: void                    aggravate(void);
        !           519: int                     attack(struct thing *mp);
        !           520: int                     author(void);
        !           521: void                    auto_save(int p);
        !           522: void                    badcheck(char *name, struct magic_item *magic, int bound);
        !           523: int                     be_trapped(coord *tc);
        !           524: void                    bounce(struct object *weap, char *mname);
        !           525: void                    call(void);
        !           526: int                     cansee(int y, int x);
        !           527: char *                  charge_str(struct object *obj);
        !           528: int                     chase(struct thing *tp, coord *ee);
        !           529: void                    check_level(void);
        !           530: void                    checkout(int p);
        !           531: void                    chg_str(int amt);
        !           532: void                    chmsg(char *fmt, ...);
        !           533: void                    command(void);
        !           534: void                    conn(int r1, int r2);
        !           535: void                    create_obj(void);
        !           536: void                    death(int monst);
        !           537: int                     diag_ok(coord *sp, coord *ep);
        !           538: void                    discard(struct linked_list *item);
        !           539: void                    d_level(void);
        !           540: int                     do_chase(struct thing *th);
        !           541: void                    do_daemons(int flag);
        !           542: void                    do_fuses(int flag);
        !           543: void                    do_motion(struct object *obj, int ydelta, int xdelta);
        !           544: void                    do_move(int dy, int dx);
        !           545: void                    do_passages(void);
        !           546: void                    do_rooms(void);
        !           547: void                    do_run(int ch);
        !           548: void                    do_zap(int gotdir);
        !           549: void                    doadd(char *fmt, va_list ap);
        !           550: void                    doctor(void);
        !           551: void                    door(struct room *rm, coord *cp);
        !           552: void                    drain(int ymin, int ymax, int xmin, int xmax);
        !           553: void                    draw_room(struct room *rp);
        !           554: void                    drop(void);
        !           555: int                     dropcheck(struct object *op);
        !           556: void                    eat(void);
        !           557: int                    encerror(void);
        !           558: void                    encseterr(int err);
        !           559: int                     encclearerr(void);
        !           560: size_t                  encread(void *buf, size_t size, FILE *inf);
        !           561: size_t                  encwrite(const void *buf, size_t size, FILE *outf);
        !           562: void                    endmsg(void);
        !           563: void                    extinguish(void (*func)());
        !           564: void                    fall(struct linked_list *item, int pr);
        !           565: int                     fallpos(coord *pos, coord *newpos, int passages);
        !           566: void                    fatal(char *s);
        !           567: struct linked_list *    find_mons(int y, int x);
        !           568: struct linked_list *    find_obj(int y, int x);
        !           569: struct delayed_action * find_slot(void (*func)());
        !           570: int                     fight(coord *mp, int mn, struct object *weap, int thrown);
        !           571: void                    fix_stick(struct object *cur);
        !           572: void                    flush_type(void);
        !           573: void                    fuse(void (*func)(), int arg, int time, int type);
        !           574: void                    genocide(void);
        !           575: int                     get_bool(void *vp, WINDOW *win);
        !           576: int                     get_dir(void);
        !           577: struct linked_list *    get_item(char *purpose, int type);
        !           578: int                     get_str(void *vopt, WINDOW *win);
        !           579: int                     gethand(void);
        !           580: void                    help(void);
        !           581: void                    hit(char *er, char *ee);
        !           582: int                     hit_monster(int y, int x, struct object *obj);
        !           583: void                    horiz(int cnt);
        !           584: void                    identify(void);
        !           585: void                    init_colors(void);
        !           586: void                    init_materials(void);
        !           587: void                    init_names(void);
        !           588: void                    init_player(void);
        !           589: void                    init_stones(void);
        !           590: void                    init_things(void);
        !           591: void                    init_weapon(struct object *weap, int type);
        !           592: char *                  inv_name(struct object *obj, int drop);
        !           593: int                     inventory(struct linked_list *list, int type);
        !           594: int                     is_current(struct object *obj);
        !           595: int                     is_magic(struct object *obj);
        !           596: void                    kill_daemon(void (*func)());
        !           597: void                    killed(struct linked_list *item, int pr);
        !           598: char *                  killname(int monst);
        !           599: void                    lengthen(void (*func)(), int xtime);
        !           600: void                    light(coord *cp);
        !           601: void                    look(int wakeup);
        !           602: void                    miss(char *er, char *ee);
        !           603: void                    missile(int ydelta, int xdelta);
        !           604: void                    money(void);
        !           605: void                    msg(char *fmt, ...);
        !           606: void                    new_level(void);
        !           607: struct linked_list *    new_item(int size);
        !           608: void                    new_monster(struct linked_list *item, int type, coord *cp);
        !           609: struct linked_list *    new_thing(void);
        !           610: char *                  num(int n1, int n2);
        !           611: void                    nohaste(void);
        !           612: void                    open_log(void);
        !           613: void                    open_score(void);
        !           614: void                    option(void);
        !           615: int                     pack_char(struct object *obj);
        !           616: void                    parse_opts(char *str);
        !           617: int                     passwd(void);
        !           618: int                     pick_one(struct magic_item *magic, int nitems);
        !           619: void                    pick_up(int ch);
        !           620: void                    picky_inven(void);
        !           621: void                    playit(void);
        !           622: void                    put_bool(void *b);
        !           623: void                    put_str(void *str);
        !           624: void                    put_things(void);
        !           625: int                     readchar(WINDOW *win);
        !           626: int                     restore(char *file, char **envp);
        !           627: int                     roll(int number, int sides);
        !           628: struct room *           roomin(coord *cp);
        !           629: int                     step_ok(int ch);
        !           630: void                    strucpy(char *s1, char *s2, size_t len);
        !           631: void                    swander(void);
        !           632: void                    take_off(void);
        !           633: void                    tstp(int p);
        !           634: void                    quaff(void);
        !           635: void                    quit(int p);
        !           636: void                    raise_level(void);
        !           637: int                     randmonster(int wander);
        !           638: void                    read_scroll(void);
        !           639: void                    remove_monster(coord *mp, struct linked_list *item);
        !           640: int                     ring_eat(int hand);
        !           641: void                    ring_off(void);
        !           642: void                    ring_on(void);
        !           643: char *                  ring_num(struct object *obj);
        !           644: int                     rnd(int range);
        !           645: void                    rnd_pos(struct room *rp, coord *cp);
        !           646: int                     rnd_room(void);
        !           647: coord *                 rndmove(struct thing *who);
        !           648: int                     roll_em(struct stats *att, struct stats *def, struct object *weap, int hurl);
        !           649: void                    rollwand(void);
        !           650: int                     rs_save_file(FILE *savef);
        !           651: int                     rs_restore_file(FILE *inf);
        !           652: void                    runners(void);
        !           653: void                    runto(coord *runner, coord *spot);
        !           654: int                     save(int which);
        !           655: int                     save_file(FILE *savef);
        !           656: int                     save_game(void);
        !           657: int                     save_throw(int which, struct thing *tp);
        !           658: void                    score(int amount, int flags, int monst);
        !           659: void                    shell(void);
        !           660: int                     show(int y, int x);
        !           661: void                    sight(void);
        !           662: void                    search(void);
        !           663: int                     secretdoor(int y, int x);
        !           664: void                    setup(void);
        !           665: void                    show_win(WINDOW *scr, char *message);
        !           666: void                    start_daemon(void (*func)(), int arg, int type);
        !           667: void                    status(void);
        !           668: void                    stomach(void);
        !           669: int                     str_plus(str_t *str);
        !           670: int                     swing(int at_lvl, int op_arm, int wplus);
        !           671: int                     teleport(void);
        !           672: int                     too_much(void);
        !           673: void                    total_winner(void);
        !           674: char *                  tr_name(int ch);
        !           675: struct trap *           trap_at(int y, int x);
        !           676: void                    thunk(struct object *weap, char *mname);
        !           677: void                    u_level(void);
        !           678: void                    unconfuse(void);
        !           679: void                    unsee(void);
        !           680: void                    vert(int cnt);
        !           681: char *                  vowelstr(char *str);
        !           682: void                    wait_for(WINDOW *win, int ch);
        !           683: struct linked_list *    wake_monster(int y, int x);
        !           684: void                    wanderer(void);
        !           685: void                    waste_time(void);
        !           686: void                    wear(void);
        !           687: void                    whatis(void);
        !           688: void                    wield(void);
        !           689: void                    writelog(int amount, int flags, int monst);

CVSweb