forked from rh-hideout/pokeemerald-expansion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.berry.h
91 lines (83 loc) · 1.66 KB
/
global.berry.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef GUARD_GLOBAL_BERRY_H
#define GUARD_GLOBAL_BERRY_H
#define BERRY_NAME_LENGTH 6
#define BERRY_ITEM_EFFECT_COUNT 18
struct Berry
{
const u8 name[BERRY_NAME_LENGTH + 1];
u8 firmness:4;
u8 color:4;
u16 size:10;
u16 weedsBonus:3;
u16 pestsBonus:3;
u8 maxYield;
u8 minYield:4;
u8 waterBonus:4;
const u8 *description1;
const u8 *description2;
u8 growthDuration;
u8 spicy;
u8 dry;
u8 sweet;
u8 bitter;
u8 sour;
u8 smoothness;
u8 drainRate;
};
// with no const fields
struct Berry2
{
u8 name[BERRY_NAME_LENGTH + 1];
u8 firmness:4;
u8 color:4;
u16 size:10;
u16 weedsBonus:3;
u16 pestsBonus:3;
u8 maxYield;
u8 minYield:4;
u8 waterBonus:4;
u8 *description1;
u8 *description2;
u8 growthDuration;
u8 spicy;
u8 dry;
u8 sweet;
u8 bitter;
u8 sour;
u8 smoothness;
u8 drainRate;
};
struct EnigmaBerry
{
struct Berry2 berry;
u8 itemEffect[BERRY_ITEM_EFFECT_COUNT];
u8 holdEffect;
u8 holdEffectParam;
u32 checksum;
};
struct BattleEnigmaBerry
{
/*0x00*/ u8 name[BERRY_NAME_LENGTH + 1];
/*0x07*/ u8 holdEffect;
/*0x08*/ u8 itemEffect[BERRY_ITEM_EFFECT_COUNT];
/*0x1A*/ u8 holdEffectParam;
};
struct BerryTree
{
u8 berry:7;
u8 weeds:1;
u8 stage:3;
u8 mulch:4;
u8 stopGrowth:1;
u16 minutesUntilNextStage:14;
u16 mutationA:2;
u8 berryYield:5;
u8 pests:1;
u8 mutationB:2;
u8 regrowthCount:4;
u8 watered:4; // Used to keep track of bonuses in case of gradient watering
u16 moistureLevel:7;
u16 moistureClock:7;
u16 padding:2;
};
#endif // GUARD_GLOBAL_BERRY_H