Well I just started on another game ( yeah I don't finish my game because I get a better idea in my head ) and right now I'm just making my screen buttons etc. but now I'm trying to paste the screen props to the screen. So depth/width/height work well, exept that when I try to print the FPS. It seams as if it does not delete like the first number so it keeps writing over it until its 1 big white square. So how do I refresh the fps without the old one staying on screen.
Here's my code ( not much ):
#include "DarkGDK.h"
#include "Main.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbHideMouse ();
Window ();
while ( LoopGDK ( ) )
{
WindowProp ();
dbSync ( );
}
return;
}
void Window ( void )
{
dbSetWindowOff ();
dbSetDisplayMode ( 1280, 1024, 32 );
dbSetWindowTitle ( "Hor'Mea" );
}
void WindowProp ( void )
{
char fps [ 256 ];
char sch [ 256 ];
char scd [ 256 ];
char scw [ 256 ];
sprintf_s( fps, 256, " FramesPerSecond: %d", dbScreenFPS() );
sprintf_s( scw, 256, " Screenwidth: %d", dbScreenWidth() );
sprintf_s( sch, 256, " Screenheight: %d", dbScreenHeight() );
sprintf_s( scd, 256, " Screendepth: %d", dbScreenDepth() );
dbText( 0,0, fps );
dbText( 0,20, scw );
dbText( 0,40, sch );
dbText( 0,60, scd );
}
The printing is based on the code Sparky uses in its ray collsion cast demo.
Isocadia