mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-31 18:31:48 +00:00
sb: get the asplode text printing right
This commit is contained in:
parent
ff5a7cb543
commit
7a160512b3
@ -158,24 +158,7 @@ load_background:
|
||||
;===========================
|
||||
main_loop:
|
||||
|
||||
;==========
|
||||
; flip page
|
||||
;==========
|
||||
|
||||
lda DRAW_PAGE
|
||||
beq draw_page2
|
||||
draw_page1:
|
||||
bit PAGE2
|
||||
lda #0
|
||||
|
||||
beq done_flip
|
||||
|
||||
draw_page2:
|
||||
bit PAGE1
|
||||
lda #$20
|
||||
|
||||
done_flip:
|
||||
sta DRAW_PAGE
|
||||
jsr flip_page
|
||||
|
||||
;========================
|
||||
; copy over background
|
||||
@ -235,9 +218,9 @@ no_move_head:
|
||||
; draw head
|
||||
;===========================
|
||||
|
||||
lda #<head_sprite
|
||||
lda #<big_head_sprite
|
||||
sta INL
|
||||
lda #>head_sprite
|
||||
lda #>big_head_sprite
|
||||
sta INH
|
||||
lda STRONGBAD_X
|
||||
sta SPRITE_X
|
||||
@ -372,7 +355,7 @@ adjust_shield:
|
||||
|
||||
asplode_asplode:
|
||||
|
||||
jsr play_asplode
|
||||
jsr do_asplode
|
||||
|
||||
jmp main_loop
|
||||
|
||||
@ -394,6 +377,128 @@ wait_until_keypress:
|
||||
bit KEYRESET ; clear the keyboard buffer
|
||||
rts
|
||||
|
||||
|
||||
;==============================
|
||||
; do the asplode routine
|
||||
;==============================
|
||||
; should move head to center
|
||||
; do the "YOUR HEAD A SPLODE" animation
|
||||
; meanwhile the player should explode
|
||||
; try to interleave the sound
|
||||
; in theory the background should pulse too but
|
||||
; that might be too much
|
||||
do_asplode:
|
||||
|
||||
;===================
|
||||
; copy background
|
||||
;===================
|
||||
|
||||
jsr hgr_copy
|
||||
|
||||
;==========================
|
||||
; draw head
|
||||
;==========================
|
||||
|
||||
lda #<big_head_sprite
|
||||
sta INL
|
||||
lda #>big_head_sprite
|
||||
sta INH
|
||||
lda #16 ; center
|
||||
sta SPRITE_X
|
||||
lda #36
|
||||
sta SPRITE_Y
|
||||
jsr hgr_draw_sprite_big
|
||||
|
||||
|
||||
;==========================
|
||||
; 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
|
||||
|
||||
;==========================
|
||||
; draw head
|
||||
;==========================
|
||||
|
||||
lda #<head_sprite
|
||||
sta INL
|
||||
lda #>head_sprite
|
||||
sta INH
|
||||
lda #15
|
||||
sta SPRITE_X
|
||||
lda #133
|
||||
sta SPRITE_Y
|
||||
jsr hgr_draw_sprite_big
|
||||
|
||||
;==========================
|
||||
; draw A
|
||||
;==========================
|
||||
|
||||
lda #<a_sprite
|
||||
sta INL
|
||||
lda #>a_sprite
|
||||
sta INH
|
||||
lda #21
|
||||
sta SPRITE_X
|
||||
lda #133
|
||||
sta SPRITE_Y
|
||||
jsr hgr_draw_sprite_big
|
||||
|
||||
;==========================
|
||||
; 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
|
||||
|
||||
; play sound
|
||||
; jsr play_asplode
|
||||
|
||||
jsr flip_page
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;==========
|
||||
; flip page
|
||||
;==========
|
||||
flip_page:
|
||||
lda DRAW_PAGE
|
||||
beq draw_page2
|
||||
draw_page1:
|
||||
bit PAGE2
|
||||
lda #0
|
||||
|
||||
beq done_flip
|
||||
|
||||
draw_page2:
|
||||
bit PAGE1
|
||||
lda #$20
|
||||
|
||||
done_flip:
|
||||
sta DRAW_PAGE
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
.include "hgr_tables.s"
|
||||
.include "zx02_optim.s"
|
||||
.include "hgr_sprite_big.s"
|
||||
|
@ -32,7 +32,7 @@ sb_title.hgr: sb_title.png
|
||||
####
|
||||
|
||||
sb_sprites.inc: sb_sprites.png
|
||||
$(HGR_SPRITE) -s -l head_sprite sb_sprites.png 84 36 132 92 > sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l big_head_sprite sb_sprites.png 84 36 132 92 > sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l player_sprite sb_sprites.png 98 138 181 192 >> sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l shield_left_sprite sb_sprites.png 0 138 83 192 >> sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l shield_center_sprite sb_sprites.png 196 83 279 137 >> sb_sprites.inc
|
||||
@ -53,16 +53,13 @@ sb_sprites.inc: sb_sprites.png
|
||||
$(HGR_SPRITE) -s -l bullet13_sprite sb_sprites.png 168 92 181 98 >> sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l bullet14_sprite sb_sprites.png 168 99 181 105 >> sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l bullet15_sprite sb_sprites.png 168 106 181 112 >> sb_sprites.inc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(HGR_SPRITE) -s -l your_sprite sb_sprites.png 0 0 41 19 >> sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l head_sprite sb_sprites.png 56 0 90 19 >> sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l a_sprite sb_sprites.png 98 0 104 19 >> sb_sprites.inc
|
||||
$(HGR_SPRITE) -s -l splode_sprite sb_sprites.png 112 0 166 19 >> sb_sprites.inc
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst
|
||||
rm -f *~ *.o *.lst sb_sprites.inc
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Loading…
x
Reference in New Issue
Block a user