W3DDisplayStringManager.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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: 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. //#define KRIS_BRUTAL_HACK_FOR_AIRCRAFT_CARRIER_DEBUGGING
  36. #ifdef KRIS_BRUTAL_HACK_FOR_AIRCRAFT_CARRIER_DEBUGGING
  37. #define MAX_GROUPS 20
  38. #else
  39. #define MAX_GROUPS 10
  40. #endif
  41. class W3DDisplayStringManager : public DisplayStringManager
  42. {
  43. public:
  44. W3DDisplayStringManager( void );
  45. virtual ~W3DDisplayStringManager( void );
  46. // Initialize our numeral strings in postProcessLoad
  47. virtual void postProcessLoad( void );
  48. /// update method for all our display strings
  49. virtual void update( void );
  50. /// allocate a new display string
  51. virtual DisplayString *newDisplayString( void );
  52. /// free a display string
  53. virtual void freeDisplayString( DisplayString *string );
  54. // This is used to save us a few FPS and storage space. There's no reason to
  55. // duplicate the DisplayString on every drawable when 1 copy will suffice.
  56. virtual DisplayString *getGroupNumeralString( Int numeral );
  57. virtual DisplayString *getFormationLetterString( void ) { return m_formationLetterDisplayString; };
  58. protected:
  59. DisplayString *m_groupNumeralStrings[ MAX_GROUPS ];
  60. DisplayString *m_formationLetterDisplayString;
  61. };
  62. #endif // _W3DDISPLAYSTRINGMANAGER_H_