forked from mirror/openmw-tes3mp
195071efc7
TODO: background load layer textures and blendmaps. "Distant land" setting has been removed for now (i.e. always enabled).
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
#ifndef COMPONENTS_TERRAIN_DEFS_HPP
|
|
#define COMPONENTS_TERRAIN_DEFS_HPP
|
|
|
|
namespace Terrain
|
|
{
|
|
|
|
/// The alignment of the terrain
|
|
enum Alignment
|
|
{
|
|
/// Terrain is in the X/Z plane
|
|
Align_XZ = 0,
|
|
/// Terrain is in the X/Y plane
|
|
Align_XY = 1,
|
|
/// Terrain is in the Y/Z plane.
|
|
/// UNTESTED - use at own risk.
|
|
/// Besides, X as up axis? What is wrong with you? ;)
|
|
Align_YZ = 2
|
|
};
|
|
|
|
inline void convertPosition(Alignment align, float &x, float &y, float &z)
|
|
{
|
|
switch (align)
|
|
{
|
|
case Align_XY:
|
|
return;
|
|
case Align_XZ:
|
|
std::swap(y, z);
|
|
// This is since -Z should be going *into* the screen
|
|
// If not doing this, we'd get wrong vertex winding
|
|
z *= -1;
|
|
return;
|
|
case Align_YZ:
|
|
std::swap(x, y);
|
|
std::swap(y, z);
|
|
return;
|
|
}
|
|
}
|
|
|
|
struct LayerInfo
|
|
{
|
|
std::string mDiffuseMap;
|
|
std::string mNormalMap;
|
|
bool mParallax; // Height info in normal map alpha channel?
|
|
bool mSpecular; // Specular info in diffuse map alpha channel?
|
|
};
|
|
}
|
|
|
|
#endif
|