; DMGTRIS
; Copyright (C) 2023 - Randy Thiemann <randy.thiemann@gmail.com>

; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.

; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.

; You should have received a copy of the GNU General Public License
; along with this program.  If not, see <https://www.gnu.org/licenses/>.


IF !DEF(GAMEPLAY_MAP_INC)
DEF GAMEPLAY_MAP_INC EQU 1


INCLUDE "globals.asm"


SECTION "Gameplay Static Data", ROMX, BANK[BANK_GAMEPLAY]
sLeftDasSlam::
    db -1
    db 0
    db -1
    db 0
    db -1
    db -2

sRightDasSlam::
    db -3
    db -4
    db -3
    db -4
    db -3
    db -2

sLeady::     db "  READY?  "

sGo::        db "    GO    "

sPause::
    db "P A U S E "
    db "          "
    db " P A U S E"
    db "          "

sKill::
    db "EXCELLENT!"
    db "          "
    db "          "
    db "  BUT...  "
    db "          "
    db "          "
    db " LET'S GO "
    db "          "
    db "  BETTER  "
    db "          "
    db "NEXT TIME!"
    db "          "
    db "          "
    db " RETRY[A] "
    db "          "
    db " QUIT [B] "

sYouAreGM::
    db " YOU  ARE "
    db "          "
    db " GRAND    "
    db "          "
    db " MASTER!  "
    db "          "
    db "          "
    db " RETRY[A] "
    db "          "
    db " QUIT [B] "


sFinalChallenge::
    db "          "
    db "          "
    db "          "
    db "EXCELLENT!"
    db "          "
    db "          "
    db " BUT  NOW "
    db "          "
    db "TRY  FINAL"
    db "          "
    db "CHALLENGE!"
    db "          "
    db "          "
    db "          "
    db "          "
    db "          "
    db "          "
    db "          "
    db "          "
    db "          "


sPieceXOffsets::    ; How to draw each piece. X-offsets of the sprites.
    db 0, 8, 16, 24 ; I
    db 0, 8, 8, 16  ; Z
    db 0, 8, 8, 16  ; S
    db 0, 8, 16, 16 ; J
    db 0, 0, 8, 16  ; L
    db 8, 8, 16, 16 ; O
    db 0, 8, 8, 16  ; T

sPieceYOffsets::    ; How to draw each piece. Y-offsets of the sprites.
    db 0, 0, 0, 0   ; I
    db 0, 0, 7, 7   ; Z
    db 7, 7, 0, 0   ; S
    db 0, 0, 0, 7   ; J
    db 7, 0, 0, 0   ; L
    db 0, 7, 0, 7   ; O
    db 0, 0, 7, 0   ; T

sPieceFastRotationStates::
    ; I
    db 14, 1, 1, 1
    db 2, 14, 14, 14
    db 14, 1, 1, 1
    db 2, 14, 14, 14

    ; Z
    db 14, 1, 14, 1
    db 2, 13, 1, 13
    db 14, 1, 14, 1
    db 2, 13, 1, 13

    ; S
    db 15, 1, 12, 1
    db 0, 14, 1, 14
    db 15, 1, 12, 1
    db 0, 14, 1, 14

    ; J
    db 14, 1, 1, 14
    db 1, 1, 13, 14
    db 14, 14, 1, 1
    db 1, 14, 13, 1

    ; L
    db 14, 1, 1, 12
    db 1, 14, 14, 1
    db 16, 12, 1, 1
    db 0, 1, 14, 14

    ; O
    db 15, 1, 13, 1
    db 15, 1, 13, 1
    db 15, 1, 13, 1
    db 15, 1, 13, 1

    ; T
    db 14, 1, 1, 13
    db 1, 14, 1, 13
    db 15, 13, 1, 1
    db 1, 13, 1, 14

sPieceRotationStates:: ; How each piece is rotated.
    ; I
    db %0000
    db %1111
    db %0000
    db %0000

    db %0010
    db %0010
    db %0010
    db %0010

    db %0000
    db %1111
    db %0000
    db %0000

    db %0010
    db %0010
    db %0010
    db %0010

    ; Z
    db %0000
    db %1100
    db %0110
    db %0000

    db %0010
    db %0110
    db %0100
    db %0000

    db %0000
    db %1100
    db %0110
    db %0000

    db %0010
    db %0110
    db %0100
    db %0000

    ; S
    db %0000
    db %0110
    db %1100
    db %0000

    db %1000
    db %1100
    db %0100
    db %0000

    db %0000
    db %0110
    db %1100
    db %0000

    db %1000
    db %1100
    db %0100
    db %0000

    ; J
    db %0000
    db %1110
    db %0010
    db %0000

    db %0110
    db %0100
    db %0100
    db %0000

    db %0000
    db %1000
    db %1110
    db %0000

    db %0100
    db %0100
    db %1100
    db %0000

    ; L
    db %0000
    db %1110
    db %1000
    db %0000

    db %0100
    db %0100
    db %0110
    db %0000

    db %0000
    db %0010
    db %1110
    db %0000

    db %1100
    db %0100
    db %0100
    db %0000

    ; O
    db %0000
    db %0110
    db %0110
    db %0000

    db %0000
    db %0110
    db %0110
    db %0000

    db %0000
    db %0110
    db %0110
    db %0000

    db %0000
    db %0110
    db %0110
    db %0000

    ; T
    db %0000
    db %1110
    db %0100
    db %0000

    db %0100
    db %0110
    db %0100
    db %0000

    db %0000
    db %0100
    db %1110
    db %0000

    db %0100
    db %1100
    db %0100
    db %0000

