-
Notifications
You must be signed in to change notification settings - Fork 0
/
pokemon.h
48 lines (38 loc) · 874 Bytes
/
pokemon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef POKEMON_H_
#define POKEMON_H_
typedef enum {
NOT_CONNECTED,
CONNECTED,
TRADE_CENTRE,
COLOSSEUM
} connection_state_t;
typedef enum {
INIT,
READY_TO_GO,
SEEN_FIRST_WAIT,
SENDING_RANDOM_DATA,
WAITING_TO_SEND_DATA,
SENDING_DATA,
SENDING_PATCH_DATA,
TRADE_PENDING,
TRADE_CONFIRMATION,
DONE
} trade_centre_state_t;
typedef unsigned char byte;
#define PKMN_BLANK 0x00
#define ITEM_1_HIGHLIGHTED 0xD0
#define ITEM_2_HIGHLIGHTED 0xD1
#define ITEM_3_HIGHLIGHTED 0xD2
#define ITEM_1_SELECTED 0xD4
#define ITEM_2_SELECTED 0xD5
#define ITEM_3_SELECTED 0xD6
#define PKMN_MASTER 0x01
#define PKMN_SLAVE 0x02
#define PKMN_CONNECTED 0x60
#define PKMN_WAIT 0x7F
#define PKMN_ACTION 0x60
#define PKMN_TRADE_CENTRE ITEM_1_SELECTED
#define PKMN_COLOSSEUM ITEM_2_SELECTED
#define PKMN_BREAK_LINK ITEM_3_SELECTED
#define TRADE_CENTRE_WAIT 0xFD
#endif