mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
made return type of ESMTerrain::Storage::getLand const
This commit is contained in:
parent
69045d7ec9
commit
febf611c82
@ -9,7 +9,7 @@ namespace CSVRender
|
||||
{
|
||||
}
|
||||
|
||||
ESM::Land* TerrainStorage::getLand(int cellX, int cellY)
|
||||
const ESM::Land* TerrainStorage::getLand(int cellX, int cellY)
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << "#" << cellX << " " << cellY;
|
||||
|
@ -18,7 +18,7 @@ namespace CSVRender
|
||||
private:
|
||||
const CSMWorld::Data& mData;
|
||||
|
||||
virtual ESM::Land* getLand (int cellX, int cellY);
|
||||
virtual const ESM::Land* getLand (int cellX, int cellY);
|
||||
virtual const ESM::LandTexture* getLandTexture(int index, short plugin);
|
||||
|
||||
virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY);
|
||||
|
@ -51,7 +51,7 @@ namespace MWRender
|
||||
maxY += 1;
|
||||
}
|
||||
|
||||
ESM::Land* TerrainStorage::getLand(int cellX, int cellY)
|
||||
const ESM::Land* TerrainStorage::getLand(int cellX, int cellY)
|
||||
{
|
||||
const MWWorld::ESMStore &esmStore =
|
||||
MWBase::Environment::get().getWorld()->getStore();
|
||||
|
@ -10,7 +10,7 @@ namespace MWRender
|
||||
class TerrainStorage : public ESMTerrain::Storage
|
||||
{
|
||||
private:
|
||||
virtual ESM::Land* getLand (int cellX, int cellY);
|
||||
virtual const ESM::Land* getLand (int cellX, int cellY);
|
||||
virtual const ESM::LandTexture* getLandTexture(int index, short plugin);
|
||||
public:
|
||||
|
||||
|
@ -74,7 +74,7 @@ namespace ESMTerrain
|
||||
--cellX;
|
||||
row += ESM::Land::LAND_SIZE-1;
|
||||
}
|
||||
ESM::Land* land = getLand(cellX, cellY);
|
||||
const ESM::Land* land = getLand(cellX, cellY);
|
||||
if (land && land->mDataTypes&ESM::Land::DATA_VNML)
|
||||
{
|
||||
normal.x() = land->mLandData->mNormals[col*ESM::Land::LAND_SIZE*3+row*3];
|
||||
@ -109,7 +109,7 @@ namespace ESMTerrain
|
||||
++cellX;
|
||||
row = 0;
|
||||
}
|
||||
ESM::Land* land = getLand(cellX, cellY);
|
||||
const ESM::Land* land = getLand(cellX, cellY);
|
||||
if (land && land->mDataTypes&ESM::Land::DATA_VCLR)
|
||||
{
|
||||
color.r() = land->mLandData->mColours[col*ESM::Land::LAND_SIZE*3+row*3] / 255.f;
|
||||
@ -158,7 +158,7 @@ namespace ESMTerrain
|
||||
float vertX_ = 0; // of current cell corner
|
||||
for (int cellX = startX; cellX < startX + std::ceil(size); ++cellX)
|
||||
{
|
||||
ESM::Land* land = getLand(cellX, cellY);
|
||||
const ESM::Land* land = getLand(cellX, cellY);
|
||||
if (land && !(land->mDataTypes&ESM::Land::DATA_VHGT))
|
||||
land = NULL;
|
||||
|
||||
@ -262,7 +262,7 @@ namespace ESMTerrain
|
||||
assert(x<ESM::Land::LAND_TEXTURE_SIZE);
|
||||
assert(y<ESM::Land::LAND_TEXTURE_SIZE);
|
||||
|
||||
ESM::Land* land = getLand(cellX, cellY);
|
||||
const ESM::Land* land = getLand(cellX, cellY);
|
||||
if (land && (land->mDataTypes&ESM::Land::DATA_VTEX))
|
||||
{
|
||||
int tex = land->mLandData->mTextures[y * ESM::Land::LAND_TEXTURE_SIZE + x];
|
||||
@ -368,7 +368,7 @@ namespace ESMTerrain
|
||||
int cellX = static_cast<int>(std::floor(worldPos.x() / 8192.f));
|
||||
int cellY = static_cast<int>(std::floor(worldPos.y() / 8192.f));
|
||||
|
||||
ESM::Land* land = getLand(cellX, cellY);
|
||||
const ESM::Land* land = getLand(cellX, cellY);
|
||||
if (!land || !(land->mDataTypes&ESM::Land::DATA_VHGT))
|
||||
return -2048;
|
||||
|
||||
|
@ -21,7 +21,7 @@ namespace ESMTerrain
|
||||
private:
|
||||
|
||||
// Not implemented in this class, because we need different Store implementations for game and editor
|
||||
virtual ESM::Land* getLand (int cellX, int cellY) = 0;
|
||||
virtual const ESM::Land* getLand (int cellX, int cellY) = 0;
|
||||
virtual const ESM::LandTexture* getLandTexture(int index, short plugin) = 0;
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user