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
2016-12-01 18:46:38 -05:00

29 lines
535 B
C++

#pragma once
#include <SDL2/SDL.h>
#include <string>
#include <Nes_Apu.h>
#include "common.hpp"
namespace GUI {
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);
}