umicrobit.pas 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. unit uMicrobit;
  2. {$mode objfpc}{$H+}
  3. interface
  4. uses
  5. Classes, SysUtils;
  6. type
  7. TMBImage = array[0..4, 0..4] of integer;
  8. const
  9. IMAGE_MAP: array[1..63] of TMBImage = (
  10. //IMAGE_HEART: TMBImage =
  11. ((0, 1, 0, 1, 0),
  12. (1, 1, 1, 1, 1),
  13. (1, 1, 1, 1, 1),
  14. (0, 1, 1, 1, 0),
  15. (0, 0, 1, 0, 0)),
  16. // smilies
  17. //IMAGE_HAPPY: TMBImage = (
  18. ((0, 0, 0, 0, 0),
  19. (0, 1, 0, 1, 0),
  20. (0, 0, 0, 0, 0),
  21. (1, 0, 0, 0, 1),
  22. (0, 1, 1, 1, 0)),
  23. //IMAGE_SMILE: TMBImage = (
  24. ((0, 0, 0, 0, 0),
  25. (0, 0, 0, 0, 0),
  26. (0, 0, 0, 0, 0),
  27. (1, 0, 0, 0, 1),
  28. (0, 1, 1, 1, 0)),
  29. //IMAGE_SAD: TMBImage = (
  30. ((0, 0, 0, 0, 0),
  31. (0, 1, 0, 1, 0),
  32. (0, 0, 0, 0, 0),
  33. (0, 1, 1, 1, 0),
  34. (1, 0, 0, 0, 1)),
  35. //IMAGE_CONFUSED: TMBImage = (
  36. ((0, 0, 0, 0, 0),
  37. (0, 1, 0, 1, 0),
  38. (0, 0, 0, 0, 0),
  39. (0, 1, 0, 1, 0),
  40. (1, 0, 1, 0, 1)),
  41. //IMAGE_ANGRY: TMBImage = (
  42. ((1, 0, 0, 0, 1),
  43. (0, 1, 0, 1, 0),
  44. (0, 0, 0, 0, 0),
  45. (1, 1, 1, 1, 1),
  46. (1, 0, 1, 0, 1)),
  47. //IMAGE_ASLEEP: TMBImage = (
  48. ((0, 0, 0, 0, 0),
  49. (1, 1, 0, 1, 1),
  50. (0, 0, 0, 0, 0),
  51. (0, 1, 1, 1, 0),
  52. (0, 0, 0, 0, 0)),
  53. //IMAGE_SURPRISED: TMBImage = (
  54. ((0, 1, 0, 1, 0),
  55. (0, 0, 0, 0, 0),
  56. (0, 0, 1, 0, 0),
  57. (0, 1, 0, 1, 0),
  58. (0, 0, 1, 0, 0)),
  59. //IMAGE_SILLY: TMBImage = (
  60. ((1, 0, 0, 0, 1),
  61. (0, 0, 0, 0, 0),
  62. (1, 1, 1, 1, 1),
  63. (0, 0, 1, 0, 1),
  64. (0, 0, 1, 1, 1)),
  65. //IMAGE_FABULOUS: TMBImage = (
  66. ((1, 1, 1, 1, 1),
  67. (1, 1, 0, 1, 1),
  68. (0, 0, 0, 0, 0),
  69. (0, 1, 0, 1, 0),
  70. (0, 1, 1, 1, 0)),
  71. //IMAGE_MEH: TMBImage = (
  72. ((0, 1, 0, 1, 0),
  73. (0, 0, 0, 0, 0),
  74. (0, 0, 0, 1, 0),
  75. (0, 0, 1, 0, 0),
  76. (0, 1, 0, 0, 0)),
  77. // yes/no
  78. //IMAGE_YES: TMBImage = (
  79. ((0, 0, 0, 0, 0),
  80. (0, 0, 0, 0, 1),
  81. (0, 0, 0, 1, 0),
  82. (1, 0, 1, 0, 0),
  83. (0, 1, 0, 0, 0)),
  84. //IMAGE_NO: TMBImage = (
  85. ((1, 0, 0, 0, 1),
  86. (0, 1, 0, 1, 0),
  87. (0, 0, 1, 0, 0),
  88. (0, 1, 0, 1, 0),
  89. (1, 0, 0, 0, 1)),
  90. // clock hands
  91. //IMAGE_CLOCK12: TMBImage = (
  92. ((0, 0, 1, 0, 0),
  93. (0, 0, 1, 0, 0),
  94. (0, 0, 1, 0, 0),
  95. (0, 0, 0, 0, 0),
  96. (0, 0, 0, 0, 0)),
  97. //IMAGE_CLOCK1: TMBImage = (
  98. ((0, 0, 0, 1, 0),
  99. (0, 0, 0, 1, 0),
  100. (0, 0, 1, 0, 0),
  101. (0, 0, 0, 0, 0),
  102. (0, 0, 0, 0, 0)),
  103. //IMAGE_CLOCK2: TMBImage = (
  104. ((0, 0, 0, 0, 0),
  105. (0, 0, 0, 1, 1),
  106. (0, 0, 1, 0, 0),
  107. (0, 0, 0, 0, 0),
  108. (0, 0, 0, 0, 0)),
  109. //IMAGE_CLOCK3: TMBImage = (
  110. ((0, 0, 0, 0, 0),
  111. (0, 0, 0, 0, 0),
  112. (0, 0, 1, 1, 1),
  113. (0, 0, 0, 0, 0),
  114. (0, 0, 0, 0, 0)),
  115. //IMAGE_CLOCK4: TMBImage = (
  116. ((0, 0, 0, 0, 0),
  117. (0, 0, 0, 0, 0),
  118. (0, 0, 1, 0, 0),
  119. (0, 0, 0, 1, 1),
  120. (0, 0, 0, 0, 0)),
  121. //IMAGE_CLOCK5: TMBImage = (
  122. ((0, 0, 0, 0, 0),
  123. (0, 0, 0, 0, 0),
  124. (0, 0, 1, 0, 0),
  125. (0, 0, 0, 1, 0),
  126. (0, 0, 0, 1, 0)),
  127. //IMAGE_CLOCK6: TMBImage = (
  128. ((0, 0, 0, 0, 0),
  129. (0, 0, 0, 0, 0),
  130. (0, 0, 1, 0, 0),
  131. (0, 0, 1, 0, 0),
  132. (0, 0, 1, 0, 0)),
  133. //IMAGE_CLOCK7: TMBImage = (
  134. ((0, 0, 0, 0, 0),
  135. (0, 0, 0, 0, 0),
  136. (0, 0, 1, 0, 0),
  137. (0, 1, 0, 0, 0),
  138. (0, 1, 0, 0, 0)),
  139. //IMAGE_CLOCK8: TMBImage = (
  140. ((0, 0, 0, 0, 0),
  141. (0, 0, 0, 0, 0),
  142. (0, 0, 1, 0, 0),
  143. (1, 1, 0, 0, 0),
  144. (0, 0, 0, 0, 0)),
  145. //IMAGE_CLOCK9: TMBImage = (
  146. ((0, 0, 0, 0, 0),
  147. (0, 0, 0, 0, 0),
  148. (1, 1, 1, 0, 0),
  149. (0, 0, 0, 0, 0),
  150. (0, 0, 0, 0, 0)),
  151. //IMAGE_CLOCK10: TMBImage = (
  152. ((0, 0, 0, 0, 0),
  153. (1, 1, 0, 0, 0),
  154. (0, 0, 1, 0, 0),
  155. (0, 0, 0, 0, 0),
  156. (0, 0, 0, 0, 0)),
  157. //IMAGE_CLOCK11: TMBImage = (
  158. ((0, 1, 0, 0, 0),
  159. (0, 1, 0, 0, 0),
  160. (0, 0, 1, 0, 0),
  161. (0, 0, 0, 0, 0),
  162. (0, 0, 0, 0, 0)),
  163. // arrows
  164. //IMAGE_ARROW_N: TMBImage = (
  165. ((0, 0, 1, 0, 0),
  166. (0, 1, 1, 1, 0),
  167. (1, 0, 1, 0, 1),
  168. (0, 0, 1, 0, 0),
  169. (0, 0, 1, 0, 0)),
  170. //IMAGE_ARROW_NE: TMBImage = (
  171. ((0, 0, 1, 1, 1),
  172. (0, 0, 0, 1, 1),
  173. (0, 0, 1, 0, 1),
  174. (0, 1, 0, 0, 0),
  175. (1, 0, 0, 0, 0)),
  176. //IMAGE_ARROW_E: TMBImage = (
  177. ((0, 0, 1, 0, 0),
  178. (0, 0, 0, 1, 0),
  179. (1, 1, 1, 1, 1),
  180. (0, 0, 0, 1, 0),
  181. (0, 0, 1, 0, 0)),
  182. //IMAGE_ARROW_SE: TMBImage = (
  183. ((1, 0, 0, 0, 0),
  184. (0, 1, 0, 0, 0),
  185. (0, 0, 1, 0, 1),
  186. (0, 0, 0, 1, 1),
  187. (0, 0, 1, 1, 1)),
  188. //IMAGE_ARROW_S: TMBImage = (
  189. ((0, 0, 1, 0, 0),
  190. (0, 0, 1, 0, 0),
  191. (1, 0, 1, 0, 1),
  192. (0, 1, 1, 1, 0),
  193. (0, 0, 1, 0, 0)),
  194. //IMAGE_ARROW_SW: TMBImage = (
  195. ((0, 0, 0, 0, 1),
  196. (0, 0, 0, 1, 0),
  197. (1, 0, 1, 0, 0),
  198. (1, 1, 0, 0, 0),
  199. (1, 1, 1, 0, 0)),
  200. //IMAGE_ARROW_W: TMBImage = (
  201. ((0, 0, 1, 0, 0),
  202. (0, 1, 0, 0, 0),
  203. (1, 1, 1, 1, 1),
  204. (0, 1, 0, 0, 0),
  205. (0, 0, 1, 0, 0)),
  206. //IMAGE_ARROW_NW: TMBImage = (
  207. ((1, 1, 1, 0, 0),
  208. (1, 1, 0, 0, 0),
  209. (1, 0, 1, 0, 0),
  210. (0, 0, 0, 1, 0),
  211. (0, 0, 0, 0, 1)),
  212. // geometry
  213. //IMAGE_TRIANGLE: TMBImage = (
  214. ((0, 0, 0, 0, 0),
  215. (0, 0, 1, 0, 0),
  216. (0, 1, 0, 1, 0),
  217. (1, 1, 1, 1, 1),
  218. (0, 0, 0, 0, 0)),
  219. //IMAGE_TRIANGLE_LEFT: TMBImage = (
  220. ((1, 0, 0, 0, 0),
  221. (1, 1, 0, 0, 0),
  222. (1, 0, 1, 0, 0),
  223. (1, 0, 0, 1, 0),
  224. (1, 1, 1, 1, 1)),
  225. //IMAGE_CHESSBOARD: TMBImage = (
  226. ((0, 1, 0, 1, 0),
  227. (1, 0, 1, 0, 1),
  228. (0, 1, 0, 1, 0),
  229. (1, 0, 1, 0, 1),
  230. (0, 1, 0, 1, 0)),
  231. //IMAGE_DIAMOND: TMBImage = (
  232. ((0, 0, 1, 0, 0),
  233. (0, 1, 0, 1, 0),
  234. (1, 0, 0, 0, 1),
  235. (0, 1, 0, 1, 0),
  236. (0, 0, 1, 0, 0)),
  237. //IMAGE_DIAMOND_SMALL: TMBImage = (
  238. ((0, 0, 0, 0, 0),
  239. (0, 0, 1, 0, 0),
  240. (0, 1, 0, 1, 0),
  241. (0, 0, 1, 0, 0),
  242. (0, 0, 0, 0, 0)),
  243. //IMAGE_SQUARE: TMBImage = (
  244. ((1, 1, 1, 1, 1),
  245. (1, 0, 0, 0, 1),
  246. (1, 0, 0, 0, 1),
  247. (1, 0, 0, 0, 1),
  248. (1, 1, 1, 1, 1)),
  249. //IMAGE_SQUARE_SMALL: TMBImage = (
  250. ((0, 0, 0, 0, 0),
  251. (0, 1, 1, 1, 0),
  252. (0, 1, 0, 1, 0),
  253. (0, 1, 1, 1, 0),
  254. (0, 0, 0, 0, 0)),
  255. // animals
  256. //IMAGE_RABBIT: TMBImage = (
  257. ((1, 0, 1, 0, 0),
  258. (1, 0, 1, 0, 0),
  259. (1, 1, 1, 1, 0),
  260. (1, 1, 0, 1, 0),
  261. (1, 1, 1, 1, 0)),
  262. //IMAGE_COW: TMBImage = (
  263. ((1, 0, 0, 0, 1),
  264. (1, 0, 0, 0, 1),
  265. (1, 1, 1, 1, 1),
  266. (0, 1, 1, 1, 0),
  267. (0, 0, 1, 0, 0)),
  268. // musical notes
  269. //IMAGE_MUSIC_CROTCHET: TMBImage = (
  270. ((0, 0, 1, 0, 0),
  271. (0, 0, 1, 0, 0),
  272. (0, 0, 1, 0, 0),
  273. (1, 1, 1, 0, 0),
  274. (1, 1, 1, 0, 0)),
  275. //IMAGE_MUSIC_QUAVER: TMBImage = (
  276. ((0, 0, 1, 0, 0),
  277. (0, 0, 1, 1, 0),
  278. (0, 0, 1, 0, 1),
  279. (1, 1, 1, 0, 0),
  280. (1, 1, 1, 0, 0)),
  281. //IMAGE_MUSIC_QUAVERS: TMBImage = (
  282. ((0, 1, 1, 1, 1),
  283. (0, 1, 0, 0, 1),
  284. (0, 1, 0, 0, 1),
  285. (1, 1, 0, 1, 1),
  286. (1, 1, 0, 1, 1)),
  287. // other icons
  288. //IMAGE_PITCHFORK: TMBImage = (
  289. ((1, 0, 1, 0, 1),
  290. (1, 0, 1, 0, 1),
  291. (1, 1, 1, 1, 1),
  292. (0, 0, 1, 0, 0),
  293. (0, 0, 1, 0, 0)),
  294. //IMAGE_XMAS: TMBImage = (
  295. ((0, 0, 1, 0, 0),
  296. (0, 1, 1, 1, 0),
  297. (0, 0, 1, 0, 0),
  298. (0, 1, 1, 1, 0),
  299. (1, 1, 1, 1, 1)),
  300. //IMAGE_PACMAN: TMBImage = (
  301. ((0, 1, 1, 1, 1),
  302. (1, 1, 0, 1, 0),
  303. (1, 1, 1, 0, 0),
  304. (1, 1, 1, 1, 0),
  305. (0, 1, 1, 1, 1)),
  306. //IMAGE_TARGET: TMBImage = (
  307. ((0, 0, 1, 0, 0),
  308. (0, 1, 1, 1, 0),
  309. (1, 1, 0, 1, 1),
  310. (0, 1, 1, 1, 0),
  311. (0, 0, 1, 0, 0)),
  312. //IMAGE_SHIRT: TMBImage = (
  313. ((1, 1, 0, 1, 1),
  314. (1, 1, 1, 1, 1),
  315. (0, 1, 1, 1, 0),
  316. (0, 1, 1, 1, 0),
  317. (0, 1, 1, 1, 0)),
  318. //IMAGE_ROLLERSKATE: TMBImage = (
  319. ((0, 0, 0, 1, 1),
  320. (0, 0, 0, 1, 1),
  321. (1, 1, 1, 1, 1),
  322. (1, 1, 1, 1, 1),
  323. (0, 1, 0, 1, 0)),
  324. //IMAGE_DUCK: TMBImage = (
  325. ((0, 1, 1, 0, 0),
  326. (1, 1, 1, 0, 0),
  327. (0, 1, 1, 1, 1),
  328. (0, 1, 1, 1, 0),
  329. (0, 0, 0, 0, 0)),
  330. //IMAGE_HOUSE: TMBImage = (
  331. ((0, 0, 1, 0, 0),
  332. (0, 1, 1, 1, 0),
  333. (1, 1, 1, 1, 1),
  334. (0, 1, 1, 1, 0),
  335. (0, 1, 0, 1, 0)),
  336. //IMAGE_TORTOISE: TMBImage = (
  337. ((0, 0, 0, 0, 0),
  338. (0, 1, 1, 1, 0),
  339. (1, 1, 1, 1, 1),
  340. (0, 1, 0, 1, 0),
  341. (0, 0, 0, 0, 0)),
  342. //IMAGE_BUTTERFLY: TMBImage = (
  343. ((1, 1, 0, 1, 1),
  344. (1, 1, 1, 1, 1),
  345. (0, 0, 1, 0, 0),
  346. (1, 1, 1, 1, 1),
  347. (1, 1, 0, 1, 1)),
  348. //IMAGE_STICKFIGURE: TMBImage = (
  349. ((0, 0, 1, 0, 0),
  350. (1, 1, 1, 1, 1),
  351. (0, 0, 1, 0, 0),
  352. (0, 1, 0, 1, 0),
  353. (1, 0, 0, 0, 1)),
  354. //IMAGE_GHOST: TMBImage = (
  355. ((1, 1, 1, 1, 1),
  356. (1, 0, 1, 0, 1),
  357. (1, 1, 1, 1, 1),
  358. (1, 1, 1, 1, 1),
  359. (1, 0, 1, 0, 1)),
  360. //IMAGE_SWORD: TMBImage = (
  361. ((0, 0, 1, 0, 0),
  362. (0, 0, 1, 0, 0),
  363. (0, 0, 1, 0, 0),
  364. (0, 1, 1, 1, 0),
  365. (0, 0, 1, 0, 0)),
  366. //IMAGE_GIRAFFE: TMBImage = (
  367. ((1, 1, 0, 0, 0),
  368. (0, 1, 0, 0, 0),
  369. (0, 1, 0, 0, 0),
  370. (0, 1, 1, 1, 0),
  371. (0, 1, 0, 1, 0)),
  372. //IMAGE_SKULL: TMBImage = (
  373. ((0, 1, 1, 1, 0),
  374. (1, 0, 1, 0, 1),
  375. (1, 1, 1, 1, 1),
  376. (0, 1, 1, 1, 0),
  377. (0, 1, 1, 1, 0)),
  378. //IMAGE_UMBRELLA: TMBImage = (
  379. ((0, 1, 1, 1, 0),
  380. (1, 1, 1, 1, 1),
  381. (0, 0, 1, 0, 0),
  382. (1, 0, 1, 0, 0),
  383. (0, 1, 1, 0, 0)),
  384. //IMAGE_SNAKE: TMBImage = (
  385. ((1, 1, 0, 0, 0),
  386. (1, 1, 0, 1, 1),
  387. (0, 1, 0, 1, 0),
  388. (0, 1, 1, 1, 0),
  389. (0, 0, 0, 0, 0)),
  390. //IMAGE_HEART_SMALL: TMBImage =
  391. ((0, 0, 0, 0, 0),
  392. (0, 1, 0, 1, 0),
  393. (0, 1, 1, 1, 0),
  394. (0, 0, 1, 0, 0),
  395. (0, 0, 0, 0, 0))
  396. );
  397. implementation
  398. end.