Pokebot
Pokemon FireRed bot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
MoveTo.hh
Go to the documentation of this file.
1 #ifndef __ACTION_MOVETO_HH__
2 #define __ACTION_MOVETO_HH__
3 
4 #include <cstring>
5 #include "Data.hh"
6 #include "AAction.hh"
7 #include "PathFinder.hh"
8 #include "PokemonUtils.hh"
9 #include "../vbam/gba/Globals.h"
10 #include "../vbam/sdl/SDLGlobals.h"
11 
12 namespace Action
13 {
14  class MoveTo : public AAction
15  {
16  public:
17  MoveTo(uint16_t x, uint16_t y, bool allowApprox = false);
18  MoveTo(uint8_t tid);
19  ~MoveTo();
20 
21  private:
22  void _init();
23  void _update();
24 
25  public:
26  void addListener(const std::string &signal, void (Action::MoveTo::*listener)());
27  World::Path *getPath() const { return (_path); }
28 
29  private:
30  void _releaseKeys();
31  void _checkNPCMovement();
32  void _updateTargetPos();
33  void _searchBehindBar();
34 
35  private:
36  OverWorld _oldow[16];
37  bool _owInit;
38  bool _approx;
39  uint16_t _tx;
40  uint16_t _ty;
41  int _tid;
42  uint16_t _oldx;
43  uint16_t _oldy;
44  World::Path *_path;
45  uint8_t _pathi;
46  };
47 };
48 
49 #endif
Definition: MoveTo.hh:14
World::Path * getPath() const
Definition: MoveTo.hh:27
Definition: AAction.hh:12
~MoveTo()
Definition: MoveTo.cpp:26
std::vector< Map::Node * > Path
Definition: World.hh:223
Definition: AAction.hh:24
MoveTo(uint16_t x, uint16_t y, bool allowApprox=false)
Definition: MoveTo.cpp:9
Definition: OverWorld.hh:6
void addListener(const std::string &signal, void(Action::MoveTo::*listener)())
Definition: MoveTo.cpp:30