Open Source Tomb Raider Engine
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

FontTRLE.h 4.6KB

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