diff options
Diffstat (limited to 'app/bin/common.h')
-rw-r--r-- | app/bin/common.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/bin/common.h b/app/bin/common.h index 255e8d7..2db961f 100644 --- a/app/bin/common.h +++ b/app/bin/common.h @@ -24,6 +24,7 @@ #define COMMON_H #include <stdlib.h> +#include <stdint.h> #ifndef TRUE #define TRUE (1) @@ -46,6 +47,11 @@ typedef struct { POS_T x,y; } coOrd; +typedef struct { + coOrd pt; + int pt_type; +} pts_t; + typedef int INT_T; typedef int BOOL_T; @@ -61,6 +67,11 @@ typedef int TRKINX_T; typedef long DEBUGF_T; typedef int REGION_T; +enum paramFileState { PARAMFILE_UNLOADED = 0, PARAMFILE_NOTUSABLE, PARAMFILE_COMPATIBLE, PARAMFILE_FIT, PARAMFILE_MAXSTATE }; + +#define SCALE_ANY (-2) +#define SCALE_DEMO (-1) + typedef struct { int cnt; int max; @@ -108,6 +119,17 @@ typedef struct { } \ (DA).max = 0; \ (DA).cnt = 0; } +#define DYNARR_REMOVE(T,DA,I) \ + { \ + { if ((DA).cnt-1 > I) { \ + for (int i=I;i<(DA).cnt-1;i++) { \ + (((T*)(DA).ptr)[i])= (((T*)(DA).ptr)[i+1]); \ + } \ + } \ + } \ + if ((DA.cnt)>=I) (DA).cnt--; \ + } + #ifdef WINDOWS #define M_PI 3.14159 |