W3DDisplayStringManager.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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: W3DDisplayStringManager.h ////////////////////////////////////////////////////////////////
  24. // Created: Colin Day, July 2001
  25. // Desc: Access for creating game managed display strings
  26. ///////////////////////////////////////////////////////////////////////////////////////////////////
  27. #pragma once
  28. #ifndef _W3DDISPLAYSTRINGMANAGER_H_
  29. #define _W3DDISPLAYSTRINGMANAGER_H_
  30. #include "GameClient/DisplayStringManager.h"
  31. #include "W3DDevice/GameClient/W3DDisplayString.h"
  32. //-------------------------------------------------------------------------------------------------
  33. /** Access for creating game managed display strings */
  34. //-------------------------------------------------------------------------------------------------
  35. class W3DDisplayStringManager : public DisplayStringManager
  36. {
  37. public:
  38. W3DDisplayStringManager( void );
  39. virtual ~W3DDisplayStringManager( void );
  40. // Initialize our numeral strings in postProcessLoad
  41. virtual void postProcessLoad( void );
  42. /// update method for all our display strings
  43. virtual void update( void );
  44. /// allocate a new display string
  45. virtual DisplayString *newDisplayString( void );
  46. /// free a display string
  47. virtual void freeDisplayString( DisplayString *string );
  48. // This is used to save us a few FPS and storage space. There's no reason to
  49. // duplicate the DisplayString on every drawable when 1 copy will suffice.
  50. virtual DisplayString *getGroupNumeralString( Int numeral );
  51. virtual DisplayString *getFormationLetterString( void ) { return m_formationLetterDisplayString; };
  52. protected:
  53. DisplayString *m_groupNumeralStrings[10];
  54. DisplayString *m_formationLetterDisplayString;
  55. };
  56. #endif // _W3DDISPLAYSTRINGMANAGER_H_