Code:
#define PRAGMA_POINTER



And yes, every member access through a pointer needs to dereference the pointer, which is what the -> operator is doing. Alternatively, you can also use something like (*ptr).member, which is essentially the same thing: Dereference the pointer, access the member.

Anyhow, PRAGMA_POINTER will also require you to make more changes. Something like this for example doesn't work anymore:
Code:
VECTOR temp;
vec_set(temp, nullvector);



The signature of vec_set() is pretty clear, the first argument has to be a pointer, but temp isn't in this case. Instead you have to use the reference operator & to get the pointer to temp:
Code:
VECTOR temp;
vec_set(&temp, nullvector);



Similarly:
Code:
vec_set(my.x, nullvector); // Wrong
vec_set((VECTOR *)(&my->x), nullvector); // Right. Also note the explicit cast, because &my->x gives you a pointer to a var)


Last edited by JustSid; 11/08/13 22:12.

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com