W3DInGameUI.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. // FILE: W3DInGameUI.h ////////////////////////////////////////////////////////
  24. //
  25. // W3D implementation of the in game user interface, the in game ui is
  26. // responsible for
  27. //
  28. // Author: Colin Day, April 2001
  29. //
  30. ///////////////////////////////////////////////////////////////////////////////
  31. #pragma once
  32. #ifndef __W3DINGAMEUI_H_
  33. #define __W3DINGAMEUI_H_
  34. // SYSTEM INCLUDES ////////////////////////////////////////////////////////////
  35. // USER INCLUDES //////////////////////////////////////////////////////////////
  36. #include "GameClient/InGameUI.h"
  37. #include "GameClient/View.h"
  38. #include "W3DDevice/GameClient/W3DView.h"
  39. #include "WW3D2/Render2D.h"
  40. #include "WW3D2/RendObj.h"
  41. #include "WW3D2/Line3D.h"
  42. class HAnimClass;
  43. // W3DInGameUI ----------------------------------------------------------------
  44. /** Implementation for the W3D game user interface. This singleton is
  45. * responsible for all user interaction and feedback with as part of the
  46. * user interface */
  47. //-----------------------------------------------------------------------------
  48. class W3DInGameUI : public InGameUI
  49. {
  50. public:
  51. W3DInGameUI();
  52. virtual ~W3DInGameUI();
  53. // Inherited from subsystem interface -----------------------------------------------------------
  54. virtual void init( void ); ///< Initialize the in-game user interface
  55. virtual void update( void ); //< Update the UI by calling preDraw(), draw(), and postDraw()
  56. virtual void reset( void ); ///< Reset
  57. //-----------------------------------------------------------------------------------------------
  58. virtual void draw( void ); ///< Render the in-game user interface
  59. protected:
  60. /// factory for views
  61. virtual View *createView( void ) { return NEW W3DView; }
  62. virtual void drawSelectionRegion( void ); ///< draw the selection region on screen
  63. virtual void drawMoveHints( View *view ); ///< draw move hint visual feedback
  64. virtual void drawAttackHints( View *view ); ///< draw attack hint visual feedback
  65. virtual void drawPlaceAngle( View *view ); ///< draw place building angle if needed
  66. RenderObjClass *m_moveHintRenderObj[ MAX_MOVE_HINTS ];
  67. HAnimClass *m_moveHintAnim[ MAX_MOVE_HINTS ];
  68. RenderObjClass *m_buildingPlacementAnchor;
  69. RenderObjClass *m_buildingPlacementArrow;
  70. }; // end class W3DInGameUI
  71. #endif // end __W3DINGAMEUI_H_