sometims we only include config.h for fval.

I hate fval.
This commit is contained in:
Enno Rehling 2016-11-17 10:57:20 +01:00
parent d5218b99b8
commit e3b7e19750
3 changed files with 5 additions and 8 deletions

View File

@ -17,13 +17,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/
#include <platform.h>
#include <kernel/config.h>
#include "seed.h"
/* kernel includes */
#include <kernel/build.h>
#include <kernel/config.h>
#include <kernel/item.h>
#include <kernel/region.h>
@ -42,7 +40,7 @@ static void produce_seeds(region * r, const resource_type * rtype, int norders)
static int limit_seeds(const region * r, const resource_type * rtype)
{
if (fval(r, RF_MALLORN)) {
if ((r->flags & RF_MALLORN)) {
return 0;
}
return r->land ? r->land->trees[0] : 0;
@ -68,13 +66,13 @@ void init_seed(void)
static void
produce_mallornseeds(region * r, const resource_type * rtype, int norders)
{
assert(fval(r, RF_MALLORN));
assert(r->flags & RF_MALLORN);
r->land->trees[0] -= norders;
}
static int limit_mallornseeds(const region * r, const resource_type * rtype)
{
if (!fval(r, RF_MALLORN)) {
if (!(r->flags & RF_MALLORN)) {
return 0;
}
return r->land ? r->land->trees[0] : 0;

View File

@ -31,7 +31,7 @@ extern "C" {
void make_zombie(struct unit * u);
#define MONSTER_ID 666
#define is_monsters(f) (fval(f, FFL_NPC) && f==get_monsters())
#define is_monsters(f) ((f->flags & FFL_NPC) && f==get_monsters())
#ifdef __cplusplus
}

View File

@ -15,7 +15,6 @@
#include <platform.h>
/* kernel includes */
#include <kernel/config.h>
#include <kernel/race.h>
#include <kernel/order.h>
#include <kernel/unit.h>
@ -40,7 +39,7 @@ void make_undead_unit(unit * u)
{
free_orders(&u->orders);
name_unit(u);
fset(u, UFL_ISNEW);
u->flags |= UFL_ISNEW;
}
void age_undead(unit * u)