From 14142c7538d587679a87f2356c71af5f45b50416 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 3 Jul 2004 11:36:34 +0000 Subject: [PATCH] Tja... was war das eigentlich? --- src/common/gamecode/creport.c | 17 +++++++++-------- src/common/kernel/magic.c | 28 ++++++++-------------------- src/common/kernel/movement.c | 2 +- src/res/de/strings.xml | 2 +- 4 files changed, 19 insertions(+), 30 deletions(-) diff --git a/src/common/gamecode/creport.c b/src/common/gamecode/creport.c index 48a762c1e..c65e06115 100644 --- a/src/common/gamecode/creport.c +++ b/src/common/gamecode/creport.c @@ -381,19 +381,20 @@ cr_order(const void * v, char * buffer, const void * userdata) char * wp = buffer; char * cmd = getcommand(ord); const char * rp = cmd; - + *wp++ = '\"'; while (*rp) { switch (*rp) { - case '\"': - case '\\': - *wp++ = '\\'; - default: - *wp++ = *rp++; + case '\"': + case '\\': + *wp++ = '\\'; + default: + *wp++ = *rp++; } } *wp++ = '\"'; *wp++ = 0; + /* sprintf(buffer, "\"%s\"", cmd); */ } else strcpy(buffer, "\"\""); return 0; @@ -459,8 +460,8 @@ report_crtypes(FILE * F, const struct locale* lang) const struct nrmessage_type * nrt = nrt_find(lang, kmt->mtype); if (nrt) { unsigned int hash = hashstring(mt_name(kmt->mtype)); - fprintf(F, "MESSAGETYPE %d\n", hash); - fputc('\"', F); + fprintf(F, "MESSAGETYPE %d\n", hash); + fputc('\"', F); fputs(escape_string(nrt_string(nrt), NULL, 0), F); fputs("\";text\n", F); fprintf(F, "\"%s\";section\n", nrt_section(nrt)); diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index c69e8cfa8..5bc6d5018 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -107,20 +107,6 @@ MagicPower(void) return value; } -static building * -findbuildingr(const region *r, int n) - /* Ein Gebäude in einer bestimmten Region finden: */ -{ - building *b; - - for (b = rbuildings(r); b; b = b->next) { - if (b->no == n) { - return b; - } - } - return 0; -} - static int a_readicastle(attrib * a, FILE * f) { @@ -1572,6 +1558,8 @@ verify_targets(castorder *co) break; case SPP_SHIP: if (!verify_ship(target_r, mage, sp, spobj, co->order)) ++failed; + break; + default: break; } } @@ -1748,7 +1736,7 @@ free_spellparameter(spellparameter *pa) } static int -addparam_string(const char ** param, spllprm ** spobjp) +addparam_string(char ** param, spllprm ** spobjp) { spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); assert(param[0]); @@ -1760,7 +1748,7 @@ addparam_string(const char ** param, spllprm ** spobjp) } static int -addparam_int(const char ** param, spllprm ** spobjp) +addparam_int(char ** param, spllprm ** spobjp) { spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); assert(param[0]); @@ -1772,7 +1760,7 @@ addparam_int(const char ** param, spllprm ** spobjp) } static int -addparam_ship(const char ** param, spllprm ** spobjp) +addparam_ship(char ** param, spllprm ** spobjp) { spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); int id = atoi36(param[0]); @@ -1784,7 +1772,7 @@ addparam_ship(const char ** param, spllprm ** spobjp) } static int -addparam_building(const char ** param, spllprm ** spobjp) +addparam_building(char ** param, spllprm ** spobjp) { spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); int id = atoi36(param[0]); @@ -1796,7 +1784,7 @@ addparam_building(const char ** param, spllprm ** spobjp) } static int -addparam_region(const char ** param, spllprm ** spobjp, const unit * u, order * ord) +addparam_region(char ** param, spllprm ** spobjp, const unit * u, order * ord) { assert(param[0]); if (param[1]==0) { @@ -1826,7 +1814,7 @@ addparam_region(const char ** param, spllprm ** spobjp, const unit * u, order * static int -addparam_unit(const char ** param, spllprm ** spobjp, const unit * u, order * ord) +addparam_unit(char ** param, spllprm ** spobjp, const unit * u, order * ord) { spllprm *spobj; int i = 0; diff --git a/src/common/kernel/movement.c b/src/common/kernel/movement.c index 11e73fd2d..ee67d0fd6 100644 --- a/src/common/kernel/movement.c +++ b/src/common/kernel/movement.c @@ -2257,7 +2257,7 @@ movement(void) if (u->ship==NULL || !fval(u, UFL_OWNER)) { init_tokens(u->thisorder); skip_token(); - if (move(u, true)!=0) repeat = true; + if (move(u, false)!=0) repeat = true; } } } diff --git a/src/res/de/strings.xml b/src/res/de/strings.xml index 81ccd59a2..45437ee8d 100644 --- a/src/res/de/strings.xml +++ b/src/res/de/strings.xml @@ -7,7 +7,7 @@ _a: including article (ein Troll, a troll) --> - + Kein Magiegebiet no magic school