raylibstarter 0.1.0
renderer.cpp
Go to the documentation of this file.
1#include "renderer.h"
2
3#include "stage.h"
4
5void game::core::Renderer::DrawTexture(const std::shared_ptr<game::core::Sprite>& sprite) {
6 DrawTexturePro(sprite->texture(), sprite->frame(),
7 {(static_cast<float>(sprite->pos_x) + sprite->rotation_origin.x), (static_cast<float>(sprite->pos_y) + sprite->rotation_origin.y),
8 static_cast<float>(sprite->frame().width), static_cast<float>(sprite->frame().height)},
9 sprite->rotation_origin, sprite->rotation, sprite->tint);
10}
static void DrawTexture(const std::shared_ptr< game::core::Sprite > &sprite)
Draw a sprite to the screen. Oriented to the size, position and rotation angle of the sprite object....
Definition: renderer.cpp:5