misc. remove dead code, assert macro
authorhgn <hgodden00@gmail.com>
Sat, 24 Feb 2024 04:39:35 +0000 (04:39 +0000)
committerhgn <hgodden00@gmail.com>
Sat, 24 Feb 2024 04:39:35 +0000 (04:39 +0000)
vg_audio.h
vg_build.h
vg_platform.h
vg_rigidbody.h
vg_rigidbody_collision.h

index 6272cafccbe29ef41e546abc0fcf57c264fa051b..66a4fdb35af1b61fcf985048c93502b3fac2b992 100644 (file)
@@ -3,6 +3,7 @@
 #pragma once
 
 #include "vg_platform.h"
+#include "vg_engine.h"
 #include "vg_string.h"
 #include "vg_vorbis.h"
 
index b582d0f9f727e9171af3877ee990208444b3c3fe..7dd34b9b224f887a32e1297e68cd196ff976fb6b 100644 (file)
@@ -433,7 +433,7 @@ struct vg_engine_config
 {
    bool use_3d, legacy_support_vg_msg1, log_source_info, steam_api,
         custom_game_settings,
-        release_mode, custom_shaders;
+        custom_shaders;
    i32 fixed_update_hz;
 }
 vg_engine_default_config = {
@@ -443,7 +443,6 @@ vg_engine_default_config = {
    .log_source_info = 1,
    .steam_api = 0,
    .custom_game_settings = 0,
-   .release_mode = 0,
    .custom_shaders = 0
 };
 
@@ -462,8 +461,6 @@ void vg_add_engine( struct vg_project *proj, struct vg_engine_config *config )
       vg_strcat( &config_string, "-DVG_LOG_SOURCE_INFO \\\n" );
    if( config->custom_game_settings )
       vg_strcat( &config_string, "-DVG_GAME_SETTINGS \\\n" );
-   if( config->custom_game_settings )
-      vg_strcat( &config_string, "-DVG_RELEASE \\\n" );
    if( config->custom_shaders )
       vg_strcat( &config_string, "-DVG_CUSTOM_SHADERS \\\n" );
 
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]))
index 70be483dbe8371c64b691970e6c33ede9d46b495..bf7fdb34ea1b70fca66f0033789d022e0a62fcb9 100644 (file)
@@ -1,4 +1,6 @@
 #pragma once
+#include "vg/vg_platform.h"
+
 /*
  * Copyright (C) 2021-2024 Mt.ZERO Software - All Rights Reserved
  *
index e0cf3e378e6a7b0f78c597a3dbc50132c5f81e0c..9a1957dfd5125830511b944808cc23bef9490d17 100644 (file)
@@ -1,4 +1,6 @@
 #pragma once
+#include "vg_m.h"
+#include "vg_rigidbody.h"
 
 /* TODO: Get rid of this! */
 #define VG_MAX_CONTACTS 256