Formatted text output by San16th Sep 2011 7:33
|
---|
Summary Text output functions that format input parameters according to format string. Description Text output functions that format input parameters according to format string. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com #include "stdio.h" #include "stdlib.h" void dbPrintf(char * format, ...){ char buf[256]; va_list args; va_start(args, format); vsprintf(buf,format, args); dbPrint(buf); va_end(args); } void dbTextf(int x, int y, char * format, ...){ char buf[256]; va_list args; va_start(args, format); vsprintf(buf, format, args); dbText(x,y,buf); va_end(args); } void dbCenterTextf(int x, int y, char * format, ...){ char buf[256]; va_list args; va_start(args, format); vsprintf(buf, format, args); dbCenterText(x,y,buf); va_end(args); } |