#pragma once
-#if 0
-#include "vg_stdint.h"
-// Resource types
-typedef struct vg_tex2d vg_tex2d;
-
-struct vg_achievement
-{
- int is_set;
- const char *name;
-};
-
-#define vg_static_assert _Static_assert
-#define VG_MUST_USE_RESULT __attribute__((warn_unused_result))
-
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <math.h>
-#include <assert.h>
-#include <setjmp.h>
-#include <sys/time.h>
-#include <math.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#endif
-
#include <stdlib.h>
#include <stdint.h>
/* anything compiled against VG shall implement this function somewhere. */
void vg_fatal_error( const char *fmt, ... );
+#define VG_ASSERT( ITEM, ... ) \
+ if( !( ITEM ) ) { \
+ vg_fatal_error( "Assertion failed: " VG_LOG_MCSTR(ITEM) "\n" \
+ VG_LOG_WHERE ); \
+ }
+
#define VG_MIN( A, B ) ((A)<(B)?(A):(B))
#define VG_MAX( A, B ) ((A)>(B)?(A):(B))
#define vg_list_size( A ) (sizeof(A)/sizeof(A[0]))