text.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /* -*- mode: c; tab-width: 4; c-basic-offset: 4; c-file-style: "linux" -*- */
  2. //
  3. // Copyright (c) 2009-2011, Wei Mingzhi <whistler_wmz@users.sf.net>.
  4. // Copyright (c) 2011-2017, SDLPAL development team.
  5. // All rights reserved.
  6. //
  7. // This file is part of SDLPAL.
  8. //
  9. // SDLPAL is free software: you can redistribute it and/or modify
  10. // it under the terms of the GNU General Public License as published by
  11. // the Free Software Foundation, either version 3 of the License, or
  12. // (at your option) any later version.
  13. //
  14. // This program is distributed in the hope that it will be useful,
  15. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. // GNU General Public License for more details.
  18. //
  19. // You should have received a copy of the GNU General Public License
  20. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. //
  22. #ifndef _TEXT_H
  23. #define _TEXT_H
  24. #include "common.h"
  25. typedef enum tagDIALOGPOSITION
  26. {
  27. kDialogUpper = 0,
  28. kDialogCenter,
  29. kDialogLower,
  30. kDialogCenterWindow
  31. } DIALOGLOCATION;
  32. PAL_C_LINKAGE_BEGIN
  33. extern LPWSTR g_rcCredits[12];
  34. INT
  35. PAL_InitText(
  36. VOID
  37. );
  38. VOID
  39. PAL_FreeText(
  40. VOID
  41. );
  42. LPCWSTR
  43. PAL_GetWord(
  44. int iNumWord
  45. );
  46. LPCWSTR
  47. PAL_GetMsg(
  48. int iNumMsg
  49. );
  50. int
  51. PAL_GetMsgNum(
  52. int iIndex,
  53. int iOrder
  54. );
  55. VOID
  56. PAL_DrawText(
  57. LPCWSTR lpszText,
  58. PAL_POS pos,
  59. BYTE bColor,
  60. BOOL fShadow,
  61. BOOL fUpdate,
  62. BOOL fUse8x8Font
  63. );
  64. VOID
  65. PAL_DialogSetDelayTime(
  66. INT iDelayTime
  67. );
  68. VOID
  69. PAL_StartDialog(
  70. BYTE bDialogLocation,
  71. BYTE bFontColor,
  72. INT iNumCharFace,
  73. BOOL fPlayingRNG
  74. );
  75. VOID
  76. PAL_ShowDialogText(
  77. LPCWSTR lpszText
  78. );
  79. VOID
  80. PAL_ClearDialog(
  81. BOOL fWaitForKey
  82. );
  83. VOID
  84. PAL_EndDialog(
  85. VOID
  86. );
  87. BOOL
  88. PAL_IsInDialog(
  89. VOID
  90. );
  91. BOOL
  92. PAL_DialogIsPlayingRNG(
  93. VOID
  94. );
  95. INT
  96. PAL_MultiByteToWideChar(
  97. LPCSTR mbs,
  98. int mbslength,
  99. LPWSTR wcs,
  100. int wcslength
  101. );
  102. INT
  103. PAL_MultiByteToWideCharCP(
  104. CODEPAGE cp,
  105. LPCSTR mbs,
  106. int mbslength,
  107. LPWSTR wcs,
  108. int wcslength
  109. );
  110. WCHAR
  111. PAL_GetInvalidChar(
  112. CODEPAGE uCodePage
  113. );
  114. INT
  115. PAL_swprintf(
  116. LPWSTR buffer,
  117. size_t count,
  118. LPCWSTR format,
  119. ...
  120. );
  121. PAL_C_LINKAGE_END
  122. #endif