forked from github/server
Unicode WIP:
- a lot of set_string calls replaced. Now I mostly have to work on the report-writing code and this is done.
This commit is contained in:
parent
d2094d6205
commit
7031e9d032
21 changed files with 170 additions and 131 deletions
|
@ -93,7 +93,7 @@ crtag(const char * key)
|
|||
{
|
||||
static const struct locale * lang = NULL;
|
||||
if (!lang) lang = find_locale(TAG_LOCALE);
|
||||
return locale_string(lang, key);
|
||||
return (const xmlChar*)locale_string(lang, key);
|
||||
}
|
||||
#else
|
||||
#define crtag(x) (x)
|
||||
|
@ -104,7 +104,7 @@ crtag(const char * key)
|
|||
typedef struct translation {
|
||||
struct translation * next;
|
||||
char * key;
|
||||
const char * value;
|
||||
const xmlChar * value;
|
||||
} translation;
|
||||
|
||||
#define TRANSMAXHASH 257
|
||||
|
@ -112,7 +112,7 @@ static translation * translation_table[TRANSMAXHASH];
|
|||
static translation * junkyard;
|
||||
|
||||
static const char *
|
||||
add_translation(const char * key, const char * value)
|
||||
add_translation(const char * key, const xmlChar * value)
|
||||
{
|
||||
int kk = ((key[0] << 5) + key[0]) % TRANSMAXHASH;
|
||||
translation * t = translation_table[kk];
|
||||
|
|
|
@ -940,7 +940,7 @@ restart_cmd(unit * u, struct order * ord)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!checkpasswd(u->faction, s_pass, false)) {
|
||||
if (!checkpasswd(u->faction, (const char *)s_pass, false)) {
|
||||
cmistake(u, ord, 86, MSG_EVENT);
|
||||
log_warning(("NEUSTART mit falschem Passwort für Partei %s: %s\n",
|
||||
factionid(u->faction), s_pass));
|
||||
|
@ -973,7 +973,7 @@ quit_cmd(unit * u, struct order * ord)
|
|||
skip_token(); /* skip keyword */
|
||||
|
||||
passwd = getstrtoken();
|
||||
if (checkpasswd(f, passwd, false)) {
|
||||
if (checkpasswd(f, (const char *)passwd, false)) {
|
||||
if (EnhancedQuit()) {
|
||||
int f2_id = getid();
|
||||
if (f2_id>0) {
|
||||
|
@ -1065,7 +1065,7 @@ parse_restart(void)
|
|||
}
|
||||
if (fval(f, FFL_OVERRIDE)) {
|
||||
free(f->override);
|
||||
f->override = (xmlChar*)strdup(itoa36(rng_int()));
|
||||
f->override = strdup(itoa36(rng_int()));
|
||||
freset(f, FFL_OVERRIDE);
|
||||
}
|
||||
if (turn!=f->lastorders) {
|
||||
|
@ -1898,7 +1898,8 @@ banner_cmd(unit * u, struct order * ord)
|
|||
init_tokens(ord);
|
||||
skip_token();
|
||||
|
||||
set_string(&u->faction->banner, getstrtoken());
|
||||
free(u->faction->banner);
|
||||
u->faction->banner = xstrdup(getstrtoken());
|
||||
add_message(&u->faction->msgs, msg_message("changebanner", "value",
|
||||
u->faction->banner));
|
||||
|
||||
|
@ -1931,9 +1932,10 @@ email_cmd(unit * u, struct order * ord)
|
|||
static int
|
||||
password_cmd(unit * u, struct order * ord)
|
||||
{
|
||||
xmlChar pbuf[32];
|
||||
char pbuf[32];
|
||||
int i;
|
||||
const xmlChar * s;
|
||||
boolean pwok = true;
|
||||
|
||||
init_tokens(ord);
|
||||
skip_token();
|
||||
|
@ -1943,23 +1945,23 @@ password_cmd(unit * u, struct order * ord)
|
|||
for(i=0; i<6; i++) pbuf[i] = (char)(97 + rng_int() % 26);
|
||||
pbuf[6] = 0;
|
||||
} else {
|
||||
boolean pwok = true;
|
||||
xmlChar *c;
|
||||
char *c;
|
||||
|
||||
xstrlcpy(pbuf, s, 31);
|
||||
strlcpy(pbuf, (const char *)s, 31);
|
||||
pbuf[31] = 0;
|
||||
c = pbuf;
|
||||
while (*c) {
|
||||
while (*c && pwok) {
|
||||
if (!isalnum(*c)) pwok = false;
|
||||
c++;
|
||||
}
|
||||
if (pwok == false) {
|
||||
cmistake(u, ord, 283, MSG_EVENT);
|
||||
for(i=0; i<6; i++) pbuf[i] = (char)(97 + rng_int() % 26);
|
||||
pbuf[6] = 0;
|
||||
}
|
||||
}
|
||||
set_string(&u->faction->passw, pbuf);
|
||||
free(u->faction->passw);
|
||||
if (pwok == false) {
|
||||
cmistake(u, ord, 283, MSG_EVENT);
|
||||
u->faction->passw = strdup(itoa36(rng_int()));
|
||||
} else {
|
||||
u->faction->passw = strdup(pbuf);
|
||||
}
|
||||
fset(u->faction, FFL_OVERRIDE);
|
||||
ADDMSG(&u->faction->msgs, msg_message("changepasswd",
|
||||
"value", u->faction->passw));
|
||||
|
@ -3816,14 +3818,14 @@ warn_password(void)
|
|||
faction * f = factions;
|
||||
while (f) {
|
||||
boolean pwok = true;
|
||||
const xmlChar * c = f->passw;
|
||||
while (*c) {
|
||||
const char * c = f->passw;
|
||||
while (*c && pwok) {
|
||||
if (!isalnum((unsigned char)*c)) pwok = false;
|
||||
c++;
|
||||
}
|
||||
if (pwok == false) {
|
||||
if (!pwok) {
|
||||
free(f->passw);
|
||||
f->passw = (xmlChar*)strdup(itoa36(rng_int()));
|
||||
f->passw = strdup(itoa36(rng_int()));
|
||||
ADDMSG(&f->msgs, msg_message("illegal_password", "newpass", f->passw));
|
||||
}
|
||||
f = f->next;
|
||||
|
|
|
@ -1015,11 +1015,13 @@ godcurse(void)
|
|||
static unit *
|
||||
split_unit(region * r, unit *u)
|
||||
{
|
||||
unit *u2 = createunit(r, u->faction, 0, u->race);
|
||||
unit *u2 = create_unit(r, u->faction, 0, u->race, 0, u->name, u);
|
||||
int newsize = u->number/2;
|
||||
|
||||
set_string(&u2->name, u->name);
|
||||
set_string(&u2->display, u->display);
|
||||
if (u->display) {
|
||||
free(u2->display);
|
||||
u2->display = xstrdup(u->display);
|
||||
}
|
||||
transfermen(u, u2, newsize);
|
||||
return u2;
|
||||
}
|
||||
|
|
|
@ -48,9 +48,7 @@ summon_igjarjuk(struct unit * u, const struct item_type * itype, int amount, str
|
|||
static boolean
|
||||
give_igjarjuk(const struct unit * src, const struct unit * d, const struct item_type * itype, int n, struct order * ord)
|
||||
{
|
||||
sprintf(buf, "Eine höhere Macht hindert %s daran, das Objekt zu übergeben. "
|
||||
"'ES IST DEINS, MEIN KIND. DEINS GANZ ALLEIN'.", unitname(src));
|
||||
mistake(src, ord, buf, MSG_COMMERCE);
|
||||
ADDMSG(&src->faction->msgs, msg_feedback(src, ord, "error_giveeye", ""));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
#include <eressea.h>
|
||||
#include "weapons.h"
|
||||
|
||||
#include <unit.h>
|
||||
#include <build.h>
|
||||
#include <race.h>
|
||||
#include <item.h>
|
||||
#include <battle.h>
|
||||
#include <pool.h>
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/build.h>
|
||||
#include <kernel/race.h>
|
||||
#include <kernel/item.h>
|
||||
#include <kernel/message.h>
|
||||
#include <kernel/battle.h>
|
||||
#include <kernel/pool.h>
|
||||
|
||||
/* util includes */
|
||||
#include <util/functions.h>
|
||||
|
@ -50,13 +51,14 @@ attack_firesword(const troop * at, const struct weapon_type * wtype, int *casual
|
|||
|
||||
if (fi->catmsg == -1) {
|
||||
int i, k=0;
|
||||
message * msg;
|
||||
for (i=0;i<=at->index;++i) {
|
||||
struct weapon * wp = fi->person[i].melee;
|
||||
if (wp!=NULL && wp->type == wtype) ++k;
|
||||
}
|
||||
sprintf(buf, "%d Kämpfer aus %s benutz%s Flammenschwert%s:", k, unitname(fi->unit),
|
||||
(k==1)?"t sein ":"en ihre",(k==1)?"":"er");
|
||||
battlerecord(fi->side->battle, buf);
|
||||
msg = msg_message("battle::useflamingsword", "amount unit", k, fi->unit);
|
||||
message_all(fi->side->battle, msg);
|
||||
msg_release(msg);
|
||||
fi->catmsg = 0;
|
||||
}
|
||||
|
||||
|
@ -104,11 +106,14 @@ attack_catapult(const troop * at, const struct weapon_type * wtype, int * casual
|
|||
|
||||
if (af->catmsg == -1) {
|
||||
int i, k=0;
|
||||
message * msg;
|
||||
|
||||
for (i=0;i<=at->index;++i) {
|
||||
if (af->person[i].reload==0 && af->person[i].missile == wp) ++k;
|
||||
}
|
||||
sprintf(buf, "%d Kämpfer aus %s feuer%s Katapult ab:", k, unitname(au), (k==1)?"t sein":"n ihr");
|
||||
battlerecord(b, buf);
|
||||
msg = msg_message("battle::usecatapult", "amount unit", k, au);
|
||||
message_all(b, msg);
|
||||
msg_release(msg);
|
||||
af->catmsg = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -444,9 +444,10 @@ new_building(const struct building_type * btype, region * r, const struct locale
|
|||
if (b->type->name==NULL) {
|
||||
bname = LOC(lang, btype->_name);
|
||||
} else {
|
||||
/* TODO: optimization potential: make b->name NULL and use this as default */
|
||||
bname = LOC(lang, buildingtype(btype, b, 0));
|
||||
}
|
||||
set_string(&b->name, bname);
|
||||
b->name = xstrdup(bname);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ unused_faction_id(void)
|
|||
}
|
||||
|
||||
faction *
|
||||
addfaction(const char *email, const xmlChar * password,
|
||||
addfaction(const char *email, const char * password,
|
||||
const struct race * frace, const struct locale *loc,
|
||||
int subscription)
|
||||
{
|
||||
|
@ -114,12 +114,12 @@ addfaction(const char *email, const xmlChar * password,
|
|||
log_error(("Invalid email address for faction %s: %s\n", itoa36(f->no), email));
|
||||
}
|
||||
|
||||
set_string(&f->override, (const xmlChar *)pass);
|
||||
f->override = strdup(pass);
|
||||
if (password) {
|
||||
set_string(&f->passw, password);
|
||||
f->passw = strdup(password);
|
||||
} else {
|
||||
pass = itoa36(rng_int());
|
||||
set_string(&f->passw, (const xmlChar *)pass);
|
||||
f->passw = strdup(pass);
|
||||
}
|
||||
|
||||
f->lastorders = turn;
|
||||
|
@ -137,7 +137,7 @@ addfaction(const char *email, const xmlChar * password,
|
|||
fhash(f);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s %s", LOC(loc, "factiondefault"), factionid(f));
|
||||
set_string(&f->name, (const xmlChar*)buf);
|
||||
f->name = xstrdup(buf);
|
||||
|
||||
return f;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ addplayer(region *r, faction * f)
|
|||
}
|
||||
|
||||
boolean
|
||||
checkpasswd(const faction * f, const xmlChar * passwd, boolean shortp)
|
||||
checkpasswd(const faction * f, const char * passwd, boolean shortp)
|
||||
{
|
||||
#ifdef SHORTPWDS
|
||||
shortpwd * slist = f->shortpwds;
|
||||
|
@ -178,8 +178,8 @@ checkpasswd(const faction * f, const xmlChar * passwd, boolean shortp)
|
|||
slist = slist->next;
|
||||
}
|
||||
#endif
|
||||
if (xstrcmp(f->passw, passwd)==0) return true;
|
||||
if (xstrcmp(f->override, passwd)==0) return true;
|
||||
if (strcmp(f->passw, passwd)==0) return true;
|
||||
if (strcmp(f->override, passwd)==0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,8 +67,8 @@ typedef struct faction {
|
|||
xmlChar *name;
|
||||
xmlChar *banner;
|
||||
char *email;
|
||||
xmlChar *passw;
|
||||
xmlChar *override;
|
||||
char *passw;
|
||||
char *override;
|
||||
#ifdef SHORTPWDS
|
||||
struct shortpwd * shortpwds;
|
||||
#endif
|
||||
|
@ -121,10 +121,10 @@ extern const struct unit * random_unit_in_faction(const struct faction *f);
|
|||
extern const char * factionname(const struct faction * f);
|
||||
extern void * resolve_faction(variant data);
|
||||
extern struct unit * addplayer(struct region *r, faction * f);
|
||||
extern struct faction * addfaction(const char *email, const xmlChar* password,
|
||||
extern struct faction * addfaction(const char *email, const char* password,
|
||||
const struct race * frace,
|
||||
const struct locale *loc, int subscription);
|
||||
extern boolean checkpasswd(const faction * f, const xmlChar * passwd, boolean shortp);
|
||||
extern boolean checkpasswd(const faction * f, const char * passwd, boolean shortp);
|
||||
extern void destroyfaction(faction * f);
|
||||
|
||||
extern void set_alliance(struct faction * a, struct faction * b, int status);
|
||||
|
|
|
@ -175,7 +175,7 @@ new_ship(const ship_type * stype, const struct locale * lang, region * r)
|
|||
sh->region = r;
|
||||
|
||||
sprintf((char*)buffer, "%s %s", LOC(lang, stype->name[0]), shipid(sh));
|
||||
set_string(&sh->name, buffer);
|
||||
sh->name = xstrdup(buffer);
|
||||
shash(sh);
|
||||
addlist(&r->ships, sh);
|
||||
return sh;
|
||||
|
|
|
@ -1271,17 +1271,18 @@ createunitid(unit *u, int id)
|
|||
void
|
||||
name_unit(unit *u)
|
||||
{
|
||||
free(u->name);
|
||||
if (u->race->generate_name) {
|
||||
const xmlChar * gen_name = u->race->generate_name(u);
|
||||
if (gen_name) {
|
||||
set_string(&u->name, gen_name);
|
||||
u->name = xstrdup(gen_name);
|
||||
} else {
|
||||
set_string(&u->name, racename(u->faction->locale, u, u->race));
|
||||
u->name = xstrdup(racename(u->faction->locale, u, u->race));
|
||||
}
|
||||
} else {
|
||||
xmlChar name[16];
|
||||
sprintf((char*)name, "%s %s", LOC(u->faction->locale, "unitdefault"), itoa36(u->no));
|
||||
set_string(&u->name, name);
|
||||
u->name = xstrdup(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1326,9 +1327,9 @@ create_unit(region * r, faction * f, int number, const struct race *urace, int i
|
|||
|
||||
if (!dname) {
|
||||
name_unit(u);
|
||||
} else {
|
||||
u->name = xstrdup(dname);
|
||||
}
|
||||
else set_string(&u->name, dname);
|
||||
|
||||
if (count_unit(u)) f->no_units++;
|
||||
|
||||
if (creator) {
|
||||
|
|
|
@ -119,7 +119,7 @@ nrt_register(const struct message_type * mtype, const struct locale * lang, cons
|
|||
else nrt->section = NULL;
|
||||
messagetypes[hash] = nrt;
|
||||
assert(string && *string);
|
||||
nrt->string = xstrdup(string);
|
||||
nrt->string = strdup(string);
|
||||
*c = '\0';
|
||||
for (i=0;i!=mtype->nparameters;++i) {
|
||||
if (i!=0) *c++ = ' ';
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "translation.h"
|
||||
#include "log.h"
|
||||
#include "bsdstring.h"
|
||||
|
||||
/* libc includes */
|
||||
#include <assert.h>
|
||||
|
@ -21,7 +22,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <util/bsdstring.h>
|
||||
/**
|
||||
** simple operand stack
|
||||
**/
|
||||
|
|
27
src/config.h
27
src/config.h
|
@ -22,7 +22,21 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning (disable: 4201 4214 4514 4115 4711)
|
||||
# pragma warning(disable: 4056)
|
||||
/* warning C4056: overflow in floating point constant arithmetic */
|
||||
# pragma warning(disable: 4201)
|
||||
/* warning C4201: Nicht dem Standard entsprechende Erweiterung : Struktur/Union ohne Namen */
|
||||
# pragma warning(disable: 4214)
|
||||
/* warning C4214: Nicht dem Standard entsprechende Erweiterung : Basistyp fuer Bitfeld ist nicht int */
|
||||
# pragma warning(disable: 4100)
|
||||
/* warning C4100: <name> : unreferenced formal parameter */
|
||||
# pragma warning(disable: 4996)
|
||||
/* warning C4100: <name> was declared deprecated */
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <cstdio>
|
||||
|
@ -64,18 +78,6 @@ extern "C" {
|
|||
# define _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning (disable: 4201 4214 4514 4115 4711)
|
||||
# pragma warning(disable: 4056)
|
||||
/* warning C4056: overflow in floating point constant arithmetic */
|
||||
# pragma warning(disable: 4201)
|
||||
/* warning C4201: Nicht dem Standard entsprechende Erweiterung : Struktur/Union ohne Namen */
|
||||
# pragma warning(disable: 4214)
|
||||
/* warning C4214: Nicht dem Standard entsprechende Erweiterung : Basistyp fuer Bitfeld ist nicht int */
|
||||
# pragma warning(disable: 4100)
|
||||
/* warning C4100: <name> : unreferenced formal parameter */
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# ifndef _BSD_SOURCE
|
||||
# define _BSD_SOURCE
|
||||
|
@ -140,6 +142,7 @@ typedef struct stat stat_type;
|
|||
|
||||
/* Microsoft Visual C */
|
||||
#ifdef _MSC_VER
|
||||
# include <string.h> /* must be included here so strdup is not redefined */
|
||||
# define R_OK 4
|
||||
# define HAVE__MKDIR_WITHOUT_PERMISSION
|
||||
# define HAVE_INLINE
|
||||
|
|
|
@ -75,44 +75,41 @@ Global
|
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release|Win32.Build.0 = Release|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.Build.0 = Release|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release|Win32.Build.0 = Release|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release|Win32.Build.0 = Release|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.Build.0 = Release|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release|Win32.Build.0 = Release|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.Build.0 = Release|Win32
|
||||
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
|
@ -125,64 +122,64 @@ Global
|
|||
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Release64|Win32.Build.0 = Release|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release|Win32.Build.0 = Release|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.Build.0 = Release|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release|Win32.Build.0 = Release|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.Build.0 = Release|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release|Win32.Build.0 = Release|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.Build.0 = Release|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release|Win32.Build.0 = Release|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.Build.0 = Release|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release|Win32.Build.0 = Release|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.Build.0 = Release|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.ActiveCfg = Debug64|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.Build.0 = Debug64|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.Build.0 = Debug|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Profile|Win32.ActiveCfg = Profile|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Profile|Win32.Build.0 = Profile|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release|Win32.Build.0 = Release|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.ActiveCfg = Release64|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.Build.0 = Release64|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.ActiveCfg = Release|Win32
|
||||
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.Build.0 = Release|Win32
|
||||
{57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug64|Win32.ActiveCfg = Debug|Win32
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <config.h>
|
||||
#include <cstring>
|
||||
#include <eressea.h>
|
||||
#include "list.h"
|
||||
#include "objects.h"
|
||||
|
|
|
@ -102,14 +102,14 @@ static void
|
|||
lua_setstring(const char * lname, const char * key, const char * str)
|
||||
{
|
||||
struct locale * lang = find_locale(lname);
|
||||
locale_setstring(lang, key, str);
|
||||
locale_setstring(lang, key, (const xmlChar*)str);
|
||||
}
|
||||
|
||||
static const char *
|
||||
lua_getstring(const char * lname, const char * key)
|
||||
{
|
||||
struct locale * lang = find_locale(lname);
|
||||
return locale_getstring(lang, key);
|
||||
return (const char*)locale_getstring(lang, key);
|
||||
}
|
||||
|
||||
#define ISLANDSIZE 20
|
||||
|
|
|
@ -31,14 +31,15 @@
|
|||
#endif
|
||||
|
||||
#include <ostream>
|
||||
#include <cstring>
|
||||
using namespace luabind;
|
||||
|
||||
static faction *
|
||||
add_faction(const char * email, const char * racename, const char * lang)
|
||||
{
|
||||
const race * frace = findrace(racename, default_locale);
|
||||
if (frace==NULL) frace = findrace(racename, find_locale("de"));
|
||||
if (frace==NULL) frace = findrace(racename, find_locale("en"));
|
||||
const race * frace = findrace((const xmlChar*)racename, default_locale);
|
||||
if (frace==NULL) frace = findrace((const xmlChar*)racename, find_locale("de"));
|
||||
if (frace==NULL) frace = findrace((const xmlChar*)racename, find_locale("en"));
|
||||
if (frace==NULL) return NULL;
|
||||
locale * loc = find_locale(lang);
|
||||
faction * f = addfaction(email, NULL, frace, loc, 0);
|
||||
|
@ -202,7 +203,8 @@ faction_items(const faction& f) {
|
|||
void
|
||||
faction_set_passw(faction& f, const char * passw)
|
||||
{
|
||||
set_string(&f.passw, passw);
|
||||
free(f.passw);
|
||||
f.passw = strdup(passw);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@ -214,19 +216,21 @@ faction_get_passw(const faction& f)
|
|||
void
|
||||
faction_set_banner(faction& f, const char * banner)
|
||||
{
|
||||
set_string(&f.banner, banner);
|
||||
free(f.banner);
|
||||
f.banner = BAD_CAST strdup(banner);
|
||||
}
|
||||
|
||||
const char *
|
||||
faction_get_banner(const faction& f)
|
||||
{
|
||||
return f.banner;
|
||||
return (const char*)f.banner;
|
||||
}
|
||||
|
||||
void
|
||||
faction_set_email(faction& f, const char * email)
|
||||
{
|
||||
set_string(&f.email, email);
|
||||
free(f.email);
|
||||
f.email = strdup(email);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
@ -156,13 +156,13 @@ update_subscriptions(void)
|
|||
static void
|
||||
message_unit(unit& sender, unit& target, const char * str)
|
||||
{
|
||||
deliverMail(target.faction, sender.region, &sender, str, &target);
|
||||
deliverMail(target.faction, sender.region, &sender, (const xmlChar *)str, &target);
|
||||
}
|
||||
|
||||
static void
|
||||
message_faction(unit& sender, faction& target, const char * str)
|
||||
{
|
||||
deliverMail(&target, sender.region, &sender, str, NULL);
|
||||
deliverMail(&target, sender.region, &sender, (const xmlChar *)str, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -50,17 +50,17 @@ region_ships(const region& r) {
|
|||
|
||||
static void
|
||||
region_setname(region& r, const char * name) {
|
||||
if (r.land) rsetname((&r), name);
|
||||
if (r.land) rsetname((&r), (const xmlChar *)name);
|
||||
}
|
||||
|
||||
static const char *
|
||||
region_getterrain(const region& r) {
|
||||
return r.terrain->_name;
|
||||
return (const char *)r.terrain->_name;
|
||||
}
|
||||
|
||||
static const char *
|
||||
region_getname(const region& r) {
|
||||
if (r.land) return r.land->name;
|
||||
if (r.land) return (const char *)r.land->name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ region_setinfo(region& r, const char * info)
|
|||
|
||||
static const char *
|
||||
region_getinfo(const region& r) {
|
||||
return r.display;
|
||||
return (const char *)r.display;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -111,7 +111,7 @@ region_plane(const region& r)
|
|||
static void
|
||||
region_addnotice(region& r, const char * str)
|
||||
{
|
||||
addmessage(&r, NULL, str, MSG_MESSAGE, ML_IMPORTANT);
|
||||
addmessage(&r, NULL, (const xmlChar *)str, MSG_MESSAGE, ML_IMPORTANT);
|
||||
}
|
||||
|
||||
static std::ostream&
|
||||
|
|
|
@ -98,7 +98,7 @@ lua_callspell(castorder *co)
|
|||
|
||||
if (hashpos!=NULL) {
|
||||
ptrdiff_t len = hashpos - fname;
|
||||
assert(len<sizeof(buf));
|
||||
assert(len<sizeof(fbuf));
|
||||
strncpy(fbuf, fname, len);
|
||||
fbuf[len] = '\0';
|
||||
fname = fbuf;
|
||||
|
|
|
@ -1364,12 +1364,23 @@
|
|||
</type>
|
||||
<text locale="de">""AAAAAAAGHHHHHH!" - Ein Schrei durchzieht die Region, $unit($unit) windet sich vor Schmerz."</text>
|
||||
</message>
|
||||
|
||||
<message name="error_giveeye" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="command" type="order"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Eine höhere Macht hindert $unit($unit) daran, das Objekt zu übergeben. 'ES IST DEINS, MEIN KIND. DEINS GANZ ALLEIN'."</text>
|
||||
</message>
|
||||
|
||||
<message name="praytoigjarjuk" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) sendet ein Stoßgebet an den Herrn der Schreie."</text>
|
||||
</message>
|
||||
|
||||
<message name="iceberg_melt" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
|
@ -7099,6 +7110,22 @@
|
|||
<text locale="fr">"The wormhole in $region($region) disappears."</text>
|
||||
<text locale="en">"The wormhole in $region($region) disappears."</text>
|
||||
</message>
|
||||
<message name="battle::useflamingsword" section="battle">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="amount" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"$int($amount) Krieger von $unit($unit) benutzen ihre Flammenschwerter."</text>
|
||||
<text locale="en">"$int($amount) fighters of $unit($unit) are using their flaming sword."</text>
|
||||
</message>
|
||||
<message name="battle::usecatapult" section="battle">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="amount" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"$int($amount) Krieger von $unit($unit) feuern ihre Katapulte ab."</text>
|
||||
<text locale="en">"$int($amount) fighters of $unit($unit) launch their catapults."</text>
|
||||
</message>
|
||||
<message name="battle::starters" section="battle">
|
||||
<type>
|
||||
<arg name="factions" type="string"/>
|
||||
|
|
Loading…
Reference in a new issue