mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-29 21:31:53 +00:00
lemm: animate falling
This commit is contained in:
parent
436ee2f087
commit
ba51967e28
@ -38,7 +38,7 @@ LEMM: lemm.o
|
||||
ld65 -o LEMM lemm.o -C ../../linker_scripts/apple2_6000.inc
|
||||
|
||||
lemm.o: lemm.s zp.inc hardware.inc \
|
||||
graphics/graphics_test.inc \
|
||||
graphics/graphics_test.inc graphics/sprites.inc \
|
||||
intro_level1.s update_time.s hgr_sprite.s draw_flames.s \
|
||||
draw_door.s move_lemming.s draw_lemming.s \
|
||||
interrupt_handler.s keyboard.s \
|
||||
|
@ -26,9 +26,28 @@ draw_lemming:
|
||||
lda lemming_out,Y
|
||||
beq done_draw_lemming
|
||||
|
||||
lda #<lemming_fall1_sprite
|
||||
|
||||
draw_falling_sprite:
|
||||
|
||||
lda lemming_frame,Y
|
||||
and #$3
|
||||
tax
|
||||
|
||||
lda lemming_direction,Y
|
||||
bpl draw_falling_right
|
||||
|
||||
draw_falling_left:
|
||||
lda lfall_sprite_l,X
|
||||
sta INL
|
||||
lda #>lemming_fall1_sprite
|
||||
lda lfall_sprite_h,X
|
||||
jmp draw_falling_common
|
||||
|
||||
draw_falling_right:
|
||||
lda rfall_sprite_l,X
|
||||
sta INL
|
||||
lda rfall_sprite_h,X
|
||||
|
||||
draw_falling_common:
|
||||
sta INH
|
||||
|
||||
ldx lemming_x,Y
|
||||
@ -41,3 +60,19 @@ draw_lemming:
|
||||
done_draw_lemming:
|
||||
rts
|
||||
|
||||
|
||||
lfall_sprite_l:
|
||||
.byte <lemming_lfall1_sprite,<lemming_lfall2_sprite
|
||||
.byte <lemming_lfall3_sprite,<lemming_lfall4_sprite
|
||||
lfall_sprite_h:
|
||||
.byte >lemming_lfall1_sprite,>lemming_lfall2_sprite
|
||||
.byte >lemming_lfall3_sprite,>lemming_lfall4_sprite
|
||||
|
||||
rfall_sprite_l:
|
||||
.byte <lemming_rfall1_sprite,<lemming_rfall2_sprite
|
||||
.byte <lemming_rfall3_sprite,<lemming_rfall4_sprite
|
||||
rfall_sprite_h:
|
||||
.byte >lemming_rfall1_sprite,>lemming_rfall2_sprite
|
||||
.byte >lemming_rfall3_sprite,>lemming_rfall4_sprite
|
||||
|
||||
|
||||
|
@ -49,7 +49,16 @@ sprites.inc: sprites.png
|
||||
$(HGR_SPRITE) -s -l door2_sprite sprites.png 7 76 55 91 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l door3_sprite sprites.png 7 98 55 114 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l door4_sprite sprites.png 7 118 55 137 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_fall1_sprite sprites.png 56 32 62 41 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_rfall1_sprite sprites.png 14 161 20 170 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_rfall2_sprite sprites.png 28 161 34 170 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_rfall3_sprite sprites.png 42 161 48 170 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_rfall4_sprite sprites.png 56 161 62 170 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_lfall1_sprite sprites.png 70 161 76 170 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_lfall2_sprite sprites.png 84 161 90 170 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_lfall3_sprite sprites.png 98 161 104 170 >> sprites.inc
|
||||
$(HGR_SPRITE) -s -l lemming_lfall4_sprite sprites.png 112 161 118 170 >> sprites.inc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 17 KiB |
@ -8,7 +8,12 @@ move_lemmings:
|
||||
jmp done_checking_lemming
|
||||
|
||||
really_move_lemming:
|
||||
lda lemming_status
|
||||
; bump frame
|
||||
tya
|
||||
tax
|
||||
inc lemming_frame,X ; only can inc with X
|
||||
|
||||
lda lemming_status,Y
|
||||
cmp #LEMMING_FALLING
|
||||
beq do_lemming_falling
|
||||
cmp #LEMMING_WALKING
|
||||
@ -149,6 +154,8 @@ lemming_y:
|
||||
lemming_out:
|
||||
.byte $0
|
||||
|
||||
lemming_frame:
|
||||
.byte 0
|
||||
|
||||
LEMMING_FALLING = 1
|
||||
LEMMING_WALKING = 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user