*/
#include "farmesh.h"
+
#include "constants.h"
#include "debug.h"
#include "noise.h"
#include "map.h"
#include "client.h"
+#include "tile.h" // ITextureSource
+#include "clientmap.h"
-#include "mapgen.h"
+#include "mapgen.h" // Shouldn't really be done this way
FarMesh::FarMesh(
scene::ISceneNode* parent,
{
dstream<<__FUNCTION_NAME<<std::endl;
- video::IVideoDriver* driver = mgr->getVideoDriver();
+ //video::IVideoDriver* driver = mgr->getVideoDriver();
m_materials[0].setFlag(video::EMF_LIGHTING, false);
m_materials[0].setFlag(video::EMF_BACK_FACE_CULLING, true);
m_materials[1].setFlag(video::EMF_BACK_FACE_CULLING, false);
m_materials[1].setFlag(video::EMF_BILINEAR_FILTER, false);
m_materials[1].setFlag(video::EMF_FOG_ENABLE, false);
- m_materials[1].setTexture
- (0, driver->getTexture(getTexturePath("treeprop.png").c_str()));
+ m_materials[1].setTexture(0, client->tsrc()->getTextureRaw("treeprop.png"));
m_materials[1].MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
m_materials[1].setFlag(video::EMF_FOG_ENABLE, true);
hp.ma = (4)*BS;
/*hp.gh = BS*base_rock_level_2d(seed, p2d);
hp.ma = BS*get_mud_add_amount(seed, p2d);*/
- hp.have_sand = mapgen::get_have_sand(seed, p2d);
+ hp.have_sand = mapgen::get_have_beach(seed, p2d);
if(hp.gh > BS*WATER_LEVEL)
hp.tree_amount = mapgen::tree_amount_2d(seed, p2d);
else