135int32_t
gm_draw_text(
double x,
double y,
const char *text,
const char *font,
186 for (
size_t i = 0; i < number; i++)
223 for (
size_t i = 0; i < number; i++)
246 for (
size_t i = 0; i < number; i++)
264 double y2_offset,
double x3_offset,
double y3_offset,
285 double x2_offset,
double y2_offset,
286 double x3_offset,
double y3_offset,
gmColor c) {
287 for (
size_t i = 0; i < number; i++)
311 for (
size_t i = 0; i < number; i++)
338 const char *font,
double font_size,
gmColor c) {
339 for (
size_t i = 0; i < number; i++)
@ GM_COLLIDER_RECT
Definition body.h:13
@ GM_COLLIDER_CIRCLE
Definition body.h:12
#define gm_blue(col)
Extracts the blue component from a color.
Definition color.h:29
#define gm_green(col)
Extracts the green component from a color.
Definition color.h:22
unsigned int gmColor
Type definition for color values in RGBA format.
Definition color.h:8
#define gm_red(col)
Extracts the red component from a color.
Definition color.h:15
#define gm_alpha(col)
Extracts the alpha component from a color.
Definition color.h:36
int32_t gm_draw_circle(double center_x, double center_y, double radius, gmColor c)
Draws a circle.
Definition draw.h:76
void gm_draw_triangle_bodies(const gmBody *bodies, size_t number, double x2_offset, double y2_offset, double x3_offset, double y3_offset, gmColor c)
Draws an array of triangular physics bodies.
Definition draw.h:284
void gm_draw_circle_bodies(const gmBody *bodies, size_t number, gmColor c)
Draws an array of circular physics bodies.
Definition draw.h:222
int32_t gm_draw_text(double x, double y, const char *text, const char *font, double font_size, gmColor c)
Draws text.
Definition draw.h:135
void gm_draw_rect_body(const gmBody *body, gmColor c)
Draws a rectangular physics body.
Definition draw.h:174
int32_t gm_draw_ellipse(double x, double y, double w, double h, gmColor c)
Draws an ellipse.
Definition draw.h:91
int32_t gm_draw_rectangle(double x, double y, double w, double h, gmColor c)
Draws a rectangle.
Definition draw.h:47
void gm_draw_ellipse_bodies(const gmBody *bodies, size_t number, gmColor c)
Draws an array of elliptical physics bodies.
Definition draw.h:245
void gm_draw_image_bodies(const gmBody *bodies, size_t number, gmImage img)
Draws the same image for an array of physics bodies.
Definition draw.h:310
void gm_draw_image_body(const gmBody *body, gmImage img)
Draws an image at a physics body's position.
Definition draw.h:297
int32_t gm_draw_line(double x1, double y1, double x2, double y2, double thickness, gmColor c)
Draws a line segment.
Definition draw.h:32
void gm_draw_round_rect_body(const gmBody *body, double radius, gmColor c)
Draws a rectangular physics body with rounded corners.
Definition draw.h:196
void gm_draw_text_body(const gmBody *body, const char *text, const char *font, double font_size, gmColor c)
Draws text at a physics body's position.
Definition draw.h:322
int32_t gm_draw_triangle(double x1, double y1, double x2, double y2, double x3, double y3, gmColor c)
Draws a triangle.
Definition draw.h:107
void gm_draw_ellipse_body(const gmBody *body, gmColor c)
Draws an elliptical physics body.
Definition draw.h:232
void gm_draw_triangle_body(const gmBody *body, double x2_offset, double y2_offset, double x3_offset, double y3_offset, gmColor c)
Draws a triangular physics body.
Definition draw.h:263
void gm_draw_text_bodies(const gmBody *bodies, size_t number, const char *text, const char *font, double font_size, gmColor c)
Draws the same text for an array of physics bodies.
Definition draw.h:337
int32_t gm_draw_rounded_rectangle(double x, double y, double w, double h, double r, gmColor c)
Draws a rectangle with rounded corners.
Definition draw.h:62
void gm_draw_rect_bodies(const gmBody *bodies, size_t number, gmColor c)
Draws an array of rectangular physics bodies.
Definition draw.h:185
int32_t gm_draw_image(gmImage img, double x, double y, double w, double h)
Draws an image.
Definition draw.h:122
void gm_draw_circle_body(const gmBody *body, gmColor c)
Draws a circular physics body.
Definition draw.h:209
void gm_draw_body(const gmBody *body, gmColor c)
Draws a physics body based on its collider type.
Definition draw.h:154
int32_t gapi_draw_rect(double x, double y, double w, double h, uint8_t cr, uint8_t cg, uint8_t cb, uint8_t ca)
int32_t gapi_draw_ellipse(double x, double y, double w, double h, uint8_t cr, uint8_t cg, uint8_t cb, uint8_t ca)
int32_t gapi_draw_triangle(double x1, double y1, double x2, double y2, double x3, double y3, uint8_t cr, uint8_t cg, uint8_t cb, uint8_t ca)
int32_t gapi_draw_image(uint32_t handle, double x, double y, double width, double height)
int32_t gapi_draw_rounded_rect(double x, double y, double w, double h, double r, uint8_t cr, uint8_t cg, uint8_t cb, uint8_t ca)
int32_t gapi_draw_line(double x1, double y1, double x2, double y2, double thickness, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
int32_t gapi_draw_circle(double center_x, double center_y, double radius, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
int32_t gapi_draw_text(double x, double y, double height, const char *txt, const char *font, uint8_t style, uint8_t cr, uint8_t cg, uint8_t cb, uint8_t ca)
Structure representing a physics body with properties for collision and movement.
Definition body.h:19
double width
Definition body.h:28
gmColliderType collider_type
Definition body.h:23
double height
Definition body.h:28
uint8_t is_active
Definition body.h:20
double radius
Definition body.h:28
gmPos position
Definition body.h:24
Structure representing an image with handle and dimensions.
Definition image.h:9
uint32_t handle
Definition image.h:10
double x
Definition position.h:5
double y
Definition position.h:5