1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

linux build

clang format 14.0

Arm64 build
This commit is contained in:
florent.teppe 2023-05-19 22:44:40 +02:00
parent a9e0489867
commit 2bb17279df
4 changed files with 37 additions and 9 deletions

View File

@ -16,6 +16,7 @@
#include <deque> #include <deque>
#include <memory> #include <memory>
#include <unordered_map>
namespace osg namespace osg
{ {

View File

@ -1192,6 +1192,11 @@ namespace MWWorld
MWWorld::TypedDynamicStore<ESM4::Cell>::clearDynamic(); MWWorld::TypedDynamicStore<ESM4::Cell>::clearDynamic();
} }
// ESM4 Land
//=========================================================================
// Needed to avoid include of ESM4::Land in header
Store<ESM4::Land>::Store() {}
void Store<ESM4::Land>::updateLandPositions(const Store<ESM4::Cell>& cells) void Store<ESM4::Land>::updateLandPositions(const Store<ESM4::Cell>& cells)
{ {
for (auto& it : mStatic) for (auto& it : mStatic)

View File

@ -309,10 +309,11 @@ namespace MWWorld
std::unordered_map<ESM::ExteriorCellLocation, const ESM4::Land*> mLands; std::unordered_map<ESM::ExteriorCellLocation, const ESM4::Land*> mLands;
public: public:
Store();
void updateLandPositions(const Store<ESM4::Cell>& cells); void updateLandPositions(const Store<ESM4::Cell>& cells);
const ESM4::Land* search(ESM::ExteriorCellLocation cellLocation) const; const ESM4::Land* search(ESM::ExteriorCellLocation cellLocation) const;
const std::unordered_map<ESM::ExteriorCellLocation, const ESM4::Land*>& getLands() const { return mLands; }; const std::unordered_map<ESM::ExteriorCellLocation, const ESM4::Land*>& getLands() const { return mLands; }
}; };
template <> template <>

View File

@ -137,14 +137,35 @@ namespace ESM4
// void blank(); // void blank();
static constexpr ESM::RecNameInts sRecordId = ESM::REC_LAND4; static constexpr ESM::RecNameInts sRecordId = ESM::REC_LAND4;
std::span<const float> getHeights() const override { return mHeights; } std::span<const float> getHeights() const override
std::span<const VNML> getNormals() const override { return mVertNorm; } {
std::span<const unsigned char> getColors() const override { return mVertColr; } return mHeights;
}
std::span<const VNML> getNormals() const override
{
return mVertNorm;
}
std::span<const unsigned char> getColors() const override
{
return mVertColr;
}
std::span<const uint16_t> getTextures() const override; std::span<const uint16_t> getTextures() const override;
float getSize() const override { return REAL_SIZE; } float getSize() const override
float getMinHeight() const override { return mMinHeight; } {
float getMaxHeight() const { return mMaxHeight; } return REAL_SIZE;
int getLandSize() const { return VERTS_PER_SIDE; } }
float getMinHeight() const override
{
return mMinHeight;
}
float getMaxHeight() const
{
return mMaxHeight;
}
int getLandSize() const
{
return VERTS_PER_SIDE;
}
}; };
} }