CWaterRoutine.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // WaterRoutine.h: interface for the CWaterRoutine class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_WATERROUTINE_H__4B4865CD_75CD_4BDE_9D2F_475BEED8FDAA__INCLUDED_)
  5. #define AFX_WATERROUTINE_H__4B4865CD_75CD_4BDE_9D2F_475BEED8FDAA__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include <windows.h>
  10. class CWaterRoutine
  11. {
  12. public:
  13. CWaterRoutine();
  14. virtual ~CWaterRoutine();
  15. void Create(int iWidth,int iHeight);
  16. void Render(DWORD* pSrcImage,DWORD* pTargetImage);
  17. void CalcWater(int npage, int density);
  18. void SmoothWater(int npage);
  19. void FlattenWater();
  20. void SineBlob(int x, int y, int radius, int height, int page);
  21. void WarpBlob(int x, int y, int radius, int height, int page);
  22. void HeightBox (int x, int y, int radius, int height, int page);
  23. void HeightBlob(int x, int y, int radius, int height, int page);
  24. void CalcWaterBigFilter(int npage, int density);
  25. void DrawWaterNoLight(int page,DWORD* pSrcImage,DWORD* pTargetImage);
  26. void DrawWaterWithLight(int page, int LightModifier,DWORD* pSrcImage,DWORD* pTargetImage);
  27. COLORREF GetShiftedColor(COLORREF color,int shift);
  28. int m_iWidth;
  29. int m_iHeight;
  30. BOOL m_bDrawWithLight;
  31. int m_iLightModifier;
  32. int m_iHpage;// The current heightfield
  33. int m_density;// The water density - can change the density...
  34. // the height fields
  35. int* m_iHeightField1;
  36. int* m_iHeightField2;
  37. };
  38. #endif // !defined(AFX_WATERROUTINE_H__4B4865CD_75CD_4BDE_9D2F_475BEED8FDAA__INCLUDED_)