C-Engine/include/Engine.hpp

88 lines
2.5 KiB
C++
Raw Normal View History

2016-06-09 17:07:38 +02:00
/* ************************************************************************** */
2016-06-10 15:28:40 +02:00
/* _____ _ __ ___ __ */
/* Engine.hpp | ___(_)/ _| ___ ( _ ) / /_ */
/* Project: C-Engine | |_ | | |_ / _ \/ _ \| '_ \ */
/* | _| | | _| __/ (_) | (_) | */
/* Author: Fife <wasabifife@gmail.com> |_| |_|_| \___|\___/ \___/ */
2016-06-09 17:07:38 +02:00
/* */
/* ************************************************************************** */
#ifndef CENGINE_ENGINE_HPP
#define CENGINE_ENGINE_HPP
#include "..\C-Engine\CEngine.hpp"
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
class Engine
{
public:
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
Engine(); //Constructeur
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
void StartGame(); //Lance le jeu
void InitGame(); //Initialise le jeu
void StopGame(); //Quitte le jeu
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
void ShowFps(); //Affiche les FPS <20> l'<27>cran
void HideFps(); //Cache les FPS de l'<27>cran
void SetFpsWish(int v); //Set le nombre de FPS
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
void AddObject( Object * v , int level = -1); //Ajout un objet au moteur
void DelObject( Object * v , bool destroy = true); //Supprime l'objet
void DelAllObject(); //Supprime tout les objets
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
Object ** GetListeObject(); //Renvoie un pointeur sur le tableau d'objet
int GetNbObject(); //Renvoie le nombre d'objet li<6C>s au moteur
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
void ExecuteScript();
void AppliedForce();
void Draw();
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
AABB * GetScreen();
void MoveScreen( int x ,int y);
void MiddleScreen(int x , int y , bool fixe = true);
2016-06-09 21:45:46 +02:00
2016-06-10 15:28:40 +02:00
void UpdateRelativePosition();
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
void SetLevel( Level ** userTabLevel , int userNbLevel);
void SetLevel( Level * userLevel);
2016-06-09 21:45:46 +02:00
2016-06-10 15:28:40 +02:00
void DrawLevel();
2016-06-09 21:45:46 +02:00
2016-06-10 15:28:40 +02:00
void SetCurrentLevel( int id);
2016-06-15 19:22:20 +02:00
int GetIdCurrentLevel();
2016-06-10 15:28:40 +02:00
Level * GetCurrentLevel();
Level * GetLevel(int id);
2016-06-09 21:45:46 +02:00
2016-06-10 15:28:40 +02:00
void MoveObject( Object * v , int destination = -2 );
2016-06-09 17:07:38 +02:00
bool WaitOneSecond();
void ExecuteScriptSecond();
2016-06-14 15:39:24 +02:00
void AffectGui(Script * Gui);
2016-06-10 15:28:40 +02:00
private:
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
bool execute;
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
int fpswish;
bool fps;
2016-06-09 17:07:38 +02:00
2016-06-14 15:39:24 +02:00
Script * engineScript;
2016-06-10 15:28:40 +02:00
Object ** listeObject; //Tableau d'objet utilis<69> dans le cas ou il n'y a pas de map.
int nbobject; //Nombre d'objet li<6C>s au moteur. nb = Nombre
2016-06-09 21:45:46 +02:00
2016-06-10 15:28:40 +02:00
AABB screen;
2016-06-09 21:45:46 +02:00
2016-06-10 15:28:40 +02:00
Level ** tabLevel;
int nbLevel;
2016-06-09 17:07:38 +02:00
2016-06-10 15:28:40 +02:00
int currentLevel;
2016-06-09 17:07:38 +02:00
int time;
2016-06-10 15:28:40 +02:00
};
2016-06-09 17:07:38 +02:00
#endif