- rhorses/sethorses reguläre Funktion. Besseres Debugging.

This commit is contained in:
Christian Schlittchen 2002-04-28 07:53:07 +00:00
parent b682917dd1
commit aa619ea977
3 changed files with 16 additions and 4 deletions

View File

@ -504,7 +504,7 @@ addgive(unit * u, unit * u2, int n, resource_t res, const char * cmd, int error)
/* Derzeit fallen nur Silber und Pferde an die Region
* */
void
void
give_peasants(int n, const item_type * itype, unit * src)
{
region *r = src->region;

View File

@ -613,6 +613,19 @@ rmoney(const region * r)
return ((r)->land?(r)->land->money:0);
}
void
rsethorses(region *r, int value)
{
assert(r->land != NULL && value >= 0);
r->land->horses = value;
}
int
rhorses(region *r)
{
return r->land?r->land->horses:0;
}
void
rsetmoney(region * r, int value)
{

View File

@ -171,9 +171,8 @@ int rpeasants(const struct region * r);
void rsetpeasants(struct region * r, int value);
int rmoney(const struct region * r);
void rsetmoney(struct region * r, int value);
#define rhorses(r) ((r)->land?(r)->land->horses:0)
#define rsethorses(r, value) ((r)->land?((r)->land->horses=(value)):(assert((value)>=0), (value)),0)
int rhorses(struct region * r);
void rsethorses(struct region * r, int value);
#define rbuildings(r) ((r)->buildings)