Skip to content

Commit

Permalink
gamestate: move old state to new folder
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJJ committed Nov 5, 2018
1 parent 182f9d8 commit f4d8e66
Show file tree
Hide file tree
Showing 66 changed files with 777 additions and 629 deletions.
4 changes: 2 additions & 2 deletions libopenage/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include "config.h"
#include "error/error.h"
#include "error/gl_debug.h"
#include "gamestate/game_main.h"
#include "gamestate/generator.h"
#include "gamestate/old/game_main.h"
#include "gamestate/old/generator.h"
#include "gui/gui.h"
#include "log/log.h"
#include "renderer/font/font.h"
Expand Down
2 changes: 1 addition & 1 deletion libopenage/game_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "engine.h"
#include "error/error.h"
#include "gamestate/game_spec.h"
#include "gamestate/old/game_spec.h"
#include "log/log.h"
#include "terrain/terrain_chunk.h"
#include "util/strings.h"
Expand Down
2 changes: 1 addition & 1 deletion libopenage/game_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "coord/pixel.h"
#include "input/input_context.h"
#include "rng/rng.h"
#include "gamestate/game_main.h"
#include "gamestate/old/game_main.h"
#include "unit/command.h"
#include "unit/selection.h"
#include "unit/unit_type.h"
Expand Down
4 changes: 2 additions & 2 deletions libopenage/game_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "console/console.h"
#include "engine.h"
#include "gamedata/color.gen.h"
#include "gamestate/game_main.h"
#include "gamestate/game_spec.h"
#include "gamestate/old/game_main.h"
#include "gamestate/old/game_spec.h"
#include "input/input_manager.h"
#include "log/log.h"
#include "terrain/terrain.h"
Expand Down
20 changes: 9 additions & 11 deletions libopenage/gamestate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
add_sources(libopenage
civilisation.cpp
cost.cpp
game_main.cpp
game_save.cpp
game_spec.cpp
generator.cpp
market.cpp
entity.cpp
game.cpp
player.cpp
population_tracker.cpp
score.cpp
team.cpp
resource.cpp
terrain.cpp
terrain_chunk.cpp
types.cpp
world.cpp
)

# TODO: remove once migration is done.
add_subdirectory(old/)
7 changes: 7 additions & 0 deletions libopenage/gamestate/entity.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2018-2018 the openage authors. See copying.md for legal info.

#include "entity.h"

namespace openage::gamestate {

} // openage
11 changes: 11 additions & 0 deletions libopenage/gamestate/entity.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2018-2018 the openage authors. See copying.md for legal info.

#pragma once

namespace openage::gamestate {

class Entity {

};

} // openage
8 changes: 8 additions & 0 deletions libopenage/gamestate/game.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2018-2018 the openage authors. See copying.md for legal info.

#include "game.h"

namespace openage::gamestate {


} // openage::gamestate
14 changes: 14 additions & 0 deletions libopenage/gamestate/game.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2018-2018 the openage authors. See copying.md for legal info.

#pragma once

#include "world.h"

namespace openage::gamestate {

class Game {
public:
World world;
};

} // openage
14 changes: 14 additions & 0 deletions libopenage/gamestate/old/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
add_sources(libopenage
civilisation.cpp
cost.cpp
game_main.cpp
game_save.cpp
game_spec.cpp
generator.cpp
market.cpp
player.cpp
population_tracker.cpp
score.cpp
team.cpp
resource.cpp
)
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2015-2017 the openage authors. See copying.md for legal info.
// Copyright 2015-2018 the openage authors. See copying.md for legal info.

#include "civilisation.h"

#include "../log/log.h"
#include "../unit/unit_type.h"
#include "../../log/log.h"
#include "../../unit/unit_type.h"


