Skip to content

Code_S_shapes

lemmiix edited this page Nov 5, 2025 · 2 revisions

S_shapes documentation

S_shapes

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

Quicknav

Go back to wiki home

Code documentation:
doc_code

Architecture documentation:
doc_arch

Project license

Clone this wiki locally