2016-11-01 17:25:52 +01:00
|
|
|
#pragma once
|
2015-09-12 22:49:43 +02:00
|
|
|
|
|
|
|
#ifndef H_GUARD
|
|
|
|
#define H_GUARD
|
2017-01-10 16:31:05 +01:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2015-09-12 22:49:43 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct unit;
|
2016-10-26 14:37:57 +02:00
|
|
|
struct region;
|
|
|
|
|
2017-03-02 12:39:21 +01:00
|
|
|
typedef enum { E_GUARD_OK, E_GUARD_UNARMED, E_GUARD_NEWBIE, E_GUARD_FLEEING, E_GUARD_TERRAIN } guard_t;
|
2015-09-12 23:38:31 +02:00
|
|
|
|
2015-09-12 22:49:43 +02:00
|
|
|
guard_t can_start_guarding(const struct unit * u);
|
|
|
|
void update_guards(void);
|
2016-10-31 07:45:06 +01:00
|
|
|
void setguard(struct unit * u, bool enabled);
|
|
|
|
void guard(struct unit *u);
|
2015-09-12 22:49:43 +02:00
|
|
|
|
2016-10-31 07:45:06 +01:00
|
|
|
struct unit *is_guarded(struct region *r, struct unit *u);
|
|
|
|
bool is_guard(const struct unit *u);
|
2016-10-26 11:35:20 +02:00
|
|
|
|
2015-09-12 22:49:43 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|