Remove redundant ESM::Land and LandData default constructors

macos_ci_fix
elsid 1 year ago
parent 95a39b3281
commit a2f2b1a3d1
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -10,15 +10,6 @@
namespace ESM namespace ESM
{ {
Land::Land()
: mFlags(0)
, mX(0)
, mY(0)
, mDataTypes(0)
, mLandData(nullptr)
{
}
void transposeTextureData(const uint16_t* in, uint16_t* out) void transposeTextureData(const uint16_t* in, uint16_t* out)
{ {
int readPos = 0; // bit ugly, but it works int readPos = 0; // bit ugly, but it works

@ -25,14 +25,14 @@ namespace ESM
/// Return a string descriptor for this record type. Currently used for debugging / error logs only. /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Land"; } static std::string_view getRecordType() { return "Land"; }
Land(); Land() = default;
~Land(); ~Land();
// Only first four bits seem to be used, don't know what they mean. // Only first four bits seem to be used, don't know what they mean.
std::uint32_t mFlags; std::uint32_t mFlags = 0;
// Map coordinates. // Map coordinates.
std::int32_t mX; std::int32_t mX = 0;
std::int32_t mY; std::int32_t mY = 0;
// Plugin index, used to reference the correct material palette. // Plugin index, used to reference the correct material palette.
int getPlugin() const { return mContext.index; } int getPlugin() const { return mContext.index; }
@ -44,7 +44,7 @@ namespace ESM
// in which case the filename will be empty. // in which case the filename will be empty.
ESM_Context mContext; ESM_Context mContext;
int mDataTypes; int mDataTypes = 0;
enum enum
{ {
@ -91,22 +91,12 @@ namespace ESM
struct LandData struct LandData
{ {
LandData()
: mHeightOffset(0)
, mMinHeight(0)
, mMaxHeight(0)
, mUnk1(0)
, mUnk2(0)
, mDataLoaded(0)
{
}
// Initial reference height for the first vertex, only needed for filling mHeights // Initial reference height for the first vertex, only needed for filling mHeights
float mHeightOffset; float mHeightOffset = 0;
// Height in world space for each vertex // Height in world space for each vertex
float mHeights[LAND_NUM_VERTS]; float mHeights[LAND_NUM_VERTS];
float mMinHeight; float mMinHeight = 0;
float mMaxHeight; float mMaxHeight = 0;
// 24-bit normals, these aren't always correct though. Edge and corner normals may be garbage. // 24-bit normals, these aren't always correct though. Edge and corner normals may be garbage.
std::int8_t mNormals[LAND_NUM_VERTS * 3]; std::int8_t mNormals[LAND_NUM_VERTS * 3];
@ -120,10 +110,10 @@ namespace ESM
std::uint8_t mColours[3 * LAND_NUM_VERTS]; std::uint8_t mColours[3 * LAND_NUM_VERTS];
// ??? // ???
std::uint16_t mUnk1; std::uint16_t mUnk1 = 0;
std::uint8_t mUnk2; std::uint8_t mUnk2 = 0;
int mDataLoaded; int mDataLoaded = 0;
}; };
// low-LOD heightmap (used for rendering the global map) // low-LOD heightmap (used for rendering the global map)
@ -176,7 +166,7 @@ namespace ESM
/// including the case when data is already loaded /// including the case when data is already loaded
bool condLoad(ESMReader& reader, int flags, int& targetFlags, int dataFlag, void* ptr, unsigned int size) const; bool condLoad(ESMReader& reader, int flags, int& targetFlags, int dataFlag, void* ptr, unsigned int size) const;
mutable LandData* mLandData; mutable LandData* mLandData = nullptr;
}; };
} }

Loading…
Cancel
Save