From: Lukas Krickl Date: Fri, 24 Oct 2025 13:05:05 +0000 (+0200) Subject: game: Added hard mode flag X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=849552dc37b46f4a58ff80197deed0f2fd08aa09;p=gbrg%2F.git game: Added hard mode flag --- diff --git a/src/defs.s b/src/defs.s index 9a6f0fc..7ab83f4 100644 --- a/src/defs.s +++ b/src/defs.s @@ -148,6 +148,8 @@ .de GPF_NO_SCROLL, 1 ; scroll a row up next vblank .de GPF_SCROLL, 2 + ; player max hp is set to 1 +.de GPF_HARD_MODE, 4 ; weapon type for player .se 0 diff --git a/src/update.s b/src/update.s index 202ba62..3f5e5cb 100644 --- a/src/update.s +++ b/src/update.s @@ -41,12 +41,21 @@ update_anim_timer: xor a, 1 ld [animation_frame], a ret + + ; sets up hard mode values +init_hard_mode: + ld a, 1 + ld [player_hp_max], a + ret new_game: - ; TODO: handle hard mode ld a, HP_MAX ld [player_hp_max], a + ld a, [game_flags] + and a, GPF_HARD_MODE + call nz, init_hard_mode + ld de, l_main_menu call map_load