MapData_00:

dw (Map00_EventData - MapData_00) + wMisMapDataStart
dw (Map00_WarpData - MapData_00) + wMisMapDataStart
dw NoSignData	;;(Map00_SignData - MapData_00) + wMisMapDataStart
dw NoLoadScript
dw NoObjects

db $0A, $0E	; start pos

db $0A, $09      ; width, height

; tiles

db T_HOLE, T_VOIDWALL_R, T_SSWALL, T_SSWALL, T_OFFDOOR_L, T_OFFDOOR_R, T_SSWALL, T_SSWALL, T_VOIDWALL_L, T_HOLE    ;  $1F, $20
db T_HOLE, T_VOIDWALL_R, T_FLOOR1, T_FLOOR1, T_CARPET7,   T_CARPET8,   T_FLOOR1, T_FLOOR1, T_VOIDWALL_L, T_HOLE    ;  $39, $3B
db T_HOLE, T_VOIDWALL_R, T_BONES,  T_FLOOR1, T_CARPET7,   T_CARPET8,   T_FLOOR1, T_FLOOR1, T_VOIDWALL_L, T_HOLE
db T_HOLE, T_VOIDWALL_R, T_BONES, T_CARPET3, T_CARPET4,   T_CARPET5,  T_CARPET6, T_FLOOR1, T_VOIDWALL_L, T_HOLE
db T_HOLE, T_VOIDWALL_R, T_FLOOR1, T_FLOOR1, T_CARPET1,   T_CARPET2,   T_FLOOR1, T_FLOOR1, T_VOIDWALL_L, T_HOLE
db T_VOIDWALL_U, T_VOIDWALL_U, T_VOIDWALL_U, T_VOIDWALL_UR, T_FLOOR1, T_FLOOR1, T_VOIDWALL_UL, T_VOIDWALL_U, T_VOIDWALL_U, T_VOIDWALL_U
db T_SSWALL, T_SSWALL, T_SSWALL, T_SSWALL_R, T_FLOOR1, T_FLOOR1, T_SSWALL_L, T_SSWALL, T_SSWALL, T_SSWALL
db T_BONES, T_FLOOR2, T_FLOOR2, T_FIRE, T_FLOOR1, T_FLOOR1, T_FIRE, T_FLOOR2, T_FLOOR2, T_FLOOR2
db T_FLOOR2, T_FLOOR2, T_FLOOR2, T_FIRE, T_FLOOR1, T_FLOOR1, T_FIRE, T_CRACKED, T_BONES, T_FLOOR2

Map00_EventData:
    db $02	; 2 events
    db $0A, $04
    dw (Map00_Event0 - MapData_00) + wMisMapDataStart
    db $FF, $12
    dw (Map00_Event1 - MapData_00) + wMisMapDataStart

Map00_WarpData:
    db $01
    db $0A, $02,   $01    ; at 2, 2 to map 1 at $0A, $12    ; $0A, $12

Map00_Event0:
    	;ld a, [wEventFlagGeneric]
    	;or a
    	;ret nz
    
    	;inc a
    	;ld [wEventFlagGeneric], a
    ld a, [wMisTileDataStart+4];[$D36F]
    cp T_HALFWALL_L
    ret z

    ld hl, wMisTileDataStart+4;$D36F
    ld a, T_HALFWALL_L
    ld [hli], a
    ld a, T_HALFWALL_R
    ld [hl], a

    ld a, SFX_GO_INSIDE
    call PlaySound

    ;call PlaySound_GetKey

    call M_DrawMapScreen
    ;call WaitForSoundToFinish
    ret

Map00_Event1:
    ld hl, (Map00_Text0 - MapData_00) + wMisMapDataStart
    call PrintTextVWF
    call YesNo
    jr nc, .choseNo
    call $2233    ;StopAllMusic
    
    ld a, SFX_GO_OUTSIDE
    call PlaySound

    call GBFadeOutToWhite
    call WaitForSoundToFinish
    jp SoftReset
.choseNo
    ld a, $01
    ld [wPlayerDir], a
    ld [wPlayerFlags], a
    ret

Map00_Text0:
    text "do you want to run away?"
    wait

;Map00_Text1:
;    text ""
;    next ""
;    next "           sign text"
;    wait
