Guest User

PythonBackground.h

a guest
Jan 6th, 2026
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. // PythonBackground.h: interface for the CPythonBackground class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_PYTHONBACKGROUND_H__A202CB18_9553_4CF3_8500_5D7062B55432__INCLUDED_)
  6. #define AFX_PYTHONBACKGROUND_H__A202CB18_9553_4CF3_8500_5D7062B55432__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. #include "../gamelib/MapManager.h"
  13. #include "../gamelib/TerrainDecal.h"
  14. #include "../gamelib/SnowEnvironment.h"
  15.  
  16.  
  17. class CInstanceBase;
  18.  
  19. class CPythonBackground : public CMapManager, public CSingleton<CPythonBackground>
  20. {
  21. public:
  22. enum
  23. {
  24. SHADOW_NONE,
  25. SHADOW_GROUND,
  26. SHADOW_GROUND_AND_SOLO,
  27. SHADOW_ALL,
  28. SHADOW_ALL_HIGH,
  29. SHADOW_ALL_MAX,
  30. };
  31.  
  32. enum
  33. {
  34. DISTANCE0,
  35. DISTANCE1,
  36. DISTANCE2,
  37. DISTANCE3,
  38. DISTANCE4,
  39. NUM_DISTANCE_SET
  40. };
  41.  
  42. enum
  43. {
  44. DAY_MODE_LIGHT,
  45. DAY_MODE_DARK,
  46. };
  47.  
  48. typedef struct SVIEWDISTANCESET
  49. {
  50. float m_fFogStart;
  51. float m_fFogEnd;
  52. float m_fFarClip;
  53. D3DXVECTOR3 m_v3SkyBoxScale;
  54. } TVIEWDISTANCESET;
  55.  
  56. public:
  57. CPythonBackground();
  58. virtual ~CPythonBackground();
  59.  
  60. void Initialize();
  61.  
  62. void Destroy();
  63. void Create();
  64.  
  65. void GlobalPositionToLocalPosition(LONG& rGlobalX, LONG& rGlobalY);
  66. void LocalPositionToGlobalPosition(LONG& rLocalX, LONG& rLocalY);
  67.  
  68. void EnableTerrainOnlyForHeight();
  69. bool SetSplatLimit(int iSplatNum);
  70. bool SetVisiblePart(int ePart, bool isVisible);
  71. bool SetShadowLevel(int eLevel);
  72. void RefreshShadowLevel();
  73. void SelectViewDistanceNum(int eNum);
  74. void SetViewDistanceSet(int eNum, float fFarClip);
  75. float GetFarClip();
  76.  
  77. DWORD GetRenderShadowTime();
  78. void GetDistanceSetInfo(int * peNum, float * pfStart, float * pfEnd, float * pfFarClip);
  79.  
  80. bool GetPickingPoint(D3DXVECTOR3 * v3IntersectPt);
  81. bool GetPickingPointWithRay(const CRay & rRay, D3DXVECTOR3 * v3IntersectPt);
  82. bool GetPickingPointWithRayOnlyTerrain(const CRay & rRay, D3DXVECTOR3 * v3IntersectPt);
  83. BOOL GetLightDirection(D3DXVECTOR3 & rv3LightDirection);
  84.  
  85. void Update(float fCenterX, float fCenterY, float fCenterZ);
  86.  
  87. void CreateCharacterShadowTexture();
  88. void ReleaseCharacterShadowTexture();
  89. void Render();
  90. void RenderSnow();
  91. void RenderPCBlocker();
  92. void RenderCollision();
  93. void RenderCharacterShadowToTexture();
  94. void RenderSky();
  95. void RenderCloud();
  96. void RenderWater();
  97. void RenderEffect();
  98. void RenderBeforeLensFlare();
  99. void RenderAfterLensFlare();
  100.  
  101. bool CheckAdvancing(CInstanceBase * pInstance);
  102.  
  103. void SetCharacterDirLight();
  104. void SetBackgroundDirLight();
  105.  
  106. void ChangeToDay();
  107. void ChangeToNight();
  108. void EnableSnowEnvironment();
  109. void DisableSnowEnvironment();
  110. void SetXMaxTree(int iGrade);
  111.  
  112. void ClearGuildArea();
  113. void RegisterGuildArea(int isx, int isy, int iex, int iey);
  114.  
  115. void CreateTargetEffect(DWORD dwID, DWORD dwChrVID);
  116. void CreateTargetEffect(DWORD dwID, long lx, long ly);
  117. void DeleteTargetEffect(DWORD dwID);
  118.  
  119. void CreateSpecialEffect(DWORD dwID, float fx, float fy, float fz, const char * c_szFileName);
  120. void DeleteSpecialEffect(DWORD dwID);
  121.  
  122. #ifdef ENABLE_PRIVATE_SHOP_SEARCH_SYSTEM
  123. void CreateSpecialShopPosEffect(DWORD dwID, float fx, float fy, float fz, const char * c_szFileName);
  124. void DeleteSpecialShopPosEffect();
  125. #endif
  126.  
  127. void Warp(DWORD dwX, DWORD dwY);
  128.  
  129. void VisibleGuildArea();
  130. void DisableGuildArea();
  131.  
  132. void RegisterDungeonMapName(const char * c_szMapName);
  133. TMapInfo* GlobalPositionToMapInfo(DWORD dwGlobalX, DWORD dwGlobalY);
  134. const char* GetWarpMapName();
  135.  
  136. protected:
  137. void __CreateProperty();
  138. bool __IsSame(std::set<int> & rleft, std::set<int> & rright);
  139.  
  140. protected:
  141. std::string m_strMapName;
  142.  
  143. private:
  144. CSnowEnvironment m_SnowEnvironment;
  145.  
  146. int m_iDayMode;
  147. int m_iXMasTreeGrade;
  148.  
  149. int m_eShadowLevel;
  150. int m_eViewDistanceNum;
  151.  
  152. BOOL m_bVisibleGuildArea;
  153.  
  154. DWORD m_dwRenderShadowTime;
  155.  
  156. DWORD m_dwBaseX;
  157. DWORD m_dwBaseY;
  158.  
  159. TVIEWDISTANCESET m_ViewDistanceSet[NUM_DISTANCE_SET];
  160.  
  161. std::set<int> m_kSet_iShowingPortalID;
  162. std::set<std::string> m_kSet_strDungeonMapName;
  163. std::map<DWORD, DWORD> m_kMap_dwTargetID_dwChrID;
  164.  
  165. struct SReserveTargetEffect
  166. {
  167. int ilx;
  168. int ily;
  169. };
  170. std::map<DWORD, SReserveTargetEffect> m_kMap_dwID_kReserveTargetEffect;
  171.  
  172. struct FFindWarpMapName
  173. {
  174. DWORD m_dwX, m_dwY;
  175. FFindWarpMapName(DWORD dwX, DWORD dwY)
  176. {
  177. m_dwX = dwX;
  178. m_dwY = dwY;
  179. }
  180. bool operator() (TMapInfo & rMapInfo)
  181. {
  182. if (m_dwX < rMapInfo.m_dwBaseX || m_dwX >= rMapInfo.m_dwEndX || m_dwY < rMapInfo.m_dwBaseY || m_dwY >= rMapInfo.m_dwEndY)
  183. return false;
  184. return true;
  185. }
  186. };
  187. };
  188.  
  189. #endif // !defined(AFX_PYTHONBACKGROUND_H__A202CB18_9553_4CF3_8500_5D7062B55432__INCLUDED_)
  190.  
Advertisement
Add Comment
Please, Sign In to add comment