|
Atari coding BBS
Re: Scroll text techniques |
Posted by: Bod/STAX
|
Oct,25.2007-17:55
|
I personally use the "windowed" method to do scrolltexts. Instead of rotating the whole line with roxl.w's what you do is, say you're font in 16x16 and you're scrolling 4 pixels per frame. Now what you need is to have a buffer that is (((160+16)*2)*16)*4 in size thus it's just over twice the width of a scanline*16 mutiplied by four (4 shifts per frame*4=16 pixels). Then you read the characer your printing make the relevant shift thus:
move.l font_pos,ao
move.l buff_pos,a1
move.w shift_cnt,d1
addq.w #2,a1
x set 0
rept 16
move.w (a0)+,d0
ror.l d1,d0
or.w d0,x(a1)
swap d0
move.w d0,x+44(a1)
x set x+84
endr
then copy the relevant part of the buffer to the screen, add the height of the scroller to the buffer and increment the shift_cnt by 4, do thus 4 times then reset the buffer position and increment by 2. When you've done all this 320 times you'll have a direct copy behind so you can reset the offset of the buffer to 0.
I'm probably not explaining this very well and like every one else i'm doing it off the topof my head. It's more complicated than roxl.w scrollers, but much quicker. This trick was first done (i think) by TCB.
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
Scroll text techniques
|
Vincent Riviere
|
Oct,24.2007-20:03
|
Re: Scroll text techniques
|
earx
|
Oct,24.2007-20:09
|
Re: Scroll text techniques
|
earx
|
Oct,24.2007-20:27
|
Re: Scroll text techniques
|
earx
|
Oct,24.2007-20:31
|
Re: Scroll text techniques
|
earx
|
Oct,24.2007-20:32
|
Re: Scroll text techniques
|
Vincent Riviere
|
Oct,24.2007-22:33
|
Re: Scroll text techniques
|
earx
|
Oct,25.2007-09:49
|
Re: Scroll text techniques
|
ggn
|
Oct,25.2007-11:23
|
Re: Scroll text techniques
|
Bod/STAX
|
Oct,25.2007-17:55
|
Re: Scroll text techniques
|
evil
|
Oct,27.2007-17:50
|
Re: Scroll text techniques
|
earx
|
Oct,27.2007-19:01
|
Re: Scroll text techniques
|
Bod/STAX
|
Oct,27.2007-19:18
|
Re: Scroll text techniques
|
gloky
|
Nov,25.2007-13:22
|
Re: Scroll text techniques
|
Bod/STAX
|
Nov,25.2007-21:26
|
Re: Scroll text techniques
|
gloky
|
Dec,10.2007-22:15
|
Re: Scroll text techniques
|
gloky
|
Jan,04.2008-15:10
|
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|