#include "video/texture_manager.hpp"
#include "video/video_systems.hpp"
-static inline int next_po2(int val)
-{
- int result = 1;
- while(result < val)
- result *= 2;
-
- return result;
-}
-
DrawingContext::DrawingContext() :
renderer(0),
lightmap(0),
}
void
-DrawingContext::draw_text(const Font* font, const std::string& text,
+DrawingContext::draw_text(FontPtr font, const std::string& text,
const Vector& position, FontAlignment alignment, int layer, Color color)
{
DrawingRequest* request = new(obst) DrawingRequest();
request->color = color;
TextRequest* textrequest = new(obst) TextRequest();
- textrequest->font = font;
+ textrequest->font = font.get();
textrequest->text = text;
textrequest->alignment = alignment;
request->request_data = textrequest;
}
void
-DrawingContext::draw_center_text(const Font* font, const std::string& text,
+DrawingContext::draw_center_text(FontPtr font, const std::string& text,
const Vector& position, int layer, Color color)
{
draw_text(font, text, Vector(position.x + SCREEN_WIDTH/2, position.y),