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.
 
 
 
 
 
 

109 lines
2.5 KiB

#ifndef BULLET_H_
#define BULLET_H_
#define BLOCK_HEIGHT 10
#define BLOCK_WIDTH 6
#define packWord24(b5,b4,b3,b2,b1,b0) \
((b5 << 5 ) | (b4 << 4 ) | (b3 << 3 ) | (b2 << 2 ) | (b1 << 1 ) | (b0 << 0 ))
int alienBullet1_1[BLOCK_HEIGHT] =
{
packWord24(0,0,0,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(1,1,1,1,1,1),
packWord24(1,1,1,1,1,1),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,0,0,0),
};
int alienBullet1_2[BLOCK_HEIGHT] =
{
packWord24(0,0,0,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(1,1,1,1,1,1),
packWord24(1,1,1,1,1,1),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,0,0,0),
};
int alienBullet2_1[BLOCK_HEIGHT] =
{
packWord24(0,0,0,0,0,0),
packWord24(0,0,0,0,1,1),
packWord24(0,0,0,1,1,0),
packWord24(0,0,1,1,0,0),
packWord24(0,1,1,0,0,0),
packWord24(0,1,1,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,1,1,0),
packWord24(0,0,0,0,1,1),
packWord24(0,0,0,0,0,0),
};
int alienBullet2_2[BLOCK_HEIGHT] =
{
packWord24(0,0,0,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,1,1,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,1,1,0),
packWord24(0,0,0,0,1,1),
packWord24(0,0,0,1,1,0),
packWord24(0,0,1,1,0,0),
packWord24(0,1,1,0,0,0),
packWord24(0,0,0,0,0,0),
};
int alienBullet3_1[BLOCK_HEIGHT] =
{
packWord24(0,0,0,0,0,0),
packWord24(1,1,0,0,0,0),
packWord24(0,1,1,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,1,1,0),
packWord24(0,0,0,1,1,0),
packWord24(0,0,1,1,0,0),
packWord24(0,1,1,0,0,0),
packWord24(1,1,0,0,0,0),
packWord24(0,0,0,0,0,0),
};
int alienBullet3_2[BLOCK_HEIGHT] =
{
packWord24(0,0,0,0,0,0),
packWord24(1,1,0,0,0,0),
packWord24(0,1,1,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,1,1,0,0,0),
packWord24(1,1,0,0,0,0),
packWord24(0,1,1,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,1,1,0),
packWord24(0,0,0,0,0,0),
};
int tankBullet[BLOCK_HEIGHT] =
{
packWord24(0,0,0,0,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,1,1,0,0),
packWord24(0,0,0,0,0,0),
};
void renderBullet(unsigned int*);
void moveBullets(unsigned int*);
#endif /* BULLET_H_ */