diff --git a/src/alchemy.h b/src/alchemy.h index af7adf459..46feeb689 100644 --- a/src/alchemy.h +++ b/src/alchemy.h @@ -23,6 +23,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif + struct potion_type; + struct unit; + struct region; + struct item_type; + struct order; + enum { /* Stufe 1 */ P_FAST, diff --git a/src/gmtool.h b/src/gmtool.h index 0359973b5..4e3570de2 100644 --- a/src/gmtool.h +++ b/src/gmtool.h @@ -14,10 +14,12 @@ #ifdef __cplusplus extern "C" { #endif - struct lua_State; - struct selection; - struct state; - struct region; + + struct lua_State; + struct selection; + struct state; + struct region; + struct terrain_type; int gmmain(int argc, char *argv[]); int curses_readline(struct lua_State *L, char *buffer, size_t size, diff --git a/src/kernel/connection.h b/src/kernel/connection.h index edbf23bb5..dd168b413 100644 --- a/src/kernel/connection.h +++ b/src/kernel/connection.h @@ -25,6 +25,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif + struct attrib; + struct attrib_type; + struct faction; + struct region; + struct storage; + struct unit; + extern int nextborder; typedef struct connection { diff --git a/src/kernel/equipment.h b/src/kernel/equipment.h index 9eee8b5d8..619b05193 100644 --- a/src/kernel/equipment.h +++ b/src/kernel/equipment.h @@ -24,34 +24,36 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef __cplusplus extern "C" { #endif - struct spell; + struct spell; + struct item; + struct unit; - typedef struct itemdata { - const struct item_type *itype; - char *value; - struct itemdata *next; - } itemdata; - - typedef struct subsetitem { - struct equipment *set; - float chance; - } subsetitem; - - typedef struct subset { - float chance; - subsetitem *sets; - } subset; - - typedef struct equipment { - char *name; - struct itemdata *items; - char *skills[MAXSKILLS]; - struct spellbook *spellbook; - struct subset *subsets; - struct equipment *next; - void (*callback) (const struct equipment *, struct unit *); - } equipment; + typedef struct itemdata { + const struct item_type *itype; + char *value; + struct itemdata *next; + } itemdata; + typedef struct subsetitem { + struct equipment *set; + float chance; + } subsetitem; + + typedef struct subset { + float chance; + subsetitem *sets; + } subset; + + typedef struct equipment { + char *name; + struct itemdata *items; + char *skills[MAXSKILLS]; + struct spellbook *spellbook; + struct subset *subsets; + struct equipment *next; + void (*callback) (const struct equipment *, struct unit *); + } equipment; + extern struct equipment *create_equipment(const char *eqname); extern struct equipment *get_equipment(const char *eqname); diff --git a/src/kernel/item.h b/src/kernel/item.h index bbb2653ad..790911ba6 100644 --- a/src/kernel/item.h +++ b/src/kernel/item.h @@ -26,13 +26,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif - struct unit; - struct attrib; - struct attrib_type; - struct region; - struct resource_type; - struct locale; - struct troop; + struct unit; + struct attrib; + struct attrib_type; + struct region; + struct resource_type; + struct locale; + struct troop; + struct item; + struct order; typedef struct item { struct item *next; diff --git a/src/kernel/plane.h b/src/kernel/plane.h index 1c7e505dc..e28e67266 100644 --- a/src/kernel/plane.h +++ b/src/kernel/plane.h @@ -22,6 +22,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif + struct region; + struct plane; + struct storage; + #define PFL_NOCOORDS 1 /* not in use */ #define PFL_NORECRUITS 2 #define PFL_NOALLIANCES 4 diff --git a/src/kernel/pool.h b/src/kernel/pool.h index d6f4766c6..6c47a5c14 100644 --- a/src/kernel/pool.h +++ b/src/kernel/pool.h @@ -22,6 +22,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif + struct unit; + struct resource_type; + struct region; + /* bitfield values for get/use/change operations */ #define GET_SLACK 0x01 #define GET_RESERVE 0x02 diff --git a/src/kernel/save.h b/src/kernel/save.h index 775624f11..2c119a5eb 100644 --- a/src/kernel/save.h +++ b/src/kernel/save.h @@ -22,6 +22,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif + struct attrib; + struct item; + struct storage; + struct spell; + struct spellbook; + struct unit; + typedef struct gamedata { struct storage *store; int version; diff --git a/src/kernel/spell.h b/src/kernel/spell.h index 40404b4d2..7d10df60b 100644 --- a/src/kernel/spell.h +++ b/src/kernel/spell.h @@ -22,7 +22,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif - struct castorder; + struct castorder; + struct unit; + struct region; + struct spell; + struct spell_component; + struct quicklist; + struct attrib_type; + typedef int (*spell_f)(struct castorder * co); typedef void(*fumble_f)(const struct castorder * co); diff --git a/src/laws.h b/src/laws.h index 0d86c4225..8ab6ea469 100755 --- a/src/laws.h +++ b/src/laws.h @@ -22,17 +22,24 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. extern "C" { #endif - extern int writepasswd(void); - void demographics(void); - void update_guards(void); - void update_subscriptions(void); - void deliverMail(struct faction *f, struct region *r, struct unit *u, - const char *s, struct unit *receiver); + struct unit; + struct region; + struct building; + struct faction; + struct order; + struct attrib_type; - bool renamed_building(const struct building * b); - int rename_building(struct unit * u, struct order * ord, struct building * b, const char *name); - void get_food(struct region * r); - extern int can_contact(const struct region *r, const struct unit *u, const struct unit *u2); + int writepasswd(void); + void demographics(void); + void update_guards(void); + void update_subscriptions(void); + void deliverMail(struct faction *f, struct region *r, struct unit *u, + const char *s, struct unit *receiver); + + bool renamed_building(const struct building * b); + int rename_building(struct unit * u, struct order * ord, struct building * b, const char *name); + void get_food(struct region * r); + int can_contact(const struct region *r, const struct unit *u, const struct unit *u2); /* eressea-specific. put somewhere else, please. */ void processorders(void); diff --git a/src/move.h b/src/move.h index 4b0a9e4c7..27704d4a4 100644 --- a/src/move.h +++ b/src/move.h @@ -26,6 +26,8 @@ extern "C" { #endif struct unit; + struct region; + struct region_list; struct ship; struct building_type; diff --git a/src/spells/shipcurse.h b/src/spells/shipcurse.h index ab60d7232..551d1a920 100644 --- a/src/spells/shipcurse.h +++ b/src/spells/shipcurse.h @@ -20,15 +20,19 @@ extern "C" { #endif - struct locale; - struct message; - extern struct message *cinfo_ship(const void *obj, objtype_t typ, - const struct curse *c, int self); - extern void register_shipcurse(void); - extern struct curse *shipcurse_flyingship(struct ship *sh, struct unit *mage, - float power, int duration); - int levitate_ship(struct ship *sh, struct unit *mage, float power, - int duration); + struct locale; + struct message; + struct ship; + struct unit; + struct curse; + + struct message *cinfo_ship(const void *obj, objtype_t typ, + const struct curse *c, int self); + void register_shipcurse(void); + struct curse *shipcurse_flyingship(struct ship *sh, struct unit *mage, + float power, int duration); + int levitate_ship(struct ship *sh, struct unit *mage, float power, + int duration); #ifdef __cplusplus }