_S( "blitcolour","blit.vs", "colour.fs" );
_S( "blit_transition", "blit.vs", "blit_transition.fs" );
_S( "routeui", "routeui.vs", "routeui.fs" );
+
+ vg_build_shader_impl( "shaders/impl.c" );
}
void build_game_content( struct vg_project *proj )
.log_source_info = 1,
.steam_api = 1,
.use_3d = 1,
- .custom_game_settings = 0
+ .custom_game_settings = 0,
+ .custom_shaders = 1
});
vg_add_source( proj, "skaterift.c " );
vg_compile_project( proj );
}
+void compile_tools( struct vg_env *env, struct vg_project *proj )
+{
+ struct vg_env backup = *env;
+ env->optimization = 3; /* force optimization always */
+ env->debug_asan = 0;
+
+ vg_project_new_target( proj, "tools/qoi", k_obj_type_shared );
+ vg_add_source( proj, "qoi_lib.c " );
+ vg_compile_project( proj );
+
+ *env = backup;
+}
+
/*
* Scripts
* -------------------------------------------------------------------------- */
-void s_release_all(void){
+void s_release_all(void)
+{
vg_info( "running script: s_release_all(void)\n" );
struct vg_project content_proj, windows_proj, linux_proj;
env.platform = k_platform_windows;
vg_project_init( &windows_proj, &env, "skaterift" );
build_game_bin( &windows_proj );
+ compile_tools( &env, &windows_proj );
/* binaries for linux */
env = vg_release_env;
env.platform = k_platform_linux;
vg_project_init( &linux_proj, &env, "skaterift" );
build_game_bin( &linux_proj );
+ compile_tools( &env, &linux_proj );
/* package them up for storage */
vg_tarball_project( &content_proj );
fclose( fp );
}
-void s_testing_build(void){
+void s_testing_build(void)
+{
vg_info( "running script: s_testing_build(void)\n" );
struct vg_project test_proj;
vg_project_init( &test_proj, &vg_test_env, "skaterift-test" );
build_game_bin( &test_proj );
+ compile_tools( &vg_test_env, &test_proj );
build_game_content( &test_proj );
+ vg_add_blob( &test_proj, "steam_appid.txt", "" );
}
-void s_testing_server(void){
+void s_testing_server(void)
+{
vg_info( "running script: s_testing_server(void)\n" );
struct vg_project test_proj;
compile_server( &test_proj );
}
-int main( int argc, char *argv[] ){
+int main( int argc, char *argv[] )
+{
char *arg;
while( vg_argp( argc, argv ) ){
if( vg_long_opt( "release-all" ) )