gencpp/project/dependencies/debug.cpp
Ed_ db6e8b33eb got intellisense working for the most part...
VScode works withs some issues.
VS2022 fails.
10xEditor works fine.
JetBrains Rider fails due to it not supporting <push/pop>_macro pragmas
2023-08-21 23:07:03 -04:00

44 lines
671 B
C++

#pragma once
#pragma region Debug
void assert_handler( char const* condition, char const* file, s32 line, char const* msg, ... )
{
_printf_err( "%s:(%d): Assert Failure: ", file, line );
if ( condition )
_printf_err( "`%s` \n", condition );
if ( msg )
{
va_list va;
va_start( va, msg );
_printf_err_va( msg, va );
va_end( va );
}
_printf_err( "%s", "\n" );
}
s32 assert_crash( char const* condition )
{
GEN_PANIC( condition );
return 0;
}
#if defined( GEN_SYSTEM_WINDOWS )
void process_exit( u32 code )
{
ExitProcess( code );
}
#else
# include <stdlib.h>
void process_exit( u32 code )
{
exit( code );
}
#endif
#pragma endregion Debug