Skip to content

Commit 498c351

Browse files
authored
Merge pull request #110 from onurcan488/main
2 parents 3471964 + f895a1a commit 498c351

14 files changed

+43
-45
lines changed

src/GameLib/ActorInstance.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "ActorInstance.h"
33
#include "AreaTerrain.h"
44
#include "RaceData.h"
5-
#include "SpeedTreeLib/SpeedTreeForestDirectX8.h"
5+
#include "SpeedTreeLib/SpeedTreeForestDirectX.h"
66
#include "SpeedTreeLib/SpeedTreeWrapper.h"
77

88
enum
@@ -813,7 +813,7 @@ void CActorInstance::__CreateTree(const char * c_szFileName)
813813
{
814814
__DestroyTree();
815815

816-
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
816+
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
817817
m_pkTree=rkForest.CreateInstance(m_x, m_y, m_z, GetCaseCRC32(c_szFileName, strlen(c_szFileName)), c_szFileName);
818818
m_pkTree->SetPosition(m_x, m_y, m_z);
819819
m_pkTree->UpdateBoundingSphere();
@@ -825,7 +825,7 @@ void CActorInstance::__DestroyTree()
825825
if (!m_pkTree)
826826
return;
827827

828-
CSpeedTreeForestDirectX8::Instance().DeleteInstance(m_pkTree);
828+
CSpeedTreeForestDirectX::Instance().DeleteInstance(m_pkTree);
829829
}
830830

831831
void CActorInstance::__SetTreePosition(float fx, float fy, float fz)

src/GameLib/Area.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "EterLib/ResourceManager.h"
44
#include "EterLib/StateManager.h"
55
#include "EffectLib/EffectManager.h"
6-
#include "SpeedTreeLib/SpeedTreeForestDirectX8.h"
6+
#include "SpeedTreeLib/SpeedTreeForestDirectX.h"
77
#include "EterBase/Timer.h"
88

