Pokebot
Pokemon FireRed bot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
OverWorld.hh
Go to the documentation of this file.
1 #ifndef __OVERWORLD_HH__
2 #define __OVERWORLD_HH__
3 
4 #include "PokemonUtils.hh"
5 
6 class OverWorld
7 {
8 public:
9  OverWorld() {}
10 
11 public:
12  uint16_t getDestX() const { return (_destX - 7); } // -7 to sync it with world and camera
13  uint16_t getDestY() const { return (_destY - 7); }
14  uint16_t getCurrX() const { return (_currX - 7); }
15  uint16_t getCurrY() const { return (_currY - 7); }
16  uint16_t getX() const { return (_currX - 7); }
17  uint16_t getY() const { return (_currY - 7); }
18  uint16_t getDir() const { return (_dir); }
19  uint8_t getFlags() const { return (_flags); }
20  uint8_t getEventNb() const { return (_evtNb); }
21  uint8_t getMap() const { return (_map); }
22  uint8_t getBank() const { return (_bank); }
23  uint16_t getSpawnX() const { return (_spawnX); }
24  uint16_t getSpawnY() const { return (_spawnY); }
25 
26 private:
27  uint8_t _temp; // Temporary variable ?
28  uint8_t _flags; // 0x01 = locked (in menu or talking)
29  // 0x10 = immovable (pokeball in Oak's lab, cuttable tree, etc.)
30  // 0x40 = off-screen
31  uint16_t _unknown;
32 
33  uint8_t _unknown2;
34  uint8_t _pictureNb;
35  uint16_t _mvtType;
36 
37  uint8_t _evtNb;
38  uint8_t _map; // Updated by warps for the player
39  uint8_t _bank; // Updated by warps for the player
40  uint8_t _jump; // Unknown. Set to 0x30 when jumping, 0x33 otherwise
41 
42  uint16_t _spawnX;
43  uint16_t _spawnY;
44 
45  uint16_t _destX;
46  uint16_t _destY;
47  uint16_t _currX;
48  uint16_t _currY;
49  uint16_t _dir2; // _dir * 11
50  uint16_t _unknown5;
51  uint32_t _anim; // current OW animation ?
52  uint16_t _dir; // 1 = down, 2 = up, 3 = left, 4 = right
53  uint16_t _unknown6;
54 };
55 
56 #endif
uint16_t getY() const
Definition: OverWorld.hh:17
uint16_t getDir() const
Definition: OverWorld.hh:18
uint16_t getDestX() const
Definition: OverWorld.hh:12
uint16_t getSpawnY() const
Definition: OverWorld.hh:24
uint8_t getBank() const
Definition: OverWorld.hh:22
uint8_t getEventNb() const
Definition: OverWorld.hh:20
uint16_t getX() const
Definition: OverWorld.hh:16
uint8_t getFlags() const
Definition: OverWorld.hh:19
OverWorld()
Definition: OverWorld.hh:9
uint16_t getDestY() const
Definition: OverWorld.hh:13
uint8_t getMap() const
Definition: OverWorld.hh:21
uint16_t getCurrX() const
Definition: OverWorld.hh:14
uint16_t getSpawnX() const
Definition: OverWorld.hh:23
uint16_t getCurrY() const
Definition: OverWorld.hh:15
Definition: OverWorld.hh:6