diff --git a/megademo/leaving.s b/megademo/leaving.s index 66444215..8b6bba0f 100644 --- a/megademo/leaving.s +++ b/megademo/leaving.s @@ -196,9 +196,6 @@ lv_state_four: lv_set_state: stx STATE ; 3 - - - ; Try X=203 Y=3 cycles=3064 R2 nop @@ -210,6 +207,11 @@ lvloop9:dex ; 2 dey ; 2 bne lvloop8 ; 2nt/3 + + ;========================== + ; Set graphics mode, delay until done displaying the yard + ;========================== + bit SET_GR ; 4 ; Try X=75 Y=15 cycles=5716 @@ -222,35 +224,177 @@ lvloop7:dex ; 2 bne lvloop6 ; 2nt/3 ;=============================== - ; Draw All the Sprites + ; Draw the Yard ;=============================== - +draw_the_yard: jsr erase_yard ; 6+1249 - ; draw deater - lda #>tfv_stand_right ; 2 - sta INH ; 3 - lda #tfv_stand_right ; 2 + sta INH ; 3 + lda #tfv_walk_right ; 2 + sta INH ; 3 + lda #10 + lda TFV_X ; 3 + sec ; 2 + sbc #5 ; 2 + tax ; 2 + cpx #10 ; 2 + bcs lv_yes_susie ; bge ; 3 + ;============ + ; 14 +lv_no_susie: + ; -1 + inc TFV_Y ; 5 + dec TFV_Y ; 5 + nop ; 2 + nop ; 2 + lda $0 ; 3 + jmp lv_done_susie ; 3 + ;============ + ; 19 +lv_yes_susie: lda #0 ; 2 sta $450,X ; 5 sta $451,X ; 5 lda #$0f ; 2 sta $452,X ; 5 - ;========= - ; 21 +lv_done_susie: + ;=========== + ; 19 + ; draw bird lda #>bird_stand_right_sprite ; 2 @@ -267,46 +411,29 @@ lvloop7:dex ; 2 ;========= ; 26 + 2046 = 2072 - ;====================================================== - ; We have 4550 cycles in the vblank, use them wisely - ;====================================================== + ; draw door + lda #>door_sprite ; 2 + sta INH ; 3 + lda #