-
Notifications
You must be signed in to change notification settings - Fork 0
Code_S_shapes
lemmiix edited this page Nov 5, 2025
·
2 revisions
typedef struct S_Hex {
float x;
float y;
float radians;
} S_Hex;This imitates the SDL3 geometry structs with similary named members.
@member x: X-position coordinate of the hex
@member y: Y-position coordinate of the hex
@member radians: size of the hex as radians
bool S_RenderHex(SDL_Renderer* renderer, S_Hex* hex);This imitates the SDL3 gemoetry rendering logic from SDL_Rect by calculating the angles of each vertex and drawing it to the screen.
@param renderer: renderer the object is drawn on
@param hex: the object that is supposed to be rendered

