Make get_path() not so stack-abusive.
[runemen.git] / src / game.h
bloba5b263b7a6fdfa81137d11a104b4c67f98660751
1 #ifndef _RUNE_GAME_H
2 #define _RUNE_GAME_H
4 #include "rune.h"
5 #include "runeconf.h"
7 /* Static data */
8 extern const char stat_names[MAX_STAT][80];
9 extern const char stat_long_names[MAX_STAT][80];
10 extern const char stat_descriptions[MAX_STAT][1024];
12 extern const char state_names[4][80];
14 /* Level data */
15 /* TODO: put it into a struct */
16 #define LEVEL_W 32
17 #define LEVEL_H 32
19 extern int level_w;
20 extern int level_h;
22 extern unit_t units[MAX_UNITS];
23 extern house_t houses[MAX_HOUSES];
24 extern int num_houses;
25 extern int num_units;
27 extern pool_t pools[MAX_POOLS];
28 extern int num_pools;
30 extern faction_t factions[8];
32 extern unit_t* unit_grid[LEVEL_H][LEVEL_W];
33 extern house_t* house_grid[LEVEL_H][LEVEL_W];
35 extern Uint8 scent_human[LEVEL_H][LEVEL_W];
36 extern Uint8 fog[LEVEL_H][LEVEL_W];
38 /* ... */
39 extern int xcollide(Uint32 tx, Uint32 ty, Uint8 w, Uint8 h);
41 /* ... */
42 #define LOG_MESSAGE_MAX 16
44 typedef struct log_t {
46 char message[LOG_MESSAGE_MAX][256];
47 Uint32 age[LOG_MESSAGE_MAX];
48 Uint32 color[LOG_MESSAGE_MAX];
50 int num;
51 int head;
52 int tail;
54 } log_t;
56 extern log_t gamelog;
58 extern void log_reset(log_t *log);
59 extern void log_add(log_t *log, const char *buf);
60 extern void log_addf(log_t *log, char *fmt, ...);
62 #endif