forked from github/server
* there are no boats
* skill should only use 4 bytes
This commit is contained in:
parent
1be42e9d50
commit
7a983c80cf
2 changed files with 11 additions and 14 deletions
|
@ -16,29 +16,26 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* FIXME where is this defined?? */
|
|
||||||
extern signed char skill_bonus(struct unit * u, struct region * r);
|
|
||||||
|
|
||||||
/* skillmod_data::flags -- wann gilt der modifier? */
|
/* skillmod_data::flags -- wann gilt der modifier? */
|
||||||
#define SMF_ALWAYS (1<<0) /* immer */
|
#define SMF_ALWAYS (1<<0) /* immer */
|
||||||
#define SMF_PRODUCTION (1<<1) /* für Produktion - am gebäude, an der einheit */
|
#define SMF_PRODUCTION (1<<1) /* für Produktion - am gebäude, an der einheit */
|
||||||
#define SMF_RIDING (1<<2) /* Bonus für berittene - an der rasse*/
|
#define SMF_RIDING (1<<2) /* Bonus für berittene - an der rasse*/
|
||||||
|
|
||||||
typedef struct skill {
|
typedef struct skill {
|
||||||
skill_t id;
|
skill_t id : 8;
|
||||||
unsigned int level : 8;
|
unsigned int level : 8;
|
||||||
unsigned int weeks : 8;
|
unsigned int weeks : 8;
|
||||||
unsigned int old : 8;
|
unsigned int old : 8;
|
||||||
} skill;
|
} skill;
|
||||||
|
|
||||||
typedef int (*skillmod_fun)(const struct unit*, const struct region*, skill_t, int);
|
typedef int (*skillmod_fun)(const struct unit*, const struct region*, skill_t, int);
|
||||||
typedef struct skillmod_data {
|
typedef struct skillmod_data {
|
||||||
skill_t skill;
|
skill_t skill;
|
||||||
skillmod_fun special;
|
skillmod_fun special;
|
||||||
double multiplier;
|
double multiplier;
|
||||||
int number;
|
int number;
|
||||||
int bonus;
|
int bonus;
|
||||||
int flags;
|
int flags;
|
||||||
} skillmod_data;
|
} skillmod_data;
|
||||||
extern struct attrib_type at_skillmod;
|
extern struct attrib_type at_skillmod;
|
||||||
extern int rc_skillmod(const struct race * rc, const struct region *r, skill_t sk);
|
extern int rc_skillmod(const struct race * rc, const struct region *r, skill_t sk);
|
||||||
|
|
|
@ -197,7 +197,7 @@ locale_setstring(locale * lang, const char * key, const char * value)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (strcmp(find->str, value)!=0) {
|
if (strcmp(find->str, value)!=0) {
|
||||||
log_error(("Duplicate values '%s' and '%s' for %s\n", value, find->str, key));
|
log_error(("duplicate translation '%s' for key %s\n", value, key));
|
||||||
}
|
}
|
||||||
assert(!strcmp(find->str, value) || !"duplicate string for key");
|
assert(!strcmp(find->str, value) || !"duplicate string for key");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue