![](/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
Player.h
- Committer:
- Oshyrath
- Date:
- 2017-11-17
- Revision:
- 1:527a11035e0b
- Parent:
- 0:c9afe145b57b
File content as of revision 1:527a11035e0b:
#ifndef __PLAYER #define __PLAYER #include "Constants.h" #include "stdint.h" struct Player { int16_t x_pos; int16_t y_pos; int16_t health; int16_t rapidFireTimer; int16_t RFT_Timer; int16_t powerShotTimer; int16_t wideShotTimer; int16_t shieldTimer; int16_t gunTimer; }; extern struct Player player; //User interface functions. void resetPlayer(); int16_t getPlayerBulletPos(int8_t XorY); int8_t dealDamageToPlayer(); //int8_t callMultiFuncPlayer(int8_t x_dir, int8_t y_dir, int8_t didUserRequestFire); void callMultiFuncPlayer(); void movePlayer(int8_t x_dir, int8_t y_dir); int8_t shouldFire(int8_t didUserRequestFire); //Functions user does not need to worry about. void updatePlayerTimers(); #endif