Some terrain fixes

This commit is contained in:
scrawl 2013-08-20 12:08:46 +02:00
parent 0545622f5a
commit fa76d1631b
4 changed files with 9 additions and 9 deletions

View file

@ -46,12 +46,12 @@ namespace
// Algorithm described by Hanan Samet - 'Neighbour Finding in Quadtrees'
// http://www.cs.umd.edu/~hjs/pubs/SametPRIP81.pdf
Terrain::QuadTreeNode* searchNeighbourRecursive (Terrain::QuadTreeNode* currentNode, Terrain::Direction dir)
QuadTreeNode* searchNeighbourRecursive (QuadTreeNode* currentNode, Direction dir)
{
if (!currentNode->getParent())
return NULL; // Arrived at root node, the root node does not have neighbours
Terrain::QuadTreeNode* nextNode;
QuadTreeNode* nextNode;
if (adjacent(currentNode->getDirection(), dir))
nextNode = searchNeighbourRecursive(currentNode->getParent(), dir);
else

View file

@ -14,6 +14,8 @@ namespace Terrain
/// We keep storage of terrain data abstract here since we need different implementations for game and editor
class Storage
{
public:
virtual ~Storage() {}
private:
virtual ESM::Land* getLand (int cellX, int cellY) = 0;
virtual const ESM::LandTexture* getLandTexture(int index, short plugin) = 0;