sTGM3Bag::
    db 0, 0, 0, 0, 0
    db 1, 1, 1, 1, 1
    db 2, 2, 2, 2, 2
    db 3, 3, 3, 3, 3
    db 4, 4, 4, 4, 4
    db 5, 5, 5, 5, 5
    db 6, 6, 6, 6, 6

sTGM3Droughts::
    db 0, 0, 0, 0, 0, 0, 0

sGameplayTileMap::
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$01,$01,$01,$01,$01,$EA,$EC,$EE,$F0
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6D,$19,$10,$23,$1F,$01,$EB,$ED
    DB $EF,$F1,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$01,$01,$01,$01,$01
    DB $E0,$F7,$F7,$F6,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$E2,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$6D,$01
    DB $01,$01,$01,$01,$01,$01,$01,$6F,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$E1,$01,$01,$01,$01,$E3,$01,$01,$6F
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6E,$70,$70,$70,$70,$70,$70,$70
    DB $70,$71,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$13,$1A,$17,$0F,$01
    DB $01,$01,$01,$6F,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$01,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$6D,$01
    DB $01,$01,$01,$01,$01,$01,$01,$6F,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$01,$01,$01,$01,$01,$01,$01,$01,$6F
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6E,$70,$70,$70,$70,$70,$70,$70
    DB $70,$71,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$1E,$0E,$1A,$1D,$10
    DB $01,$01,$01,$6F,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$01,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$6E,$70
    DB $70,$70,$70,$70,$F4,$70,$70,$71,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$17,$10,$21,$10,$17,$6F,$01,$01,$6F
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6D,$01,$01,$01,$01,$01,$6F,$01
    DB $01,$6F,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$F8,$F9,$FA,$FB,$FC
    DB $6F,$01,$01,$6F,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$6F,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$E6,$E7
    DB $E7,$E7,$E7,$E7,$F5,$E7,$E7,$E8,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $E5,$E4,$E4,$D4,$E4,$E4,$DF,$E4,$E4,$E9
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00
sGameplayTileMapEnd::

sGameplayUngradedTileMap::
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$01,$01,$01,$01,$01,$01,$01,$01,$6F
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6D,$19,$10,$23,$1F,$01,$01,$01
    DB $01,$6F,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$01,$01,$01,$01,$01
    DB $01,$01,$01,$6F,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$E2,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$6D,$01
    DB $01,$01,$01,$01,$01,$01,$01,$6F,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$E1,$01,$01,$01,$01,$E3,$01,$01,$6F
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6E,$70,$70,$70,$70,$70,$70,$70
    DB $70,$71,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$13,$1A,$17,$0F,$01
    DB $01,$01,$01,$6F,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$01,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$6D,$01
    DB $01,$01,$01,$01,$01,$01,$01,$6F,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$01,$01,$01,$01,$01,$01,$01,$01,$6F
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6E,$70,$70,$70,$70,$70,$70,$70
    DB $70,$71,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$1E,$0E,$1A,$1D,$10
    DB $01,$01,$01,$6F,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$01,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$6E,$70
    DB $70,$70,$70,$70,$F4,$70,$70,$71,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $6D,$17,$14,$19,$10,$1E,$6F,$01,$01,$6F
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$01,$01,$01,$01,$01,$01,$01,$01
    DB $01,$01,$6D,$01,$01,$01,$01,$01,$6F,$01
    DB $01,$6F,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$01,$01,$01,$01,$01,$01
    DB $01,$01,$01,$01,$6D,$F8,$F9,$FA,$FB,$FC
    DB $6F,$01,$01,$6F,$00,$00,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$01,$01,$01,$01
    DB $01,$01,$01,$01,$01,$01,$6D,$01,$01,$01
    DB $01,$01,$6F,$01,$01,$6F,$00,$00,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$01,$01
    DB $01,$01,$01,$01,$01,$01,$01,$01,$E6,$E7
    DB $E7,$E7,$E7,$E7,$F5,$E7,$E7,$E8,$00,$00
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    DB $E5,$E4,$E4,$D4,$E4,$E4,$DF,$E4,$E4,$E9
    DB $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    DB $00,$00
sGameplayUngradedTileMapEnd::


ENDC
