forked from github/server
remove more junk defines from config.h, move them closer to where they belong
This commit is contained in:
parent
bf74eb1446
commit
73fc5a51b3
6 changed files with 10 additions and 22 deletions
|
@ -1152,11 +1152,6 @@ char *_strdup(const char *s)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool faction_id_is_unused(int id)
|
|
||||||
{
|
|
||||||
return findfaction(id) == NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int besieged(const unit * u)
|
int besieged(const unit * u)
|
||||||
{
|
{
|
||||||
/* belagert kann man in schiffen und burgen werden */
|
/* belagert kann man in schiffen und burgen werden */
|
||||||
|
|
|
@ -27,25 +27,11 @@ extern "C" {
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
struct param;
|
struct param;
|
||||||
|
|
||||||
/* for some good prime numbers, check http://www.math.niu.edu/~rusin/known-math/98/pi_x */
|
|
||||||
#ifndef MAXREGIONS
|
|
||||||
# define MAXREGIONS 524287 /* must be prime for hashing. 262139 was a little small */
|
|
||||||
#endif
|
|
||||||
#ifndef MAXUNITS
|
|
||||||
# define MAXUNITS 1048573 /* must be prime for hashing. 524287 was >90% full */
|
|
||||||
#endif
|
|
||||||
#define MAXLUXURIES 16 /* there must be no more than MAXLUXURIES kinds of luxury goods in any game */
|
|
||||||
|
|
||||||
/* getunit results: */
|
/* getunit results: */
|
||||||
#define GET_UNIT 0
|
#define GET_UNIT 0
|
||||||
#define GET_NOTFOUND 1
|
#define GET_NOTFOUND 1
|
||||||
#define GET_PEASANTS 2
|
#define GET_PEASANTS 2
|
||||||
|
|
||||||
/**
|
|
||||||
* Hier endet der Teil von config.h, der die defines für die
|
|
||||||
* Spielwelt Eressea enthält, und beginnen die allgemeinen Routinen
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define DISPLAYSIZE 8192 /* max. Länge einer Beschreibung, incl trailing 0 */
|
#define DISPLAYSIZE 8192 /* max. Länge einer Beschreibung, incl trailing 0 */
|
||||||
#define ORDERSIZE (DISPLAYSIZE*2) /* max. length of an order */
|
#define ORDERSIZE (DISPLAYSIZE*2) /* max. length of an order */
|
||||||
#define NAMESIZE 128 /* max. Länge eines Namens, incl trailing 0 */
|
#define NAMESIZE 128 /* max. Länge eines Namens, incl trailing 0 */
|
||||||
|
@ -64,9 +50,6 @@ struct param;
|
||||||
#define fset(u, i) ((u)->flags |= (i))
|
#define fset(u, i) ((u)->flags |= (i))
|
||||||
#define freset(u, i) ((u)->flags &= ~(i))
|
#define freset(u, i) ((u)->flags &= ~(i))
|
||||||
|
|
||||||
/* parteinummern */
|
|
||||||
bool faction_id_is_unused(int);
|
|
||||||
|
|
||||||
int max_magicians(const struct faction * f);
|
int max_magicians(const struct faction * f);
|
||||||
int findoption(const char *s, const struct locale *lang);
|
int findoption(const char *s, const struct locale *lang);
|
||||||
|
|
||||||
|
|
|
@ -208,6 +208,11 @@ int resolve_faction(variant id, void *address)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool faction_id_is_unused(int id)
|
||||||
|
{
|
||||||
|
return findfaction(id) == NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#define MAX_FACTION_ID (36*36*36*36)
|
#define MAX_FACTION_ID (36*36*36*36)
|
||||||
|
|
||||||
static int unused_faction_id(void)
|
static int unused_faction_id(void)
|
||||||
|
|
|
@ -160,6 +160,7 @@ extern "C" {
|
||||||
/* skills */
|
/* skills */
|
||||||
int skill_limit(struct faction *f, skill_t sk);
|
int skill_limit(struct faction *f, skill_t sk);
|
||||||
int count_skill(struct faction *f, skill_t sk);
|
int count_skill(struct faction *f, skill_t sk);
|
||||||
|
bool faction_id_is_unused(int);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,9 @@ extern "C" {
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "direction.h"
|
#include "direction.h"
|
||||||
|
|
||||||
|
#define MAXLUXURIES 16 /* there must be no more than MAXLUXURIES kinds of luxury goods in any game */
|
||||||
|
#define MAXREGIONS 524287 /* must be prime for hashing. 262139 was a little small */
|
||||||
|
|
||||||
/* FAST_CONNECT: regions are directly connected to neighbours, saves doing
|
/* FAST_CONNECT: regions are directly connected to neighbours, saves doing
|
||||||
a hash-access each time a neighbour is needed, 6 extra pointers per hex */
|
a hash-access each time a neighbour is needed, 6 extra pointers per hex */
|
||||||
#define FAST_CONNECT
|
#define FAST_CONNECT
|
||||||
|
|
|
@ -26,6 +26,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MAXUNITS 1048573 /* must be prime for hashing. 524287 was >90% full */
|
||||||
struct skill;
|
struct skill;
|
||||||
struct item;
|
struct item;
|
||||||
struct sc_mage;
|
struct sc_mage;
|
||||||
|
|
Loading…
Reference in a new issue