Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- draw4ColumnsNormal:
- {
- ; get bitmap pointer
- ldx ImageXPosInBytes
- ldy ImageYPos
- lda YCoordTableLo,y
- clc
- adc XCoordTableLo,x
- sta BitmapPtr
- lda YCoordTableHi,y
- adc XCoordTableHi,x
- ldx CurrentPage
- adc BitmapHiByteForPage,x
- sta BitmapPtr+1
- ldx #$00
- {
- ldy #$00
- lda (BitmapPtr),y ; read from bitmap
- ldy BgImageBuffer+2,x ; read byte from image
- and MaskTable,y ; get masking outline of image byte and clear covered bits in bitmap
- ora BgImageBuffer+2,x ; now or the image bytes on top of the background
- ldy #$00
- sta (BitmapPtr),y ; and store in bitmap
- inx
- ldy #$08
- lda (BitmapPtr),y ; read from bitmap
- ldy BgImageBuffer+2,x ; read byte from image
- and MaskTable,y ; get masking outline of image byte and clear covered bits in bitmap
- ora BgImageBuffer+2,x ; now or the image bytes on top of the background
- ldy #$08
- sta (BitmapPtr),y ; and store in bitmap
- inx
- ldy #$10
- lda (BitmapPtr),y ; read from bitmap
- ldy BgImageBuffer+2,x ; read byte from image
- and MaskTable,y ; get masking outline of image byte and clear covered bits in bitmap
- ora BgImageBuffer+2,x ; now or the image bytes on top of the background
- ldy #$10
- sta (BitmapPtr),y ; and store in bitmap
- inx
- ldy #$18
- lda (BitmapPtr),y ; read from bitmap
- ldy BgImageBuffer+2,x ; read byte from image
- and MaskTable,y ; get masking outline of image byte and clear covered bits in bitmap
- ora BgImageBuffer+2,x ; now or the image bytes on top of the background
- ldy #$18
- sta (BitmapPtr),y ; and store in bitmap
- inx
- lda BitmapPtr
- and #$07
- beq oneRowUp
- dec BitmapPtr
- dec BlockImageVisibleHeight
- bne _cont
- jmp endDraw
- oneRowUp:
- lda BitmapPtr ; move one char row up
- sec
- sbc #$39
- sta BitmapPtr
- lda BitmapPtr+1
- sbc #$01
- sta BitmapPtr+1
- dec BlockImageVisibleHeight
- bne _cont
- }
- jmp endDraw
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement