Proyecto Final - Turinmachin
Recreación del minijuego de matemáticas de Brain-Age usando redes neuronales
Loading...
Searching...
No Matches
game::sdl Namespace Reference

Enumerations

enum class  VAlign : std::uint8_t { Top , Middle , Bottom }
enum class  HAlign : std::uint8_t { Left , Center , Right }

Functions

void draw_line (SDL_Renderer *renderer, float x1, float y1, float x2, float y2, float thickness, SDL_FColor color)
void draw_filled_circle (SDL_Renderer *renderer, float cx, float cy, float radius, SDL_FColor color, int segments=64)
void draw_text (SDL_Renderer *renderer, TTF_Font *font, const std::string &text, float x, float y, float font_size, HAlign h_align, VAlign v_align, SDL_Color color)
auto extract_pixel_data (SDL_Renderer *renderer, SDL_Texture *texture, std::size_t width, std::size_t height, std::size_t bytes_per_pixel) -> std::vector< std::uint8_t >
auto get_performance_time () -> long double

Variables

constexpr SDL_Color WHITE = {255, 255, 255, SDL_ALPHA_OPAQUE}
constexpr SDL_Color BLACK = {0, 0, 0, SDL_ALPHA_OPAQUE}
constexpr SDL_Color GRAY = {30, 30, 30, SDL_ALPHA_OPAQUE}
constexpr SDL_Color LIGHT_GRAY = {120, 120, 120, SDL_ALPHA_OPAQUE}
constexpr SDL_Color GREEN = {50, 255, 50, SDL_ALPHA_OPAQUE}
constexpr SDL_Color RED = {255, 50, 50, SDL_ALPHA_OPAQUE}

Enumeration Type Documentation

◆ HAlign

enum class game::sdl::HAlign : std::uint8_t
strong
Enumerator
Left 
Center 
Right 

◆ VAlign

enum class game::sdl::VAlign : std::uint8_t
strong
Enumerator
Top 
Middle 
Bottom 

Function Documentation

◆ draw_filled_circle()

void game::sdl::draw_filled_circle ( SDL_Renderer * renderer,
float cx,
float cy,
float radius,
SDL_FColor color,
int segments = 64 )
Here is the caller graph for this function:

◆ draw_line()

void game::sdl::draw_line ( SDL_Renderer * renderer,
float x1,
float y1,
float x2,
float y2,
float thickness,
SDL_FColor color )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_text()

void game::sdl::draw_text ( SDL_Renderer * renderer,
TTF_Font * font,
const std::string & text,
float x,
float y,
float font_size,
HAlign h_align,
VAlign v_align,
SDL_Color color )
Here is the caller graph for this function:

◆ extract_pixel_data()

auto game::sdl::extract_pixel_data ( SDL_Renderer * renderer,
SDL_Texture * texture,
std::size_t width,
std::size_t height,
std::size_t bytes_per_pixel ) -> std::vector<std::uint8_t>

◆ get_performance_time()

auto game::sdl::get_performance_time ( ) -> long double
Here is the caller graph for this function:

Variable Documentation

◆ BLACK

SDL_Color game::sdl::BLACK = {0, 0, 0, SDL_ALPHA_OPAQUE}
constexpr

◆ GRAY

SDL_Color game::sdl::GRAY = {30, 30, 30, SDL_ALPHA_OPAQUE}
constexpr

◆ GREEN

SDL_Color game::sdl::GREEN = {50, 255, 50, SDL_ALPHA_OPAQUE}
constexpr

◆ LIGHT_GRAY

SDL_Color game::sdl::LIGHT_GRAY = {120, 120, 120, SDL_ALPHA_OPAQUE}
constexpr

◆ RED

SDL_Color game::sdl::RED = {255, 50, 50, SDL_ALPHA_OPAQUE}
constexpr

◆ WHITE

SDL_Color game::sdl::WHITE = {255, 255, 255, SDL_ALPHA_OPAQUE}
constexpr