C-Engine/include/Engine.hpp

88 lines
2.5 KiB
C++

/* ************************************************************************** */
/* _____ _ __ ___ __ */
/* Engine.hpp | ___(_)/ _| ___ ( _ ) / /_ */
/* Project: C-Engine | |_ | | |_ / _ \/ _ \| '_ \ */
/* | _| | | _| __/ (_) | (_) | */
/* Author: Fife <wasabifife@gmail.com> |_| |_|_| \___|\___/ \___/ */
/* */
/* ************************************************************************** */
#ifndef CENGINE_ENGINE_HPP
#define CENGINE_ENGINE_HPP
#include "..\C-Engine\CEngine.hpp"
class Engine
{
public:
Engine(); //Constructeur
void StartGame(); //Lance le jeu
void InitGame(); //Initialise le jeu
void StopGame(); //Quitte le jeu
void ShowFps(); //Affiche les FPS à l'écran
void HideFps(); //Cache les FPS de l'écran
void SetFpsWish(int v); //Set le nombre de FPS
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
Object ** GetListeObject(); //Renvoie un pointeur sur le tableau d'objet
int GetNbObject(); //Renvoie le nombre d'objet liés au moteur
void ExecuteScript();
void AppliedForce();
void Draw();
AABB * GetScreen();
void MoveScreen( int x ,int y);
void MiddleScreen(int x , int y , bool fixe = true);
void UpdateRelativePosition();
void SetLevel( Level ** userTabLevel , int userNbLevel);
void SetLevel( Level * userLevel);
void DrawLevel();
void SetCurrentLevel( int id);
int GetIdCurrentLevel();
Level * GetCurrentLevel();
Level * GetLevel(int id);
void MoveObject( Object * v , int destination = -2 );
bool WaitOneSecond();
void ExecuteScriptSecond();
void AffectGui(Script * Gui);
private:
bool execute;
int fpswish;
bool fps;
Script * engineScript;
Object ** listeObject; //Tableau d'objet utilisé dans le cas ou il n'y a pas de map.
int nbobject; //Nombre d'objet liés au moteur. nb = Nombre
AABB screen;
Level ** tabLevel;
int nbLevel;
int currentLevel;
int time;
};
#endif