2016-03-12 23:22:28 +00:00
|
|
|
#ifndef DEF_MAIN_H
|
|
|
|
|
|
|
|
#define DEF_MAIN_H
|
|
|
|
|
|
|
|
/* [LIB] Internes
|
|
|
|
=========================================================*/
|
|
|
|
#include <iostream>
|
|
|
|
#include <ctime>
|
|
|
|
#include <thread>
|
|
|
|
|
|
|
|
/* [LIB] Externes
|
|
|
|
=========================================================*/
|
2016-03-15 23:15:18 +00:00
|
|
|
class xSprite;
|
2016-03-13 13:53:39 +00:00
|
|
|
#include "xSDL.h" // Librairie perso
|
|
|
|
#include "xMario.h" // Elements utiles au jeu
|
2019-10-31 22:17:56 +00:00
|
|
|
|
2016-03-15 23:15:18 +00:00
|
|
|
#include "xSDL.cpp" // Librairie perso
|
|
|
|
#include "xMario.cpp" // Elements utiles au jeu
|
2016-03-12 23:22:28 +00:00
|
|
|
|
|
|
|
/* [NS] Namespace
|
|
|
|
=========================================================*/
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
/* [CONST] Constantes et enumerations
|
|
|
|
=========================================================*/
|
2016-03-13 13:53:39 +00:00
|
|
|
#define BLOC_WIDTH 32
|
|
|
|
#define BLOC_HEIGHT 20
|
2016-03-12 23:22:28 +00:00
|
|
|
|
2016-03-15 21:56:39 +00:00
|
|
|
#define FPS 40
|
2016-03-12 23:22:28 +00:00
|
|
|
|
|
|
|
/* [FONCTIONS] Fonctions du corps
|
|
|
|
=========================================================*/
|
|
|
|
void quitEventHandler(SDL_Event *e);
|
2016-03-13 13:53:39 +00:00
|
|
|
void keydownEventHandler(SDL_Event *e);
|
2016-03-13 19:36:16 +00:00
|
|
|
void keyupEventHandler(SDL_Event *e);
|
2016-03-12 23:22:28 +00:00
|
|
|
|
|
|
|
#endif
|