;;-----------------------------LICENSE NOTICE------------------------------------
;;  This file is part of Dragon Attack - An entry for CPCRetroDev2016
;;  Copyright (C) 2016  Paul Kooistra
;;
;;  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 <http://www.gnu.org/licenses/>.
;;
;;  For questions about the source you can PM me, Axelay, on the CPCWiki forums
;;-------------------------------------------------------------------------------
; this source contains compiled sprite frames for player sprite, both left and right shifted versions
; These routines called with SP pointing to screen address list pregenerated for current player
; position and IY holding the return address

; black player ship with narrow nose
.PlayerLeft
;db #00,#a0,#00,#00,#a0,#00
    pop hl
    inc l
    ld a,(hl)
    or a,&a0
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&a0
    ld (hl),a
;,#00,#a0,#00,#00,#a0,#00
    pop hl
    inc l
    ld a,(hl)
    or a,&a0
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&a0
    ld (hl),a
;db #00,#80,#00,#50,#f0,#00
    pop hl
    inc l
    ld a,(hl)
    or a,&80
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&f0
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&50
    ld (hl),a
;,#40,#40,#00,#e0,#60,#a0
    pop hl
    ld a,(hl)
    or a,&40
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&40
    ld (hl),a
    inc l
    set 3,h
    ld a,(hl)
    or a,&a0
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&60
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&e0
    ld (hl),a

;db #c0,#60,#80,#d0,#50,#80
    pop hl
    ld a,(hl)
    or a,&c0
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&60
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&80
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&80
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&50
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&d0
    ld (hl),a
;,#40,#c0,#00,#00,#80,#00
    pop hl
    ld a,(hl)
    or a,&40
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&c0
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&80
    ld (hl),a
    jp (iy)

.PlayerRight
;db #00,#50,#00,#00,#50,#00
    pop hl
    inc l
    ld a,(hl)
    or a,&50
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&50
    ld (hl),a
;,#00,#50,#00,#00,#50,#00
    pop hl
    inc l
    ld a,(hl)
    or a,&50
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&50
    ld (hl),a
;db #00,#40,#00,#00,#f0,#a0
    pop hl
    inc l
    ld a,(hl)
    or a,&40
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&f0
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&a0
    ld (hl),a
;,#00,#80,#80,#50,#90,#d0
    pop hl
    inc l
    ld a,(hl)
    or a,&80
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&80
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&d0
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&90
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&50
    ld (hl),a
;db #40,#90,#c0,#40,#a0,#e0
    pop hl
    ld a,(hl)
    or a,&40
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&90
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&c0
    ld (hl),a
    set 3,h
    ld a,(hl)
    or a,&e0
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&a0
    ld (hl),a
    dec l
    ld a,(hl)
    or a,&40
    ld (hl),a
;,#00,#c0,#80,#00,#40,#00
    pop hl
    inc l
    ld a,(hl)
    or a,&c0
    ld (hl),a
    inc l
    ld a,(hl)
    or a,&80
    ld (hl),a
    set 3,h
    dec l
    ld a,(hl)
    or a,&40
    ld (hl),a
    jp (iy)
