MapData_01:

dw (Map01_EventData - MapData_01) + wMisMapDataStart
dw (Map01_WarpData - MapData_01) + wMisMapDataStart
dw NoSignData
dw NoLoadScript
dw NoObjects

db $0A, $12	; start coords

db $0A, $09      ; width, height

; tiles

db T_FENCE, T_FENCE, T_FENCE, T_FLOOR1, T_CARPET9, T_CARPET10, T_FLOOR1, T_ROCK2, T_ROCK2, T_FENCE
db T_FENCE, T_ROCK2, T_FENCE, T_FLOOR1, T_CARPET9, T_CARPET10, T_FLOOR1, T_FLOOR1, T_FLOOR1, T_FENCE
db T_FENCE, T_FLOOR1, T_FENCE, T_FLOOR1, T_CARPET9, T_CARPET10, T_FENCE, T_FLOOR1, T_FLOOR1, T_FENCE
db T_FENCE, T_FLOOR1, T_FENCE, T_FENCE, T_CARPET9, T_CARPET10, T_FENCE, T_FLOOR1, T_FLOOR1, T_FENCE
db T_FENCE, T_FLOOR1, T_FLOOR1, T_FLOOR1, T_CARPET9, T_CARPET10, T_FLOOR1, T_FLOOR1, T_FLOOR1, T_FENCE
db T_FENCE, T_FLOOR1, T_FLOOR1, T_FENCE, T_CARPET9, T_CARPET10, T_FENCE, T_FENCE, T_FLOOR1, T_FENCE
db T_FENCE, T_FLOOR1, T_FLOOR1, T_FLOOR1, T_CARPET9, T_CARPET10, T_FLOOR1, T_FLOOR1, T_FLOOR1, T_FENCE
db T_FENCE, T_FENCE, T_FENCE, T_FLOOR1, T_CARPET9, T_CARPET10, T_FLOOR1, T_FENCE, T_FENCE, T_FENCE
db T_FENCE, T_FLOOR1, T_FLOOR1, T_FLOOR1, T_CARPET9, T_CARPET10, T_FLOOR1, T_FLOOR1, T_FLOOR1, T_FENCE

Map01_EventData:
    db $01
    db $FF, $0B
    dw (Map01_Event0 - MapData_01) + wMisMapDataStart

Map01_WarpData:
    db $01
    db $FF, $02,  $02;,  $0A, $02

Map01_Event0:

    ; final debbie pos = 0x50, 0x1A

    ld a, [wEventFlagGeneric]
    or a
    ret nz
    inc a
    ld [wEventFlagGeneric], a
    call PlaySong_M0

    	;ld c, $44
    	;call DelayFrames

    ;debbie anim
    ld a, -24
    ld [wDebbieScreenY], a
    ld a, $50 + 50
    ld [wDebbieScreenX], a
.debbieAnimLoop
    ld a, [wDebbieScreenY]
    inc a
    ld [wDebbieScreenY], a
    ld a, [wDebbieScreenX]
    dec a
    ld [wDebbieScreenX], a
    push af
    call M_UpdateSprites
    call DelayFrame
    pop af
    cp $50
    jr nz, .debbieAnimLoop

    ld a, $1A
    ld [wDebbieScreenY], a
    

    ld hl, (Txt_DebbieIntro - MapData_01) + wMisMapDataStart
    call PrintTextVWF
    call YesNo
    jr nc, .choseNo
    ld hl, (Txt_DebbieIntro2 - MapData_01) + wMisMapDataStart
    call PrintTextVWF

    lb bc, 2, $20
.debbieAnimLoop2
    	;ld a, [wDebbieFlags]
    	;xor a, %00000010
    	;ld [wDebbieFlags], a


    ld a, [wDebbieScreenY]
    add a, b
    ld [wDebbieScreenY], a
    ld a, c
    and a, %00000011
    jr nz, .skipDec
    dec b
    ld a, [wDebbieScreenX]
    dec a
    ld [wDebbieScreenX], a
.skipDec
    push bc
    call M_UpdateSprites
    call DelayFrame
    pop bc
    dec c
    jr nz, .debbieAnimLoop2
    ret

.choseNo
    jp SoftReset

Txt_DebbieIntro:
    text "I exist Within the Very"
    next "fabric of reality."
    next ""
    next "do you want to challenge me?"
    wait
Txt_DebbieIntro2:
    text "Then, let's begin."
    wait