- csr_frag *image = (csr_frag *)csr_malloc( 1024*1024*sizeof(csr_frag) );
- draw_buffers( image, 1024, 1024, (v4f){ -1000.f, -1000.f, 1000.f, 1000.f }, triangles, csr_sb_count( triangles )/3 );
-
- float *rgba_test = (float *)csr_malloc( 1024*1024*sizeof(float)*3 );
-
- for( int i = 0; i < 1024*1024; i ++ )
+ if( csr_opt( 'h' ) || csr_long_opt( "help" ) )
+ {
+ // Display help
+ printf
+ (
+ "csRadar Copyright (C) 2021 Harry Godden (hgn)\n"
+ "\n"
+ "Usage: ./csRadar map.vmf -g \"/gamedir/gameinfo.txt\" layout cover\n"
+ " VMF file is first, then any other arguments (eg. layout, cover), will specify\n"
+ " visgroups to be rendered into individual files\n"
+ " No visgroups specified will simply draw everything\n"
+ "\n"
+ "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"
+ " --padding=128 When cropping radar, add padding units to border\n"
+ //" --standard-layers Use standard TAR layers/groups\n"
+ " --write-normals Enable normals as an output stream\n"
+ " --write-origins Enable entity origins as an output stream\n"
+ " --no-txt Don't create matching radar txt\n"
+ " --multi-sample=RGSS [ none, 2x, rgss, 8r ]\n"
+ " --extension=TAR Use an extension binary instead\n"
+ "\n"
+ " -v --version Display program version\n"
+ " -h --help Display this help text\n"
+ );
+
+ goto IL_CSR_EXIT;
+ }
+ }
+
+ if( api.num_strings )
+ {
+ // Path handling
+ if( !output_set )