Gered
648832d939
full disclosure: i'm a bit unsure of what is the best way to do this at this point in time. the end goal with this project is that it becomes a library to be used by other apps (of course), but need tests to test various library functionality. unsure how best to organize this with cmake (and since i'm using clion, i kind of would prefer it works nicely and integrated with the ide...). i figure this is going to be a trial and error approach that will evolve over the next while
31 lines
576 B
C
31 lines
576 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "vm/vm_stdinc.h"
|
|
#include "SDL.h"
|
|
|
|
typedef struct {
|
|
bool initialized;
|
|
SDL_Window *window;
|
|
int width;
|
|
int height;
|
|
SDL_Renderer *renderer;
|
|
SDL_Texture *texture;
|
|
bool fixed_viewport;
|
|
int viewport_width;
|
|
int viewport_height;
|
|
struct SURFACE *surface;
|
|
} WINDOW;
|
|
|
|
WINDOW * window_init(const char *title, int width, int height, int viewport_width, int viewport_height);
|
|
bool window_do_events(WINDOW *window);
|
|
void window_render(WINDOW *window);
|
|
void window_destroy(WINDOW *window);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|