fonts.inc 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. /**--------------------------------------------------------------------------**\
  2. =================================
  3. y_bitmap - Generate bitmaps.
  4. =================================
  5. Description:
  6. Code to generate images on the server in the bitmap format. This is by far
  7. the simplest format to write to as it is just a huge array of colours (at
  8. least 24-bit bitmaps are, and we only do them).
  9. This file handles writing text. Currently this only supports one size of
  10. text and it is VERY basic.
  11. Legal:
  12. Version: MPL 1.1
  13. The contents of this file are subject to the Mozilla Public License Version
  14. 1.1 (the "License"); you may not use this file except in compliance with
  15. the License. You may obtain a copy of the License at
  16. http://www.mozilla.org/MPL/
  17. Software distributed under the License is distributed on an "AS IS" basis,
  18. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  19. for the specific language governing rights and limitations under the
  20. License.
  21. The Original Code is the YSI utils include.
  22. The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  23. Portions created by the Initial Developer are Copyright (C) 2011
  24. the Initial Developer. All Rights Reserved.
  25. Contributors:
  26. ZeeX, koolk, JoeBullet/Google63, g_aSlice/Slice
  27. Thanks:
  28. JoeBullet/Google63 - Handy arbitrary ASM jump code using SCTRL.
  29. ZeeX - Very productive conversations.
  30. koolk - IsPlayerinAreaEx code.
  31. TheAlpha - Danish translation.
  32. breadfish - German translation.
  33. Fireburn - Dutch translation.
  34. yom - French translation.
  35. 50p - Polish translation.
  36. Zamaroht - Spanish translation.
  37. Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes
  38. for me to strive to better.
  39. Pixels^ - Running XScripters where the idea was born.
  40. Matite - Pestering me to release it and using it.
  41. Very special thanks to:
  42. Thiadmer - PAWN, whose limits continue to amaze me!
  43. Kye/Kalcor - SA:MP.
  44. SA:MP Team past, present and future - SA:MP.
  45. Version:
  46. 0.1
  47. Changelog:
  48. 29/03/13:
  49. First version.
  50. Functions:
  51. Stock:
  52. -
  53. Inline:
  54. -
  55. Variables:
  56. Global:
  57. -
  58. \**--------------------------------------------------------------------------**/
  59. static stock const
  60. /*YSI_g_scAlphabet[10][26 + 1 + 10 + 1 char] =
  61. {
  62. // A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 ~ ' -
  63. {0x30, 0xFC, 0x3C, 0xF8, 0xFE, 0xFE, 0x3C, 0xCC, 0x78, 0x1E, 0xE6, 0xF0, 0xC6, 0xC6, 0x38, 0xFC, 0x38, 0xFC, 0x78, 0xFC, 0xCC, 0xCC, 0xC6, 0xCC, 0xCC, 0xFE, 0x00, 0x7C, 0x10, 0x78, 0x78, 0x0C, 0xFC, 0x38, 0xFE, 0x78, 0x78, 0x73, 0x30, 0x00},
  64. {0x78, 0x66, 0x66, 0x6C, 0x62, 0x66, 0x66, 0xCC, 0x30, 0x0C, 0x66, 0x60, 0xEE, 0xC6, 0x6C, 0x66, 0x6C, 0x66, 0xCC, 0xB4, 0xCC, 0xCC, 0xC6, 0xCC, 0xCC, 0xCE, 0x00, 0xC6, 0x30, 0xCC, 0xCC, 0x1C, 0xC0, 0x60, 0xC6, 0xCC, 0xCC, 0xDA, 0x30, 0x00},
  65. {0xCC, 0x66, 0xC6, 0x66, 0x60, 0x62, 0xC6, 0xCC, 0x30, 0x0C, 0x6C, 0x60, 0xFE, 0xE6, 0xC6, 0x66, 0xC6, 0x66, 0xCC, 0x30, 0xCC, 0xCC, 0xC6, 0xCC, 0xCC, 0x98, 0x00, 0xCE, 0xF0, 0xCC, 0x0C, 0x3C, 0xC0, 0xC0, 0xC6, 0xCC, 0xCC, 0xCE, 0x30, 0x00},
  66. {0xCC, 0x66, 0xC0, 0x66, 0x64, 0x64, 0xC0, 0xCC, 0x30, 0x0C, 0x6C, 0x60, 0xFE, 0xF6, 0xC6, 0x66, 0xC6, 0x66, 0xC0, 0x30, 0xCC, 0xCC, 0xC6, 0x78, 0xCC, 0x18, 0x00, 0xDE, 0x30, 0x0C, 0x0C, 0x6C, 0xC0, 0xC0, 0x06, 0xCC, 0xCC, 0x00, 0x60, 0x00},
  67. {0xCC, 0x7C, 0xC0, 0x66, 0x7C, 0x7C, 0xC0, 0xFC, 0x30, 0x0C, 0x78, 0x60, 0xD6, 0xFE, 0xC6, 0x7C, 0xC6, 0x7C, 0x70, 0x30, 0xCC, 0xCC, 0xD6, 0x30, 0x78, 0x30, 0x00, 0xD6, 0x30, 0x18, 0x38, 0xCC, 0xF8, 0xF8, 0x0C, 0x78, 0x7C, 0x00, 0x00, 0xFE},
  68. {0xFC, 0x66, 0xC0, 0x66, 0x64, 0x64, 0xCE, 0xCC, 0x30, 0xCC, 0x6C, 0x62, 0xC6, 0xDE, 0xC6, 0x60, 0xCE, 0x6C, 0x18, 0x30, 0xCC, 0xCC, 0xD6, 0x78, 0x30, 0x60, 0x00, 0xF6, 0x30, 0x30, 0x0C, 0xFE, 0x0C, 0xCC, 0x18, 0xCC, 0x18, 0x00, 0x00, 0x00},
  69. {0xCC, 0x66, 0xC6, 0x66, 0x60, 0x60, 0xC6, 0xCC, 0x30, 0xCC, 0x6C, 0x66, 0xC6, 0xCE, 0xC6, 0x60, 0xDE, 0x66, 0xCC, 0x30, 0xCC, 0xCC, 0x6C, 0xCC, 0x30, 0x62, 0x00, 0xE6, 0x30, 0x60, 0x0C, 0x0C, 0x0C, 0xCC, 0x30, 0xCC, 0x18, 0x00, 0x00, 0x00},
  70. {0xCC, 0x66, 0x66, 0x6C, 0x62, 0x60, 0x66, 0xCC, 0x30, 0xCC, 0x66, 0x66, 0xC6, 0xC6, 0x6C, 0x60, 0x7C, 0x66, 0xCC, 0x30, 0xCC, 0x78, 0x6C, 0xCC, 0x30, 0xC6, 0x00, 0xC6, 0x30, 0xCC, 0xCC, 0x0C, 0xCC, 0xCC, 0x30, 0xCC, 0x30, 0x00, 0x00, 0x00},
  71. {0xCC, 0xFC, 0x3C, 0xF8, 0xFE, 0xF0, 0x3E, 0xCC, 0x78, 0x78, 0xE6, 0xFE, 0xC6, 0xC6, 0x38, 0xF0, 0x0C, 0xE6, 0x78, 0x78, 0x78, 0x30, 0x6C, 0xCC, 0x78, 0xFE, 0x00, 0x7C, 0xFC, 0xFC, 0x78, 0x1E, 0x78, 0x78, 0x30, 0x78, 0x70, 0x00, 0x00, 0x00},
  72. {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
  73. };*/
  74. // This data is stored bottom to top, so the last character (the implicit
  75. // NULL is the top row of the character). This is as the NULL is required
  76. // to not be written and the top row is the only one that is always empty.
  77. YSI_g_scAlphabet[128][12 char] =
  78. {
  79. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x00
  80. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x01
  81. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x02
  82. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x03
  83. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x04
  84. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x05
  85. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x06
  86. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x07
  87. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x08
  88. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x09
  89. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x0A
  90. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x0B
  91. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x0C
  92. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x0D
  93. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x0E
  94. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x0F
  95. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x10
  96. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x11
  97. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x12
  98. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x13
  99. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x14
  100. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x15
  101. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x16
  102. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x17
  103. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x18
  104. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x19
  105. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x1A
  106. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x1B
  107. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x1C
  108. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x1D
  109. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x1E
  110. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // 0x1F
  111. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", //
  112. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // !
  113. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // "
  114. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // #
  115. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // $
  116. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // %
  117. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // &
  118. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x60;\x30;\x30;\x30;", // '
  119. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // (
  120. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // )
  121. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // *
  122. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // +
  123. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // ,
  124. !"\x00;\x00;\x00;\x00;\x00;\x00;\xFE;\x00;\x00;\x00;\x00;", // -
  125. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // .
  126. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // /
  127. !"\x00;\x00;\x7C;\xC6;\xE6;\xF6;\xD6;\xDE;\xCE;\xC6;\x7C;", // 0
  128. !"\x00;\x00;\xFC;\x30;\x30;\x30;\x30;\x30;\xF0;\x30;\x10;", // 1
  129. !"\x00;\x00;\xFC;\xCC;\x60;\x30;\x18;\x0C;\xCC;\xCC;\x78;", // 2
  130. !"\x00;\x00;\x78;\xCC;\x0C;\x0C;\x38;\x0C;\x0C;\xCC;\x78;", // 3
  131. !"\x00;\x00;\x1E;\x0C;\x0C;\xFE;\xCC;\x6C;\x3C;\x1C;\x0C;", // 4
  132. !"\x00;\x00;\x78;\xCC;\x0C;\x0C;\xF8;\xC0;\xC0;\xC0;\xFC;", // 5
  133. !"\x00;\x00;\x78;\xCC;\xCC;\xCC;\xF8;\xC0;\xC0;\x60;\x38;", // 6
  134. !"\x00;\x00;\x30;\x30;\x30;\x18;\x0C;\x06;\xC6;\xC6;\xFE;", // 7
  135. !"\x00;\x00;\x78;\xCC;\xCC;\xCC;\x78;\xCC;\xCC;\xCC;\x78;", // 8
  136. !"\x00;\x00;\x70;\x30;\x18;\x18;\x7C;\xCC;\xCC;\xCC;\x78;", // 9
  137. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // :
  138. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // ;
  139. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // <
  140. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // =
  141. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // >
  142. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // ?
  143. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // @
  144. !"\x00;\x00;\xCC;\xCC;\xCC;\xFC;\xCC;\xCC;\xCC;\x78;\x30;", // A
  145. !"\x00;\x00;\xFC;\x66;\x66;\x66;\x7C;\x66;\x66;\x66;\xFC;", // B
  146. !"\x00;\x00;\x3C;\x66;\xC6;\xC0;\xC0;\xC0;\xC6;\x66;\x3C;", // C
  147. !"\x00;\x00;\xF8;\x6C;\x66;\x66;\x66;\x66;\x66;\x6C;\xF8;", // D
  148. !"\x00;\x00;\xFE;\x62;\x60;\x64;\x7C;\x64;\x60;\x62;\xFE;", // E
  149. !"\x00;\x00;\xF0;\x60;\x60;\x64;\x7C;\x64;\x62;\x66;\xFE;", // F
  150. !"\x00;\x00;\x3E;\x66;\xC6;\xCE;\xC0;\xC0;\xC6;\x66;\x3C;", // G
  151. !"\x00;\x00;\xCC;\xCC;\xCC;\xCC;\xFC;\xCC;\xCC;\xCC;\xCC;", // H
  152. !"\x00;\x00;\x78;\x30;\x30;\x30;\x30;\x30;\x30;\x30;\x78;", // I
  153. !"\x00;\x00;\x78;\xCC;\xCC;\xCC;\x0C;\x0C;\x0C;\x0C;\x1E;", // J
  154. !"\x00;\x00;\xE6;\x66;\x6C;\x6C;\x78;\x6C;\x6C;\x66;\xE6;", // K
  155. !"\x00;\x00;\xFE;\x66;\x66;\x62;\x60;\x60;\x60;\x60;\xF0;", // L
  156. !"\x00;\x00;\xC6;\xC6;\xC6;\xC6;\xD6;\xFE;\xFE;\xEE;\xC6;", // M
  157. !"\x00;\x00;\xC6;\xC6;\xCE;\xDE;\xFE;\xF6;\xE6;\xC6;\xC6;", // N
  158. !"\x00;\x00;\x38;\x6C;\xC6;\xC6;\xC6;\xC6;\xC6;\x6C;\x38;", // O
  159. !"\x00;\x00;\xF0;\x60;\x60;\x60;\x7C;\x66;\x66;\x66;\xFC;", // P
  160. !"\x00;\x1E;\x0C;\x7C;\xDE;\xCE;\xC6;\xC6;\xC6;\x6C;\x38;", // Q
  161. !"\x00;\x00;\xE6;\x66;\x66;\x6C;\x7C;\x66;\x66;\x66;\xFC;", // R
  162. !"\x00;\x00;\x78;\xCC;\xCC;\x18;\x70;\xC0;\xCC;\xCC;\x78;", // S
  163. !"\x00;\x00;\x78;\x30;\x30;\x30;\x30;\x30;\x30;\xB4;\xFC;", // T
  164. !"\x00;\x00;\x78;\xCC;\xCC;\xCC;\xCC;\xCC;\xCC;\xCC;\xCC;", // U
  165. !"\x00;\x00;\x30;\x78;\xCC;\xCC;\xCC;\xCC;\xCC;\xCC;\xCC;", // V
  166. !"\x00;\x00;\x6C;\x6C;\x6C;\xD6;\xD6;\xC6;\xC6;\xC6;\xC6;", // W
  167. !"\x00;\x00;\xCC;\xCC;\xCC;\x78;\x30;\x78;\xCC;\xCC;\xCC;", // X
  168. !"\x00;\x00;\x78;\x30;\x30;\x30;\x78;\xCC;\xCC;\xCC;\xCC;", // Y
  169. !"\x00;\x00;\xFE;\xC6;\x62;\x60;\x30;\x18;\x98;\xCE;\xFE;", // Z
  170. !"\x00;\x00;\x3C;\x30;\x30;\x30;\x30;\x30;\x30;\x30;\x3C;", // [
  171. !"\x00;\x00;\x02;\x06;\x0C;\x18;\x30;\x60;\xC0;\x80;\x00;", // <backslash>
  172. !"\x00;\x00;\x3C;\x0C;\x0C;\x0C;\x0C;\x0C;\x0C;\x0C;\x3C;", // ]
  173. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\xC6;\x6C;\x38;\x10;", // ^
  174. !"\x00;\xFF;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;", // _
  175. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x18;\x30;\x30;", // `
  176. !"\x00;\x00;\x76;\xCC;\xCC;\x7C;\x0C;\x78;\x00;\x00;\x00;", // a
  177. !"\x00;\x00;\xDC;\x66;\x66;\x66;\x66;\x7C;\x60;\x60;\xE0;", // b
  178. !"\x00;\x00;\x78;\xCC;\xC0;\xC0;\xCC;\x78;\x00;\x00;\x00;", // c
  179. !"\x00;\x00;\x76;\xCC;\xCC;\xCC;\xCC;\x7C;\x0C;\x0C;\x1C;", // d
  180. !"\x00;\x00;\x78;\xCC;\xC0;\xFC;\xCC;\x78;\x00;\x00;\x00;", // e
  181. !"\x00;\x00;\xF0;\x60;\x60;\x60;\xF8;\x60;\x60;\x6C;\x38;", // f
  182. !"\x78;\xCC;\x0C;\x7C;\xCC;\xCC;\xCC;\x76;\x00;\x00;\x00;", // g
  183. !"\x00;\x00;\xE6;\x66;\x66;\x66;\x76;\x6C;\x60;\x60;\xE0;", // h
  184. !"\x00;\x00;\x7E;\x18;\x18;\x18;\x18;\x78;\x00;\x18;\x18;", // i
  185. !"\x78;\xCC;\xCC;\x0C;\x0C;\x0C;\x0C;\x3C;\x00;\x0C;\x0C;", // j
  186. !"\x00;\x00;\xE6;\x66;\x6C;\x78;\x6C;\x66;\x60;\x60;\xE0;", // k
  187. !"\x00;\x00;\x7E;\x18;\x18;\x18;\x18;\x18;\x18;\x18;\x78;", // l
  188. !"\x00;\x00;\xC6;\xD6;\xD6;\xD6;\xD6;\xFC;\x00;\x00;\x00;", // m
  189. !"\x00;\x00;\xCC;\xCC;\xCC;\xCC;\xCC;\xF8;\x00;\x00;\x00;", // n
  190. !"\x00;\x00;\x78;\xCC;\xCC;\xCC;\xCC;\x78;\x00;\x00;\x00;", // o
  191. !"\xF0;\x60;\x7C;\x66;\x66;\x66;\x66;\xDC;\x00;\x00;\x00;", // p
  192. !"\x1E;\x0C;\x7C;\xCC;\xCC;\xCC;\xCC;\x76;\x00;\x00;\x00;", // q
  193. !"\x00;\x00;\xF0;\x60;\x60;\x76;\x6E;\xE6;\x00;\x00;\x00;", // r
  194. !"\x00;\x00;\x78;\xCC;\x18;\x60;\xCC;\x78;\x00;\x00;\x00;", // s
  195. !"\x00;\x00;\x38;\x6C;\x60;\x60;\x60;\xFC;\x60;\x20;\x00;", // t
  196. !"\x00;\x00;\x76;\xCC;\xCC;\xCC;\xCC;\xCC;\x00;\x00;\x00;", // u
  197. !"\x00;\x00;\x30;\x78;\xCC;\xCC;\xCC;\xCC;\x00;\x00;\x00;", // v
  198. !"\x00;\x00;\x6C;\x6C;\xD6;\xD6;\xC6;\xC6;\x00;\x00;\x00;", // w
  199. !"\x00;\x00;\xC6;\x6C;\x38;\x38;\x6C;\xC6;\x00;\x00;\x00;", // x
  200. !"\xF0;\x18;\x0C;\x7C;\x66;\x66;\x66;\x66;\x00;\x00;\x00;", // y
  201. !"\x00;\x00;\xFC;\xC4;\x60;\x18;\x8C;\xFC;\x00;\x00;\x00;", // z
  202. !"\x00;\x00;\x1C;\x30;\x30;\x60;\xC0;\x60;\x30;\x30;\x1C;", // {
  203. !"\x00;\x00;\x18;\x18;\x18;\x18;\x00;\x18;\x18;\x18;\x18;", // |
  204. !"\x00;\x00;\xE0;\x30;\x30;\x18;\x0C;\x18;\x30;\x30;\xE0;", // }
  205. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\xCE;\xDA;\x73;", // ~
  206. !"\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;\x00;" // 0x7F
  207. };
  208. stock Bitmap_AddSimpleLetter(Bitmap:ctx, colour, letter, &x, &y)
  209. {
  210. letter &= 0x7F;
  211. y += 12;
  212. for (new j = 0; j != 12; ++j)
  213. {
  214. --y;
  215. new
  216. c = YSI_g_scAlphabet[letter]{j};
  217. for (new i = 0, k = 0x80; i != 8; ++i, k >>= 1)
  218. {
  219. if (c & k) Bitmap_WritePixel(ctx, x, y, colour);
  220. ++x;
  221. }
  222. x -= 8;
  223. }
  224. x += 8;
  225. }
  226. stock Bitmap_AddSimpleString(Bitmap:ctx, colour, str[], &x, &y)
  227. {
  228. for (new i = 0, ch; (ch = str[i]); ++i)
  229. {
  230. Bitmap_AddSimpleLetter(ctx, colour, ch, x, y);
  231. }
  232. }