From 788826049b25f6588b1e340d22f9a2701b1b77ae Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 15 Dec 2001 14:44:18 +0000 Subject: [PATCH] =?UTF-8?q?welcome=20text=20wird=20spielabh=C3=A4ngig=20ge?= =?UTF-8?q?lesen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/gamecode/report.c | 6 +++--- src/common/items/seed.c | 2 ++ src/common/kernel/eressea.c | 4 ++++ src/common/kernel/eressea.h | 1 + src/eressea/main.c | 1 + src/res/eressea.xml | 2 +- src/res/readme.txt | 2 +- src/res/vinyambar-classic.xml | 2 +- src/res/vinyambar.xml | 2 +- src/tools/fixes.c | 2 ++ 10 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index f124e8791..6c2ce27a4 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -2786,7 +2786,7 @@ reports(void) if(f->age == 1) { fprintf(BAT, "ls %s.nr %s.cr | zip -m -j -9 -@ %s.zip\n", factionid(f), factionid(f), factionid(f)); - fprintf(BAT, "zip -j -9 %s.zip ../readme.txt\n", factionid(f)); + fprintf(BAT, "zip -j -9 %s.zip res/%s/%s/welcome.txt\n", factionid(f), global.welcomepath, locale_name(f->locale)); } else { fprintf(BAT, "ls %s.nr %s.cr | zip -m -j -9 -@ %s.zip\n", factionid(f), factionid(f), factionid(f)); @@ -2799,7 +2799,7 @@ reports(void) if (f->age == 1) { fprintf(shfp, - " \\\n\t\"text/plain\" \"Willkommen\" ../readme.txt"); + " \\\n\t\"text/plain\" \"Willkommen\" res/%s/%s/welcome.txt\n", global.welcomepath, locale_name(f->locale)); } fprintf(BAT, "bzip2 -9v `ls %s.nr %s.cr`\n", @@ -2828,7 +2828,7 @@ reports(void) if (f->age == 1) { fprintf(shfp, - " \\\n\t\"text/plain\" \"Willkommen\" ../readme.txt"); + " \\\n\t\"text/plain\" \"Willkommen\" res/%s/%s/welcome.txt\n", global.welcomepath, locale_name(f->locale)); } if (!nonr && f->options & wants_report) diff --git a/src/common/items/seed.c b/src/common/items/seed.c index ac44744c2..8eb038499 100644 --- a/src/common/items/seed.c +++ b/src/common/items/seed.c @@ -136,4 +136,6 @@ init_mallornseed(void) } } +#else +int __xx_nonempty=0; /* to prevent this from being an empty translation unit */ #endif diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index ddce167f0..eaae5ff04 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -2097,8 +2097,12 @@ parse_tagbegin(struct xml_stack *stack, void *data) return XML_USERERROR; } } else if (strcmp(tag->name, "game")==0) { + const char * welcome = xml_value(tag, "welcome"); const char * name = xml_value(tag, "name"); int maxunits = xml_ivalue(tag, "units"); + if (welcome!=NULL) { + global.welcomepath = strdup(welcome); + } if (name!=NULL) { global.gamename = strdup(name); } diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index d30540039..000026770 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -1168,6 +1168,7 @@ extern const struct race * new_race[]; /* globale settings des Spieles */ typedef struct settings { const char *gamename; + const char *welcomepath; unsigned int maxunits; struct attrib *attribs; unsigned int data_version; diff --git a/src/eressea/main.c b/src/eressea/main.c index 5dda624a8..c0dab99ce 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -120,6 +120,7 @@ static boolean g_killeiswald = false; struct settings global = { "Eressea", /* gamename */ + "eressea", /* resourcepath */ 1000, /* maxunits */ }; diff --git a/src/res/eressea.xml b/src/res/eressea.xml index 30c6ade7a..6e5e32f77 100644 --- a/src/res/eressea.xml +++ b/src/res/eressea.xml @@ -10,7 +10,7 @@ - + Game specific diff --git a/src/res/readme.txt b/src/res/readme.txt index e32954cc3..6e91e4e4a 100644 --- a/src/res/readme.txt +++ b/src/res/readme.txt @@ -7,7 +7,7 @@ Probleme haben, weil dir vielleicht die Regeln noch unklar sind, so gibt es mehrere Informationsquellen, die dir hoffentlich helfen können. Die wichtigste Hilfe für das Spiel ist nach wie vor die Anleitung, im Netz zu -finden unter http://eressea.faroul.de/. +finden unter http://eressea.upb.de/rules/. Eine Gruppe engagierter Mitspieler hat sich zum Ziel gesetzt, Neulingen zu helfen. Diese Spieler können per EMail unter eressea-help@eressea.kn-bremen.de diff --git a/src/res/vinyambar-classic.xml b/src/res/vinyambar-classic.xml index 11d1964f8..0f1dc7dde 100644 --- a/src/res/vinyambar-classic.xml +++ b/src/res/vinyambar-classic.xml @@ -10,7 +10,7 @@ - + Game specific diff --git a/src/res/vinyambar.xml b/src/res/vinyambar.xml index dba4f7898..eb133db22 100644 --- a/src/res/vinyambar.xml +++ b/src/res/vinyambar.xml @@ -10,7 +10,7 @@ - + Game specific diff --git a/src/tools/fixes.c b/src/tools/fixes.c index 93396d991..ae422c6fe 100644 --- a/src/tools/fixes.c +++ b/src/tools/fixes.c @@ -73,6 +73,7 @@ static struct attrib_type at_age = { } \ } +#if NEW_RESOURCEGROWTH static void convert_resources(void) { @@ -210,6 +211,7 @@ convert_resources(void) log_close(); fclose(fixes); } +#endif static void fix_age(void)