tga & normals
[csRadar.git] / csRadar.h
index 36c00f86412a5c24302d8277eddd3f95eea4ec83..4192e555ff13a5f9343d11a210099e9d59c42459 100644 (file)
--- a/csRadar.h
+++ b/csRadar.h
@@ -27,7 +27,7 @@
 // Drawing
 #ifdef CSR_EXECUTABLE
  #include "csr32f.h"
-//#include "csrTga.h"
+ #include "csrTga.h"
 #endif
 
 #include "csrDraw.h"                   // Y
@@ -36,10 +36,25 @@ static const u32 csr_build = 3;
 static const u32 csr_api_version = 1;
 
 typedef struct csr_api csr_api;
+typedef struct csr_opt_str csr_opt_str;
+
 struct csr_api
 {
        // Floating arguments from main's argv
-       char *strings[ 20 ];
+       struct csr_opt_str
+       {
+               char *str;
+               
+               enum inferred_type
+               {
+                       k_iftype_vmf,
+                       k_iftype_visgroup,
+                       k_iftype_classname
+               }
+               type;
+       }
+       strings[ 20 ];
+       
        int num_strings;
        
        float padding;
@@ -49,9 +64,6 @@ struct csr_api
        char vmf_name[ 128 ];                   // Just the base name eg. my_map
        EMSAA sampling_mode;
        
-       int write_normals;
-       int write_origins;
-       
        // Main API interface
        vmf_map *map;
        csr_target target;
@@ -59,6 +71,24 @@ struct csr_api
        u32 api_version;
 };
 
+void csr_filter_update_from_strings( csr_filter *filter, csr_opt_str *opt );
+
+#ifdef CSR_EXECUTABLE
+void csr_filter_update_from_strings( csr_filter *filter, csr_opt_str *opt )
+{
+       if( opt->type == k_iftype_visgroup )
+       {
+               filter->visgroup = opt->str;
+               filter->classname = NULL;
+       }
+       else
+       {
+               filter->classname = opt->str;
+               filter->visgroup = NULL;
+       }
+}
+#endif
+
 #ifndef CSR_EXECUTABLE
 static int csr_init( csr_api *api )
 {