GlobalLanguage.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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: GlobalLanguage.h /////////////////////////////////////////////////
  24. //-----------------------------------------------------------------------------
  25. //
  26. // Electronic Arts Pacific.
  27. //
  28. // Confidential Information
  29. // Copyright (C) 2002 - All Rights Reserved
  30. //
  31. //-----------------------------------------------------------------------------
  32. //
  33. // created: Aug 2002
  34. //
  35. // Filename: GlobalLanguage.h
  36. //
  37. // author: Chris Huybregts
  38. //
  39. // purpose: With workingwith different languages, we need some options that
  40. // change. Essentially, this is the global data that's unique to languages
  41. //
  42. //-----------------------------------------------------------------------------
  43. ///////////////////////////////////////////////////////////////////////////////
  44. #pragma once
  45. #ifndef __GLOBAL_LANGUAGE_H_
  46. #define __GLOBAL_LANGUAGE_H_
  47. //-----------------------------------------------------------------------------
  48. // SYSTEM INCLUDES ////////////////////////////////////////////////////////////
  49. //-----------------------------------------------------------------------------
  50. #include "Common/SubsystemInterface.h"
  51. #include "Common/STLTypedefs.h"
  52. #include "GameClient/FontDesc.h"
  53. //-----------------------------------------------------------------------------
  54. // USER INCLUDES //////////////////////////////////////////////////////////////
  55. //-----------------------------------------------------------------------------
  56. class AsciiString;
  57. //-----------------------------------------------------------------------------
  58. // FORWARD REFERENCES /////////////////////////////////////////////////////////
  59. //-----------------------------------------------------------------------------
  60. //-----------------------------------------------------------------------------
  61. // TYPE DEFINES ///////////////////////////////////////////////////////////////
  62. //-----------------------------------------------------------------------------
  63. class GlobalLanguage : public SubsystemInterface
  64. {
  65. public:
  66. GlobalLanguage();
  67. virtual ~GlobalLanguage();
  68. void init();
  69. void reset();
  70. void update() { }
  71. AsciiString m_unicodeFontName;
  72. AsciiString m_unicodeFontFileName;
  73. Bool m_useHardWrap;
  74. Int m_militaryCaptionSpeed;
  75. FontDesc m_copyrightFont;
  76. FontDesc m_messageFont;
  77. FontDesc m_militaryCaptionTitleFont;
  78. FontDesc m_militaryCaptionFont;
  79. FontDesc m_superweaponCountdownNormalFont;
  80. FontDesc m_superweaponCountdownReadyFont;
  81. FontDesc m_namedTimerCountdownNormalFont;
  82. FontDesc m_namedTimerCountdownReadyFont;
  83. FontDesc m_drawableCaptionFont;
  84. FontDesc m_defaultWindowFont;
  85. FontDesc m_defaultDisplayStringFont;
  86. FontDesc m_tooltipFontName;
  87. FontDesc m_nativeDebugDisplay;
  88. FontDesc m_drawGroupInfoFont;
  89. FontDesc m_creditsTitleFont;
  90. FontDesc m_creditsPositionFont;
  91. FontDesc m_creditsNormalFont;
  92. Real m_resolutionFontSizeAdjustment;
  93. //UnicodeString m_unicodeFontNameUStr;
  94. Int adjustFontSize(Int theFontSize); // Adjusts font size for resolution. jba.
  95. typedef std::list<AsciiString> StringList; // Used for our font file names that we want to load
  96. typedef StringList::iterator StringListIt;
  97. StringList m_localFonts; // List of the font filenames that are in our local directory
  98. static void parseFontFileName( INI *ini, void *instance, void *store, const void* userData );
  99. static void parseFontDesc(INI *ini, void *instance, void *store, const void* userData);
  100. };
  101. //-----------------------------------------------------------------------------
  102. // INLINING ///////////////////////////////////////////////////////////////////
  103. //-----------------------------------------------------------------------------
  104. //-----------------------------------------------------------------------------
  105. // EXTERNALS //////////////////////////////////////////////////////////////////
  106. //-----------------------------------------------------------------------------
  107. extern GlobalLanguage *TheGlobalLanguageData;
  108. #endif // __GLOBAL_LANGUAGE_H_