--- /dev/null
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <time.h>
+#include <stdarg.h>
+
+// 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