1#pragma once
2#include <SDL2/SDL.h>
3#include <string>
4#include <Nes_Apu.h>
5#include "common.hpp"
6
7namespace GUI {
8
9// Screen size:
10const unsigned WIDTH = 256;
11const unsigned HEIGHT = 240;
12const int TEXT_CENTER = -1;
13const int TEXT_RIGHT = -2;
14const unsigned FONT_SZ = 15;
15
16void init();
17void toggle_pause();
18SDL_Scancode query_key();
19int query_button();
20void run();
21
22SDL_Texture* gen_text(std::string text, SDL_Color color);
23void render_texture(SDL_Texture* texture, int x, int y);
24
25u8 get_joypad_state(int n);
26void new_frame(u32* pixels);
27void new_samples(const blip_sample_t* samples, size_t count);
28void set_size(int mul);
29
30}
31