Pokebot
Pokemon FireRed bot
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
include
BattleMenu.hh
Go to the documentation of this file.
1
#ifndef __BATTLEMENU_HH__
2
#define __BATTLEMENU_HH__
3
4
#include "
PokemonUtils.hh
"
5
6
class
BattleMenu
7
{
8
private
:
9
struct
Internal
10
{
11
uint8_t submenu;
12
uint8_t state;
13
uint16_t unknown;
14
uint8_t battle;
15
};
16
17
public
:
18
BattleMenu
()
19
: _data((Internal *)
gbaMem
(0x02023e82)),
20
_attack((uint32_t *)
gbaMem
(0x02023FFC)),
21
_cursor((uint32_t *)
gbaMem
(0x02023FF8)),
22
_open((uint8_t *)
gbaMem
(0x02020014))
23
{}
24
25
public
:
26
uint16_t
isOpen
()
const
{
return
(*_open == 1 || *_open == 8); }
27
uint16_t
getMenu
()
const
{
return
(_data->submenu == 1 ? 0 : (*_cursor) + 1); }
28
uint32_t
getAttack
()
const
{
return
(*_attack); }
29
uint32_t
getCursor
()
const
{
return
(*_cursor); }
30
31
private
:
32
Internal *_data;
33
uint32_t *_attack;
34
uint32_t *_cursor;
35
uint8_t *_open;
36
};
37
38
#endif
PokemonUtils.hh
BattleMenu::getAttack
uint32_t getAttack() const
Definition:
BattleMenu.hh:28
BattleMenu::isOpen
uint16_t isOpen() const
Definition:
BattleMenu.hh:26
BattleMenu::getMenu
uint16_t getMenu() const
Definition:
BattleMenu.hh:27
gbaMem
void * gbaMem(uint32_t ptr)
Definition:
PokemonUtils.cpp:57
BattleMenu::getCursor
uint32_t getCursor() const
Definition:
BattleMenu.hh:29
BattleMenu
Definition:
BattleMenu.hh:6
BattleMenu::BattleMenu
BattleMenu()
Definition:
BattleMenu.hh:18
Generated on Fri Nov 21 2014 12:06:55 for Pokebot by
1.8.8