diff --git a/megademo/SIZE b/megademo/SIZE index a58982a6..1eff825b 100644 --- a/megademo/SIZE +++ b/megademo/SIZE @@ -7,3 +7,5 @@ 29285 -- all sprites in 29228 -- adding susie + bird 29178 -- erase extraneous from leaving.png + 29204 -- add door sprite + 29476 -- get leaving all working diff --git a/megademo/leaving.s b/megademo/leaving.s index dda83e91..63e8f1ca 100644 --- a/megademo/leaving.s +++ b/megademo/leaving.s @@ -162,7 +162,7 @@ lv_no_carry: ;================= lda FRAMEH ; 3 - cmp #30 ; 2 + cmp #35 ; 2 bne lv_not_done ; 3 jmp lv_all_done lv_not_done: @@ -267,7 +267,7 @@ draw_the_yard: lv_jump_table: .word (lv_state0-1) .word (lv_state2-1) - .word (lv_state0-1) + .word (lv_state4-1) lv_back_from_jumptable: @@ -312,13 +312,35 @@ lv_all_done: ;===================== ; State0 : do nothing ;===================== - ; Delay 5259-3 = 5256 + ; Delay 5259 + ; -2072 + ; -3 + ;=========== + ; 3184 + lv_state0: - ; Try X=209 Y=5 cycles=5256 - ldy #5 ; 2 -lvloopT:ldx #209 ; 2 + ; draw bird + lda #>bird_stand_right_sprite ; 2 + sta INH ; 3 + lda #door_sprite ; 2 sta INH ; 3 @@ -449,6 +471,73 @@ lv_done_susie: jmp lv_back_from_jumptable ; 3 + + ;====================================================== + ; State4 : on bird + ;====================================================== + ; 5259 + ; -2227 = 2208+19 (draw bird) + ; -1661 (draw door) + ; -6 (return) + ;========== + ; 1365 + +lv_state4: + + lda TFV_X ; 3 + sta XPOS ; 3 + lda #20 ; 2 + sta YPOS ; 3 + + lda FRAMEH ; 3 + and #$1 ; 2 + beq lv_bwalk ; 3 + ;=========== + ; 19 + + +lv_bstand: + ; draw bird/rider standing ; -1 + lda #>bird_rider_stand_right ; 2 + sta INH ; 3 + lda #bird_rider_walk_right ; 2 + sta INH ; 3 + lda #