45 lines
848 B
C
45 lines
848 B
C
|
#ifndef DEF_SDLTL_H
|
||
|
|
||
|
#define DEF_SDLTL_H
|
||
|
|
||
|
/* [LIBS] Internes
|
||
|
=========================================================*/
|
||
|
#include "SDL.h"
|
||
|
|
||
|
/* [LIBS] Externes
|
||
|
=========================================================*/
|
||
|
|
||
|
|
||
|
/* [NS] Namespaces
|
||
|
=========================================================*/
|
||
|
using namespace std;
|
||
|
|
||
|
|
||
|
class sdltl{
|
||
|
|
||
|
public:
|
||
|
sdltl(const char *t, int w, int h);
|
||
|
~sdltl();
|
||
|
SDL_Window *window();
|
||
|
SDL_Surface *screen();
|
||
|
bool status();
|
||
|
void setBackground(int r, int g, int b);
|
||
|
bool setImage(const char *url);
|
||
|
void waitEvent(SDL_EventType t, void(*handler)(SDL_Event*) );
|
||
|
|
||
|
void update();
|
||
|
|
||
|
private:
|
||
|
bool _status;
|
||
|
SDL_Window *_window;
|
||
|
SDL_Surface *_screen;
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
/* [BODY] Inclusion du corps
|
||
|
=========================================================*/
|
||
|
#include "sdltl.cpp"
|
||
|
|
||
|
|
||
|
#endif
|