Mail Archives: djgpp/1999/03/16/22:40:53
> Jon DeMarks wrote in message <36E989ED DOT 83142786 AT fuse DOT net>...
> >How can I get the text to scroll for my game, here is my function thus
> >far:
> >
> >void print_str(char *str) { char *c; int i,x; i=0; x=10;
> >if(!str[0]) return; do { c=str[i]; textout(text_layer,font,c,x,10,15);
> >animate_layers(); x=x+8; i++; } while(str[i]!=0); }
> >
> >any suggestions?
Use "sliding" bitmaps - that is how I did it. You put the text on one, the
background it is to be animated over in another, with a third "master"
bitmap holding the background. Then
1) Draw the text on the temporary text bitmap.
2) Blit this to the slider bitmap.
2) Blit slider to screen in a certain x position, increment the x when done
to get movement.
3) Erase the slider bitmap from the master bitmap
4) Repeat from 2
If you do not catch it mail me - I have working code that does exactly
this.
--
Spawned By Rylan
Rylan AT intekom DOT co DOT za
http://home.intekom.com/rylan/
Power Overwhelming
- Raw text -