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.

bullet.h 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #ifndef BULLET_H_
  2. #define BULLET_H_
  3. #define BLOCK_HEIGHT 10
  4. #define BLOCK_WIDTH 6
  5. #define packWord24(b5,b4,b3,b2,b1,b0) \
  6. ((b5 << 5 ) | (b4 << 4 ) | (b3 << 3 ) | (b2 << 2 ) | (b1 << 1 ) | (b0 << 0 ))
  7. int alienBullet1_1[BLOCK_HEIGHT] =
  8. {
  9. packWord24(0,0,0,0,0,0),
  10. packWord24(0,0,1,1,0,0),
  11. packWord24(0,0,1,1,0,0),
  12. packWord24(0,0,1,1,0,0),
  13. packWord24(0,0,1,1,0,0),
  14. packWord24(0,0,1,1,0,0),
  15. packWord24(1,1,1,1,1,1),
  16. packWord24(1,1,1,1,1,1),
  17. packWord24(0,0,1,1,0,0),
  18. packWord24(0,0,0,0,0,0),
  19. };
  20. int alienBullet1_2[BLOCK_HEIGHT] =
  21. {
  22. packWord24(0,0,0,0,0,0),
  23. packWord24(0,0,1,1,0,0),
  24. packWord24(1,1,1,1,1,1),
  25. packWord24(1,1,1,1,1,1),
  26. packWord24(0,0,1,1,0,0),
  27. packWord24(0,0,1,1,0,0),
  28. packWord24(0,0,1,1,0,0),
  29. packWord24(0,0,1,1,0,0),
  30. packWord24(0,0,1,1,0,0),
  31. packWord24(0,0,0,0,0,0),
  32. };
  33. int alienBullet2_1[BLOCK_HEIGHT] =
  34. {
  35. packWord24(0,0,0,0,0,0),
  36. packWord24(0,0,0,0,1,1),
  37. packWord24(0,0,0,1,1,0),
  38. packWord24(0,0,1,1,0,0),
  39. packWord24(0,1,1,0,0,0),
  40. packWord24(0,1,1,0,0,0),
  41. packWord24(0,0,1,1,0,0),
  42. packWord24(0,0,0,1,1,0),
  43. packWord24(0,0,0,0,1,1),
  44. packWord24(0,0,0,0,0,0),
  45. };
  46. int alienBullet2_2[BLOCK_HEIGHT] =
  47. {
  48. packWord24(0,0,0,0,0,0),
  49. packWord24(0,0,1,1,0,0),
  50. packWord24(0,0,0,1,1,0),
  51. packWord24(0,0,1,1,0,0),
  52. packWord24(0,0,0,1,1,0),
  53. packWord24(0,0,0,0,1,1),
  54. packWord24(0,0,0,1,1,0),
  55. packWord24(0,0,1,1,0,0),
  56. packWord24(0,1,1,0,0,0),
  57. packWord24(0,0,0,0,0,0),
  58. };
  59. int alienBullet3_1[BLOCK_HEIGHT] =
  60. {
  61. packWord24(0,0,0,0,0,0),
  62. packWord24(1,1,0,0,0,0),
  63. packWord24(0,1,1,0,0,0),
  64. packWord24(0,0,1,1,0,0),
  65. packWord24(0,0,0,1,1,0),
  66. packWord24(0,0,0,1,1,0),
  67. packWord24(0,0,1,1,0,0),
  68. packWord24(0,1,1,0,0,0),
  69. packWord24(1,1,0,0,0,0),
  70. packWord24(0,0,0,0,0,0),
  71. };
  72. int alienBullet3_2[BLOCK_HEIGHT] =
  73. {
  74. packWord24(0,0,0,0,0,0),
  75. packWord24(1,1,0,0,0,0),
  76. packWord24(0,1,1,0,0,0),
  77. packWord24(0,0,1,1,0,0),
  78. packWord24(0,1,1,0,0,0),
  79. packWord24(1,1,0,0,0,0),
  80. packWord24(0,1,1,0,0,0),
  81. packWord24(0,0,1,1,0,0),
  82. packWord24(0,0,0,1,1,0),
  83. packWord24(0,0,0,0,0,0),
  84. };
  85. int tankBullet[BLOCK_HEIGHT] =
  86. {
  87. packWord24(0,0,0,0,0,0),
  88. packWord24(0,0,1,1,0,0),
  89. packWord24(0,0,1,1,0,0),
  90. packWord24(0,0,1,1,0,0),
  91. packWord24(0,0,1,1,0,0),
  92. packWord24(0,0,1,1,0,0),
  93. packWord24(0,0,1,1,0,0),
  94. packWord24(0,0,1,1,0,0),
  95. packWord24(0,0,1,1,0,0),
  96. packWord24(0,0,0,0,0,0),
  97. };
  98. void renderBullet(unsigned int*);
  99. void moveBullets(unsigned int*);
  100. #endif /* BULLET_H_ */