Merge branch 'main' into big-blind-fix

This commit is contained in:
ErLullo
2026-02-19 20:32:03 +01:00
committed by GitHub
7 changed files with 24 additions and 6 deletions

View File

@@ -270,6 +270,8 @@ void CSkyBox::SetCloudTexture(const char * c_szFileName)
m_FaceCloud.m_strfacename = c_szFileName;
CGraphicImageInstance * pGraphicImageInstance = GenerateTexture(c_szFileName);
if (!pGraphicImageInstance)
TraceError("CSkyBox::SetCloudTexture - Failed to load cloud texture: %s", c_szFileName);
m_GraphicImageInstanceMap.insert(TGraphicImageInstanceMap::value_type(m_FaceCloud.m_strfacename, pGraphicImageInstance));
// 이거 안쓰는거 같은데요? [cronan]
@@ -868,6 +870,9 @@ void CSkyBox::Render()
void CSkyBox::RenderCloud()
{
if (m_FaceCloud.m_strfacename.empty())
return;
CGraphicImageInstance * pCloudGraphicImageInstance = m_GraphicImageInstanceMap[m_FaceCloud.m_strfacename];
if (!pCloudGraphicImageInstance)
return;

View File

@@ -268,11 +268,15 @@ void CMapManager::BeginEnvironment()
if (mc_pcurEnvironmentData->bDensityFog && (mc_pcurEnvironmentData->bFogLevel != 0))
{
const float fFogDensityLevel[3] = { 0.000020f, 0.000010f, 0.000005f };
const float fFogDensityLevel[3] = { 0.000006f, 0.000004f, 0.000002f };
float fDensity = mc_pcurEnvironmentData->bFogLevel * fFogDensityLevel[iFogLevel];
STATEMANAGER.SetRenderState(D3DRS_FOGVERTEXMODE, D3DFOG_EXP); // pixel fog
STATEMANAGER.SetRenderState(D3DRS_FOGDENSITY, *((DWORD *) &fDensity)); // vertex fog
float fApproxFogFar = 2.3f / fDensity;
CSpeedTreeForestDirectX& rkForest = CSpeedTreeForestDirectX::Instance();
rkForest.SetFog(0.0f, fApproxFogFar);
}
else
{

View File

@@ -240,10 +240,6 @@ void CMapOutdoor::OnBeginEnvironment()
return;
CSpeedTreeForestDirectX& rkForest=CSpeedTreeForestDirectX::Instance();
rkForest.SetFog(
mc_pEnvironmentData->GetFogNearDistance(),
mc_pEnvironmentData->GetFogFarDistance()
);
const D3DLIGHT9& c_rkLight = mc_pEnvironmentData->DirLights[ENV_DIRLIGHT_CHARACTER];
rkForest.SetLight(

View File

@@ -75,6 +75,9 @@ void CMapOutdoor::__RenderTerrain_RenderHardwareTransformPatch()
std::pair<float, long> fog_far(fFogFarDistance+1600.0f, 0);
std::pair<float, long> fog_near(fFogNearDistance-3200.0f, 0);
if (mc_pEnvironmentData && mc_pEnvironmentData->bDensityFog)
fog_far.first = 1e10f;
std::vector<std::pair<float ,long> >::iterator far_it = std::upper_bound(m_PatchVector.begin(),m_PatchVector.end(),fog_far);
std::vector<std::pair<float ,long> >::iterator near_it = std::upper_bound(m_PatchVector.begin(),m_PatchVector.end(),fog_near);

View File

@@ -30,6 +30,9 @@ void CMapOutdoor::__RenderTerrain_RenderSoftwareTransformPatch()
std::pair<float, long> fog_far(kTPRS.m_fFogFarDistance+800.0f, 0);
std::pair<float, long> fog_near(kTPRS.m_fFogNearDistance-3200.0f, 0);
if (mc_pEnvironmentData && mc_pEnvironmentData->bDensityFog)
fog_far.first = 1e10f;
std::vector<std::pair<float ,long> >::iterator far_it = std::upper_bound(m_PatchVector.begin(),m_PatchVector.end(),fog_far);
std::vector<std::pair<float ,long> >::iterator near_it = std::upper_bound(m_PatchVector.begin(),m_PatchVector.end(),fog_near);

View File

@@ -1147,7 +1147,7 @@ bool CInstanceBase::RegisterEffect(UINT eEftType, const char* c_szEftAttachBone,
void CInstanceBase::RegisterTitleName(int iIndex, const char * c_szTitleName)
{
g_TitleNameMap.insert(std::make_pair(iIndex, c_szTitleName));
g_TitleNameMap[iIndex] = c_szTitleName;
}
D3DXCOLOR __RGBToD3DXColoru(UINT r, UINT g, UINT b)

View File

@@ -33,6 +33,12 @@ PyObject * chrmgrRegisterTitleName(PyObject* poSelf, PyObject* poArgs)
return Py_BuildNone();
}
PyObject * chrmgrRefreshAllPCTextTail(PyObject* poSelf, PyObject* poArgs)
{
CPythonCharacterManager::Instance().RefreshAllPCTextTail();
return Py_BuildNone();
}
PyObject * chrmgrRegisterNameColor(PyObject* poSelf, PyObject* poArgs)
{
int index;
@@ -756,6 +762,7 @@ void initchrmgr()
{ "SetHorseDustGap", chrmgrSetHorseDustGap, METH_VARARGS },
{ "RegisterTitleName", chrmgrRegisterTitleName, METH_VARARGS },
{ "RefreshAllPCTextTail", chrmgrRefreshAllPCTextTail, METH_VARARGS },
{ "RegisterNameColor", chrmgrRegisterNameColor, METH_VARARGS },
{ "RegisterTitleColor", chrmgrRegisterTitleColor, METH_VARARGS },