ref: 2f7ec64f856564b48d3ae7493fae937afe29c794
parent: f5aa8e66aaa6184506d08b27ccd4f2b9b0726f12
author: sirjofri <sirjofri@sirjofri.de>
date: Fri Feb 13 14:41:19 EST 2026
adds health
--- a/dat.h
+++ b/dat.h
@@ -12,6 +12,7 @@
int deckcards;
int weapon;
int lastweaponkill;
+ int hp;
int running;
int canskip;
--- a/game.c
+++ b/game.c
@@ -49,6 +49,7 @@
state.running++;
state.canskip = 1;
+ state.hp = 20;
// TODO: mix cards, update state
// fake display
--- a/main.c
+++ b/main.c
@@ -88,6 +88,10 @@
snprint(s, sizeof s, "Deck: %d", state->deckcards);
string(screen, p, display->black, ZP, font, s);
+
+ p.y += 50;
+ snprint(s, sizeof s, "HP: %d", state->hp);
+ string(screen, p, display->black, ZP, font, s);
}
static void
--
⑨