;=================================================================
; [enemies.inc] -- Enemy handling for Stage1 and shiat..
;                  These routines are mostly uncommented, but
;                  fairly straight-forward at the least ;)
;
; Another file (C) krSoftware ~ This version v.990217
;=================================================================

; stuffo zat remains to implement .. : magica, hp
; oops! they won't be implemented hahahaaha!!!
; 'speed' is halfway implemented, but no one cares, haha! ^.^


ENM_resetVars
    ldx #$0000                  ; x,y
    stx SPRBUF1+SX13
    stx SPRBUF1+SY13
    stx SPRBUF1+SX14
    stx SPRBUF1+SY14
    stx SPRBUF1+SX15
    stx SPRBUF1+SY15
    stx SPRBUF1+SX16
    stx SPRBUF1+SY16
    stx SPRBUF1+SX17
    stx SPRBUF1+SY17
    stx SPRBUF1+SX18
    stx SPRBUF1+SY18

    stz ENM_13_alive
    stz ENM_14_alive
    stz ENM_15_alive
    stz ENM_16_alive
    stz ENM_17_alive
    stz ENM_18_alive

;   stz ENM_13_hp               ; hp
;   stz ENM_14_hp
;   stz ENM_15_hp
;   stz ENM_16_hp
;   stz ENM_17_hp
;   stz ENM_18_hp

    stz ENM_13_speed            ; sp
    stz ENM_14_speed
    stz ENM_15_speed
    stz ENM_16_speed
    stz ENM_17_speed
    stz ENM_18_speed

    stz ENM_13_numfr            ; numfr
    stz ENM_14_numfr
    stz ENM_15_numfr
    stz ENM_16_numfr
    stz ENM_17_numfr
    stz ENM_18_numfr

    stz ENM_13_f1               ; f1,f2,f3
    stz ENM_13_f2
    stz ENM_13_f3
    stz ENM_14_f1
    stz ENM_14_f2
    stz ENM_14_f3
    stz ENM_15_f1
    stz ENM_15_f2
    stz ENM_15_f3
    stz ENM_16_f1
    stz ENM_16_f2
    stz ENM_16_f3
    stz ENM_17_f1
    stz ENM_17_f2
    stz ENM_17_f3
    stz ENM_18_f1
    stz ENM_18_f2
    stz ENM_18_f3

    stz ENM_13_patt             ; pattern
    stz ENM_14_patt
    stz ENM_15_patt
    stz ENM_16_patt
    stz ENM_17_patt
    stz ENM_18_patt

    stz ENM_13_wait             ; wait time
    stz ENM_14_wait
    stz ENM_15_wait
    stz ENM_16_wait
    stz ENM_17_wait
    stz ENM_18_wait

;   stz ENM_13_magica           ; magical appearance (bool of courze!)
;   stz ENM_14_magica
;   stz ENM_15_magica
;   stz ENM_16_magica
;   stz ENM_17_magica
;   stz ENM_18_magica

    stz ENM_13_leftRight        ; left or right thee wantzts to gau?
    stz ENM_14_leftRight
    stz ENM_15_leftRight
    stz ENM_16_leftRight
    stz ENM_17_leftRight
    stz ENM_18_leftRight

    stz ENM_13_pattNum          ; pattern numbah
    stz ENM_14_pattNum
    stz ENM_15_pattNum
    stz ENM_16_pattNum
    stz ENM_17_pattNum
    stz ENM_18_pattNum

;---------
    stz ENM_patternCounter

    rts


;================================


ENM_enableEnemyKa
    lda ENM_13_alive            ; is enemy alive ?
    cmp #$00
    bne ENM_eEK_14              ; yes, indeed!
    lda ENM_wait_counter
    cmp ENM_13_wait             ; time to awaken ze enemi, mjyaah?
    bmi ENM_eEK_14
    lda #$01
    sta ENM_13_alive            ; zut-zut!!
    stz waitBeforeYouGoGo

ENM_eEK_14
    lda ENM_14_alive
    cmp #$00
    bne ENM_eEK_15
    lda ENM_wait_counter
    cmp ENM_14_wait
    bmi ENM_eEK_15
    lda #$01
    sta ENM_14_alive

ENM_eEK_15
    lda ENM_15_alive
    cmp #$00
    bne ENM_eEK_16
    lda ENM_wait_counter
    cmp ENM_15_wait
    bmi ENM_eEK_16
    lda #$01
    sta ENM_15_alive

ENM_eEK_16
    lda ENM_16_alive
    cmp #$00
    bne ENM_eEK_17
    lda ENM_wait_counter
    cmp ENM_16_wait
    bmi ENM_eEK_17
    lda #$01
    sta ENM_16_alive

ENM_eEK_17
    lda ENM_17_alive
    cmp #$00
    bne ENM_eEK_18
    lda ENM_wait_counter
    cmp ENM_17_wait
    bmi ENM_eEK_18
    lda #$01
    sta ENM_17_alive

ENM_eEK_18
    lda ENM_18_alive
    cmp #$00
    bne ENM_eEK_endoBendo
    lda ENM_wait_counter
    cmp ENM_18_wait
    bmi ENM_eEK_endoBendo
    lda #$01
    sta ENM_18_alive

ENM_eEK_endoBendo
    rts


;================================

; has any enemies/aliens made it to Tellus?

ENM_checkEnemiesPassed
    lda ENM_13_dead
    cmp #$01
    beq ENM_cEP_14

    lda ENM_13_leftRight
    cmp #$01
    beq ENM_cEP_13_chkR         ; enemy is going towards right

    lda SPRBUF1+SX13
    cmp #$01
    beq ENM_cEP_punishPl13
    jmp ENM_cEP_14

ENM_cEP_13_chkR
    lda SPRBUF1+SX13
    cmp #$FE
    beq ENM_cEP_punishPl13
    jmp ENM_cEP_14

