10 #define MAX_HOUSES 128
11 #define MAX_FLAGS 64 /* (per faction) */
13 #define MAX_POOLS MAX_UNITS
26 #define ANIM_BUILDING 0
35 #define UAXIS_FACEFRAME 3
42 #define HACT_UNLOAD_GOLD 0x0001
43 #define HACT_UNLOAD_ORE 0x0002
44 #define HACT_XXX1 0x0004
45 #define HACT_XXX2 0x0008
46 #define HACT_XXX3 0x0010
47 #define HACT_XXX5 0x0020
48 #define HACT_XXX6 0x0040
49 #define HACT_XXX7 0x0080
51 //#define DEBUG_PATHFIND
53 /* How much "energy" various unit actions cost */
55 #define ECOST_VISIT 10
58 typedef enum MoveMethod
{
59 Walk
, Ride
, Fly
, Trample
, Skyride
,
61 typedef enum AttackMethod
{
62 Melee
, Ranged
, Cast
, Talk
64 typedef enum SpellType
{
65 None
, Heal
, Enchant
, Descent
, Burry
, Summon
, Protect
, Earthskin
67 typedef enum PerceptionMethod
{
72 #define LEN_UNIT_ID 32
73 #define LEN_UNIT_TITLE 80
74 #define LEN_UNIT_NAME 80
76 #define LEN_HOUSE_ID 32
77 #define LEN_HOUSE_TITLE 80
78 #define LEN_HOUSE_NAME 80
80 #define LEN_FACTION_TITLE 80
82 #define MAX_UNITTABS 6
83 #define MAX_HOUSETABS 6
87 #define SCENT_ANIMAL 1
103 #define SPELL_MAGICMISSILE 0
105 #define SPELL_ENCHANT 2
106 #define SPELL_DESCENT 3
107 #define SPELL_BURRY 4
117 #define MAX_PARAMS (MAX_STAT + MAX_STAT)
119 #define HMENU_ITEMS 10
121 #define MAX_RESOURCES 7
124 #define RES_FORCIBLE 2
130 typedef struct house_p house_p
;
131 typedef struct house_t house_t
;
132 typedef struct unit_t unit_t
;
133 typedef struct unit_p unit_p
;
135 typedef struct faction_t faction_t
;
136 typedef struct flag_t flag_t
;
138 typedef struct pool_t pool_t
;
159 char title
[LEN_FACTION_TITLE
];
168 flag_t flags
[MAX_FLAGS
];
173 char id
[LEN_UNIT_ID
];
174 char title
[LEN_UNIT_TITLE
];
177 Sint8 base_stat
[MAX_STAT
];
182 PerceptionMethod perc
;
184 Uint8 base_scent
[MAX_SCENT
];
197 char id
[LEN_HOUSE_ID
];
198 char title
[LEN_HOUSE_TITLE
];
214 char title
[LEN_HOUSE_TITLE
];
223 Sint8 flag_id
[MAX_FACTIONS
]; /* Back-ref to assigned flags */
231 Uint8 built
; /* Construction finished */
234 Sint8 framecnt
; /* Frame counter */
235 Uint8 frame
; /* Current animation frame */
236 Uint8
*axis_refs
[MAX_AAXIS
]; /* reservered */
242 Sint8 base_stat
[MAX_STAT
];
243 Sint8 rune_stat
[MAX_STAT
];
244 Sint8 calc_stat
[MAX_STAT
];
246 Uint8 stat_bid
[MAX_STAT
];
248 char name
[LEN_UNIT_NAME
];
263 house_t
*visiting
; /* link to container house (i.e. "gold mine") */
265 unit_t
*inside
; /* link to container unit (i.e. "transport ship") */
266 Uint8 capacity
; /* number of child units this can hold */
283 Sint8 faction
; /* Faction id */
284 Sint8 flag_id
[MAX_FACTIONS
];
288 Uint8 top_desire
; /* AI-related */
295 Uint8 block
; /* Useless variable to mark during iteration to avoid endless recursion */
298 Uint8 ref_count
[MAX_STAT
];
308 #ifdef DEBUG_PATHFIND
309 long d
[256000]; /* d[i] is the length of the shortest path between the source (s) and node i */
310 int prev
[256000]; /* prev[i] is the node that comes right before i in the shortest path from the source to i*/
319 Uint8
*axis_refs
[MAX_AAXIS
]; /* reservered */