Foot animation test

This commit is contained in:
Pecusx
2025-05-26 09:45:32 +02:00
parent 0edb181e43
commit e58e2f556a
2 changed files with 32 additions and 6 deletions
+32 -6
View File
@@ -620,16 +620,16 @@ not_end_v1
not_end_v2 not_end_v2
stx EyesPhase stx EyesPhase
jsr MenuEyesSet jsr MenuEyesSet
jmp no_timber_animation jmp no_eyes_animation
no_eyes no_eyes
; no animation in progress let's make new ; no animation in progress let's make new
lda AnimTimer lda AnimTimer
cmp #30 cmp #30
bne no_timber_animation bne no_eyes_animation
mva #0 AnimTimer ; reset timer mva #0 AnimTimer ; reset timer
lda RANDOM lda RANDOM
and #%00000011 and #%00000011
beq no_timber_animation ; 00 - no animation beq no_eyes_animation ; 00 - no animation
cmp #1 cmp #1
bne no_eyes_change ; up/down bne no_eyes_change ; up/down
; eyes change (or not :) ) ; eyes change (or not :) )
@@ -640,12 +640,35 @@ no_eyes
ldx #0 ; eyes down (1-7) ldx #0 ; eyes down (1-7)
@ stx EyesPhase @ stx EyesPhase
jsr MenuEyesSet jsr MenuEyesSet
jmp no_timber_animation jmp no_eyes_animation
no_eyes_change no_eyes_change
; %10 and %11 - eyes animation ; %10 and %11 - eyes animation
inc EyesPhase inc EyesPhase
ldx EyesPhase ldx EyesPhase
jsr MenuEyesSet jsr MenuEyesSet
no_eyes_animation
; Foot animation (or not)
; check if animation in progress
; foot....
ldx FootPhase
beq no_foot ; eyes up (no animation)
; continue foot animation
inx
cpx #7 ; after last phase of foot animation
bne not_end_f
ldx #0 ; set to mo animation phase
not_end_f
stx FootPhase
jsr MenuFootSet
jmp no_timber_animation
no_foot
; no animation in progress let's make new
lda RANDOM
and #%00011111
bne no_timber_animation ; 0 - animation
ldx #1 ; start foot animation
stx FootPhase
jsr MenuFootSet
no_timber_animation no_timber_animation
rts rts
.endp .endp
@@ -2257,10 +2280,13 @@ FootPhase
;-------------------------------------------------- ;--------------------------------------------------
; set eyes to phase in FootPhase register ; set eyes to phase in FootPhase register
; ldx FootPhase ; ldx FootPhase
txa
and #%00000001
tax
lda title_animf_tableL,x lda title_animf_tableL,x
sta timber_eyes_addr sta timber_foot_addr
lda title_animf_tableH,x lda title_animf_tableH,x
sta timber_eyes_addr+1 sta timber_foot_addr+1
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
BIN
View File
Binary file not shown.