Night Byte
Engine
Rendering
Adapter
EngineRenderingAdapter.hpp
1
#pragma once
2
3
#include "../../../API/Helpers/Vector2.hpp"
4
5
#include <SDL_render.h>
6
#include <string>
7
8
class
EngineRenderingAdapter
{
9
public
:
10
virtual
void
drawTexture(
std::string
textureId,
float
x,
float
y,
float
width,
float
height,
double
scale,
double
r,
11
SDL_RendererFlip flip = SDL_FLIP_NONE) = 0;
12
13
virtual
SpriteSheet
*
14
createSpriteSheet(
const
std::string
&path,
std::string
&spriteSheetId,
int
width,
int
height,
int
offsetX,
15
int
offsetY) = 0;
16
17
virtual
void
drawBox(
const
Vector2
*vertices, int32 vertexCount)
const
= 0;
18
19
virtual
void
drawLine(
const
Vector2
&begin,
const
Vector2
&end)
const
= 0;
20
21
virtual
void
drawCircle(
const
Vector2
¢er,
const
float
&radius)
const
= 0;
22
23
virtual
void
24
drawRectangle(
Vector2
&vector2,
float
width,
float
height,
const
std::string
&color,
float
opacity) = 0;
25
26
virtual
void
createText(
const
std::string
&fontName,
const
std::string
&text,
int
fontSize,
const
std::string
&hex,
27
const
std::string
&textureId) = 0;
28
29
virtual
void
drawBackground(
std::string
&color,
float
alpha) = 0;
30
31
virtual
void
render() = 0;
32
33
virtual
void
clear() = 0;
34
35
virtual
void
36
drawAnimation(
std::string
&spriteId,
const
Vector2
&position,
const
Vector2
&size,
const
int
&speed,
37
const
std::vector<std::pair<int, int>> &animation) = 0;
38
39
virtual
void
deleteRenderer() = 0;
40
};
xml_schema::string
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition:
common.hxx:255
SpriteSheet
Definition:
SpriteSheet.hpp:8
Vector2
Definition:
Vector2.hpp:7
EngineRenderingAdapter
Definition:
EngineRenderingAdapter.hpp:8
Generated by
1.8.20