mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-24 07:05:39 +00:00
42a39c52e6
Added text rendering to Renderer, which uses SDL_ttf. Using LinLibertine_R.ttf font (GPL). A lot more - soon I should have the "skeleton" done.
37 lines
686 B
C++
37 lines
686 B
C++
#ifndef _RENDERER_H_
|
|
#define _RENDERER_H_
|
|
|
|
#define LAYER_COUNT 3
|
|
|
|
#define BIT(x) (1 << (x))
|
|
|
|
#include <vector>
|
|
#include <SDL/SDL.h>
|
|
#include <SDL/SDL_ttf.h>
|
|
#include <string>
|
|
|
|
class GuiComponent;
|
|
|
|
namespace Renderer
|
|
{
|
|
void registerComponent(GuiComponent* comp);
|
|
void unregisterComponent(GuiComponent* comp);
|
|
|
|
void render();
|
|
|
|
extern SDL_Surface* screen;
|
|
extern TTF_Font* font;
|
|
|
|
unsigned int getScreenWidth();
|
|
unsigned int getScreenHeight();
|
|
|
|
//drawing commands
|
|
void drawRect(int x, int y, int w, int h, int color);
|
|
void drawText(std::string text, int x, int y, SDL_Color& color);
|
|
void drawCenteredText(std::string text, int y, SDL_Color& color);
|
|
|
|
void loadFonts();
|
|
}
|
|
|
|
#endif
|