ENM_cEP_punishPl13
    lda #$00
    sta SPRBUF1+SX13
    sta SPRBUF1+SY13
    lda #$CC
    sta CURFRAME13
    lda #$01
    sta ENM_13_dead
    jsl HP_DROP
    inc ENM_killCounter


ENM_cEP_14
    lda ENM_14_dead
    cmp #$01
    beq ENM_cEP_15

    lda ENM_14_leftRight
    cmp #$01
    beq ENM_cEP_14_chkR         ; enemy is going towards right

    lda SPRBUF1+SX14
    cmp #$01
    beq ENM_cEP_punishPl14
    jmp ENM_cEP_15

ENM_cEP_14_chkR
    lda SPRBUF1+SX14
    cmp #$FE
    beq ENM_cEP_punishPl14
    jmp ENM_cEP_15

ENM_cEP_punishPl14
    lda #$00
    sta SPRBUF1+SX14
    sta SPRBUF1+SY14
    lda #$CC
    sta CURFRAME14
    lda #$01
    sta ENM_14_dead
    jsl HP_DROP
    inc ENM_killCounter


ENM_cEP_15
    lda ENM_15_dead
    cmp #$01
    beq ENM_cEP_16

    lda ENM_15_leftRight
    cmp #$01
    beq ENM_cEP_15_chkR         ; enemy is going towards right

    lda SPRBUF1+SX15
    cmp #$01
    beq ENM_cEP_punishPl15
    jmp ENM_cEP_16

ENM_cEP_15_chkR
    lda SPRBUF1+SX15
    cmp #$FE
    beq ENM_cEP_punishPl15
    jmp ENM_cEP_16

ENM_cEP_punishPl15
    lda #$00
    sta SPRBUF1+SX15
    sta SPRBUF1+SY15
    lda #$CC
    sta CURFRAME15
    lda #$01
    sta ENM_15_dead
    jsl HP_DROP
    inc ENM_killCounter


ENM_cEP_16
    lda ENM_16_dead
    cmp #$01
    beq ENM_cEP_17

    lda ENM_16_leftRight
    cmp #$01
    beq ENM_cEP_16_chkR         ; enemy is going towards right

    lda SPRBUF1+SX16
    cmp #$01
    beq ENM_cEP_punishPl16
    jmp ENM_cEP_17

ENM_cEP_16_chkR
    lda SPRBUF1+SX16
    cmp #$FE
    beq ENM_cEP_punishPl16
    jmp ENM_cEP_17

ENM_cEP_punishPl16
    lda #$00
    sta SPRBUF1+SX16
    sta SPRBUF1+SY16
    lda #$CC
    sta CURFRAME16
    lda #$01
    sta ENM_16_dead
    jsl HP_DROP
    inc ENM_killCounter


ENM_cEP_17
    lda ENM_17_dead
    cmp #$01
    beq ENM_cEP_done

    lda ENM_17_leftRight
    cmp #$01
    beq ENM_cEP_17_chkR         ; enemy is going towards right

    lda SPRBUF1+SX17
    cmp #$01
    beq ENM_cEP_punishPl17
    jmp ENM_cEP_done

ENM_cEP_17_chkR
    lda SPRBUF1+SX17
    cmp #$FE
    beq ENM_cEP_punishPl17
    jmp ENM_cEP_done

ENM_cEP_punishPl17
    lda #$00
    sta SPRBUF1+SX17
    sta SPRBUF1+SY17
    lda #$CC
    sta CURFRAME17
    lda #$01
    sta ENM_17_dead
    jsl HP_DROP
    inc ENM_killCounter

ENM_cEP_done
    rts

;================================


ENM_moveShiat                   ; move enemies 'n stuff ;-)
    lda ENEMY_ALIVE_DEBUG
    cmp #$01
    beq ENM_dS_noCunty

    inc ENM_wait_delay
    lda ENM_wait_delay
    cmp #$10 ;#$10
    bmi ENM_dS_noCunty
    stz ENM_wait_delay          ; dèja vu!
    lda ENM_wait_counter
    cmp #$7a
    beq ENM_dS_noCunty
    inc ENM_wait_counter
    jsr ENM_enableEnemyKa

ENM_dS_noCunty
    phx
;   lda ENM_13_alive
;   cmp #$00
;   beq ENM_dS_speed_14
;   lda SPRBUF1+SX13
;   ldx ENM_13_speed
;ENM_dS_speed_13_loop
;               -- FØLGENDE KODE ER KOMMENTERT UT GRUNNET
;                            EKSPERIMENTERING AV PATTERNS --
;   lda ENM_13_leftRight
;   cmp #$00
;   bne ENM_dS_speed_13_notLeft
;   lda SPRBUF1+SX13
;   dea
;   jmp ENM_dS_speed_13_leftyRox
;ENM_dS_speed_13_notLeft
;   lda SPRBUF1+SX13
;   ina
;ENM_dS_speed_13_leftyRox

;   dex
;   cpx #$0000
;   bne ENM_dS_speed_13_loop
;   sta SPRBUF1+SX13
    lda ENM_13_dead
    cmp #$01
    beq ENM_dS_speed_14
    lda ENM_13_alive
    cmp #$00
    beq ENM_dS_speed_14
    lda SPRBUF1+SX13
    ldx ENM_13_speed
ENM_dS_speed_13_loop
    lda ENM_13_leftRight
    cmp #$00
    bne ENM_dS_speed_13_notLeft
    lda SPRBUF1+SX13
    dea
    jmp ENM_dS_speed_13_leftyRox
ENM_dS_speed_13_notLeft
    lda SPRBUF1+SX13
    ina
ENM_dS_speed_13_leftyRox
    dex
    cpx #$0000
    bne ENM_dS_speed_13_loop
    sta SPRBUF1+SX13

ENM_dS_speed_14
    lda ENM_14_dead
    cmp #$01
    beq ENM_dS_speed_15

    lda ENM_14_alive
    cmp #$00
    beq ENM_dS_speed_15
    lda SPRBUF1+SX14
    ldx ENM_14_speed
ENM_dS_speed_14_loop
    lda ENM_14_leftRight
    cmp #$00
    bne ENM_dS_speed_14_notLeft
    lda SPRBUF1+SX14
    dea
    jmp ENM_dS_speed_14_leftyRox
ENM_dS_speed_14_notLeft
    lda SPRBUF1+SX14
    ina
ENM_dS_speed_14_leftyRox
    dex
    cpx #$0000
    bne ENM_dS_speed_14_loop
    sta SPRBUF1+SX14

ENM_dS_speed_15
    lda ENM_15_dead
    cmp #$01
    beq ENM_dS_speed_16

    lda ENM_15_alive
    cmp #$00
    beq ENM_dS_speed_16
    lda SPRBUF1+SX15
    ldx ENM_15_speed
ENM_dS_speed_15_loop
    lda ENM_15_leftRight
    cmp #$00
    bne ENM_dS_speed_15_notLeft
    lda SPRBUF1+SX15
    dea
    jmp ENM_dS_speed_15_leftyRox
ENM_dS_speed_15_notLeft
    lda SPRBUF1+SX15
    ina
ENM_dS_speed_15_leftyRox
    dex
    cpx #$0000
    bne ENM_dS_speed_15_loop
    sta SPRBUF1+SX15

ENM_dS_speed_16
    lda ENM_16_dead
    cmp #$01
    beq ENM_dS_speed_17

    lda ENM_16_alive
    cmp #$00
    beq ENM_dS_speed_17
    lda SPRBUF1+SX16
    ldx ENM_16_speed
ENM_dS_speed_16_loop
    lda ENM_16_leftRight
    cmp #$00
    bne ENM_dS_speed_16_notLeft
    lda SPRBUF1+SX16
    dea
    jmp ENM_dS_speed_16_leftyRox
ENM_dS_speed_16_notLeft
    lda SPRBUF1+SX16
    ina
ENM_dS_speed_16_leftyRox
    dex
    cpx #$0000
    bne ENM_dS_speed_16_loop
    sta SPRBUF1+SX16

ENM_dS_speed_17
    lda ENM_17_dead
    cmp #$01
    beq ENM_dS_speed_18

    lda ENM_17_alive
    cmp #$00
    beq ENM_dS_speed_18
    lda SPRBUF1+SX17
    ldx ENM_17_speed
ENM_dS_speed_17_loop
    lda ENM_17_leftRight
    cmp #$00
    bne ENM_dS_speed_17_notLeft
    lda SPRBUF1+SX17
    dea
    jmp ENM_dS_speed_17_leftyRox
ENM_dS_speed_17_notLeft
    lda SPRBUF1+SX17
    ina
ENM_dS_speed_17_leftyRox
    dex
    cpx #$0000
    bne ENM_dS_speed_17_loop
    sta SPRBUF1+SX17

ENM_dS_speed_18
    lda ENM_18_alive
    cmp #$00
    beq ENM_dS_finito
    lda SPRBUF1+SX18
    ldx ENM_18_speed
ENM_dS_speed_18_loop
    lda ENM_18_leftRight
    cmp #$00
    bne ENM_dS_speed_18_notLeft
    lda SPRBUF1+SX18
    dea
    jmp ENM_dS_speed_18_leftyRox
ENM_dS_speed_18_notLeft
    lda SPRBUF1+SX18
    ina
ENM_dS_speed_18_leftyRox
    dex
    cpx #$0000
    bne ENM_dS_speed_18_loop
    sta SPRBUF1+SX18

ENM_dS_finito
    plx
    jsr ENM_patternUpdate
    rts


;================================


ENM_animateShiat                ; animate baddies
    lda ENM_13_dead
    cmp #$01
    beq ENM_aS_13_blank
    lda ENM_13_alive
    cmp #$00
    beq ENM_aS_14

    lda ENM_13_numfr
    cmp #$02
    beq ENM_aS_13_3fr
    cmp #$01
    beq ENM_aS_13_2fr
    jmp ENM_aS_13_1fr

ENM_aS_13_blank
    lda #$00
    sta SPRBUF1+SX13
    sta SPRBUF1+SY13
    lda #$CC
    sta CURFRAME13
    jmp ENM_aS_14

ENM_aS_13_3fr
    lda anm_flag1
    cmp #$02
    beq ENM_aS_13_3fr_02
    cmp #$01
    beq ENM_aS_13_3fr_01
    jmp ENM_aS_13_3fr_00
ENM_aS_13_3fr_02
    lda ENM_13_f3
    sta CURFRAME13
    jmp ENM_aS_14
ENM_aS_13_3fr_01
    lda ENM_13_f2
    sta CURFRAME13
    jmp ENM_aS_14
ENM_aS_13_3fr_00
    lda ENM_13_f1
    sta CURFRAME13
    jmp ENM_aS_14

ENM_aS_13_2fr
    lda anm_flag0
    cmp #$01
    beq ENM_aS_13_2fr_01
    lda ENM_13_f1
    sta CURFRAME13
    jmp ENM_aS_14
ENM_aS_13_2fr_01
    lda ENM_13_f2
    sta CURFRAME13
    jmp ENM_aS_14

ENM_aS_13_1fr
    lda ENM_13_f1
    sta CURFRAME13
;-------------
ENM_aS_14
    lda ENM_14_dead
    cmp #$01
    beq ENM_aS_14_blank
    lda ENM_14_alive
    cmp #$00
    beq ENM_aS_15

    lda ENM_14_numfr
    cmp #$02
    beq ENM_aS_14_3fr
    cmp #$01
    beq ENM_aS_14_2fr
    jmp ENM_aS_14_1fr

ENM_aS_14_blank
    lda #$00
    sta SPRBUF1+SX14
    sta SPRBUF1+SY14
    lda #$CC
    sta CURFRAME14
    jmp ENM_aS_15

ENM_aS_14_3fr
    lda anm_flag1
    cmp #$02
    beq ENM_aS_14_3fr_02
    cmp #$01
    beq ENM_aS_14_3fr_01
    jmp ENM_aS_14_3fr_00
ENM_aS_14_3fr_02
    lda ENM_14_f3
    sta CURFRAME14
    jmp ENM_aS_15
ENM_aS_14_3fr_01
    lda ENM_14_f2
    sta CURFRAME14
    jmp ENM_aS_15
ENM_aS_14_3fr_00
    lda ENM_14_f1
    sta CURFRAME14
    jmp ENM_aS_15

ENM_aS_14_2fr
    lda anm_flag0
    cmp #$01
    beq ENM_aS_14_2fr_01
    lda ENM_14_f1
    sta CURFRAME14
    jmp ENM_aS_15
ENM_aS_14_2fr_01
    lda ENM_14_f2
    sta CURFRAME14
    jmp ENM_aS_15

ENM_aS_14_1fr
    lda ENM_14_f1
    sta CURFRAME14
;-------------
ENM_aS_15
    lda ENM_15_dead
    cmp #$01
    beq ENM_aS_15_blank
    lda ENM_15_alive
    cmp #$00
    beq ENM_aS_16

    lda ENM_15_numfr
    cmp #$02
    beq ENM_aS_15_3fr
    cmp #$01
    beq ENM_aS_15_2fr
    jmp ENM_aS_15_1fr

ENM_aS_15_blank
    lda #$00
    sta SPRBUF1+SX15
    sta SPRBUF1+SY15
    lda #$CC
    sta CURFRAME15
    jmp ENM_aS_16

ENM_aS_15_3fr
    lda anm_flag1
    cmp #$02
    beq ENM_aS_15_3fr_02
    cmp #$01
    beq ENM_aS_15_3fr_01
    jmp ENM_aS_15_3fr_00
ENM_aS_15_3fr_02
    lda ENM_15_f3
    sta CURFRAME15
    jmp ENM_aS_16
ENM_aS_15_3fr_01
    lda ENM_15_f2
    sta CURFRAME15
    jmp ENM_aS_16
ENM_aS_15_3fr_00
    lda ENM_15_f1
    sta CURFRAME15
    jmp ENM_aS_16

ENM_aS_15_2fr
    lda anm_flag0
    cmp #$01
    beq ENM_aS_15_2fr_01
    lda ENM_15_f1
    sta CURFRAME15
    jmp ENM_aS_16
ENM_aS_15_2fr_01
    lda ENM_15_f2
    sta CURFRAME15
    jmp ENM_aS_16

ENM_aS_15_1fr
    lda ENM_15_f1
    sta CURFRAME15
;-------------
ENM_aS_16
    lda ENM_16_dead
    cmp #$01
    beq ENM_aS_16_blank
    lda ENM_16_alive
    cmp #$00
    beq ENM_aS_17

    lda ENM_16_numfr
    cmp #$02
    beq ENM_aS_16_3fr
    cmp #$01
    beq ENM_aS_16_2fr
    jmp ENM_aS_16_1fr

ENM_aS_16_blank
    lda #$00
    sta SPRBUF1+SX16
    sta SPRBUF1+SY16
    lda #$CC
    sta CURFRAME16
    jmp ENM_aS_17

ENM_aS_16_3fr
    lda anm_flag1
    cmp #$02
    beq ENM_aS_16_3fr_02
    cmp #$01
    beq ENM_aS_16_3fr_01
    jmp ENM_aS_16_3fr_00
ENM_aS_16_3fr_02
    lda ENM_16_f3
    sta CURFRAME16
    jmp ENM_aS_17
ENM_aS_16_3fr_01
    lda ENM_16_f2
    sta CURFRAME16
    jmp ENM_aS_17
ENM_aS_16_3fr_00
    lda ENM_16_f1
    sta CURFRAME16
    jmp ENM_aS_17

ENM_aS_16_2fr
    lda anm_flag0
    cmp #$01
    beq ENM_aS_16_2fr_01
    lda ENM_16_f1
    sta CURFRAME16
    jmp ENM_aS_17
ENM_aS_16_2fr_01
    lda ENM_16_f2
    sta CURFRAME16
    jmp ENM_aS_17

ENM_aS_16_1fr
    lda ENM_16_f1
    sta CURFRAME16
;-------------
ENM_aS_17
    lda ENM_17_dead
    cmp #$01
    beq ENM_aS_17_blank
    lda ENM_17_alive
    cmp #$00
    beq ENM_aS_18

    lda ENM_17_numfr
    cmp #$02
    beq ENM_aS_17_3fr
    cmp #$01
    beq ENM_aS_17_2fr
    jmp ENM_aS_17_1fr

ENM_aS_17_blank
    lda #$00
    sta SPRBUF1+SX17
    sta SPRBUF1+SY17
    lda #$CC
    sta CURFRAME17
    jmp ENM_aS_18

ENM_aS_17_3fr
    lda anm_flag1
    cmp #$02
    beq ENM_aS_17_3fr_02
    cmp #$01
    beq ENM_aS_17_3fr_01
    jmp ENM_aS_17_3fr_00
ENM_aS_17_3fr_02
    lda ENM_17_f3
    sta CURFRAME17
    jmp ENM_aS_18
ENM_aS_17_3fr_01
    lda ENM_17_f2
    sta CURFRAME17
    jmp ENM_aS_18
ENM_aS_17_3fr_00
    lda ENM_17_f1
    sta CURFRAME17
    jmp ENM_aS_18

ENM_aS_17_2fr
    lda anm_flag0
    cmp #$01
    beq ENM_aS_17_2fr_01
    lda ENM_17_f1
    sta CURFRAME17
    jmp ENM_aS_18
ENM_aS_17_2fr_01
    lda ENM_17_f2
    sta CURFRAME17
    jmp ENM_aS_18

ENM_aS_17_1fr
    lda ENM_17_f1
    sta CURFRAME17
;-------------
ENM_aS_18
    lda ENM_18_alive
    cmp #$00
    beq ENM_aS_sayonara

    lda ENM_18_numfr
    cmp #$02
    beq ENM_aS_18_3fr
    cmp #$01
    beq ENM_aS_18_2fr
    jmp ENM_aS_18_1fr

