This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
LaiNES/src/include/gui.hpp
2020-05-18 14:42:11 -05:00

30 lines
612 B
C++

#pragma once
#include <SDL2/SDL.h>
#include <string>
#include "common.hpp"
namespace GUI {
// Screen size:
const unsigned WIDTH = 256;
const unsigned HEIGHT = 240;
const int TEXT_CENTER = -1;
const int TEXT_RIGHT = -2;
const unsigned FONT_SZ = 15;
void init();
void toggle_pause();
SDL_Scancode query_key();
int query_button();
void run();
SDL_Texture* gen_text(std::string text, SDL_Color color);
void render_texture(SDL_Texture* texture, int x, int y);
u8 get_joypad_state(int n);
void new_frame(u32* pixels);
//void new_samples(const blip_sample_t* samples, size_t count);
void set_size(int mul);
}