Yeah it works.
You could do it two ways that I know of. One using pointers or just using dbPrint.
#include "DarkGDK.h"
void DarkGDK(void)
{
char szLine[20];
char *pstring;
if( dbFileExist( "level.txt" ) )
{
dbPrint( "file exists\n" );
dbOpenToRead( 1, "level.txt" );
if( dbFileOpen( 1 ) ) {
dbPrint( "opened the file\n" );
while( !dbFileEnd( 1 ) )
{
//sprintf( szLine, "%c", dbReadByte( 1 ) );
pstring = dbReadString( 1, szLine );
dbPrint(pstring);
dbWaitKey();
//OutputDebugString( "\n" );
}
dbCloseFile( 1 );
}
}
dbSync();
}
or
#include "DarkGDK.h"
void DarkGDK(void)
{
char szLine[20];
char *pstring;
//while (LoopGDK())
//{
if( dbFileExist( "level.txt" ) )
{
dbPrint( "file exists\n" );
dbOpenToRead( 1, "level.txt" );
if( dbFileOpen( 1 ) ) {
dbPrint( "opened the file\n" );
while( !dbFileEnd( 1 ) )
{
//sprintf( szLine, "%c", dbReadByte( 1 ) );
dbPrint(dbReadString( 1, szLine ));
dbWaitKey();
//OutputDebugString( "\n" );
}
dbCloseFile( 1 );
}
}
dbSync();
//}
}
Futurama 2008