forked from coolsee/OpenMugen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.cpp
More file actions
43 lines (29 loc) · 767 Bytes
/
global.cpp
File metadata and controls
43 lines (29 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "global.h"
FILE *pLogFile=NULL;
void PrintMessage(char *str,...)
{
char string[255]; // Temporary string
va_list ap; // Pointer To List Of Arguments
va_start(ap, str); // Parses The String For Variables
vsprintf(string, str, ap); // Converts Symbols To Actual Numbers
va_end(ap);
#ifdef _XBOX
pLogFile=fopen("d:\\log.txt","a+");
#else
pLogFile=fopen("log.txt","a+");
#endif
fprintf(pLogFile,string);
fprintf(pLogFile,"\n");
fclose(pLogFile);
printf(string);
printf("\n");
}
void InitLogFile()
{
#ifdef _XBOX
pLogFile=fopen("d:\\log.txt","w");
#else
pLogFile=fopen("log.txt","w");
#endif
fclose(pLogFile);
}