2012-07-19 01:14:17 +00:00
|
|
|
#ifndef _RENDERER_H_
|
|
|
|
#define _RENDERER_H_
|
|
|
|
|
|
|
|
#define LAYER_COUNT 3
|
|
|
|
|
|
|
|
#define BIT(x) (1 << (x))
|
|
|
|
|
|
|
|
#include <vector>
|
2012-07-19 16:13:27 +00:00
|
|
|
#include <SDL/SDL.h>
|
2012-07-20 01:08:29 +00:00
|
|
|
#include <SDL/SDL_ttf.h>
|
|
|
|
#include <string>
|
2012-07-19 16:13:27 +00:00
|
|
|
|
|
|
|
class GuiComponent;
|
|
|
|
|
2012-07-19 01:14:17 +00:00
|
|
|
namespace Renderer
|
|
|
|
{
|
|
|
|
void registerComponent(GuiComponent* comp);
|
|
|
|
void unregisterComponent(GuiComponent* comp);
|
2012-07-22 21:15:55 +00:00
|
|
|
void deleteAll();
|
2012-07-19 01:14:17 +00:00
|
|
|
|
|
|
|
void render();
|
2012-07-19 16:13:27 +00:00
|
|
|
|
2012-07-20 01:08:29 +00:00
|
|
|
extern SDL_Surface* screen;
|
|
|
|
extern TTF_Font* font;
|
|
|
|
|
|
|
|
unsigned int getScreenWidth();
|
|
|
|
unsigned int getScreenHeight();
|
2012-07-19 16:13:27 +00:00
|
|
|
|
|
|
|
//drawing commands
|
|
|
|
void drawRect(int x, int y, int w, int h, int color);
|
2012-07-21 20:16:07 +00:00
|
|
|
void drawText(std::string text, int x, int y, int color);
|
|
|
|
void drawCenteredText(std::string text, int y, int color);
|
2012-07-20 01:08:29 +00:00
|
|
|
|
|
|
|
void loadFonts();
|
2012-07-19 01:14:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|