X-Git-Url: https://git.yukkurigames.com/?p=rogue-pphs.git;a=blobdiff_plain;f=rogue.h;h=e3b2c849baff4fca2bb41e7bedbf7604551bf3e2;hp=0281b1d78b06f83e1f0969accbcac7798c6e3889;hb=HEAD;hpb=7bee0dea66d5b5a2112d2e69d4547128d56abf0c diff --git a/rogue.h b/rogue.h index 0281b1d..e3b2c84 100644 --- a/rogue.h +++ b/rogue.h @@ -3,13 +3,23 @@ * * @(#)rogue.h 3.38 (Berkeley) 6/15/81 * - * Rogue: Exploring the Dungeons of Doom + * Rogue: Exploring the Cavern of Cuties * Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman * All rights reserved. * * See the file LICENSE.TXT for full copyright and licensing information. */ +#ifndef NULL +#define NULL ((void *)0) +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + /* * Maximum number of different things */ @@ -48,7 +58,7 @@ #define otherwise break;default #define until(expr) while(!(expr)) #define ce(a, b) ((a).x == (b).x && (a).y == (b).y) -#define draw(window) (wrefresh(window),usleep(50000)) +#define draw(window) (wrefresh(window),usleep(20000)) #define hero player.t_pos #define pstats player.t_stats #define pack player.t_pack @@ -71,6 +81,8 @@ #define newgrp() ++group #define o_charges o_ac #define ISMULT(type) (type == POTION || type == SCROLL || type == FOOD) +#define rndchoice(a) (a[rnd(sizeof(a)/sizeof((a)[0]))]) +#define hash(i) ((unsigned)(i)*2654435761u) /* * Things that appear on the screens @@ -336,6 +348,11 @@ struct trap { extern struct trap traps[MAXTRAPS]; +#define NUM_FEATURES 6 +#define MAYBE_INTERESTED 1 +#define INTERESTED 40 +#define READY 100 + /* * Structure describing a fighting being */ @@ -346,6 +363,8 @@ struct stats { int s_arm; /* Armor class */ int s_hpt; /* Hit points */ char s_dmg[30]; /* String describing damage done */ + int s_ont; /* Orientation flags */ + int s_int; /* Level of interest in rogue */ }; /* @@ -435,7 +454,7 @@ extern int lastscore; /* Score before this turn */ extern int no_food; /* Number of levels without food */ extern int seed; /* Random number seed */ extern int count; /* Number of times to repeat command */ -extern int dnum; /* Dungeon number */ +extern int dnum; /* Cavern number */ extern int fung_hit; /* Number of time fungi has hit */ extern int quiet; /* Number of quiet turns */ extern int max_level; /* Deepest player has gone */ @@ -506,6 +525,11 @@ char *tr_name(), *new(); char *charge_str(),*vowelstr(), *inv_name(); char *ctime(), *num(), *ring_num(); +int readchar(WINDOW *win); +int md_readchar(WINDOW *win); +int wait_for(WINDOW *win, register char ch); +char *killname(register char monst); + struct room *roomin(); coord *rndmove();