X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=csRadar.h;h=0415518def2d26fd5fdc036b17363d0d26bf936a;hb=5dfd7a6b5aec8d2bc047cfa4227b6ae04df6ce57;hp=95e1048599418e0c947957c04034916a43cff700;hpb=8382aed7f0cdc38bc5c58832d4a15277cf56d4be;p=csRadar.git diff --git a/csRadar.h b/csRadar.h index 95e1048..0415518 100644 --- 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,6 +64,9 @@ struct csr_api char vmf_name[ 128 ]; // Just the base name eg. my_map EMSAA sampling_mode; + float min_z; + float max_z; + // Main API interface vmf_map *map; csr_target target; @@ -56,6 +74,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 ) {