Author Topic: sinus scroll..  (Read 3994 times)

0 Members and 1 Guest are viewing this topic.

Offline marlon

  • C= 64
  • **
  • Posts: 38
  • Karma: 15
    • View Profile
sinus scroll..
« on: February 11, 2012 »
Hello everyone..

I am trying to figure out how to sinus wave a horizontal scroller or just a logo ..
I can imagine the process for waving each vertical line in the scroll text or logo must be very slow compared to doing it horizontally..
What is the smartest way to do this?

Windows7 is my os btw!  =)

Many regards,
Marlon Bodhi.

Offline marlon

  • C= 64
  • **
  • Posts: 38
  • Karma: 15
    • View Profile
Re: sinus scroll..
« Reply #1 on: February 11, 2012 »
Did I forget to mention that I have not done much in programming..
I was mostly active back then as a graphician..

But when waving up and down will I not have a lot of cache misses?

- Marlon Bodhi

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: sinus scroll..
« Reply #2 on: February 11, 2012 »
I don't think there's much that could be done for writing to the buffer but maybe turning the font through 90 deg would help as you'd then be reading horizontally for each vertical slice.

Offline marlon

  • C= 64
  • **
  • Posts: 38
  • Karma: 15
    • View Profile
Re: sinus scroll..
« Reply #3 on: February 11, 2012 »

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: sinus scroll..
« Reply #4 on: February 11, 2012 »
Heh, no. Just have your fonts stored so each character is pre rotated by 90 deg, then when you draw each vertical slice of the scroller you are reading horizontally from the character buffer.

EDIT: I think you might have to flip them as well as rotate.
« Last Edit: February 11, 2012 by Stonemonkey »