mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 17:39:40 +00:00
override, virtual -> final, remove unused variables, public to private.
This commit is contained in:
parent
6a3070e680
commit
c2de645c8c
4 changed files with 17 additions and 19 deletions
|
@ -47,7 +47,7 @@ CSVRender::TerrainShapeMode::TerrainShapeMode (WorldspaceWidget *worldspaceWidge
|
||||||
: EditMode (worldspaceWidget, QIcon {":scenetoolbar/editing-terrain-shape"}, Mask_Terrain | Mask_Reference, "Terrain land editing", parent),
|
: EditMode (worldspaceWidget, QIcon {":scenetoolbar/editing-terrain-shape"}, Mask_Terrain | Mask_Reference, "Terrain land editing", parent),
|
||||||
mBrushSize(1),
|
mBrushSize(1),
|
||||||
mBrushShape(CSVWidget::BrushShape_Point),
|
mBrushShape(CSVWidget::BrushShape_Point),
|
||||||
mShapeBrushScenetool(0),
|
mShapeBrushScenetool(nullptr),
|
||||||
mDragMode(InteractionType_None),
|
mDragMode(InteractionType_None),
|
||||||
mParentNode(parentNode),
|
mParentNode(parentNode),
|
||||||
mIsEditing(false),
|
mIsEditing(false),
|
||||||
|
|
|
@ -72,24 +72,25 @@ namespace CSVRender
|
||||||
void deactivate(CSVWidget::SceneToolbar*);
|
void deactivate(CSVWidget::SceneToolbar*);
|
||||||
|
|
||||||
/// Start shape editing command macro
|
/// Start shape editing command macro
|
||||||
virtual bool primaryEditStartDrag (const QPoint& pos);
|
bool primaryEditStartDrag (const QPoint& pos) final;
|
||||||
|
|
||||||
virtual bool secondaryEditStartDrag (const QPoint& pos);
|
bool secondaryEditStartDrag (const QPoint& pos) final;
|
||||||
virtual bool primarySelectStartDrag (const QPoint& pos);
|
bool primarySelectStartDrag (const QPoint& pos) final;
|
||||||
virtual bool secondarySelectStartDrag (const QPoint& pos);
|
bool secondarySelectStartDrag (const QPoint& pos) final;
|
||||||
|
|
||||||
/// Handle shape edit behavior during dragging
|
/// Handle shape edit behavior during dragging
|
||||||
virtual void drag (const QPoint& pos, int diffX, int diffY, double speedFactor);
|
void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) final;
|
||||||
|
|
||||||
/// End shape editing command macro
|
/// End shape editing command macro
|
||||||
virtual void dragCompleted(const QPoint& pos);
|
void dragCompleted(const QPoint& pos) final;
|
||||||
|
|
||||||
/// Cancel shape editing, and reset all pending changes
|
/// Cancel shape editing, and reset all pending changes
|
||||||
virtual void dragAborted();
|
void dragAborted() final;
|
||||||
|
|
||||||
virtual void dragWheel (int diff, double speedFactor);
|
void dragWheel (int diff, double speedFactor) final;
|
||||||
virtual void dragMoveEvent (QDragMoveEvent *event);
|
void dragMoveEvent (QDragMoveEvent *event) final;
|
||||||
|
|
||||||
|
private:
|
||||||
/// Move pending alteredHeights changes to omwgame/omeaddon -data
|
/// Move pending alteredHeights changes to omwgame/omeaddon -data
|
||||||
void applyTerrainEditChanges();
|
void applyTerrainEditChanges();
|
||||||
|
|
||||||
|
@ -138,7 +139,6 @@ namespace CSVRender
|
||||||
/// Create new cell and land if needed
|
/// Create new cell and land if needed
|
||||||
bool allowLandShapeEditing(const std::string& textureFileName);
|
bool allowLandShapeEditing(const std::string& textureFileName);
|
||||||
|
|
||||||
private:
|
|
||||||
std::string mCellId;
|
std::string mCellId;
|
||||||
std::string mBrushTexture;
|
std::string mBrushTexture;
|
||||||
int mBrushSize;
|
int mBrushSize;
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
|
|
||||||
namespace CSVRender
|
namespace CSVRender
|
||||||
{
|
{
|
||||||
const float defaultHeight = ESM::Land::DEFAULT_HEIGHT;
|
|
||||||
|
|
||||||
TerrainStorage::TerrainStorage(const CSMWorld::Data &data)
|
TerrainStorage::TerrainStorage(const CSMWorld::Data &data)
|
||||||
: ESMTerrain::Storage(data.getResourceSystem()->getVFS())
|
: ESMTerrain::Storage(data.getResourceSystem()->getVFS())
|
||||||
, mData(data)
|
, mData(data)
|
||||||
|
|
|
@ -16,7 +16,6 @@ namespace CSVRender
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TerrainStorage(const CSMWorld::Data& data);
|
TerrainStorage(const CSMWorld::Data& data);
|
||||||
std::array<float, ESM::Land::LAND_SIZE * ESM::Land::LAND_SIZE> mAlteredHeight;
|
|
||||||
void setAlteredHeight(int inCellX, int inCellY, float heightMap);
|
void setAlteredHeight(int inCellX, int inCellY, float heightMap);
|
||||||
void resetHeights();
|
void resetHeights();
|
||||||
float getSumOfAlteredAndTrueHeight(int cellX, int cellY, int inCellX, int inCellY);
|
float getSumOfAlteredAndTrueHeight(int cellX, int cellY, int inCellX, int inCellY);
|
||||||
|
@ -24,11 +23,12 @@ namespace CSVRender
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const CSMWorld::Data& mData;
|
const CSMWorld::Data& mData;
|
||||||
|
std::array<float, ESM::Land::LAND_SIZE * ESM::Land::LAND_SIZE> mAlteredHeight;
|
||||||
|
|
||||||
virtual osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY) override;
|
osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY) final;
|
||||||
virtual const ESM::LandTexture* getLandTexture(int index, short plugin) override;
|
const ESM::LandTexture* getLandTexture(int index, short plugin) final;
|
||||||
|
|
||||||
virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY) override;
|
void getBounds(float& minX, float& maxX, float& minY, float& maxY) final;
|
||||||
|
|
||||||
int getThisHeight(int col, int row, const ESM::Land::LandData *heightData) const;
|
int getThisHeight(int col, int row, const ESM::Land::LandData *heightData) const;
|
||||||
int getLeftHeight(int col, int row, const ESM::Land::LandData *heightData) const;
|
int getLeftHeight(int col, int row, const ESM::Land::LandData *heightData) const;
|
||||||
|
@ -42,8 +42,8 @@ namespace CSVRender
|
||||||
bool leftOrUpIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
|
bool leftOrUpIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
|
||||||
bool rightOrDownIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
|
bool rightOrDownIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
|
||||||
|
|
||||||
void adjustColor(int col, int row, const ESM::Land::LandData *heightData, osg::Vec4ub& color) const override;
|
void adjustColor(int col, int row, const ESM::Land::LandData *heightData, osg::Vec4ub& color) const final;
|
||||||
float getAlteredHeight(int col, int row) const override;
|
float getAlteredHeight(int col, int row) const final;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue