Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.23 KB | None | 0 0
  1. #include "StdAfx.h"
  2. #include "RainEnvironment.h"
  3.  
  4. #include "../EterLib/StateManager.h"
  5. #include "../EterLib/Camera.h"
  6. #include "../EterLib/ResourceManager.h"
  7. #include "../EffectLib/EffectManager.h"
  8. #include "RainParticle.h"
  9. #include "MapOutdoor.h"
  10. #include "../gamelib/FlyingObjectManager.h"
  11. #include "MapManager.h"
  12. #include "MapOutdoor.h"
  13. #include "TerrainPatch.h"
  14. #include "../SpeedTreeLib/SpeedTreeForest.h"
  15. #include "../EterLib/GrpBase.h"
  16. #include "Area.h"
  17. #include "AreaTerrain.h"
  18. #include "MapBase.h"
  19. #include "TerrainDecal.h"
  20. #include "../UserInterface/PythonBackground.h"
  21.  
  22. void CRainEnvironment::Enable()
  23. {
  24. if (!m_bRainEnable)
  25. {
  26. Create();
  27. }
  28. m_bRainEnable = TRUE;
  29. }
  30.  
  31. void CRainEnvironment::Disable()
  32. {
  33. m_bRainEnable = FALSE;
  34. }
  35.  
  36. void CRainEnvironment::Update(const D3DXVECTOR3 & c_rv3Pos)
  37. {
  38. if (!m_bRainEnable)
  39. {
  40. if (m_kVct_pkParticleRain.empty())
  41. return;
  42. }
  43.  
  44. m_v3Center = c_rv3Pos;
  45. }
  46.  
  47.  
  48.  
  49. void CRainEnvironment::Deform()
  50. {
  51. if (!m_bRainEnable)
  52. {
  53. if (m_kVct_pkParticleRain.empty())
  54. return;
  55. }
  56.  
  57. const D3DXVECTOR3 & c_rv3Pos = m_v3Center;
  58.  
  59. static long s_lLastTime = CTimer::Instance().GetCurrentMillisecond();
  60. long lcurTime = CTimer::Instance().GetCurrentMillisecond();
  61. float fElapsedTime = float(lcurTime - s_lLastTime) / 15.0f;
  62. s_lLastTime = lcurTime;
  63.  
  64. CCamera * pCamera = CCameraManager::Instance().GetCurrentCamera();
  65. if (!pCamera)
  66. return;
  67.  
  68. const D3DXVECTOR3 & c_rv3View = pCamera->GetView();
  69.  
  70. D3DXVECTOR3 v3ChangedPos = c_rv3View * 3500.0f + c_rv3Pos;
  71. v3ChangedPos.z = c_rv3Pos.z;
  72.  
  73. std::vector<CRainParticle*>::iterator itor = m_kVct_pkParticleRain.begin();
  74. for (; itor != m_kVct_pkParticleRain.end();)
  75. {
  76. CRainParticle * pRain = *itor;
  77.  
  78. int rand_num = rand() % 100 + 1;
  79. if (rand_num >= 75)
  80. {
  81. m_SendThunder = true;
  82. }
  83. else
  84. {
  85. m_SendThunder = true;
  86. }
  87.  
  88. pRain->Update(fElapsedTime, v3ChangedPos, m_SendThunder);
  89. if (m_SendThunder)
  90. {
  91. m_SendThunder = false;
  92. }
  93.  
  94. if (!pRain->IsActivate())
  95. {
  96. CRainParticle::Delete(pRain);
  97.  
  98. itor = m_kVct_pkParticleRain.erase(itor);
  99. }
  100. else
  101. {
  102. float fGroundHeight = CFlyingManager::Instance().GetMapManagerPtr()->GetTerrainHeight(pRain->m_v3Position.x, pRain->m_v3Position.y);
  103. long hauteurEau;
  104.  
  105. //if (pRain->m_impactPluie == false)
  106. //{
  107. bool onWater = false;
  108. int incrementX = 0;
  109. for (int i = 0; i < 1000; i++)
  110. {
  111. incrementX += 10;
  112. if (CPythonBackground::Instance().isAttrOn(pRain->m_v3Position.x+incrementX, pRain->m_v3Position.y, CTerrainImpl::ATTRIBUTE_WATER))
  113. {
  114. onWater = true;
  115. CPythonBackground::Instance().GetWaterHeight(int(pRain->m_v3Position.x + incrementX), int(pRain->m_v3Position.y), &hauteurEau);
  116.  
  117. }
  118. }
  119. if (onWater == false)
  120. {
  121. int incrementY = 0;
  122. for (int i = 0; i < 1000; i++)
  123. {
  124. incrementY += 10;
  125. if (CPythonBackground::Instance().isAttrOn(pRain->m_v3Position.x, pRain->m_v3Position.y+incrementY, CTerrainImpl::ATTRIBUTE_WATER))
  126. {
  127. onWater = true;
  128. CPythonBackground::Instance().GetWaterHeight(int(pRain->m_v3Position.x), int(pRain->m_v3Position.y + incrementY), &hauteurEau);
  129.  
  130. }
  131. }
  132. if (onWater == false)
  133. {
  134. incrementX = 0;
  135. incrementY = 0;
  136. for (int i = 0; i < 1000; i++)
  137. {
  138. incrementY += 10;
  139. incrementX += 10;
  140. if (CPythonBackground::Instance().isAttrOn(pRain->m_v3Position.x+incrementX, pRain->m_v3Position.y + incrementY, CTerrainImpl::ATTRIBUTE_WATER))
  141. {
  142. onWater = true;
  143.  
  144. CPythonBackground::Instance().GetWaterHeight(int(pRain->m_v3Position.x+incrementX), int(pRain->m_v3Position.y+incrementY), &hauteurEau);
  145. }
  146. }
  147. }
  148. }
  149. if (onWater)
  150. {
  151.  
  152.  
  153. if (hauteurEau > fGroundHeight)
  154. {
  155. CEffectManager& rkEffMgr = CEffectManager::Instance();
  156. rkEffMgr.RegisterEffect("d:/ymir work/effect/etc/fishing/ridack_pluie.mse");
  157. DWORD dwEffectID = rkEffMgr.CreateEffect("d:/ymir work/effect/etc/fishing/ridack_pluie.mse", D3DXVECTOR3(pRain->m_v3Position.x, pRain->m_v3Position.y, (float)hauteurEau), D3DXVECTOR3(0.0f, 0.0f, 0.0f));
  158. pRain->m_impactPluie = true;
  159. }
  160. else
  161. {
  162. CEffectManager& rkEffMgr = CEffectManager::Instance();
  163. rkEffMgr.RegisterEffect("d:/ymir work/effect/etc/fishing/ridack_pluie2.mse");
  164. DWORD dwEffectID = rkEffMgr.CreateEffect("d:/ymir work/effect/etc/fishing/ridack_pluie2.mse", D3DXVECTOR3(pRain->m_v3Position.x, pRain->m_v3Position.y, fGroundHeight), D3DXVECTOR3(0.0f, 0.0f, 0.0f));
  165. pRain->m_impactPluie = true;
  166. }
  167. }
  168. else
  169. {
  170. CEffectManager& rkEffMgr = CEffectManager::Instance();
  171. rkEffMgr.RegisterEffect("d:/ymir work/effect/etc/fishing/ridack_pluie2.mse");
  172. DWORD dwEffectID = rkEffMgr.CreateEffect("d:/ymir work/effect/etc/fishing/ridack_pluie2.mse", D3DXVECTOR3(pRain->m_v3Position.x, pRain->m_v3Position.y, fGroundHeight), D3DXVECTOR3(0.0f, 0.0f, 0.0f));
  173. pRain->m_impactPluie = true;
  174. }
  175. //}
  176. ++itor;
  177. }
  178. }
  179.  
  180.  
  181. if (m_bRainEnable)
  182. {
  183. for (int p = 0; p < min(10, m_dwParticleMaxNum - m_kVct_pkParticleRain.size()); ++p)
  184. {
  185. CRainParticle * pRainParticle = CRainParticle::New();
  186. pRainParticle->Init(v3ChangedPos);
  187. m_kVct_pkParticleRain.push_back(pRainParticle);
  188.  
  189. }
  190.  
  191. }
  192. }
  193.  
  194. D3DXVECTOR3 CRainEnvironment::randomPositionSonPluie(D3DXVECTOR3 position)
  195. {
  196. srand(time(NULL));
  197. float rand_num_x = rand() % 100;
  198. srand(time(NULL));
  199. float rand_num_y = rand() % 100;
  200. srand(time(NULL));
  201. float rand_num_z = rand() % 100;
  202. srand(time(NULL));
  203. int randomAddition = rand() % 2;
  204.  
  205. if (randomAddition <= 1)
  206. {
  207. position.x = position.x + rand_num_x;
  208. position.y = position.y + rand_num_y;
  209. position.z = position.z + rand_num_z;
  210. }
  211. else
  212. {
  213. position.x = position.x - rand_num_x;
  214. position.y = position.y - rand_num_y;
  215. position.z = position.z - rand_num_z;
  216. }
  217. return position;
  218. }
  219.  
  220. void CRainEnvironment::__BeginBlur()
  221. {
  222. if (!m_bBlurEnable)
  223. return;
  224.  
  225. ms_lpd3dDevice->GetDepthStencilSurface(&m_lpOldDepthStencilSurface);
  226. ms_lpd3dDevice->SetRenderTarget(0, m_lpRainRenderTargetSurface);
  227. ms_lpd3dDevice->Clear(0L, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00000000, 1.0f, 0L);
  228.  
  229. STATEMANAGER.SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
  230. STATEMANAGER.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
  231. STATEMANAGER.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_DESTALPHA);
  232. }
  233.  
  234. void CRainEnvironment::__ApplyBlur()
  235. {
  236. if (!m_bBlurEnable)
  237. return;
  238.  
  239. // {
  240. // STATEMANAGER.SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
  241. // STATEMANAGER.SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );
  242. // STATEMANAGER.SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
  243. // STATEMANAGER.SetRenderState( D3DRS_COLORVERTEX ,TRUE);
  244. // STATEMANAGER.SetRenderState( D3DRS_DIFFUSEMATERIALSOURCE , D3DMCS_COLOR1 );
  245. // STATEMANAGER.SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
  246. // STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
  247. // STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
  248. // STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
  249. // STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
  250. // STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
  251. // DWORD alphaColor = 0xFFFFFF | ((DWORD)(0.6f*255.0f) << 24);
  252. //
  253. // BlurVertex V[4] = { BlurVertex(D3DXVECTOR3(0.0f,0.0f,0.0f),1.0f, alphaColor, 0,0) ,
  254. // BlurVertex(D3DXVECTOR3(wTextureSize,0.0f,0.0f),1.0f, alphaColor, 1,0) ,
  255. // BlurVertex(D3DXVECTOR3(0.0f,wTextureSize,0.0f),1.0f, alphaColor, 0,1) ,
  256. // BlurVertex(D3DXVECTOR3(wTextureSize,wTextureSize,0.0f),1.0f, alphaColor, 1,1) };
  257. // //누적 블러 텍스쳐를 찍는다.
  258. // STATEMANAGER.SetTexture(0,m_lpAccumTexture);
  259. // STATEMANAGER.SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE|D3DFVF_TEX1 );
  260. // STATEMANAGER.DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(BlurVertex));
  261. // }
  262. //
  263. // {
  264. // STATEMANAGER.SetRenderTarget(m_lpAccumRenderTargetSurface, m_lpAccumDepthSurface);
  265. //
  266. // BlurVertex V[4] = { BlurVertex(D3DXVECTOR3(0.0f,0.0f,0.0f),1.0f, 0xFFFFFF, 0,0) ,
  267. // BlurVertex(D3DXVECTOR3(wTextureSize,0.0f,0.0f),1.0f, 0xFFFFFF, 1,0) ,
  268. // BlurVertex(D3DXVECTOR3(0.0f,wTextureSize,0.0f),1.0f, 0xFFFFFF, 0,1) ,
  269. // BlurVertex(D3DXVECTOR3(wTextureSize,wTextureSize,0.0f),1.0f, 0xFFFFFF, 1,1) };
  270. //
  271. // STATEMANAGER.SetTexture(0,m_lpRainTexture);
  272. // STATEMANAGER.SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE);
  273. // STATEMANAGER.SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE|D3DFVF_TEX1 );
  274. // STATEMANAGER.DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(BlurVertex));
  275. // }
  276.  
  277. ///////////////
  278. {
  279. ms_lpd3dDevice->SetRenderTarget(0, m_lpOldSurface);
  280.  
  281. STATEMANAGER.SetTexture(0, m_lpRainTexture);
  282. STATEMANAGER.SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
  283. STATEMANAGER.SetRenderState(D3DRS_WRAP0, D3DWRAPCOORD_0);
  284.  
  285. D3DSURFACE_DESC desc;
  286. m_lpOldSurface->GetDesc(&desc);
  287. float sx = (float)desc.Width;
  288. float sy = (float)desc.Height;
  289. SAFE_RELEASE(m_lpOldSurface);
  290. SAFE_RELEASE(m_lpOldDepthStencilSurface);
  291.  
  292. BlurVertex V[4] = { BlurVertex(D3DXVECTOR3(0.0f, 0.0f, 0.0f), 1.0f, 0xFFFFFF, 0, 0),
  293. BlurVertex(D3DXVECTOR3(sx, 0.0f, 0.0f), 1.0f, 0xFFFFFF, 1, 0),
  294. BlurVertex(D3DXVECTOR3(0.0f, sy, 0.0f), 1.0f, 0xFFFFFF, 0, 1),
  295. BlurVertex(D3DXVECTOR3(sx, sy, 0.0f), 1.0f, 0xFFFFFF, 1, 1) };
  296.  
  297. STATEMANAGER.DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, V, sizeof(BlurVertex));
  298. }
  299. }
  300.  
  301. void CRainEnvironment::Render()
  302. {
  303. if (!m_bRainEnable)
  304. {
  305. if (m_kVct_pkParticleRain.empty())
  306. return;
  307. }
  308.  
  309. __BeginBlur();
  310.  
  311. DWORD dwParticleCount = min(m_dwParticleMaxNum, m_kVct_pkParticleRain.size());
  312.  
  313. CCamera * pCamera = CCameraManager::Instance().GetCurrentCamera();
  314. if (!pCamera)
  315. return;
  316.  
  317. const D3DXVECTOR3 & c_rv3Up = pCamera->GetUp();
  318. const D3DXVECTOR3 & c_rv3Cross = pCamera->GetCross();
  319.  
  320. SParticleVertex * pv3Verticies;
  321. if (SUCCEEDED(m_pVB->Lock(0, sizeof(SParticleVertex)*dwParticleCount * 4, (BYTE**)&pv3Verticies, D3DLOCK_DISCARD)))
  322. {
  323. int i = 0;
  324. std::vector<CRainParticle*>::iterator itor = m_kVct_pkParticleRain.begin();
  325. for (; i < dwParticleCount && itor != m_kVct_pkParticleRain.end(); ++i, ++itor)
  326. {
  327. CRainParticle * pRain = *itor;
  328. pRain->SetCameraVertex(c_rv3Up, c_rv3Cross);
  329. pRain->GetVerticies(pv3Verticies[i * 4 + 0],
  330. pv3Verticies[i * 4 + 1],
  331. pv3Verticies[i * 4 + 2],
  332. pv3Verticies[i * 4 + 3]);
  333. }
  334. m_pVB->Unlock();
  335. }
  336.  
  337. STATEMANAGER.SaveRenderState(D3DRS_ZWRITEENABLE, FALSE);
  338. STATEMANAGER.SaveRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
  339. STATEMANAGER.SaveRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
  340. STATEMANAGER.SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
  341. STATEMANAGER.SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
  342. STATEMANAGER.SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
  343. STATEMANAGER.SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
  344. STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
  345. STATEMANAGER.SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
  346. STATEMANAGER.SetTexture(1, NULL);
  347. STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
  348. STATEMANAGER.SetTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
  349.  
  350. m_pImageInstance->GetGraphicImagePointer()->GetTextureReference().SetTextureStage(0);
  351. STATEMANAGER.SetIndices(m_pIB, 0);
  352. STATEMANAGER.SetStreamSource(0, m_pVB, sizeof(SParticleVertex));
  353. STATEMANAGER.SetVertexShader(D3DFVF_XYZ | D3DFVF_TEX1);
  354. STATEMANAGER.DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, dwParticleCount * 4, 0, dwParticleCount * 2);
  355. STATEMANAGER.RestoreRenderState(D3DRS_ALPHABLENDENABLE);
  356. STATEMANAGER.RestoreRenderState(D3DRS_ZWRITEENABLE);
  357. STATEMANAGER.RestoreRenderState(D3DRS_CULLMODE);
  358. __ApplyBlur();
  359. }
  360.  
  361. bool CRainEnvironment::__CreateBlurTexture()
  362. {
  363. if (!m_bBlurEnable)
  364. return true;
  365.  
  366. if (!m_bBlurEnable)
  367. return true;
  368.  
  369. if (FAILED(ms_lpd3dDevice->CreateTexture(m_wBlurTextureSize, m_wBlurTextureSize, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &m_lpRainTexture)))
  370. return false;
  371. if (FAILED(m_lpRainTexture->GetSurfaceLevel(0, &m_lpRainRenderTargetSurface)))
  372. return false;
  373. //if (FAILED(ms_lpd3dDevice->CreateDepthStencilSurface(m_wBlurTextureSize, m_wBlurTextureSize, D3DFMT_D16, D3DMULTISAMPLE_NONE, 0, TRUE, &m_lpRainDepthSurface)))
  374. //return false;
  375.  
  376. if (FAILED(ms_lpd3dDevice->CreateTexture(m_wBlurTextureSize, m_wBlurTextureSize, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &m_lpAccumTexture)))
  377. return false;
  378. if (FAILED(m_lpAccumTexture->GetSurfaceLevel(0, &m_lpAccumRenderTargetSurface)))
  379. return false;
  380. /*if (FAILED(ms_lpd3dDevice->CreateDepthStencilSurface(m_wBlurTextureSize, m_wBlurTextureSize, D3DFMT_D16, D3DMULTISAMPLE_NONE, 0, TRUE, &m_lpAccumDepthSurface)))
  381. return false;*/
  382.  
  383. return true;
  384.  
  385. return true;
  386. }
  387.  
  388. bool CRainEnvironment::__CreateGeometry()
  389. {
  390. if (FAILED(ms_lpd3dDevice->CreateVertexBuffer(sizeof(SParticleVertex)*m_dwParticleMaxNum * 4,
  391. D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY,
  392. D3DFVF_XYZ | D3DFVF_TEX1,
  393. D3DPOOL_SYSTEMMEM,
  394. &m_pVB)))
  395. return false;
  396.  
  397. if (FAILED(ms_lpd3dDevice->CreateIndexBuffer(sizeof(WORD)*m_dwParticleMaxNum * 6,
  398. D3DUSAGE_WRITEONLY,
  399. D3DFMT_INDEX16,
  400. D3DPOOL_MANAGED,
  401. &m_pIB)))
  402. return false;
  403.  
  404. WORD* dstIndices;
  405. if (FAILED(m_pIB->Lock(0, sizeof(WORD)*m_dwParticleMaxNum * 6, (BYTE**)&dstIndices, 0)))
  406. return false;
  407.  
  408. const WORD c_awFillRectIndices[6] = { 0, 2, 1, 2, 3, 1, };
  409. for (int i = 0; i < m_dwParticleMaxNum; ++i)
  410. {
  411. for (int j = 0; j < 6; ++j)
  412. {
  413. dstIndices[i * 6 + j] = i * 4 + c_awFillRectIndices[j];
  414. }
  415. }
  416.  
  417. m_pIB->Unlock();
  418. return true;
  419. }
  420.  
  421. bool CRainEnvironment::Create()
  422. {
  423. Destroy();
  424.  
  425. if (!__CreateBlurTexture())
  426. return false;
  427.  
  428. if (!__CreateGeometry())
  429. return false;
  430.  
  431. CGraphicImage * pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer("d:/ymir work/special/rain.dds");
  432. m_pImageInstance = CGraphicImageInstance::New();
  433. m_pImageInstance->SetImagePointer(pImage);
  434.  
  435. return true;
  436. }
  437.  
  438. void CRainEnvironment::Destroy()
  439. {
  440. SAFE_RELEASE(m_lpRainTexture);
  441. SAFE_RELEASE(m_lpRainRenderTargetSurface);
  442. SAFE_RELEASE(m_lpRainDepthSurface);
  443. SAFE_RELEASE(m_lpAccumTexture);
  444. SAFE_RELEASE(m_lpAccumRenderTargetSurface);
  445. SAFE_RELEASE(m_lpAccumDepthSurface);
  446. SAFE_RELEASE(m_pVB);
  447. SAFE_RELEASE(m_pIB);
  448.  
  449. stl_wipe(m_kVct_pkParticleRain);
  450. CRainParticle::DestroyPool();
  451.  
  452. if (m_pImageInstance)
  453. {
  454. CGraphicImageInstance::Delete(m_pImageInstance);
  455. m_pImageInstance = NULL;
  456. }
  457. __Initialize();
  458. }
  459.  
  460. void CRainEnvironment::__Initialize()
  461. {
  462. m_bRainEnable = FALSE;
  463. m_lpRainTexture = NULL;
  464. m_lpRainRenderTargetSurface = NULL;
  465. m_lpRainDepthSurface = NULL;
  466. m_lpAccumTexture = NULL;
  467. m_lpAccumRenderTargetSurface = NULL;
  468. m_lpAccumDepthSurface = NULL;
  469. m_pVB = NULL;
  470. m_pIB = NULL;
  471. m_pImageInstance = NULL;
  472. m_SendThunder = false;
  473.  
  474. m_kVct_pkParticleRain.reserve(m_dwParticleMaxNum);
  475. }
  476.  
  477. CRainEnvironment::CRainEnvironment()
  478. {
  479. m_bBlurEnable = FALSE;
  480. m_dwParticleMaxNum = 500000;
  481. m_wBlurTextureSize = 512;
  482.  
  483. __Initialize();
  484. }
  485. CRainEnvironment::~CRainEnvironment()
  486. {
  487. Destroy();
  488. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement