You are not logged in.

#1 2008-08-13 19:24:41

cboomf
Member

console style printf function

using the console, the text output only requires a printf("Hello world!");
but in GRRLIB this is GRRLIB_Printf(100,100,tex_font1,0xFFFFFFFF,1,"Hello world!");
and if i want a console style output it requires working out the y's depending on the font used, which for noobs who want to do graphics in their apps(like me) isn't good, plz ;-) ?

something like :-

int MAXCONSOLEHEIGHT = 10;
int font_height = 10;
int row = 0;

int GRRLIB_ConsolePrintf(u8 font[],char* text,...)
{
    if(row>=MAXCONSOLEHEIGHT)
    {
        row=0;
    }
    GRRLIB_Printf(10,(row*font_height)+10,font,0xFFFFFFFF,1,"%s",text);
    GRRLIB_Render();
    row++;
    return 0;
}

that has bugs :-)

Offline

 

#2 2008-09-17 05:22:17

SquidMan
Member

Re: console style printf function

I think I got what you want. Go look at http://grrlib.santo.fr/forum/viewtopic.php?id=66


Working on WiiMU, libmisc (crypto, compression, archiving, configuration), and a little project called GRRLIB+, an unofficial GRRLIB variant with some added functions for simplicity.

Offline

 

Board footer

Powered by FluxBB