ENM_aS_18_3fr
    lda anm_flag1
    cmp #$02
    beq ENM_aS_18_3fr_02
    cmp #$01
    beq ENM_aS_18_3fr_01
    jmp ENM_aS_18_3fr_00
ENM_aS_18_3fr_02
    lda ENM_18_f3
    sta CURFRAME18
    jmp ENM_aS_sayonara
ENM_aS_18_3fr_01
    lda ENM_18_f2
    sta CURFRAME18
    jmp ENM_aS_sayonara
ENM_aS_18_3fr_00
    lda ENM_18_f1
    sta CURFRAME18
    jmp ENM_aS_sayonara

ENM_aS_18_2fr
    lda anm_flag0
    cmp #$01
    beq ENM_aS_18_2fr_01
    lda ENM_18_f1
    sta CURFRAME18
    jmp ENM_aS_sayonara
ENM_aS_18_2fr_01
    lda ENM_18_f2
    sta CURFRAME18
    jmp ENM_aS_sayonara

ENM_aS_18_1fr
    lda ENM_18_f1
    sta CURFRAME18

ENM_aS_sayonara
    lda #$00
    rts


;================================


ENM_initWave
    stz ENM_killCounter
    stz ENM_13_dead
    stz ENM_14_dead
    stz ENM_15_dead
    stz ENM_16_dead
    stz ENM_17_dead

    stz SPRBUF1+SPRIORITY13
    stz SPRBUF1+SPRIORITY14
    stz SPRBUF1+SPRIORITY15
    stz SPRBUF1+SPRIORITY16
    stz SPRBUF1+SPRIORITY17

    ldy #$0000                  ; data byte countah

ENM_iwDoThaJob
    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SX13
    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SY13
    jsr ENM_iwDoTheLDA
    sta ENM_13_alive
    jsr ENM_iwDoTheLDA
;   sta ENM_13_hp
    jsr ENM_iwDoTheLDA
    sta ENM_13_speed
    jsr ENM_iwDoTheLDA
    sta ENM_13_numfr
    jsr ENM_iwDoTheLDA
    sta ENM_13_f1
    jsr ENM_iwDoTheLDA
    sta ENM_13_f2
    jsr ENM_iwDoTheLDA
    sta ENM_13_f3
    jsr ENM_iwDoTheLDA
    sta ENM_13_patt
    jsr ENM_iwDoTheLDA
    sta ENM_13_wait
    jsr ENM_iwDoTheLDA
;   sta ENM_13_magica
    jsr ENM_iwDoTheLDA
    sta ENM_13_leftRight
    jsr ENM_iwDoTheLDA
    sta ENM_13_pattNum

    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SX14
    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SY14
    jsr ENM_iwDoTheLDA
    sta ENM_14_alive
    jsr ENM_iwDoTheLDA
;   sta ENM_14_hp
    jsr ENM_iwDoTheLDA
    sta ENM_14_speed
    jsr ENM_iwDoTheLDA
    sta ENM_14_numfr
    jsr ENM_iwDoTheLDA
    sta ENM_14_f1
    jsr ENM_iwDoTheLDA
    sta ENM_14_f2
    jsr ENM_iwDoTheLDA
    sta ENM_14_f3
    jsr ENM_iwDoTheLDA
    sta ENM_14_patt
    jsr ENM_iwDoTheLDA
    sta ENM_14_wait
    jsr ENM_iwDoTheLDA
;   sta ENM_14_magica
    jsr ENM_iwDoTheLDA
    sta ENM_14_leftRight
    jsr ENM_iwDoTheLDA
    sta ENM_14_pattNum

    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SX15
    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SY15
    jsr ENM_iwDoTheLDA
    sta ENM_15_alive
    jsr ENM_iwDoTheLDA
;   sta ENM_15_hp
    jsr ENM_iwDoTheLDA
    sta ENM_15_speed
    jsr ENM_iwDoTheLDA
    sta ENM_15_numfr
    jsr ENM_iwDoTheLDA
    sta ENM_15_f1
    jsr ENM_iwDoTheLDA
    sta ENM_15_f2
    jsr ENM_iwDoTheLDA
    sta ENM_15_f3
    jsr ENM_iwDoTheLDA
    sta ENM_15_patt
    jsr ENM_iwDoTheLDA
    sta ENM_15_wait
    jsr ENM_iwDoTheLDA
;   sta ENM_15_magica
    jsr ENM_iwDoTheLDA
    sta ENM_15_leftRight
    jsr ENM_iwDoTheLDA
    sta ENM_15_pattNum

    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SX16
    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SY16
    jsr ENM_iwDoTheLDA
    sta ENM_16_alive
    jsr ENM_iwDoTheLDA
;   sta ENM_16_hp
    jsr ENM_iwDoTheLDA
    sta ENM_16_speed
    jsr ENM_iwDoTheLDA
    sta ENM_16_numfr
    jsr ENM_iwDoTheLDA
    sta ENM_16_f1
    jsr ENM_iwDoTheLDA
    sta ENM_16_f2
    jsr ENM_iwDoTheLDA
    sta ENM_16_f3
    jsr ENM_iwDoTheLDA
    sta ENM_16_patt
    jsr ENM_iwDoTheLDA
    sta ENM_16_wait
    jsr ENM_iwDoTheLDA
;   sta ENM_16_magica
    jsr ENM_iwDoTheLDA
    sta ENM_16_leftRight
    jsr ENM_iwDoTheLDA
    sta ENM_16_pattNum

    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SX17
    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SY17
    jsr ENM_iwDoTheLDA
    sta ENM_17_alive
    jsr ENM_iwDoTheLDA
