diff --git a/src/common/gamecode/creport.c b/src/common/gamecode/creport.c index e672db64c..a1b007a83 100644 --- a/src/common/gamecode/creport.c +++ b/src/common/gamecode/creport.c @@ -588,7 +588,7 @@ cr_output_ship(FILE * F, const ship * sh, const unit * u, int fcaptain, const fa } /* shore */ w = NODIRECTION; - if (fval(r->terrain, SEA_REGION)) w = sh->coast; + if (!fval(r->terrain, SEA_REGION)) w = sh->coast; if (w != NODIRECTION) fprintf(F, "%d;Kueste\n", w); diff --git a/src/common/kernel/build.c b/src/common/kernel/build.c index f6bbac16e..2b45fe1c7 100644 --- a/src/common/kernel/build.c +++ b/src/common/kernel/build.c @@ -756,7 +756,7 @@ build(unit * u, const construction * ctype, int completed, int want) multi = canuse/100; if (canuse<0) return canuse; /* pass errors to caller */ - new_use_pooled(u, rtype, (need-prebuilt+multi-1)/multi, GET_DEFAULT); + new_use_pooled(u, rtype, GET_DEFAULT, (need-prebuilt+multi-1)/multi); } made += n; skills -= n * type->minskill; diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index d0430cd1a..0d7ce7993 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -836,7 +836,7 @@ pay_spell(unit * u, const spell * sp, int cast_level, int range) resuse *= cast_level; } - new_use_pooled(u, sp->components[k].type, resuse, GET_DEFAULT); + new_use_pooled(u, sp->components[k].type, GET_DEFAULT, resuse); } } diff --git a/src/common/kernel/pool.c b/src/common/kernel/pool.c index 45f342d04..aed60badd 100644 --- a/src/common/kernel/pool.c +++ b/src/common/kernel/pool.c @@ -166,7 +166,7 @@ new_set_resvalue(unit * u, const resource_type * rtype, int value) } int -new_get_pooled(const unit * u, const resource_type * rtype, int mode) +new_get_pooled(const unit * u, const resource_type * rtype, unsigned int mode) { const faction * f = u->faction; unit *v; @@ -209,7 +209,7 @@ new_get_pooled(const unit * u, const resource_type * rtype, int mode) } int -new_use_pooled(unit * u, const resource_type * rtype, int mode, int count) +new_use_pooled(unit * u, const resource_type * rtype, unsigned int mode, int count) { const faction *f = u->faction; unit *v; diff --git a/src/common/kernel/pool.h b/src/common/kernel/pool.h index e016c39e9..f0aa87e67 100644 --- a/src/common/kernel/pool.h +++ b/src/common/kernel/pool.h @@ -32,8 +32,8 @@ extern "C" { #define GET_DEFAULT (GET_RESERVE|GET_SLACK|GET_POOLED_SLACK) #define GET_ALL (GET_SLACK|GET_RESERVE|GET_POOLED_SLACK|GET_POOLED_RESERVE|GET_POOLED_FORCE) -int new_get_pooled(const struct unit * u, const struct resource_type * res, int mode); -int new_use_pooled(struct unit * u, const struct resource_type * res, int mode, int count); +int new_get_pooled(const struct unit * u, const struct resource_type * res, unsigned int mode); +int new_use_pooled(struct unit * u, const struct resource_type * res, unsigned int mode, int count); /** use_pooled * verbraucht 'count' Objekte der resource 'itm' * unter zuhilfenahme des Pools der struct region und Aufbrauch des diff --git a/src/config.h b/src/config.h index 4e04d3be4..b07b9fd5a 100644 --- a/src/config.h +++ b/src/config.h @@ -79,7 +79,7 @@ extern "C" { # define _BSD_SOURCE # define __USE_BSD # endif -# include +/* # include */ # include /* strncasecmp-Prototyp */ #endif