#ifndef IZ_VIDEO_H #define IZ_VIDEO_H #include #include "minIni.h" #include "SDL_render.h" #include "../../../net/IZ_net_client.h" #include "../../../config/IZ_config.h" #include "../../input/IZ_input.h" #include "../../../common/IZ_common.h" #define MAX_ACTIVE_SPRITES 32 // TODO properly define sprites typedef char IZ_Sprite; typedef struct { u16 width; u16 height; u8 max_fps; } IZ_VideoConfig; typedef struct { void* user_data; IZ_VideoConfig config; u64 last_update_at; SDL_Window* window; SDL_Renderer* renderer; IZ_Sprite active_sprites[MAX_ACTIVE_SPRITES]; } IZ_VideoState; static const IZ_VideoState IZ_VIDEO_DEFAULT_STATE = { .user_data = NULL, .config = { .width = 320u, .height = 240u, .max_fps = 30u, }, .last_update_at = 0, .renderer = NULL, .window = NULL, .active_sprites = {}, }; IZ_ProcedureResult IZ_VideoInitialize(IZ_VideoState*, void*, const char*, u8, const char*[]); IZ_ProcedureResult IZ_VideoSaveConfig(IZ_VideoState*, const char*); void IZ_VideoTeardown(IZ_VideoState*); #endif