board maker bug master
authorhgn <hgodden00@gmail.com>
Tue, 24 Jun 2025 19:47:52 +0000 (20:47 +0100)
committerhgn <hgodden00@gmail.com>
Tue, 24 Jun 2025 19:47:52 +0000 (20:47 +0100)
.gitignore
build.c
src/board_maker.c
src/model.c
src/user_profile.c

index 4fa1699e8637325e55aea3f1cb1e473c3a6fe664..7a84ac17d226e5a143ef669a67db9cce5b80e28e 100755 (executable)
@@ -34,3 +34,5 @@ sound_src/song1.ogg
 sound_src/memes.ogg
 sound_src/memes.ogg.reapeaks
 sound_src/delta.ogg
+
+glslangValidator
diff --git a/build.c b/build.c
index 23b0b4430b56f06d9887d738e84ca2f94ba342e6..6982e7820617c2cdf6d07ff95779a61cb17157d4 100644 (file)
--- a/build.c
+++ b/build.c
@@ -242,6 +242,7 @@ void build_game_bin( struct vg_project *proj, struct vg_compiler_env *env )
 
    if( env->platform == k_platform_windows )
    {
+      // getaddrinfo and cotaskmemfree
       vg_strcat( &conf.link, "-lws2_32 -lole32 " );
    }
 
@@ -470,6 +471,12 @@ int main( int argc, const char *argv[] )
 
    const char *arg;
 
+   if( (arg = vg_long_opt_arg( "glsl-dir", "Specify output directory for preprocessed GLSL" )) )
+   {
+      vg_shaderbuild.preprocessed_dir = arg;
+      build_shaders();
+   }
+
    if( vg_opt('r', NULL) )
       vg_test_env.optimization = 3;
 
index 34532cd42a1edfd6d14d977269ecd08100e59027..dc869a612e48c88150229897f503189731549540 100644 (file)
@@ -967,14 +967,15 @@ void _board_maker_close(void)
    free( _board_maker.browser );
    _board_maker.browser = NULL;
 
+   mdl_sync_std_unload( &_board_maker.template_mdl );
+   _board_maker.template_loaded = -1;
+
    vg_allocator_free( _board_maker.static_heap );
    vg_allocator_free( _board_maker.template_heap );
 
    _board_maker.static_heap = NULL;
    _board_maker.template_heap = NULL;
    _board_maker.state = k_board_maker_state_not_ready;
-   mdl_sync_std_unload( &_board_maker.template_mdl );
-   _board_maker.template_loaded = -1;
 
    localplayer.immobile = 0;
    menu.disable_open = 0;
index 3352b182584393827ab1b1db303086a6084db30b..7e1e489d289a1cb7229899a77960bd88cc3117f6 100644 (file)
@@ -515,9 +515,7 @@ void mdl_sync_std_unload( mdl_context *mdl )
    mesh_free( &mdl->mesh );
 
    for( u32 i=0; i<mdl->texture_count; i ++ )
-   {
       glDeleteTextures( 1, &mdl->textures[i].glname );
-   }
 }
 
 #endif
index aa7d1ee6a4b4e98d8d54928e5a1e13778b573ba6..758fffe40c8aef6772a698529c9bbc4918d521e2 100644 (file)
@@ -107,7 +107,7 @@ void _user_profile_ui( ui_context *ctx, ui_rect box, u64 steamid )
          _user_profile.current_steamid = steamid;
          _user_profile.timer = 1.0f;
 
-         vg_info( "Request profile for: %lx\n", steamid );
+         vg_info( "Request profile for: "PRINTF_U64"\n", steamid );
          netmsg_request *packet = alloca( sizeof(netmsg_request) + 512 );
          packet->inetmsg_id = k_inetmsg_request;