W3DWaypointBuffer.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. ** Command & Conquer Generals Zero Hour(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. // FILE: W3DWaypointBuffer.h ////////////////////////////////////////////////
  24. //-----------------------------------------------------------------------------
  25. //
  26. // Electronic Arts Pacific.
  27. //
  28. // Confidential Information
  29. // Copyright (C) 2002 - All Rights Reserved
  30. //
  31. //-----------------------------------------------------------------------------
  32. //
  33. // Project: Command & Conquers: Generals
  34. //
  35. // File name: W3DWaypointBuffer.h
  36. //
  37. // Created: Kris Morness, October 2002
  38. //
  39. // Desc: Draw buffer to handle all the waypoints in the scene. Waypoints
  40. // are rendered after terrain, after roads & bridges, and after
  41. // global fog, but before structures, objects, units, trees, etc.
  42. // This way if we have two waypoints at the bottom of a hill but
  43. // going through the hill, the line won't get cut off. However,
  44. // structures and units on top of paths will render above it. Waypoints
  45. // are only shown for selected units while in waypoint plotting mode.
  46. //
  47. //-----------------------------------------------------------------------------
  48. #pragma once
  49. #ifndef __W3D_WAYPOINT_BUFFER_H
  50. #define __W3D_WAYPOINT_BUFFER_H
  51. //-----------------------------------------------------------------------------
  52. // Includes
  53. //-----------------------------------------------------------------------------
  54. #include "always.h"
  55. #include "rendobj.h"
  56. #include "w3d_file.h"
  57. #include "dx8vertexbuffer.h"
  58. #include "dx8indexbuffer.h"
  59. #include "shader.h"
  60. #include "vertmaterial.h"
  61. #include "Lib/BaseType.h"
  62. #include "common/GameType.h"
  63. class SegmentedLineClass;
  64. class W3DWaypointBuffer
  65. {
  66. friend class HeightMapRenderObjClass;
  67. public:
  68. W3DWaypointBuffer(void);
  69. ~W3DWaypointBuffer(void);
  70. void drawWaypoints(RenderInfoClass &rinfo);
  71. void freeWaypointBuffers();
  72. private:
  73. void setDefaultLineStyle();
  74. RenderObjClass *m_waypointNodeRobj;
  75. SegmentedLineClass *m_line;
  76. TextureClass *m_texture;
  77. };
  78. #endif // end __W3D_WAYPOINT_BUFFER_H