dos33fsprogs/games/monkey/monkey_church.s

154 lines
2.2 KiB
ArmAsm
Raw Normal View History

2020-09-25 03:33:59 +00:00
; stuff regarding the church
2020-09-29 23:30:34 +00:00
; if x<4 goto MONKEY_MANSION_PATH at
; if x>35 goto MONKEY_CHURCH at
2020-09-25 03:33:59 +00:00
church_check_exit:
lda GUYBRUSH_X
cmp #4
2020-09-29 23:30:34 +00:00
bcc church_to_mansion_path
2020-09-25 03:33:59 +00:00
cmp #35
2020-09-29 23:30:34 +00:00
bcs church_to_town
2020-09-25 03:33:59 +00:00
bcc church_no_exit
2020-09-29 23:30:34 +00:00
church_to_mansion_path:
lda #MONKEY_MANSION_PATH
2020-09-25 03:33:59 +00:00
sta LOCATION
lda #26
2020-09-25 03:33:59 +00:00
sta GUYBRUSH_X
sta DESTINATION_X
lda #24
2020-09-25 03:33:59 +00:00
sta GUYBRUSH_Y
sta DESTINATION_Y
jsr change_location
jmp church_no_exit
2020-09-29 23:30:34 +00:00
church_to_town:
lda #MONKEY_TOWN
2020-09-25 03:33:59 +00:00
sta LOCATION
lda #1
2020-09-25 03:33:59 +00:00
sta GUYBRUSH_X
sta DESTINATION_X
lda #20
sta GUYBRUSH_Y
lda #30
2020-09-25 03:33:59 +00:00
sta DESTINATION_Y
lda #GUYBRUSH_SMALL
sta GUYBRUSH_SIZE
2020-09-25 03:33:59 +00:00
jsr change_location
jmp church_no_exit
church_no_exit:
rts
;==========================
;==========================
; church adjust destination
;==========================
;==========================
church_adjust_destination:
; just make Y always 32
2020-09-25 03:33:59 +00:00
ch_check_y:
; if x < 28, Y must be between 16 and 18
; if x < 35, Y must be between 8 and 28
ch_y_too_small:
lda #32
2020-09-25 03:33:59 +00:00
sta DESTINATION_Y
done_ch_adjust:
rts
2020-10-13 03:52:17 +00:00
;=======================
;=======================
; draw church foreground
;=======================
;=======================
draw_church_foreground:
2020-09-25 03:33:59 +00:00
2020-10-13 03:52:17 +00:00
lda GUYBRUSH_X
cmp #19
bcc draw_church_left_sprite
cmp #24
bcs draw_church_right_sprite
bcc draw_church_no_sprite
draw_church_right_sprite:
lda #25
sta XPOS
lda #<church_right_sprite
sta INL
lda #>church_right_sprite
jmp draw_church_sprite
draw_church_left_sprite:
lda #9
sta XPOS
2020-09-25 03:33:59 +00:00
2020-10-13 03:52:17 +00:00
lda #<church_left_sprite
sta INL
lda #>church_left_sprite
2020-09-25 03:33:59 +00:00
2020-10-13 03:52:17 +00:00
draw_church_sprite:
sta INH
lda #32
sta YPOS
jsr put_sprite_crop
draw_church_no_sprite:
rts
2020-09-25 03:33:59 +00:00
2020-10-13 03:52:17 +00:00
church_right_sprite:
.byte 14,2
.byte $30,$33,$AA,$AA,$55,$00,$AA,$AA,$AA,$05,$55,$55,$55,$55
.byte $bb,$b3,$33,$55,$55,$50,$00,$AA,$AA,$00,$d2,$25,$55,$55
2020-09-25 03:33:59 +00:00
2020-10-13 03:52:17 +00:00
church_left_sprite:
.byte 8,2
.byte $0A,$50,$77,$57,$07,$77,$00,$AA
.byte $00,$55,$07,$55,$00,$07,$00,$55
2020-09-25 03:33:59 +00:00
2020-10-13 03:52:17 +00:00
;=============================
;=============================
; church check bounds
;=============================
;=============================
2020-09-25 03:33:59 +00:00
2020-10-01 19:07:02 +00:00
church_check_bounds:
rts
;=============================
alley_action:
alley_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts
church_door_action:
church_door_nothing:
lda #VERB_WALK
sta CURRENT_VERB
rts