1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-08-07 21:25:26 +01:00

Combine all Exxx_H into MEXTRA_H

This commit is contained in:
NeroOneTrueKing 2020-08-23 15:07:46 -05:00
parent 886be85042
commit 156b9dc9c3
39 changed files with 151 additions and 200 deletions

View file

@ -1,38 +0,0 @@
/* SCCS Id: @(#)edog.h 3.4 1997/10/23 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef EDOG_H
#define EDOG_H
/* various types of food, the lower, the better liked. */
#define DOGFOOD 0
#define CADAVER 1
#define ACCFOOD 2
#define MANFOOD 3
#define APPORT 4
#define POISON 5
#define UNDEF 6
#define TABU 7
struct edog {
long droptime; /* moment dog dropped object */
unsigned dropdist; /* dist of drpped obj from @ */
int apport; /* amount of training */
long whistletime; /* last time he whistled */
long hungrytime; /* will get hungry at this time */
coord ogoal; /* previous goal location */
int abuse; /* track abuses to this pet */
int revivals; /* count pet deaths */
int mhpmax_penalty; /* while starving, points reduced */
Bitfield(killed_by_u, 1); /* you attempted to kill him */
//ifdef BARD
Bitfield(friend, 1); /* tamed by song - will lose tameness */
Bitfield(waspeaceful, 1); /* was peaceful before tame song */
//endif
Bitfield(loyal, 1); /* is particularly loyal (starting pet, quest home pet) */
};
#define EDOG(mon) ((struct edog *)&(mon)->mextra[0])
#endif /* EDOG_H */

View file

@ -1,14 +0,0 @@
/* SCCS Id: @(#)emin.h 3.4 1997/05/01 */
/* Copyright (c) David Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef EMIN_H
#define EMIN_H
struct emin {
aligntyp min_align; /* alignment of minion */
};
#define EMIN(mon) ((struct emin *)&(mon)->mextra[0])
#endif /* EMIN_H */

View file

@ -1,26 +0,0 @@
/* SCCS Id: @(#)epri.h 3.4 1997/05/01 */
/* Copyright (c) Izchak Miller, 1989. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef EPRI_H
#define EPRI_H
struct epri {
aligntyp shralign; /* alignment of priest's shrine */
/* leave as first field to match emin */
schar shroom; /* index in rooms */
coord shrpos; /* position of shrine */
d_level shrlevel; /* level (& dungeon) of shrine */
boolean pbanned; /* player banned by priest */
char signspotted; /* max number of signs spotted by priest */
};
#define EPRI(mon) ((struct epri *)&(mon)->mextra[0])
/* A priest without ispriest is a roaming priest without a shrine, so
* the fields (except shralign, which becomes only the priest alignment)
* are available for reuse.
*/
#define renegade shroom
#endif /* EPRI_H */

View file

@ -1,57 +0,0 @@
/* SCCS Id: @(#)eshk.h 3.4 1997/05/01 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef ESHK_H
#define ESHK_H
#define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */
#define BILLSZ 200
struct bill_x {
unsigned bo_id;
boolean useup;
long price; /* price per unit */
long bquan; /* amount used up */
};
struct eshk {
long robbed; /* amount stolen by most recent customer */
long credit; /* amount credited to customer */
long debit; /* amount of debt for using unpaid items */
long loan; /* shop-gold picked (part of debit) */
int shoptype; /* the value of rooms[shoproom].rtype */
schar shoproom; /* index in rooms; set by inshop() */
schar unused; /* to force alignment for stupid compilers */
boolean following; /* following customer since he owes us sth */
boolean surcharge; /* angry shk inflates prices */
boolean pbanned; /* player is banned from the shop */
char signspotted; /* max number of signs spotted by shopkeeper */
coord shk; /* usual position shopkeeper */
coord shd; /* position shop door */
d_level shoplevel; /* level (& dungeon) of his shop */
int billct; /* no. of entries of bill[] in use */
struct bill_x bill[BILLSZ];
struct bill_x *bill_p;
int visitct; /* nr of visits by most recent customer */
char customer[PL_NSIZ]; /* most recent customer */
char shknam[PL_NSIZ];
#ifdef OTHER_SERVICES
long services; /* Services offered */
#define SHK_ID_BASIC 00001L
#define SHK_ID_PREMIUM 00002L
#define SHK_UNCURSE 00010L
#define SHK_APPRAISE 00100L
#define SHK_SPECIAL_A 01000L
#define SHK_SPECIAL_B 02000L
#define SHK_SPECIAL_C 04000L
#endif
};
#define ESHK(mon) ((struct eshk *)&(mon)->mextra[0])
#define NOTANGRY(mon) ((mon)->mpeaceful)
#define ANGRY(mon) (!NOTANGRY(mon))
#endif /* ESHK_H */

View file

@ -4,18 +4,6 @@
#ifndef EHOR_H
#define EHOR_H
struct ehor {
/* allocated memory for a random name */
char randname[40];
/* standard data to base this horror off of */
struct permonst basehorrordata;
/* current and modifiable memory (for zombified, etc) */
struct permonst currhorrordata;
};
#define EHOR(mon) ((struct ehor *)&(mon)->mextra[0])
/* How horrors are made */
static int randWeaponAttackTypes[] =
{

117
include/mextra.h Normal file
View file

@ -0,0 +1,117 @@
/* SCCS Id: @(#)mextra.h 3.4 1992/11/14 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef MEXTRA_H
#define MEXTRA_H
/* various types of food, the lower, the better liked. */
#define DOGFOOD 0
#define CADAVER 1
#define ACCFOOD 2
#define MANFOOD 3
#define APPORT 4
#define POISON 5
#define UNDEF 6
#define TABU 7
struct edog {
long droptime; /* moment dog dropped object */
unsigned dropdist; /* dist of drpped obj from @ */
int apport; /* amount of training */
long whistletime; /* last time he whistled */
long hungrytime; /* will get hungry at this time */
coord ogoal; /* previous goal location */
int abuse; /* track abuses to this pet */
int revivals; /* count pet deaths */
int mhpmax_penalty; /* while starving, points reduced */
Bitfield(killed_by_u, 1); /* you attempted to kill him */
//ifdef BARD
Bitfield(friend, 1); /* tamed by song - will lose tameness */
Bitfield(waspeaceful, 1); /* was peaceful before tame song */
//endif
Bitfield(loyal, 1); /* is particularly loyal (starting pet, quest home pet) */
};
#define EDOG(mon) ((struct edog *)&(mon)->mextra[0])
struct ehor {
/* allocated memory for a random name */
char randname[40];
/* standard data to base this horror off of */
struct permonst basehorrordata;
/* current and modifiable memory (for zombified, etc) */
struct permonst currhorrordata;
};
#define EHOR(mon) ((struct ehor *)&(mon)->mextra[0])
struct emin {
aligntyp min_align; /* alignment of minion */
};
#define EMIN(mon) ((struct emin *)&(mon)->mextra[0])
struct epri {
aligntyp shralign; /* alignment of priest's shrine */
/* leave as first field to match emin */
schar shroom; /* index in rooms */
coord shrpos; /* position of shrine */
d_level shrlevel; /* level (& dungeon) of shrine */
boolean pbanned; /* player banned by priest */
char signspotted; /* max number of signs spotted by priest */
};
#define EPRI(mon) ((struct epri *)&(mon)->mextra[0])
/* A priest without ispriest is a roaming priest without a shrine, so
* the fields (except shralign, which becomes only the priest alignment)
* are available for reuse.
*/
#define renegade shroom
#define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */
#define BILLSZ 200
struct bill_x {
unsigned bo_id;
boolean useup;
long price; /* price per unit */
long bquan; /* amount used up */
};
struct eshk {
long robbed; /* amount stolen by most recent customer */
long credit; /* amount credited to customer */
long debit; /* amount of debt for using unpaid items */
long loan; /* shop-gold picked (part of debit) */
int shoptype; /* the value of rooms[shoproom].rtype */
schar shoproom; /* index in rooms; set by inshop() */
schar unused; /* to force alignment for stupid compilers */
boolean following; /* following customer since he owes us sth */
boolean surcharge; /* angry shk inflates prices */
boolean pbanned; /* player is banned from the shop */
char signspotted; /* max number of signs spotted by shopkeeper */
coord shk; /* usual position shopkeeper */
coord shd; /* position shop door */
d_level shoplevel; /* level (& dungeon) of his shop */
int billct; /* no. of entries of bill[] in use */
struct bill_x bill[BILLSZ];
struct bill_x *bill_p;
int visitct; /* nr of visits by most recent customer */
char customer[PL_NSIZ]; /* most recent customer */
char shknam[PL_NSIZ];
#ifdef OTHER_SERVICES
long services; /* Services offered */
#define SHK_ID_BASIC 00001L
#define SHK_ID_PREMIUM 00002L
#define SHK_UNCURSE 00010L
#define SHK_APPRAISE 00100L
#define SHK_SPECIAL_A 01000L
#define SHK_SPECIAL_B 02000L
#define SHK_SPECIAL_C 04000L
#endif
};
#define ESHK(mon) ((struct eshk *)&(mon)->mextra[0])
/* TODO: deprecate these */
#define NOTANGRY(mon) ((mon)->mpeaceful)
#define ANGRY(mon) (!NOTANGRY(mon))
#endif /* MEXTRA_H */

View file

@ -5,7 +5,7 @@
/* various code that was replicated in *main.c */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#include "artifact.h"
#include "xhity.h"
#ifdef OVLB

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#ifdef OVLB

View file

@ -4,9 +4,7 @@
#include "hack.h"
#include "artifact.h"
#include "emin.h"
#include "epri.h"
#include "edog.h"
#include "mextra.h"
#include "xhity.h"
#ifdef OVLB
#include "artilist.h"

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
/* #define DEBUG */ /* turn on for diagnostics */
#ifdef OVLB

View file

@ -3,10 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "emin.h"
#include "epri.h"
#include "mextra.h"
#ifdef OVLB
STATIC_DCL int NDECL(pet_type);

View file

@ -5,7 +5,7 @@
#include "hack.h"
#include "mfndpos.h"
#include "edog.h"
#include "mextra.h"
extern boolean notonhead;
extern struct obj *propellor;

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "eshk.h"
#include "mextra.h"
#define is_bigfoot(x) ((x) == &mons[PM_SASQUATCH])
#define martial() (martial_bonus() || is_bigfoot(youracedata) || \

View file

@ -5,7 +5,7 @@
/* Contains code for 't' (throw) */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#include "xhity.h"
extern void NDECL(autoquiver);

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "eshk.h"
#include "mextra.h"
#include "artifact.h"
/* #define DEBUG */ /* uncomment to enable new eat code debugging */

View file

@ -5,7 +5,7 @@
#define NEED_VARARGS /* comment line for pre-compiled headers */
#include "hack.h"
#include "eshk.h"
#include "mextra.h"
#ifndef NO_SIGNAL
#include <signal.h>
#endif

View file

@ -3,10 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "epri.h"
#include "emin.h"
#include "edog.h"
#include "ehor.h"
#include "mextra.h"
#ifdef REINCARNATION
#include <ctype.h>
#endif

View file

@ -3,8 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "emin.h"
#include "epri.h"
#include "mextra.h"
#include "artifact.h"
extern const int monstr[];

View file

@ -12,7 +12,7 @@
#include "hack.h"
#include "mfndpos.h"
#include "edog.h"
#include "mextra.h"
#include "artifact.h"
#include <ctype.h>
#include <stdlib.h>

View file

@ -3,10 +3,8 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "eshk.h"
#include "epri.h"
#include "ehor.h"
#include "mextra.h"
#include "horrordata.h"
/* These routines provide basic data for any type of monster. */
STATIC_DCL void FDECL(set_template_data, (struct permonst *, struct permonst *, int));
STATIC_DCL struct permonst * FDECL(permonst_of, (int, int));

View file

@ -5,9 +5,7 @@
#include "hack.h"
#include "mfndpos.h"
#include "artifact.h"
#include "epri.h"
#include "edog.h"
#include "mextra.h"
extern boolean notonhead;
#ifdef OVL0

View file

@ -6,10 +6,8 @@
#include "permonst.h"
#include "monsym.h"
#include "dungeon.h" /* prerequisite for eshk,vault,epri */
#include "eshk.h"
#include "mextra.h"
#include "vault.h"
#include "epri.h"
#define NO_ATTK {0,0,0,0}
#ifdef C

View file

@ -7,7 +7,7 @@
*/
#include "hack.h"
#include "edog.h"
#include "mextra.h"
extern const int monstr[];

View file

@ -32,7 +32,7 @@
#include "hack.h"
#ifdef BARD
#include "skills.h"
#include "edog.h"
#include "mextra.h"
#endif
STATIC_DCL void FDECL(awaken_monsters,(int));

View file

@ -8,7 +8,7 @@
#include "hack.h"
#include "dlb.h"
#ifdef BARD
#include "edog.h"
#include "mextra.h"
#endif
STATIC_DCL boolean FDECL(is_swallow_sym, (int));

View file

@ -4,9 +4,8 @@
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
#include "hack.h"
#include "epri.h"
#include "mextra.h"
#ifdef WIZARD
#include "edog.h"
#endif
#ifdef OVLB

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "epri.h"
#include "mextra.h"
#include "artifact.h"
#include "artilist.h"

View file

@ -4,10 +4,7 @@
#include "hack.h"
#include "mfndpos.h"
#include "eshk.h"
#include "epri.h"
#include "emin.h"
#include "mextra.h"
/* this matches the categorizations shown by enlightenment */
#define ALGN_SINNED (-4) /* worse than strayed */

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#include "artifact.h"
/* KMH -- Copied from pray.c; this really belongs in a header file */

View file

@ -1,5 +1,5 @@
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#include "seduce.h"
# ifdef SEDUCE

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "eshk.h"
#include "mextra.h"
/*#define DEBUG*/

View file

@ -5,7 +5,7 @@
/* shknam.c -- initialize a shop */
#include "hack.h"
#include "eshk.h"
#include "mextra.h"
#ifndef OVLB
extern const struct shclass shtypes[];

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#ifdef USER_SOUNDS
# ifdef USER_SOUNDS_REGEX
#include <regex.h>

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#ifdef STEED

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#include "artifact.h"
struct trobj {

View file

@ -9,7 +9,7 @@
#include "hack.h"
#include "qtext.h"
#include "epri.h"
#include "mextra.h"
extern const int monstr[];

View file

@ -1,7 +1,7 @@
#include "hack.h"
#include "artifact.h"
#include "monflag.h"
#include "edog.h"
#include "mextra.h"
#include "xhity.h"
#ifdef OVLB

View file

@ -5,7 +5,7 @@
#include "hack.h"
#include "artifact.h"
#include "monflag.h"
#include "edog.h"
#include "mextra.h"
#include "xhity.h"
extern boolean notonhead;

View file

@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
#include "edog.h"
#include "mextra.h"
#include "xhity.h"
/* Disintegration rays have special treatment; corpses are never left.