reduced inter-header dependencies around unit.hpp
This commit is contained in:
parent
4b481fdb99
commit
24138ab340
19 changed files with 53 additions and 26 deletions
|
@ -18,13 +18,19 @@ class display;
|
|||
class gamestatus;
|
||||
class replay;
|
||||
struct combatant;
|
||||
class unit;
|
||||
|
||||
class attack_type;
|
||||
class team;
|
||||
class game_data;
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "gamestatus.hpp"
|
||||
#include "map.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "unit_map.hpp"
|
||||
|
||||
#include <deque>
|
||||
#include <sstream>
|
||||
|
||||
#define RECRUIT_POS -2
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include "ai_interface.hpp"
|
||||
#include "map.hpp"
|
||||
#include "unit_map.hpp"
|
||||
#include "unit.hpp"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
class config;
|
||||
class gamestatus;
|
||||
class unit;
|
||||
class unit_map;
|
||||
#include "image.hpp"
|
||||
#include "key.hpp"
|
||||
#include "map.hpp"
|
||||
|
@ -24,7 +26,6 @@ class gamestatus;
|
|||
#include "reports.hpp"
|
||||
#include "team.hpp"
|
||||
#include "theme.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "video.hpp"
|
||||
#include "widgets/button.hpp"
|
||||
|
||||
|
|
|
@ -19,9 +19,10 @@
|
|||
#include "display.hpp"
|
||||
#include "scoped_resource.hpp"
|
||||
#include "team.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "widgets/textbox.hpp"
|
||||
|
||||
class unit_map;
|
||||
|
||||
namespace gui{
|
||||
enum TEXTBOX_MODE { TEXTBOX_NONE, TEXTBOX_SEARCH, TEXTBOX_MESSAGE,
|
||||
TEXTBOX_COMMAND };
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
class config;
|
||||
class t_string;
|
||||
class display;
|
||||
class gamestatus;
|
||||
class unit;
|
||||
class game_data;
|
||||
class game_state;
|
||||
|
||||
#include "gamestatus.hpp"
|
||||
#include "map.hpp"
|
||||
#include "soundsource.hpp"
|
||||
#include "team.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "variable.hpp"
|
||||
|
||||
#include "unit_map.hpp"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
|
|
|
@ -16,14 +16,16 @@
|
|||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "dialogs.hpp"
|
||||
#include "show_dialog.hpp"
|
||||
#include "display.hpp"
|
||||
#include "floating_textbox.hpp"
|
||||
#include "gamestatus.hpp"
|
||||
#include "mouse_events.hpp"
|
||||
#include "statistics.hpp"
|
||||
#include "widgets/textbox.hpp"
|
||||
|
||||
class game_state;
|
||||
class gamestatus;
|
||||
|
||||
enum LEVEL_RESULT { VICTORY, DEFEAT, QUIT, LEVEL_CONTINUE, LEVEL_CONTINUE_NO_SAVE };
|
||||
|
||||
struct end_level_exception {
|
||||
|
|
|
@ -18,9 +18,10 @@
|
|||
|
||||
#include "actions.hpp"
|
||||
#include "display.hpp"
|
||||
#include "gamestatus.hpp"
|
||||
#include "pathfind.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "unit_map.hpp"
|
||||
|
||||
class gamestatus;
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
|
|
|
@ -13,12 +13,16 @@
|
|||
#ifndef PATHFIND_H_INCLUDED
|
||||
#define PATHFIND_H_INCLUDED
|
||||
|
||||
#include "array.hpp"
|
||||
class game_data;
|
||||
class gamestatus;
|
||||
class unit;
|
||||
class unit_map;
|
||||
|
||||
#include "array.hpp"
|
||||
#include "log.hpp"
|
||||
#include "map.hpp"
|
||||
#include "pathutils.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "team.hpp"
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
#include "play_controller.hpp"
|
||||
|
||||
#include "dialogs.hpp"
|
||||
#include "config_adapter.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "gp2x.hpp"
|
||||
|
|
|
@ -17,8 +17,8 @@ class config;
|
|||
class display;
|
||||
class team;
|
||||
struct game_state;
|
||||
|
||||
#include "unit.hpp"
|
||||
class unit_map;
|
||||
class gamemap;
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
#define REPLAY_H_INCLUDED
|
||||
|
||||
#include "config.hpp"
|
||||
#include "gamestatus.hpp"
|
||||
#include "map.hpp"
|
||||
#include "random.hpp"
|
||||
#include "unit.hpp"
|
||||
#include "map_label.hpp"
|
||||
#include "gamestatus.hpp"
|
||||
|
||||
class display;
|
||||
class config_writer;
|
||||
class unit_map;
|
||||
|
||||
struct verification_manager
|
||||
{
|
||||
|
|
|
@ -19,10 +19,11 @@
|
|||
#include <vector>
|
||||
|
||||
class gamestatus;
|
||||
class unit_map;
|
||||
|
||||
#include "map.hpp"
|
||||
#include "team.hpp"
|
||||
#include "unit.hpp"
|
||||
|
||||
|
||||
//this module is responsible for outputting textual reports of
|
||||
//various game and unit statistics
|
||||
|
|
|
@ -12,11 +12,12 @@
|
|||
*/
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "config.hpp"
|
||||
#include "statistics.hpp"
|
||||
#include "util.hpp"
|
||||
#include "log.hpp"
|
||||
#include "serialization/binary_or_text.hpp"
|
||||
#include "unit.hpp"
|
||||
|
||||
#define ERR_NG lg::err(lg::engine)
|
||||
|
||||
|
|
|
@ -14,9 +14,13 @@
|
|||
#ifndef STATISTICS_HPP_INCLUDED
|
||||
#define STATISTICS_HPP_INCLUDED
|
||||
|
||||
class config;
|
||||
class config_writer;
|
||||
class unit;
|
||||
#include "actions.hpp"
|
||||
//#include "actions.hpp"
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
namespace statistics
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "game_config.hpp"
|
||||
#include "game_events.hpp"
|
||||
#include "game_errors.hpp"
|
||||
#include "gamestatus.hpp"
|
||||
#include "log.hpp"
|
||||
#include "network.hpp"
|
||||
#include "team.hpp"
|
||||
|
|
|
@ -18,10 +18,8 @@
|
|||
#include "race.hpp"
|
||||
#include "team.hpp"
|
||||
#include "unit_types.hpp"
|
||||
#include "image.hpp"
|
||||
#include "unit_map.hpp"
|
||||
|
||||
class unit;
|
||||
class display;
|
||||
class gamestatus;
|
||||
class config_writer;
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
#define UNIT_DISPLAY_HPP_INCLUDED
|
||||
|
||||
class display;
|
||||
class unit;
|
||||
class unit_map;
|
||||
|
||||
#include "unit.hpp"
|
||||
#include "map.hpp"
|
||||
|
||||
///the unit_display namespace contains a number of free functions
|
||||
///which display units performing various on-screen actions - moving,
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
#ifndef UNIT_MAP_H_INCLUDED
|
||||
#define UNIT_MAP_H_INCLUDED
|
||||
|
||||
class unit;
|
||||
#include <cstring>
|
||||
#include "map.hpp"
|
||||
#include "unit.hpp"
|
||||
|
||||
// We used to just open-code a std::map<location,unit>, but as unit
|
||||
// gained weight leading up to 1.1.3, manipulating the map caused
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
#include "team.hpp"
|
||||
#include "thread.hpp"
|
||||
#include "tstring.hpp"
|
||||
#include "unit.hpp"
|
||||
|
||||
class unit_map;
|
||||
|
||||
struct upload_log
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue