; map routine that loads l1
map_r_load_l1:
+
ld a, [player+act_pos_y]
cp a, 5
ret nc
+ ; if the player is on the right side of the map
+ ; load hard mode
+ ld a, [player+act_pos_x]
+ cp a, 0x5F
+ jr c, @no_hard REL
+ ld a, [game_flags]
+ or a, GPF_HARD_MODE
+ ld [game_flags], a
+@no_hard:
+
+ call player_init
+
ld de, l1_map
call map_load
ret
#define PLAYER_SPEED 0xE0
#define ARROW_TILE 0x86
#define PLAYER_WALKING_TILE 0x8E
+
+ ; inits hard mode
+player_init_hard_mode:
+ ld a, 1
+ ld [player_hp_max], a
+ ret
; sets up the player actor
player_init:
ld a, [player_hp_max]
ld [player+act_hp], a
+
+
+ ld a, [game_flags]
+ and a, GPF_HARD_MODE
+ call nz, player_init_hard_mode
ret
; updates the special player actor
ld [animation_frame], a
ret
- ; sets up hard mode values
-init_hard_mode:
- ld a, 1
- ld [player_hp_max], a
- ret
-
new_game:
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