diff --git a/src/doors/dgnlance/combat.h b/src/doors/dgnlance/combat.h index ff37b18b950f6b87b27b0a1cbc6f7d640ba39deb..b901eda4d36b94beb1bf026635b9fe379ce801f9 100644 --- a/src/doors/dgnlance/combat.h +++ b/src/doors/dgnlance/combat.h @@ -1,9 +1,9 @@ -#ifndef _COMBAT_H_ -#define _COMBAT_H_ - -#include "dgnlnce.h" - -void afight(int lev); -void doggie(void); - -#endif +#ifndef _COMBAT_H_ +#define _COMBAT_H_ + +#include "dgnlnce.h" + +void afight(int lev); +void doggie(void); + +#endif diff --git a/src/doors/dgnlance/dgnlnce.h b/src/doors/dgnlance/dgnlnce.h index 3a0ba6fec66e58295161c7ae940d1d7e8781ad76..24949fff878e2bfaea8c4a87eb18bf53f3c57035 100644 --- a/src/doors/dgnlance/dgnlnce.h +++ b/src/doors/dgnlance/dgnlnce.h @@ -1,101 +1,101 @@ -#ifndef _DGNLNCE_H_ -#define _DGNLNCE_H_ - -#include <stdio.h> - -#include "xp64.h" -#include "OpenDoor.h" - -#define FIGHTS_PER_DAY 10 -#define BATTLES_PER_DAY 3 -#define FLIGHTS_PER_DAY 3 - -#define DEAD 1<<0 -#define ONLINE 1<<1 - -/* Status for opponent */ -enum { - MONSTER - ,PLAYER -}; - -/* Used for sextrings() */ -enum { - HE - ,HIS - ,HIM -}; - -struct playertype { - char name[31]; /* Name from BBS drop file */ - char pseudo[31]; /* In-game pseudonym */ - char killer[31]; /* Person killed by (if status==DEAD) */ - char bcry[61]; /* Battle Cry */ - char winmsg[61]; /* What you say when you win a battle */ - char gaspd[61]; /* Dying curse */ - char laston[11]; /* Last date one */ - char sex; /* Characters sex */ - DWORD status; /* Status alive or dead for player - * records, PLAYER or MONSTER for - * opponent record (record 0) */ - /* ToDo make configurable */ - WORD flights; /* Weird thing... may be number of - * times game can be ran per day */ - WORD plus; /* Weapon Bonus - Not currently Used */ - WORD r; /* Level */ - WORD strength; /* Str */ - WORD intelligence; /* Int */ - WORD dexterity; /* Dex */ - WORD constitution; /* Con */ - WORD charisma; /* Cha */ - QWORD experience; /* Exp */ - WORD luck; /* Luk */ - WORD weapon; /* Weapon Number */ - WORD armour; /* Armour Number */ - WORD hps; /* Hit Points */ - WORD damage; /* Damage taken so far */ - QWORD gold; /* Gold on hand */ - QWORD bank; /* Gold in bank */ - WORD attack; /* Weapon Attack */ - WORD power; /* Weapon Power */ - QWORD wins; /* Wins so far */ - QWORD loses; /* Losses so far */ - WORD battles; /* Battles left today */ - WORD fights; /* Fights left today */ - /* Players variance... applied to various rolls, Generally, how good the - * player is feeling. Is set at start and not modified */ - double vary; -}; - -struct weapon { - char name[31]; - WORD attack; - WORD power; - DWORD cost; -}; - -struct armour { - char name[31]; - DWORD cost; -}; - - -extern struct playertype player[3]; -/* player[1] is the current user */ -#define user player[1] -/* player[0] is the current enemy */ -#define opp player[0] -/* player[2] is the temporary user */ -#define tmpuser player[2] - -/* In these arrays, 0 isn't actually used */ -extern QWORD required[29]; /* Experience required for each level */ -extern struct weapon weapon[26]; -extern struct armour armour[26]; -extern const char dots[]; -FILE *infile; /* Current input file */ - -/* Utility macros */ -#define nl() od_disp_str("\r\n"); - -#endif +#ifndef _DGNLNCE_H_ +#define _DGNLNCE_H_ + +#include <stdio.h> + +#include "xp64.h" +#include "OpenDoor.h" + +#define FIGHTS_PER_DAY 10 +#define BATTLES_PER_DAY 3 +#define FLIGHTS_PER_DAY 3 + +#define DEAD 1<<0 +#define ONLINE 1<<1 + +/* Status for opponent */ +enum { + MONSTER + ,PLAYER +}; + +/* Used for sextrings() */ +enum { + HE + ,HIS + ,HIM +}; + +struct playertype { + char name[31]; /* Name from BBS drop file */ + char pseudo[31]; /* In-game pseudonym */ + char killer[31]; /* Person killed by (if status==DEAD) */ + char bcry[61]; /* Battle Cry */ + char winmsg[61]; /* What you say when you win a battle */ + char gaspd[61]; /* Dying curse */ + char laston[11]; /* Last date one */ + char sex; /* Characters sex */ + DWORD status; /* Status alive or dead for player + * records, PLAYER or MONSTER for + * opponent record (record 0) */ + /* ToDo make configurable */ + WORD flights; /* Weird thing... may be number of + * times game can be ran per day */ + WORD plus; /* Weapon Bonus - Not currently Used */ + WORD r; /* Level */ + WORD strength; /* Str */ + WORD intelligence; /* Int */ + WORD dexterity; /* Dex */ + WORD constitution; /* Con */ + WORD charisma; /* Cha */ + QWORD experience; /* Exp */ + WORD luck; /* Luk */ + WORD weapon; /* Weapon Number */ + WORD armour; /* Armour Number */ + WORD hps; /* Hit Points */ + WORD damage; /* Damage taken so far */ + QWORD gold; /* Gold on hand */ + QWORD bank; /* Gold in bank */ + WORD attack; /* Weapon Attack */ + WORD power; /* Weapon Power */ + QWORD wins; /* Wins so far */ + QWORD loses; /* Losses so far */ + WORD battles; /* Battles left today */ + WORD fights; /* Fights left today */ + /* Players variance... applied to various rolls, Generally, how good the + * player is feeling. Is set at start and not modified */ + double vary; +}; + +struct weapon { + char name[31]; + WORD attack; + WORD power; + DWORD cost; +}; + +struct armour { + char name[31]; + DWORD cost; +}; + + +extern struct playertype player[3]; +/* player[1] is the current user */ +#define user player[1] +/* player[0] is the current enemy */ +#define opp player[0] +/* player[2] is the temporary user */ +#define tmpuser player[2] + +/* In these arrays, 0 isn't actually used */ +extern QWORD required[29]; /* Experience required for each level */ +extern struct weapon weapon[26]; +extern struct armour armour[26]; +extern const char dots[]; +FILE *infile; /* Current input file */ + +/* Utility macros */ +#define nl() od_disp_str("\r\n"); + +#endif diff --git a/src/doors/dgnlance/fileutils.h b/src/doors/dgnlance/fileutils.h index 3c116de6b61cfce6e72c90a519b7ae652290f89b..d23579785378c229771b7df746eea75c0431946a 100644 --- a/src/doors/dgnlance/fileutils.h +++ b/src/doors/dgnlance/fileutils.h @@ -1,11 +1,11 @@ -#ifndef _FILEUTILS_H_ -#define _FILEUTILS_H_ - -#include "xp64.h" - -char *readline(char *buf, size_t size, FILE *infile); -void endofline(FILE *infile); -QWORD readnumb(QWORD deflt, FILE *infile); -double readfloat(float deflt, FILE *infile); - -#endif \ No newline at end of file +#ifndef _FILEUTILS_H_ +#define _FILEUTILS_H_ + +#include "xp64.h" + +char *readline(char *buf, size_t size, FILE *infile); +void endofline(FILE *infile); +QWORD readnumb(QWORD deflt, FILE *infile); +double readfloat(float deflt, FILE *infile); + +#endif diff --git a/src/doors/dgnlance/userfile.h b/src/doors/dgnlance/userfile.h index f77672f678db2b1081ce6807fa0737dd98018207..b9274c5ca529521e05c37dacaf38489e7a988314 100644 --- a/src/doors/dgnlance/userfile.h +++ b/src/doors/dgnlance/userfile.h @@ -1,12 +1,12 @@ -#ifndef _USERFILE_H_ -#define _USERFILE_H_ - -#include "OpenDoor.h" /* BOOL */ -#include "dgnlnce.h" /* struct playertype */ - -void writenextuser(struct playertype * plr, FILE * outfile); -void saveuser(struct playertype * plr); -BOOL loadnextuser(struct playertype * plr, FILE *infile); -BOOL loaduser(char *name, BOOL bbsname, struct playertype * plr); - -#endif +#ifndef _USERFILE_H_ +#define _USERFILE_H_ + +#include "OpenDoor.h" /* BOOL */ +#include "dgnlnce.h" /* struct playertype */ + +void writenextuser(struct playertype * plr, FILE * outfile); +void saveuser(struct playertype * plr); +BOOL loadnextuser(struct playertype * plr, FILE *infile); +BOOL loaduser(char *name, BOOL bbsname, struct playertype * plr); + +#endif diff --git a/src/doors/dgnlance/utils.h b/src/doors/dgnlance/utils.h index 4fda5adbe09c982c54220c40f72fa73eaf7e658d..1ecfe5c0061f31681ab3617f13e74210b8ba73e7 100644 --- a/src/doors/dgnlance/utils.h +++ b/src/doors/dgnlance/utils.h @@ -1,9 +1,9 @@ -#ifndef _UTILS_H_ -#define _UTILS_H_ - -double supplant(void); -void statshow(void); -void pausescr(void); -char *sexstrings(struct playertype * plr, int type, BOOL cap); - -#endif \ No newline at end of file +#ifndef _UTILS_H_ +#define _UTILS_H_ + +double supplant(void); +void statshow(void); +void pausescr(void); +char *sexstrings(struct playertype * plr, int type, BOOL cap); + +#endif