mirror of
https://github.com/Relintai/rpi_player.git
synced 2025-02-20 09:44:19 +01:00
32 lines
489 B
C
32 lines
489 B
C
|
#ifndef APPLICATION_H
|
||
|
#define APPLICATION_H
|
||
|
|
||
|
#include <SDL.h>
|
||
|
|
||
|
#include "scene.h"
|
||
|
|
||
|
class Application {
|
||
|
public:
|
||
|
bool running;
|
||
|
int target_fps;
|
||
|
|
||
|
virtual void event(const SDL_Event ¤t_event);
|
||
|
virtual void update(float delta);
|
||
|
virtual void render();
|
||
|
|
||
|
void main_loop();
|
||
|
|
||
|
Application();
|
||
|
virtual ~Application();
|
||
|
|
||
|
Scene *scene;
|
||
|
|
||
|
static Application* get_singleton();
|
||
|
|
||
|
double frame_delta = 0;
|
||
|
|
||
|
protected:
|
||
|
static Application* _instance;
|
||
|
};
|
||
|
|
||
|
#endif
|