File: attrib.h

package info (click to toggle)
gnomehack 1.0.5-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 10,256 kB
  • ctags: 12,966
  • sloc: ansic: 119,783; yacc: 2,002; sh: 610; lex: 417; makefile: 397
file content (52 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*	SCCS Id: @(#)attrib.h	3.2	90/22/02	*/
/* Copyright 1988, Mike Stephenson				  */
/* NetHack may be freely redistributed.  See license for details. */

/*	attrib.h - Header file for character class processing. */

#ifndef ATTRIB_H
#define ATTRIB_H

#define A_STR	0
#define A_INT	1
#define A_WIS	2
#define A_DEX	3
#define A_CON	4
#define A_CHA	5

#define A_MAX	6	/* used in rn2() selection of attrib */

#define ABASE(x)	(u.acurr.a[x])
#define ABON(x)		(u.abon.a[x])
#define AEXE(x)		(u.aexe.a[x])
#define ACURR(x)	(acurr(x))
#define ACURRSTR	(acurrstr())
/* should be: */
/* #define ACURR(x) (ABON(x) + ATEMP(x) + (u.umonnum == -1) ? ABASE(x) : MBASE(x)) */
#define MCURR(x)	(u.macurr.a[x])
#define AMAX(x)		(u.amax.a[x])
#define MMAX(x)		(u.mamax.a[x])

#define ATEMP(x)	(u.atemp.a[x])
#define ATIME(x)	(u.atime.a[x])

struct	attribs {
	schar	a[A_MAX];
};

extern struct attribs attrmax, attrmin;

#define ATTRMAX(x) (attrmax.a[x])
#define ATTRMIN(x) (attrmin.a[x])

/* hunger values - from eat.c */
#define SATIATED        0
#define NOT_HUNGRY      1
#define HUNGRY          2 
#define WEAK            3
#define FAINTING        4
#define FAINTED         5
#define STARVED         6


#endif /* ATTRIB_H */