From 739fcb79d56628006a16bc1a4e838a3cb9f9e82d Mon Sep 17 00:00:00 2001 From: hgn Date: Tue, 24 Jun 2025 20:47:52 +0100 Subject: [PATCH] board maker bug --- .gitignore | 2 ++ build.c | 7 +++++++ src/board_maker.c | 5 +++-- src/model.c | 2 -- src/user_profile.c | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4fa1699..7a84ac1 100755 --- a/.gitignore +++ b/.gitignore @@ -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 23b0b44..6982e78 100644 --- 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; diff --git a/src/board_maker.c b/src/board_maker.c index 34532cd..dc869a6 100644 --- a/src/board_maker.c +++ b/src/board_maker.c @@ -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; diff --git a/src/model.c b/src/model.c index 3352b18..7e1e489 100644 --- a/src/model.c +++ b/src/model.c @@ -515,9 +515,7 @@ void mdl_sync_std_unload( mdl_context *mdl ) mesh_free( &mdl->mesh ); for( u32 i=0; itexture_count; i ++ ) - { glDeleteTextures( 1, &mdl->textures[i].glname ); - } } #endif diff --git a/src/user_profile.c b/src/user_profile.c index aa7d1ee..758fffe 100644 --- a/src/user_profile.c +++ b/src/user_profile.c @@ -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; -- 2.25.1