projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f9e64c
)
game: Added hard mode flag
author
Lukas Krickl
<lukas@krickl.dev>
Fri, 24 Oct 2025 13:05:05 +0000
(15:05 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Fri, 24 Oct 2025 13:05:05 +0000
(15:05 +0200)
src/defs.s
patch
|
blob
|
history
src/update.s
patch
|
blob
|
history
diff --git
a/src/defs.s
b/src/defs.s
index 9a6f0fc7df4cc625166972637e73f057a7b357e6..7ab83f44246de1e53c0d6df2581a801efa05b8c7 100644
(file)
--- 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 202ba622fe32f474acc3ff0219997c6a4cb3b406..3f5e5cb0436393bdf1f0853bb3a5ebbc6b10a717 100644
(file)
--- 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