swissChili | bb478f1 | 2020-08-07 20:45:07 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | |
swissChili | 94ba1f5 | 2020-08-08 11:39:10 -0700 | [diff] [blame^] | 5 | #ifndef SCREEN_ONLY_SDL |
| 6 | |
swissChili | bb478f1 | 2020-08-07 20:45:07 -0700 | [diff] [blame] | 7 | #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 | |
swissChili | bb478f1 | 2020-08-07 20:45:07 -0700 | [diff] [blame] | 17 | void screen(struct nk_context *ctx, uint8_t *mem, uint8_t size); |
swissChili | 94ba1f5 | 2020-08-08 11:39:10 -0700 | [diff] [blame^] | 18 | |
| 19 | #endif |
| 20 | |
| 21 | #include <SDL2/SDL.h> |
| 22 | |
| 23 | |
| 24 | typedef struct |
| 25 | { |
| 26 | SDL_Window *win; |
| 27 | SDL_Renderer *r; |
| 28 | uint8_t size; |
| 29 | } sdl_screen_t; |
| 30 | |
| 31 | // draw the CPU screen |
| 32 | sdl_screen_t new_sdl_screen(uint8_t size); |
| 33 | void sdl_screen(sdl_screen_t *scr, uint8_t *mem); |