Project import
This commit is contained in:
parent
165d05fd2c
commit
92b1da8f35
89 changed files with 3769 additions and 0 deletions
43
src/gui/display.hpp
Normal file
43
src/gui/display.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef DISPLAY_HPP
|
||||
#define DISPLAY_HPP
|
||||
|
||||
#include "../GameParam.hpp"
|
||||
/*
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#include "SDL2/SDL.h"
|
||||
#include <SDL2/SDL_image.h>
|
||||
*/
|
||||
#include "../GameEnv/Player.hpp"
|
||||
//#include "sprite.hpp"
|
||||
|
||||
//class Player; //Forward Delcaration (Fonctionne pas avec vector, veut type complet)
|
||||
SDL_Rect *createRect(int x, int y, int w, int h); //Forward Declaration (Game)
|
||||
|
||||
//Représente l'écran d'affichage
|
||||
class Display
|
||||
{
|
||||
private:
|
||||
SDL_Window *_window; //Fenètre d'affichage
|
||||
SDL_Renderer *_renderer; //Outil de rendu
|
||||
|
||||
//Singleton
|
||||
static Display _instance;
|
||||
|
||||
Display();
|
||||
~Display();
|
||||
Display& operator=(const Display& d);
|
||||
public:
|
||||
void draw(Drawable* d) const; //Dessine un objet
|
||||
//void renderSprites();
|
||||
|
||||
//Singleton
|
||||
static Display& Instance() { return _instance;}
|
||||
|
||||
//Accesseurs
|
||||
SDL_Window* getWindow() const { return _window;}
|
||||
SDL_Renderer* getRenderer() const { return _renderer;}
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue