Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Want Text to appear gradually from Left to Right

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Want Text to appear gradually from Left to Right
l j
Member #10,584
January 2009
avatar

Yep, nobody here knows how to do basic stuff at all.
Everything in the depot just magicly appeared here.

Oh and if you can code a rpg, then making this typewriter effect should be no challenge at all.

And a tip, since you are using C++, check string::substr. If you can't manage to get it working with this function...

HappyBoy
Member #13,462
September 2011

To: LennyLen

Huh? Fall for what? I'm actually being serious. See for yourself, son. Nobody has helped so far and I suspect it's because they genuinely don't know how to do it - which is perfectly acceptable, I just wish they'd stop saying it's so easy and/or I'm such a n00b when they themselves can't even do it. They type hypothetical stuff, but when I ask them to demonstrate, they choke and run off. Other people try to type code but it's dead wrong - you can tell just by looking at it.

To: Tarron

Well that's obviously wrong, bro, about as wrong everybody else's replies to this thread, because I'm running and contributing to my RPG as we speak, and I still don't know how to make a (decent) typewriter effect.

LennyLen
Member #5,313
December 2004
avatar

HappyBoy said:

Nobody has helped so far

They have, you're just too stubborn and obnoxious to recognize the help. Nobody is going to write it for you, but if you attempt to do it yourself, and post the results, people will recognize that you have made an attempt and will help you fix it.

It's up to YOU to do most of the work, nobody else.

You probably won't get much help any more though, as you have the attitude of a spoiled brat.

gnolam
Member #2,030
March 2002
avatar

I was going to say "Man, this poster is worse than that HP guy!", but then I realized they were in fact one and the same...

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

HappyBoy
Member #13,462
September 2011

Oh I've come to realize that I probably won't get much help, but I think it's because I'm actually a better C++ programmer than anybody else on this thread, which believe me is really sad.

LennyLen
Member #5,313
December 2004
avatar

Yes it is sad that you believe that.

Don't let the door hit you on the way out... actually, on second thoughts, do let it.

HappyBoy
Member #13,462
September 2011

Johan, do you mean like this? Because this does not work. I haven't added the PrintOut or the Rest just yet, because my compiler is underlining the two strings inside the parentheses.

#include <iostream>
#include <allegro.h>
#include <time.h>
#include <ctime>
#include <stdlib.h>
#include <string>

int main ()
{

int i = 0 ;

std::string diffbuff ("Hello world!");

std::string srcbuff("Hello world!");

for(i=0;;i++)
{
strcpy(diffbuff,srcbuff);
diffbuff[i] = 0;
printf("%s\n",diffbuff);
if(srcbuff[i] == 0)
break;
}

readkey ();
return 0;
} // End Main Function.

END_OF_MAIN ()

 1   2 


Go to: