Clean up includes in the "classes" folder

- Canonicalized the header guards
- Removed all the sneaky dependencies between files
- Made sure includes were properly sorted
This commit is contained in:
2014-04-20 01:23:15 -04:00
parent 316a3c14ca
commit b23bb30423
32 changed files with 62 additions and 51 deletions

View File

@@ -8,6 +8,8 @@
*
*/
// TODO: Delete this file, and move the function defined here to a more appropriate place.
#include "simpletypes.h"
#include "location.h"
#include "terrain.h"

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef CREATLIST_H
#define CREATLIST_H
#ifndef BOE_DATA_CREATLIST_H
#define BOE_DATA_CREATLIST_H
#include "monster.h"

View File

@@ -11,9 +11,8 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "boe.consts.h"
#include "boe.consts.h" // TODO: If this is needed here, maybe it shouldn't be in the "boe" namespace
#include "oldstructs.h"
cItemRec k;

View File

@@ -6,12 +6,13 @@
*
*/
#ifndef ITEM_H
#define ITEM_H
#ifndef BOE_DATA_ITEM_H
#define BOE_DATA_ITEM_H
#include "location.h"
#include <string>
#include <iosfwd>
#include "location.h"
#include "simpletypes.h"
namespace legacy { struct item_record_type; };

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef LOCATION_H
#define LOCATION_H
#ifndef BOE_LOCATION_H
#define BOE_LOCATION_H
#include <SFML/Graphics.hpp>

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,11 +6,12 @@
*
*/
#ifndef MONSTER_H
#define MONSTER_H
#ifndef BOE_DATA_MONSTER_H
#define BOE_DATA_MONSTER_H
#include <string>
#include <iosfwd>
#include "soundtool.h"
#include "simpletypes.h"
#include "graphtool.h"

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,13 +6,16 @@
*
*/
#ifndef OUTDOORS_H
#define OUTDOORS_H
#ifndef BOE_DATA_OUTDOORS_H
#define BOE_DATA_OUTDOORS_H
#include "location.h"
#include <string>
#include <iosfwd>
#include "location.h"
#include "special.h"
#include "simpletypes.h"
#include "monster.h"
namespace legacy {
struct out_wandering_type;

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef PARTY_H
#define PARTY_H
#ifndef BOE_DATA_PARTY_H
#define BOE_DATA_PARTY_H
#include <string>
#include <vector>

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,15 +6,19 @@
*
*/
#ifndef PC_H
#define PC_H
#ifndef BOE_DATA_PC_H
#define BOE_DATA_PC_H
#include <string>
#include <iosfwd>
#include "simpletypes.h"
#include "item.h"
namespace legacy { struct pc_record_type; };
typedef unsigned short pic_num_t; // TODO: This is now defined in multiple places...
class cPlayer {
public:
eMainStatus main_status;

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,11 +6,16 @@
*
*/
#ifndef REGTOWN_H
#define REGTOWN_H
#ifndef BOE_DATA_REGTOWN_H
#define BOE_DATA_REGTOWN_H
#include <iosfwd>
#include "town.h"
#include "simpletypes.h"
#include "location.h"
#include "monster.h"
namespace legacy {
struct big_tr_type;
struct ave_tr_type;

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef SCENARIO_H
#define SCENARIO_H
#ifndef BOE_DATA_SCENARIO_H
#define BOE_DATA_SCENARIO_H
#include <iosfwd>
#include <boost/filesystem/path.hpp>

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef SIMPLE_TYPES_H
#define SIMPLE_TYPES_H
#ifndef BOE_DATA_SIMPLETYPES_H
#define BOE_DATA_SIMPLETYPES_H
typedef unsigned short m_num_t;
typedef unsigned short ter_num_t;

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,10 +6,12 @@
*
*/
#ifndef SPECIAL_H
#define SPECIAL_H
#ifndef BOE_DATA_SPECIAL_H
#define BOE_DATA_SPECIAL_H
#include <iosfwd>
#include "simpletypes.h"
#include "location.h"
namespace legacy { struct special_node_type; };

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef TALKING_H
#define TALKING_H
#ifndef BOE_DATA_TALKING_H
#define BOE_DATA_TALKING_H
#include <iosfwd>

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"
#include "boe.consts.h" // TODO: Put these constants in a global file

View File

@@ -6,11 +6,13 @@
*
*/
#ifndef TERRAIN_H
#define TERRAIN_H
#ifndef BOE_DATA_TERRAIN_H
#define BOE_DATA_TERRAIN_H
#include <string>
#include <iosfwd>
#include "simpletypes.h"
#include "graphtool.h" // for pic_num_t
namespace legacy { struct terrain_type_type; };

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
ter_num_t& cBigTemplTown::terrain(size_t x, size_t y){

View File

@@ -6,11 +6,16 @@
*
*/
#ifndef TMPLTOWN_H
#define TMPLTOWN_H
#ifndef BOE_DATA_TMPLTOWN_H
#define BOE_DATA_TMPLTOWN_H
#include <iosfwd>
#include "location.h"
#include "monster.h"
#include "simpletypes.h"
#include "regtown.h"
class cTemplTown {
public:
class cCityBlock { // formerly city_block_type

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef TOWN_H
#define TOWN_H
#ifndef BOE_DATA_TOWN_H
#define BOE_DATA_TOWN_H
#include <vector>
#include <iosfwd>

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"
#include "mathutil.h"

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef UNIVERSE_H
#define UNIVERSE_H
#ifndef BOE_DATA_UNIVERSE_H
#define BOE_DATA_UNIVERSE_H
#include <iosfwd>
#include <boost/filesystem/path.hpp>

View File

@@ -11,7 +11,6 @@
#include <map>
#include <sstream>
#include "classes.h"
#include "oldstructs.h"

View File

@@ -6,8 +6,8 @@
*
*/
#ifndef VEHICLE_H
#define VEHICLE_H
#ifndef BOE_DATA_VEHICLE_H
#define BOE_DATA_VEHICLE_H
#include <iosfwd>
#include "location.h"