locale.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. /* Copyright (C) Electronic Arts Canada Inc. 1998-1999. All rights reserved. */
  19. /* ABSTRACT
  20. locale.h - REAL fonts
  21. @ */
  22. #ifndef __LOCALE_H
  23. #define __LOCALE_H 1
  24. //#ifdef __cplusplus
  25. //extern "C" {
  26. //#endif
  27. /****************************************************************************/
  28. /* LOCALE API */
  29. /****************************************************************************/
  30. const char * LOCALE_getstr( const void *localefile, int stringid );
  31. /* NOTE: this single function replaces the previous LOCALE API */
  32. /****************************************************************************/
  33. /* OBSOLETE LOCALE API */
  34. /****************************************************************************/
  35. /* This API is being retired in favor of the much simplier single LOCALE_getstr function. */
  36. #define LOCALE_BANK_COUNT 8
  37. /* initialization/restore */
  38. int LOCALE_init( void ); /* call before calling any other LOCALE functions */
  39. void LOCALE_restore( void ); /* free all memory/resources allocated by LOCALE */
  40. /* attributes */
  41. void LOCALE_setbank( int bankindex ); /* bankindex >= 0 && bankindex < LOCALE_BANK_COUNT */
  42. int LOCALE_getbank( void ); /* returns current bank id */
  43. int LOCALE_getbanklanguageid( void ); /* returns language id of the current bank */
  44. int LOCALE_getbankstringcount( void ); /* returns the string string count in the current bank */
  45. /* operations */
  46. int LOCALE_loadtable( const char *pathname, int languageid ); /* load table into the current bank */
  47. void LOCALE_freetable( void ); /* free table in the current bank */
  48. const char * LOCALE_getstring( int stringid ); /* use values in the .h file created by locomoto */
  49. /* maintain backwards compatibility */
  50. #define LOCALE_purgetable LOCALE_freetable
  51. //#ifdef __cplusplus
  52. //}
  53. //#endif
  54. #endif /* __LOCALE_H */
  55. /* END ABSTRACT */