Progress.h 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #pragma once
  2. #include "..\..\..\Common_h\Mission.h"
  3. class Progress : public MissionObject
  4. {
  5. struct Vertex
  6. {
  7. Vector p;
  8. float tu;
  9. float tv;
  10. float al;
  11. };
  12. ShaderId Circular_id;
  13. public:
  14. Progress();
  15. ~Progress();
  16. public:
  17. bool Create (MOPReader &reader);
  18. bool EditMode_Update(MOPReader &reader);
  19. void Restart();
  20. void Activate(bool isActive);
  21. void Show (bool isShow);
  22. void Command(const char *id, dword numParams, const char **params);
  23. void SetPos(float val);
  24. void MoveTo(float x, float y)
  25. {
  26. m_x = x;
  27. m_y = y;
  28. }
  29. void SizeTo(float w)
  30. {
  31. m_w = w;
  32. }
  33. float GetHeight()
  34. {
  35. return m_h*100.0f;
  36. }
  37. private:
  38. void _cdecl Draw(float dltTime, long level);
  39. void CreateBuffer();
  40. void InitParams (MOPReader &reader);
  41. void InitAspect();
  42. private:
  43. IVariable *BarTexture;
  44. IBaseTexture *texture1;
  45. IBaseTexture *texture2;
  46. IVBuffer *buffer;
  47. float m_x;
  48. float m_y;
  49. float m_w;
  50. float m_h;
  51. long m_drawPriority;
  52. float m_max;
  53. float m_pos;
  54. float m_aspect;
  55. };