2023-04-06 13:20:08 +00:00
|
|
|
#ifndef _context_h
|
|
|
|
#define _context_h
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "SDL2/SDL_render.h"
|
|
|
|
#include "SDL2/SDL_events.h"
|
|
|
|
|
|
|
|
typedef struct context_t {
|
2023-07-17 14:44:10 +00:00
|
|
|
SDL_Window* window;
|
|
|
|
SDL_Renderer* renderer;
|
|
|
|
SDL_Event event;
|
|
|
|
short running;
|
2023-04-06 13:20:08 +00:00
|
|
|
} context_t;
|
|
|
|
|
|
|
|
extern context_t g_context;
|
|
|
|
extern void init_context();
|
|
|
|
extern void close_context();
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|