the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 40 lines 1.3 kB view raw
1#include "stdafx.h" 2 3//-------------------------------------------------------------------------------------- 4// Name: DebugSpewV() 5// Desc: Internal helper function 6//-------------------------------------------------------------------------------------- 7#ifndef _CONTENT_PACKAGE 8static VOID DebugSpewV( const CHAR* strFormat, const va_list pArgList ) 9{ 10#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ 11 assert(0); 12#else 13 CHAR str[2048]; 14 // Use the secure CRT to avoid buffer overruns. Specify a count of 15 // _TRUNCATE so that too long strings will be silently truncated 16 // rather than triggering an error. 17 _vsnprintf_s( str, _TRUNCATE, strFormat, pArgList ); 18 OutputDebugStringA( str ); 19#endif 20} 21#endif 22 23//-------------------------------------------------------------------------------------- 24// Name: DebugSpew() 25// Desc: Prints formatted debug spew 26//-------------------------------------------------------------------------------------- 27#ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation 28VOID CDECL DebugSpew( _In_z_ _Printf_format_string_ const CHAR* strFormat, ... ) 29#else 30VOID CDECL DebugPrintf( const CHAR* strFormat, ... ) 31#endif 32{ 33#ifndef _CONTENT_PACKAGE 34 va_list pArgList; 35 va_start( pArgList, strFormat ); 36 DebugSpewV( strFormat, pArgList ); 37 va_end( pArgList ); 38#endif 39} 40