summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/constants/abilities.h129
-rw-r--r--include/constants/items.h448
-rw-r--r--include/filesystem.h1
-rw-r--r--include/global.h5
-rw-r--r--include/math_util.h6
-rw-r--r--include/move_data.h6
-rw-r--r--include/pokemon.h384
-rw-r--r--include/proto.h14
-rw-r--r--include/seals.h15
-rw-r--r--include/string_util.h3
-rw-r--r--include/text.h6
11 files changed, 887 insertions, 130 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/constants/items.h b/include/constants/items.h
new file mode 100644
index 00000000..98c3dd97
--- /dev/null
+++ b/include/constants/items.h
@@ -0,0 +1,448 @@
+#ifndef POKEDIAMOND_CONSTANTS_ITEMS_H
+#define POKEDIAMOND_CONSTANTS_ITEMS_H
+
+#define ITEM_NONE 0
+#define ITEM_MASTER_BALL 1
+#define ITEM_ULTRA_BALL 2
+#define ITEM_GREAT_BALL 3
+#define ITEM_POKE_BALL 4
+#define ITEM_SAFARI_BALL 5
+#define ITEM_NET_BALL 6
+#define ITEM_DIVE_BALL 7
+#define ITEM_NEST_BALL 8
+#define ITEM_REPEAT_BALL 9
+#define ITEM_TIMER_BALL 10
+#define ITEM_LUXURY_BALL 11
+#define ITEM_PREMIER_BALL 12
+#define ITEM_DUSK_BALL 13
+#define ITEM_HEAL_BALL 14
+#define ITEM_QUICK_BALL 15
+#define ITEM_CHERISH_BALL 16
+#define ITEM_POTION 17
+#define ITEM_ANTIDOTE 18
+#define ITEM_BURN_HEAL 19
+#define ITEM_ICE_HEAL 20
+#define ITEM_AWAKENING 21
+#define ITEM_PARLYZ_HEAL 22
+#define ITEM_FULL_RESTORE 23
+#define ITEM_MAX_POTION 24
+#define ITEM_HYPER_POTION 25
+#define ITEM_SUPER_POTION 26
+#define ITEM_FULL_HEAL 27
+#define ITEM_REVIVE 28
+#define ITEM_MAX_REVIVE 29
+#define ITEM_FRESH_WATER 30
+#define ITEM_SODA_POP 31
+#define ITEM_LEMONADE 32
+#define ITEM_MOOMOO_MILK 33
+#define ITEM_ENERGYPOWDER 34
+#define ITEM_ENERGY_ROOT 35
+#define ITEM_HEAL_POWDER 36
+#define ITEM_REVIVAL_HERB 37
+#define ITEM_ETHER 38
+#define ITEM_MAX_ETHER 39
+#define ITEM_ELIXIR 40
+#define ITEM_MAX_ELIXIR 41
+#define ITEM_LAVA_COOKIE 42
+#define ITEM_BERRY_JUICE 43
+#define ITEM_SACRED_ASH 44
+#define ITEM_HP_UP 45
+#define ITEM_PROTEIN 46
+#define ITEM_IRON 47
+#define ITEM_CARBOS 48
+#define ITEM_CALCIUM 49
+#define ITEM_RARE_CANDY 50
+#define ITEM_PP_UP 51
+#define ITEM_ZINC 52
+#define ITEM_PP_MAX 53
+#define ITEM_OLD_GATEAU 54
+#define ITEM_GUARD_SPEC_ 55
+#define ITEM_DIRE_HIT 56
+#define ITEM_X_ATTACK 57
+#define ITEM_X_DEFENSE 58
+#define ITEM_X_SPEED 59
+#define ITEM_X_ACCURACY 60
+#define ITEM_X_SPECIAL 61
+#define ITEM_X_SP__DEF 62
+#define ITEM_POKE_DOLL 63
+#define ITEM_FLUFFY_TAIL 64
+#define ITEM_BLUE_FLUTE 65
+#define ITEM_YELLOW_FLUTE 66
+#define ITEM_RED_FLUTE 67
+#define ITEM_BLACK_FLUTE 68
+#define ITEM_WHITE_FLUTE 69
+#define ITEM_SHOAL_SALT 70
+#define ITEM_SHOAL_SHELL 71
+#define ITEM_RED_SHARD 72
+#define ITEM_BLUE_SHARD 73
+#define ITEM_YELLOW_SHARD 74
+#define ITEM_GREEN_SHARD 75
+#define ITEM_SUPER_REPEL 76
+#define ITEM_MAX_REPEL 77
+#define ITEM_ESCAPE_ROPE 78
+#define ITEM_REPEL 79
+#define ITEM_SUN_STONE 80
+#define ITEM_MOON_STONE 81
+#define ITEM_FIRE_STONE 82
+#define ITEM_THUNDERSTONE 83
+#define ITEM_WATER_STONE 84
+#define ITEM_LEAF_STONE 85
+#define ITEM_TINYMUSHROOM 86
+#define ITEM_BIG_MUSHROOM 87
+#define ITEM_PEARL 88
+#define ITEM_BIG_PEARL 89
+#define ITEM_STARDUST 90
+#define ITEM_STAR_PIECE 91
+#define ITEM_NUGGET 92
+#define ITEM_HEART_SCALE 93
+#define ITEM_HONEY 94
+#define ITEM_GROWTH_MULCH 95
+#define ITEM_DAMP_MULCH 96
+#define ITEM_STABLE_MULCH 97
+#define ITEM_GOOEY_MULCH 98
+#define ITEM_ROOT_FOSSIL 99
+#define ITEM_CLAW_FOSSIL 100
+#define ITEM_HELIX_FOSSIL 101
+#define ITEM_DOME_FOSSIL 102
+#define ITEM_OLD_AMBER 103
+#define ITEM_ARMOR_FOSSIL 104
+#define ITEM_SKULL_FOSSIL 105
+#define ITEM_RARE_BONE 106
+#define ITEM_SHINY_STONE 107
+#define ITEM_DUSK_STONE 108
+#define ITEM_DAWN_STONE 109
+#define ITEM_OVAL_STONE 110
+#define ITEM_ODD_KEYSTONE 111
+
+#define ITEM_ADAMANT_ORB 135
+#define ITEM_LUSTROUS_ORB 136
+#define ITEM_GRASS_MAIL 137
+#define ITEM_FLAME_MAIL 138
+#define ITEM_BUBBLE_MAIL 139
+#define ITEM_BLOOM_MAIL 140
+#define ITEM_TUNNEL_MAIL 141
+#define ITEM_STEEL_MAIL 142
+#define ITEM_HEART_MAIL 143
+#define ITEM_SNOW_MAIL 144
+#define ITEM_SPACE_MAIL 145
+#define ITEM_AIR_MAIL 146
+#define ITEM_MOSAIC_MAIL 147
+#define ITEM_BRICK_MAIL 148
+#define ITEM_CHERI_BERRY 149
+#define ITEM_CHESTO_BERRY 150
+#define ITEM_PECHA_BERRY 151
+#define ITEM_RAWST_BERRY 152
+#define ITEM_ASPEAR_BERRY 153
+#define ITEM_LEPPA_BERRY 154
+#define ITEM_ORAN_BERRY 155
+#define ITEM_PERSIM_BERRY 156
+#define ITEM_LUM_BERRY 157
+#define ITEM_SITRUS_BERRY 158
+#define ITEM_FIGY_BERRY 159
+#define ITEM_WIKI_BERRY 160
+#define ITEM_MAGO_BERRY 161
+#define ITEM_AGUAV_BERRY 162
+#define ITEM_IAPAPA_BERRY 163
+#define ITEM_RAZZ_BERRY 164
+#define ITEM_BLUK_BERRY 165
+#define ITEM_NANAB_BERRY 166
+#define ITEM_WEPEAR_BERRY 167
+#define ITEM_PINAP_BERRY 168
+#define ITEM_POMEG_BERRY 169
+#define ITEM_KELPSY_BERRY 170
+#define ITEM_QUALOT_BERRY 171
+#define ITEM_HONDEW_BERRY 172
+#define ITEM_GREPA_BERRY 173
+#define ITEM_TAMATO_BERRY 174
+#define ITEM_CORNN_BERRY 175
+#define ITEM_MAGOST_BERRY 176
+#define ITEM_RABUTA_BERRY 177
+#define ITEM_NOMEL_BERRY 178
+#define ITEM_SPELON_BERRY 179
+#define ITEM_PAMTRE_BERRY 180
+#define ITEM_WATMEL_BERRY 181
+#define ITEM_DURIN_BERRY 182
+#define ITEM_BELUE_BERRY 183
+#define ITEM_OCCA_BERRY 184
+#define ITEM_PASSHO_BERRY 185
+#define ITEM_WACAN_BERRY 186
+#define ITEM_RINDO_BERRY 187
+#define ITEM_YACHE_BERRY 188
+#define ITEM_CHOPLE_BERRY 189
+#define ITEM_KEBIA_BERRY 190
+#define ITEM_SHUCA_BERRY 191
+#define ITEM_COBA_BERRY 192
+#define ITEM_PAYAPA_BERRY 193
+#define ITEM_TANGA_BERRY 194
+#define ITEM_CHARTI_BERRY 195
+#define ITEM_KASIB_BERRY 196
+#define ITEM_HABAN_BERRY 197
+#define ITEM_COLBUR_BERRY 198
+#define ITEM_BABIRI_BERRY 199
+#define ITEM_CHILAN_BERRY 200
+#define ITEM_LIECHI_BERRY 201
+#define ITEM_GANLON_BERRY 202
+#define ITEM_SALAC_BERRY 203
+#define ITEM_PETAYA_BERRY 204
+#define ITEM_APICOT_BERRY 205
+#define ITEM_LANSAT_BERRY 206
+#define ITEM_STARF_BERRY 207
+#define ITEM_ENIGMA_BERRY 208
+#define ITEM_MICLE_BERRY 209
+#define ITEM_CUSTAP_BERRY 210
+#define ITEM_JABOCA_BERRY 211
+#define ITEM_ROWAP_BERRY 212
+#define ITEM_BRIGHTPOWDER 213
+#define ITEM_WHITE_HERB 214
+#define ITEM_MACHO_BRACE 215
+#define ITEM_EXP__SHARE 216
+#define ITEM_QUICK_CLAW 217
+#define ITEM_SOOTHE_BELL 218
+#define ITEM_MENTAL_HERB 219
+#define ITEM_CHOICE_BAND 220
+#define ITEM_KINGS_ROCK 221
+#define ITEM_SILVERPOWDER 222
+#define ITEM_AMULET_COIN 223
+#define ITEM_CLEANSE_TAG 224
+#define ITEM_SOUL_DEW 225
+#define ITEM_DEEPSEATOOTH 226
+#define ITEM_DEEPSEASCALE 227
+#define ITEM_SMOKE_BALL 228
+#define ITEM_EVERSTONE 229
+#define ITEM_FOCUS_BAND 230
+#define ITEM_LUCKY_EGG 231
+#define ITEM_SCOPE_LENS 232
+#define ITEM_METAL_COAT 233
+#define ITEM_LEFTOVERS 234
+#define ITEM_DRAGON_SCALE 235
+#define ITEM_LIGHT_BALL 236
+#define ITEM_SOFT_SAND 237
+#define ITEM_HARD_STONE 238
+#define ITEM_MIRACLE_SEED 239
+#define ITEM_BLACKGLASSES 240
+#define ITEM_BLACK_BELT 241
+#define ITEM_MAGNET 242
+#define ITEM_MYSTIC_WATER 243
+#define ITEM_SHARP_BEAK 244
+#define ITEM_POISON_BARB 245
+#define ITEM_NEVERMELTICE 246
+#define ITEM_SPELL_TAG 247
+#define ITEM_TWISTEDSPOON 248
+#define ITEM_CHARCOAL 249
+#define ITEM_DRAGON_FANG 250
+#define ITEM_SILK_SCARF 251
+#define ITEM_UPGRADE 252
+#define ITEM_SHELL_BELL 253
+#define ITEM_SEA_INCENSE 254
+#define ITEM_LAX_INCENSE 255
+#define ITEM_LUCKY_PUNCH 256
+#define ITEM_METAL_POWDER 257
+#define ITEM_THICK_CLUB 258
+#define ITEM_STICK 259
+#define ITEM_RED_SCARF 260
+#define ITEM_BLUE_SCARF 261
+#define ITEM_PINK_SCARF 262
+#define ITEM_GREEN_SCARF 263
+#define ITEM_YELLOW_SCARF 264
+#define ITEM_WIDE_LENS 265
+#define ITEM_MUSCLE_BAND 266
+#define ITEM_WISE_GLASSES 267
+#define ITEM_EXPERT_BELT 268
+#define ITEM_LIGHT_CLAY 269
+#define ITEM_LIFE_ORB 270
+#define ITEM_POWER_HERB 271
+#define ITEM_TOXIC_ORB 272
+#define ITEM_FLAME_ORB 273
+#define ITEM_QUICK_POWDER 274
+#define ITEM_FOCUS_SASH 275
+#define ITEM_ZOOM_LENS 276
+#define ITEM_METRONOME 277
+#define ITEM_IRON_BALL 278
+#define ITEM_LAGGING_TAIL 279
+#define ITEM_DESTINY_KNOT 280
+#define ITEM_BLACK_SLUDGE 281
+#define ITEM_ICY_ROCK 282
+#define ITEM_SMOOTH_ROCK 283
+#define ITEM_HEAT_ROCK 284
+#define ITEM_DAMP_ROCK 285
+#define ITEM_GRIP_CLAW 286
+#define ITEM_CHOICE_SCARF 287
+#define ITEM_STICKY_BARB 288
+#define ITEM_POWER_BRACER 289
+#define ITEM_POWER_BELT 290
+#define ITEM_POWER_LENS 291
+#define ITEM_POWER_BAND 292
+#define ITEM_POWER_ANKLET 293
+#define ITEM_POWER_WEIGHT 294
+#define ITEM_SHED_SHELL 295
+#define ITEM_BIG_ROOT 296
+#define ITEM_CHOICE_SPECS 297
+#define ITEM_FLAME_PLATE 298
+#define ITEM_SPLASH_PLATE 299
+#define ITEM_ZAP_PLATE 300
+#define ITEM_MEADOW_PLATE 301
+#define ITEM_ICICLE_PLATE 302
+#define ITEM_FIST_PLATE 303
+#define ITEM_TOXIC_PLATE 304
+#define ITEM_EARTH_PLATE 305
+#define ITEM_SKY_PLATE 306
+#define ITEM_MIND_PLATE 307
+#define ITEM_INSECT_PLATE 308
+#define ITEM_STONE_PLATE 309
+#define ITEM_SPOOKY_PLATE 310
+#define ITEM_DRACO_PLATE 311
+#define ITEM_DREAD_PLATE 312
+#define ITEM_IRON_PLATE 313
+#define ITEM_ODD_INCENSE 314
+#define ITEM_ROCK_INCENSE 315
+#define ITEM_FULL_INCENSE 316
+#define ITEM_WAVE_INCENSE 317
+#define ITEM_ROSE_INCENSE 318
+#define ITEM_LUCK_INCENSE 319
+#define ITEM_PURE_INCENSE 320
+#define ITEM_PROTECTOR 321
+#define ITEM_ELECTIRIZER 322
+#define ITEM_MAGMARIZER 323
+#define ITEM_DUBIOUS_DISC 324
+#define ITEM_REAPER_CLOTH 325
+#define ITEM_RAZOR_CLAW 326
+#define ITEM_RAZOR_FANG 327
+#define ITEM_TM01 328
+#define ITEM_TM02 329
+#define ITEM_TM03 330
+#define ITEM_TM04 331
+#define ITEM_TM05 332
+#define ITEM_TM06 333
+#define ITEM_TM07 334
+#define ITEM_TM08 335
+#define ITEM_TM09 336
+#define ITEM_TM10 337
+#define ITEM_TM11 338
+#define ITEM_TM12 339
+#define ITEM_TM13 340
+#define ITEM_TM14 341
+#define ITEM_TM15 342
+#define ITEM_TM16 343
+#define ITEM_TM17 344
+#define ITEM_TM18 345
+#define ITEM_TM19 346
+#define ITEM_TM20 347
+#define ITEM_TM21 348
+#define ITEM_TM22 349
+#define ITEM_TM23 350
+#define ITEM_TM24 351
+#define ITEM_TM25 352
+#define ITEM_TM26 353
+#define ITEM_TM27 354
+#define ITEM_TM28 355
+#define ITEM_TM29 356
+#define ITEM_TM30 357
+#define ITEM_TM31 358
+#define ITEM_TM32 359
+#define ITEM_TM33 360
+#define ITEM_TM34 361
+#define ITEM_TM35 362
+#define ITEM_TM36 363
+#define ITEM_TM37 364
+#define ITEM_TM38 365
+#define ITEM_TM39 366
+#define ITEM_TM40 367
+#define ITEM_TM41 368
+#define ITEM_TM42 369
+#define ITEM_TM43 370
+#define ITEM_TM44 371
+#define ITEM_TM45 372
+#define ITEM_TM46 373
+#define ITEM_TM47 374
+#define ITEM_TM48 375
+#define ITEM_TM49 376
+#define ITEM_TM50 377
+#define ITEM_TM51 378
+#define ITEM_TM52 379
+#define ITEM_TM53 380
+#define ITEM_TM54 381
+#define ITEM_TM55 382
+#define ITEM_TM56 383
+#define ITEM_TM57 384
+#define ITEM_TM58 385
+#define ITEM_TM59 386
+#define ITEM_TM60 387
+#define ITEM_TM61 388
+#define ITEM_TM62 389
+#define ITEM_TM63 390
+#define ITEM_TM64 391
+#define ITEM_TM65 392
+#define ITEM_TM66 393
+#define ITEM_TM67 394
+#define ITEM_TM68 395
+#define ITEM_TM69 396
+#define ITEM_TM70 397
+#define ITEM_TM71 398
+#define ITEM_TM72 399
+#define ITEM_TM73 400
+#define ITEM_TM74 401
+#define ITEM_TM75 402
+#define ITEM_TM76 403
+#define ITEM_TM77 404
+#define ITEM_TM78 405
+#define ITEM_TM79 406
+#define ITEM_TM80 407
+#define ITEM_TM81 408
+#define ITEM_TM82 409
+#define ITEM_TM83 410
+#define ITEM_TM84 411
+#define ITEM_TM85 412
+#define ITEM_TM86 413
+#define ITEM_TM87 414
+#define ITEM_TM88 415
+#define ITEM_TM89 416
+#define ITEM_TM90 417
+#define ITEM_TM91 418
+#define ITEM_TM92 419
+#define ITEM_HM01 420
+#define ITEM_HM02 421
+#define ITEM_HM03 422
+#define ITEM_HM04 423
+#define ITEM_HM05 424
+#define ITEM_HM06 425
+#define ITEM_HM07 426
+#define ITEM_HM08 427
+#define ITEM_EXPLORER_KIT 428
+#define ITEM_LOOT_SACK 429
+#define ITEM_RULE_BOOK 430
+#define ITEM_POKE_RADAR 431
+#define ITEM_POINT_CARD 432
+#define ITEM_JOURNAL 433
+#define ITEM_SEAL_CASE 434
+#define ITEM_FASHION_CASE 435
+#define ITEM_SEAL_BAG 436
+#define ITEM_PAL_PAD 437
+#define ITEM_WORKS_KEY 438
+#define ITEM_OLD_CHARM 439
+#define ITEM_GALACTIC_KEY 440
+#define ITEM_RED_CHAIN 441
+#define ITEM_TOWN_MAP 442
+#define ITEM_VS__SEEKER 443
+#define ITEM_COIN_CASE 444
+#define ITEM_OLD_ROD 445
+#define ITEM_GOOD_ROD 446
+#define ITEM_SUPER_ROD 447
+#define ITEM_SPRAYDUCK 448
+#define ITEM_POFFIN_CASE 449
+#define ITEM_BICYCLE 450
+#define ITEM_SUITE_KEY 451
+#define ITEM_OAKS_LETTER 452
+#define ITEM_LUNAR_WING 453
+#define ITEM_MEMBER_CARD 454
+#define ITEM_AZURE_FLUTE 455
+#define ITEM_S_S__TICKET 456
+#define ITEM_CONTEST_PASS 457
+#define ITEM_MAGMA_STONE 458
+#define ITEM_PARCEL 459
+#define ITEM_COUPON_1 460
+#define ITEM_COUPON_2 461
+#define ITEM_COUPON_3 462
+#define ITEM_STORAGE_KEY 463
+#define ITEM_SECRETPOTION 464
+
+#endif //POKEDIAMOND_CONSTANTS_ITEMS_H
diff --git a/include/filesystem.h b/include/filesystem.h
index 37f73bb0..6b5a16d6 100644
--- a/include/filesystem.h
+++ b/include/filesystem.h
@@ -2,6 +2,7 @@
#define POKEDIAMOND_FILESYSTEM_H
#include "nitro/types.h"
+#include "FS_file.h"
typedef struct NARC
{
diff --git a/include/global.h b/include/global.h
index 2f31fa3d..35d0c3aa 100644
--- a/include/global.h
+++ b/include/global.h
@@ -27,4 +27,9 @@ enum GameLanguage {
extern void ErrorHandling(void);
+#define GF_ASSERT(expr) do {if (!(expr)) ErrorHandling();} while (0)
+
+extern const enum GameLanguage gGameLanguage;
+extern const enum GameVersion gGameVersion;
+
#endif //GUARD_GLOBAL_H
diff --git a/include/math_util.h b/include/math_util.h
new file mode 100644
index 00000000..f7169956
--- /dev/null
+++ b/include/math_util.h
@@ -0,0 +1,6 @@
+#ifndef POKEDIAMOND_MATH_UTIL_H
+#define POKEDIAMOND_MATH_UTIL_H
+
+u16 rand_LC(void);
+
+#endif //POKEDIAMOND_MATH_UTIL_H
diff --git a/include/move_data.h b/include/move_data.h
new file mode 100644
index 00000000..975bcf8d
--- /dev/null
+++ b/include/move_data.h
@@ -0,0 +1,6 @@
+#ifndef POKEDIAMOND_MOVE_DATA_H
+#define POKEDIAMOND_MOVE_DATA_H
+
+int FUN_0206AB30(u16 move, u8 ppUp);
+
+#endif //POKEDIAMOND_MOVE_DATA_H
diff --git a/include/pokemon.h b/include/pokemon.h
index 68cc0d59..db15ac14 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -6,11 +6,12 @@
// Enums
#include "constants/species.h"
+#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
@@ -33,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
@@ -59,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
@@ -67,12 +125,32 @@
#define MON_DATA_RESERVED_114 114 // Plat
#define MON_DATA_UNUSED_115 115
#define MON_DATA_NICKNAME 116
-#define MON_DATA_UNUSED_117 117
-#define MON_DATA_NICKNAME_2 118 // ???
-#define MON_DATA_NICKNAME_3 119 // ???
+#define MON_DATA_NICKNAME_2 117
+#define MON_DATA_NICKNAME_3 118 // ???
+#define MON_DATA_NICKNAME_4 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
@@ -99,17 +177,31 @@
#define MON_DATA_SPEED 166
#define MON_DATA_SPATK 167
#define MON_DATA_SPDEF 168
-#define MON_DATA_SEAL_TYPES_MAYBE 169
+#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_CHECK_173 173
+#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
+#define MON_RATIO_MALE 0
+#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,
+ MON_FEMALE = 1,
+ MON_GENDERLESS = 2
+};
+
// TODO: Identify the rest of these
enum BaseStat {
BASE_HP = 0,
@@ -128,11 +220,11 @@ enum BaseStat {
BASE_SPEED_YIELD,
BASE_SPATK_YIELD,
BASE_SPDEF_YIELD,
- BASE_ITEM_1 = 16,
+ BASE_ITEM_1,
BASE_ITEM_2,
BASE_GENDER_RATIO,
BASE_EGG_CYCLES,
- BASE_FIRENDSHIP,
+ BASE_FRIENDSHIP,
BASE_GROWTH_RATE,
BASE_EGG_GROUP_1,
GASE_EGG_GROUP_2,
@@ -141,42 +233,45 @@ enum BaseStat {
BASE_GREAT_MARSH_RATE,
BASE_COLOR,
BASE_FLIP,
+ BASE_UNKNOWN_29,
+ BASE_UNKNOWN_30,
+ BASE_UNKNOWN_31,
+ BASE_UNKNOWN_32,
};
struct BaseStats {
- u8 hp;
- u8 atk;
- u8 def;
- u8 speed;
- u8 spatk;
- u8 spdef;
- u8 types[2];
- u8 catchRate;
- u8 expYield;
- u16 hp_yield:2;
- u16 atk_yield:2;
- u16 def_yield:2;
- u16 speed_yield:2;
- u16 spatk_yield:2;
- u16 spdef_yield:2;
- u16 unkB_4:2;
- u16 padding_B_6:2;
- u16 item1;
- u16 item2;
- u8 genderRatio;
- u8 eggCycles;
- u8 friendship;
- u8 growthRate;
- u8 eggGroups[2];
- u8 abilities[2];
- u8 greatMarshRate;
- u8 color:7;
- u8 flip:1;
- u8 padding_1A[2];
- u32 unk1C;
- u32 unk20;
- u32 unk24;
- u32 unk28;
+ /* 0x00 */ u8 hp;
+ /* 0x01 */ u8 atk;
+ /* 0x02 */ u8 def;
+ /* 0x03 */ u8 speed;
+ /* 0x04 */ u8 spatk;
+ /* 0x05 */ u8 spdef;
+ /* 0x06 */ u8 types[2];
+ /* 0x08 */ u8 catchRate;
+ /* 0x09 */ u8 expYield;
+ /* 0x0A */ u16 hp_yield:2;
+ u16 atk_yield:2;
+ u16 def_yield:2;
+ u16 speed_yield:2;
+ /* 0x0B */ u16 spatk_yield:2;
+ u16 spdef_yield:2;
+ u16 padding_B_4:4;
+ /* 0x0C */ u16 item1;
+ /* 0x0E */ u16 item2;
+ /* 0x10 */ u8 genderRatio;
+ /* 0x11 */ u8 eggCycles;
+ /* 0x12 */ u8 friendship;
+ /* 0x13 */ u8 growthRate;
+ /* 0x14 */ u8 eggGroups[2];
+ /* 0x16 */ u8 abilities[2];
+ /* 0x18 */ u8 greatMarshRate;
+ /* 0x19 */ u8 color:7;
+ u8 flip:1;
+ u8 padding_1A[2];
+ /* 0x1C */ u32 unk1C;
+ /* 0x20 */ u32 unk20;
+ /* 0x24 */ u32 unk24;
+ /* 0x28 */ u32 unk28;
};
typedef enum {
@@ -202,69 +297,69 @@ typedef enum GameLanguage OriginLanguage;
typedef enum {
ARCEUS_NORMAL = 0,
- ARCEUS_FIST = 8,
- ARCEUS_SKY = 16,
- ARCEUS_TOXIC = 24,
- ARCEUS_EARTH = 32,
- ARCEUS_STONE = 40,
- ARCEUS_INSECT = 48,
- ARCEUS_SPOOKY = 56,
- ARCEUS_IRON = 64,
- ARCEUS_FLAME = 72,
- ARCEUS_SPLASH = 80,
- ARCEUS_MEADOW = 88,
- ARCEUS_ZAP = 96,
- ARCEUS_MIND = 104,
- ARCEUS_ICICLE = 112,
- ARCEUS_DRACO = 120,
- ARCEUS_DREAD = 128,
+ ARCEUS_FIST = 1,
+ ARCEUS_SKY = 2,
+ ARCEUS_TOXIC = 3,
+ ARCEUS_EARTH = 4,
+ ARCEUS_STONE = 5,
+ ARCEUS_INSECT = 6,
+ ARCEUS_SPOOKY = 7,
+ ARCEUS_IRON = 8,
+ ARCEUS_FLAME = 9,
+ ARCEUS_SPLASH = 10,
+ ARCEUS_MEADOW = 11,
+ ARCEUS_ZAP = 12,
+ ARCEUS_MIND = 13,
+ ARCEUS_ICICLE = 14,
+ ARCEUS_DRACO = 15,
+ ARCEUS_DREAD = 16,
BURMY_PLANT = 0,
- BURMY_SANDY = 8,
- BURMY_TRASH = 16,
+ BURMY_SANDY = 1,
+ BURMY_TRASH = 2,
DEOXYS_NORMAL = 0,
- DEOXYS_ATTACK = 8,
- DEOXYS_DEFENSE = 16,
- DEOXYS_SPEED = 24,
+ DEOXYS_ATTACK = 1,
+ DEOXYS_DEFENSE = 2,
+ DEOXYS_SPEED = 3,
GIRATINA_ALTERED = 0,
- GIRATINA_ORIGIN = 8,
+ GIRATINA_ORIGIN = 1,
ROTOM_NORMAL = 0,
- ROTOM_HEAT = 8,
- ROTOM_WASH = 16,
- ROTOM_FROST = 24,
- ROTOM_FAN = 32,
- ROTOM_MOW = 40,
+ ROTOM_HEAT = 1,
+ ROTOM_WASH = 2,
+ ROTOM_FROST = 3,
+ ROTOM_FAN = 4,
+ ROTOM_MOW = 5,
SHAYMIN_LAND = 0,
- SHAYMIN_SKY = 8,
+ SHAYMIN_SKY = 1,
SHELLOS_WEST = 0,
- SHELLOS_EAST = 8,
+ SHELLOS_EAST = 1,
UNOWN_A = 0,
- UNOWN_B = 8,
- UNOWN_C = 16,
- UNOWN_D = 24,
- UNOWN_E = 32,
- UNOWN_F = 40,
- UNOWN_G = 48,
- UNOWN_H = 56,
- UNOWN_I = 64,
- UNOWN_J = 72,
- UNOWN_K = 80,
- UNOWN_L = 88,
- UNOWN_M = 96,
- UNOWN_N = 104,
- UNOWN_O = 112,
- UNOWN_P = 120,
- UNOWN_Q = 128,
- UNOWN_R = 136,
- UNOWN_S = 144,
- UNOWN_T = 152,
- UNOWN_U = 160,
- UNOWN_V = 168,
- UNOWN_W = 176,
- UNOWN_X = 184,
- UNOWN_Y = 192,
- UNOWN_Z = 200,
- UNOWN_EXCLAMATION_MARK = 208,
- UNOWN_QUESTION_MARK = 216
+ UNOWN_B = 1,
+ UNOWN_C = 2,
+ UNOWN_D = 3,
+ UNOWN_E = 4,
+ UNOWN_F = 5,
+ UNOWN_G = 6,
+ UNOWN_H = 7,
+ UNOWN_I = 8,
+ UNOWN_J = 9,
+ UNOWN_K = 10,
+ UNOWN_L = 11,
+ UNOWN_M = 12,
+ UNOWN_N = 13,
+ UNOWN_O = 14,
+ UNOWN_P = 15,
+ UNOWN_Q = 16,
+ UNOWN_R = 17,
+ UNOWN_S = 18,
+ UNOWN_T = 19,
+ UNOWN_U = 20,
+ UNOWN_V = 21,
+ UNOWN_W = 22,
+ UNOWN_X = 23,
+ UNOWN_Y = 24,
+ UNOWN_Z = 25,
+ UNOWN_EXCLAMATION_MARK = 26,
+ UNOWN_QUESTION_MARK = 27
} AlternateForms;
// Structs
@@ -305,7 +400,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;
@@ -314,10 +409,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 {
@@ -328,7 +423,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;
@@ -341,26 +437,18 @@ typedef union {
} PokemonDataBlock;
struct BoxPokemon {
- /* 0x000 */ u32 personalityValue;
- /* 0x004 */ u16 no_encrypt:1;
- u16 control_4_1:1;
- u16 control_4_2:1;
+ /* 0x000 */ u32 pid;
+ /* 0x004 */ u16 party_lock:1;
+ u16 box_lock:1;
+ u16 checksum_fail:1;
u16 Unused:13; // Might be used for validity checks
/* 0x006 */ u16 checksum; // Stored checksum of pokemon
- /* 0x008 */ PokemonDataBlock box[4];
+ /* 0x008 */ PokemonDataBlock substructs[4];
};
struct PartyPokemon
{
- /* 0x000 */ struct BoxPokemon box;
- /* 0x088 */ u8 slp:3;
- u8 psn:1;
- u8 brn:1;
- u8 frz:1;
- u8 prz:1;
- u8 tox:1;
- /* 0x089 */ u8 unk89;
- /* 0x08A */ u8 filler8A[2];
+ /* 0x088 */ u32 status; // slp:3, psn:1, brn:1, frz:1, prz:1, tox:1, ...
/* 0x08C */ u8 level;
/* 0x08D */ u8 capsule;
/* 0x08E */ u16 hp;
@@ -370,7 +458,7 @@ struct PartyPokemon
/* 0x096 */ u16 speed;
/* 0x098 */ u16 spatk;
/* 0x09A */ u16 spdef;
- /* 0x09C */ u8 seal_something[0x38]; // a struct?
+ /* 0x09C */ struct SealStruct seal_something; // a struct?
/* 0x0D4 */ u8 sealCoords[0x18]; // u8 pairs?
};
@@ -379,11 +467,47 @@ struct Pokemon {
/* 0x088 */ struct PartyPokemon party;
}; // size: 0xEC
-int GetMonBaseStat_HandleFormeConversion(int species, int form, int stat_id);
-int GetMonBaseStat(int species, int stat_id);
-int GetMonExpByLevel(int species, int level);
-void LoadGrowthTable(int species, int * table);
-int GetExpByGrowthRateAndLevel(int rate, int level);
-int CalcLevelBySpeciesAndExp(int species, int experience);
+void ZeroMonData(struct Pokemon * pokemon);
+void ZeroBoxMonData(struct BoxPokemon * boxmon);
+u32 SizeOfStructPokemon(void);
+struct Pokemon * AllocMonZeroed(u32 heap_id);
+BOOL AcquireMonLock(struct Pokemon * mon);
+BOOL ReleaseMonLock(struct Pokemon * mon, BOOL decrypt_result);
+BOOL AcquireBoxMonLock(struct BoxPokemon * mon);
+BOOL ReleaseBoxMonLock(struct BoxPokemon * mon, BOOL decrypt_result);
+void CreateMon(struct Pokemon * pokemon, int species, int level, int fixedIV, int hasFixedPersonality, int fixedPersonality, int otIdType, int fixedOtId);
+void CreateBoxMon(struct BoxPokemon * boxPokemon, int species, int level, int fixedIV, int hasFixedPersonality, int fixedPersonality, int otIdType, int fixedOtId);
+void CreateMonWithNature(struct Pokemon * pokemon, u16 species, u8 level, u8 fixedIv, u8 nature);
+void CreateMonWithGenderNatureLetter(struct Pokemon * pokemon, u16 species, u8 level, u8 fixedIv, u8 gender, u8 nature, u8 letter);
+u32 GenPersonalityByGenderAndNature(u16 species, u8 gender, u8 nature);
+void CreateMonWithFixedIVs(struct Pokemon * pokemon, int species, int level, int ivs, int personality);
+void CalcMonLevelAndStats(struct Pokemon * pokemon);
+void CalcMonStats(struct Pokemon * pokemon);
+#ifndef IN_POKEMON_C
+u32 GetMonData();
+u32 GetBoxMonData();
+#else
+u32 GetMonData(struct Pokemon * pokemon, int attr, void * ptr);
+u32 GetBoxMonData(struct BoxPokemon * pokemon, int attr, void * ptr);
+#endif
+void SetMonData(struct Pokemon * pokemon, int attr, void * ptr);
+void SetBoxMonData(struct BoxPokemon * pokemon, int attr, void * ptr);
+void AddMonData(struct Pokemon * pokemon, int attr, int amount);
+struct BaseStats * AllocAndLoadMonPersonal(int species, u32 heap_id);
+int GetMonBaseStat_HandleFormeConversion(int species, int form, enum BaseStat stat_id);
+int GetMonBaseStat(int species, enum BaseStat stat_id);
+u32 GetMonExpBySpeciesAndLevel(int species, int level);
+void LoadGrowthTable(int growthRate, u32 * table);
+u32 GetExpByGrowthRateAndLevel(int rate, int level);
+int CalcMonLevel(struct Pokemon * pokemon);
+int CalcBoxMonLevel(struct BoxPokemon * boxmon);
+int CalcLevelBySpeciesAndExp(u16 species, u32 experience);
+int CalcLevelBySpeciesAndExp_PreloadedPersonal(struct BaseStats * personal, u16 species, u32 experience);
+
+u8 GetBoxMonNature(struct BoxPokemon * boxmon);
+u8 GetMonNature(struct Pokemon * mon);
+u8 GetNatureFromPersonality(u32 pid);
+u8 GetBoxMonGender(struct BoxPokemon * boxmon);
+u8 GetGenderBySpeciesAndPersonality(u16 species, u32 pid);
#endif //POKEDIAMOND_POKEMON_H
diff --git a/include/proto.h b/include/proto.h
new file mode 100644
index 00000000..c8f50d33
--- /dev/null
+++ b/include/proto.h
@@ -0,0 +1,14 @@
+#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);
+void FUN_02021EF0(const u16 * src, u16 * dest, u32 count);
+u32 FUN_0206E7B8(u16 item, u32 a1, u32 a2);
+u32 GetArceusTypeByPlate(u16 plate);
+
+#endif //POKEDIAMOND_PROTO_H
diff --git a/include/seals.h b/include/seals.h
new file mode 100644
index 00000000..8fda23b9
--- /dev/null
+++ b/include/seals.h
@@ -0,0 +1,15 @@
+#ifndef POKEDIAMOND_SEALS_H
+#define POKEDIAMOND_SEALS_H
+
+struct SealStruct
+{
+ // TODO: define
+ u8 filler_00[0x38];
+};
+
+struct SealStruct * CreateNewSealsObject(u32 heap_id);
+
+void CopySealsObject(const struct SealStruct *, struct SealStruct *);
+void FUN_02029C74(const u8 *, u8 *);
+
+#endif //POKEDIAMOND_SEALS_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