summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/constants/abilities.h129
-rw-r--r--include/move_data.h6
-rw-r--r--include/pokemon.h123
-rw-r--r--include/proto.h13
-rw-r--r--include/string_util.h3
-rw-r--r--include/text.h6
6 files changed, 259 insertions, 21 deletions
diff --git a/include/constants/abilities.h b/include/constants/abilities.h
new file mode 100644
index 00000000..f107e623
--- /dev/null
+++ b/include/constants/abilities.h
@@ -0,0 +1,129 @@
+#ifndef POKEDIAMOND_CONSTANTS_ABILITIES_H
+#define POKEDIAMOND_CONSTANTS_ABILITIES_H
+
+#define ABILITY_NONE 0
+#define ABILITY_STENCH 1
+#define ABILITY_DRIZZLE 2
+#define ABILITY_SPEED_BOOST 3
+#define ABILITY_BATTLE_ARMOR 4
+#define ABILITY_STURDY 5
+#define ABILITY_DAMP 6
+#define ABILITY_LIMBER 7
+#define ABILITY_SAND_VEIL 8
+#define ABILITY_STATIC 9
+#define ABILITY_VOLT_ABSORB 10
+#define ABILITY_WATER_ABSORB 11
+#define ABILITY_OBLIVIOUS 12
+#define ABILITY_CLOUD_NINE 13
+#define ABILITY_COMPOUND_EYES 14
+#define ABILITY_INSOMNIA 15
+#define ABILITY_COLOR_CHANGE 16
+#define ABILITY_IMMUNITY 17
+#define ABILITY_FLASH_FIRE 18
+#define ABILITY_SHIELD_DUST 19
+#define ABILITY_OWN_TEMPO 20
+#define ABILITY_SUCTION_CUPS 21
+#define ABILITY_INTIMIDATE 22
+#define ABILITY_SHADOW_TAG 23
+#define ABILITY_ROUGH_SKIN 24
+#define ABILITY_WONDER_GUARD 25
+#define ABILITY_LEVITATE 26
+#define ABILITY_EFFECT_SPORE 27
+#define ABILITY_SYNCHRONIZE 28
+#define ABILITY_CLEAR_BODY 29
+#define ABILITY_NATURAL_CURE 30
+#define ABILITY_LIGHTNING_ROD 31
+#define ABILITY_SERENE_GRACE 32
+#define ABILITY_SWIFT_SWIM 33
+#define ABILITY_CHLOROPHYLL 34
+#define ABILITY_ILLUMINATE 35
+#define ABILITY_TRACE 36
+#define ABILITY_HUGE_POWER 37
+#define ABILITY_POISON_POINT 38
+#define ABILITY_INNER_FOCUS 39
+#define ABILITY_MAGMA_ARMOR 40
+#define ABILITY_WATER_VEIL 41
+#define ABILITY_MAGNET_PULL 42
+#define ABILITY_SOUNDPROOF 43
+#define ABILITY_RAIN_DISH 44
+#define ABILITY_SAND_STREAM 45
+#define ABILITY_PRESSURE 46
+#define ABILITY_THICK_FAT 47
+#define ABILITY_EARLY_BIRD 48
+#define ABILITY_FLAME_BODY 49
+#define ABILITY_RUN_AWAY 50
+#define ABILITY_KEEN_EYE 51
+#define ABILITY_HYPER_CUTTER 52
+#define ABILITY_PICKUP 53
+#define ABILITY_TRUANT 54
+#define ABILITY_HUSTLE 55
+#define ABILITY_CUTE_CHARM 56
+#define ABILITY_PLUS 57
+#define ABILITY_MINUS 58
+#define ABILITY_FORECAST 59
+#define ABILITY_STICKY_HOLD 60
+#define ABILITY_SHED_SKIN 61
+#define ABILITY_GUTS 62
+#define ABILITY_MARVEL_SCALE 63
+#define ABILITY_LIQUID_OOZE 64
+#define ABILITY_OVERGROW 65
+#define ABILITY_BLAZE 66
+#define ABILITY_TORRENT 67
+#define ABILITY_SWARM 68
+#define ABILITY_ROCK_HEAD 69
+#define ABILITY_DROUGHT 70
+#define ABILITY_ARENA_TRAP 71
+#define ABILITY_VITAL_SPIRIT 72
+#define ABILITY_WHITE_SMOKE 73
+#define ABILITY_PURE_POWER 74
+#define ABILITY_SHELL_ARMOR 75
+#define ABILITY_AIR_LOCK 76
+#define ABILITY_TANGLED_FEET 77
+#define ABILITY_MOTOR_DRIVE 78
+#define ABILITY_RIVALRY 79
+#define ABILITY_STEADFAST 80
+#define ABILITY_SNOW_CLOAK 81
+#define ABILITY_GLUTTONY 82
+#define ABILITY_ANGER_POINT 83
+#define ABILITY_UNBURDEN 84
+#define ABILITY_HEATPROOF 85
+#define ABILITY_SIMPLE 86
+#define ABILITY_DRY_SKIN 87
+#define ABILITY_DOWNLOAD 88
+#define ABILITY_IRON_FIST 89
+#define ABILITY_POISON_HEAL 90
+#define ABILITY_ADAPTABILITY 91
+#define ABILITY_SKILL_LINK 92
+#define ABILITY_HYDRATION 93
+#define ABILITY_SOLAR_POWER 94
+#define ABILITY_QUICK_FEET 95
+#define ABILITY_NORMALIZE 96
+#define ABILITY_SNIPER 97
+#define ABILITY_MAGIC_GUARD 98
+#define ABILITY_NO_GUARD 99
+#define ABILITY_STALL 100
+#define ABILITY_TECHNICIAN 101
+#define ABILITY_LEAF_GUARD 102
+#define ABILITY_KLUTZ 103
+#define ABILITY_MOLD_BREAKER 104
+#define ABILITY_SUPER_LUCK 105
+#define ABILITY_AFTERMATH 106
+#define ABILITY_ANTICIPATION 107
+#define ABILITY_FOREWARN 108
+#define ABILITY_UNAWARE 109
+#define ABILITY_TINTED_LENS 110
+#define ABILITY_FILTER 111
+#define ABILITY_SLOW_START 112
+#define ABILITY_SCRAPPY 113
+#define ABILITY_STORM_DRAIN 114
+#define ABILITY_ICE_BODY 115
+#define ABILITY_SOLID_ROCK 116
+#define ABILITY_SNOW_WARNING 117
+#define ABILITY_HONEY_GATHER 118
+#define ABILITY_FRISK 119
+#define ABILITY_RECKLESS 120
+#define ABILITY_MULTITYPE 121
+#define ABILITY_FLOWER_GIFT 122
+#define ABILITY_BAD_DREAMS 123
+
+#endif //POKEDIAMOND_CONSTANTS_ABILITIES_H
diff --git a/include/move_data.h b/include/move_data.h
new file mode 100644
index 00000000..d4e3c128
--- /dev/null
+++ b/include/move_data.h
@@ -0,0 +1,6 @@
+#ifndef POKEDIAMOND_MOVE_DATA_H
+#define POKEDIAMOND_MOVE_DATA_H
+
+u32 FUN_0206AB30(u16 move, u8 ppUp);
+
+#endif //POKEDIAMOND_MOVE_DATA_H
diff --git a/include/pokemon.h b/include/pokemon.h
index e2a32e83..7cc5ef5d 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -9,9 +9,9 @@
#include "seals.h"
#define MON_DATA_PERSONALITY 0
-#define MON_DATA_IS_ENCRYPTED 1
-#define MON_DATA_CONTROL_4_1 2
-#define MON_DATA_CONTROL_4_2 3
+#define MON_DATA_PARTY_LOCK 1
+#define MON_DATA_BOX_LOCK 2
+#define MON_DATA_CHECKSUM_FAILED 3
#define MON_DATA_CHECKSUM 4
#define MON_DATA_SPECIES 5
#define MON_DATA_HELD_ITEM 6
@@ -34,7 +34,34 @@
#define MON_DATA_TOUGH 23
#define MON_DATA_SHEEN 24
#define MON_DATA_SINNOH_CHAMP_RIBBON 25
-// TODO: ribbon flags through 53
+#define MON_DATA_SINNOH_RIBBON_26 26
+#define MON_DATA_SINNOH_RIBBON_27 27
+#define MON_DATA_SINNOH_RIBBON_28 28
+#define MON_DATA_SINNOH_RIBBON_29 29
+#define MON_DATA_SINNOH_RIBBON_30 30
+#define MON_DATA_SINNOH_RIBBON_31 31
+#define MON_DATA_SINNOH_RIBBON_32 32
+#define MON_DATA_SINNOH_RIBBON_33 33
+#define MON_DATA_SINNOH_RIBBON_34 34
+#define MON_DATA_SINNOH_RIBBON_35 35
+#define MON_DATA_SINNOH_RIBBON_36 36
+#define MON_DATA_SINNOH_RIBBON_37 37
+#define MON_DATA_SINNOH_RIBBON_38 38
+#define MON_DATA_SINNOH_RIBBON_39 39
+#define MON_DATA_SINNOH_RIBBON_40 40
+#define MON_DATA_SINNOH_RIBBON_41 41
+#define MON_DATA_SINNOH_RIBBON_42 42
+#define MON_DATA_SINNOH_RIBBON_43 43
+#define MON_DATA_SINNOH_RIBBON_44 44
+#define MON_DATA_SINNOH_RIBBON_45 45
+#define MON_DATA_SINNOH_RIBBON_46 46
+#define MON_DATA_SINNOH_RIBBON_47 47
+#define MON_DATA_SINNOH_RIBBON_48 48
+#define MON_DATA_SINNOH_RIBBON_49 49
+#define MON_DATA_SINNOH_RIBBON_50 50
+#define MON_DATA_SINNOH_RIBBON_51 51
+#define MON_DATA_SINNOH_RIBBON_52 52
+#define MON_DATA_SINNOH_RIBBON_53 53
#define MON_DATA_MOVE1 54
#define MON_DATA_MOVE2 55
#define MON_DATA_MOVE3 56
@@ -60,7 +87,37 @@
#define MON_DATA_IS_EGG 76
#define MON_DATA_HAS_NICKNAME 77
#define MON_DATA_COOL_RIBBON 78
-// TODO: ribbon flags through 109
+#define MON_DATA_HOENN_RIBBON_79 79
+#define MON_DATA_HOENN_RIBBON_80 80
+#define MON_DATA_HOENN_RIBBON_81 81
+#define MON_DATA_HOENN_RIBBON_82 82
+#define MON_DATA_HOENN_RIBBON_83 83
+#define MON_DATA_HOENN_RIBBON_84 84
+#define MON_DATA_HOENN_RIBBON_85 85
+#define MON_DATA_HOENN_RIBBON_86 86
+#define MON_DATA_HOENN_RIBBON_87 87
+#define MON_DATA_HOENN_RIBBON_88 88
+#define MON_DATA_HOENN_RIBBON_89 89
+#define MON_DATA_HOENN_RIBBON_90 90
+#define MON_DATA_HOENN_RIBBON_91 91
+#define MON_DATA_HOENN_RIBBON_92 92
+#define MON_DATA_HOENN_RIBBON_93 93
+#define MON_DATA_HOENN_RIBBON_94 94
+#define MON_DATA_HOENN_RIBBON_95 95
+#define MON_DATA_HOENN_RIBBON_96 96
+#define MON_DATA_HOENN_RIBBON_97 97
+#define MON_DATA_HOENN_RIBBON_98 98
+#define MON_DATA_HOENN_RIBBON_99 99
+#define MON_DATA_HOENN_RIBBON_100 100
+#define MON_DATA_HOENN_RIBBON_101 101
+#define MON_DATA_HOENN_RIBBON_102 102
+#define MON_DATA_HOENN_RIBBON_103 103
+#define MON_DATA_HOENN_RIBBON_104 104
+#define MON_DATA_HOENN_RIBBON_105 105
+#define MON_DATA_HOENN_RIBBON_106 106
+#define MON_DATA_HOENN_RIBBON_107 107
+#define MON_DATA_HOENN_RIBBON_108 108
+#define MON_DATA_HOENN_RIBBON_109 109
#define MON_DATA_FATEFUL_ENCOUNTER 110
#define MON_DATA_GENDER 111
#define MON_DATA_FORME 112
@@ -73,7 +130,27 @@
#define MON_DATA_NICKNAME_3 119 // ???
#define MON_DATA_UNK_120 120
#define MON_DATA_GAME_VERSION 121
-// TODO: ribbon flags 122-142
+#define MON_DATA_SINNOH_RIBBON_122 122
+#define MON_DATA_SINNOH_RIBBON_123 123
+#define MON_DATA_SINNOH_RIBBON_124 124
+#define MON_DATA_SINNOH_RIBBON_125 125
+#define MON_DATA_SINNOH_RIBBON_126 126
+#define MON_DATA_SINNOH_RIBBON_127 127
+#define MON_DATA_SINNOH_RIBBON_128 128
+#define MON_DATA_SINNOH_RIBBON_129 129
+#define MON_DATA_SINNOH_RIBBON_130 130
+#define MON_DATA_SINNOH_RIBBON_131 131
+#define MON_DATA_SINNOH_RIBBON_132 132
+#define MON_DATA_SINNOH_RIBBON_133 133
+#define MON_DATA_SINNOH_RIBBON_134 134
+#define MON_DATA_SINNOH_RIBBON_135 135
+#define MON_DATA_SINNOH_RIBBON_136 136
+#define MON_DATA_SINNOH_RIBBON_137 137
+#define MON_DATA_SINNOH_RIBBON_138 138
+#define MON_DATA_SINNOH_RIBBON_139 139
+#define MON_DATA_SINNOH_RIBBON_140 140
+#define MON_DATA_SINNOH_RIBBON_141 141
+#define MON_DATA_SINNOH_RIBBON_142 142
#define MON_DATA_OT_NAME 143
#define MON_DATA_OT_NAME_2 144 // ???
#define MON_DATA_EGG_MET_YEAR 145
@@ -103,10 +180,10 @@
#define MON_DATA_SEAL_STRUCT 169
#define MON_DATA_SEAL_COORDS 170
#define MON_DATA_SPECIES_EXISTS 171
-#define MON_DATA_SANITY_CHECK_172 172
+#define MON_DATA_SANITY_IS_EGG 172
#define MON_DATA_SPECIES2 173
#define MON_DATA_IVS_WORD 174
-#define MON_DATA_IS_FEMALE 175
+#define MON_DATA_UNK_175 175
#define MON_DATA_TYPE_1 176
#define MON_DATA_TYPE_2 177
#define MON_DATA_SPECIES_NAME 178
@@ -115,6 +192,9 @@
#define MON_RATIO_FEMALE 254
#define MON_RATIO_UNKNOWN 255
+#define POKEMON_NAME_LENGTH 10
+#define OT_NAME_LENGTH 7
+
enum MonGender
{
MON_MALE = 0,
@@ -317,7 +397,7 @@ typedef struct {
/* 0x10 */ u32 hpIV:5, atkIV:5, defIV:5, spdIV:5, spatkIV:5, spdefIV:5, isEgg:1, isNicknamed:1;
// TODO: Finish HoennRibbonSet
/* 0x14 */ u32 ribbonFlags; // cool, ...
- /* 0x18 */ u8 fatefulEncounter:1, female:1, genderless:1, alternateForm:5;
+ /* 0x18 */ u8 fatefulEncounter:1, gender:2, alternateForm:5;
/* 0x19 */ u8 HGSS_shinyLeaves; // TODO: Turn into bitfield
/* 0x1A */ u16 Unused;
/* 0x1C */ u16 Platinum_EggLocation;
@@ -326,10 +406,10 @@ typedef struct {
typedef struct {
/* 0x00 */ u16 nickname[11];
- /* 0x1A */ u8 Unused;
- /* 0x1B */ u8 originGame;
+ /* 0x16 */ u8 Unused;
+ /* 0x17 */ u8 originGame;
// TODO: Finish SinnohRibbonSet2
- /* 0x1C */ u32 sinnohRibbons2; // cool, ...
+ /* 0x18 */ u64 sinnohRibbons2; // cool, ...
} PokemonDataBlockC;
typedef struct {
@@ -340,7 +420,8 @@ typedef struct {
/* 0x18 */ u16 DP_MetLocation;
/* 0x1A */ u8 pokerus;
/* 0x1B */ u8 pokeball;
- /* 0x1C */ u8 flags;
+ /* 0x1C */ u8 metLevel:7;
+ u8 metGender:1;
/* 0x1D */ u8 encounterType;
/* 0x1E */ u16 HGSS_Pokeball;
} PokemonDataBlockD;
@@ -416,14 +497,14 @@ int CalcLevelBySpeciesAndExp(int species, int experience);
u32 GetMonData();
u32 GetBoxMonData();
#else
-u32 GetMonData(struct Pokemon * pokemon, u32 attr, void * ptr);
-u32 GetBoxMonData(struct BoxPokemon * pokemon, u32 attr, void * ptr);
+u32 GetMonData(struct Pokemon * pokemon, int attr, void * ptr);
+u32 GetBoxMonData(struct BoxPokemon * pokemon, int attr, void * ptr);
#endif
-void SetMonDataInternal(struct Pokemon * pokemon, u32 attr, const void * ptr);
-void SetMonData(struct Pokemon * pokemon, u32 attr, const void * ptr);
-void SetBoxMonData(struct BoxPokemon * pokemon, u32 attr, const void * ptr);
-void SetBoxMonDataEncrypted(struct BoxPokemon * pokemon, u32 attr, const void * ptr);
-void AddMonData(struct Pokemon * pokemon, u32 attr, u32 amount);
-void AddBoxMonData(struct Pokemon * pokemon, u32 attr, u32 amount);
+void SetMonDataInternal(struct Pokemon * pokemon, int attr, const void * ptr);
+void SetMonData(struct Pokemon * pokemon, int attr, const void * ptr);
+void SetBoxMonData(struct BoxPokemon * pokemon, int attr, const void * ptr);
+void SetBoxMonDataEncrypted(struct BoxPokemon * pokemon, int attr, const void * ptr);
+void AddMonData(struct Pokemon * pokemon, int attr, u32 amount);
+void AddBoxMonData(struct Pokemon * pokemon, int attr, u32 amount);
#endif //POKEDIAMOND_POKEMON_H
diff --git a/include/proto.h b/include/proto.h
new file mode 100644
index 00000000..37655429
--- /dev/null
+++ b/include/proto.h
@@ -0,0 +1,13 @@
+#ifndef POKEDIAMOND_PROTO_H
+#define POKEDIAMOND_PROTO_H
+
+// For homeless function declarations
+
+u16 * FUN_0200AA50(u16 species, u32 heap_id);
+void FUN_02021A74(u16 * dest, u16 * src);
+void FUN_02021A20(void * ptr);
+void FUN_02021E28(u16 * dest, u16 * src);
+u32 FUN_0206E7B8(u16 item, u32 a1, u32 a2);
+u32 GetArceusTypeByPlate(u16 plate);
+
+#endif //POKEDIAMOND_PROTO_H
diff --git a/include/string_util.h b/include/string_util.h
index 53d4e5f4..e9079229 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -7,6 +7,9 @@
#include "global.h"
+#define EOS 0xFFFF
+#define NON_DIGIT 0xE2
+
enum PrintingMode {
NORMAL,
PAD_SPACE,
diff --git a/include/text.h b/include/text.h
new file mode 100644
index 00000000..cec36a30
--- /dev/null
+++ b/include/text.h
@@ -0,0 +1,6 @@
+#ifndef POKEDIAMOND_TEXT_H
+#define POKEDIAMOND_TEXT_H
+
+void GetSpeciesName(u16 species, u32 heap_id, u16 * dest);
+
+#endif //POKEDIAMOND_TEXT_H