namespace openage {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2014-2017 the openage authors. See copying.md for legal info.
// Copyright 2014-2018 the openage authors. See copying.md for legal info.

#include "game_main.h"

#include "../engine.h"
#include "../log/log.h"
#include "../terrain/terrain.h"
#include "../unit/unit_type.h"
#include "../../engine.h"
#include "../../log/log.h"
#include "../../terrain/terrain.h"
#include "../../unit/unit_type.h"
#include "game_spec.h"
#include "generator.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include "market.h"
#include "player.h"
#include "team.h"
#include "../options.h"
#include "../terrain/terrain.h"
#include "../unit/unit_container.h"
#include "../util/timing.h"
#include "../../options.h"
#include "../../terrain/terrain.h"
#include "../../unit/unit_container.h"
#include "../../util/timing.h"


namespace openage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#include <fstream>
#include <vector>

#include "../log/log.h"
#include "../terrain/terrain_chunk.h"
#include "../unit/producer.h"
#include "../unit/unit.h"
#include "../unit/unit_type.h"
#include "../../log/log.h"
#include "../../terrain/terrain_chunk.h"
#include "../../unit/producer.h"
#include "../../unit/unit.h"
#include "../../unit/unit_type.h"
#include "game_main.h"
#include "game_save.h"
#include "game_spec.h"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// Copyright 2015-2017 the openage authors. See copying.md for legal info.
// Copyright 2015-2018 the openage authors. See copying.md for legal info.

#include "game_spec.h"

#include <tuple>

#include "../assetmanager.h"
#include "../audio/error.h"
#include "../audio/resource_def.h"
#include "../engine.h"
#include "../gamedata/blending_mode.gen.h"
#include "../gamedata/string_resource.gen.h"
#include "../gamedata/terrain.gen.h"
#include "../log/log.h"
#include "../rng/global_rng.h"
#include "../unit/producer.h"
#include "../util/compiler.h"
#include "../util/strings.h"
#include "../util/timer.h"
#include "../../assetmanager.h"
#include "../../audio/error.h"
#include "../../audio/resource_def.h"
#include "../../engine.h"
#include "../../gamedata/blending_mode.gen.h"
#include "../../gamedata/string_resource.gen.h"
#include "../../gamedata/terrain.gen.h"
#include "../../log/log.h"
#include "../../rng/global_rng.h"
#include "../../unit/producer.h"
#include "../../util/compiler.h"
#include "../../util/strings.h"
#include "../../util/timer.h"
#include "civilisation.h"


Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Copyright 2015-2017 the openage authors. See copying.md for legal info.
// Copyright 2015-2018 the openage authors. See copying.md for legal info.

#pragma once

#include "../job/job.h"
#include "../gamedata/gamedata.gen.h"
#include "../gamedata/graphic.gen.h"
#include "../terrain/terrain.h"
#include "../unit/unit_texture.h"
#include "../util/csv.h"
#include "../types.h"
#include "../../job/job.h"
#include "../../gamedata/gamedata.gen.h"
#include "../../gamedata/graphic.gen.h"
#include "../../terrain/terrain.h"
#include "../../unit/unit_texture.h"
#include "../../util/csv.h"

#include <unordered_map>
#include <memory>
Expand All @@ -23,12 +24,6 @@ class UnitTypeMeta;
class Player;


/**
* the key type mapped to data objects
*/
using index_t = int;


/**
* could use unique ptr
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

#include "generator.h"

#include "../log/log.h"
#include "../rng/rng.h"
#include "../terrain/terrain_chunk.h"
#include "../unit/unit.h"
#include "../util/math_constants.h"
#include "../../log/log.h"
#include "../../rng/rng.h"
#include "../../terrain/terrain_chunk.h"
#include "../../unit/unit.h"
#include "../../util/math_constants.h"
#include "game_main.h"
#include "game_save.h"
#include "game_spec.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <unordered_set>

#include "../coord/tile.h"
#include "../gui/guisys/public/gui_property_map.h"
#include "../../coord/tile.h"
#include "../../gui/guisys/public/gui_property_map.h"

namespace qtsdl {
class GuiItemLink;
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f4d8e66

Please sign in to comment.