X-Git-Url: https://harrygodden.com/git/?p=csRadar.git;a=blobdiff_plain;f=csRadar.h;fp=csRadar.h;h=95e1048599418e0c947957c04034916a43cff700;hp=0000000000000000000000000000000000000000;hb=8382aed7f0cdc38bc5c58832d4a15277cf56d4be;hpb=0bd8697a99ced50789a5d41b84a4b87f39cb1653 diff --git a/csRadar.h b/csRadar.h new file mode 100644 index 0000000..95e1048 --- /dev/null +++ b/csRadar.h @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include +#include +#include + +// CSR lib +#include "csrLog.h" // Y +#include "csrOpt.h" // Y +#include "csrTypes.h" // Y +#include "csrMath.h" // Y +#include "csrMem.h" // Y +#include "csrIO.h" // Y +#include "csrComb.h" // Y +#include "csrPlatform.h" // Y + +// Valve formats +#include "vdf.h" // Y +#include "vpk.h" // Y +#include "vfilesys.h" // Y + +#include "vmdl.h" // Y +#include "vmf.h" // Y + +// Drawing +#ifdef CSR_EXECUTABLE + #include "csr32f.h" +//#include "csrTga.h" +#endif + +#include "csrDraw.h" // Y + +static const u32 csr_build = 3; +static const u32 csr_api_version = 1; + +typedef struct csr_api csr_api; +struct csr_api +{ + // Floating arguments from main's argv + char *strings[ 20 ]; + int num_strings; + + float padding; + u32 resolution; + int write_txt; + char output_path[ 512 ]; // Full path eg. /home/harry/my_map.vmf + char vmf_name[ 128 ]; // Just the base name eg. my_map + EMSAA sampling_mode; + + // Main API interface + vmf_map *map; + csr_target target; + + u32 api_version; +}; + +#ifndef CSR_EXECUTABLE +static int csr_init( csr_api *api ) +{ + if( api->api_version > csr_api_version ) + { + log_warn( "API Version out of date. Host: %u, Plugin: %u\n", api->api_version, csr_api_version ); + return 0; + } + + return 1; +} +#endif