58 lines
1.3 KiB
C++
58 lines
1.3 KiB
C++
/********************\
|
|
| Copyright 2024, |
|
|
| Ulysse Cura |
|
|
\********************/
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
// //
|
|
// Declaration de la classe Game, gère toutes les données du jeu //
|
|
// et l'execution de chaque morceau de la boucle pricipale. //
|
|
// //
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef GAME_HPP
|
|
#define GAME_HPP
|
|
|
|
#include <SDL2/SDL.h> // SDL_Renderer, SDL_texture, SDL_Window
|
|
|
|
#define WINDOW_WIDTH 640
|
|
#define WINDOW_HEIGHT 640
|
|
|
|
#define WINDOW_TITLE "2D Engine !"
|
|
|
|
class Events;
|
|
class TextureManager;
|
|
class Camera;
|
|
class TileMap;
|
|
class MapManager;
|
|
class Manager;
|
|
|
|
class Game {
|
|
public:
|
|
Game() = default;
|
|
~Game();
|
|
|
|
bool Init();
|
|
|
|
bool Running();
|
|
|
|
void HandleEvents();
|
|
void Update();
|
|
void Render();
|
|
|
|
static SDL_Renderer *renderer;
|
|
static SDL_Texture *textureRenderer;
|
|
static Events events;
|
|
static TextureManager textureManager;
|
|
static Camera camera;
|
|
static TileMap tileMap;
|
|
static MapManager mapManager;
|
|
static Manager entityManager;
|
|
|
|
private:
|
|
SDL_Window *m_window;
|
|
bool m_isRunning {false};
|
|
};
|
|
|
|
#endif
|