2021-08-10 19:30:02 +00:00
|
|
|
; o/~ At the beautiful, the beautiful, River o/~
|
|
|
|
|
|
|
|
;************************
|
|
|
|
; River
|
|
|
|
;************************
|
|
|
|
river:
|
2021-08-12 19:08:48 +00:00
|
|
|
lda #0
|
|
|
|
sta FRAME
|
|
|
|
|
|
|
|
;=========================
|
|
|
|
; init peasant position
|
|
|
|
; draw at 33,157
|
|
|
|
|
|
|
|
lda #33
|
|
|
|
sta PEASANT_X
|
|
|
|
lda #157
|
|
|
|
sta PEASANT_Y
|
|
|
|
|
|
|
|
lda #PEASANT_DIR_UP
|
|
|
|
sta PEASANT_DIR
|
|
|
|
|
|
|
|
;====================
|
|
|
|
; load bg
|
|
|
|
|
|
|
|
|
2021-08-10 19:30:02 +00:00
|
|
|
lda #<(river_lzsa)
|
|
|
|
sta getsrc_smc+1
|
|
|
|
lda #>(river_lzsa)
|
|
|
|
sta getsrc_smc+2
|
|
|
|
|
|
|
|
lda #$40
|
|
|
|
|
|
|
|
jsr decompress_lzsa2_fast
|
|
|
|
|
|
|
|
lda #<peasant_text
|
|
|
|
sta OUTL
|
|
|
|
lda #>peasant_text
|
|
|
|
sta OUTH
|
|
|
|
|
|
|
|
jsr hgr_put_string
|
|
|
|
|
2021-08-12 19:08:48 +00:00
|
|
|
; jsr hgr_save
|
|
|
|
|
|
|
|
|
|
|
|
;====================
|
|
|
|
; save background
|
|
|
|
|
|
|
|
lda PEASANT_X
|
|
|
|
sta CURSOR_X
|
|
|
|
lda PEASANT_Y
|
|
|
|
sta CURSOR_Y
|
|
|
|
|
|
|
|
;=======================
|
|
|
|
; walking
|
|
|
|
|
2021-08-25 00:58:44 +00:00
|
|
|
jsr save_bg_7x28
|
2021-08-12 19:08:48 +00:00
|
|
|
|
|
|
|
river_walk_loop:
|
2021-08-16 05:31:49 +00:00
|
|
|
|
|
|
|
lda PEASANT_X
|
|
|
|
sta CURSOR_X
|
|
|
|
lda PEASANT_Y
|
|
|
|
sta CURSOR_Y
|
|
|
|
|
2021-08-25 00:58:44 +00:00
|
|
|
jsr restore_bg_7x28
|
2021-08-12 19:08:48 +00:00
|
|
|
|
2021-08-16 05:31:49 +00:00
|
|
|
; draw peasant
|
|
|
|
|
|
|
|
lda FRAME
|
|
|
|
asl
|
|
|
|
tax
|
|
|
|
|
|
|
|
lda river_path,X
|
|
|
|
bmi done_river
|
|
|
|
sta PEASANT_X
|
|
|
|
sta CURSOR_X
|
|
|
|
|
|
|
|
inx
|
|
|
|
lda river_path,X
|
|
|
|
sta PEASANT_Y
|
|
|
|
sta CURSOR_Y
|
|
|
|
|
2021-08-25 00:58:44 +00:00
|
|
|
jsr save_bg_7x28
|
2021-08-16 05:31:49 +00:00
|
|
|
|
|
|
|
jsr draw_peasant
|
|
|
|
|
|
|
|
|
2021-08-12 19:08:48 +00:00
|
|
|
lda FRAME
|
|
|
|
check_river_action1:
|
|
|
|
cmp #10
|
|
|
|
bne check_river_action2
|
2021-08-15 01:10:56 +00:00
|
|
|
|
|
|
|
lda #<river_message1
|
|
|
|
sta OUTL
|
|
|
|
lda #>river_message1
|
|
|
|
sta OUTH
|
|
|
|
|
|
|
|
jsr hgr_text_box
|
|
|
|
|
2021-08-12 19:08:48 +00:00
|
|
|
jmp done_river_action
|
|
|
|
|
|
|
|
check_river_action2:
|
|
|
|
cmp #15
|
|
|
|
bne done_river_action
|
|
|
|
; jsr hgr_restore
|
|
|
|
lda #PEASANT_DIR_RIGHT
|
|
|
|
sta PEASANT_DIR
|
|
|
|
|
|
|
|
done_river_action:
|
|
|
|
|
|
|
|
jsr update_bubbles_r
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-10 19:30:02 +00:00
|
|
|
|
2021-08-12 19:41:39 +00:00
|
|
|
; jsr wait_until_keypress
|
|
|
|
|
|
|
|
lda #3
|
|
|
|
jsr wait_a_bit
|
2021-08-10 19:30:02 +00:00
|
|
|
|
2021-08-15 04:02:13 +00:00
|
|
|
lda ESC_PRESSED
|
|
|
|
bne done_river
|
|
|
|
|
2021-08-12 19:08:48 +00:00
|
|
|
inc FRAME
|
|
|
|
|
|
|
|
jmp river_walk_loop
|
|
|
|
|
|
|
|
|
|
|
|
;===================
|
|
|
|
; done
|
|
|
|
|
|
|
|
done_river:
|
|
|
|
|
2021-08-10 19:30:02 +00:00
|
|
|
rts
|
2021-08-11 23:29:47 +00:00
|
|
|
|
|
|
|
|
2021-08-12 19:08:48 +00:00
|
|
|
|
2021-08-11 23:29:47 +00:00
|
|
|
; walk up a bit
|
|
|
|
|
|
|
|
river_message1:
|
2021-08-15 01:10:56 +00:00
|
|
|
.byte 0,35,34, 0,253,82
|
|
|
|
.byte 7,49,"You can start playing in a",13
|
|
|
|
.byte "second here.",0
|
2021-08-11 23:29:47 +00:00
|
|
|
|
|
|
|
; walks behind tree
|
2021-08-12 19:08:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
river_path:
|
|
|
|
.byte 32,157
|
|
|
|
.byte 32,153
|
|
|
|
.byte 32,149
|
|
|
|
.byte 32,145
|
|
|
|
.byte 32,141
|
|
|
|
.byte 32,137
|
|
|
|
.byte 32,133
|
|
|
|
.byte 32,129
|
|
|
|
.byte 32,125
|
|
|
|
.byte 32,121 ; message
|
|
|
|
.byte 32,117
|
|
|
|
.byte 32,113
|
|
|
|
.byte 32,109
|
|
|
|
.byte 32,105
|
|
|
|
.byte 32,105 ; turn right
|
|
|
|
.byte 33,105
|
|
|
|
.byte 34,105
|
|
|
|
.byte 35,105
|
|
|
|
.byte 36,105
|
|
|
|
.byte $FF,$FF
|
|
|
|
|
|
|
|
|
|
|
|
;================
|
|
|
|
; update bubbles river
|
|
|
|
update_bubbles_r:
|
|
|
|
|
|
|
|
; 5,166
|
|
|
|
; 9,154
|
|
|
|
; 7,160
|
|
|
|
|
|
|
|
; bubble 1
|
|
|
|
|
|
|
|
lda FRAME
|
|
|
|
and #3
|
|
|
|
asl
|
|
|
|
tax
|
|
|
|
|
|
|
|
lda bubble_progress_r,X
|
|
|
|
sta INL
|
|
|
|
inx
|
|
|
|
lda bubble_progress_r,X
|
|
|
|
sta INH
|
|
|
|
|
|
|
|
lda #5
|
|
|
|
sta CURSOR_X
|
|
|
|
lda #166
|
|
|
|
sta CURSOR_Y
|
|
|
|
|
|
|
|
jsr hgr_draw_sprite_1x5
|
|
|
|
|
|
|
|
|
|
|
|
; bubble 2
|
|
|
|
|
|
|
|
lda FRAME
|
|
|
|
adc #3
|
|
|
|
and #3
|
|
|
|
asl
|
|
|
|
tax
|
|
|
|
|
|
|
|
lda bubble_progress_r,X
|
|
|
|
sta INL
|
|
|
|
inx
|
|
|
|
lda bubble_progress_r,X
|
|
|
|
sta INH
|
|
|
|
|
|
|
|
lda #9
|
|
|
|
sta CURSOR_X
|
|
|
|
lda #154
|
|
|
|
sta CURSOR_Y
|
|
|
|
|
|
|
|
jsr hgr_draw_sprite_1x5
|
|
|
|
|
|
|
|
; bubble 3
|
|
|
|
|
|
|
|
lda FRAME
|
|
|
|
adc #5
|
|
|
|
and #3
|
|
|
|
asl
|
|
|
|
tax
|
|
|
|
|
|
|
|
lda bubble_progress_r,X
|
|
|
|
sta INL
|
|
|
|
inx
|
|
|
|
lda bubble_progress_r,X
|
|
|
|
sta INH
|
|
|
|
|
|
|
|
lda #7
|
|
|
|
sta CURSOR_X
|
|
|
|
lda #160
|
|
|
|
sta CURSOR_Y
|
|
|
|
|
|
|
|
jsr hgr_draw_sprite_1x5
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
bubble_progress_r:
|
|
|
|
.word bubble_r_sprite0
|
|
|
|
.word bubble_r_sprite0
|
|
|
|
.word bubble_r_sprite1
|
|
|
|
.word bubble_r_sprite1
|
|
|
|
|
|
|
|
|
|
|
|
bubble_r_sprite0:
|
|
|
|
.byte $AA
|
|
|
|
.byte $FF
|
|
|
|
.byte $AA
|
|
|
|
.byte $FF
|
|
|
|
.byte $AA
|
|
|
|
|
|
|
|
bubble_r_sprite1:
|
|
|
|
.byte $FF
|
|
|
|
.byte $AA
|
|
|
|
.byte $AA
|
|
|
|
.byte $AA
|
|
|
|
.byte $FF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|