delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/17/09:28:17

Message-ID: <005f01b9f473$633a97c0$4af9c6c3@johans-dator>
From: "Johan Henriksson" <johan DOT he AT telia DOT com>
To: <djgpp AT delorie DOT com>
Subject: Re: Scrolling Text with Allegro 3.1
Date: Fri, 17 Mar 1995 15:28:33 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

from Johan Henriksson, Sweden    HTTP://come.to/jhewok  |
Primary mail: johan DOT he AT telia DOT com                  #UIN 12035895
Second: jhe75 AT hotmail DOT com    Third: johan_he AT yahoo DOT com
Leadprogrammer and FX-specialist at Real software
http://come.to/real_software
*************************************************************************
-----Original Message-----
From: Stefan Viljoen <rylan AT intekom DOT com>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Wednesday, March 17, 1999 5:16 AM
Subject: Re: Scrolling Text with Allegro 3.1


>> 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

hm.. Wouldn't this be quite slow? Espeically with masked_blit...


>
>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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019