Skip to content

Commit

Permalink
Some minor TTerrainInterface progress
Browse files Browse the repository at this point in the history
  • Loading branch information
AdventureT committed Jul 6, 2024
1 parent 009678d commit 463c1c3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Toshi/Include/TTerrain/Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#define TOSHI_MULTIPLATFORM(FILENAME) STRINGIFY(STRCAT_3(Win/, FILENAME, Win.h))
#endif

#ifdef TTERAININTERFACE
#define TTERAININTERFACE_EXPORTS __declspec(dllexport)
#ifdef TTERRAININTERFACE
#define TTERRAININTERFACE_EXPORTS __declspec(dllexport)
#else
#define TTERAININTERFACE_EXPORTS __declspec(dllimport)
#define TTERRAININTERFACE_EXPORTS __declspec(dllimport)
#endif

#define TOSHI_API __stdcall
Expand Down
14 changes: 13 additions & 1 deletion Toshi/Include/TTerrain/TTerrainInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@

TOSHI_NAMESPACE_BEGIN

class TTERAININTERFACE_EXPORTS TTerrainInterface
class TTERRAININTERFACE_EXPORTS TTerrainInterface
{
public:
enum TERRAINLOD
{
TERRAINLOD_HIGH,
TERRAINLOD_MEDIUM,
TERRAINLOD_LOW
};

static void TOSHI_API SetLODDetail(TERRAINLOD a_eLODDetail);

static TFLOAT sm_fLowLevelDist;
private:

};

Expand Down
2 changes: 1 addition & 1 deletion Toshi/Include/TTerrain/TTerrainSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

TOSHI_NAMESPACE_BEGIN

class TTERAININTERFACE_EXPORTS TTerrainSection
class TTERRAININTERFACE_EXPORTS TTerrainSection
{

public:
Expand Down
25 changes: 25 additions & 0 deletions Toshi/Source/TTerrain/TTerrainInterface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "TTerrainInterface.h"

TOSHI_NAMESPACE_BEGIN

TFLOAT TTerrainInterface::sm_fLowLevelDist = 120.0f;

void TTerrainInterface::SetLODDetail(TERRAINLOD a_eLODDetail)
{
switch (a_eLODDetail)
{
case Toshi::TTerrainInterface::TERRAINLOD_HIGH:
sm_fLowLevelDist = 80.0f;
break;
case Toshi::TTerrainInterface::TERRAINLOD_MEDIUM:
sm_fLowLevelDist = 110.0f;
break;
case Toshi::TTerrainInterface::TERRAINLOD_LOW:
sm_fLowLevelDist = 220.0f;
break;
default:
break;
}
}

TOSHI_NAMESPACE_END

0 comments on commit 463c1c3

Please sign in to comment.