delete renderer;
delete lightmap;
- renderer = new_renderer();
- lightmap = new_lightmap();
+ renderer = VideoSystem::new_renderer();
+ lightmap = VideoSystem::new_lightmap();
}
void
-DrawingContext::draw_surface(const Surface* surface, const Vector& position,
+DrawingContext::draw_surface(SurfacePtr surface, const Vector& position,
float angle, const Color& color, const Blend& blend,
int layer)
{
request->color = color;
request->blend = blend;
- request->request_data = const_cast<Surface*> (surface);
+ request->request_data = surface.get();
requests->push_back(request);
}
void
-DrawingContext::draw_surface(const Surface* surface, const Vector& position,
+DrawingContext::draw_surface(SurfacePtr surface, const Vector& position,
int layer)
{
draw_surface(surface, position, 0.0f, Color(1.0f, 1.0f, 1.0f), Blend(), layer);
}
void
-DrawingContext::draw_surface_part(const Surface* surface, const Vector& source,
+DrawingContext::draw_surface_part(SurfacePtr surface, const Vector& source,
const Vector& size, const Vector& dest, int layer)
{
assert(surface != 0);
SurfacePartRequest* surfacepartrequest = new(obst) SurfacePartRequest();
surfacepartrequest->size = size;
surfacepartrequest->source = source;
- surfacepartrequest->surface = surface;
+ surfacepartrequest->surface = surface.get();
// clip on screen borders
if(request->pos.x < 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),
}
void
-DrawingContext::draw_filled_rect(const Rect& rect, const Color& color,
+DrawingContext::draw_filled_rect(const Rectf& rect, const Color& color,
int layer)
{
draw_filled_rect(rect, color, 0.0f, layer);
}
void
-DrawingContext::draw_filled_rect(const Rect& rect, const Color& color, float radius, int layer)
+DrawingContext::draw_filled_rect(const Rectf& rect, const Color& color, float radius, int layer)
{
DrawingRequest* request = new(obst) DrawingRequest();