The start script to export SH5 terrain RAW files to the obj format.
This does all the x y z stuff but does not include the VT or faces code.
Nice looping example thought!
_____________________________________
//------------------------------------------------
//--- 010 Editor Script File
// RAW to object file .003
// Reads the DetailMask RAW files in SH5 and outputs an Object file
//
//------------------------------------------------
int i, l, t, s=101;
char W[40];
float x, y, z;
x=-2550;
for( i = 0; i < s; i++)
{
x=(x+50);
z=-2550;
l=101;
{
for( t = 0; t < l; t++)
{
y = ReadFloat();
z=(z+50);
Printf( "v %f %f %f\n", z, y, x );
FSkip(4);
}
}
}
Printf("Test");// all the code for textures and faces will follow
W = InputString("Save File", "Name your save file", "c:\\temp\\");// You can change the path when saving.
OutputPaneSave( W );
|