[BACK]Return to phantstruct.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / games / phantasia

File: [cvs.NetBSD.org] / src / games / phantasia / phantstruct.h (download)

Revision 1.5, Tue Feb 15 12:58:21 2005 UTC (9 years, 10 months ago) by jsm
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, mjf-devfs2-base, mjf-devfs2, matt-premerge-20091211, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver, abandoned-netbsd-4-base, abandoned-netbsd-4, HEAD
Changes since 1.4: +3 -1 lines

Don't presume phantasia's internal bool (char) is the same as that in
curses.h: define phbool and use it where necessary to avoid declaring
functions with one bool and defining them with the other.

Reviewed by <hubertf>.

/*	$NetBSD: phantstruct.h,v 1.5 2005/02/15 12:58:21 jsm Exp $	*/

#define bool char
/* phbool is used when we need this version of bool after <curses.h>.  */
#define phbool char

/*
 * phantstruct.h - structure definitions for Phantasia
 */

struct	player	    	/* player statistics */
    {
    double	p_experience;	/* experience */
    double	p_level;    	/* level */
    double	p_strength;	/* strength */
    double	p_sword;	/* sword */
    double	p_might;	/* effect strength */
    double	p_energy;	/* energy */
    double	p_maxenergy;	/* maximum energy */
    double	p_shield;	/* shield */
    double	p_quickness;	/* quickness */
    double	p_quksilver;	/* quicksilver */
    double	p_speed;	/* effective quickness */
    double	p_magiclvl;	/* magic level */
    double	p_mana;		/* mana */
    double	p_brains;	/* brains */
    double	p_poison;	/* poison */
    double	p_gold;		/* gold */
    double	p_gems;		/* gems */
    double	p_sin;		/* sin */
    double	p_x;	    	/* x coord */
    double	p_y;	    	/* y coord */
    double	p_1scratch,
		p_2scratch;	/* variables used for decree, player battle */

    struct
	{
	short	ring_type;	/* type of ring */
	short	ring_duration;	/* duration of ring */
	bool	ring_inuse;	/* ring in use flag */
	}	p_ring;	    	/* ring stuff */

    long	p_age;		/* age of player */

    int		p_degenerated;	/* age/3000 last degenerated */

    short	p_type;		/* character type */
    short	p_specialtype;	/* special character type */
    short	p_lives;	/* multiple lives for council, valar */
    short	p_crowns;	/* crowns */
    short	p_charms;	/* charms */
    short	p_amulets;	/* amulets */
    short	p_holywater;   	/* holy water */
    short	p_lastused;	/* day of year last used */
    short	p_status;	/* playing, cloaked, etc. */
    short	p_tampered;	/* decree'd, etc. flag */
    short	p_istat;	/* used for inter-terminal battle */

    bool	p_palantir;	/* palantir */
    bool	p_blessing;	/* blessing */
    bool	p_virgin;	/* virgin */
    bool	p_blindness;	/* blindness */

    char	p_name[SZ_NAME];	/* name */
    char	p_password[SZ_PASSWORD];/* password */
    char	p_login[SZ_LOGIN];	/* login */
    };

struct	monster	    	/* monster stats */
    {
    double	m_strength;	/* strength */
    double	m_brains;	/* brains */
    double	m_speed;	/* speed */
    double	m_energy;	/* energy */
    double	m_experience;	/* experience */
    double	m_flock;    	/* % chance of flocking */

    double	m_o_strength;	/* original strength */
    double	m_o_speed;	/* original speed */
    double	m_maxspeed;	/* maximum speed */
    double	m_o_energy;	/* original energy */
    double	m_melee;	/* melee damage */
    double	m_skirmish;	/* skirmish damage */

    int		m_treasuretype;	/* treasure type */
    int		m_type;	    	/* special type */

    char	m_name[26];	/* name */
    };

struct	energyvoid     	/* energy void */
    {
    double	ev_x;		/* x coordinate */
    double	ev_y;		/* y coordinate */
    bool	ev_active;	/* active or not */
    };

struct	scoreboard			/* scoreboard entry */
    {
    double	sb_level;		/* level of player */
    char	sb_type[4];		/* character type of player */
    char	sb_name[SZ_NAME];	/* name of player */
    char	sb_login[SZ_LOGIN];	/* login of player */
    };

struct	charstats			/* character type statistics */
    {
    double	c_maxbrains;		/* max brains per level */
    double	c_maxmana;		/* max mana per level */
    double	c_weakness;		/* how strongly poison affects player */
    double	c_goldtote;		/* how much gold char can carry */
    int		c_ringduration;		/* bad ring duration */
    struct
	{
	double	base;		/* base for roll */
	double	interval;	/* interval for roll */
	double	increase;	/* increment per level */
	} c_quickness,		/* quickness */
	  c_strength,		/* strength */
	  c_mana,		/* mana */
	  c_energy,		/* energy level */
	  c_brains,		/* brains */
	  c_magiclvl;		/* magic level */
    };

struct menuitem				/* menu item for purchase */
    {
    const char	*item;		/* menu item name */
    double	cost;		/* cost of item */
    };