struct P{
s16 x;
s16 y;
}
// create a new 16 bit struct
P p = (10, 10);
// put this position into an int
s32 myposition = (int)p;
// put the int back into the stuct
P backPos = (P)myposition;
//put the stuct into a irrlicht position
core::position2di m = new core::position2di(backPos.x, backPos.y);
I'd appreciate some critique, my C/C++ is getting a bit rusty