;   sta ENM_17_hp
    jsr ENM_iwDoTheLDA
    sta ENM_17_speed
    jsr ENM_iwDoTheLDA
    sta ENM_17_numfr
    jsr ENM_iwDoTheLDA
    sta ENM_17_f1
    jsr ENM_iwDoTheLDA
    sta ENM_17_f2
    jsr ENM_iwDoTheLDA
    sta ENM_17_f3
    jsr ENM_iwDoTheLDA
    sta ENM_17_patt
    jsr ENM_iwDoTheLDA
    sta ENM_17_wait
    jsr ENM_iwDoTheLDA
;   sta ENM_17_magica
    jsr ENM_iwDoTheLDA
    sta ENM_17_leftRight
    jsr ENM_iwDoTheLDA
    sta ENM_17_pattNum

    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SX18
    jsr ENM_iwDoTheLDA
    sta SPRBUF1+SY18
    jsr ENM_iwDoTheLDA
    sta ENM_18_alive
    jsr ENM_iwDoTheLDA
;   sta ENM_18_hp
    jsr ENM_iwDoTheLDA
    sta ENM_18_speed
    jsr ENM_iwDoTheLDA
    sta ENM_18_numfr
    jsr ENM_iwDoTheLDA
    sta ENM_18_f1
    jsr ENM_iwDoTheLDA
    sta ENM_18_f2
    jsr ENM_iwDoTheLDA
    sta ENM_18_f3
    jsr ENM_iwDoTheLDA
    sta ENM_18_patt
    jsr ENM_iwDoTheLDA
    sta ENM_18_wait
    jsr ENM_iwDoTheLDA
;   sta ENM_18_magica
    jsr ENM_iwDoTheLDA
    sta ENM_18_leftRight
    jsr ENM_iwDoTheLDA
    sta ENM_18_pattNum

    ;------                     ; horizontally flip enemies if needed
    lda ENM_13_leftRight
    cmp #$01
    bne ENM_iwDoTheLDA_f14
    lda #%01000000
    sta SPRBUF1+SPRIORITY13
ENM_iwDoTheLDA_f14
    lda ENM_14_leftRight
    cmp #$01
    bne ENM_iwDoTheLDA_f15
    lda #%01000000
    sta SPRBUF1+SPRIORITY14
ENM_iwDoTheLDA_f15
    lda ENM_15_leftRight
    cmp #$01
    bne ENM_iwDoTheLDA_f16
    lda #%01000000
    sta SPRBUF1+SPRIORITY15
ENM_iwDoTheLDA_f16
    lda ENM_16_leftRight
    cmp #$01
    bne ENM_iwDoTheLDA_f17
    lda #%01000000
    sta SPRBUF1+SPRIORITY16
ENM_iwDoTheLDA_f17
    lda ENM_17_leftRight
    cmp #$01
    bne ENM_iwDoTheLDA_f18
    lda #%01000000
    sta SPRBUF1+SPRIORITY17
ENM_iwDoTheLDA_f18
    lda ENM_18_leftRight
    cmp #$01
    bne ENM_iwDoTheLDA_ff
    lda #%01000000
    sta SPRBUF1+SPRIORITY18
ENM_iwDoTheLDA_ff
    rts

ENM_iwDoTheLDA
    pha
    lda LEVEL_WAVE
    cmp #$01
    beq ENM_iwDTLDA_loadWave01
    cmp #$02
    beq ENM_iwDTLDA_loadWave02
    cmp #$03
    beq ENM_iwDTLDA_loadWave03
    cmp #$04
    beq ENM_iwDTLDA_loadWave04
    cmp #$05
    beq ENM_iwDTLDA_loadWave05
    cmp #$06
    beq ENM_iwDTLDA_loadWave06

    pla
    lda ENM_DATA_wave0, y
    jmp ENM_iwDTLDA_loadDone
ENM_iwDTLDA_loadWave01
    pla
    lda ENM_DATA_wave1, y
    jmp ENM_iwDTLDA_loadDone
ENM_iwDTLDA_loadWave02
    pla
    lda ENM_DATA_wave2, y
    jmp ENM_iwDTLDA_loadDone
ENM_iwDTLDA_loadWave03
    pla
    lda ENM_DATA_wave3, y
    jmp ENM_iwDTLDA_loadDone
ENM_iwDTLDA_loadWave04
    pla
    lda ENM_DATA_wave4, y
    jmp ENM_iwDTLDA_loadDone
ENM_iwDTLDA_loadWave05
    pla
    lda ENM_DATA_wave5, y
    jmp ENM_iwDTLDA_loadDone
ENM_iwDTLDA_loadWave06
    pla
    lda ENM_DATA_wave6, y

ENM_iwDTLDA_loadDone
    iny
    rts

;=======================
; ========================
;=====================


ENM_patternUpdate
    ; update some pattern vars.
    inc ENM_pattSinHalf
    lda ENM_pattSinHalf
    cmp #$01
    bpl ENM_pU_pattSinHalfReset
    jmp ENM_pU_goOn
ENM_pU_pattSinHalfReset
    stz ENM_pattSinHalf

ENM_pU_goOn
    ldy ENM_patternCounter
    iny
    sty ENM_patternCounter
    cpy #$50
    bpl ENM_pU_reverseDir

    jmp ENM_pU_13
ENM_pU_reverseDir
    ldy #$0000
    sty ENM_patternCounter
    inc ENM_patternDir
    lda ENM_patternDir
    cmp #$02
    beq ENM_pU_resetDir
    jmp ENM_pU_13
ENM_pU_resetDir
    stz ENM_patternDir

    ;--------

ENM_pU_13
    lda ENM_13_alive
    cmp #$00
    beq ENM_pU_14
    lda ENM_13_patt
    cmp #$00
    beq ENM_pU_14

    lda ENM_13_pattNum
    sta ENM_pattTmpPatty

    lda SPRBUF1+SY13
    jsr ENM_pU_DEAtoINA
    sta SPRBUF1+SY13

ENM_pU_14
    lda ENM_14_alive
    cmp #$00
    beq ENM_pU_15
    lda ENM_14_patt
    cmp #$00
    beq ENM_pU_15

    lda ENM_14_pattNum
    sta ENM_pattTmpPatty

    lda SPRBUF1+SY14
    jsr ENM_pU_DEAtoINA
    sta SPRBUF1+SY14

