- Option --crabsolute erstellt die cr's mit absoluten Regionskoordinaten

This commit is contained in:
Christian Schlittchen 2003-11-10 10:05:18 +00:00
parent 7734965ed6
commit 45d130c334
2 changed files with 12 additions and 3 deletions

View File

@ -78,6 +78,7 @@
extern const char *directions[]; extern const char *directions[];
extern const char *spelldata[]; extern const char *spelldata[];
extern int quiet; extern int quiet;
extern boolean opt_cr_absolute_coords;
/* globals */ /* globals */
#define C_REPORT_VERSION 64 #define C_REPORT_VERSION 64
@ -1138,8 +1139,13 @@ report_computer(FILE * F, faction * f, const seen_region * seen,
unit * owner = region_owner(r); unit * owner = region_owner(r);
sd = sd->next; sd = sd->next;
if (!rplane(r)) fprintf(F, "REGION %d %d\n", region_x(r, f), region_y(r, f)); if (!rplane(r)) {
else { if(opt_cr_absolute_coords) {
fprintf(F, "REGION %d %d\n", r->x, r->x);
} else {
fprintf(F, "REGION %d %d\n", region_x(r, f), region_y(r, f));
}
} else {
#if ENCODE_SPECIAL #if ENCODE_SPECIAL
if (rplane(r)->flags & PFL_NOCOORDS) fprintf(F, "SPEZIALREGION %d %d\n", encode_region(f, r), rplane(r)->id); if (rplane(r)->flags & PFL_NOCOORDS) fprintf(F, "SPEZIALREGION %d %d\n", encode_region(f, r), rplane(r)->id);
#else #else

View File

@ -118,7 +118,7 @@ extern int fuzzy_hits;
#endif /* FUZZY_BASE36 */ #endif /* FUZZY_BASE36 */
/** /**
** global variables wthat we are exporting ** global variables that we are exporting
**/ **/
static char * orders = NULL; static char * orders = NULL;
static char * xmlfile = NULL; static char * xmlfile = NULL;
@ -126,6 +126,7 @@ static int nowrite = 0;
static boolean g_writemap = false; static boolean g_writemap = false;
static boolean g_killeiswald = false; static boolean g_killeiswald = false;
static boolean opt_reportonly = false; static boolean opt_reportonly = false;
boolean opt_cr_absolute_coords = false;
struct settings global = { struct settings global = {
"Eressea", /* gamename */ "Eressea", /* gamename */
@ -507,6 +508,7 @@ usage(const char * prog, const char * arg)
"--debug : schreibt Debug-Ausgaben in die Datei debug\n" "--debug : schreibt Debug-Ausgaben in die Datei debug\n"
"--nocr : keine CRs\n" "--nocr : keine CRs\n"
"--nonr : keine Reports\n" "--nonr : keine Reports\n"
"--crabsolute : absolute Koordinaten im CR\n"
#ifdef USE_MERIAN #ifdef USE_MERIAN
"--nomer : keine Meriankarten\n" "--nomer : keine Meriankarten\n"
#endif #endif
@ -539,6 +541,7 @@ read_args(int argc, char **argv)
else if (strcmp(argv[i]+2, "nobattle")==0) nobattle = true; else if (strcmp(argv[i]+2, "nobattle")==0) nobattle = true;
else if (strcmp(argv[i]+2, "nomonsters")==0) nomonsters = true; else if (strcmp(argv[i]+2, "nomonsters")==0) nomonsters = true;
else if (strcmp(argv[i]+2, "nodebug")==0) nobattledebug = true; else if (strcmp(argv[i]+2, "nodebug")==0) nobattledebug = true;
else if (strcmp(argv[i]+2, "crabsolute")==0) opt_cr_absolute_coords = true;
#ifdef USE_MERIAN #ifdef USE_MERIAN
else if (strcmp(argv[i]+2, "nomer")==0) nomer = true; else if (strcmp(argv[i]+2, "nomer")==0) nomer = true;
#endif #endif