Organisation du code dans des sous-dossiers
This commit is contained in:
		
							parent
							
								
									26806791c9
								
							
						
					
					
						commit
						56cb65fc79
					
				|  | @ -3,7 +3,7 @@ project(skizzle) | |||
| 
 | ||||
| # Inclusion des fichiers d'en-tête et de source | ||||
| include_directories(include) | ||||
| file(GLOB SOURCES "src/*.cpp") | ||||
| file(GLOB_RECURSE SOURCES "src/*.cpp") | ||||
| 
 | ||||
| # Affichage de tous les avertisements | ||||
| if(MSVC) | ||||
|  |  | |||
|  | @ -5,9 +5,9 @@ | |||
| #include <SFML/Graphics.hpp> | ||||
| #include <map> | ||||
| #include <functional> | ||||
| #include "object.hpp" | ||||
| #include "../objects/object.hpp" | ||||
| #include "../states/level.hpp" | ||||
| #include "object_button.hpp" | ||||
| #include "level.hpp" | ||||
| 
 | ||||
| class Editor; | ||||
| 
 | ||||
|  | @ -1,10 +1,8 @@ | |||
| #ifndef __SKIZZLE_EDITOR_HPP__ | ||||
| #define __SKIZZLE_EDITOR_HPP__ | ||||
| 
 | ||||
| #include "../gui/toolbar.hpp" | ||||
| #include "level.hpp" | ||||
| #include "toolbar.hpp" | ||||
| #include <unordered_map> | ||||
| #include <memory> | ||||
| 
 | ||||