99
#include "Area.h"
@@ -550,7 +550,7 @@ void CArea::__SetObjectInstance_SetTree(TObjectInstance * pObjectInstance, const
550550

551551
void CArea::TObjectInstance::SetTree(float x, float y, float z, DWORD dwTreeCRC, const char* c_szTreeName)
552552
{
553-
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
553+
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
554554
pTree=rkForest.CreateInstance(x, y, z, dwTreeCRC, c_szTreeName);
555555
dwType = prt::PROPERTY_TYPE_TREE;
556556
}
@@ -1106,7 +1106,7 @@ void CArea::__Clear_DestroyObjectInstance(TObjectInstance * pObjectInstance)
11061106
if (pObjectInstance->pTree)
11071107
{
11081108
pObjectInstance->pTree->Clear();
1109-
CSpeedTreeForestDirectX8::Instance().DeleteInstance(pObjectInstance->pTree);
1109+
CSpeedTreeForestDirectX::Instance().DeleteInstance(pObjectInstance->pTree);
11101110
pObjectInstance->pTree = NULL;
11111111
}
11121112

src/GameLib/MapManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ void CMapManager::BeginEnvironment()
290290
// MR-14: -- END OF -- Fog update by Alaric
291291
else
292292
{
293-
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
293+
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
294294
rkForest.SetFog(
295295
mc_pcurEnvironmentData->GetFogNearDistance(),
296296
mc_pcurEnvironmentData->GetFogFarDistance()

src/GameLib/MapManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class CMapManager : public CScreen, public IPhysicsWorld
107107
// Map
108108
//////////////////////////////////////////////////////////////////////////
109109
CMapOutdoor * m_pkMap;
110-
CSpeedTreeForestDirectX8 m_Forest;
110+
CSpeedTreeForestDirectX m_Forest;
111111

112112
public:
113113
// 2004.10.14.myevan.TEMP_CAreaLoaderThread

src/GameLib/MapOutdoor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ bool CMapOutdoor::Destroy()
209209

210210
m_rkList_kGuildArea.clear();
211211
m_kPool_kMonsterAreaInfo.Destroy();
212-
CSpeedTreeForestDirectX8::Instance().Clear();
212+
CSpeedTreeForestDirectX::Instance().Clear();
213213

214214
return true;
215215
}
@@ -239,7 +239,7 @@ void CMapOutdoor::OnBeginEnvironment()
239239
if (!mc_pEnvironmentData)
240240
return;
241241

242-
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
242+
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
243243
rkForest.SetFog(
244244
mc_pEnvironmentData->GetFogNearDistance(),
245245
mc_pEnvironmentData->GetFogFarDistance()
@@ -1251,7 +1251,7 @@ void CMapOutdoor::XMasTree_Destroy()
12511251
{
12521252
if (m_kXMas.m_pkTree)
12531253
{
1254-
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
1254+
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
12551255
m_kXMas.m_pkTree->Clear();
12561256
rkForest.DeleteInstance(m_kXMas.m_pkTree);
12571257
m_kXMas.m_pkTree=NULL;
@@ -1269,7 +1269,7 @@ void CMapOutdoor::__XMasTree_Create(float x, float y, float z, const char* c_szT
12691269
assert(NULL==m_kXMas.m_pkTree);
12701270
assert(-1==m_kXMas.m_iEffectID);
12711271

1272-
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
1272+
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
12731273
DWORD dwCRC32 = GetCaseCRC32(c_szTreeName, strlen(c_szTreeName));
12741274
m_kXMas.m_pkTree=rkForest.CreateInstance(x, y, z, dwCRC32, c_szTreeName);
12751275

src/GameLib/MapOutdoor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "PRTerrainLib/TerrainType.h"
88
#include "PRTerrainLib/TextureSet.h"
99

10-
#include "SpeedTreeLib/SpeedTreeForestDirectX8.h"
10+
#include "SpeedTreeLib/SpeedTreeForestDirectX.h"
1111

1212
#include "MapBase.h"
1313
#include "Area.h"

src/GameLib/MapOutdoorLoad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bool CMapOutdoor::Load(float x, float y, float z)
3333
m_lOldReadX = -1;
3434

3535
// TODO: SetRenderingDevice에서 Environment로 부터 라이트 속성을 넘겨줘야 스태틱 라이트가 제대로 작동한다.
36-
CSpeedTreeForestDirectX8::Instance().SetRenderingDevice(ms_lpd3dDevice);
36+
CSpeedTreeForestDirectX::Instance().SetRenderingDevice(ms_lpd3dDevice);
3737

3838
Update(x, y, z);
3939

src/GameLib/MapOutdoorRender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void CMapOutdoor::RenderCloud()
238238
void CMapOutdoor::RenderTree()
239239
{
240240
if (IsVisiblePart(PART_TREE))
241-
CSpeedTreeForestDirectX8::Instance().Render();
241+
CSpeedTreeForestDirectX::Instance().Render();
242242
}
243243

244244
void CMapOutdoor::SetInverseViewAndDynamicShaodwMatrices()

src/GameLib/MapOutdoorUpdate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ bool CMapOutdoor::Update(float fX, float fY, float fZ)
112112
#ifdef __PERFORMANCE_CHECKER__
113113
DWORD t3=ELTimer_GetMSec();
114114
#endif
115-
CSpeedTreeForestDirectX8::Instance().UpdateSystem(CTimer::Instance().GetCurrentSecond());
115+
CSpeedTreeForestDirectX::Instance().UpdateSystem(CTimer::Instance().GetCurrentSecond());
116116
#ifdef __PERFORMANCE_CHECKER__
117117
DWORD t4=ELTimer_GetMSec();
118118
#endif

src/SpeedTreeLib/SpeedTreeForestDirectX8.cpp renamed to src/SpeedTreeLib/SpeedTreeForestDirectX.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////
2-
// CSpeedTreeForestDirectX8 Class
2+
// CSpeedTreeForestDirectX Class
33
//
44
// (c) 2003 IDV, Inc.
55
//
@@ -38,29 +38,29 @@
3838
#include "EterLib/StateManager.h"
3939
#include "EterLib/Camera.h"
4040

41-
#include "SpeedTreeForestDirectX8.h"
41+
#include "SpeedTreeForestDirectX.h"
4242
#include "SpeedTreeConfig.h"
4343
#include "VertexShaders.h"
4444

4545
///////////////////////////////////////////////////////////////////////
46-
// CSpeedTreeForestDirectX8::CSpeedTreeForestDirectX8
46+
// CSpeedTreeForestDirectX::CSpeedTreeForestDirectX
4747

48-
CSpeedTreeForestDirectX8::CSpeedTreeForestDirectX8() : m_dwBranchVertexShader(nullptr), m_pLeafVertexShaderDecl(nullptr), m_pLeafVertexShader(nullptr)
48+
CSpeedTreeForestDirectX::CSpeedTreeForestDirectX() : m_dwBranchVertexShader(nullptr), m_pLeafVertexShaderDecl(nullptr), m_pLeafVertexShader(nullptr)
4949
{
5050
}
5151

5252

5353
///////////////////////////////////////////////////////////////////////
54-
// CSpeedTreeForestDirectX8::~CSpeedTreeForestDirectX8
54+
// CSpeedTreeForestDirectX::~CSpeedTreeForestDirectX
5555

56-
CSpeedTreeForestDirectX8::~CSpeedTreeForestDirectX8()
56+
CSpeedTreeForestDirectX::~CSpeedTreeForestDirectX()
5757
{
5858
}
5959

6060

6161
///////////////////////////////////////////////////////////////////////
62-
// CSpeedTreeForestDirectX8::InitVertexShaders
63-
bool CSpeedTreeForestDirectX8::InitVertexShaders(void)
62+
// CSpeedTreeForestDirectX::InitVertexShaders
63+
bool CSpeedTreeForestDirectX::InitVertexShaders(void)
6464
{
6565
// load the vertex shaders
6666
if (!m_dwBranchVertexShader)
@@ -78,7 +78,7 @@ bool CSpeedTreeForestDirectX8::InitVertexShaders(void)
7878
return false;
7979
}
8080

81-
bool CSpeedTreeForestDirectX8::SetRenderingDevice(LPDIRECT3DDEVICE9 lpDevice)
81+
bool CSpeedTreeForestDirectX::SetRenderingDevice(LPDIRECT3DDEVICE9 lpDevice)
8282
{
8383
m_pDx = lpDevice;
8484

@@ -108,14 +108,14 @@ bool CSpeedTreeForestDirectX8::SetRenderingDevice(LPDIRECT3DDEVICE9 lpDevice)
108108
}
109109

110110
///////////////////////////////////////////////////////////////////////
111-
// CSpeedTreeForestDirectX8::UploadWindMatrix
111+
// CSpeedTreeForestDirectX::UploadWindMatrix
112112

113-
void CSpeedTreeForestDirectX8::UploadWindMatrix(UINT uiLocation, const float* pMatrix) const
113+
void CSpeedTreeForestDirectX::UploadWindMatrix(UINT uiLocation, const float* pMatrix) const
114114
{
115115
STATEMANAGER.SetVertexShaderConstant(uiLocation, pMatrix, 4);
116116
}
117117

118-
void CSpeedTreeForestDirectX8::UpdateCompundMatrix(const D3DXVECTOR3& c_rEyeVec, const D3DXMATRIX& c_rmatView, const D3DXMATRIX& c_rmatProj)
118+
void CSpeedTreeForestDirectX::UpdateCompundMatrix(const D3DXVECTOR3& c_rEyeVec, const D3DXMATRIX& c_rmatView, const D3DXMATRIX& c_rmatProj)
119119
{
120120
// setup composite matrix for shader
121121
D3DXMATRIX matBlend;
@@ -135,9 +135,9 @@ void CSpeedTreeForestDirectX8::UpdateCompundMatrix(const D3DXVECTOR3& c_rEyeVec,
135135
}
136136

137137
///////////////////////////////////////////////////////////////////////
138-
// CSpeedTreeForestDirectX8::Render
138+
// CSpeedTreeForestDirectX::Render
139139

140-
void CSpeedTreeForestDirectX8::Render(unsigned long ulRenderBitVector)
140+
void CSpeedTreeForestDirectX::Render(unsigned long ulRenderBitVector)
141141
{
142142
UpdateSystem(CTimer::Instance().GetCurrentSecond());
143143

0 commit comments

Comments
 (0)