KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
hdr.h File Reference
#include "porthelper.h"

Go to the source code of this file.

Data Structures

struct  hashtab
 
struct  text
 
struct  travlist
 

Macros

#define TAB   '\t'
 
#define LF   '\n'
 
#define FLUSHLINE   do { int flushline_ch; while ((flushline_ch = getchar()) != EOF && flushline_ch != '\n'); } while (0)
 
#define FLUSHLF   while (next()!=LF)
 
#define SHORT   50 /* How short is a demo game? */
 
#define MAXSTR   20 /* max length of user's words */
 
#define HTSIZE   512 /* max number of vocab words */
 
#define SEED   1815622 /* "Encryption" seed */
 
#define RTXSIZ   205
 
#define MAGSIZ   35
 
#define CLSMAX   12
 
#define LOCSIZ   141 /* number of locations */
 
#define FALSE   0
 
#define TRUE   1
 
#define DECR(a, b, c, d, e)
 

Functions

int at (int objj)
 
int bug (int n)
 
void carry (int, int)
 
void caveclose (void)
 
void checkhints (void)
 
void ciao (void)
 
void closing (void)
 
u_long crc (const char *ptr, int nr)
 
void crc_start (void)
 
int dark (void)
 
void datime (int *d, int *t)
 
char * decr (int, int, int, int, int)
 
void die (int entry)
 
void done (int entry)
 
void drop (int object, int where)
 
void dstroy (int)
 
int fdwarf (void)
 
int forced (int locc)
 
void getin (char **wrd1, char **wrd2)
 
int here (int objj)
 
void my_init (void)
 
void juggle (int)
 
int liq (void)
 
int liqloc (int locc)
 
int march (void)
 
void move (int, int)
 
void mspeak (int)
 
int pct (int n)
 
void poof (void)
 
void pspeak (int m, int skip)
 
int put (int, int, int)
 
int ran (int range)
 
void rdata (void)
 
int restore (const char *infile)
 
void rspeak (int)
 
int save (const char *)
 
int score (void)
 
void speak (const struct text *)
 
int Start (void)
 
void startup (void)
 
int toting (int objj)
 
void trapdel (int sig)
 
int trdrop (void)
 
int trfeed (void)
 
int trfill (void)
 
int trkill (void)
 
int tropen (void)
 
int trsay (void)
 
int trtake (void)
 
int trtoss (void)
 
int vocab (const char *, int, int)
 
int yes (int x, int y, int z)
 
int yesm (int x, int y, int z)
 

Variables

int datfd
 
int yea
 
char data_file []
 
int loc
 
int newloc
 
int oldloc
 
int oldlc2
 
int wzdark
 
int gaveup
 
int kq
 
int k
 
int k2
 
char * wd1
 
char * wd2
 
int verb
 
int obj
 
int spk
 
int blklin
 
int saved
 
int savet
 
int mxscor
 
int latncy
 
struct hashtab voc [HTSIZE]
 
struct text rtext [RTXSIZ]
 
struct text mtext [MAGSIZ]
 
int clsses
 
struct text ctext [CLSMAX]
 
int cval [CLSMAX]
 
struct text ptext [101]
 
struct text ltext [LOCSIZ]
 
struct text stext [LOCSIZ]
 
struct travlisttravel [LOCSIZ]
 
struct travlisttkk [LOCSIZ]
 
int atloc [LOCSIZ]
 
int plac [101]
 
int fixd [101]
 
int fixed [101]
 
int actspk [35]
 
int cond [LOCSIZ]
 
int setbit [16]
 
int hntmax
 
int hints [20][5]
 
int hinted [20]
 
int hintlc [20]
 
int place [101]
 
int prop [101]
 
int linkx [201]
 
int abb [LOCSIZ]
 
int maxtrs
 
int tally
 
int tally2
 
int keys
 
int lamp
 
int grate
 
int cage
 
int rod
 
int rod2
 
int steps
 
int bird
 
int door
 
int pillow
 
int snake
 
int fissur
 
int tablet
 
int clam
 
int oyster
 
int magzin
 
int dwarf
 
int knife
 
int food
 
int bottle
 
int water
 
int oil
 
int plant
 
int plant2
 
int axe
 
int mirror
 
int dragon
 
int chasm
 
int troll
 
int troll2
 
int bear
 
int messag
 
int vend
 
int batter
 
int nugget
 
int coins
 
int chest
 
int eggs
 
int tridnt
 
int vase
 
int emrald
 
int pyram
 
int pearl
 
int rug
 
int chain
 
int spices
 
int back
 
int look
 
int cave
 
int null
 
int entrnc
 
