All pastes #835613 Raw Edit

Unbenannt

public text v1 · immutable
#835613 ·published 2007-12-28 23:18 UTC
rendered paste body
void movieMod::ToggleDemoInfo_c( const idCmdArgs &args ) {

	if(!movie.active){
		gameLocal.Printf( "This command is only available in demo playBack mode\n" );
		return;
	}		

	idStr fileName;
	fileName = "test.demoscan";
 
	char tmp;

	idStr str;

	idFile* file = fileSystem->OpenFileRead( fileName.c_str() );
	if ( file == NULL ) {
		gameLocal.Printf("error while reading the File\n");
		return;
	} 

	// read the file
	for(int i = 0; i<= 1024;i++){
		file->ReadChar(tmp);
		str.Append(tmp); // append to our string
	}

	fileSystem->CloseFile(file);
	gameLocal.Printf(str.c_str()); // test

}