GAME READY

This commit is contained in:
Masashi 2025-12-20 17:11:21 +05:30
commit 5a60e1c62a
18 changed files with 2506 additions and 249 deletions

View file

@ -83,6 +83,10 @@ void suic_set_target_fps(int fps) { SetTargetFPS(fps); }
void suic_enable_msaa_4x(void) { SetConfigFlags(FLAG_MSAA_4X_HINT); }
int suic_get_screen_width(void) { return GetScreenWidth(); }
int suic_get_screen_height(void) { return GetScreenHeight(); }
// Timing
float suic_get_frame_time(void) { return GetFrameTime(); }
@ -148,6 +152,14 @@ void suic_draw_cube_wires(float x, float y, float z, float width, float height,
DrawCubeWires((Vector3){x, y, z}, width, height, length, (Color){r, g, b, a});
}
void suic_draw_sphere(float x, float y, float z, float radius, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
DrawSphere((Vector3){x, y, z}, radius, (Color){r, g, b, a});
}
void suic_draw_capsule(float start_x, float start_y, float start_z, float end_x, float end_y, float end_z, float radius, int slices, int rings, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
DrawCapsule((Vector3){start_x, start_y, start_z}, (Vector3){end_x, end_y, end_z}, radius, slices, rings, (Color){r, g, b, a});
}
// 2D Drawing (UI Framework Utils)
void suic_draw_text(const char *text, int x, int y, int font_size, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
DrawText(text, x, y, font_size, (Color){r, g, b, a});
@ -173,6 +185,10 @@ void suic_draw_line(int start_x, int start_y, int end_x, int end_y, unsigned cha
DrawLine(start_x, start_y, end_x, end_y, (Color){r, g, b, a});
}
void suic_draw_fps(int x, int y) {
DrawFPS(x, y);
}
// Input - Keyboard
bool suic_is_key_down(int key) { return IsKeyDown(key); }
@ -205,6 +221,9 @@ float suic_get_mouse_delta_x(void) { return GetMouseDelta().x; }
float suic_get_mouse_delta_y(void) { return GetMouseDelta().y; }
// Random number generation
int suic_get_random_value(int min, int max) { return GetRandomValue(min, max); }
// Input - Helper functions for gamedev
int suic_is_movement_input(void) {
// Returns bitmask: 1=W (forward), 2=A (left), 4=S (backward), 8=D (right)
@ -996,3 +1015,15 @@ int suic_fishsoup_packet_send(int fd, fishsoup_packet_t* packet) {
int suic_fishsoup_packet_recv(int fd, fishsoup_packet_t* packet) {
return fishsoup_packet_recv(fd, packet);
}
// ============================================================================
// MATH FUNCTIONS
// ============================================================================
float suic_sinf(float x) { return sinf(x); }
float suic_cosf(float x) { return cosf(x); }
float suic_expf(float x) { return expf(x); }
float suic_fmaxf(float a, float b) { return fmaxf(a, b); }