9 unit_t units
[MAX_UNITS
];
10 house_t houses
[MAX_HOUSES
];
14 pool_t pools
[MAX_POOLS
];
17 faction_t factions
[8];
21 const char housetabs_names
[MAX_HOUSETABS
][80] = {
22 "Info", "Items", "Visitors", "Research", "Upgrade", "Home"
24 const char unittabs_names
[MAX_UNITTABS
][80] = {
25 "Info", "Stats", "Skills", "Items", "Runes", "Home"
28 const char desire_names
[MAX_DESIRES
][80] = {
29 "None", "Rune", "Gold", "Power", "Love", "Protect", "Destroy", "Killall", "Helpall",
31 const char start_names
[MAX_STRATEGIES
][80] = {
32 "None", "Work", "Hunt", "Kill", "Heal", "Hide"
34 const char tact_names
[MAX_TACTICS
][80] = {
35 "None", "Mine", "Build", "Repair", "Train", "Buy", "Charm", "Attack", "Hide", "Run"
37 const char modus_names
[MAX_MODUS
][80] = {
41 const char stat_names
[MAX_STAT
][80] = {
42 "STR", "DEX", "CON", "INT", "MET", "CHR",
45 const char stat_long_names
[MAX_STAT
][80] = {
46 "Strength", "Dexterity", "Constitution", "Intelligence",
47 "Metablosim", "Charisma"
50 const char stat_descriptions
[MAX_STAT
][1024] = {
54 /* INT */ "Improves magic ability,\nmemory and wits.",
59 const char state_names
[4][80] = {
60 "Free Man", "Devotee", "Vector", "Rune Lord"
63 Uint8 scent_human
[LEVEL_H
][LEVEL_W
];
65 Uint8 fog
[LEVEL_H
][LEVEL_W
] = { { 1 } }; /* could be condensed to 1-bpp */
67 int flag_grid_i
[LEVEL_H
][LEVEL_W
];
68 int unit_grid_i
[LEVEL_H
][LEVEL_W
];
69 int house_grid_i
[LEVEL_H
][LEVEL_W
];
71 unit_t
* unit_grid
[LEVEL_H
][LEVEL_W
];
72 house_t
* house_grid
[LEVEL_H
][LEVEL_W
];
78 void log_reset(log_t
*log
) {
80 memset(log
, 0, sizeof(log_t
));
84 void log_add(log_t
*log
, const char *buf
) {
88 //TODO: make a circular buffer
89 if (log
->num
>= LOG_MESSAGE_MAX
- 1) {
90 for (i
= 1; i
< log
->num
; i
++) {
91 memcpy(log
->message
[i
- 1], log
->message
[i
], 256);
98 strncpy(log
->message
[i
], buf
, sizeof(log
->message
[i
]));
105 void log_addf(log_t
*log
, char *fmt
, ...) {
109 va_start(argptr
, fmt
);
111 vsnprintf(buffer
, sizeof(buffer
), fmt
, argptr
);
115 log_add(log
, buffer
);