W3DOverlordTankDraw.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. ** Command & Conquer Generals(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FIEL: W3DOverlordTankDraw.h ////////////////////////////////////////////////////////////////////////////
  24. // Author: Graham Smallwood, October 2002
  25. // Desc: The Overlord has a super specific special need. He needs his rider to draw explicitly after him,
  26. // and he needs direct access to get that rider when everyone else can't see it because of the OverlordContain.
  27. ///////////////////////////////////////////////////////////////////////////////////////////////////
  28. #pragma once
  29. #ifndef _W3D_OVERLORD_TANK_DRAW_H_
  30. #define _W3D_OVERLORD_TANK_DRAW_H_
  31. // INCLUDES ///////////////////////////////////////////////////////////////////////////////////////
  32. #include "W3DDevice/GameClient/Module/W3DTankDraw.h"
  33. //-------------------------------------------------------------------------------------------------
  34. class W3DOverlordTankDrawModuleData : public W3DTankDrawModuleData
  35. {
  36. public:
  37. AsciiString m_treadDebrisNameLeft;
  38. AsciiString m_treadDebrisNameRight;
  39. Real m_treadAnimationRate; ///<amount of tread texture to scroll per sec. 1.0 == full width.
  40. Real m_treadPivotSpeedFraction; ///<fraction of locomotor speed below which we allow pivoting.
  41. Real m_treadDriveSpeedFraction; ///<fraction of locomotor speed below which treads stop animating.
  42. W3DOverlordTankDrawModuleData();
  43. ~W3DOverlordTankDrawModuleData();
  44. static void buildFieldParse(MultiIniFieldParse& p);
  45. };
  46. //-------------------------------------------------------------------------------------------------
  47. class W3DOverlordTankDraw : public W3DTankDraw
  48. {
  49. MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( W3DOverlordTankDraw, "W3DOverlordTankDraw" )
  50. MAKE_STANDARD_MODULE_MACRO_WITH_MODULE_DATA( W3DOverlordTankDraw, W3DOverlordTankDrawModuleData )
  51. public:
  52. W3DOverlordTankDraw( Thing *thing, const ModuleData* moduleData );
  53. // virtual destructor prototype provided by memory pool declaration
  54. virtual void setHidden(Bool h);
  55. virtual void doDrawModule(const Matrix3D* transformMtx);
  56. protected:
  57. };
  58. #endif