transfered from codeberg

This commit is contained in:
2026-03-26 14:46:39 -05:00
parent 630f28bb7e
commit 5ed2173793
136 changed files with 14932 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
#include "user_interface.h"
#include "performance.h"
#include "player.h"
#include "raylib.h"
#include <stdint.h>
/**
* Renders the 2D overlay, including the crosshair, positional coordinates,
* and performance metrics.
*/
void draw_ui_2D(struct player_struct *player)
{
int screen_center_coordinate_x = GetScreenWidth() / 2;
int screen_center_coordinate_y = GetScreenHeight() / 2;
uint8_t crosshair_line_length = 10;
uint8_t crosshair_line_thickness = 2;
DrawRectangle(
screen_center_coordinate_x - crosshair_line_length,
screen_center_coordinate_y - (crosshair_line_thickness / 2),
crosshair_line_length * 2,
crosshair_line_thickness,
PINK
);
DrawRectangle(
screen_center_coordinate_x - (crosshair_line_thickness / 2),
screen_center_coordinate_y - crosshair_line_length,
crosshair_line_thickness,
crosshair_line_length * 2,
PINK
);
draw_coordinates(player->camera.position);
draw_fps_counter();
}

View File

@@ -0,0 +1,13 @@
#ifndef ui_h
#define ui_h
struct player_struct;
/**
* Renders the 2D overlay, including the crosshair, positional coordinates,
* and performance metrics.
*/
void draw_ui_2D(struct player_struct* player);
#endif