2024-10-16 04:25:31 +00:00
|
|
|
#ifndef SHROOMS_VB_NATIVE_GRAPHICS_
|
|
|
|
#define SHROOMS_VB_NATIVE_GRAPHICS_
|
|
|
|
|
2024-10-23 23:01:54 +00:00
|
|
|
#include <SDL2/SDL.h>
|
2024-10-26 05:20:25 +00:00
|
|
|
#include <nuklear.h>
|
2024-10-16 04:25:31 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
SDL_Window *window;
|
|
|
|
SDL_Renderer *renderer;
|
|
|
|
SDL_Texture *leftEye;
|
|
|
|
SDL_Texture *rightEye;
|
2024-10-26 05:20:25 +00:00
|
|
|
struct nk_context *nk;
|
2024-10-28 03:33:17 +00:00
|
|
|
struct nk_font *font;
|
2024-10-16 04:25:31 +00:00
|
|
|
} GraphicsContext;
|
|
|
|
|
|
|
|
int gfxInit(GraphicsContext *gfx);
|
|
|
|
void gfxDestroy(GraphicsContext *gfx);
|
|
|
|
|
2024-10-28 03:33:17 +00:00
|
|
|
void gfxUpdateEyes(GraphicsContext *gfx, const uint8_t *left, const uint8_t *right);
|
2024-10-16 04:25:31 +00:00
|
|
|
|
2024-10-26 05:20:25 +00:00
|
|
|
void gfxMenuInputBegin(GraphicsContext *gfx);
|
|
|
|
void gfxMenuHandleEvent(GraphicsContext *gfx, SDL_Event *event);
|
|
|
|
void gfxMenuInputEnd(GraphicsContext *gfx);
|
|
|
|
|
2024-10-16 04:25:31 +00:00
|
|
|
void gfxRender(GraphicsContext *gfx);
|
|
|
|
|
|
|
|
#endif
|