int dprssn
 
int enter
 
int stream
 
int pour
 
int say
 
int lock
 
int throw
 
int find
 
int invent
 
int chloc
 
int chloc2
 
int dseen [7]
 
int dloc [7]
 
int odloc [7]
 
int dflag
 
int daltlc
 
int tk [21]
 
int stick
 
int dtotal
 
int attack
 
int turns
 
int lmwarn
 
int iwest
 
int knfloc
 
int detail
 
int abbnum
 
int maxdie
 
int numdie
 
int holdng
 
int dkill
 
int foobar
 
int bonus
 
int clock1
 
int clock2
 
int closng
 
int apanic
 
int closed
 
int scorng
 
int demo
 
int limit
 

Macro Definition Documentation

◆ CLSMAX

#define CLSMAX   12

◆ DECR

#define DECR ( a,
b,
c,
d,
e )
Value:
( #a #b #c #d #e )

Referenced by linkdata(), and poof().

◆ FALSE

◆ FLUSHLF

#define FLUSHLF   while (next()!=LF)

Referenced by rdata(), rdesc(), and rvoc().

◆ FLUSHLINE

#define FLUSHLINE   do { int flushline_ch; while ((flushline_ch = getchar()) != EOF && flushline_ch != '\n'); } while (0)

Referenced by getin(), yes(), and yesm().

◆ HTSIZE

#define HTSIZE   512 /* max number of vocab words */

Referenced by vocab().

◆ LF

#define LF   '\n'

Referenced by pspeak(), rdata(), rliq(), rnum(), rtrav(), rvoc(), and speak().

◆ LOCSIZ

#define LOCSIZ   141 /* number of locations */

◆ MAGSIZ

#define MAGSIZ   35

Referenced by rdesc().

◆ MAXSTR

#define MAXSTR   20 /* max length of user's words */

Referenced by getin().

◆ RTXSIZ

#define RTXSIZ   205

Referenced by rdesc().

◆ SEED

#define SEED   1815622 /* "Encryption" seed */

Referenced by main().

◆ SHORT

#define SHORT   50 /* How short is a demo game? */

Referenced by main().

◆ TAB

#define TAB   '\t'

Referenced by pspeak(), rlocs(), rnum(), rtrav(), rvoc(), and speak().

◆ TRUE

#define TRUE   1

Function Documentation

◆ at()

int at ( int objj)

References FALSE, fixed, loc, place, and TRUE.

Referenced by fdwarf(), main(), march(), trdrop(), trkill(), and trtoss().

◆ bug()

int bug ( int n)

References printf.

Referenced by checkhints(), main(), march(), and specials().

◆ carry()

void carry ( int object,
int where )

References atloc, holdng, linkx, and place.

Referenced by fdwarf(), move(), and trtake().

◆ caveclose()

void caveclose ( void )

◆ checkhints()

void checkhints ( void )

◆ ciao()

void ciao ( void )

References getchar(), printf, and save().

Referenced by main().

◆ closing()

void closing ( void )

◆ crc()

u_long crc ( const char * ptr,
int nr )

◆ crc_start()

void crc_start ( void )

References crcval, and step.

Referenced by restore(), and save().

◆ dark()

int dark ( void )

References cond, FALSE, here(), lamp, loc, prop, and TRUE.

Referenced by main().

◆ datime()

void datime ( int * d,
int * t )

Referenced by main(), and Start().

◆ decr()

char * decr ( int ,
int ,
int ,
int ,
int  )

◆ die()

void die ( int entry)

References closng, done, drop(), k, lamp, loc, maxdie, numdie, oil, oldlc2, oldloc, place, prop, rspeak(), toting(), water, yea, and yes().

Referenced by main().

◆ done()

void done ( int entry)

◆ drop()

void drop ( int object,
int where )

◆ dstroy()

void dstroy ( int object)

References move().

Referenced by caveclose(), closing(), main(), trdrop(), trfeed(), trkill(), and tropen().

◆ fdwarf()

◆ forced()

int forced ( int locc)

References cond, FALSE, and TRUE.

Referenced by fdwarf(), main(), and mback().

◆ getin()

void getin ( char ** wrd1,
char ** wrd2 )

References FLUSHLINE, getchar(), MAXSTR, printf, and s.

Referenced by main(), trkill(), and wizard().

◆ here()

int here ( int objj)

◆ juggle()

void juggle ( int object)

References fixed, move(), and place.

Referenced by closing(), trbridge(), trdrop(), and trtoss().

◆ liq()

int liq ( void )

References bottle, liq2(), and prop.

Referenced by dropper(), main(), trfill(), and trtake().

◆ liqloc()

int liqloc ( int locc)

References cond, l, and liq2().

Referenced by main(), and trfill().

◆ march()

◆ move()

void move ( int object,
int where )

◆ mspeak()

void mspeak ( int msg)

References mtext, and speak().

Referenced by done(), Start(), wizard(), and yesm().

◆ my_init()

void my_init ( void )

References linkdata(), poof(), and rdata().

Referenced by main().

◆ pct()

int pct ( int n)

References FALSE, ran(), and TRUE.

Referenced by fdwarf(), main(), march(), pm_draw(), and pm_drawbar().

◆ poof()

void poof ( void )

References DECR, latncy, magic, and r.

Referenced by my_init().

◆ pspeak()

void pspeak ( int m,
int skip )

◆ put()

int put ( int object,
int where,
int pval )

References move().

Referenced by caveclose().

◆ ran()

int ran ( int range)

References random().

Referenced by fdwarf(), pct(), and trtoss().

◆ rdata()

void rdata ( void )

◆ restore()

int restore ( const char * infile)

Referenced by main().

◆ rspeak()

◆ save()

int save ( const char * )

Referenced by ciao().

◆ score()

int score ( void )

◆ speak()

void speak ( const struct text * )

Referenced by done(), and main().

◆ Start()

int Start ( void )

References datime(), FALSE, latncy, mspeak(), printf, saved, savet, and wizard().

Referenced by main(), and startup().

◆ startup()

void startup ( void )

References demo, hinted, limit, newloc, Start(), and yes().

Referenced by main().

◆ toting()

int toting ( int objj)

◆ trapdel()

void trapdel ( int sig)

◆ trdrop()

◆ trfeed()

int trfeed ( void )

References axe, bear, bird, closed, dflag, dragon, dstroy(), dwarf, fixed, food, here(), obj, prop, snake, spk, tally2, and troll.

Referenced by main().

◆ trfill()

int trfill ( void )

References bottle, cond, fixed, here(), k, liq(), liqloc(), loc, obj, oil, place, prop, rspeak(), spk, toting(), and vase.

Referenced by main().

◆ trkill()

int trkill ( void )

◆ tropen()

int tropen ( void )

◆ trsay()

int trsay ( void )

References obj, printf, vocab(), wd1, and wd2.

Referenced by main().

◆ trtake()

int trtake ( void )

References bear, bird, bottle, cage, carry(), chain, fixed, here(), holdng, k, liq(), loc, obj, oil, place, plant, prop, rod, rspeak(), spk, toting(), and water.

Referenced by main().

◆ trtoss()

int trtoss ( void )

◆ vocab()

int vocab ( const char * ,
int ,
int  )

Referenced by linkdata(), main(), rvoc(), and trsay().

◆ yes()

int yes ( int x,
int y,
int z )

References FALSE, FLUSHLINE, getchar(), printf, rspeak(), TRUE, x, y, and z.

Referenced by checkhints(), die(), main(), and startup().

◆ yesm()

int yesm ( int x,
int y,
int z )

References FALSE, FLUSHLINE, getchar(), mspeak(), printf, TRUE, x, y, and z.

Referenced by wizard().

Variable Documentation

◆ abb

int abb[LOCSIZ]
extern

Referenced by main(), and march().

◆ abbnum

int abbnum

◆ actspk

int actspk[35]
extern

Referenced by main(), and rdflt().

◆ apanic

int apanic

◆ atloc

int atloc[LOCSIZ]
extern

Referenced by carry(), checkhints(), drop(), and main().

◆ attack

int attack

◆ axe

int axe

◆ back

int back

◆ batter

int batter

◆ bear

int bear

◆ bird

int bird

◆ blklin

int blklin
extern

Referenced by main(), pspeak(), and speak().

◆ bonus

int bonus

◆ bottle

int bottle

◆ cage

int cage

◆ cave

int cave

◆ chain

int chain

◆ chasm

int chasm

◆ chest

int chest

◆ chloc

int chloc
extern

Referenced by fdwarf(), and linkdata().

◆ chloc2

int chloc2

◆ clam

int clam

◆ clock1

int clock1

◆ clock2

int clock2

◆ closed

int closed

◆ closng

int closng

◆ clsses

int clsses
extern

Referenced by done(), rdata(), and rdesc().

◆ coins

int coins

◆ cond

int cond[LOCSIZ]
extern

◆ ctext

struct text ctext[CLSMAX]
extern

Referenced by done(), and rdesc().

◆ cval

int cval[CLSMAX]
extern

Referenced by done(), and rdesc().

◆ daltlc

int daltlc

◆ data_file

char data_file[]
extern

Referenced by rdata().

◆ datfd

int datfd
extern

◆ demo

int demo ( void )
extern

Referenced by main(), and startup().

◆ detail

int detail

◆ dflag

int dflag

◆ dkill

int dkill

◆ dloc

int dloc[7]

◆ door

int door

◆ dprssn

int dprssn

◆ dragon

int dragon

◆ dseen

int dseen[7]

◆ dtotal

int dtotal

◆ dwarf

int dwarf

◆ eggs

int eggs

◆ emrald

int emrald

◆ enter

int enter

◆ entrnc

int entrnc

◆ find

int find

◆ fissur

int fissur

◆ fixd

int fixd[101]
extern

◆ fixed

int fixed[101]

◆ foobar

int foobar

◆ food

int food

◆ gaveup

int gaveup

◆ grate

int grate

◆ hinted

int hinted[20]
extern

Referenced by checkhints(), main(), score(), and startup().

◆ hintlc

int hintlc[20]

◆ hints

int hints[20][5]
extern

Referenced by checkhints(), main(), main(), rhints(), and score().

◆ hntmax

int hntmax
extern

Referenced by checkhints(), rhints(), and score().

◆ holdng

int holdng

◆ invent

int invent

◆ iwest

int iwest

◆ k

int k

◆ k2

int k2

◆ keys

int keys
extern

Referenced by checkhints(), linkdata(), and tropen().

◆ knfloc

int knfloc

◆ knife

int knife

◆ kq

int kq

◆ lamp

int lamp

◆ latncy

int latncy

◆ limit

int limit

◆ linkx

int linkx[201]

◆ lmwarn

int lmwarn

◆ loc

◆ lock

int lock

◆ look

int look

◆ ltext

struct text ltext[LOCSIZ]
extern

Referenced by linkdata(), main(), and rdesc().

◆ magzin

int magzin

◆ maxdie

int maxdie

◆ maxtrs

int maxtrs
extern

Referenced by fdwarf(), linkdata(), score(), and trtoss().

◆ messag

int messag

◆ mirror

int mirror

◆ mtext

struct text mtext[MAGSIZ]
extern

Referenced by mspeak(), and rdesc().

◆ mxscor

int mxscor

◆ newloc

int newloc

◆ nugget

int nugget

◆ null

int null

◆ numdie

int numdie

◆ obj

int obj

◆ odloc

int odloc[7]

◆ oil

int oil

◆ oldlc2

int oldlc2

◆ oldloc

int oldloc

◆ oyster

int oyster

◆ pearl

int pearl

◆ pillow

int pillow

◆ plac

int plac[101]
extern

◆ place

◆ plant

int plant

◆ plant2

int plant2

◆ pour

int pour

◆ prop

int prop[101]

◆ ptext

struct text ptext[101]
extern

Referenced by linkdata(), pspeak(), rdesc(), and score().

◆ pyram

int pyram

◆ rod

int rod

◆ rod2

int rod2

◆ rtext

struct text rtext[RTXSIZ]
extern

Referenced by linkdata(), main(), rdesc(), and rspeak().

◆ rug

int rug

◆ saved

int saved
extern

Referenced by fdwarf(), linkdata(), main(), Start(), and trtoss().

◆ savet

int savet

◆ say

int say

◆ scorng

int scorng

◆ setbit

int setbit[16]
extern

Referenced by bitset(), and rliq().

◆ snake

int snake

◆ spices

int spices

◆ spk

int spk

◆ steps

int steps

◆ stext

struct text stext[LOCSIZ]
extern

Referenced by main(), and rdesc().

◆ stick

int stick

◆ stream

int stream

◆ tablet

int tablet

◆ tally

int tally

◆ tally2

int tally2

◆ throw

int throw

◆ tk

int tk[21]
extern

Referenced by fdwarf().

◆ tkk

struct travlist * tkk[LOCSIZ]

◆ travel

struct travlist * travel[LOCSIZ]

◆ tridnt

int tridnt

◆ troll

int troll

◆ troll2

int troll2

◆ turns

int turns
extern

Referenced by done(), linkdata(), and main().

◆ vase

int vase

◆ vend

int vend

◆ verb

int verb
extern

Referenced by badmove(), main(), rdflt(), trkill(), and tropen().

◆ voc

struct hashtab voc[HTSIZE]
extern

Referenced by vocab().

◆ water

int water

◆ wd1

char* wd1
extern

Referenced by main(), trkill(), and trsay().

◆ wd2

char * wd2

◆ wzdark

int wzdark

◆ yea

int yea
extern

Referenced by die(), and main().