|
|
@ -166,7 +166,7 @@ void CVegetableDlg::setVegetableToEdit(NL3D::CVegetable *vegetable)
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
uint CVegetableDlg::getNumVegetables() const
|
|
|
|
uint CVegetableDlg::getNumVegetables() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _Vegetables.size();
|
|
|
|
return (uint)_Vegetables.size();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
std::string CVegetableDlg::getVegetableName(uint id) const
|
|
|
|
std::string CVegetableDlg::getVegetableName(uint id) const
|
|
|
@ -286,7 +286,7 @@ void CVegetableDlg::CVegetableDesc::updateVegetableName()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint pos= Vegetable->ShapeName.find(".veget");
|
|
|
|
std::string::size_type pos= Vegetable->ShapeName.find(".veget");
|
|
|
|
VegetableName= Vegetable->ShapeName.substr(0, pos);
|
|
|
|
VegetableName= Vegetable->ShapeName.substr(0, pos);
|
|
|
|
// And (to be clearer) append distance of creation.
|
|
|
|
// And (to be clearer) append distance of creation.
|
|
|
|
char str[256];
|
|
|
|
char str[256];
|
|
|
@ -380,7 +380,7 @@ void CVegetableDlg::buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool
|
|
|
|
|
|
|
|
|
|
|
|
vegetables.push_back(*_Vegetables[i].Vegetable);
|
|
|
|
vegetables.push_back(*_Vegetables[i].Vegetable);
|
|
|
|
// get dst index.
|
|
|
|
// get dst index.
|
|
|
|
uint dstId= vegetables.size()-1;
|
|
|
|
uint dstId= (uint)vegetables.size()-1;
|
|
|
|
// transform degrees in radians.
|
|
|
|
// transform degrees in radians.
|
|
|
|
vegetables[dstId].Rx.Abs*= degToRad;
|
|
|
|
vegetables[dstId].Rx.Abs*= degToRad;
|
|
|
|
vegetables[dstId].Rx.Rand*= degToRad;
|
|
|
|
vegetables[dstId].Rx.Rand*= degToRad;
|
|
|
@ -422,7 +422,7 @@ void CVegetableDlg::appendVegetableSet(NL3D::CTileVegetableDesc &vegetSet)
|
|
|
|
|
|
|
|
|
|
|
|
// Add a new vegetable to the list.
|
|
|
|
// Add a new vegetable to the list.
|
|
|
|
_Vegetables.push_back( CVegetableDesc ());
|
|
|
|
_Vegetables.push_back( CVegetableDesc ());
|
|
|
|
uint id= _Vegetables.size()-1;
|
|
|
|
uint id= (uint)_Vegetables.size()-1;
|
|
|
|
_Vegetables[id].initVegetable(veget);
|
|
|
|
_Vegetables[id].initVegetable(veget);
|
|
|
|
|
|
|
|
|
|
|
|
// update view
|
|
|
|
// update view
|
|
|
@ -512,7 +512,7 @@ void CVegetableDlg::OnButtonVegetableAdd()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Add a new vegetable to the list.
|
|
|
|
// Add a new vegetable to the list.
|
|
|
|
_Vegetables.push_back(CVegetableDesc ());
|
|
|
|
_Vegetables.push_back(CVegetableDesc ());
|
|
|
|
uint id= _Vegetables.size()-1;
|
|
|
|
uint id= (uint)_Vegetables.size()-1;
|
|
|
|
_Vegetables[id].initDefaultVegetable();
|
|
|
|
_Vegetables[id].initDefaultVegetable();
|
|
|
|
|
|
|
|
|
|
|
|
// update view
|
|
|
|
// update view
|
|
|
@ -607,7 +607,7 @@ void CVegetableDlg::OnButtonVegetableLoadDesc()
|
|
|
|
f.serial(veget);
|
|
|
|
f.serial(veget);
|
|
|
|
// Add a new vegetable to the list.
|
|
|
|
// Add a new vegetable to the list.
|
|
|
|
_Vegetables.push_back(CVegetableDesc ());
|
|
|
|
_Vegetables.push_back(CVegetableDesc ());
|
|
|
|
uint id= _Vegetables.size()-1;
|
|
|
|
uint id= (uint)_Vegetables.size()-1;
|
|
|
|
_Vegetables[id].initVegetable(veget);
|
|
|
|
_Vegetables[id].initVegetable(veget);
|
|
|
|
|
|
|
|
|
|
|
|
// update view
|
|
|
|
// update view
|
|
|
|