// File: FreeSlave[P]vhlt/hlrad/qrad.cpp
// Function: Usage()
static void     Usage()
{
    Banner();

    Log("\n-= %s Options =-\n\n", g_Program);
#ifdef ZHLT_CONSOLE
	Log("    -console #      : Set to 0 to turn off the pop-up console (default is 1)\n");
#endif
#ifdef ZHLT_LANGFILE
	Log("    -lang file      : localization file\n");
#endif
#ifdef HLRAD_TEXTURE
	Log("    -waddir folder  : Search this folder for wad files.\n");
#endif
#ifdef HLRAD_FASTMODE
	Log("    -fast           : Fast rad\n");
#endif
#ifdef HLRAD_ARG_MISC
	Log("    -vismatrix value: Set vismatrix method to normal, sparse or off .\n");
#else
    Log("    -sparse         : Enable low memory vismatrix algorithm\n");
    Log("    -nomatrix       : Disable usage of vismatrix entirely\n\n");
#endif
    Log("    -extra          : Improve lighting quality by doing 9 point oversampling\n");
    Log("    -bounce #       : Set number of radiosity bounces\n");
    Log("    -ambient r g b  : Set ambient world light (0.0 to 1.0, r g b)\n");
#ifndef HLRAD_FinalLightFace_VL
    Log("    -maxlight #     : Set maximum light intensity value\n");
#endif
#ifdef HLRAD_PRESERVELIGHTMAPCOLOR
    Log("    -limiter #      : Set light clipping threshold (-1=None)\n");
#endif
    Log("    -circus         : Enable 'circus' mode for locating unlit lightmaps\n");
#ifdef HLRAD_SUNSPREAD
	Log("    -nospread       : Disable sunlight spread angles for this compile\n");
#endif
    Log("    -nopaque        : Disable the opaque zhlt_lightflags for this compile\n\n");
    Log("    -smooth #       : Set smoothing threshold for blending (in degrees)\n");
#ifdef HLRAD_CUSTOMSMOOTH
	Log("    -smooth2 #      : Set smoothing threshold between different textures\n");
#endif
    Log("    -chop #         : Set radiosity patch size for normal textures\n");
    Log("    -texchop #      : Set radiosity patch size for texture light faces\n\n");
    Log("    -notexscale     : Do not scale radiosity patches with texture scale\n");
    Log("    -coring #       : Set lighting threshold before blackness\n");
    Log("    -dlight #       : Set direct lighting threshold\n");
    Log("    -nolerp         : Disable radiosity interpolation, nearest point instead\n\n");
    Log("    -fade #         : Set global fade (larger values = shorter lights)\n");
#ifndef HLRAD_ARG_MISC
    Log("    -falloff #      : Set global falloff mode (1 = inv linear, 2 = inv square)\n");
#endif
#ifdef HLRAD_TEXLIGHTGAP
	Log("    -texlightgap #  : Set global gap distance for texlights\n");
#endif
    Log("    -scale #        : Set global light scaling value\n");
    Log("    -gamma #        : Set global gamma value\n\n");
    Log("    -sky #          : Set ambient sunlight contribution in the shade outside\n");
    Log("    -lights file    : Manually specify a lights.rad file to use\n");
    Log("    -noskyfix       : Disable light_environment being global\n");
    Log("    -incremental    : Use or create an incremental transfer list file\n\n");
    Log("    -dump           : Dumps light patches to a file for hlrad debugging info\n\n");
    Log("    -texdata #      : Alter maximum texture memory limit (in kb)\n");
    Log("    -lightdata #    : Alter maximum lighting memory limit (in kb)\n"); //lightdata
    Log("    -chart          : display bsp statitics\n");
    Log("    -low | -high    : run program an altered priority level\n");
    Log("    -nolog          : Do not generate the compile logfiles\n");
    Log("    -threads #      : manually specify the number of threads to run\n");
#ifdef SYSTEM_WIN32
    Log("    -estimate       : display estimated time during compile\n");
#endif
#ifdef ZHLT_PROGRESSFILE // AJM
    Log("    -progressfile path  : specify the path to a file for progress estimate output\n");
#endif
#ifdef SYSTEM_POSIX
    Log("    -noestimate     : Do not display continuous compile time estimates\n");
#endif
    Log("    -verbose        : compile with verbose messages\n");
    Log("    -noinfo         : Do not show tool configuration information\n");
    Log("    -dev #          : compile with developer message\n\n");

    // ------------------------------------------------------------------------
    // Changes by Adam Foster - afoster@compsoc.man.ac.uk
#ifdef HLRAD_WHOME

    // AJM: we dont need this extra crap
    //Log("-= Unofficial features added by Adam Foster (afoster@compsoc.man.ac.uk) =-\n\n");
    Log("   -colourgamma r g b  : Sets different gamma values for r, g, b\n" );
    Log("   -colourscale r g b  : Sets different lightscale values for r, g ,b\n" );
    Log("   -colourjitter r g b : Adds noise, independent colours, for dithering\n");
    Log("   -jitter r g b       : Adds noise, monochromatic, for dithering\n");
#ifndef HLRAD_ARG_MISC
    Log("   -nodiffuse          : Disables light_environment diffuse hack\n");
    Log("   -nospotpoints       : Disables light_spot spherical point sources\n");
#endif
#ifndef HLRAD_CUSTOMTEXLIGHT // no softlight hack
    Log("   -softlight r g b d  : Scaling values for backwards-light hack\n\n");
#endif
    //Log("-= End of unofficial features! =-\n\n" );

#endif
    // ------------------------------------------------------------------------  
    
#ifdef HLRAD_HULLU
    Log("   -customshadowwithbounce : Enables custom shadows with bounce light\n");
    Log("   -rgbtransfers           : Enables RGB Transfers (for custom shadows)\n\n");
#endif

#ifdef HLRAD_TRANSTOTAL_HACK
#ifndef HLRAD_REFLECTIVITY
	Log("   -bscale        : Scaling light on every bounce\n\n");
#endif
#endif
#ifdef HLRAD_MINLIGHT
	Log("   -minlight #    : Minimum final light (integer from 0 to 255)\n");
#endif
#ifdef HLRAD_TRANSFERDATA_COMPRESS
	{
		int i;
	Log("   -compress #    : compress tranfer (");
		for (i=0; i<float_type_count; i++)
			Log (" %d=%s", i, float_type_string[i]);
		Log(" )\n");
	Log("   -rgbcompress # : compress rgbtranfer (");
		for (i=0; i<vector_type_count; i++)
			Log (" %d=%s", i, vector_type_string[i]);
		Log(" )\n");
	}
#endif
#ifdef HLRAD_SOFTSKY
	Log("   -softsky #     : Smooth skylight.(0=off 1=on)\n");
#endif
#ifdef HLRAD_TRANSLUCENT
	Log("   -depth #       : Thickness of translucent objects.\n");
#endif
#ifdef HLRAD_OPAQUE_BLOCK
	Log("   -blockopaque # : Remove the black areas around opaque entities.(0=off 1=on)\n");
#endif
#ifdef HLRAD_TEXTURE
	Log("   -notextures    : Don't load textures.\n");
#endif
#ifdef HLRAD_REFLECTIVITY
	Log("   -texreflectgamma # : Gamma that relates reflectivity to texture color bits.\n");
	Log("   -texreflectscale # : Reflectivity for 255-white texture.\n");
#endif
#ifdef HLRAD_BLUR
	Log("   -blur #        : Enlarge lightmap sample to blur the lightmap.\n");
#endif
#ifdef HLRAD_ACCURATEBOUNCE
	Log("   -noemitterrange: Don't fix pointy texlights.\n");
#endif
#ifdef HLRAD_AVOIDWALLBLEED
	Log("   -nobleedfix    : Don't fix wall bleeding problem for large blur value.\n");
#endif
#ifdef HLRAD_DEBUG_DRAWPOINTS
	Log("   -drawpatch     : Export light patch positions to file 'mapname_patch.pts'.\n");
	Log("   -drawsample x y z r    : Export light sample positions in an area to file 'mapname_sample.pts'.\n");
	Log("   -drawedge      : Export smooth edge positions to file 'mapname_edge.pts'.\n");
	Log("   -drawlerp      : Show bounce light triangulation status.\n");
#endif
#ifdef HLRAD_AVOIDWALLBLEED
	Log("   -drawnudge     : Show nudged samples.\n");
#endif
#ifdef HLRAD_PRESERVELIGHTMAPCOLOR
	Log("   -drawoverload  : Highlight fullbright spots\n");
#endif

    Log("    mapfile       : The mapfile to compile\n\n");

    exit(1);
}

// Assembly:
pushq %rax
callq 0xbce0
leaq 0x2b393(%rip), %rax     # 0x7d350
movq (%rax), %rsi
leaq 0x1dbac(%rip), %rdi     # 0x6fb73
movb $0x0, %al
callq 0xb0d0
leaq 0x1dbb2(%rip), %rdi     # 0x6fb87
movb $0x0, %al
callq 0xb0d0
leaq 0x1dbf2(%rip), %rdi     # 0x6fbd5
movb $0x0, %al
callq 0xb0d0
leaq 0x1dc0d(%rip), %rdi     # 0x6fbfe
movb $0x0, %al
callq 0xb0d0
leaq 0x1dc38(%rip), %rdi     # 0x6fc37
movb $0x0, %al
callq 0xb0d0
leaq 0x1dc4a(%rip), %rdi     # 0x6fc57
movb $0x0, %al
callq 0xb0d0
leaq 0x1dc83(%rip), %rdi     # 0x6fc9e
movb $0x0, %al
callq 0xb0d0
leaq 0x1dcc3(%rip), %rdi     # 0x6fcec
movb $0x0, %al
callq 0xb0d0
leaq 0x1dcec(%rip), %rdi     # 0x6fd23
movb $0x0, %al
callq 0xb0d0
leaq 0x1dd21(%rip), %rdi     # 0x6fd66
movb $0x0, %al
callq 0xb0d0
leaq 0x1dd51(%rip), %rdi     # 0x6fda4
movb $0x0, %al
callq 0xb0d0
leaq 0x1dd8c(%rip), %rdi     # 0x6fded
movb $0x0, %al
callq 0xb0d0
leaq 0x1ddc5(%rip), %rdi     # 0x6fe34
movb $0x0, %al
callq 0xb0d0
leaq 0x1de03(%rip), %rdi     # 0x6fe80
movb $0x0, %al
callq 0xb0d0
leaq 0x1de3e(%rip), %rdi     # 0x6fec9
movb $0x0, %al
callq 0xb0d0
leaq 0x1de7a(%rip), %rdi     # 0x6ff13
movb $0x0, %al
callq 0xb0d0
leaq 0x1deb0(%rip), %rdi     # 0x6ff57
movb $0x0, %al
callq 0xb0d0
leaq 0x1deeb(%rip), %rdi     # 0x6ffa0
movb $0x0, %al
callq 0xb0d0
leaq 0x1df26(%rip), %rdi     # 0x6ffe9
movb $0x0, %al
callq 0xb0d0
leaq 0x1df57(%rip), %rdi     # 0x70028
movb $0x0, %al
callq 0xb0d0
leaq 0x1df7e(%rip), %rdi     # 0x7005d
movb $0x0, %al
callq 0xb0d0
leaq 0x1dfbf(%rip), %rdi     # 0x700ac
movb $0x0, %al
callq 0xb0d0
leaq 0x1dff9(%rip), %rdi     # 0x700f4
movb $0x0, %al
callq 0xb0d0
leaq 0x1e028(%rip), %rdi     # 0x70131
movb $0x0, %al
callq 0xb0d0
leaq 0x1e050(%rip), %rdi     # 0x70167
movb $0x0, %al
callq 0xb0d0
leaq 0x1e071(%rip), %rdi     # 0x70196
movb $0x0, %al
callq 0xb0d0
leaq 0x1e0b1(%rip), %rdi     # 0x701e4
movb $0x0, %al
callq 0xb0d0
leaq 0x1e0e4(%rip), %rdi     # 0x70225
movb $0x0, %al
callq 0xb0d0
leaq 0x1e114(%rip), %rdi     # 0x70263
movb $0x0, %al
callq 0xb0d0
leaq 0x1e14e(%rip), %rdi     # 0x702ab
movb $0x0, %al
callq 0xb0d0
leaq 0x1e18f(%rip), %rdi     # 0x702fa
movb $0x0, %al
callq 0xb0d0
leaq 0x1e1c3(%rip), %rdi     # 0x7033c
movb $0x0, %al
callq 0xb0d0
leaq 0x1e1f8(%rip), %rdi     # 0x7037f
movb $0x0, %al
callq 0xb0d0
leaq 0x1e217(%rip), %rdi     # 0x703ac
movb $0x0, %al
callq 0xb0d0
leaq 0x1e246(%rip), %rdi     # 0x703e9
movb $0x0, %al
callq 0xb0d0
leaq 0x1e274(%rip), %rdi     # 0x70425
movb $0x0, %al
callq 0xb0d0
leaq 0x1e2ab(%rip), %rdi     # 0x7046a
movb $0x0, %al
callq 0xb0d0
leaq 0x1e2e5(%rip), %rdi     # 0x704b2
movb $0x0, %al
callq 0xb0d0
leaq 0x1e30c(%rip), %rdi     # 0x704e7
movb $0x0, %al
callq 0xb0d0
leaq 0x1e340(%rip), %rdi     # 0x70529
movb $0x0, %al
callq 0xb0d0
leaq 0x1e369(%rip), %rdi     # 0x70560
movb $0x0, %al
callq 0xb0d0
leaq 0x1e39d(%rip), %rdi     # 0x705a2
movb $0x0, %al
callq 0xb0d0
leaq 0x1e3d6(%rip), %rdi     # 0x705e9
movb $0x0, %al
callq 0xb0d0
leaq 0x1e411(%rip), %rdi     # 0x70632
movb $0x0, %al
callq 0xb0d0
leaq 0x1e446(%rip), %rdi     # 0x70675
movb $0x0, %al
callq 0xb0d0
leaq 0x1e47f(%rip), %rdi     # 0x706bc
movb $0x0, %al
callq 0xb0d0
leaq 0x1e4bb(%rip), %rdi     # 0x70706
movb $0x0, %al
callq 0xb0d0
leaq 0x1e4ee(%rip), %rdi     # 0x70747
movb $0x0, %al
callq 0xb0d0
movl $0x0, 0x4(%rsp)
cmpl $0x3, 0x4(%rsp)
jge 0x5229e
movl 0x4(%rsp), %esi
movslq 0x4(%rsp), %rcx
leaq 0x2c0f1(%rip), %rax     # 0x7e370
movq (%rax,%rcx,8), %rdx
leaq 0x1e4e4(%rip), %rdi     # 0x7076e
movb $0x0, %al
callq 0xb0d0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x52268
leaq 0x1e4d0(%rip), %rdi     # 0x70775
movb $0x0, %al
callq 0xb0d0
leaq 0x1e4c6(%rip), %rdi     # 0x70779
movb $0x0, %al
callq 0xb0d0
movl $0x0, 0x4(%rsp)
cmpl $0x4, 0x4(%rsp)
jge 0x522f8
movl 0x4(%rsp), %esi
movslq 0x4(%rsp), %rcx
leaq 0x2c0b7(%rip), %rax     # 0x7e390
movq (%rax,%rcx,8), %rdx
leaq 0x1e48a(%rip), %rdi     # 0x7076e
movb $0x0, %al
callq 0xb0d0
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x522c2
leaq 0x1e476(%rip), %rdi     # 0x70775
movb $0x0, %al
callq 0xb0d0
leaq 0x1e496(%rip), %rdi     # 0x707a3
movb $0x0, %al
callq 0xb0d0
leaq 0x1e4ba(%rip), %rdi     # 0x707d5
movb $0x0, %al
callq 0xb0d0
leaq 0x1e4e3(%rip), %rdi     # 0x7080c
movb $0x0, %al
callq 0xb0d0
leaq 0x1e525(%rip), %rdi     # 0x7085c
movb $0x0, %al
callq 0xb0d0
leaq 0x1e541(%rip), %rdi     # 0x70886
movb $0x0, %al
callq 0xb0d0
leaq 0x1e583(%rip), %rdi     # 0x708d6
movb $0x0, %al
callq 0xb0d0
leaq 0x1e5b2(%rip), %rdi     # 0x70913
movb $0x0, %al
callq 0xb0d0
leaq 0x1e5e7(%rip), %rdi     # 0x70956
movb $0x0, %al
callq 0xb0d0
leaq 0x1e60a(%rip), %rdi     # 0x70987
movb $0x0, %al
callq 0xb0d0
leaq 0x1e647(%rip), %rdi     # 0x709d2
movb $0x0, %al
callq 0xb0d0
leaq 0x1e688(%rip), %rdi     # 0x70a21
movb $0x0, %al
callq 0xb0d0
leaq 0x1e6de(%rip), %rdi     # 0x70a85
movb $0x0, %al
callq 0xb0d0
leaq 0x1e71e(%rip), %rdi     # 0x70ad3
movb $0x0, %al
callq 0xb0d0
leaq 0x1e74d(%rip), %rdi     # 0x70b10
movb $0x0, %al
callq 0xb0d0
leaq 0x1e769(%rip), %rdi     # 0x70b3a
movb $0x0, %al
callq 0xb0d0
leaq 0x1e78b(%rip), %rdi     # 0x70b6a
movb $0x0, %al
callq 0xb0d0
movl $0x1, %edi
callq 0x43b0