#ifndef _LPT_SDL
#define _LPT_SDL

#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_keycode.h>
#include "parser.h"

#define APPROX2ORIG(res, appr) ((res * appr + res) / 2)
#define ORIG2APPROX(res, pix)  (pix / res * 2 - 1)

typedef struct {
        SDL_Window *window;
	SDL_Renderer *render;

	int scr_height;
	int scr_width;
} APP;

void CleanUp_SDL(APP *app);
int Init_SDL(const CONFIG cfg, APP *app);
SDL_Texture *LoadIMG_SDL(const char *path, APP *app);
#endif