| /**
 | ||||
|  * La classe Editor permet l'édition de | ||||
|  | @ -3,9 +3,9 @@ | |||
| 
 | ||||
| #include <fstream> | ||||
| #include <vector> | ||||
| #include "../objects/object.hpp" | ||||
| #include "../objects/player.hpp" | ||||
| #include "state.hpp" | ||||
| #include "object.hpp" | ||||
| #include "player.hpp" | ||||
| 
 | ||||
| class Manager; | ||||
| 
 | ||||
|  | @ -1,10 +1,10 @@ | |||
| #ifndef __SKIZZLE_MENU_HPP__ | ||||
| #define __SKIZZLE_MENU_HPP__ | ||||
| 
 | ||||
| #include "state.hpp" | ||||
| #include <functional> | ||||
| #include <vector> | ||||
| #include <memory> | ||||
| #include "state.hpp" | ||||
| 
 | ||||
| class Manager; | ||||
| 
 | ||||
|  | @ -3,7 +3,7 @@ | |||
| #include <SFGUI/Renderer.hpp> | ||||
| #include <SFGUI/RenderQueue.hpp> | ||||
| #include <cmath> | ||||
| #include "object_button.hpp" | ||||
| #include "gui/object_button.hpp" | ||||
| 
 | ||||
| ObjectButton::Ptr ObjectButton::Create( | ||||
|     sfg::Image::Ptr image, | ||||
|  | @ -1,12 +1,12 @@ | |||
| #include "resource_manager.hpp" | ||||
| #include "editor.hpp" | ||||
| #include "toolbar.hpp" | ||||
| #include "block.hpp" | ||||
| #include "player.hpp" | ||||
| #include "switch_block.hpp" | ||||
| #include "gravity_block.hpp" | ||||
| #include "kill_block.hpp" | ||||
| #include "finish_block.hpp" | ||||
| #include "states/editor.hpp" | ||||
| #include "objects/block.hpp" | ||||
| #include "objects/player.hpp" | ||||
| #include "objects/switch_block.hpp" | ||||
| #include "objects/gravity_block.hpp" | ||||
| #include "objects/kill_block.hpp" | ||||
| #include "objects/finish_block.hpp" | ||||
| #include "gui/toolbar.hpp" | ||||
| 
 | ||||
| const int Toolbar::CREATORS_TABLE_WIDTH = 3; | ||||
| 
 | ||||
|  | @ -1,9 +1,8 @@ | |||
| #include "manager.hpp" | ||||
| #include "editor.hpp" | ||||
| #include "menu.hpp" | ||||
| #include "game.hpp" | ||||
| #include <iostream> | ||||
| #include <memory> | ||||
| #include <utility> | ||||
| #include "manager.hpp" | ||||
| #include "states/menu.hpp" | ||||
| 
 | ||||
| int main() { | ||||
|     // le gestionnaire du jeu gère la pile d'états
 | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| #include "state.hpp" | ||||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include <algorithm> | ||||
| #include "states/state.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "manager.hpp" | ||||
| 
 | ||||
| const unsigned int Manager::FPS = 60; | ||||
| const sf::Time Manager::FRAME_TIME = sf::seconds(1.f / Manager::FPS); | ||||
|  |  | |||
|  | @ -1,9 +1,8 @@ | |||
| #include "block.hpp" | ||||
| #include "level.hpp" | ||||
| #include "game.hpp" | ||||
| #include "player.hpp" | ||||
| #include "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; | ||||
| 
 | ||||
|  | @ -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 "objects/object.hpp" | ||||
| #include "objects/collision.hpp" | ||||
| 
 | ||||
| /**
 | ||||
|  * Définition des variables et fonctions globales internes | ||||
|  | @ -1,7 +1,7 @@ | |||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "finish_block.hpp" | ||||
| #include "game.hpp" | ||||
| #include "states/game.hpp" | ||||
| #include "objects/finish_block.hpp" | ||||
| 
 | ||||
| const unsigned int FinishBlock::TYPE_ID = 4; | ||||
| 
 | ||||
|  | @ -1,8 +1,8 @@ | |||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "utility.hpp" | ||||
| #include "gravity_block.hpp" | ||||
| #include "game.hpp" | ||||
| #include "states/game.hpp" | ||||
| #include "objects/gravity_block.hpp" | ||||
| 
 | ||||
| const unsigned int GravityBlock::TYPE_ID = 3; | ||||
| 
 | ||||
|  | @ -1,8 +1,8 @@ | |||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "kill_block.hpp" | ||||
| #include "game.hpp" | ||||
| #include "player.hpp" | ||||
| #include "states/game.hpp" | ||||
| #include "objects/player.hpp" | ||||
| #include "objects/kill_block.hpp" | ||||
| 
 | ||||
| const unsigned int KillBlock::TYPE_ID = 5; | ||||
| 
 | ||||
|  | @ -1,8 +1,8 @@ | |||
| #include "manager.hpp" | ||||
| #include "object.hpp" | ||||
| #include "game.hpp" | ||||
| #include "collision.hpp" | ||||
| #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 | ||||
|  | @ -1,7 +1,7 @@ | |||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "player.hpp" | ||||
| #include "game.hpp" | ||||
| #include "states/game.hpp" | ||||
| #include "objects/player.hpp" | ||||
| 
 | ||||
| const unsigned int Player::TYPE_ID = 1; | ||||
| 
 | ||||
|  | @ -1,8 +1,8 @@ | |||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "utility.hpp" | ||||
| #include "switch_block.hpp" | ||||
| #include "game.hpp" | ||||
| #include "states/game.hpp" | ||||
| #include "objects/switch_block.hpp" | ||||
| 
 | ||||
| const unsigned int SwitchBlock::TYPE_ID = 6; | ||||
| 
 | ||||
|  | @ -1,6 +1,6 @@ | |||
| #include "resource_manager.hpp" | ||||
| #include <iostream> | ||||
| #include <utility> | ||||
| #include "resource_manager.hpp" | ||||
| 
 | ||||
| namespace fs = boost::filesystem; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "editor.hpp" | ||||
| #include "game.hpp" | ||||
| #include <cmath> | ||||
| #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 | ||||
|  | @ -1,10 +1,10 @@ | |||
| #include <iostream> | ||||
| #include <cmath> | ||||
| #include "utility.hpp" | ||||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "game.hpp" | ||||
| #include "player.hpp" | ||||
| #include "utility.hpp" | ||||
| #include "objects/player.hpp" | ||||
| #include "states/game.hpp" | ||||
| 
 | ||||
| /**
 | ||||
|  * Définition des variables et fonctions globales internes | ||||
|  | @ -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 <arpa/inet.h> | ||||
| #include <cstring> | ||||
| #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 | ||||
|  | @ -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 <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 | ||||
|  | @ -1,9 +1,9 @@ | |||
| #include "rules.hpp" | ||||
| #include "manager.hpp" | ||||
| #include "resource_manager.hpp" | ||||
| #include "states/rules.hpp" | ||||
| 
 | ||||
| Rules::Rules(Manager& manager) : State(manager) { | ||||
|     background.setTexture(*ResourceManager::get().getTexture("rules.png")); | ||||
|     background.setTexture(*ResourceManager::get().getTexture("rules.tga")); | ||||
| } | ||||
| 
 | ||||
| Rules::~Rules() {} | ||||
|  | @ -1,5 +1,5 @@ | |||
| #include "state.hpp" | ||||
| #include "manager.hpp" | ||||
| #include "states/state.hpp" | ||||
| 
 | ||||
| State::State(Manager& manager) : manager(manager) {} | ||||
| State::~State() {} | ||||
|  | @ -1,6 +1,6 @@ | |||
| #include "utility.hpp" | ||||
| #include "manager.hpp" | ||||
| #include <cmath> | ||||
| #include "manager.hpp" | ||||
| #include "utility.hpp" | ||||
| 
 | ||||
| float Utility::animateValue(float current, float speed, float goal) { | ||||
|     float gap = goal - current; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue