peasant: animate waterfall

This commit is contained in:
Vince Weaver 2021-12-28 14:39:04 -05:00
parent 285610ab00
commit f0e730a1f0
4 changed files with 64 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -167,8 +167,63 @@ not_kerrek:
jsr check_haystack_exit
;========================================
;========================================
;========================================
; main loop
;========================================
;========================================
;========================================
game_loop:
;===================================
; animate waterfall (if applicable)
lda MAP_LOCATION
cmp #LOCATION_WATERFALL
bne leave_waterfall_alone
lda FRAME
and #$7
beq erase_waterfall
cmp #4
beq draw_waterfall
bne leave_waterfall_alone
draw_waterfall:
lda #36
sta CURSOR_X
lda #94
sta CURSOR_Y
lda #<waterfall_sprite
sta INL
lda #>waterfall_sprite
sta INH
jsr hgr_draw_sprite
jmp leave_waterfall_alone
erase_waterfall:
lda #94
sta SAVED_Y1
lda #141
sta SAVED_Y2
lda #36
ldx #38
jsr hgr_partial_restore
leave_waterfall_alone:
jsr move_peasant
inc FRAME
@ -279,6 +334,7 @@ game_over:
;.include "text/peasant1.inc"
.include "graphics_peasantry/graphics_peasant1.inc"
.include "sprites/waterfall_sprites.inc"
map_backgrounds_low:
.byte <gary_lzsa ; 0 -- gary the horse

View File

@ -2,7 +2,8 @@ HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite
all: inventory_sprites.inc ending_sprites.inc trogdor_sprites.inc \
boat_sprites.inc peasant_sprites.inc ned_sprites.inc \
peasant_robe_sprites.inc kerrek_sprites.inc
peasant_robe_sprites.inc kerrek_sprites.inc \
waterfall_sprites.inc
peasant_sprites.inc: peasant_sprites.png
$(HGR_SPRITE) -l peasant_right1_sprite peasant_sprites.png 35 1 35 29 > peasant_sprites.inc
@ -152,7 +153,12 @@ trogdor_sprites.inc: trogdor_sprites.png
$(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
waterfall_sprites.inc: waterfall_sprites.png
$(HGR_SPRITE) -s -l waterfall_sprite waterfall_sprites.png 14 5 27 52 > waterfall_sprites.inc
clean:
rm -f *~ peasant_sprites.inc inventory_sprites.inc \
ending_sprites.inc trogdor_sprites.inc ned_sprites.inc \
peasant_robe_sprites.inc kerrek_sprites.inc
peasant_robe_sprites.inc kerrek_sprites.inc \
waterfall_sprites.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB