diff --git a/src/alchemy.test.c b/src/alchemy.test.c index 2a639243b..7c01be81b 100644 --- a/src/alchemy.test.c +++ b/src/alchemy.test.c @@ -11,6 +11,8 @@ #include #include +#include "guard.h" + #include #include diff --git a/src/bind_unit.c b/src/bind_unit.c index bd270318a..ed8eb74c3 100755 --- a/src/bind_unit.c +++ b/src/bind_unit.c @@ -19,6 +19,7 @@ without prior permission by the authors of Eressea. #include "move.h" #include "reports.h" #include "seen.h" +#include "guard.h" /* attributes includes */ #include diff --git a/src/guard.c b/src/guard.c index c744de126..9e3585a41 100644 --- a/src/guard.c +++ b/src/guard.c @@ -21,6 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "guard.h" +#include #include #include #include @@ -30,6 +31,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include +attrib_type at_guard = { + "guard", + DEFAULT_INIT, + DEFAULT_FINALIZE, + DEFAULT_AGE, + a_writeint, + a_readint, + ATF_UNIQUE +}; + void update_guards(void) { const region *r; diff --git a/src/guard.h b/src/guard.h index b2041012d..564be61a2 100644 --- a/src/guard.h +++ b/src/guard.h @@ -9,6 +9,9 @@ extern "C" { struct unit; typedef enum { E_GUARD_OK, E_GUARD_UNARMED, E_GUARD_NEWBIE, E_GUARD_FLEEING } guard_t; + + extern struct attrib_type at_guard; + guard_t can_start_guarding(const struct unit * u); void update_guards(void); unsigned int guard_flags(const struct unit * u); diff --git a/src/kernel/config.c b/src/kernel/config.c index fa11c004f..1db17a495 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -51,6 +51,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "types.h" #include "unit.h" + #include #include @@ -74,6 +75,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "donations.h" +#include "guard.h" #include "prefix.h" #ifdef USE_LIBXML2 @@ -1177,16 +1179,6 @@ attrib_type at_germs = { ATF_UNIQUE }; -attrib_type at_guard = { - "guard", - DEFAULT_INIT, - DEFAULT_FINALIZE, - DEFAULT_AGE, - a_writeint, - a_readint, - ATF_UNIQUE -}; - void setstatus(struct unit *u, int status) { assert(status >= ST_AGGRO && status <= ST_FLEE); diff --git a/src/kernel/config.h b/src/kernel/config.h index 4dc870ff6..9449744ef 100644 --- a/src/kernel/config.h +++ b/src/kernel/config.h @@ -224,16 +224,6 @@ extern "C" { void setstatus(struct unit *u, int status); /* !< sets combatstatus of a unit */ - void setguard(struct unit *u, unsigned int flags); - /* !< setzt die guard-flags der Einheit */ - unsigned int getguard(const struct unit *u); - /* liest die guard-flags der Einheit */ - void guard(struct unit *u, unsigned int mask); - /* Einheit setzt "BEWACHE", rassenspezifzisch. - * 'mask' kann einzelne flags zusätzlich und-maskieren. - */ - unsigned int guard_flags(const struct unit *u); - int besieged(const struct unit *u); int maxworkingpeasants(const struct region *r); bool has_horses(const struct unit *u); @@ -306,7 +296,6 @@ extern "C" { void free_gamedata(void); - extern struct attrib_type at_guard; extern struct helpmode helpmodes[]; extern const char *parameters[]; extern const char *localenames[]; diff --git a/src/move.test.c b/src/move.test.c index de515be16..f89665e72 100644 --- a/src/move.test.c +++ b/src/move.test.c @@ -2,6 +2,8 @@ #include #include "move.h" +#include "guard.h" + #include #include #include diff --git a/src/spells/combatspells.c b/src/spells/combatspells.c index 4b8cc8b51..b20c6b42f 100644 --- a/src/spells/combatspells.c +++ b/src/spells/combatspells.c @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/tests/data/inactive b/tests/data/inactive deleted file mode 100644 index 7e1d0e64e..000000000 --- a/tests/data/inactive +++ /dev/null @@ -1,2 +0,0 @@ -c93c:Menschen:1:4 -c93c:Menschen:1:4 diff --git a/tests/data/test.dat b/tests/data/test.dat deleted file mode 100644 index a4f9d46ed..000000000 Binary files a/tests/data/test.dat and /dev/null differ diff --git a/tests/orders.txt b/tests/orders.txt deleted file mode 100644 index 3e1e89acb..000000000 --- a/tests/orders.txt +++ /dev/null @@ -1,3 +0,0 @@ -ERESSEA 72vx "naeg86" -EINHEIT nqLx -BENENNEN EINHEIT 'Goldene Herde'