Contains the source code from the course work throughout my undergraduate Computer Engineering degree at Brigham Young University. There is a mixture of Go, Python, C, C++, Java, VHDL, Verilog, Matlab, Bash, Assembly, etc..
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bunker.h 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. #ifndef BUNKER_H_
  2. #define BUNKER_H_
  3. #define BUNKER1_X 70
  4. #define BUNKER2_X 210
  5. #define BUNKER3_X 350
  6. #define BUNKER4_X 490
  7. #define BLOCK_HEIGHT 16
  8. #define BLOCK_WIDTH 16
  9. #define packWord16(b15,b14,b13,b12,b11,b10,b9,b8,b7,b6,b5,b4,b3,b2,b1,b0) \
  10. ((b15 << 15) | (b14 << 14) | (b13 << 13) | (b12 << 12) | (b11 << 11) | (b10 << 10) | (b9 << 9 ) | (b8 << 8 ) | \
  11. (b7 << 7 ) | (b6 << 6 ) | (b5 << 5 ) | (b4 << 4 ) | (b3 << 3 ) | (b2 << 2 ) | (b1 << 1 ) | (b0 << 0 ))
  12. int block_left0[BLOCK_HEIGHT] = // whole block
  13. {
  14. packWord16(0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1),
  15. packWord16(0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1),
  16. packWord16(0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1),
  17. packWord16(0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1),
  18. packWord16(0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  19. packWord16(0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  20. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  21. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  22. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  23. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  24. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  25. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  26. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  27. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  28. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  29. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  30. };
  31. int block_left1[BLOCK_HEIGHT] = // 1-hit
  32. {
  33. packWord16(0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0),
  34. packWord16(0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,0),
  35. packWord16(0,0,0,0,1,1,0,0,1,1,1,0,0,1,1,1),
  36. packWord16(0,0,0,1,1,1,0,0,1,1,1,0,0,1,1,1),
  37. packWord16(0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1),
  38. packWord16(0,1,1,1,0,0,1,1,1,1,1,0,0,1,1,1),
  39. packWord16(0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0),
  40. packWord16(0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0),
  41. packWord16(1,1,0,0,1,1,1,1,1,0,0,1,1,1,0,0),
  42. packWord16(1,1,0,0,1,1,1,1,1,0,0,1,1,1,0,0),
  43. packWord16(0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1),
  44. packWord16(0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1),
  45. packWord16(1,0,0,1,1,0,0,1,0,0,1,1,1,1,1,1),
  46. packWord16(1,0,0,1,1,0,0,1,0,0,1,1,1,1,1,1),
  47. packWord16(1,1,1,0,0,1,1,1,0,0,1,1,1,0,0,1),
  48. packWord16(1,1,1,0,0,1,1,1,0,0,1,1,1,0,0,1),
  49. };
  50. int block_left2[BLOCK_HEIGHT] = // 2-hit
  51. {
  52. packWord16(0,0,0,0,0,0,1,0,0,1,1,0,0,1,1,0),
  53. packWord16(0,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0),
  54. packWord16(0,0,0,0,1,1,0,0,0,0,1,0,0,1,1,0),
  55. packWord16(0,0,0,1,1,1,0,0,0,0,1,0,0,1,1,0),
  56. packWord16(0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0),
  57. packWord16(0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0),
  58. packWord16(0,0,1,0,0,1,0,0,0,0,0,0,1,1,0,0),
  59. packWord16(0,0,1,0,0,1,0,0,0,0,0,0,1,1,0,0),
  60. packWord16(1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0),
  61. packWord16(1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0),
  62. packWord16(0,0,1,1,0,0,0,0,0,0,1,1,0,0,1,0),
  63. packWord16(0,0,1,1,0,0,0,0,0,0,1,1,0,0,1,0),
  64. packWord16(0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0),
  65. packWord16(0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0),
  66. packWord16(0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,1),
  67. packWord16(0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,1),
  68. };
  69. int block_left3[BLOCK_HEIGHT] = // 3-hit
  70. {
  71. packWord16(0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0),
  72. packWord16(0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0),
  73. packWord16(0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0),
  74. packWord16(0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0),
  75. packWord16(0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0),
  76. packWord16(0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0),
  77. packWord16(0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0),
  78. packWord16(0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0),
  79. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  80. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  81. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  82. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  83. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0),
  84. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0),
  85. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  86. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  87. };
  88. int empty[BLOCK_HEIGHT] = // no block
  89. {
  90. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  91. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  92. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  93. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  94. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  95. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  96. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  97. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  98. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  99. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  100. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  101. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  102. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  103. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  104. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  105. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  106. };
  107. int block_right0[BLOCK_HEIGHT] = // whole block
  108. {
  109. packWord16(1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0),
  110. packWord16(1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0),
  111. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0),
  112. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0),
  113. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0),
  114. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0),
  115. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  116. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  117. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  118. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  119. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  120. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  121. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  122. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  123. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  124. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  125. };
  126. int block_right1[BLOCK_HEIGHT] = // 1-hit
  127. {
  128. packWord16(1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0),
  129. packWord16(1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0),
  130. packWord16(1,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0),
  131. packWord16(1,1,0,0,1,1,0,0,1,1,1,0,0,0,0,0),
  132. packWord16(1,1,1,1,1,0,0,1,1,1,1,0,0,1,0,0),
  133. packWord16(1,1,1,1,1,0,0,1,1,1,1,0,0,1,1,0),
  134. packWord16(0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0),
  135. packWord16(0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0),
  136. packWord16(0,0,1,1,1,0,0,1,1,1,1,0,0,0,0,1),
  137. packWord16(0,0,1,1,1,0,0,1,1,1,1,0,0,0,0,1),
  138. packWord16(1,1,1,0,0,1,1,1,1,0,0,1,1,1,0,0),
  139. packWord16(1,1,1,0,0,1,1,1,1,0,0,1,1,1,0,0),
  140. packWord16(0,0,1,1,1,0,0,1,1,1,1,0,0,1,1,1),
  141. packWord16(0,0,1,1,1,0,0,1,1,1,1,0,0,1,1,1),
  142. packWord16(1,1,1,0,0,1,1,0,0,1,1,1,0,0,0,0),
  143. packWord16(1,1,1,0,0,1,1,0,0,1,1,1,0,0,0,0),
  144. };
  145. int block_right2[BLOCK_HEIGHT] = // 2-hit
  146. {
  147. packWord16(1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0),
  148. packWord16(1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0),
  149. packWord16(0,0,0,0,1,1,0,0,1,1,1,0,0,0,0,0),
  150. packWord16(0,0,0,0,1,1,0,0,1,1,1,0,0,0,0,0),
  151. packWord16(1,1,0,0,0,0,0,1,1,0,0,0,0,1,0,0),
  152. packWord16(1,1,0,0,0,0,0,1,1,0,0,0,0,1,1,0),
  153. packWord16(0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0),
  154. packWord16(0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0),
  155. packWord16(0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1),
  156. packWord16(0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1),
  157. packWord16(1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0),
  158. packWord16(1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0),
  159. packWord16(0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,1),
  160. packWord16(0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,1),
  161. packWord16(0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0),
  162. packWord16(0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0),
  163. };
  164. int block_right3[BLOCK_HEIGHT] = // 3-hit
  165. {
  166. packWord16(0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
  167. packWord16(0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
  168. packWord16(0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0),
  169. packWord16(0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0),
  170. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0),
  171. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0),
  172. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0),
  173. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0),
  174. packWord16(0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0),
  175. packWord16(0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0),
  176. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  177. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  178. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
  179. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
  180. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  181. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  182. };
  183. int block_center_left0[BLOCK_HEIGHT] = // whole block
  184. {
  185. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  186. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0),
  187. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0),
  188. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0),
  189. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0),
  190. packWord16(1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0),
  191. packWord16(1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0),
  192. packWord16(1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0),
  193. packWord16(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0),
  194. packWord16(1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0),
  195. packWord16(1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0),
  196. packWord16(1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0),
  197. packWord16(1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0),
  198. packWord16(1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0),
  199. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  200. packWord16(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  201. };
  202. int block_center_left1[BLOCK_HEIGHT] = // 1-hit
  203. {
  204. packWord16(1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1),
  205. packWord16(1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,0),
  206. packWord16(1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0),
  207. packWord16(1,1,1,1,1,1,0,0,1,1,1,1,1,0,0,0),
  208. packWord16(1,1,1,0,0,1,1,1,1,1,1,1,0,0,0,0),
  209. packWord16(1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0),
  210. packWord16(0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0),
  211. packWord16(0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0),
  212. packWord16(1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0),
  213. packWord16(1,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0),
  214. packWord16(1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0),
  215. packWord16(1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0),
  216. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  217. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  218. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  219. packWord16(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  220. };
  221. int block_center_left2[BLOCK_HEIGHT] = // 2-hit
  222. {
  223. packWord16(1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,1),
  224. packWord16(1,1,0,0,1,1,1,0,0,1,1,0,0,1,1,0),
  225. packWord16(0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0),
  226. packWord16(0,0,1,1,1,1,0,0,1,1,0,0,1,0,0,0),
  227. packWord16(1,1,1,0,0,1,1,0,0,1,1,1,0,0,0,0),
  228. packWord16(1,1,1,0,0,1,1,0,0,1,1,0,0,0,0,0),
  229. packWord16(0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0),
  230. packWord16(0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0),
  231. packWord16(1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0),
  232. packWord16(1,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0),
  233. packWord16(1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0),
  234. packWord16(1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0),
  235. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  236. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  237. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  238. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  239. };
  240. int block_center_left3[BLOCK_HEIGHT] = // 3-hit
  241. {
  242. packWord16(0,0,0,0,1,1,1,0,0,1,1,0,0,0,0,0),
  243. packWord16(0,0,0,0,1,1,1,0,0,1,1,0,0,0,0,0),
  244. packWord16(0,0,1,0,0,1,0,0,0,0,0,0,1,1,0,0),
  245. packWord16(0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0),
  246. packWord16(1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0),
  247. packWord16(1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0),
  248. packWord16(0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0),
  249. packWord16(0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0),
  250. packWord16(1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0),
  251. packWord16(1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0),
  252. packWord16(0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0),
  253. packWord16(0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0),
  254. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  255. packWord16(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  256. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  257. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  258. };
  259. int block_center_right0[BLOCK_HEIGHT] = // whole block
  260. {
  261. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  262. packWord16(0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  263. packWord16(0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  264. packWord16(0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1),
  265. packWord16(0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1),
  266. packWord16(0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1),
  267. packWord16(0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1),
  268. packWord16(0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1),
  269. packWord16(0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1),
  270. packWord16(0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1),
  271. packWord16(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1),
  272. packWord16(0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1),
  273. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1),
  274. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1),
  275. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  276. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
  277. };
  278. int block_center_right1[BLOCK_HEIGHT] = // 1-hit
  279. {
  280. packWord16(0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1),
  281. packWord16(0,0,1,1,0,0,1,1,1,1,1,0,0,1,1,1),
  282. packWord16(0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1),
  283. packWord16(0,0,0,1,1,1,1,0,0,1,1,1,1,1,1,1),
  284. packWord16(0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0),
  285. packWord16(0,0,0,0,0,0,0,1,1,1,1,0,0,1,0,0),
  286. packWord16(0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1),
  287. packWord16(0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1),
  288. packWord16(0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0),
  289. packWord16(0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0),
  290. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1),
  291. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1),
  292. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  293. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  294. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  295. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
  296. };
  297. int block_center_right2[BLOCK_HEIGHT] = // 2-hit
  298. {
  299. packWord16(0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1),
  300. packWord16(0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1),
  301. packWord16(0,0,1,1,1,1,1,0,0,1,0,0,1,1,0,0),
  302. packWord16(0,0,0,1,1,1,1,0,0,1,0,0,1,1,0,0),
  303. packWord16(0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0),
  304. packWord16(0,0,0,0,0,0,0,1,1,1,1,0,0,1,0,0),
  305. packWord16(0,0,0,0,0,0,1,1,0,0,1,1,1,0,0,1),
  306. packWord16(0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1),
  307. packWord16(0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0),
  308. packWord16(0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0),
  309. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1),
  310. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1),
  311. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  312. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  313. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  314. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
  315. };
  316. int block_center_right3[BLOCK_HEIGHT] = // 3-hit
  317. {
  318. packWord16(0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,0),
  319. packWord16(0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,0),
  320. packWord16(0,0,0,0,1,1,1,0,0,0,0,0,1,1,0,0),
  321. packWord16(0,0,0,0,1,1,1,0,0,0,0,0,1,1,0,0),
  322. packWord16(0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0),
  323. packWord16(0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0),
  324. packWord16(0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1),
  325. packWord16(0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1),
  326. packWord16(0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0),
  327. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  328. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  329. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  330. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  331. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
  332. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1),
  333. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
  334. };
  335. int block_normal0[BLOCK_HEIGHT] = // whole block
  336. {
  337. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  338. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  339. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  340. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  341. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  342. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  343. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  344. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  345. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  346. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  347. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  348. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  349. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  350. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  351. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  352. packWord16(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
  353. };
  354. int block_normal1[BLOCK_HEIGHT] = // 1-hit
  355. {
  356. packWord16(1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,1),
  357. packWord16(1,0,0,1,1,1,1,0,0,1,1,1,1,1,1,1),
  358. packWord16(1,1,1,1,0,0,1,1,0,0,1,0,0,1,1,1),
  359. packWord16(1,1,1,1,0,0,1,1,0,0,1,0,0,1,1,1),
  360. packWord16(1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0),
  361. packWord16(1,1,0,0,1,1,0,0,1,1,1,1,1,1,0,0),
  362. packWord16(0,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1),
  363. packWord16(0,0,1,1,1,1,1,1,1,0,0,1,0,0,1,1),
  364. packWord16(1,1,1,0,0,1,1,0,0,1,1,1,1,1,0,0),
  365. packWord16(1,1,1,0,0,1,1,0,0,1,1,1,1,1,0,0),
  366. packWord16(0,1,1,1,1,1,1,1,1,0,0,1,0,0,1,1),
  367. packWord16(0,1,1,1,1,1,1,1,1,0,0,1,0,0,1,1),
  368. packWord16(1,0,0,1,1,1,0,0,1,1,1,0,0,1,1,1),
  369. packWord16(1,0,0,1,1,1,0,0,1,1,1,0,0,1,1,1),
  370. packWord16(1,1,1,0,0,1,1,1,0,0,1,1,1,1,0,0),
  371. packWord16(1,1,1,0,0,1,1,1,0,0,1,1,1,1,0,0),
  372. };
  373. int block_normal2[BLOCK_HEIGHT] = // 2-hit
  374. {
  375. packWord16(1,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1),
  376. packWord16(1,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1),
  377. packWord16(0,0,1,1,0,0,1,1,0,0,1,0,0,1,0,0),
  378. packWord16(0,0,1,1,0,0,1,1,0,0,1,0,0,1,0,0),
  379. packWord16(0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0),
  380. packWord16(0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0),
  381. packWord16(0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,1),
  382. packWord16(0,0,1,1,0,0,1,1,1,0,0,0,0,0,1,1),
  383. packWord16(0,0,1,0,0,1,1,0,0,0,0,1,1,1,0,0),
  384. packWord16(0,0,1,0,0,1,1,0,0,0,0,1,1,1,0,0),
  385. packWord16(0,1,1,1,1,0,0,1,1,0,0,0,0,0,1,1),
  386. packWord16(0,1,1,1,1,0,0,1,1,0,0,0,0,0,1,1),
  387. packWord16(1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0),
  388. packWord16(1,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0),
  389. packWord16(0,1,1,0,0,0,0,1,0,0,0,0,1,1,0,0),
  390. packWord16(0,1,1,0,0,0,0,1,0,0,0,0,1,1,0,0),
  391. };
  392. int block_normal3[BLOCK_HEIGHT] = // 3-hit
  393. {
  394. packWord16(1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1),
  395. packWord16(1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1),
  396. packWord16(0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0),
  397. packWord16(0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0),
  398. packWord16(0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0),
  399. packWord16(0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0),
  400. packWord16(0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1),
  401. packWord16(0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1),
  402. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0),
  403. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0),
  404. packWord16(0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1),
  405. packWord16(0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1),
  406. packWord16(0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0),
  407. packWord16(0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0),
  408. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0),
  409. packWord16(0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0),
  410. };
  411. void renderBunker(unsigned int*);
  412. void erodeBunker(unsigned int*, int which_bunker, int which_block);
  413. void blankBlock(unsigned int*, int which_bunker, int which_block, int block_row, int block_col);
  414. void updateBlock(unsigned int*, int which_bunker, int which_block, int block_row, int block_col, short* bunker);
  415. void selectBlock(unsigned int*, int bullet);
  416. #endif /* BUNKER_H_ */