Merge remote-tracking branch 'upstream/develop' into develop

Conflicts:
	src/guard.c
	src/guard.h
This commit is contained in:
Enno Rehling 2015-09-12 23:48:01 +02:00
commit a9abf4d87d
11 changed files with 22 additions and 26 deletions

View File

@ -11,6 +11,8 @@
#include <kernel/item.h> #include <kernel/item.h>
#include <kernel/region.h> #include <kernel/region.h>
#include "guard.h"
#include <limits.h> #include <limits.h>
#include <CuTest.h> #include <CuTest.h>

View File

@ -19,6 +19,7 @@ without prior permission by the authors of Eressea.
#include "move.h" #include "move.h"
#include "reports.h" #include "reports.h"
#include "seen.h" #include "seen.h"
#include "guard.h"
/* attributes includes */ /* attributes includes */
#include <attributes/racename.h> #include <attributes/racename.h>

View File

@ -21,6 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/config.h> #include <kernel/config.h>
#include "guard.h" #include "guard.h"
#include <kernel/save.h>
#include <kernel/unit.h> #include <kernel/unit.h>
#include <kernel/faction.h> #include <kernel/faction.h>
#include <kernel/race.h> #include <kernel/race.h>
@ -30,6 +31,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <assert.h> #include <assert.h>
attrib_type at_guard = {
"guard",
DEFAULT_INIT,
DEFAULT_FINALIZE,
DEFAULT_AGE,
a_writeint,
a_readint,
ATF_UNIQUE
};
void update_guards(void) void update_guards(void)
{ {
const region *r; const region *r;

View File

@ -9,6 +9,9 @@ extern "C" {
struct unit; struct unit;
typedef enum { E_GUARD_OK, E_GUARD_UNARMED, E_GUARD_NEWBIE, E_GUARD_FLEEING } guard_t; 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); guard_t can_start_guarding(const struct unit * u);
void update_guards(void); void update_guards(void);
unsigned int guard_flags(const struct unit * u); unsigned int guard_flags(const struct unit * u);

View File

@ -51,6 +51,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "types.h" #include "types.h"
#include "unit.h" #include "unit.h"
#include <kernel/spell.h> #include <kernel/spell.h>
#include <kernel/spellbook.h> #include <kernel/spellbook.h>
@ -74,6 +75,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <util/xml.h> #include <util/xml.h>
#include "donations.h" #include "donations.h"
#include "guard.h"
#include "prefix.h" #include "prefix.h"
#ifdef USE_LIBXML2 #ifdef USE_LIBXML2
@ -1177,16 +1179,6 @@ attrib_type at_germs = {
ATF_UNIQUE 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) void setstatus(struct unit *u, int status)
{ {
assert(status >= ST_AGGRO && status <= ST_FLEE); assert(status >= ST_AGGRO && status <= ST_FLEE);

View File

@ -224,16 +224,6 @@ extern "C" {
void setstatus(struct unit *u, int status); void setstatus(struct unit *u, int status);
/* !< sets combatstatus of a unit */ /* !< 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 besieged(const struct unit *u);
int maxworkingpeasants(const struct region *r); int maxworkingpeasants(const struct region *r);
bool has_horses(const struct unit *u); bool has_horses(const struct unit *u);
@ -306,7 +296,6 @@ extern "C" {
void free_gamedata(void); void free_gamedata(void);
extern struct attrib_type at_guard;
extern struct helpmode helpmodes[]; extern struct helpmode helpmodes[];
extern const char *parameters[]; extern const char *parameters[];
extern const char *localenames[]; extern const char *localenames[];

View File

@ -2,6 +2,8 @@
#include <stdlib.h> #include <stdlib.h>
#include "move.h" #include "move.h"
#include "guard.h"
#include <kernel/config.h> #include <kernel/config.h>
#include <kernel/ally.h> #include <kernel/ally.h>
#include <kernel/building.h> #include <kernel/building.h>

View File

@ -28,6 +28,7 @@
#include <kernel/race.h> #include <kernel/race.h>
#include <kernel/terrain.h> #include <kernel/terrain.h>
#include <guard.h>
#include <battle.h> #include <battle.h>
#include <move.h> #include <move.h>

View File

@ -1,2 +0,0 @@
c93c:Menschen:1:4
c93c:Menschen:1:4

Binary file not shown.

View File

@ -1,3 +0,0 @@
ERESSEA 72vx "naeg86"
EINHEIT nqLx
BENENNEN EINHEIT 'Goldene Herde'