Organisation du code dans des sous-dossiers

This commit is contained in:
Mattéo Delabre 2016-04-20 18:31:53 +02:00
parent 26806791c9
commit 56cb65fc79
37 changed files with 71 additions and 81 deletions

2
CMakeLists.txt vendored
View File

@ -3,7 +3,7 @@ project(skizzle)
# Inclusion des fichiers d'en-tête et de source # Inclusion des fichiers d'en-tête et de source
include_directories(include) include_directories(include)
file(GLOB SOURCES "src/*.cpp") file(GLOB_RECURSE SOURCES "src/*.cpp")
# Affichage de tous les avertisements # Affichage de tous les avertisements
if(MSVC) if(MSVC)

View File

@ -5,9 +5,9 @@
#include <SFML/Graphics.hpp> #include <SFML/Graphics.hpp>
#include <map> #include <map>
#include <functional> #include <functional>
#include "object.hpp" #include "../objects/object.hpp"
#include "../states/level.hpp"
#include "object_button.hpp" #include "object_button.hpp"
#include "level.hpp"
class Editor; class Editor;

View File

@ -1,10 +1,8 @@
#ifndef __SKIZZLE_EDITOR_HPP__ #ifndef __SKIZZLE_EDITOR_HPP__
#define __SKIZZLE_EDITOR_HPP__ #define __SKIZZLE_EDITOR_HPP__
#include "../gui/toolbar.hpp"
#include "level.hpp" #include "level.hpp"
#include "toolbar.hpp"
#include <unordered_map>
#include <memory>
/** /**
* La classe Editor permet l'édition de * La classe Editor permet l'édition de

View File

@ -3,9 +3,9 @@
#include <fstream> #include <fstream>
#include <vector> #include <vector>
#include "../objects/object.hpp"
#include "../objects/player.hpp"
#include "state.hpp" #include "state.hpp"
#include "object.hpp"
#include "player.hpp"
class Manager; class Manager;

View File

@ -1,10 +1,10 @@
#ifndef __SKIZZLE_MENU_HPP__ #ifndef __SKIZZLE_MENU_HPP__
#define __SKIZZLE_MENU_HPP__ #define __SKIZZLE_MENU_HPP__
#include "state.hpp"
#include <functional> #include <functional>
#include <vector> #include <vector>
#include <memory> #include <memory>
#include "state.hpp"
class Manager; class Manager;

View File

@ -3,7 +3,7 @@
#include <SFGUI/Renderer.hpp> #include <SFGUI/Renderer.hpp>
#include <SFGUI/RenderQueue.hpp> #include <SFGUI/RenderQueue.hpp>
#include <cmath> #include <cmath>
#include "object_button.hpp" #include "gui/object_button.hpp"
ObjectButton::Ptr ObjectButton::Create( ObjectButton::Ptr ObjectButton::Create(
sfg::Image::Ptr image, sfg::Image::Ptr image,

View File

@ -1,12 +1,12 @@
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "editor.hpp" #include "states/editor.hpp"
#include "toolbar.hpp" #include "objects/block.hpp"
#include "block.hpp" #include "objects/player.hpp"
#include "player.hpp" #include "objects/switch_block.hpp"
#include "switch_block.hpp" #include "objects/gravity_block.hpp"
#include "gravity_block.hpp" #include "objects/kill_block.hpp"
#include "kill_block.hpp" #include "objects/finish_block.hpp"
#include "finish_block.hpp" #include "gui/toolbar.hpp"
const int Toolbar::CREATORS_TABLE_WIDTH = 3; const int Toolbar::CREATORS_TABLE_WIDTH = 3;

View File

@ -1,9 +1,8 @@
#include "manager.hpp"
#include "editor.hpp"
#include "menu.hpp"
#include "game.hpp"
#include <iostream> #include <iostream>
#include <memory> #include <memory>
#include <utility>
#include "manager.hpp"
#include "states/menu.hpp"
int main() { int main() {
// le gestionnaire du jeu gère la pile d'états // le gestionnaire du jeu gère la pile d'états

View File

@ -1,7 +1,7 @@
#include "state.hpp"
#include "manager.hpp"
#include "resource_manager.hpp"
#include <algorithm> #include <algorithm>
#include "states/state.hpp"
#include "resource_manager.hpp"
#include "manager.hpp"
const unsigned int Manager::FPS = 60; const unsigned int Manager::FPS = 60;
const sf::Time Manager::FRAME_TIME = sf::seconds(1.f / Manager::FPS); const sf::Time Manager::FRAME_TIME = sf::seconds(1.f / Manager::FPS);

View File

@ -1,9 +1,8 @@
#include "block.hpp"
#include "level.hpp"
#include "game.hpp"
#include "player.hpp"
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "states/game.hpp"
#include "objects/player.hpp"
#include "objects/block.hpp"
const unsigned int Block::TYPE_ID = 2; const unsigned int Block::TYPE_ID = 2;

View File

@ -1,11 +1,6 @@
#include "collision.hpp"
#include "player.hpp"
#include "block.hpp"
#include "gravity_block.hpp"
#include "object.hpp"
#include <functional>
#include <utility>
#include <cmath> #include <cmath>
#include "objects/object.hpp"
#include "objects/collision.hpp"
/** /**
* Définition des variables et fonctions globales internes * Définition des variables et fonctions globales internes

View File

@ -1,7 +1,7 @@
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "finish_block.hpp" #include "states/game.hpp"
#include "game.hpp" #include "objects/finish_block.hpp"
const unsigned int FinishBlock::TYPE_ID = 4; const unsigned int FinishBlock::TYPE_ID = 4;

View File

@ -1,8 +1,8 @@
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "utility.hpp" #include "utility.hpp"
#include "gravity_block.hpp" #include "states/game.hpp"
#include "game.hpp" #include "objects/gravity_block.hpp"
const unsigned int GravityBlock::TYPE_ID = 3; const unsigned int GravityBlock::TYPE_ID = 3;

View File

@ -1,8 +1,8 @@
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "kill_block.hpp" #include "states/game.hpp"
#include "game.hpp" #include "objects/player.hpp"
#include "player.hpp" #include "objects/kill_block.hpp"
const unsigned int KillBlock::TYPE_ID = 5; const unsigned int KillBlock::TYPE_ID = 5;

View File

@ -1,8 +1,8 @@
#include "manager.hpp"
#include "object.hpp"
#include "game.hpp"
#include "collision.hpp"
#include <cmath> #include <cmath>
#include "manager.hpp"
#include "states/game.hpp"
#include "objects/collision.hpp"
#include "objects/object.hpp"
/** /**
* Définition des variables et fonctions globales internes * Définition des variables et fonctions globales internes

View File

@ -1,7 +1,7 @@
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "player.hpp" #include "states/game.hpp"
#include "game.hpp" #include "objects/player.hpp"
const unsigned int Player::TYPE_ID = 1; const unsigned int Player::TYPE_ID = 1;

View File

@ -1,8 +1,8 @@
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "utility.hpp" #include "utility.hpp"
#include "switch_block.hpp" #include "states/game.hpp"
#include "game.hpp" #include "objects/switch_block.hpp"
const unsigned int SwitchBlock::TYPE_ID = 6; const unsigned int SwitchBlock::TYPE_ID = 6;

View File

@ -1,6 +1,6 @@
#include "resource_manager.hpp"
#include <iostream> #include <iostream>
#include <utility> #include <utility>
#include "resource_manager.hpp"
namespace fs = boost::filesystem; namespace fs = boost::filesystem;

View File

@ -1,9 +1,9 @@
#include "manager.hpp"
#include "resource_manager.hpp"
#include "editor.hpp"
#include "game.hpp"
#include <cmath> #include <cmath>
#include <algorithm> #include <algorithm>
#include "manager.hpp"
#include "resource_manager.hpp"
#include "states/game.hpp"
#include "states/editor.hpp"
/** /**
* Définition des variables et fonctions globales internes * Définition des variables et fonctions globales internes

View File

@ -1,10 +1,10 @@
#include <iostream> #include <iostream>
#include <cmath> #include <cmath>
#include "utility.hpp"
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "game.hpp" #include "utility.hpp"
#include "player.hpp" #include "objects/player.hpp"
#include "states/game.hpp"
/** /**
* Définition des variables et fonctions globales internes * Définition des variables et fonctions globales internes

View File

@ -1,18 +1,17 @@
#include "manager.hpp"
#include "resource_manager.hpp"
#include "level.hpp"
#include "player.hpp"
#include "block.hpp"
#include "utility.hpp"
#include "gravity_block.hpp"
#include "switch_block.hpp"
#include "finish_block.hpp"
#include "kill_block.hpp"
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <cstring> #include <cstring>
#include <functional> #include <functional>
#include <queue> #include "manager.hpp"
#include "resource_manager.hpp"
#include "utility.hpp"
#include "objects/player.hpp"
#include "objects/block.hpp"
#include "objects/gravity_block.hpp"
#include "objects/switch_block.hpp"
#include "objects/finish_block.hpp"
#include "objects/kill_block.hpp"
#include "states/level.hpp"
/** /**
* Définition des variables et fonctions globales internes * Définition des variables et fonctions globales internes

View File

@ -1,11 +1,11 @@
#include "manager.hpp"
#include "resource_manager.hpp"
#include "menu.hpp"
#include "rules.hpp"
#include "editor.hpp"
#include "game.hpp"
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <cmath> #include <cmath>
#include "manager.hpp"
#include "resource_manager.hpp"
#include "states/rules.hpp"
#include "states/editor.hpp"
#include "states/game.hpp"
#include "states/menu.hpp"
/** /**
* Définition des variables et fonctions globales internes * Définition des variables et fonctions globales internes

View File

@ -1,9 +1,9 @@
#include "rules.hpp"
#include "manager.hpp" #include "manager.hpp"
#include "resource_manager.hpp" #include "resource_manager.hpp"
#include "states/rules.hpp"
Rules::Rules(Manager& manager) : State(manager) { Rules::Rules(Manager& manager) : State(manager) {
background.setTexture(*ResourceManager::get().getTexture("rules.png")); background.setTexture(*ResourceManager::get().getTexture("rules.tga"));
} }
Rules::~Rules() {} Rules::~Rules() {}

View File

@ -1,5 +1,5 @@
#include "state.hpp"
#include "manager.hpp" #include "manager.hpp"
#include "states/state.hpp"
State::State(Manager& manager) : manager(manager) {} State::State(Manager& manager) : manager(manager) {}
State::~State() {} State::~State() {}

View File

@ -1,6 +1,6 @@
#include "utility.hpp"
#include "manager.hpp"
#include <cmath> #include <cmath>
#include "manager.hpp"
#include "utility.hpp"
float Utility::animateValue(float current, float speed, float goal) { float Utility::animateValue(float current, float speed, float goal) {
float gap = goal - current; float gap = goal - current;