From e048e0247517e164ec3e93fdbbb65afda4e73e4a Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 8 Apr 2026 09:50:45 +0300 Subject: [PATCH] stats: add stat tracking fields to `GameState` We can now track kills, items, damage dealt/taken, crits, times hit, potions used, floors reached, and final score in `GameState` for end-game display. This is rather basic for now, but I intend to extend the tracked statistics as we introduce more mechanics. Signed-off-by: NotAShelf Change-Id: I4dcd3e1effd0209268dc56fe4bba4b696a6a6964 --- src/common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common.h b/src/common.h index bd8454d..2b499a8 100644 --- a/src/common.h +++ b/src/common.h @@ -150,6 +150,16 @@ typedef struct { int shake_x; int shake_y; AudioAssets sounds; + // Statistics + int total_kills; + int items_collected; + int damage_dealt; + int damage_taken; + int crits_landed; + int times_hit; + int potions_used; + int floors_reached; + int final_score; } GameState;