In Examples/CastleCreator/Source/Editor.cpp, line 37:55 (and many other parts) single-line comments are being used over the more appropriate multi-line comments.
Current:
//Pi3Cmodel Editor::createScene(const uint32_t width, const uint32_t depth, Pi3Cmodel usemodel, const vec3f &grid)
//{
// float hw = width * grid.x * 0.5f;
// float hd = depth * grid.z * 0.5f;
// Pi3Cmodel model;
// //Pi3Cmodel findModel = modelsLib.find(modelname);
// if (!usemodel) return model;
//
// for (uint32_t z = 0; z < depth; z++)
// {
// for (uint32_t x = 0; x < width; x++)
// {
// vec3f position = { xgrid.x-hw, 0, zgrid.z-hd };
// vec3f rotation = { 0, 0, 0 };
// model.append(*usemodel, position, rotation);
// }
// }
// return model;
//}
Fix:
/*
Pi3Cmodel Editor::createScene(const uint32_t width, const uint32_t depth, Pi3Cmodel *usemodel, const vec3f &grid)
{
float hw = width * grid.x * 0.5f;
float hd = depth * grid.z * 0.5f;
Pi3Cmodel model;
//Pi3Cmodel *findModel = modelsLib.find(modelname);
if (!usemodel) return model;
for (uint32_t z = 0; z < depth; z++)
{
for (uint32_t x = 0; x < width; x++)
{
vec3f position = { x*grid.x-hw, 0, z*grid.z-hd };
vec3f rotation = { 0, 0, 0 };
model.append(*usemodel, position, rotation);
}
}
return model;
}
*/
In Examples/CastleCreator/Source/Editor.cpp, line 37:55 (and many other parts) single-line comments are being used over the more appropriate multi-line comments.
Current:
//Pi3Cmodel Editor::createScene(const uint32_t width, const uint32_t depth, Pi3Cmodel usemodel, const vec3f &grid)
//{
// float hw = width * grid.x * 0.5f;
// float hd = depth * grid.z * 0.5f;
// Pi3Cmodel model;
// //Pi3Cmodel findModel = modelsLib.find(modelname);
// if (!usemodel) return model;
//
// for (uint32_t z = 0; z < depth; z++)
// {
// for (uint32_t x = 0; x < width; x++)
// {
// vec3f position = { xgrid.x-hw, 0, zgrid.z-hd };
// vec3f rotation = { 0, 0, 0 };
// model.append(*usemodel, position, rotation);
// }
// }
// return model;
//}
Fix:
/*
Pi3Cmodel Editor::createScene(const uint32_t width, const uint32_t depth, Pi3Cmodel *usemodel, const vec3f &grid)
{
float hw = width * grid.x * 0.5f;
float hd = depth * grid.z * 0.5f;
Pi3Cmodel model;
//Pi3Cmodel *findModel = modelsLib.find(modelname);
if (!usemodel) return model;
}
*/