Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

FontTRLE.h 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*!
  2. * \file include/FontTRLE.h
  3. * \brief Tomb Raider Level Editor Font loader
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _FONT_TRLE_H_
  8. #define _FONT_TRLE_H_
  9. #include "Font.h"
  10. /*!
  11. * \brief Tomb Raider Level Editor Font loader
  12. */
  13. class FontTRLE : public Font {
  14. public:
  15. /*!
  16. * \brief Constructs an object of FontTRLE
  17. */
  18. FontTRLE();
  19. /*!
  20. * \brief Deconstructs an object of FontTRLE
  21. */
  22. virtual ~FontTRLE();
  23. virtual int initialize();
  24. virtual void writeString(FontString &s);
  25. private:
  26. void loadLPS(const char *f);
  27. void writeChar(unsigned int index, unsigned int xDraw, FontString &s);
  28. unsigned int mFontTexture;
  29. // 106 entries: (x, y, w, h, offset)
  30. int offsets[106][5] = {
  31. { 174, 52, 3, 12, -11 },
  32. { 98, 58, 6, 4, -10 },
  33. { 82, 26, 13, 11, -10 },
  34. { 78, 38, 9, 13, -10 },
  35. { 214, 13, 14, 11, -9 },
  36. { 40, 26, 13, 11, -10 },
  37. { 157, 57, 5, 6, -11 },
  38. { 204, 39, 5, 15, -12 },
  39. { 34, 40, 5, 15, -12 },
  40. { 184, 59, 4, 4, -11 },
  41. { 22, 40, 10, 10, -9 },
  42. { 178, 59, 4, 4, -2 },
  43. { 106, 60, 7, 2, -4 },
  44. { 114, 60, 4, 3, -2 },
  45. { 212, 38, 8, 14, -12 },
  46. { 88, 49, 9, 9, -8 },
  47. { 200, 55, 5, 9, -8 },
  48. { 46, 52, 8, 9, -8 },
  49. { 88, 38, 7, 10, -8 },
  50. { 62, 40, 10, 10, -8 },
  51. { 142, 48, 8, 11, -9 },
  52. { 232, 50, 8, 10, -9 },
  53. { 120, 47, 8, 11, -9 },
  54. { 22, 51, 8, 10, -9 },
  55. { 110, 49, 8, 10, -8 },
  56. { 152, 57, 4, 7, -7 },
  57. { 136, 57, 4, 9, -7 },
  58. { 178, 40, 11, 9, -8 },
  59. { 210, 53, 10, 6, -7 },
  60. { 240, 40, 11, 9, -7 },
  61. { 12, 39, 9, 12, -11 },
  62. { 66, 13, 15, 13, -10 },
  63. { 130, 13, 13, 12, -11 },
  64. { 214, 25, 12, 12, -11 },
  65. { 132, 35, 10, 12, -11 },
  66. { 0, 26, 12, 12, -11 },
  67. { 14, 26, 12, 12, -11 },
  68. { 66, 27, 11, 12, -11 },
  69. { 182, 27, 11, 12, -11 },
  70. { 200, 13, 13, 12, -11 },
  71. { 222, 54, 4, 12, -11 },
  72. { 56, 52, 4, 15, -11 },
  73. { 230, 15, 12, 12, -11 },
  74. { 144, 35, 10, 12, -11 },
  75. { 48, 13, 17, 12, -11 },
  76. { 144, 13, 13, 12, -11 },
  77. { 54, 26, 11, 12, -11 },
  78. { 200, 26, 11, 12, -11 },
  79. { 240, 0, 13, 14, -11 },
  80. { 158, 13, 13, 12, -11 },
  81. { 156, 35, 10, 12, -11 },
  82. { 172, 13, 13, 12, -11 },
  83. { 98, 13, 14, 12, -11 },
  84. { 82, 13, 14, 12, -11 },
  85. { 24, 13, 22, 12, -11 },
  86. { 186, 13, 12, 13, -11 },
  87. { 114, 13, 14, 12, -11 },
  88. { 228, 28, 11, 12, -11 },
  89. { 62, 60, 5, 3, -4 },
  90. { 248, 59, 5, 3, -4 },
  91. { 88, 59, 7, 3, -4 },
  92. { 142, 60, 6, 2, -3 },
  93. { 120, 59, 7, 3, -4 },
  94. { 242, 59, 4, 4, -11 },
  95. { 98, 49, 10, 8, -7 },
  96. { 96, 35, 10, 13, -12 },
  97. { 72, 52, 8, 8, -7 },
  98. { 0, 39, 10, 11, -10 },
  99. { 164, 52, 8, 8, -7 },
  100. { 168, 38, 9, 13, -12 },
  101. { 120, 35, 11, 11, -7 },
  102. { 108, 35, 10, 13, -12 },
  103. { 194, 27, 5, 11, -10 },
  104. { 40, 51, 5, 15, -10 },
  105. { 28, 26, 11, 13, -12 },
  106. { 82, 52, 5, 12, -11 },
  107. { 96, 26, 17, 8, -7 },
  108. { 152, 48, 11, 8, -7 },
  109. { 62, 51, 9, 8, -7 },
  110. { 244, 15, 10, 12, -7 },
  111. { 52, 39, 9, 12, -7 },
  112. { 10, 52, 9, 8, -7 },
  113. { 190, 52, 8, 8, -7 },
  114. { 0, 51, 8, 10, -9 },
  115. { 178, 50, 10, 8, -7 },
  116. { 130, 48, 11, 8, -7 },
  117. { 132, 26, 17, 8, -7 },
  118. { 242, 50, 10, 8, -7 },
  119. { 40, 38, 10, 12, -7 },
  120. { 232, 41, 7, 8, -7 },
  121. { 222, 41, 8, 12, -7 },
  122. { 130, 57, 5, 8, -7 },
  123. { 194, 39, 9, 12, -10 },
  124. { 32, 56, 4, 11, -10 },
  125. { 1, 14, 22, 11, -10 },
  126. { 192, 0, 23, 13, -10 },
  127. { 168, 0, 23, 12, -10 },
  128. { 216, 0, 23, 12, -10 },
  129. { 150, 26, 17, 8, -8 },
  130. { 168, 26, 11, 11, -9 },
  131. { 114, 26, 17, 8, -8 },
  132. { 240, 28, 12, 11, -9 },
  133. { 0, 0, 40, 12, -10 },
  134. { 84, 0, 39, 11, -10 },
  135. { 42, 0, 39, 11, -10 },
  136. { 126, 0, 39, 11, -10 },
  137. };
  138. };
  139. #endif