ootw: c2: walking dude

This commit is contained in:
Vince Weaver 2019-07-12 15:35:26 -04:00
parent 6831a7718b
commit 64d1570fee
5 changed files with 114 additions and 11 deletions

View File

@ -17,6 +17,10 @@ ootw_c2:
sta ON_ELEVATOR
sta CITY_MOVIE_SEEN
sta CART_OUT
sta DUDE_OUT
lda #39
sta DUDE_X
lda #$FA
sta CART_X

View File

@ -296,7 +296,7 @@ c2_no_bg_action:
lda WHICH_JAIL
cmp #1
bne c2_no_fg_action
bne c2_no_cart_action
c2_draw_cart:
@ -311,26 +311,66 @@ c2_draw_cart:
jsr put_sprite_crop
jmp c2_no_fg_action
c2_no_cart_action:
lda WHICH_JAIL
cmp #2
bne c2_no_fg_action
c2_draw_dude:
lda DUDE_X
sta XPOS
lda #36
sta YPOS
lda DUDE_X
and #3
asl
tay
lda walking_dude_sprites,Y
sta INL
lda walking_dude_sprites+1,Y
sta INH
jsr put_sprite_crop
jmp c2_no_fg_action
c2_no_fg_action:
;====================
; activate fg objects
;====================
c2_fg_check_jail1:
lda WHICH_JAIL
cmp #1
bne c2_move_fg_objects
bne c2_fg_check_jail2
lda CART_OUT
bne c2_move_fg_objects
bne c2_fg_check_jail2
inc CART_OUT
c2_fg_check_jail2:
lda WHICH_JAIL
cmp #2
bne c2_move_fg_objects
lda DUDE_OUT
bne c2_move_fg_objects
inc DUDE_OUT
;================
; move fg objects
;================
c2_move_fg_objects:
lda CART_OUT
cmp #1
bne cart_not_out
@ -350,6 +390,26 @@ c2_move_fg_objects:
cart_not_out:
lda DUDE_OUT
cmp #1
bne dude_not_out
; move dude
lda FRAMEL
and #$7
bne dude_not_out
dec DUDE_X
lda DUDE_X
cmp #$fa
bne dude_not_out
inc DUDE_OUT
dude_not_out:
;===============
; page flip
@ -450,3 +510,39 @@ cart_sprite:
.byte $00,$aa,$00,$aa,$00,$aa,$00
.byte $00,$0a,$00,$0a,$00,$0a,$00
.byte $00,$aa,$00,$aa,$00,$aa,$00
walking_dude_sprites:
.word walking_dude0
.word walking_dude1
.word walking_dude2
.word walking_dude1
walking_dude0: .byte 6,6
.byte $AA,$AA,$AA,$AA,$AA,$AA
.byte $7A,$77,$f7,$f7,$7A,$AA
.byte $77,$7f,$77,$77,$77,$AA
.byte $A7,$77,$77,$07,$07,$AA
.byte $AA,$07,$70,$f7,$70,$00
.byte $AA,$00,$77,$7f,$77,$00
walking_dude1: .byte 6,6
.byte $AA,$AA,$7A,$7A,$7A,$AA
.byte $77,$f7,$7f,$7f,$77,$AA
.byte $77,$77,$77,$77,$77,$AA
.byte $AA,$77,$07,$70,$00,$0A
.byte $AA,$00,$77,$ff,$77,$00
.byte $AA,$00,$77,$77,$77,$00
walking_dude2: .byte 6,6
.byte $7A,$77,$f7,$f7,$7A,$AA
.byte $77,$7f,$77,$77,$77,$AA
.byte $A7,$77,$77,$07,$07,$AA
.byte $AA,$07,$70,$f7,$70,$00
.byte $AA,$00,$77,$7f,$77,$00
.byte $AA,$00,$77,$77,$77,$00

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -218,34 +218,34 @@ jail4_rle: .byte $28 ; ysize=48
.byte $00, $77, $00, $22, $00, $77, $00
.byte $77, $00, $22, $55, $22,$22, $00, $22
.byte $00, $22, $00, $62, $00, $77, $00
.byte $77, $00, $22, $00, $77, $00, $77
.byte $77, $00, $22, $00, $77, $60, $77
.byte $00, $22, $00, $77, $00, $77, $00
.byte $22,$22, $00, $77, $00, $77, $00, $22
.byte $00, $77, $00, $77, $00, $22, $55
.byte $77,$77, $00, $22, $00, $22, $00, $26
.byte $00, $77, $00, $77, $88, $22, $00
.byte $77, $00, $77, $88, $22, $00, $77
.byte $77, $66, $77, $88, $22, $00, $77
.byte $00, $77, $88, $22,$22, $00, $77, $00
.byte $77, $88, $22, $00, $77, $00, $77
.byte $88, $22,$22, $77,$77, $00, $22, $00, $22
.byte $00, $22, $00, $77, $00, $77, $88
.byte $22, $00, $77, $00, $77, $88, $22
.byte $22, $55, $77, $00, $77, $58, $22
.byte $00, $77, $00, $77, $88, $22,$22, $00
.byte $77, $00, $77, $88, $22, $00, $77
.byte $00, $77, $88, $A4,$22, $00, $22, $00
.byte $22, $00, $22, $00, $77, $88, $77
.byte $88, $22, $00, $77, $88, $77, $88
.byte $88, $22, $55, $77, $00, $77, $05
.byte $22, $00, $77, $88, $77, $88, $22,$22
.byte $00, $77, $88, $77, $88, $22, $00
.byte $77, $88, $77, $88, $A4,$22, $00, $22
.byte $00, $22, $00, $22, $00, $77, $88
.byte $77, $88, $22, $00, $77, $88, $77
.byte $88, $22, $00, $77, $88, $77, $88
.byte $77, $88, $22, $05, $77, $66, $77
.byte $00, $22, $00, $77, $88, $77, $88
.byte $22,$22, $00, $77, $88, $77, $88, $22
.byte $00, $77, $88, $77, $88, $A4,$22, $00
.byte $22, $00, $22, $00, $52, $50, $57
.byte $58, $57, $58, $52, $50, $57, $58
.byte $57, $58, $52, $50, $57, $58, $57
.byte $57, $50, $52, $50, $57, $58, $57
.byte $58, $52,$52, $50, $57, $58, $57, $58
.byte $52, $50, $E7, $E8, $E7, $E8, $E2
.byte $A3,$52, $00, $52, $00, $52, $00, $A0,$1A,$05

View File

@ -133,9 +133,11 @@ GAME_OVER = $E5 ; ALL
DNA_OUT = $E5 ; INTRO
MESSAGE_CURRENT = $E5 ; INTRO
EQUAKE_PROGRESS = $E6 ; C1
DNA_PROGRESS = $E6 ; INTRO
TIME_COUNT = $E6 ; INTRO
EQUAKE_PROGRESS = $E6 ; C1
DUDE_OUT = $E6 ; C2
EARTH_OFFSET = $E7 ; ALL??
DNA_COUNT = $E7 ; INTRO
@ -147,6 +149,7 @@ BOULDER_X = $E8 ; C1
CART_X = $E8 ; C2
BOULDER_Y = $E9 ; C1
DUDE_X = $E9 ; C2
PHYSICIST_STATE = $EA
P_STANDING = $00