blob: 4128005178bf35eeb8b88cf3bade408bd6b0f1e4 [file] [log] [blame]
swissChilibb478f12020-08-07 20:45:07 -07001#pragma once
2
3#include <stdint.h>
4
swissChili94ba1f52020-08-08 11:39:10 -07005#ifndef SCREEN_ONLY_SDL
6
swissChilibb478f12020-08-07 20:45:07 -07007#undef NK_IMPLEMENTATION
8#define NK_INCLUDE_FIXED_TYPES
9#define NK_INCLUDE_STANDARD_IO
10#define NK_INCLUDE_STANDARD_VARARGS
11#define NK_INCLUDE_DEFAULT_ALLOCATOR
12#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
13#define NK_INCLUDE_FONT_BAKING
14#define NK_INCLUDE_DEFAULT_FONT
15#include "nuklear/nuklear.h"
16
swissChilibb478f12020-08-07 20:45:07 -070017void screen(struct nk_context *ctx, uint8_t *mem, uint8_t size);
swissChili94ba1f52020-08-08 11:39:10 -070018
19#endif
20
21#include <SDL2/SDL.h>
22
23
24typedef struct
25{
26 SDL_Window *win;
27 SDL_Renderer *r;
28 uint8_t size;
29} sdl_screen_t;
30
31// draw the CPU screen
32sdl_screen_t new_sdl_screen(uint8_t size);
33void sdl_screen(sdl_screen_t *scr, uint8_t *mem);