From bf5fae2ef5a7b1eda0374800487fcba1efd10c29 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 11 May 2015 23:54:21 -0700 Subject: [PATCH 1/4] Fix visual studio compilation for Solthar's curse changes (float/int conversions, uninitialized variable). --- src/kernel/curse.c | 3 +++ src/kernel/unit.c | 4 ++-- src/spells.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/kernel/curse.c b/src/kernel/curse.c index 12f635521..1818079b5 100644 --- a/src/kernel/curse.c +++ b/src/kernel/curse.c @@ -255,6 +255,9 @@ void curse_write(const attrib * a, const void *owner, struct storage *store) if (global.data_version < EXPLICIT_CURSE_ISNEW_VERSION) { flags = (c->flags & ~CURSE_ISNEW) | (c->type->flags & CURSE_ISNEW); } + else { + flags = c->flags | c->type->flags; + } WRITE_INT(store, c->no); WRITE_TOK(store, ct->cname); diff --git a/src/kernel/unit.c b/src/kernel/unit.c index 9906bc4aa..ea2bbd950 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -1282,7 +1282,7 @@ static int update_gbdream(const unit * u, int bonus, curse *c, const curse_type if (sign * effect > sign * bonus) { if (mage == NULL || mage->number == 0 || sign>0?alliedunit(mage, u->faction, HELP_GUARD):!alliedunit(mage, u->faction, HELP_GUARD)) { - bonus = effect; + bonus = (int)effect; } } } @@ -1322,7 +1322,7 @@ int att_modification(const unit * u, skill_t sk) * jeweils erste vom Typ C_GBDREAM zurueckgegen wird, wir aber alle * durchsuchen und aufaddieren muessen */ if (u->region) { - double bonus = 0, malus = 0; + int bonus = 0, malus = 0; attrib *a = a_find(u->region->attribs, &at_curse); while (a && a->type == &at_curse) { curse *c = (curse *)a->data.v; diff --git a/src/spells.c b/src/spells.c index 3df54e2de..734858745 100644 --- a/src/spells.c +++ b/src/spells.c @@ -4697,7 +4697,7 @@ static int sp_gbdreams(castorder * co, const char *curse_name, int effect) duration = 2 + rng_int() % duration; /* Nichts machen als ein entsprechendes Attribut in die Region legen. */ - c = create_curse(mage, &r->attribs, ct_find(curse_name), power, duration, effect, 0); + c = create_curse(mage, &r->attribs, ct_find(curse_name), power, duration, (float)effect, 0); /* Erfolg melden */ ADDMSG(&mage->faction->msgs, msg_message("regionmagic_effect", From 3574d4a0b96b2e0218c9115a37be249e2d80fc79 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 12 May 2015 00:12:58 -0700 Subject: [PATCH 2/4] fix a Visual Studio /Wall warning --- src/kernel/curse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/curse.c b/src/kernel/curse.c index 1818079b5..d01e8900c 100644 --- a/src/kernel/curse.c +++ b/src/kernel/curse.c @@ -325,7 +325,7 @@ const curse_type *ct_find(const char *c) return NULL; } -void ct_checknames() { +void ct_checknames(void) { int i, qi; quicklist *ctl; From 0fb547f7c26aca07f183ffd2853d656ab13d05be Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 12 May 2015 08:41:14 -0700 Subject: [PATCH 3/4] =?UTF-8?q?Beispiel=20Trolle=20->=20Schl=C3=BCmpfe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test des Atom Editors --- res/core/de/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index 4703df1a9..51a24c4d4 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -1,10 +1,10 @@ Wirbel From c57907e3407040374773e178c0fe01e149610af5 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 12 May 2015 14:30:49 -0700 Subject: [PATCH 4/4] setup new games defaulting to turn 0 --- s/setup | 1 + 1 file changed, 1 insertion(+) diff --git a/s/setup b/s/setup index 69584d53b..0839d5b8f 100755 --- a/s/setup +++ b/s/setup @@ -91,6 +91,7 @@ ini_add lua install $SOURCE ini_add lua paths $SOURCE/scripts:$SOURCE/lunit ini_add lua rules $rules +echo 0 > turn touch newfactions ln -sf $SOURCE/bin/eressea ln -sf $SOURCE/scripts/run-turn.lua