#ifndef WINDOW_H #define WINDOW_H #include struct window { SDL_Window *ptr; int32_t h; int32_t w; }; #define WINDOW_UP_SIZE(win) SDL_GetWindowSize(win.ptr, &win.w, &win.h) struct window window_create(const char *win_title); #if defined(WINDOW_IMP) || defined(IMP) #include "sc.h" struct window window_create(const char *win_title) { struct window win = { .ptr = SDL_CreateWindow(win_title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 600, 800, SDL_WINDOW_RESIZABLE), }; SCP(win.ptr); WINDOW_UP_SIZE(win); return win; } #endif /* defined(WINDOW_IMP) || defined(IMP) */ #endif