From 31195c12eadc4457610efc544891398ebfb05aac Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 6 Dec 2014 17:20:46 -0500 Subject: [PATCH] Fix up some invisible dependencies and missing include guards in headers --- osx/boe.actions.h | 9 ++++++++- osx/boe.combat.h | 11 +++++++++++ osx/boe.consts.h | 4 ++-- osx/boe.dlgutil.h | 5 +++++ osx/boe.fields.h | 7 +++++++ osx/boe.fileio.h | 6 ++++++ osx/boe.graphics.h | 7 +++++++ osx/boe.graphutil.h | 10 ++++++++++ osx/boe.infodlg.h | 8 ++++++++ osx/boe.itemdata.h | 8 ++++++++ 10 files changed, 72 insertions(+), 3 deletions(-) diff --git a/osx/boe.actions.h b/osx/boe.actions.h index c8376330..8bf2ea71 100644 --- a/osx/boe.actions.h +++ b/osx/boe.actions.h @@ -1,5 +1,10 @@ -#include +#ifndef BOE_GAME_ACTIONS_H +#define BOE_GAME_ACTIOSN_H + +#include +#include "location.h" +#include "simpletypes.h" void init_screen_locs(); bool prime_time(); @@ -27,3 +32,5 @@ short get_outdoor_num(); short count_walls(location loc); bool is_sign(ter_num_t ter); bool check_for_interrupt(); + +#endif diff --git a/osx/boe.combat.h b/osx/boe.combat.h index ba2dad6c..5c4a4f8c 100644 --- a/osx/boe.combat.h +++ b/osx/boe.combat.h @@ -1,3 +1,12 @@ + +#ifndef BOE_GAME_COMBAT_H +#define BOE_GAME_COMBAT_H + +#include "location.h" +#include "monster.h" +#include "outdoors.h" +#include "boe.global.h" + void start_outdoor_combat(cOutdoors::cCreature encounter,ter_num_t in_which_terrain,short num_walls); bool pc_combat_move(location destination); void char_parry(); @@ -52,3 +61,5 @@ void sleep_cloud_space(short m,short n); void take_m_ap(short num,cCreature *monst); void add_new_action(short pc_num); short get_monst_sound(cCreature *attacker,short which_att); + +#endif diff --git a/osx/boe.consts.h b/osx/boe.consts.h index ce2e7674..e5312b92 100644 --- a/osx/boe.consts.h +++ b/osx/boe.consts.h @@ -6,8 +6,8 @@ * */ -#ifndef _CONSTS_H -#define _CONSTS_H +#ifndef BOE_GAME_CONSTS_H +#define BOE_GAME_CONSTS_H /* This file contain numerous constans in form of #defines. diff --git a/osx/boe.dlgutil.h b/osx/boe.dlgutil.h index a9cde06d..65a592f4 100644 --- a/osx/boe.dlgutil.h +++ b/osx/boe.dlgutil.h @@ -1,5 +1,8 @@ +#ifndef BOE_GAME_DLGUTIL_H + #include "dialog.h" +#include "simpletypes.h" void start_shop_mode(short shop_type,short shop_min,short shop_max,short cost_adj,const char* store_name); void end_shop_mode(); @@ -28,3 +31,5 @@ short pick_prefab_scen(); //void give_password_filter (short item_hit); //bool enter_password(); //short wd_to_pwd(Str255 str); + +#endif diff --git a/osx/boe.fields.h b/osx/boe.fields.h index bed96ecc..577e89c4 100644 --- a/osx/boe.fields.h +++ b/osx/boe.fields.h @@ -1,3 +1,8 @@ + +#ifndef BOE_GAME_FIELDS_H +#define BOE_GAME_FIELDS_H +// TODO: I think these should be integrated into the cTown class. + bool is_explored(short i,short j); void make_explored(short i,short j); void take_explored(short i,short j); @@ -59,3 +64,5 @@ void make_sleep_cloud(short i,short j); //bool is_rubble(short i,short j); void make_sfx(short i,short j, short type); void spread_sfx(short type,short prob); + +#endif diff --git a/osx/boe.fileio.h b/osx/boe.fileio.h index ce1f8a50..8837102d 100644 --- a/osx/boe.fileio.h +++ b/osx/boe.fileio.h @@ -1,5 +1,10 @@ +#ifndef BOE_GAME_FILEIO_H +#define BOE_GAME_FILEIO_H + #include +#include "location.h" +#include "simpletypes.h" namespace fs = boost::filesystem; // TODO: Centralize this alias! @@ -61,3 +66,4 @@ __declspec(deprecated) void init_town(); void alter_rect(RECT *r); +#endif diff --git a/osx/boe.graphics.h b/osx/boe.graphics.h index 1422acad..eaece5dd 100644 --- a/osx/boe.graphics.h +++ b/osx/boe.graphics.h @@ -1,5 +1,10 @@ +#ifndef BOE_GAME_GRAPHICS_H +#define BOE_GAME_GRAPHICS_H + #include +#include "location.h" +#include "simpletypes.h" enum { REFRESH_NONE = 0, @@ -59,3 +64,5 @@ ter_num_t get_ground_from_ter(ter_num_t ter); ter_num_t get_ter_from_ground(unsigned char ground); void draw_startup_anim(bool advance); + +#endif diff --git a/osx/boe.graphutil.h b/osx/boe.graphutil.h index bfd5daa3..cc886b52 100644 --- a/osx/boe.graphutil.h +++ b/osx/boe.graphutil.h @@ -1,3 +1,11 @@ + +#ifndef BOE_GAME_GRAPHUTIL_H +#define BOE_GAME_GRAPHUTIL_H + +#include "pict.h" +#include "location.h" +#include "simpletypes.h" + void draw_one_terrain_spot (short i,short j,short terrain_to_draw); void draw_monsters(); void play_see_monster_str(unsigned short m); @@ -18,3 +26,5 @@ void play_ambient_sound(); void draw_items(location where); void draw_fields(location where); + +#endif diff --git a/osx/boe.infodlg.h b/osx/boe.infodlg.h index 362d071e..a62dfb91 100644 --- a/osx/boe.infodlg.h +++ b/osx/boe.infodlg.h @@ -1,5 +1,11 @@ +#ifndef BOE_GAME_INFODLG_H +#define BOE_GAME_INFODLG_H + #include "simpletypes.h" +#include "item.h" +#include "monster.h" +#include "pc.h" class cDialog; void display_spells(short mode,short force_spell,cDialog* parent); @@ -48,3 +54,5 @@ public: } void operator()(cDialog&); }; + +#endif diff --git a/osx/boe.itemdata.h b/osx/boe.itemdata.h index 397cb3fe..d9f35de4 100644 --- a/osx/boe.itemdata.h +++ b/osx/boe.itemdata.h @@ -1,3 +1,9 @@ + +#ifndef BOE_GAME_ITEMDATA_H +#define BOE_GAME_ITEMDATA_H + +#include "item.h" + cItemRec get_stored_item(short which); cItemRec get_food(); cItemRec get_weapon(short loot); @@ -15,3 +21,5 @@ cItemRec get_ring(short loot); cItemRec get_necklace(short loot); //item_record_type convert_item (short_item_record_type s_item); cItemRec pull_item_of_type(unsigned int loot_max,short min_val,short max_val,eItemType t1, eItemType t2 = eItemType::NO_ITEM, eItemType t3 = eItemType::NO_ITEM); + +#endif