// replace the ID_VAR constructor in template <class T> struct tident with this // ID_VAR tident(int t, char *n, int m, int c, int x, int *s, void *f = NULL, bool p = false, T *_s = NULL) : _type(t), _name(n), _min(m), _max(x), _override(NO_OVERRIDE), _fun((void (__cdecl *)(void))f), _val(c), _persist(p), _storage(s), self(_s) {}// replace the #define's for IVAR with this#define _IVAR(n, m, c, x, p, b) struct var_##n : ident { var_##n() : ident(ID_VAR, #n, m, c, x, &_val, NULL, p) { addident(_name, this); } b } n#define IVAR(n, m, c, x) _IVAR(n, m, c, x, false, )#define IVARF(n, m, c, x, b) _IVAR(n, m, c, x, false, void changed() { b; })#define IVARP(n, m, c, x) _IVAR(n, m, c, x, true, )#define IVARFP(n, m, c, x, b) _IVAR(n, m, c, x, true, void changed() { b; })#define _CVAR(t, ts, sv, tv, n, m, c, x, p, b) struct var_##n : tident<t> { var_##n(ts) : tident<t>(ID_VAR, #n, m, c, x, &_val, NULL, p, sv) { addident(_name, (ident *)this); } void changed() { b; } } ivar_##n tv#define CVAR(t, n, m, c, x) _CVAR(t, t *_s, _s, (this), n, m, c, x, false, )#define CVARF(t, n, m, c, x, b) _CVAR(t, t *_s, _s, (this), n, m, c, x, false, b)#define CVARP(t, n, m, c, x) _CVAR(t, t *_s, _s, (this), n, m, c, x, true, )#define CVARFP(t, n, m, c, x, b) _CVAR(t, t *_s, _s, (this), n, m, c, x, true, b)