ANESE/thirdparty/SDL_inprint/SDL_inprint2.h
Daniel Prilik 871daf6aa1 tweaked callbacks + refactored SDL_inprint
I wanted to use SDL_inprint in multiple renderers, and that meant I
had to modify the library a little bit.

also, I just noticed that the smearing issue is back! Not as bad as
before, but MMC3 games seems to be affected when the screen scrolls
upwards...

wierd.
2018-07-12 11:28:54 -07:00

18 lines
428 B
C++

#pragma once
#include <SDL.h>
class SDL2_inprint {
private:
SDL_Renderer* selected_renderer = nullptr;
SDL_Texture* inline_font = nullptr;
SDL_Texture* selected_font = nullptr;
Uint16 selected_font_w, selected_font_h;
public:
SDL2_inprint(SDL_Renderer* renderer);
~SDL2_inprint();
void set_color(Uint32 color); /* Color must be in 0x00RRGGBB format ! */
void print(const char* str, Uint32 x, Uint32 y);
};