mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-27 11:55:20 +00:00
321 lines
4.9 KiB
ArmAsm
321 lines
4.9 KiB
ArmAsm
|
;==============================
|
||
|
; do the asplode routine
|
||
|
;==============================
|
||
|
; should move head to center
|
||
|
; player explosion happens
|
||
|
; do the "YOUR HEAD A SPLODE" animation
|
||
|
; try to interleave the sound
|
||
|
; in theory the background should pulse too but
|
||
|
; that might be too much
|
||
|
do_asplode:
|
||
|
|
||
|
lda #0
|
||
|
sta FRAME
|
||
|
|
||
|
lda #16
|
||
|
sta STRONGBAD_X
|
||
|
|
||
|
asplode_loop:
|
||
|
;===================
|
||
|
; copy background
|
||
|
;===================
|
||
|
|
||
|
jsr hgr_copy
|
||
|
|
||
|
;==========================
|
||
|
; draw head
|
||
|
;==========================
|
||
|
|
||
|
lda #<big_head0_sprite
|
||
|
sta INL
|
||
|
lda #>big_head0_sprite
|
||
|
sta INH
|
||
|
lda #16 ; center
|
||
|
sta SPRITE_X
|
||
|
lda #36
|
||
|
sta SPRITE_Y
|
||
|
jsr hgr_draw_sprite_big
|
||
|
|
||
|
;==========================
|
||
|
; draw new sprite
|
||
|
;==========================
|
||
|
|
||
|
ldx FRAME
|
||
|
lda asplode_sprite_l,X
|
||
|
sta INL
|
||
|
lda asplode_sprite_h,X
|
||
|
sta INH
|
||
|
lda asplode_sprite_x,X
|
||
|
sta SPRITE_X
|
||
|
lda asplode_sprite_y,X
|
||
|
sta SPRITE_Y
|
||
|
jsr hgr_draw_sprite_big
|
||
|
|
||
|
ldx FRAME
|
||
|
cpx #17
|
||
|
bcc done_extra_sprites
|
||
|
|
||
|
;==========================
|
||
|
; draw your
|
||
|
;==========================
|
||
|
|
||
|
lda #<your_sprite
|
||
|
sta INL
|
||
|
lda #>your_sprite
|
||
|
sta INH
|
||
|
lda #8
|
||
|
sta SPRITE_X
|
||
|
lda #133
|
||
|
sta SPRITE_Y
|
||
|
jsr hgr_draw_sprite_big
|
||
|
|
||
|
ldx FRAME
|
||
|
cpx #23
|
||
|
bcc done_extra_sprites
|
||
|
|
||
|
;==========================
|
||
|
; draw head
|
||
|
;==========================
|
||
|
|
||
|
lda #<head_sprite
|
||
|
sta INL
|
||
|
lda #>head_sprite
|
||
|
sta INH
|
||
|
lda #16
|
||
|
sta SPRITE_X
|
||
|
lda #133
|
||
|
sta SPRITE_Y
|
||
|
jsr hgr_draw_sprite_big
|
||
|
|
||
|
ldx FRAME
|
||
|
cpx #29
|
||
|
bcc done_extra_sprites
|
||
|
|
||
|
;==========================
|
||
|
; draw A
|
||
|
;==========================
|
||
|
|
||
|
lda #<a_sprite
|
||
|
sta INL
|
||
|
lda #>a_sprite
|
||
|
sta INH
|
||
|
lda #22
|
||
|
sta SPRITE_X
|
||
|
lda #133
|
||
|
sta SPRITE_Y
|
||
|
jsr hgr_draw_sprite_big
|
||
|
|
||
|
done_extra_sprites:
|
||
|
|
||
|
.if 0
|
||
|
;==========================
|
||
|
; draw SPLODE
|
||
|
;==========================
|
||
|
|
||
|
lda #<splode_sprite
|
||
|
sta INL
|
||
|
lda #>splode_sprite
|
||
|
sta INH
|
||
|
lda #23
|
||
|
sta SPRITE_X
|
||
|
lda #133
|
||
|
sta SPRITE_Y
|
||
|
jsr hgr_draw_sprite_big
|
||
|
.endif
|
||
|
|
||
|
; play sound
|
||
|
; jsr play_asplode
|
||
|
|
||
|
jsr flip_page
|
||
|
|
||
|
inc FRAME
|
||
|
lda FRAME
|
||
|
cmp #35
|
||
|
bcs done_asplode_head
|
||
|
|
||
|
jmp asplode_loop
|
||
|
|
||
|
done_asplode_head:
|
||
|
|
||
|
lda #20
|
||
|
jsr long_wait ; tail call
|
||
|
|
||
|
rts
|
||
|
|
||
|
|
||
|
asplode_sprite_l:
|
||
|
; begining explosion
|
||
|
.byte <asploding1_sprite ; 0
|
||
|
.byte <asploding1_sprite ; 1
|
||
|
.byte <asploding2_sprite ; 2
|
||
|
.byte <asploding3_sprite ; 3
|
||
|
.byte <asploding4_sprite ; 4
|
||
|
.byte <asploding2_sprite ; 5
|
||
|
.byte <asploding3_sprite ; 6
|
||
|
.byte <asploding4_sprite ; 7
|
||
|
.byte <asploding2_sprite ; 8
|
||
|
.byte <asploding3_sprite ; 9
|
||
|
.byte <asploding4_sprite ; 10
|
||
|
; your
|
||
|
.byte <your_sm_sprite ; 11
|
||
|
.byte <your_sm_sprite ; 12
|
||
|
.byte <your_med_sprite ; 13
|
||
|
.byte <your_med_sprite ; 14
|
||
|
.byte <your_sprite ; 15
|
||
|
.byte <your_sprite ; 16
|
||
|
; head
|
||
|
.byte <head_sm_sprite ; 17
|
||
|
.byte <head_sm_sprite ; 18
|
||
|
.byte <head_med_sprite ; 19
|
||
|
.byte <head_med_sprite ; 20
|
||
|
.byte <head_sprite ; 21
|
||
|
.byte <head_sprite ; 22
|
||
|
; a
|
||
|
.byte <a_sm_sprite ; 23
|
||
|
.byte <a_sm_sprite ; 24
|
||
|
.byte <a_med_sprite ; 25
|
||
|
.byte <a_med_sprite ; 26
|
||
|
.byte <a_sprite ; 27
|
||
|
.byte <a_sprite ; 28
|
||
|
; splode
|
||
|
.byte <splode_sm_sprite ; 29
|
||
|
.byte <splode_sm_sprite ; 30
|
||
|
.byte <splode_med_sprite ; 31
|
||
|
.byte <splode_med_sprite ; 32
|
||
|
.byte <splode_sprite ; 33
|
||
|
.byte <splode_sprite ; 34
|
||
|
|
||
|
asplode_sprite_h:
|
||
|
.byte >asploding1_sprite
|
||
|
.byte >asploding1_sprite
|
||
|
.byte >asploding2_sprite
|
||
|
.byte >asploding3_sprite
|
||
|
.byte >asploding4_sprite
|
||
|
.byte >asploding2_sprite
|
||
|
.byte >asploding3_sprite
|
||
|
.byte >asploding4_sprite
|
||
|
.byte >asploding2_sprite
|
||
|
.byte >asploding3_sprite
|
||
|
.byte >asploding4_sprite
|
||
|
; your
|
||
|
.byte >your_sm_sprite
|
||
|
.byte >your_sm_sprite
|
||
|
.byte >your_med_sprite
|
||
|
.byte >your_med_sprite
|
||
|
.byte >your_sprite
|
||
|
.byte >your_sprite
|
||
|
; head
|
||
|
.byte >head_sm_sprite
|
||
|
.byte >head_sm_sprite
|
||
|
.byte >head_med_sprite
|
||
|
.byte >head_med_sprite
|
||
|
.byte >head_sprite
|
||
|
.byte >head_sprite
|
||
|
; a
|
||
|
.byte >a_sm_sprite
|
||
|
.byte >a_sm_sprite
|
||
|
.byte >a_med_sprite
|
||
|
.byte >a_med_sprite
|
||
|
.byte >a_sprite
|
||
|
.byte >a_sprite
|
||
|
; splode
|
||
|
.byte >splode_sm_sprite
|
||
|
.byte >splode_sm_sprite
|
||
|
.byte >splode_med_sprite
|
||
|
.byte >splode_med_sprite
|
||
|
.byte >splode_sprite
|
||
|
.byte >splode_sprite
|
||
|
|
||
|
asplode_sprite_x:
|
||
|
.byte 19 ; FIXME: adjust for current pos
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
.byte 19
|
||
|
; your
|
||
|
.byte 18
|
||
|
.byte 17
|
||
|
.byte 14
|
||
|
.byte 12
|
||
|
.byte 9
|
||
|
.byte 8
|
||
|
; head
|
||
|
.byte 18
|
||
|
.byte 18
|
||
|
.byte 17
|
||
|
.byte 17
|
||
|
.byte 16
|
||
|
.byte 16
|
||
|
; a
|
||
|
.byte 19
|
||
|
.byte 20
|
||
|
.byte 20
|
||
|
.byte 21
|
||
|
.byte 22
|
||
|
.byte 22
|
||
|
; splode
|
||
|
.byte 18
|
||
|
.byte 20
|
||
|
.byte 20
|
||
|
.byte 21
|
||
|
.byte 22
|
||
|
.byte 24
|
||
|
|
||
|
asplode_sprite_y:
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
.byte 150
|
||
|
; your
|
||
|
.byte 80
|
||
|
.byte 90
|
||
|
.byte 100
|
||
|
.byte 111
|
||
|
.byte 122
|
||
|
.byte 133
|
||
|
; head
|
||
|
.byte 80
|
||
|
.byte 90
|
||
|
.byte 100
|
||
|
.byte 111
|
||
|
.byte 122
|
||
|
.byte 133
|
||
|
; a
|
||
|
.byte 80
|
||
|
.byte 90
|
||
|
.byte 100
|
||
|
.byte 111
|
||
|
.byte 122
|
||
|
.byte 133
|
||
|
; splode
|
||
|
.byte 80
|
||
|
.byte 90
|
||
|
.byte 100
|
||
|
.byte 111
|
||
|
.byte 122
|
||
|
.byte 133
|
||
|
|
||
|
|
||
|
long_wait:
|
||
|
ldx #10
|
||
|
long_wait_loop:
|
||
|
lda #255
|
||
|
jsr WAIT
|
||
|
dex
|
||
|
bne long_wait_loop
|
||
|
rts
|
||
|
|