bad char
[vg.git] / vg_platform.h
index 5ec7287ab436d692f8fb40141627b790ed423cd5..b846b06a4056356e8b0825f6621c3a337303a10b 100644 (file)
@@ -1,34 +1,5 @@
 #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>
 
@@ -60,6 +31,12 @@ typedef v3f                  boxf[2];
 /* 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]))