if( (arg = csr_opt_arg( 'o' )) )
{
strcpy( api.output_path, arg );
- csr_path_winunix( api.output_path );
-
output_set = 1;
}
"Options:\n"
" -g <gameinfo.txt path> Required if you are loading models\n"
" -r 1024 Output resolution\n"
- " -o <output> Specify output name/path\n"
+ " -o <output> Specify output name/path (no extension, dir must exist)\n"
" -e <classname> Same as default arg, but instead filters for entity class\n"
- //" -s <height> Add a vertical split at this height\n"
" --padding=128 When cropping radar, add padding units to border\n"
- //" --standard-layers Use standard TAR layers/groups\n"
" --no-txt Don't create matching radar txt\n"
- " --multi-sample=RGSS [ none, 2x, rgss, 8r ]\n"
+ " --multi-sample=rgss [ none, 2x, rgss, 8r ]\n"
" --extension=TAR Use an extension binary instead\n"
" --min=z Miniumum height to render\n"
" --max=z Maxiumum height to render\n"
csr_stripext( api.output_path );
}
- char *base_name;
- if( !(base_name = csr_findext( api.output_path, '/' ) ))
- {
- base_name = api.output_path;
- }
-
- strcpy( api.vmf_name, base_name );
+ strcpy( api.vmf_name, csr_filename( api.output_path ) );
+ strcpy( api.vmf_folder, api.output_path );
+ csr_downlvl( api.vmf_folder );
log_info( "output_path: '%s'\n", api.output_path );
log_info( "vmf_name: '%s'\n", api.vmf_name );
-
+ log_info( "vmf_folder: '%s'\n", api.vmf_folder );
+
api.map = vmf_init( api.strings[0].str );
if( api.map )
{
csr_ext_main( &api );
// Do other
+ if( api.write_txt )
+ {
+ char radar_path[512];
+ strcpy( radar_path, api.output_path );
+ strcat( radar_path, ".txt" );
+ csr_write_txt( radar_path, api.vmf_name, &api.target );
+ }
csr_ext_exit( &api );
}