forked from github/server
68 lines
2.5 KiB
C
68 lines
2.5 KiB
C
|
/* vi: set ts=2:
|
|||
|
*
|
|||
|
* $Id: plane.h,v 1.1 2001/01/25 09:37:57 enno Exp $
|
|||
|
* Eressea PB(E)M host Copyright (C) 1998-2000
|
|||
|
* Christian Schlittchen (corwin@amber.kn-bremen.de)
|
|||
|
* Katja Zedel (katze@felidae.kn-bremen.de)
|
|||
|
* Henning Peters (faroul@beyond.kn-bremen.de)
|
|||
|
* Enno Rehling (enno@eressea-pbem.de)
|
|||
|
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
|
|||
|
*
|
|||
|
* based on:
|
|||
|
*
|
|||
|
* Atlantis v1.0 13 September 1993 Copyright 1993 by Russell Wallace
|
|||
|
* Atlantis v1.7 Copyright 1996 by Alex Schr<EFBFBD>der
|
|||
|
*
|
|||
|
* This program may not be used, modified or distributed without
|
|||
|
* prior permission by the authors of Eressea.
|
|||
|
* This program may not be sold or used commercially without prior written
|
|||
|
* permission from the authors.
|
|||
|
*/
|
|||
|
|
|||
|
#ifndef PLANES_H
|
|||
|
#define PLANES_H
|
|||
|
|
|||
|
#define PFL_NOCOORDS 1
|
|||
|
#define PFL_NORECRUITS 2
|
|||
|
#define PFL_NOALLIANCES 4
|
|||
|
#define PFL_LOWSTEALING 8
|
|||
|
#define PFL_NOGIVE 16 /* <20>bergaben sind unm<6E>glich */
|
|||
|
#define PFL_NOATTACK 32 /* Angriffe und Diebst<73>hle sind unm<6E>glich */
|
|||
|
#define PFL_NOTERRAIN 64 /* Terraintyp wird nicht angezeigt TODO? */
|
|||
|
#define PFL_NOMAGIC 128 /* Zaubern ist unm<6E>glich */
|
|||
|
#define PFL_NOSTEALTH 256 /* Tarnung au<61>er Betrieb */
|
|||
|
#define PFL_NOTEACH 512 /* Lehre au<61>er Betrieb */
|
|||
|
#define PFL_NOBUILD 1024 /* Lehre au<61>er Betrieb */
|
|||
|
#define PFL_NOFEED 2048 /* Kein Unterhalt n<>tig TODO */
|
|||
|
#define PFL_FRIENDLY 4096 /* everyone is your ally */
|
|||
|
|
|||
|
#define PFL_MUSEUM PFL_NOCOORDS | PFL_NORECRUITS | PFL_NOGIVE | PFL_NOATTACK | PFL_NOTERRAIN | PFL_NOMAGIC | PFL_NOSTEALTH | PFL_NOTEACH | PFL_NOBUILD | PFL_NOFEED
|
|||
|
|
|||
|
typedef struct plane {
|
|||
|
struct plane *next;
|
|||
|
int id;
|
|||
|
char *name;
|
|||
|
int minx,maxx,miny,maxy;
|
|||
|
unsigned int flags;
|
|||
|
attrib *attribs;
|
|||
|
} plane;
|
|||
|
|
|||
|
plane *planes;
|
|||
|
|
|||
|
plane *getplane(const struct region *r);
|
|||
|
plane *findplane(int x, int y);
|
|||
|
void init_planes(void);
|
|||
|
int getplaneid(struct region *r);
|
|||
|
plane * getplanebyid(int id);
|
|||
|
int region_x(const struct region *r, const struct faction *f);
|
|||
|
int region_y(const struct region *r, const struct faction *f);
|
|||
|
int plane_center_x(plane *pl);
|
|||
|
int plane_center_y(plane *pl);
|
|||
|
int ursprung_x(const struct faction *f, const plane *pl);
|
|||
|
int ursprung_y(const struct faction *f, const plane *pl);
|
|||
|
void set_ursprung(struct faction *f, int id, int x, int y);
|
|||
|
plane * create_new_plane(int id, const char *name, int minx, int maxx, int miny, int maxy, int flags);
|
|||
|
plane * getplanebyname(const char *);
|
|||
|
extern int rel_to_abs(struct plane *pl, struct faction * f, int rel, unsigned char index);
|
|||
|
#endif
|