|
Which type of output is faster |
Kevin Epps
Member #5,856
May 2005
|
Hey Guys, Which version of text output do you think is faster? textprintf? or textout? |
GullRaDriel
Member #3,861
September 2003
|
Isn't textout using textprintf ? "Code is like shit - it only smells if it is not yours" |
X-G
Member #856
December 2000
|
Assuming it doesn't... textout, for obvious reasons. -- |
Lenman
Member #4,522
April 2004
|
Quote: Isn't textout using textprintf ? Wouldn't make sense to me. textprintf formatting the text and then using textout would be much more plausible. EDIT: I just decided to take a look at the source to find out void textprintf_ex(BITMAP *bmp, AL_CONST FONT *f, int x, int y, int color, int bg, AL_CONST char *format, ...) { char buf[512]; va_list ap; ASSERT(bmp); ASSERT(f); ASSERT(format); va_start(ap, format); uvszprintf(buf, sizeof(buf), format, ap); va_end(ap); textout_ex(bmp, f, buf, x, y, color, bg); }
-------------------------------------------------------- Perhaps I should let you all in on a little secret. No one likes you in the future. This time period is looked at as being full of lazy, self-centered, civically ignorant sheep. -John Titor |
Kevin Epps
Member #5,856
May 2005
|
Ok, great. I'll use textout then. Thanks! |
Tobias Dammers
Member #2,604
August 2002
|
General rule of thumb: Use textprintf when you need the formatting, textout when you don't. --- |
|