peasant: move the lake bubbles to be shared by intro/peasant3

This commit is contained in:
Vince Weaver 2021-12-31 00:18:29 -05:00
parent 62d15c0663
commit 9fc7069829
8 changed files with 338 additions and 309 deletions

View File

@ -216,6 +216,7 @@ intro.o: intro.s zp.inc qload.inc music.inc \
sprites/river_bubble_sprites.inc \
text/intro.inc \
animate_river.s \
animate_bubbles.s \
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
hgr_1x28_sprite_mask.s hgr_save_restore.s \
hgr_partial_save.s \
@ -363,6 +364,7 @@ peasant3.o: peasant3.s zp.inc inventory.inc \
graphics_peasantry/graphics_peasant3.inc sprites/peasant_sprites.inc \
graphics_peasantry/priority_peasant3.inc \
peasant_common.s \
animate_bubbles.s \
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
hgr_1x28_sprite_mask.s hgr_save_restore.s \
wait_a_bit.s draw_peasant.s hgr_text_box.s \

View File

@ -52,9 +52,8 @@ Title:
Intro:
~~~~~~
+ Use string compression
+ Use common sprite interface
+ Use walkto interface
+ Use walkto interface?
+ Let message 2 last longer
Map:
~~~~
@ -98,7 +97,6 @@ Peasant1:
- Yellow Tree
+ adjust enter/leaving x/y co-ordinates?
- Waterfall
+ Waterfall animation
Peasant2:
~~~~~~~~~
@ -114,7 +112,7 @@ Peasant2:
+ Hook up minigame
+ fix where we can get stuck on top of targets at archery range
- River/Rock
+ River animation
+ Better/bigger River animation
- Mountain Pass
+ Knight animations
+ Block path unless you have all three items
@ -128,12 +126,12 @@ Peasant3:
- Cottage
+ Fix y-coords when walking to Jhonka
- West Lake
+ Animate water
+ Better/bigger water animation
+ Make pebbles go away once you pick them up
+ Animate "throw baby" sequence
- East Lake
+ Animate Boat
+ Animate Water
+ Better/bigger water animation
+ Animate whole fish-feeding sequence
- Inn
+ Take note off door once old man is inside

View File

@ -0,0 +1,296 @@
;================
; animate bubbles E
animate_bubbles_e:
; 5,94
; 15,103
; 13,130
; bubble 1
lda FRAME
and #7
asl
tax
lda bubble_progress_e,X
sta INL
inx
lda bubble_progress_e,X
sta INH
lda #5
sta CURSOR_X
lda #94
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 2
lda FRAME
adc #3
and #7
asl
tax
lda bubble_progress_e,X
sta INL
inx
lda bubble_progress_e,X
sta INH
lda #15
sta CURSOR_X
lda #103
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 3
lda FRAME
adc #5
and #7
asl
tax
lda bubble_progress_e,X
sta INL
inx
lda bubble_progress_e,X
sta INH
lda #13
sta CURSOR_X
lda #130
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
rts
bubble_progress_e:
.word bubble_e_sprite0
.word bubble_e_sprite0
.word bubble_e_sprite1
.word bubble_e_sprite0
.word bubble_e_sprite2
.word bubble_e_sprite3
.word bubble_e_sprite4
.word bubble_e_sprite5
.include "sprites/bubble_sprites_e.inc"
.if 0
bubble_e_sprite0:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $80 ; 1 000 0000 0 00 00 00 KKKKKKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite1:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
bubble_e_sprite2:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88+++ ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite3:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite4:
.byte 1,5
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite5:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.endif
;================
; update bubbles
animate_bubbles_w:
; 33,91
; 27,125
; 33,141
; 35,115
; bubble 1
lda FRAME
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #33
sta CURSOR_X
lda #91
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 2
lda FRAME
adc #3
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #27
sta CURSOR_X
lda #125
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 3
lda FRAME
adc #5
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #33
sta CURSOR_X
lda #141
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 4
lda FRAME
adc #2
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #35
sta CURSOR_X
lda #115
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
rts
bubble_progress:
.word bubble_sprite0
.word bubble_sprite0
.word bubble_sprite1
.word bubble_sprite0
.word bubble_sprite2
.word bubble_sprite3
.word bubble_sprite4
.word bubble_sprite5
.include "sprites/bubble_sprites_w.inc"
.if 0
bubble_sprite0:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $AA ; 1 010 1010 0 +10 10 10 BBBBBBB
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $80 ; 1 000 0000 0 00 00 00 KKKKKKK
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
bubble_sprite1:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $22 ; 0 010 0010 0 10 00 10 PPPKKPP
bubble_sprite2:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $22 ; 0 010 0010 0 10 00 10 PPPKKPP
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
bubble_sprite3:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $08 ; 0 000 1000 0 00 10 00 KKKPPKK
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
bubble_sprite4:
.byte 1,5
.byte $08 ; 0000 1000 0 00 10 00 KKKPPKK
.byte $A2 ; 1010 0010 0 10 00 10 BBBKKBB
.byte $08 ; 0000 1000 0 00 10 00 KKKPPKK
.byte $88 ; 1000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0010 1010 0 10 10 10 PPPPPPP
bubble_sprite5:
.byte 1,5
.byte $2A ; 0010 1010 0 10 10 10 PPPPPPP
.byte $88 ; 1000 1000 0 00 10 00 KKKBBKK
.byte $22 ; 0010 0010 0 10 00 10 PPPKKPP
.byte $88 ; 1000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0010 1010 0 10 10 10 PPPPPPP
.endif

View File

@ -144,6 +144,8 @@ mockingboard_notfound2:
.include "text/intro.inc"
.include "animate_bubbles.s"
skip_text:
.byte 0,2,"ESC Skips",0

View File

@ -124,10 +124,7 @@ check_lake_e_action2:
done_lake_e_action:
jsr update_bubbles_e
jsr animate_bubbles_e
; jsr wait_until_keypress
@ -198,138 +195,3 @@ lake_e_path:
.byte $FF,$FF
;================
; update bubbles E
update_bubbles_e:
; 5,94
; 15,103
; 13,130
; bubble 1
lda FRAME
and #7
asl
tax
lda bubble_progress_e,X
sta INL
inx
lda bubble_progress_e,X
sta INH
lda #5
sta CURSOR_X
lda #94
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 2
lda FRAME
adc #3
and #7
asl
tax
lda bubble_progress_e,X
sta INL
inx
lda bubble_progress_e,X
sta INH
lda #15
sta CURSOR_X
lda #103
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 3
lda FRAME
adc #5
and #7
asl
tax
lda bubble_progress_e,X
sta INL
inx
lda bubble_progress_e,X
sta INH
lda #13
sta CURSOR_X
lda #130
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
rts
bubble_progress_e:
.word bubble_e_sprite0
.word bubble_e_sprite0
.word bubble_e_sprite1
.word bubble_e_sprite0
.word bubble_e_sprite2
.word bubble_e_sprite3
.word bubble_e_sprite4
.word bubble_e_sprite5
.include "sprites/bubble_sprites_e.inc"
.if 0
bubble_e_sprite0:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $80 ; 1 000 0000 0 00 00 00 KKKKKKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite1:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
bubble_e_sprite2:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88+++ ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite3:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite4:
.byte 1,5
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
bubble_e_sprite5:
.byte 1,5
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.endif

View File

@ -138,7 +138,7 @@ check_lake_w_action2:
done_lake_w_action:
jsr update_bubbles
jsr animate_bubbles_w
; jsr wait_until_keypress
@ -233,162 +233,3 @@ lake_w_path:
.byte $FF,$FF
;================
; update bubbles
update_bubbles:
; 33,91
; 27,125
; 33,141
; 35,115
; bubble 1
lda FRAME
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #33
sta CURSOR_X
lda #91
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 2
lda FRAME
adc #3
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #27
sta CURSOR_X
lda #125
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 3
lda FRAME
adc #5
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #33
sta CURSOR_X
lda #141
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
; bubble 4
lda FRAME
adc #2
and #7
asl
tax
lda bubble_progress,X
sta INL
inx
lda bubble_progress,X
sta INH
lda #35
sta CURSOR_X
lda #115
sta CURSOR_Y
jsr hgr_draw_sprite ;_1x5
rts
bubble_progress:
.word bubble_sprite0
.word bubble_sprite0
.word bubble_sprite1
.word bubble_sprite0
.word bubble_sprite2
.word bubble_sprite3
.word bubble_sprite4
.word bubble_sprite5
.include "sprites/bubble_sprites_w.inc"
.if 0
bubble_sprite0:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $AA ; 1 010 1010 0 +10 10 10 BBBBBBB
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $80 ; 1 000 0000 0 00 00 00 KKKKKKK
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
bubble_sprite1:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $22 ; 0 010 0010 0 10 00 10 PPPKKPP
bubble_sprite2:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $AA ; 1 010 1010 0 10 10 10 BBBBBBB
.byte $22 ; 0 010 0010 0 10 00 10 PPPKKPP
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
bubble_sprite3:
.byte 1,5
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
.byte $A2 ; 1 010 0010 0 10 00 10 BBBKKBB
.byte $08 ; 0 000 1000 0 00 10 00 KKKPPKK
.byte $88 ; 1 000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0 010 1010 0 10 10 10 PPPPPPP
bubble_sprite4:
.byte 1,5
.byte $08 ; 0000 1000 0 00 10 00 KKKPPKK
.byte $A2 ; 1010 0010 0 10 00 10 BBBKKBB
.byte $08 ; 0000 1000 0 00 10 00 KKKPPKK
.byte $88 ; 1000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0010 1010 0 10 10 10 PPPPPPP
bubble_sprite5:
.byte 1,5
.byte $2A ; 0010 1010 0 10 10 10 PPPPPPP
.byte $88 ; 1000 1000 0 00 10 00 KKKBBKK
.byte $22 ; 0010 0010 0 10 00 10 PPPKKPP
.byte $88 ; 1000 1000 0 00 10 00 KKKBBKK
.byte $2A ; 0010 1010 0 10 10 10 PPPPPPP
.endif

View File

@ -221,6 +221,13 @@ game_loop:
jsr move_peasant
;=====================
; check if level over
lda LEVEL_OVER
bmi oops_new_location
bne game_over
;=====================
; always draw peasant
@ -236,10 +243,28 @@ game_loop:
jsr check_keyboard
lda LEVEL_OVER
bmi oops_new_location
bne game_over
;===================
; level specific
;=====================
lda MAP_LOCATION
cmp #LOCATION_LAKE_EAST
beq at_lake_east
cmp #LOCATION_LAKE_WEST
beq at_lake_west
bne skip_level_specific
at_lake_east:
jsr animate_bubbles_e
jmp skip_level_specific
at_lake_west:
jsr animate_bubbles_w
skip_level_specific:
;=========
; delay
lda #200
@ -264,6 +289,7 @@ game_over:
.include "gr_copy.s"
.include "hgr_copy.s"
.include "hgr_sprite.s"
.include "new_map_location.s"
@ -325,3 +351,5 @@ peasant3_text_lzsa:
.incbin "DIALOG_PEASANT3.LZSA"
.include "peasant3_actions.s"
.include "animate_bubbles.s"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB