There is constructions like dymamic arrays
float mat[data->num_joints * 12];
Also declarations like
....
rotW = -SQRTFAST(1.0f - rotW);
float xx = 2.0f * joint->rotate[0] * joint->rotate[0];
float yy = 2.0f * joint->rotate[1] * joint->rotate[1];
....
Which is just rejected by MSVC
Created attachment 2689[details]
iqm2.diff
Well, they those constructions are officially part of the C standard for over 10 years, but I guess Microsoft still prefers to make it's own standards.
Anyway, here is a patch that should fix these constructs and also adds some features I missed in the first patch, like fog and shadow support.
Dynamic arrays are part of the C99 standard, as well as inline variable declaration. Maybe one has to switch C99 on in MSVC?
Nevertheless, gimhael: I'd like to manage without the memory allocation call. For MD4/MDR there's a hard limit on the number of bones. Couldn't we simply impose such a limit on the number of joints and then declare the needed space statically?
Created attachment 2689 [details] iqm2.diff Well, they those constructions are officially part of the C standard for over 10 years, but I guess Microsoft still prefers to make it's own standards. Anyway, here is a patch that should fix these constructs and also adds some features I missed in the first patch, like fog and shadow support.
Created attachment 2690 [details] iqm2.diff New patch using a static array for the bone matrices.