ENM_pU_15
    lda ENM_15_alive
    cmp #$00
    beq ENM_pU_16
    lda ENM_15_patt
    cmp #$00
    beq ENM_pU_16

    lda ENM_15_pattNum
    sta ENM_pattTmpPatty

    lda SPRBUF1+SY15
    jsr ENM_pU_DEAtoINA
    sta SPRBUF1+SY15

ENM_pU_16
    lda ENM_16_alive
    cmp #$00
    beq ENM_pU_17
    lda ENM_16_patt
    cmp #$00
    beq ENM_pU_17

    lda ENM_16_pattNum
    sta ENM_pattTmpPatty

    lda SPRBUF1+SY16
    jsr ENM_pU_DEAtoINA
    sta SPRBUF1+SY16

ENM_pU_17
    lda ENM_17_alive
    cmp #$00
    beq ENM_pU_18
    lda ENM_17_patt
    cmp #$00
    beq ENM_pU_18

    lda ENM_17_pattNum
    sta ENM_pattTmpPatty

    lda SPRBUF1+SY17
    jsr ENM_pU_DEAtoINA
    sta SPRBUF1+SY17

ENM_pU_18
    lda ENM_18_alive
    cmp #$00
    beq ENM_pU_allOfThem_done
    lda ENM_18_patt
    cmp #$00
    beq ENM_pU_allOfThem_done

    lda ENM_18_pattNum
    sta ENM_pattTmpPatty

    lda SPRBUF1+SY18
    jsr ENM_pU_DEAtoINA
    sta SPRBUF1+SY18

ENM_pU_allOfThem_done
    rts


    ;---------

ENM_pU_DEAtoINA
    phy
    pha
    ldy #$0000
    ldy ENM_patternCounter
;----
    lda ENM_pattTmpPatty
    cmp #$00
    beq ENM_pU_DtoI_p00
    cmp #$01
    beq ENM_pU_DtoI_p01
    lda PATT_SIN_DATA_02, y
    jmp ENM_pU_DtoI_p0f
ENM_pU_DtoI_p01
    lda PATT_SIN_DATA_01, y
    jmp ENM_pU_DtoI_p0f
ENM_pU_DtoI_p00
    lda PATT_SIN_DATA_00, y
ENM_pU_DtoI_p0f

    cmp #$02
    beq ENM_pU_INA_02
    cmp #$01
    beq ENM_pU_INA_01
    jmp ENM_pU_INA_00

ENM_pU_INA_02
    lda ENM_patternDir
    cmp #$01
    beq ENM_pU_INA_x2
    jmp ENM_pU_DEA_x2
ENM_pU_INA_x2
    pla
    ina
    ina
    jmp ENM_pU_DtoI_xxx
ENM_pU_DEA_x2
    pla
    dea
    dea
ENM_pU_DtoI_xxx
    jmp ENM_pU_INA_ende


ENM_pU_INA_01
    lda ENM_patternDir
    cmp #$01
    beq ENM_pU_INA_x1
    jmp ENM_pU_DEA_x1
ENM_pU_INA_x1
    pla
    ina
    jmp ENM_pU_DtoI_xx
ENM_pU_DEA_x1
    pla
    dea
ENM_pU_DtoI_xx
    jmp ENM_pU_INA_ende

    
ENM_pU_INA_00
    lda ENM_pattSinHalf
    cmp #$01
    beq ENM_pU_INA_ende
    lda ENM_patternDir
    cmp #$01
    beq ENM_pU_INA_x0p5
    jmp ENM_pU_DEA_x0p5
ENM_pU_INA_x0p5
    pla
    ina
    jmp ENM_pU_INA_ende
ENM_pU_DEA_x0p5
    pla
    dea

ENM_pU_INA_ende
    ply
    rts

PATT_SIN_DATA_00    ; /\/\/\/\/\/ etc. ('tis one is pretty boring, really!)
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00

PATT_SIN_DATA_01    ; slowly->fast->slowly->rest->change_dir+rep
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    .db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02
    .db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00

PATT_SIN_DATA_02    ; a more crampy one
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    .db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    .db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
    .db $01,$01,$01,$01,$01,$01,$01,$01,$01,$01

;WAVE_x_ENEMIES
         ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf
;    .db $FE,$70,$01,$01,$02,$01,$04,$08,$8c,$00,$7f,$00


;================================

; Issues to watch out for:  <ENM_wait>'s that is > $70 will
; not appear in the game, however, ENM_18 *must* have its WAIT
; variable > $70.
; You can of course adjust this value yourself, however, there's
; no need to it so don't care about it!
;
; For adding to new waves, you must update the following files:
;  - cutea.s
;  - pstuff.inc
;  - enemies.inc (d'oh!)

ENM_DATA_wave0                  ; wave 0 ready (sprset1)
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
    .db $FF,$A6,$00,$01,$01,$01,$04,$08,$8c,$01,$0a,$00,$00,$02 ; Goomba
    .db $FF,$40,$00,$01,$02,$02,$0c,$40,$44,$00,$19,$00,$00,$00 ; Eyeball
    .db $00,$82,$00,$02,$01,$01,$80,$84,$8c,$01,$1c,$00,$01,$01 ; Tomato (red)
    .db $FF,$B8,$00,$01,$02,$02,$0c,$40,$44,$00,$27,$00,$00,$00 ; Eyeball
    .db $FF,$59,$00,$03,$01,$01,$48,$4c,$8c,$00,$2a,$00,$00,$00 ; Spock (U.S.S)
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)


ENM_DATA_wave1                  ; wave 1 ready (sprset2)
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
    .db $00,$AA,$00,$02,$01,$00,$04,$00,$00,$01,$0a,$00,$01,$01 ; Flying human sheep
    .db $FF,$96,$00,$01,$02,$02,$0c,$40,$44,$00,$19,$00,$00,$00 ; W.A.S.P.
    .db $FF,$59,$00,$03,$01,$01,$48,$4c,$8c,$00,$1c,$00,$00,$00 ; Spock (U.S.S)
    .db $FF,$B8,$00,$01,$02,$02,$0c,$40,$44,$00,$27,$00,$00,$00 ; W.A.S.P.
    .db $00,$82,$00,$02,$01,$01,$80,$84,$8c,$01,$2a,$00,$01,$01 ; Nippon Airways
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)


