// Drawing
#ifdef CSR_EXECUTABLE
#include "csr32f.h"
-//#include "csrTga.h"
+ #include "csrTga.h"
#endif
#include "csrDraw.h" // Y
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;
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;
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 )
{