DirectX8 to DirectX

This commit is contained in:
onurcan488
2026-02-16 20:59:18 +03:00
parent 3e604d5f10
commit f895a1a4a2
14 changed files with 43 additions and 45 deletions

View File

@@ -2,7 +2,7 @@
#include "ActorInstance.h"
#include "AreaTerrain.h"
#include "RaceData.h"
#include "SpeedTreeLib/SpeedTreeForestDirectX8.h"
#include "SpeedTreeLib/SpeedTreeForestDirectX.h"
#include "SpeedTreeLib/SpeedTreeWrapper.h"
enum
@@ -813,7 +813,7 @@ void CActorInstance::__CreateTree(const char * c_szFileName)
{
__DestroyTree();
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
m_pkTree=rkForest.CreateInstance(m_x, m_y, m_z, GetCaseCRC32(c_szFileName, strlen(c_szFileName)), c_szFileName);
m_pkTree->SetPosition(m_x, m_y, m_z);
m_pkTree->UpdateBoundingSphere();
@@ -825,7 +825,7 @@ void CActorInstance::__DestroyTree()
if (!m_pkTree)
return;
CSpeedTreeForestDirectX8::Instance().DeleteInstance(m_pkTree);
CSpeedTreeForestDirectX::Instance().DeleteInstance(m_pkTree);
}
void CActorInstance::__SetTreePosition(float fx, float fy, float fz)

View File

@@ -3,7 +3,7 @@
#include "EterLib/ResourceManager.h"
#include "EterLib/StateManager.h"
#include "EffectLib/EffectManager.h"
#include "SpeedTreeLib/SpeedTreeForestDirectX8.h"
#include "SpeedTreeLib/SpeedTreeForestDirectX.h"
#include "EterBase/Timer.h"
#include "Area.h"
@@ -550,7 +550,7 @@ void CArea::__SetObjectInstance_SetTree(TObjectInstance * pObjectInstance, const
void CArea::TObjectInstance::SetTree(float x, float y, float z, DWORD dwTreeCRC, const char* c_szTreeName)
{
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
pTree=rkForest.CreateInstance(x, y, z, dwTreeCRC, c_szTreeName);
dwType = prt::PROPERTY_TYPE_TREE;
}
@@ -1106,7 +1106,7 @@ void CArea::__Clear_DestroyObjectInstance(TObjectInstance * pObjectInstance)
if (pObjectInstance->pTree)
{
pObjectInstance->pTree->Clear();
CSpeedTreeForestDirectX8::Instance().DeleteInstance(pObjectInstance->pTree);
CSpeedTreeForestDirectX::Instance().DeleteInstance(pObjectInstance->pTree);
pObjectInstance->pTree = NULL;
}

View File

@@ -290,7 +290,7 @@ void CMapManager::BeginEnvironment()
// MR-14: -- END OF -- Fog update by Alaric
else
{
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
rkForest.SetFog(
mc_pcurEnvironmentData->GetFogNearDistance(),
mc_pcurEnvironmentData->GetFogFarDistance()

View File

@@ -107,7 +107,7 @@ class CMapManager : public CScreen, public IPhysicsWorld
// Map
//////////////////////////////////////////////////////////////////////////
CMapOutdoor * m_pkMap;
CSpeedTreeForestDirectX8 m_Forest;
CSpeedTreeForestDirectX m_Forest;
public:
// 2004.10.14.myevan.TEMP_CAreaLoaderThread

View File

@@ -209,7 +209,7 @@ bool CMapOutdoor::Destroy()
m_rkList_kGuildArea.clear();
m_kPool_kMonsterAreaInfo.Destroy();
CSpeedTreeForestDirectX8::Instance().Clear();
CSpeedTreeForestDirectX::Instance().Clear();
return true;
}
@@ -239,7 +239,7 @@ void CMapOutdoor::OnBeginEnvironment()
if (!mc_pEnvironmentData)
return;
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
rkForest.SetFog(
mc_pEnvironmentData->GetFogNearDistance(),
mc_pEnvironmentData->GetFogFarDistance()
@@ -1251,7 +1251,7 @@ void CMapOutdoor::XMasTree_Destroy()
{
if (m_kXMas.m_pkTree)
{
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
m_kXMas.m_pkTree->Clear();
rkForest.DeleteInstance(m_kXMas.m_pkTree);
m_kXMas.m_pkTree=NULL;
@@ -1269,7 +1269,7 @@ void CMapOutdoor::__XMasTree_Create(float x, float y, float z, const char* c_szT
assert(NULL==m_kXMas.m_pkTree);
assert(-1==m_kXMas.m_iEffectID);
CSpeedTreeForestDirectX8& rkForest=CSpeedTreeForestDirectX8::Instance();
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
DWORD dwCRC32 = GetCaseCRC32(c_szTreeName, strlen(c_szTreeName));
m_kXMas.m_pkTree=rkForest.CreateInstance(x, y, z, dwCRC32, c_szTreeName);

View File

@@ -7,7 +7,7 @@
#include "PRTerrainLib/TerrainType.h"
#include "PRTerrainLib/TextureSet.h"
#include "SpeedTreeLib/SpeedTreeForestDirectX8.h"
#include "SpeedTreeLib/SpeedTreeForestDirectX.h"
#include "MapBase.h"
#include "Area.h"

View File

@@ -33,7 +33,7 @@ bool CMapOutdoor::Load(float x, float y, float z)
m_lOldReadX = -1;
// TODO: SetRenderingDevice에서 Environment로 부터 라이트 속성을 넘겨줘야 스태틱 라이트가 제대로 작동한다.
CSpeedTreeForestDirectX8::Instance().SetRenderingDevice(ms_lpd3dDevice);
CSpeedTreeForestDirectX::Instance().SetRenderingDevice(ms_lpd3dDevice);
Update(x, y, z);

View File

@@ -238,7 +238,7 @@ void CMapOutdoor::RenderCloud()
void CMapOutdoor::RenderTree()
{
if (IsVisiblePart(PART_TREE))
CSpeedTreeForestDirectX8::Instance().Render();
CSpeedTreeForestDirectX::Instance().Render();
}
void CMapOutdoor::SetInverseViewAndDynamicShaodwMatrices()

View File

@@ -112,7 +112,7 @@ bool CMapOutdoor::Update(float fX, float fY, float fZ)
#ifdef __PERFORMANCE_CHECKER__
DWORD t3=ELTimer_GetMSec();
#endif
CSpeedTreeForestDirectX8::Instance().UpdateSystem(CTimer::Instance().GetCurrentSecond());
CSpeedTreeForestDirectX::Instance().UpdateSystem(CTimer::Instance().GetCurrentSecond());
#ifdef __PERFORMANCE_CHECKER__
DWORD t4=ELTimer_GetMSec();
#endif