mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-03 18:29:53 +00:00
peasant: sleeping trogdor animation
This commit is contained in:
parent
417fa90865
commit
f878179fca
@ -127,16 +127,21 @@ trogdor_sprites.inc: trogdor_sprites.png
|
||||
$(HGR_SPRITE) -s -l dashing8_sprite trogdor_sprites.png 126 6 132 45 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l tiny_r1_sprite trogdor_sprites.png 14 49 20 54 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l tiny_r2_sprite trogdor_sprites.png 28 49 34 54 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l tiny_l1_sprite trogdor_sprites.png 14 57 20 61 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l tiny_l2_sprite trogdor_sprites.png 28 57 34 61 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l tiny_l1_sprite trogdor_sprites.png 14 56 20 61 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l tiny_l2_sprite trogdor_sprites.png 28 56 34 61 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sword1_sprite trogdor_sprites.png 42 48 48 53 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sword2_sprite trogdor_sprites.png 49 48 55 53 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sword3_sprite trogdor_sprites.png 56 48 62 53 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sword4_sprite trogdor_sprites.png 63 48 69 53 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sword5_sprite trogdor_sprites.png 70 48 76 53 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sword6_sprite trogdor_sprites.png 77 48 83 53 >> trogdor_sprites.inc
|
||||
|
||||
|
||||
$(HGR_SPRITE) -s -l smoke1_sprite trogdor_sprites.png 14 62 20 69 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l smoke2_sprite trogdor_sprites.png 28 62 34 69 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l smoke3_sprite trogdor_sprites.png 42 62 48 69 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l smoke4_sprite trogdor_sprites.png 56 62 62 69 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l smoke5_sprite trogdor_sprites.png 70 62 76 69 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sleep1_sprite trogdor_sprites.png 14 70 27 79 >> trogdor_sprites.inc
|
||||
$(HGR_SPRITE) -s -l sleep2_sprite trogdor_sprites.png 28 70 41 79 >> trogdor_sprites.inc
|
||||
|
||||
clean:
|
||||
rm -f *~ peasant_sprites.inc inventory_sprites.inc \
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 10 KiB |
@ -45,6 +45,7 @@ trogdor:
|
||||
new_location:
|
||||
lda #0
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
;==========================
|
||||
; load updated verb table
|
||||
@ -142,6 +143,71 @@ game_loop:
|
||||
bmi oops_new_location
|
||||
bne level_over
|
||||
|
||||
|
||||
; draw sleeping trogdor
|
||||
; actual:
|
||||
; 16 frames of nothing
|
||||
; 17 - open mouth
|
||||
; 60 - close mouth, puff1
|
||||
; 64 puff2, 68 puff3, 72 puff4
|
||||
; 76 puff5, 80 puff6, 84 nothing
|
||||
; ours:
|
||||
; 16 frames of nothing
|
||||
; 17 open mouth
|
||||
; 48 puff2, 52 puff3, 56 puff4 60 puff5
|
||||
|
||||
ldx #0
|
||||
lda FRAME ; mask off at 64
|
||||
and #$3f
|
||||
beq draw_sleep_sprites
|
||||
inx ; 1
|
||||
cmp #17
|
||||
beq draw_sleep_sprites
|
||||
inx ; 2
|
||||
cmp #48
|
||||
beq draw_sleep_sprites
|
||||
inx ; 3
|
||||
cmp #52
|
||||
beq draw_sleep_sprites
|
||||
inx ; 4
|
||||
cmp #56
|
||||
beq draw_sleep_sprites
|
||||
inx ; 5
|
||||
cmp #60
|
||||
beq draw_sleep_sprites
|
||||
bne no_sleeping
|
||||
|
||||
draw_sleep_sprites:
|
||||
|
||||
lda erase_sprite_x,X
|
||||
sta CURSOR_X
|
||||
lda erase_sprite_y,X
|
||||
sta CURSOR_Y
|
||||
lda erase_sprite_l,X
|
||||
sta INL
|
||||
lda erase_sprite_h,X
|
||||
sta INH
|
||||
|
||||
txa
|
||||
pha
|
||||
|
||||
jsr hgr_draw_sprite
|
||||
|
||||
pla
|
||||
tax
|
||||
|
||||
lda draw_sprite_x,X
|
||||
sta CURSOR_X
|
||||
lda draw_sprite_y,X
|
||||
sta CURSOR_Y
|
||||
lda draw_sprite_l,X
|
||||
sta INL
|
||||
lda draw_sprite_h,X
|
||||
sta INH
|
||||
jsr hgr_draw_sprite
|
||||
|
||||
no_sleeping:
|
||||
|
||||
; delay
|
||||
|
||||
lda #200
|
||||
@ -161,6 +227,45 @@ level_over:
|
||||
|
||||
rts
|
||||
|
||||
erase_sprite_x:
|
||||
.byte 18,18, 22, 18, 18,18
|
||||
erase_sprite_y:
|
||||
.byte 80,80,146,130,108,95
|
||||
erase_sprite_l:
|
||||
.byte <smoke1_sprite ; erase smoke5
|
||||
.byte <smoke1_sprite ; do nothing
|
||||
.byte <sleep1_sprite ; erase sleep2
|
||||
.byte <smoke1_sprite ; erase smoke2
|
||||
.byte <smoke1_sprite ; erase smoke3
|
||||
.byte <smoke1_sprite ; erase smoke4
|
||||
erase_sprite_h:
|
||||
.byte >smoke1_sprite ; erase smoke5
|
||||
.byte >smoke1_sprite ; do nothing
|
||||
.byte >sleep1_sprite ; erase sleep2
|
||||
.byte >smoke1_sprite ; erase smoke2
|
||||
.byte >smoke1_sprite ; erase smoke3
|
||||
.byte >smoke1_sprite ; erase smoke4
|
||||
|
||||
|
||||
draw_sprite_x:
|
||||
.byte 22, 22, 18, 18,18,18
|
||||
draw_sprite_y:
|
||||
.byte 146,146,130,108,95,80
|
||||
draw_sprite_l:
|
||||
.byte <sleep1_sprite ; do nothing
|
||||
.byte <sleep2_sprite ; draw open mouth
|
||||
.byte <smoke2_sprite ; draw smoke2
|
||||
.byte <smoke3_sprite ; draw smoke3
|
||||
.byte <smoke4_sprite ; draw smoke4
|
||||
.byte <smoke5_sprite ; draw smoke5
|
||||
draw_sprite_h:
|
||||
.byte >sleep1_sprite
|
||||
.byte >sleep2_sprite
|
||||
.byte >smoke2_sprite
|
||||
.byte >smoke3_sprite
|
||||
.byte >smoke4_sprite
|
||||
.byte >smoke5_sprite
|
||||
|
||||
|
||||
.include "peasant_move_tiny.s"
|
||||
.include "draw_peasant_tiny.s"
|
||||
|
Loading…
Reference in New Issue
Block a user