mirror of
https://github.com/daniel5151/ANESE.git
synced 2025-04-02 10:32:00 -04:00
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.
18 lines
428 B
C++
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);
|
|
};
|