Pokebot
Pokemon FireRed bot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Player.hh
Go to the documentation of this file.
1 #ifndef __PLAYER_HH__
2 #define __PLAYER_HH__
3 
4 #include "../vbam/gba/Globals.h"
5 #include "PokemonUtils.hh"
6 
7 class Player
8 {
9 private:
10  struct MapLoc
11  {
12  uint16_t x;
13  uint16_t y;
14  uint8_t bank;
15  uint8_t map;
16  };
17 
18  struct Internal
19  {
20  uint8_t name[8];
21  uint8_t gender;
22  uint8_t unknown;
23  uint16_t trainerID;
24  };
25 
26 public:
27  Player() {}
28  ~Player() {}
29 
30 public:
31  void update();
32 
33 public:
34  const char *getName() const { return (_name); }
35  uint8_t getGender() const { return (_data->gender); }
36  uint16_t getTrainerID() const { return (_data->trainerID); }
37  uint16_t getX() const { return (_loc->x); }
38  uint16_t getY() const { return (_loc->y); }
39  uint8_t getBank() const { return (_loc->bank); }
40  uint8_t getMap() const { return (_loc->map); }
41  bool isValid() const { return (_valid); }
42 
43 private:
44  Internal *_data;
45  MapLoc *_loc;
46  char _name[9];
47  bool _valid;
48 };
49 
50 #endif
uint16_t getY() const
Definition: Player.hh:38
uint8_t getGender() const
Definition: Player.hh:35
uint8_t getBank() const
Definition: Player.hh:39
const char * getName() const
Definition: Player.hh:34
bool isValid() const
Definition: Player.hh:41
~Player()
Definition: Player.hh:28
uint16_t getTrainerID() const
Definition: Player.hh:36
void update()
Definition: Player.cpp:4
uint8_t getMap() const
Definition: Player.hh:40
Definition: Player.hh:7
Player()
Definition: Player.hh:27
uint16_t getX() const
Definition: Player.hh:37