ENM_DATA_wave2                  ; wave 2 ready (sprset2)
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
    .db $FF,$71,$00,$01,$01,$02,$0c,$40,$44,$01,$02,$00,$00,$02 ; W.A.S.P
    .db $00,$9A,$00,$01,$01,$00,$04,$00,$00,$01,$07,$00,$01,$01 ; Flying human sheep
    .db $FF,$43,$00,$01,$01,$01,$48,$4c,$8c,$00,$14,$00,$00,$00 ; Spock (U.S.S)
    .db $00,$82,$00,$01,$01,$01,$80,$84,$8c,$00,$1e,$00,$01,$00 ; Nippon Airways
    .db $FF,$67,$00,$01,$01,$02,$0c,$40,$44,$00,$24,$00,$00,$00 ; W.A.S.P
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)


ENM_DATA_wave3                  ; wave 3 ready (sprset3)
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
    .db $00,$7a,$00,$02,$01,$01,$80,$84,$8c,$01,$06,$00,$01,$01 ; Tomato (green)
    .db $FF,$59,$00,$02,$01,$00,$04,$00,$00,$01,$24,$00,$00,$02 ; Alien Caterpillar (head)
    .db $FF,$5b,$00,$01,$01,$00,$08,$00,$00,$01,$25,$00,$00,$02 ; Alien Caterpillar (segment)
    .db $FF,$5d,$00,$01,$01,$00,$08,$00,$00,$01,$26,$00,$00,$02 ; Alien Caterpillar (segment)
    .db $FF,$62,$00,$01,$01,$00,$04,$00,$00,$01,$27,$00,$01,$02 ; Alien Caterpillar (head)
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)


ENM_DATA_wave4
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
    .db $FF,$83,$00,$01,$01,$01,$48,$4c,$8c,$00,$05,$00,$00,$00 ; Zoitsu
    .db $FF,$44,$00,$01,$01,$01,$0C,$40,$8c,$00,$08,$00,$00,$00 ; Tux
    .db $00,$62,$00,$01,$01,$00,$04,$8c,$8c,$01,$14,$00,$01,$02 ; Alien Caterpillar (head)
    .db $00,$60,$00,$01,$01,$00,$08,$8c,$8c,$01,$15,$00,$01,$02 ; Alien Caterpillar (segment)
    .db $FF,$70,$00,$01,$01,$01,$0C,$40,$8c,$01,$18,$00,$00,$01 ; Tux
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)


ENM_DATA_wave5
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
;   .db $FF,$A6,$00,$01,$01,$01,$4c,$80,$8c,$01,$02,$00,$00,$02 ; Goomba (white eyez, d'oh!)
;   .db $FF,$64,$00,$01,$01,$01,$04,$08,$8c,$00,$12,$00,$00,$00 ; Telly O
;   .db $FF,$64,$00,$01,$01,$01,$08,$04,$8c,$00,$15,$00,$00,$00 ; Telly O
    .db $FF,$A6,$00,$01,$01,$00,$80,$8c,$8c,$01,$02,$00,$00,$02 ; Flying human sheep (Pierre)
    .db $FF,$64,$00,$01,$01,$01,$04,$4c,$8c,$00,$12,$00,$00,$00 ; Telly O
    .db $FF,$64,$00,$01,$01,$01,$4c,$04,$8c,$00,$15,$00,$00,$00 ; Telly O
    .db $FF,$64,$00,$01,$01,$01,$0c,$40,$8c,$00,$18,$00,$00,$00 ; Telly P
    .db $FF,$64,$00,$01,$01,$01,$48,$44,$8c,$00,$1b,$00,$00,$00 ; Telly S, (I did it again *hihi*)
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)


ENM_DATA_wave6
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
    .db $FF,$BB,$00,$01,$01,$00,$84,$8c,$8c,$00,$02,$00,$00,$00 ; Evil Angela duplicate
    .db $FF,$53,$00,$01,$01,$00,$84,$8c,$8c,$00,$03,$00,$00,$00 ; Evil Angela duplicate
    .db $00,$79,$00,$01,$01,$00,$84,$8c,$8c,$00,$05,$00,$01,$00 ; Evil Angela duplicate
    .db $00,$64,$00,$01,$01,$00,$84,$8c,$8c,$00,$07,$00,$01,$00 ; Evil Angela duplicate
    .db $00,$43,$00,$01,$01,$00,$84,$8c,$8c,$00,$08,$00,$01,$00 ; Evil Angela duplicate
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)




.ENDASM
    .db $00,$82,$00,$02,$01,$00,$04,$00,$00,$01,$0a,$00,$01,$01 ; Flying human sheep
    .db $FF,$40,$00,$01,$02,$02,$0c,$40,$44,$00,$19,$00,$00,$00 ; W.A.S.P.
    .db $FF,$59,$00,$03,$01,$01,$48,$4c,$8c,$00,$1c,$00,$00,$00 ; Spock (U.S.S)
    .db $FF,$B8,$00,$01,$02,$02,$0c,$40,$44,$00,$27,$00,$00,$00 ; W.A.S.P.
    .db $00,$82,$00,$02,$01,$01,$80,$84,$8c,$01,$2a,$00,$01,$01 ; Nippon Airways
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)
.ASM

.ENDASM
        ; x,  y, al, hp, sp, nf, f1, f2, f3, pa, wa, mf, lr, p#
    .db $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 ;
    .db $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 ;
    .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ;
    .db $00,$00,$00,$01,$02,$01,$04,$08,$8c,$00,$7f,$00,$00,$00 ; Goomba (dummy not in use)
.ASM
