feat/refactor: player health and overlay display

This commit is contained in:
2026-07-05 20:17:06 +02:00
parent a4289a21aa
commit cc42a45f68
5 changed files with 27 additions and 10 deletions
+17
View File
@@ -0,0 +1,17 @@
#include "app.h"
#include "raylib.h"
#include <limits.h>
void RenderOverlay(Mouse *mouse) {
// Health
Player *player = GetPlayer();
const char *healthText = TextFormat("%d", player->health);
DrawText(healthText, 0, 0, 25, WHITE);
// Mouse
Rectangle mouseRectangle = (Rectangle){0, 0, mouse->cursorTexture.width,
mouse->cursorTexture.height};
DrawTextureRec(mouse->cursorTexture, mouseRectangle, mouse->screenPosition,
WHITE);
}