diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2017-03-07 20:57:09 +0100 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2017-03-07 20:57:09 +0100 |
| commit | 8ec41b4410aba535008daf991ea59a8740951d44 (patch) | |
| tree | 01ee0846f579d9d139ee46a6a43f67ba522c7196 /Player.h | |
| download | pocketempires-8ec41b4410aba535008daf991ea59a8740951d44.tar.gz | |
+ Initial commit. Added source, sprites and final executable.
Diffstat (limited to 'Player.h')
| -rw-r--r-- | Player.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Player.h b/Player.h new file mode 100644 index 0000000..68a2353 --- /dev/null +++ b/Player.h @@ -0,0 +1,59 @@ +#ifndef __PLAYER_HEADER__ +#define __PLAYER_HEADER__ + +/* ************************************** + * Includes * + * **************************************/ + +#include "Global_Inc.h" +#include "GameStructures.h" +#include "Camera.h" +#include "Building.h" + +/* ************************************** + * Defines * + * **************************************/ + +#define PLAYER_NAME_LENGTH 16 +#define PLAYER_MAX_UNITS 32 +#define PLAYER_MAX_BUILDINGS 32 + +/* ************************************** + * Structs and enums * + * **************************************/ + +/* ************************************** + * Class definition * + * **************************************/ + +class Player +{ + public: + Player(); + ~Player(); + void Init(void); + void Handler(void); + void DrawHandler(void); + char * getName(void) {return name;} + void setHuman(bool value) { human = value; } + bool isHuman(void) {return human;} + bool createUnit(uint8_t id); + bool createBuilding(uint8_t id, TYPE_COLLISION_BLOCK cb); + uint8_t getPopulation(void) {return (unit_i + 1);} + uint8_t getBuildings(void) {return (bldg_i + 1);} + + private: + bool checkNewBuildingPosition(TYPE_COLLISION_BLOCK * cb); + char name[PLAYER_NAME_LENGTH]; + uint8_t units[PLAYER_MAX_UNITS]; + TYPE_BUILDING buildings[PLAYER_MAX_BUILDINGS]; + uint8_t id; + uint8_t unit_i; + uint8_t bldg_i; + bool human; + TYPE_CAMERA Camera; + TYPE_RESOURCES Resources; + //Print _serial; +}; + +#endif //PLAYER_HEADER__ |
