Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;================================
- ;================================
- ;================================
- ;================================
- !align 255,0
- color_fade_0f_hi_nybble:
- !byte $00, $00, $00, $00, $00, $00, $00, $00
- !byte $01, $0d, $03, $0c, $04, $02, $09, $00
- !byte $02, $09, $00, $00, $00, $00, $00, $00
- !byte $03, $0c, $04, $02, $09, $00, $00, $00
- !byte $04, $02, $09, $00, $00, $00, $00, $00
- !byte $05, $08, $02, $09, $00, $00, $00, $00
- !byte $06, $00, $00, $00, $00, $00, $00, $00
- !byte $07, $0f, $05, $08, $02, $09, $00, $00
- !byte $08, $02, $09, $00, $00, $00, $00, $00
- !byte $09, $00, $00, $00, $00, $00, $00, $00
- !byte $0a, $08, $02, $09, $00, $00, $00, $00
- !byte $0b, $09, $00, $00, $00, $00, $00, $00
- !byte $0c, $04, $02, $09, $00, $00, $00, $00
- !byte $0d, $03, $0c, $04, $02, $09, $00, $00
- !byte $0e, $04, $02, $09, $00, $00, $00, $00
- !byte $0f, $05, $08, $02, $09, $00, $00, $00
- !align 255,0
- color_fade_0f_lo_nybble:
- !byte $00, $00, $00, $00, $00, $00, $00, $00
- !byte $10, $d0, $30, $c0, $40, $20, $90, $00
- !byte $20, $90, $00, $00, $00, $00, $00, $00
- !byte $30, $c0, $40, $20, $90, $00, $00, $00
- !byte $40, $20, $90, $00, $00, $00, $00, $00
- !byte $50, $80, $20, $90, $00, $00, $00, $00
- !byte $60, $00, $00, $00, $00, $00, $00, $00
- !byte $70, $f0, $50, $80, $20, $90, $00, $00
- !byte $80, $20, $90, $00, $00, $00, $00, $00
- !byte $90, $00, $00, $00, $00, $00, $00, $00
- !byte $a0, $80, $20, $90, $00, $00, $00, $00
- !byte $b0, $90, $00, $00, $00, $00, $00, $00
- !byte $c0, $40, $20, $90, $00, $00, $00, $00
- !byte $d0, $30, $c0, $40, $20, $90, $00, $00
- !byte $e0, $40, $20, $90, $00, $00, $00, $00
- !byte $f0, $50, $80, $20, $90, $00, $00, $00
- anim:
- !binary "part2/part2_fade.bin"
- table_of_8:
- !byte 0, 8, 16, 24, 32, 40, 48, 56, 64
- !byte 72, 80, 88, 96, 104, 112, 120, 128
- table_of_8_fadein:
- !byte >color_fadein_table + (0*256)
- !byte >color_fadein_table + (1*256)
- !byte >color_fadein_table + (2*256)
- !byte >color_fadein_table + (3*256)
- !byte >color_fadein_table + (4*256)
- !byte >color_fadein_table + (5*256)
- !byte >color_fadein_table + (6*256)
- !byte >color_fadein_table + (7*256)
- !byte >color_fadein_table + (8*256)
- sprite_color_flash:
- !byte $1,$d,$3,$c,$4,$2,$9,$0
- !byte $0,$6,$b,$4,$c,$3,$d,$1
- generate_fadein_table:
- ldx #00
- --:
- lda #00
- sta $11
- -:
- lda $11
- and #$0f
- tay
- lda table_of_8, y
- sta hi_nybble_ptr
- hi_nybble_ptr = *+1
- lda color_fade_0f_hi_nybble, x
- sta $10
- lda $11
- and #$f0
- lsr
- lsr
- lsr
- lsr
- tay
- lda table_of_8, y
- sta lo_nybble_ptr
- lo_nybble_ptr = *+1
- lda color_fade_0f_lo_nybble, x
- ora $10
- bitmap_dst_ptr = *+1
- sta color_fadein_table
- inc bitmap_dst_ptr
- bne +
- inc bitmap_dst_ptr + 1
- +:
- inc $11
- bne -
- inx
- cpx #8
- bne --
- rts
- bitmap_fadein:
- bitmap_fadein_begin
- anim_ptr_1 = *+1
- ldx anim, y
- beq nextChar
- dex
- txa
- anim_ptr_2 = *+1
- sta anim, y
- cmp #8
- bcs nextChar
- lda table_of_8_fadein, x
- sta bitmap_table_page
- src_ptr_1 = *+1
- ldx bitmap_color_src, y
- bitmap_table_page = *+2
- lda color_fadein_table, x
- dst_ptr_1 = *+1
- sta bitmap_color_dst, y
- nextChar:
- iny
- bne ++
- inc anim_ptr_1 + 1
- inc anim_ptr_2 + 1
- inc src_ptr_1 + 1
- inc dst_ptr_1 + 1
- ++:
- cpy #<(bitmap_color_dst + (1000))
- bne bitmap_fadein_begin
- lda dst_ptr_1 + 1
- cmp #>(bitmap_color_dst + (1000))
- bne bitmap_fadein_begin
- reset_fadeout_ptrs:
- lda #>anim
- sta anim_ptr_1+1
- sta anim_ptr_2+1
- lda #>bitmap_color_src
- sta src_ptr_1+1
- lda #>bitmap_color_dst
- sta dst_ptr_1 + 1
- ldy #0
- rts
- bitmap_color_src = $6400
- bitmap_color_dst = $6000
- color_fadein_table = $b000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement