mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-16 11:30:55 +00:00
cliff: hook up rock
This commit is contained in:
parent
d197765f87
commit
ace0276f4b
@ -119,6 +119,7 @@ game_loop:
|
||||
|
||||
;=====================
|
||||
; erase old
|
||||
;=====================
|
||||
|
||||
; from A to X
|
||||
; SAVED_Y1 to SAVED_Y2
|
||||
@ -141,7 +142,8 @@ game_loop:
|
||||
nothing_to_restore:
|
||||
|
||||
;=====================
|
||||
; bird
|
||||
; draw bird
|
||||
;=====================
|
||||
|
||||
lda bird_x
|
||||
sta SPRITE_X
|
||||
@ -156,8 +158,36 @@ nothing_to_restore:
|
||||
|
||||
jsr hgr_draw_sprite
|
||||
|
||||
|
||||
;=====================
|
||||
; draw rock
|
||||
;=====================
|
||||
|
||||
lda rock_x
|
||||
sta SPRITE_X
|
||||
lda rock_y
|
||||
sta SPRITE_Y
|
||||
|
||||
lda FRAME
|
||||
and #3
|
||||
clc
|
||||
adc #2 ; rock
|
||||
tax
|
||||
|
||||
ldy #1 ; bg save
|
||||
|
||||
jsr hgr_draw_sprite
|
||||
|
||||
|
||||
|
||||
;=====================
|
||||
;=====================
|
||||
; move enemies
|
||||
;=====================
|
||||
;=====================
|
||||
|
||||
;=====================
|
||||
; bird
|
||||
|
||||
dec bird_x
|
||||
bpl bird_good
|
||||
@ -167,6 +197,20 @@ nothing_to_restore:
|
||||
|
||||
bird_good:
|
||||
|
||||
;=====================
|
||||
; rock
|
||||
|
||||
inc rock_y
|
||||
lda rock_y
|
||||
cmp #105
|
||||
bcc rock_good
|
||||
|
||||
lda #12
|
||||
sta rock_y
|
||||
|
||||
rock_good:
|
||||
|
||||
|
||||
|
||||
;=====================
|
||||
; increment frame
|
||||
@ -229,18 +273,34 @@ sprites:
|
||||
|
||||
|
||||
sprites_xsize:
|
||||
.byte 3, 3
|
||||
.byte 3, 3 ; bird
|
||||
.byte 3, 3, 3, 3 ; bigrock
|
||||
sprites_ysize:
|
||||
.byte 16,14
|
||||
.byte 16,14 ; bird
|
||||
.byte 23,22,21,22 ; bigrock
|
||||
|
||||
sprites_data_l:
|
||||
.byte <bird0_sprite,<bird1_sprite
|
||||
.byte <bigrock0_sprite,<bigrock1_sprite
|
||||
.byte <bigrock2_sprite,<bigrock3_sprite
|
||||
|
||||
sprites_data_h:
|
||||
.byte >bird0_sprite,>bird1_sprite
|
||||
.byte >bigrock0_sprite,>bigrock1_sprite
|
||||
.byte >bigrock2_sprite,>bigrock3_sprite
|
||||
|
||||
sprites_mask_l:
|
||||
.byte <bird0_mask,<bird1_mask
|
||||
.byte <bigrock0_mask,<bigrock1_mask
|
||||
.byte <bigrock2_mask,<bigrock3_mask
|
||||
|
||||
sprites_mask_h:
|
||||
.byte >bird0_mask,>bird1_mask
|
||||
.byte >bigrock0_mask,>bigrock1_mask
|
||||
.byte >bigrock2_mask,>bigrock3_mask
|
||||
|
||||
|
||||
;========================================
|
||||
|
||||
save_xstart:
|
||||
.byte 0, 0
|
||||
@ -256,3 +316,9 @@ bird_x:
|
||||
.byte 37
|
||||
bird_y:
|
||||
.byte 75
|
||||
|
||||
rock_x:
|
||||
.byte 7 ; remember, /7
|
||||
rock_y:
|
||||
.byte 12
|
||||
|
||||
|
@ -7,6 +7,32 @@ enemy_sprites.inc: enemy_sprites.png
|
||||
$(HGR_SPRITE) -l bird0_mask enemy_sprites.png 238 50 258 66 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bird1_sprite enemy_sprites.png 210 74 230 88 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bird1_mask enemy_sprites.png 238 74 258 88 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock0_sprite enemy_sprites.png 14 7 34 30 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock0_mask enemy_sprites.png 42 7 62 30 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock1_sprite enemy_sprites.png 14 35 34 57 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock1_mask enemy_sprites.png 42 35 62 57 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock2_sprite enemy_sprites.png 14 63 34 84 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock2_mask enemy_sprites.png 42 63 62 84 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock3_sprite enemy_sprites.png 14 91 34 113 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock3_mask enemy_sprites.png 42 91 62 113 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock_crash0_sprite enemy_sprites.png 14 119 34 137 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock_crash0_mask enemy_sprites.png 42 119 62 137 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock_crash1_sprite enemy_sprites.png 14 147 41 168 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l bigrock_crash1_mask enemy_sprites.png 56 147 83 168 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock0_sprite enemy_sprites.png 98 7 111 22 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock0_mask enemy_sprites.png 126 7 139 22 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock1_sprite enemy_sprites.png 98 35 111 49 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock1_mask enemy_sprites.png 126 35 139 49 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock2_sprite enemy_sprites.png 98 63 111 78 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock2_mask enemy_sprites.png 126 63 139 78 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock3_sprite enemy_sprites.png 98 91 111 105 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock3_mask enemy_sprites.png 126 91 139 105 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock_crash0_sprite enemy_sprites.png 98 119 111 134 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock_crash0_mask enemy_sprites.png 127 119 140 134 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock_crash1_sprite enemy_sprites.png 126 147 153 166 >> enemy_sprites.inc
|
||||
$(HGR_SPRITE) -l smallrock_crash1_mask enemy_sprites.png 168 147 195 165 >> enemy_sprites.inc
|
||||
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
|
Loading…
x
Reference in New Issue
Block a user