I think i fixed it but theres room for improvement still.
Ran a codeanalysis by msvc 2013 and found several places where the same function was recast to another type.
like idStr somestring;
was cast to char *somestring; inside the same function and even more glaring whoopsies where a global was cast to something else inside a function.
The compiler should be smart enough to optimize things like that out but its bad practice to say the least and funneling it out actually gave me a rather nice performance boost hoho

.
there was a rather nasty example of the above in the stencil shadow code which ment an array could easily use the wrong type.
Latest build here
This guy looked shocked to say the least


Productivity is a state of mind.