DEF vCurrentSpread EQU $ff90 ; putting global app variables at the start of HRAM. ; they probably don't needd to be there but whatever DEF vFrameCount1 EQU VARIABLES_START DEF vFrameCount2 equ vFrameCount1+1 DEF vFrameCount3 EQU vFrameCount2+1 DEF vFrameCount4 EQU vFrameCount3+1 DEF vFrameCountSquares EQU vFrameCount4+1 PRINTLN "vframecount is ", vFrameCount1 DEF vTime EQU vFrameCountSquares+1 ; 16bit DEF vMenuIndex equ vTime + 2 DEF vMenuIndexPrevious equ vMenuIndex + 1 ScreenMainMenu: dw MainMenuSetup dw MainMenuUpdate dw MainMenuDraw dw MainMenuTeardown MainMenuSetup: ; Turn the LCD off ld hl, rLCDC bit 7, [hl] jp z, MainMenuSetup_ScreenOff MainMenuSetup_BusyWait: ld a, [rLY] cp a, 143 jp c, MainMenuSetup_BusyWait ld [hl], 0 MainMenuSetup_ScreenOff: ld a, 0 ldh [rLCDC], a ld hl, SquaresTileset8 ld de, $8010 ld bc, (SquaresTilesetEnd - SquaresTileset8) call CopyRangeUnsafe ld hl, CardBackSprites ; source ld de, $8100; destination of copy ld bc, CardBackSpritesEnd - CardBackSprites ; length to copy call CopyRangeUnsafe ld hl, SquaresTilemap ld de, $9800 ld b, 18 ld c, 20 call CopyTilesToMapUnsafe ld hl, LetterTiles ; map the small font into vram at ascii locations ld de, $8000 + (127 + $21)*16 ld bc, LetterTilesEnd - LetterTiles call CopyRangeUnsafe ld hl, StringRead ld de, $9800 + 32*11 + 4 call PrintString ld hl, StringShuffle ld de, $9800 + 32*13 + 4 call PrintString ld hl, StringBrowse ld de, $9800 + 32*15 + 4 call PrintString ; clear out the dma source ld hl, $c000 ld a, 0 : ld [hl+], a cp a, l jp nz, :- ld de, vTime+2 ld a, $c0 call RunDMA ; set LCD and display registers ld a, %11100100 ld [rBGP], a ld [rOBP0], a ld a, LCDCF_BLK01 | LCDCF_ON | LCDCF_BGON | LCDCF_OBJON | LCDCF_OBJ16 ldh [rLCDC], a ld a, 0 ldh [vFrameCount1], a ; first starts at 0 ldh [vTime], a ldh [vTime+1], a ldh [vMenuIndex], a ldh [vMenuIndexPrevious], a ; second starts at 1/3 length which is approximately L/2 - L/4 - L/8 + L/16 ? ld hl, Coords ld a, [hl] ld b, a srl b sub a, b ; L - L/2 srl b sub a, b ; L - L/2 - L/4 srl b add a, b ; L - L/2 - L/4 + L/8 srl b sub a, b ; L - L/2 - L/4 + L/8 - L/16 srl b add a, b ; L - L/2 - L/4 + L/8 - L/16 + L/32 srl b sub a, b ; L - L/2 - L/4 + L/8 - L/16 + L/32 - L/64 srl b add a, b ; L - L/2 - L/4 + L/8 - L/16 + L/32 - L/64 + L/128 ; that should be approx 1/3 of L ! ldh [vFrameCount2], a ; third starts at 2/3 length which is approximately L/2 - L/4 + L/8 - L/16 ? ld hl, Coords ld a, [hl] ld b, a srl b sub a, b ; L - L/2 srl b add a, b ; L - L/2 + L/4 srl b sub a, b ; L - L/2 + L/4 - L/8 srl b add a, b ; L - L/2 + L/4 - L/8 + L/16 srl b sub a, b ; L - L/2 + L/4 - L/8 + L/16 - L/32 srl b add a, b ; L - L/2 + L/4 - L/8 + L/16 - L/32 + L/64 srl b sub a, b ; L - L/2 + L/4 - L/8 + L/16 - L/32 + L/64 - L/128 ; that should be just about 2/3 of L ! ldh [vFrameCount3], a ld hl, Coords ld a, [hl] srl a ldh [vFrameCount4], a ld a, 0 ldh [vFrameCountSquares], a ; load graphics into vram for deck face ; set up variables: LFSR stuff ret ; return from cardreadsetup MainMenuUpdate: ; if pressing a key and unblocked: ; signal an animation to start ; turn on block ; if in animation state: ; increment timer ; if timer is max, turn off animation state and unblock? ld hl, rMYBTNP ldh a, [vMenuIndex] bit 3, [hl] ; select the down key jp z, .doneWithDownInput ; skip the following code if down is not pressed inc a .doneWithDownInput bit 2, [hl] ; select up key %0000_0100 jp z, .doneWithUpInput ; skip the following code if up is not pressed dec a .doneWithUpInput ld hl, MenuCount call ArrayClampLooping ldh [vMenuIndex], a ld hl, rMYBTNP bit 5, [hl] ; button a pressed? jp z, .doneWithMenuSelect ld a, [vMenuIndex] cp a, 0 jp z, .option1 cp a, 1 jp z, .option2 cp a, 2 jp z, .option3 jp .doneWithMenuSelect .option1 jp .doneWithMenuSelect .option2 jp .doneWithMenuSelect .option3 ld hl, vCurrentSpread ld [hl], LOW(Spreads.threecard) inc hl ld [hl], HIGH(Spreads.threecard) ld hl, ScreenCardRead call ChangeScene ret jp .doneWithMenuSelect .doneWithMenuSelect ld hl, vTime ldh a, [rDELTAT] ld b, a ldh a, [vTime] add a, b ldh [vTime], a ldh a, [vTime+1] adc a, 0 ldh [vTime+1], a ; increment time. when the 16bit time register is greater ; than 4096 ($10_00) then one second has passed. so that's satisfied when ; vTime+1 is equal to or greater than $10 cp a, $01 jp c, MainMenuUpdate_Done ; if the timer is less than $0100, skip to end ;otherwise reset the timer ld a, 0 ldh [vTime], a ldh [vTime+1], a ld hl, Coords ; and advance the frame counts ldh a, [vFrameCount1] inc a call ArrayClampLooping ldh [vFrameCount1], a ldh a, [vFrameCount2] inc a call ArrayClampLooping ldh [vFrameCount2], a ldh a, [vFrameCount3] inc a call ArrayClampLooping ldh [vFrameCount3], a ldh a, [vFrameCount4] inc a call ArrayClampLooping ldh [vFrameCount4], a ld hl, SquaresTiles ldh a, [vFrameCountSquares] inc a call ArrayClampLooping ldh [vFrameCountSquares], a ld hl, Coords inc hl ld b, 0 ld a, [vFrameCount1] ld c, a add hl, bc add hl, bc add hl, bc ld a, [hl+] ld b, a ; y coordinate ld a, [hl+] ld c, a ; x coordinate ld a, [hl+] ld e, a ; spread value ld hl, $c000 call DrawWholeCard ld hl, Coords inc hl ld b, 0 ld a, [vFrameCount2] ld c, a add hl, bc add hl, bc add hl, bc ld a, [hl+] ld b, a ; y coordinate ld a, [hl+] ld c, a ; x coordinate ld a, [hl+] ld e, a ; spread value ld hl, $c000 + 3*4 ;call DrawWholeCard ld hl, Coords inc hl ld b, 0 ld a, [vFrameCount3] ld c, a add hl, bc add hl, bc add hl, bc ld a, [hl+] ld b, a ; y coordinate ld a, [hl+] ld c, a ; x coordinate ld a, [hl+] ld e, a ; spread value ld hl, $c000 + 6*4 ;call DrawWholeCard ld hl, Coords inc hl ld b, 0 ld a, [vFrameCount4] ld c, a add hl, bc add hl, bc add hl, bc ld a, [hl+] ld b, a ; y coordinate ld a, [hl+] ld c, a ; x coordinate ld a, [hl+] ld e, a ; spread value ld hl, $c000 + 3*4 call DrawWholeCard MainMenuUpdate_Done: ret MainMenuDraw: ld hl, $9800 + 32*11 + 3 - 64 ld a, [vMenuIndexPrevious] inc a ld b, 0 ld c, 32 .findLastCaret add hl, bc add hl, bc dec a jp nz, .findLastCaret ld [hl], $4 ld hl, $9800 + 32*11 + 3 - 64 ld a, [vMenuIndex] inc a .findNewCaret add hl, bc add hl, bc dec a jp nz, .findNewCaret ld [hl], $80 + $20 + $9 ld a, [vMenuIndex] ld [vMenuIndexPrevious], a ld de, vMenuIndexPrevious+2 ld a, $c0 call RunDMA ld hl, SquaresTiles inc hl ld b, 0 ldh a, [vFrameCountSquares] ld c, a add hl, bc add hl, bc ld c, [hl] inc hl ld b, [hl] ld h, b ld l, c ld de, $8010 ld bc, (SquaresTileset8 - SquaresTileset7) / 8 call CopyRangeUnsafeBy8s ret MainMenuTeardown: ret DrawWholeCard: ; hl memory location, b y, c x, e step, d wiggle ld a, e cp a, 4 jp z, Draw2x2Card jp Draw3x3Card Draw2x2Card: ; hl memory location, b y coord, c x coord, e step, d wiggle ; top-left ld a, c cp a, 88 jp nc, :+ cp a, 78 jp c, :+ jp :++ : ld a, $12 call DrawTile jp :++ : ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a : xor a, a ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a ld a, c add a, e ; addd stride to x add a, e ld c, a cp a, 91 jp nc, :+ cp a, 82 jp c, :+ jp :++ : ld a, $1e call DrawTile jp :++ : ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a : push bc ld b, 0 ld c, 6*4 add hl, bc ; advance by 6 oam slots? pop bc ld a, c sub a, e sub a, e ld c, a ; subtract stridex2 from x ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a push bc ld b, 0 ld c, 6*4 add hl, bc ; advance by 6 oam slots so the other two cards have room pop bc ld a, b add a, e add a, e add a, e add a, e ld b, a ; add stridex2 to y coord ld a, c cp a, 88 jp nc, :+ cp a, 78 jp c, :+ jp :++ : ld a, $16 call DrawTile jp :++ : ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a : ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a ld a, c add a, e add a, e ld c, a cp a, 91 jp nc, :+ cp a, 82 jp c, :+ jp :++ : ld a, $22 call DrawTile jp :++ : ld a, 0 ld [hl+], a ld [hl+], a ld [hl+], a ld [hl+], a : ret Draw3x3Card: ; hl memory location, b y coord, c x coord, e step, d wiggle ; top-left ld a, $12 call DrawTile ld a, c add a, e ; addd stride to x ld c, a ld a, $18 call DrawTile ld a, c add a, e ; add stride to x ld c, a ld a, $1e call DrawTile push bc ld b, 0 ld c, 6*4 add hl, bc ; advance by 6 oam slots? pop bc ld a, b add a, 8 add a, 8 ld b, a ; add 16 to y coord ld a, c sub a, e sub a, e ld c, a ; subtract stridex2 from x ld a, $14 call DrawTile ld a, c add a, e ld c, a ld a, $1a call DrawTile ld a, c add a, e ld c, a ld a, $20 call DrawTile push bc ld b, 0 ld c, 6*4 add hl, bc ; advance by 6 oam slots so the other two cards have room pop bc ld a, b sub a, 8 sub a, 8 add a, e add a, e add a, e add a, e ld b, a ; add stridex2 to y coord ld a, c sub a, e sub a, e ld c, a ; subtract stridex2 from x ld a, $16 call DrawTile ld a, c add a, e ld c, a ld a, $1c call DrawTile ld a, c add a, e ld c, a ld a, $22 call DrawTile ret DrawTile: ; b: y. a: x. d: sprite. hl: location of sprite in OAM inc hl inc hl ld [hl+], a ld a, 0 ld [hl-], a dec hl dec hl ld a, b ld [hl+], a ; y byte ld a, c ld [hl+], a ; x byte inc hl inc hl ret MenuCount: db 3 StringRead: db 10, "Read Cards" StringShuffle: db 7, "Shuffle" StringBrowse: db 11, "Browse Deck" Coords: ; y, x, spread db 255, $1f, $13, $6, $1f, $13, $6, $1f, $13, $6, $1f, $13, $6, $1f, $13, $6, $1f, $13, $6, $1f, $13, $6, $1e, $13, $6, $1e, $14, $6, $1e, $14, $6, $1e, $14, $6, $1e, $14, $7, $1e, $15, $7, $1e, $15, $7, $1e, $16, $7, $1e, $16, $7, $1e, $16, $7, $1e, $17, $7, $1e, $18, $7, $1e, $18, $7, $1e, $19, $7, $1e, $19, $7, $1d, $1a, $7, $1d, $1b, $7, $1d, $1c, $7, $1d, $1c, $7, $1d, $1d, $7, $1d, $1e, $7, $1d, $1f, $7, $1d, $20, $7, $1d, $21, $7, $1d, $22, $7, $1d, $23, $7, $1d, $24, $7, $1d, $25, $7, $1d, $26, $8, $1d, $27, $8, $1d, $28, $8, $1d, $29, $8, $1d, $2a, $8, $1c, $2b, $8, $1c, $2d, $8, $1c, $2e, $8, $1c, $2f, $8, $1c, $30, $8, $1c, $32, $8, $1c, $33, $8, $1c, $34, $8, $1c, $36, $8, $1c, $37, $8, $1c, $38, $8, $1c, $3a, $8, $1c, $3b, $8, $1c, $3c, $8, $1c, $3e, $8, $1c, $3f, $8, $1c, $41, $8, $1c, $42, $8, $1c, $44, $8, $1c, $45, $8, $1c, $46, $8, $1c, $48, $8, $1c, $49, $8, $1c, $4b, $8, $1c, $4c, $8, $1c, $4e, $8, $1c, $4f, $8, $1c, $51, $8, $1c, $52, $8, $1c, $54, $8, $1c, $55, $8, $1c, $57, $8, $1c, $58, $8, $1c, $5a, $8, $1c, $5b, $8, $1c, $5d, $8, $1c, $5e, $8, $1c, $5f, $8, $1c, $61, $8, $1c, $62, $8, $1c, $64, $8, $1c, $65, $8, $1c, $66, $8, $1c, $68, $8, $1c, $69, $8, $1c, $6a, $8, $1c, $6c, $8, $1c, $6d, $8, $1d, $6e, $8, $1d, $70, $8, $1d, $71, $8, $1d, $72, $8, $1d, $73, $8, $1d, $74, $8, $1d, $75, $7, $1d, $77, $7, $1d, $78, $7, $1d, $79, $7, $1d, $7a, $7, $1d, $7b, $7, $1d, $7c, $7, $1d, $7d, $7, $1d, $7e, $7, $1d, $7f, $7, $1d, $80, $7, $1d, $80, $7, $1d, $81, $7, $1e, $82, $7, $1e, $83, $7, $1e, $84, $7, $1e, $84, $7, $1e, $85, $7, $1e, $86, $7, $1e, $86, $7, $1e, $87, $7, $1e, $87, $7, $1e, $88, $7, $1e, $88, $7, $1e, $89, $6, $1e, $89, $6, $1e, $89, $6, $1f, $8a, $6, $1f, $8a, $6, $1f, $8a, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $1f, $8b, $6, $20, $8b, $6, $20, $8a, $6, $20, $8a, $6, $20, $8a, $5, $20, $89, $5, $20, $89, $5, $20, $89, $5, $20, $88, $5, $20, $88, $5, $20, $87, $5, $20, $87, $5, $20, $86, $5, $20, $86, $5, $20, $85, $5, $21, $84, $5, $21, $84, $5, $21, $83, $5, $21, $82, $5, $21, $81, $5, $21, $80, $5, $21, $80, $5, $21, $7f, $5, $21, $7e, $5, $21, $7d, $5, $21, $7c, $5, $21, $7b, $5, $21, $7a, $5, $21, $79, $4, $21, $78, $4, $21, $77, $4, $21, $76, $4, $21, $74, $4, $21, $73, $4, $22, $72, $4, $22, $71, $4, $22, $70, $4, $22, $6e, $4, $22, $6d, $4, $22, $6c, $4, $22, $6a, $4, $22, $69, $4, $22, $68, $4, $22, $66, $4, $22, $65, $4, $22, $64, $4, $22, $62, $4, $22, $61, $4, $22, $5f, $4, $22, $5e, $4, $22, $5d, $4, $22, $5b, $4, $22, $5a, $4, $22, $58, $4, $22, $57, $4, $22, $55, $4, $22, $54, $4, $22, $52, $4, $22, $51, $4, $22, $4f, $4, $22, $4e, $4, $22, $4c, $4, $22, $4b, $4, $22, $49, $4, $22, $48, $4, $22, $47, $4, $22, $45, $4, $22, $44, $4, $22, $42, $4, $22, $41, $4, $22, $3f, $4, $22, $3e, $4, $22, $3c, $4, $22, $3b, $4, $22, $3a, $4, $22, $38, $4, $22, $37, $4, $22, $36, $4, $22, $34, $4, $22, $33, $4, $22, $32, $4, $22, $30, $4, $21, $2f, $4, $21, $2e, $4, $21, $2d, $4, $21, $2b, $4, $21, $2a, $4, $21, $29, $5, $21, $28, $5, $21, $27, $5, $21, $26, $5, $21, $25, $5, $21, $24, $5, $21, $23, $5, $21, $22, $5, $21, $21, $5, $21, $20, $5, $21, $1f, $5, $21, $1e, $5, $21, $1d, $5, $20, $1c, $5, $20, $1c, $5, $20, $1b, $5, $20, $1a, $5, $20, $19, $5, $20, $19, $5, $20, $18, $5, $20, $18, $5, $20, $17, $5, $20, $16, $5, $20, $16, $5, $20, $16, $6, $20, $15, $6, $20, $15, $6, $20, $14, $6, $1f, $14, $6, $1f, $14, $6, $1f, $14, $6, $1f, $13, $6, $1f, $13, $6, $1f, $13, $6 CardBackSprites: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; blank db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; blank db $00,$ff,$7f,$ff,$7f,$ff,$60,$ff,$6f,$ff,$6d,$fa,$6a,$fd,$6d,$fa ; top-left db $6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa ; left db $6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa ; left db $6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa ; left db $6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa,$6a,$fd,$6d,$fa ; left db $6a,$fd,$6d,$fa,$6a,$fd,$6f,$ff,$60,$ff,$7f,$ff,$7f,$ff,$00,$ff ; bottom-left db $00,$ff,$ff,$ff,$ff,$ff,$00,$ff,$ff,$ff,$55,$aa,$aa,$55,$55,$aa ; top db $aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa ; middle db $aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa ; middle db $aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa ; middle db $aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa,$aa,$55,$55,$aa ; middle db $aa,$55,$55,$aa,$aa,$55,$ff,$ff,$00,$ff,$ff,$ff,$ff,$ff,$00,$ff ; bottom db $00,$ff,$fe,$ff,$fe,$ff,$06,$ff,$f6,$ff,$56,$bf,$b6,$5f,$56,$bf ; top-right db $b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf ; right db $b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf ; right db $b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf ; right db $b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf,$b6,$5f,$56,$bf ; right db $b6,$5f,$56,$bf,$b6,$5f,$f6,$ff,$06,$ff,$fe,$ff,$fe,$ff,$00,$ff ; bottom-right CardBackSpritesEnd: SquaresTiles: db 8 dw SquaresTileset1 dw SquaresTileset2 dw SquaresTileset3 dw SquaresTileset4 dw SquaresTileset5 dw SquaresTileset6 dw SquaresTileset7 dw SquaresTileset8 SquaresTileset1: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$aa,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$01,$00,$00,$00,$01,$00,$aa,$00 db $01,$00,$00,$00,$01,$00,$00,$00,$01,$00,$01,$00,$01,$00,$ff,$00 db $01,$00,$01,$00,$01,$00,$01,$00,$03,$00,$01,$00,$ab,$00,$ff,$00 db $03,$00,$01,$00,$03,$00,$01,$00,$03,$00,$01,$00,$ab,$00,$ff,$00 SquaresTileset2: db $00,$00,$00,$00,$00,$00,$80,$00,$00,$00,$00,$00,$00,$00,$80,$00 db $00,$00,$80,$00,$00,$00,$80,$00,$00,$00,$80,$00,$00,$00,$80,$00 db $55,$00,$80,$00,$00,$00,$80,$00,$00,$00,$81,$00,$00,$00,$d5,$00 db $55,$00,$81,$00,$80,$00,$81,$00,$00,$00,$81,$00,$80,$00,$d5,$00 db $ff,$00,$81,$00,$80,$00,$81,$00,$80,$00,$81,$00,$80,$00,$d5,$00 SquaresTileset3: db $00,$00,$00,$00,$00,$00,$00,$00,$80,$00,$00,$00,$00,$00,$00,$00 db $aa,$00,$44,$00,$80,$00,$00,$00,$80,$00,$40,$00,$80,$00,$40,$00 db $ea,$00,$55,$00,$80,$00,$40,$00,$c0,$00,$40,$00,$c0,$00,$40,$00 db $ea,$00,$dd,$00,$c0,$00,$40,$00,$c0,$00,$40,$00,$c0,$00,$40,$00 db $ea,$00,$ff,$00,$c0,$00,$40,$00,$c0,$00,$40,$00,$c0,$00,$40,$00 SquaresTileset4: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$20,$00,$00,$00 db $20,$00,$00,$00,$aa,$00,$00,$00,$20,$00,$40,$00,$20,$00,$00,$00 db $20,$00,$55,$00,$aa,$00,$40,$00,$20,$00,$40,$00,$20,$00,$40,$00 db $20,$00,$55,$00,$ff,$00,$60,$00,$20,$00,$60,$00,$20,$00,$60,$00 db $20,$00,$75,$00,$ff,$00,$60,$00,$20,$00,$60,$00,$20,$00,$60,$00 SquaresTileset5: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$20,$00,$00,$00 db $20,$00,$00,$00,$aa,$00,$11,$00,$20,$00,$10,$00,$20,$00,$10,$00 db $20,$00,$10,$00,$aa,$00,$55,$00,$20,$00,$10,$00,$30,$00,$10,$00 db $30,$00,$10,$00,$ba,$00,$77,$00,$30,$00,$10,$00,$30,$00,$10,$00 db $30,$00,$10,$00,$ba,$00,$ff,$00,$30,$00,$10,$00,$30,$00,$10,$00 SquaresTileset6: db $00,$00,$00,$00,$00,$00,$00,$00,$88,$00,$00,$00,$00,$00,$00,$00 db $08,$00,$00,$00,$08,$00,$11,$00,$aa,$00,$10,$00,$08,$00,$10,$00 db $08,$00,$10,$00,$08,$00,$55,$00,$ff,$00,$10,$00,$08,$00,$10,$00 db $08,$00,$18,$00,$08,$00,$55,$00,$ff,$00,$18,$00,$08,$00,$18,$00 db $08,$00,$18,$00,$08,$00,$5d,$00,$ff,$00,$18,$00,$08,$00,$18,$00 SquaresTileset7: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 db $00,$00,$00,$00,$00,$00,$00,$00,$88,$00,$00,$00,$00,$00,$00,$00 db $08,$00,$04,$00,$08,$00,$00,$00,$aa,$00,$55,$00,$08,$00,$04,$00 db $0c,$00,$04,$00,$08,$00,$04,$00,$ae,$00,$55,$00,$0c,$00,$04,$00 db $0c,$00,$04,$00,$0c,$00,$04,$00,$ae,$00,$ff,$00,$0c,$00,$04,$00 SquaresTileset8: db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$22,$00,$00,$00 db $02,$00,$00,$00,$02,$00,$00,$00,$02,$00,$55,$00,$aa,$00,$04,$00 db $02,$00,$04,$00,$02,$00,$04,$00,$02,$00,$55,$00,$ff,$00,$04,$00 db $02,$00,$04,$00,$02,$00,$06,$00,$02,$00,$57,$00,$ff,$00,$06,$00 db $02,$00,$06,$00,$02,$00,$06,$00,$02,$00,$57,$00,$ff,$00,$06,$00 SquaresTilesetEnd: SquaresTilemap: db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 db $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01 db $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01 db $02, $02, $02, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $02, $02, $02 db $03, $02, $02, $02, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $02, $02, $02, $03 db $04, $03, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $04 db $05, $04, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $05 db $05, $05, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $05 db $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 db $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 db $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 db $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 db $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 db $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 db $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05 SquaresTilemapEnd: