forked from github/server
PFL_NOCOORDS is really not needed anywhere. At least I sincerely hope not.
This commit is contained in:
parent
c9a2bb4f24
commit
9ffcff7e2a
9 changed files with 12 additions and 41 deletions
|
@ -12,7 +12,6 @@ without prior permission by the authors of Eressea.
|
|||
#include "creport.h"
|
||||
|
||||
/* tweakable features */
|
||||
#define ENCODE_SPECIAL 1
|
||||
#define RENDER_CRMESSAGES
|
||||
#define BUFFERSIZE 32768
|
||||
#define RESOURCECOMPAT
|
||||
|
@ -321,10 +320,8 @@ cr_region(variant var, char * buffer, const void * userdata)
|
|||
region * r = (region *)var.v;
|
||||
if (r) {
|
||||
plane * p = r->planep;
|
||||
if (!p || !(p->flags & PFL_NOCOORDS)) {
|
||||
sprintf(buffer, "%d %d %d", region_x(r, report), region_y(r, report), p?p->id:0);
|
||||
return 0;
|
||||
}
|
||||
sprintf(buffer, "%d %d %d", region_x(r, report), region_y(r, report), p?p->id:0);
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -1132,12 +1129,7 @@ cr_output_region(FILE * F, report_context * ctx, seen_region * sr)
|
|||
fprintf(F, "REGION %d %d\n", region_x(r, f), region_y(r, f));
|
||||
}
|
||||
} else {
|
||||
#if ENCODE_SPECIAL
|
||||
if (r->planep->flags & PFL_NOCOORDS) fprintf(F, "SPEZIALREGION %d %d\n", encode_region(f, r), r->planep->id);
|
||||
#else
|
||||
if (r->planep->flags & PFL_NOCOORDS) continue;
|
||||
#endif
|
||||
else fprintf(F, "REGION %d %d %d\n", region_x(r, f), region_y(r, f), r->planep->id);
|
||||
fprintf(F, "REGION %d %d %d\n", region_x(r, f), region_y(r, f), r->planep->id);
|
||||
}
|
||||
fprintf(F, "%d;id\n", r->uid);
|
||||
if (r->land) {
|
||||
|
@ -1416,8 +1408,7 @@ report_computer(const char * filename, report_context * ctx, const char * charse
|
|||
for (bm=f->battles;bm;bm=bm->next) {
|
||||
if (!bm->r->planep) fprintf(F, "BATTLE %d %d\n", region_x(bm->r, f), region_y(bm->r, f));
|
||||
else {
|
||||
if (bm->r->planep->flags & PFL_NOCOORDS) fprintf(F, "BATTLESPEC %d %d\n", encode_region(f, bm->r), bm->r->planep->id);
|
||||
else fprintf(F, "BATTLE %d %d %d\n", region_x(bm->r, f), region_y(bm->r, f), bm->r->planep->id);
|
||||
fprintf(F, "BATTLE %d %d %d\n", region_x(bm->r, f), region_y(bm->r, f), bm->r->planep->id);
|
||||
}
|
||||
cr_output_messages(F, bm->msgs, f);
|
||||
}
|
||||
|
|
|
@ -1374,9 +1374,7 @@ report_template(const char * filename, report_context * ctx, const char * charse
|
|||
rps_nowrap(F, "");
|
||||
rnl(F);
|
||||
pl = getplane(r);
|
||||
if (pl && fval(pl, PFL_NOCOORDS)) {
|
||||
sprintf(buf, "%s; %s", LOC(f->locale, parameters[P_REGION]), rname(r, f->locale));
|
||||
} else if (pl && pl->id != 0) {
|
||||
if (pl && pl->id != 0) {
|
||||
sprintf(buf, "%s %d,%d,%d ; %s", LOC(f->locale, parameters[P_REGION]), region_x(r,f),
|
||||
region_y(r,f), pl->id, rname(r, f->locale));
|
||||
} else {
|
||||
|
|
|
@ -16,10 +16,6 @@
|
|||
#include <kernel/eressea.h>
|
||||
#include "xmlreport.h"
|
||||
|
||||
/* tweakable features */
|
||||
#define ENCODE_SPECIAL 1
|
||||
#define RENDER_CRMESSAGES
|
||||
|
||||
#define XML_ATL_NAMESPACE (const xmlChar *) "http://www.eressea.de/XML/2008/atlantis"
|
||||
#define XML_XML_LANG (const xmlChar *) "lang"
|
||||
|
||||
|
|
|
@ -1643,14 +1643,8 @@ sail(unit * u, order * ord, boolean move_on_land, region_list **routep)
|
|||
assert(sh == u->ship || !"ship has sunk, but we didn't notice it");
|
||||
|
||||
if (fval(next_point->terrain, FORBIDDEN_REGION)) {
|
||||
plane *pl = getplane(next_point);
|
||||
if (pl && fval(pl, PFL_NOCOORDS)) {
|
||||
ADDMSG(&f->msgs, msg_message("sailforbiddendir",
|
||||
"ship direction", sh, dir));
|
||||
} else {
|
||||
ADDMSG(&f->msgs, msg_message("sailforbidden",
|
||||
"ship region", sh, next_point));
|
||||
}
|
||||
ADDMSG(&f->msgs, msg_message("sailforbidden",
|
||||
"ship region", sh, next_point));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PFL_NOCOORDS 1
|
||||
#define PFL_NOCOORDS 1 /* not in use */
|
||||
#define PFL_NORECRUITS 2
|
||||
#define PFL_NOALLIANCES 4
|
||||
#define PFL_LOWSTEALING 8
|
||||
|
|
|
@ -116,13 +116,8 @@ write_regionname(const region * r, const faction * f, char * buffer, size_t size
|
|||
if (r==NULL) {
|
||||
strcpy(buf, "(null)");
|
||||
} else {
|
||||
plane *pl = r->planep;
|
||||
if (pl && fval(pl, PFL_NOCOORDS)) {
|
||||
strncpy(buf, rname(r, lang), size);
|
||||
} else {
|
||||
snprintf(buf, size, "%s (%d,%d)", rname(r, lang),
|
||||
region_x(r, f), region_y(r, f));
|
||||
}
|
||||
snprintf(buf, size, "%s (%d,%d)", rname(r, lang),
|
||||
region_x(r, f), region_y(r, f));
|
||||
}
|
||||
buf[size-1] = 0;
|
||||
return buffer;
|
||||
|
|
|
@ -1621,9 +1621,7 @@ f_regionid(const region * r, const faction * f, char * buffer, size_t size)
|
|||
plane * pl = r->planep;
|
||||
strncpy(buffer, rname(r, f->locale), size);
|
||||
buffer[size-1]=0;
|
||||
if (pl==NULL || !fval(pl, PFL_NOCOORDS)) {
|
||||
sprintf(buffer+strlen(buffer), " (%d,%d%s%s)", region_x(r,f), region_y(r,f), pl?",":"", pl?pl->name:"");
|
||||
}
|
||||
sprintf(buffer+strlen(buffer), " (%d,%d%s%s)", region_x(r,f), region_y(r,f), pl?",":"", pl?pl->name:"");
|
||||
}
|
||||
return strlen(buffer);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define PFL_MUSEUM PFL_NOMONSTERS | PFL_NOCOORDS | PFL_NORECRUITS | PFL_NOGIVE | PFL_NOATTACK | PFL_NOTERRAIN | PFL_NOMAGIC | PFL_NOSTEALTH | PFL_NOTEACH | PFL_NOBUILD | PFL_NOFEED
|
||||
#define PFL_MUSEUM PFL_NOMONSTERS | PFL_NORECRUITS | PFL_NOGIVE | PFL_NOATTACK | PFL_NOTERRAIN | PFL_NOMAGIC | PFL_NOSTEALTH | PFL_NOTEACH | PFL_NOBUILD | PFL_NOFEED
|
||||
|
||||
attrib_type at_museumexit = {
|
||||
"museumexit", NULL, NULL, NULL, a_writeshorts, a_readshorts
|
||||
|
|
|
@ -523,7 +523,6 @@ fix_astralplane(void)
|
|||
|
||||
if (astralplane==NULL || monsters==NULL) return 0;
|
||||
|
||||
freset(astralplane, PFL_NOCOORDS);
|
||||
freset(astralplane, PFL_NOFEED);
|
||||
set_ursprung(monsters, astralplane->id, 0, 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue