ld b, 1
ld c, 1 ; bc = y/x position
; start current ptr at 1/1 as well
- ld hl, map_doors_location + 1 * FLOOR_W
+ ld hl, map_doors_location + 1 + FLOOR_W
; set map cursor
ld a, 1 + FLOOR_W
ld [player_map_cursor], a
+ BREAK
; select how many doors we want
push bc
call make_door
cp a, 0xFF
jp z, @loop ; try again
+ BREAK
call make_opp_door
pop af
; try again...
ld a, 0xFF
ret
-@right:
+@left:
; can we even place it?
ld a, c
pop af
ret
-@left:
+@right:
ld a, c
- cp a, MAP_W-1
+ cp a, FLOOR_W-1
jp z, @try_again
ld a, [hl]
@down:
ld a, b
- cp a, MAP_H-1
+ cp a, FLOOR_H-1
jp z, @try_again
ld a, [hl]
or a, DIRDOWN
ld [hl], a
- inc bc ; y++
+ inc b ; y++
; move hl one row down
.rep i, FLOOR_W, 1, inc hl