![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include "drawing.h"#include <SDL3/SDL_render.h>#include <cmath>#include "GameEngine.h"#include "RenderContext.h"
Include dependency graph for drawing.cpp:Go to the source code of this file.
Functions | |
| static SDL_FColor | ToFColor (const SDL_Color &c) |
| static SDL_Color | ToColor (const SDL_FColor &f) |
| void | Draw_Circle (int cx, int cy, int radius) |
| void | Draw_FilledCircle (int cx, int cy, int radius) |
| void | Draw_Triangle (Vector p1, Vector p2, Vector p3) |
| void | Draw_FilledTriangle (const Vector &p1, const Vector &p2, const Vector &p3, SDL_FColor color) |
| void | Draw_FilledHexagon (Vector center, float radius, SDL_FColor color) |
| void | Draw_Hexagon (Vector center, float radius, SDL_Color color) |
| void | Draw_Rectangle (const SDL_FRect *rect, SDL_Color color) |
| void | Draw_Text (const std::string &text, const SDL_FRect *rect, SDL_Color textcolor, SDL_Color backgroundcolor) |
Variables | |
| static const float | PI = static_cast<float>(std::acos(-1.0)) |
| static const float | HEXAGON_COS_ANGLES [6] |
| static const float | HEXAGON_SIN_ANGLES [6] |
Definition at line 69 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.
Referenced by OlympeEffectSystem::Implementation::RenderPlasmaOrbs().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 135 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.
Referenced by AI_Player::RenderDebug(), RenderEntitiesForCamera(), and RenderSingleEntity().
Here is the call graph for this function:
Here is the caller graph for this function:| void Draw_FilledHexagon | ( | Vector | center, |
| float | radius, | ||
| SDL_FColor | color | ||
| ) |
Definition at line 231 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), HEXAGON_COS_ANGLES, HEXAGON_SIN_ANGLES, GameEngine::renderer, and Vector::ToFPoint().
Here is the call graph for this function:| void Draw_FilledTriangle | ( | const Vector & | p1, |
| const Vector & | p2, | ||
| const Vector & | p3, | ||
| SDL_FColor | color | ||
| ) |
Definition at line 201 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), GameEngine::renderer, and Vector::ToFPoint().
Here is the call graph for this function:Definition at line 279 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), HEXAGON_COS_ANGLES, HEXAGON_SIN_ANGLES, and GameEngine::renderer.
Here is the call graph for this function:Definition at line 309 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.
Referenced by RenderEntitiesForCamera(), and RenderSingleEntity().
Here is the call graph for this function:
Here is the caller graph for this function:| void Draw_Text | ( | const std::string & | text, |
| const SDL_FRect * | rect, | ||
| SDL_Color | textcolor, | ||
| SDL_Color | backgroundcolor | ||
| ) |
Definition at line 345 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), GameEngine::renderer, and Vector::x.
Referenced by RenderEntitiesForCamera(), and RenderSingleEntity().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 178 of file drawing.cpp.
References RenderContext::Get(), RenderContext::GetActiveCamera(), GetComponentTypeID_Static(), and GameEngine::renderer.
Here is the call graph for this function:
|
inlinestatic |
Definition at line 53 of file drawing.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:
|
inlinestatic |
Definition at line 43 of file drawing.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:Definition at line 24 of file drawing.cpp.
Referenced by Draw_FilledHexagon(), and Draw_Hexagon().
Definition at line 33 of file drawing.cpp.
Referenced by Draw_FilledHexagon(), and Draw_Hexagon().
|
static |
Definition at line 20 of file drawing.cpp.