home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
temacd
/
planearcade
/
planearcade.exe
/
Tank3.bmp
/
log.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2004-10-30
|
1KB
|
59 lines
#include "main.h"
//--------------------------------------------------------------------
// Name: LogStart()
// Desc: Vytvori log.txt, napise hlavicku
//--------------------------------------------------------------------
void LogStart()
{
//subor
FILE *con = NULL;
//otvori pre zapis
con = fopen("log.txt","w");
//zapise spravu
fprintf(con,"********************************************\n");
fprintf(con,"<<<<<<<<<<<<<<P.L.E.1. Engine>>>>>>>>>>>>>>>\n");
fprintf(con,"********************************************\n");
fprintf(con," copyright (c) 2004 3D Games development\n");
fprintf(con,"********************************************\n\n");
//zavrie subor
fclose(con);
}
//--------------------------------------------------------------------
// Name: LogPrint()
// Desc: Zapise spravu do logu
//--------------------------------------------------------------------
void LogPrint(char *Text) {
//subor
FILE *con = NULL;
//otvori pre zapis a citanie
con = fopen("log.txt","r+w");
//pretoci na koniec
fseek(con, 0, SEEK_END);
//zapise spravu
fprintf(con,"%s\n",Text);
//zavrie subor
fclose(con);
}
//--------------------------------------------------------------------
// Name: LogMessage()
// Desc: Vypise spravu na obrazovku
//--------------------------------------------------------------------
void LogMessage(char *Text) {
MessageBox(NULL, Text, "Engine", MB_OK);
}