4 #include "Platform.hpp"
6 #include "SharedString.hpp"
14 static void log( VivoxLogSeverity severity
, const char* pattern
, ... )
17 va_start( valist
, pattern
);
21 case VLS_CRITICAL
: // Maps to error
22 case VLS_ERROR
: uFlags
= EqLog::ERR
; break;
23 case VLS_INFO
: uFlags
= EqLog::INF
; break;
24 case VLS_WARN
: uFlags
= EqLog::WRN
; break;
26 VeLog::log_va( "VIVOX", uFlags
, pattern
, valist
);
30 static uns64
getTimeMS()
32 return VeUtil::getGameTimeMilliseconds();
35 static void sleep( unsigned ms
)
40 static void warning( const char* sFile
, int iLine
, const char* pattern
, ... )
43 va_start( valist
, pattern
);
45 _vsnprintf( buffer
, sizeof(buffer
), pattern
, valist
);
46 buffer
[sizeof(buffer
) - 1] = '\0';
47 Verify( sFile
, iLine
).alrt( buffer
);
51 static void fatal( const char* sFile
, int iLine
, const char* pattern
, ... )
54 va_start( valist
, pattern
);
56 _vsnprintf( buffer
, sizeof(buffer
), pattern
, valist
);
57 buffer
[sizeof(buffer
) - 1] = '\0';
58 Verify( sFile
, iLine
).ver( false, buffer
);
62 static const char* getGameName()
67 static int getLogLevel()
69 // From Eq2VivoxClient.cpp
70 extern int vivox_loglevel
;
71 return vivox_loglevel
;
75 typedef Vivox
< CharString
, Eq2VivoxGlue
> Eq2Vivox
;