![](/media/cache/profiles/fa1fc368935a59b748bec5e15aca97ea.jpg.50x50_q85.png)
This code contains the game Starship designed for the STM32F429i-DISC1 board. It requires a keyboard to play.
Dependencies: Starship LCD_DISCO_F429ZI USBHost mbed
Bullet.h
- Committer:
- Oshyrath
- Date:
- 2017-09-17
- Revision:
- 0:c9afe145b57b
- Child:
- 1:527a11035e0b
File content as of revision 0:c9afe145b57b:
#ifndef __BULLET_UNIT #define __BULLET_UNIT #include "Constants.h" #include <stdint.h> struct Bullet { struct Bullet * prev; struct Bullet * next; uint16_t x_pos; uint16_t y_pos; uint16_t x_vel; uint16_t y_vel; uint8_t powerShot; uint8_t isPlayerBullet; }; static struct Bullet * enemyBulletPTR; static struct Bullet * playerBulletPTR; static uint16_t enemyBulletCount; static uint16_t playerBulletCount; //Across the board void addEnemyBullet(uint16_t x_pos, uint16_t y_pos);//---------------------------------------------------MAIN CARES!!! void addPlayerBullet(uint16_t x_pos, uint16_t y_pos, uint16_t x_vel, uint16_t y_vel, uint8_t power); //--MAIN CARES!!! void removeBullet(struct Bullet * bullet); void clearBullets();//-----------------------------------------------------------------------------------MAIN CARES!!! //Specific to 1 Bullet void bulletMovement(struct Bullet * bullet); void bulletMovement_ALL(); void removeBulletIfOOB(struct Bullet * bullet); void removeBulletIfOOB_ALL(); //Call functions noramlly called in the loop without parameters. void callMultiFuncBullet();//------------------------------------------------------------MAIN CARES!!! #endif