first commit
This commit is contained in:
commit
5c7d1905a9
25 changed files with 4034 additions and 0 deletions
32
include/components/render.hpp
Normal file
32
include/components/render.hpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* @file render.hpp
|
||||
* @brief Rendering-related components
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <cstdint>
|
||||
|
||||
struct Color {
|
||||
uint8_t r = 255;
|
||||
uint8_t g = 255;
|
||||
uint8_t b = 255;
|
||||
uint8_t a = 255;
|
||||
};
|
||||
|
||||
struct Sprite {
|
||||
SDL_Texture* texture = nullptr;
|
||||
SDL_FRect src_rect{};
|
||||
int z_order = 0;
|
||||
bool visible = true;
|
||||
};
|
||||
|
||||
struct RectShape {
|
||||
float width = 0.0f;
|
||||
float height = 0.0f;
|
||||
};
|
||||
|
||||
struct CircleShape {
|
||||
float radius = 0.0f;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue