summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle_script_commands.h1
-rw-r--r--include/constants/global.h21
-rw-r--r--include/constants/maps.h6
-rw-r--r--include/constants/pokemon.h6
-rw-r--r--include/constants/wild_encounter.h11
-rw-r--r--include/easy_chat.h1
-rw-r--r--include/global.h5
-rw-r--r--include/menu.h1
-rw-r--r--include/pokeblock.h3
-rw-r--r--include/pokemon.h1
-rw-r--r--include/save.h3
-rw-r--r--include/wild_encounter.h5
12 files changed, 31 insertions, 33 deletions
diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h
index cb81ad812..ed90d787f 100644
--- a/include/battle_script_commands.h
+++ b/include/battle_script_commands.h
@@ -1,7 +1,6 @@
#ifndef GUARD_BATTLE_SCRIPT_COMMANDS_H
#define GUARD_BATTLE_SCRIPT_COMMANDS_H
-#include "constants/pokemon.h"
#include "constants/battle_script_commands.h"
// Arguments for 'flags' in HandleBattleWindow
diff --git a/include/constants/global.h b/include/constants/global.h
index ef7861e9e..48b03b5cc 100644
--- a/include/constants/global.h
+++ b/include/constants/global.h
@@ -29,11 +29,20 @@
#define GAME_VERSION (VERSION_EMERALD)
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
+// party sizes
+#define PARTY_SIZE 6
+#define MULTI_PARTY_SIZE (PARTY_SIZE / 2)
+#define FRONTIER_PARTY_SIZE 3
+#define FRONTIER_DOUBLES_PARTY_SIZE 4
+#define FRONTIER_MULTI_PARTY_SIZE 2
+#define MAX_FRONTIER_PARTY_SIZE FRONTIER_DOUBLES_PARTY_SIZE
+#define UNION_ROOM_PARTY_SIZE 2
+
// capacities of various saveblock objects
#define DAYCARE_MON_COUNT 2
#define POKEBLOCKS_COUNT 40
#define OBJECT_EVENTS_COUNT 16
-#define MAIL_COUNT 16
+#define MAIL_COUNT (10 + PARTY_SIZE)
#define SECRET_BASES_COUNT 20
#define TV_SHOWS_COUNT 25
#define POKE_NEWS_COUNT 16
@@ -70,7 +79,6 @@
#define TRAINER_ID_LENGTH 4
#define MAX_MON_MOVES 4
-#define NUM_STATS 6
#define CONTESTANT_COUNT 4
#define CONTEST_CATEGORY_COOL 0
@@ -80,15 +88,6 @@
#define CONTEST_CATEGORY_TOUGH 4
#define CONTEST_CATEGORIES_COUNT 5
-// party sizes
-#define PARTY_SIZE 6
-#define MULTI_PARTY_SIZE (PARTY_SIZE / 2)
-#define FRONTIER_PARTY_SIZE 3
-#define FRONTIER_DOUBLES_PARTY_SIZE 4
-#define FRONTIER_MULTI_PARTY_SIZE 2
-#define MAX_FRONTIER_PARTY_SIZE FRONTIER_DOUBLES_PARTY_SIZE
-#define UNION_ROOM_PARTY_SIZE 2
-
// string lengths
#define ITEM_NAME_LENGTH 14
#define POKEMON_NAME_LENGTH 10
diff --git a/include/constants/maps.h b/include/constants/maps.h
index 6524f8c14..2ad4ea8df 100644
--- a/include/constants/maps.h
+++ b/include/constants/maps.h
@@ -9,12 +9,6 @@
#define MAP_GROUP(map) (MAP_##map >> 8)
#define MAP_NUM(map) (MAP_##map & 0xFF)
-// These groups are used by pokedex_area_screen.c to find wild
-// pokemon locations.
-#define MAP_GROUP_OVERWORLD_MONS MAP_GROUP(PETALBURG_CITY)
-#define MAP_GROUP_SPECIAL_MONS_1 MAP_GROUP(METEOR_FALLS_1F_1R)
-#define MAP_GROUP_SPECIAL_MONS_2 MAP_GROUP(SAFARI_ZONE_NORTHWEST)
-
// IDs for dynamic warps. Both are used in the dest_warp_id field for warp events, but they
// are never read in practice. A dest_map of MAP_NONE is used to indicate that a
// dynamic warp should be used, at which point the warp id is ignored. It can be passed to
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
index 9fa023cd5..0a74e751e 100644
--- a/include/constants/pokemon.h
+++ b/include/constants/pokemon.h
@@ -78,11 +78,13 @@
#define STAT_SPEED 3
#define STAT_SPATK 4
#define STAT_SPDEF 5
+#define NUM_STATS 6
+
#define STAT_ACC 6 // Only in battles.
#define STAT_EVASION 7 // Only in battles.
-#define NUM_NATURE_STATS NUM_STATS - 1 // excludes HP
-#define NUM_BATTLE_STATS NUM_STATS + 2 // includes Accuracy and Evasion
+#define NUM_NATURE_STATS (NUM_STATS - 1) // excludes HP
+#define NUM_BATTLE_STATS (NUM_STATS + 2) // includes Accuracy and Evasion
#define MIN_STAT_STAGE 0
#define DEFAULT_STAT_STAGE 6
diff --git a/include/constants/wild_encounter.h b/include/constants/wild_encounter.h
new file mode 100644
index 000000000..a78cd126f
--- /dev/null
+++ b/include/constants/wild_encounter.h
@@ -0,0 +1,11 @@
+#ifndef GUARD_CONSTANTS_WILD_ENCOUNTER_H
+#define GUARD_CONSTANTS_WILD_ENCOUNTER_H
+
+#define LAND_WILD_COUNT 12
+#define WATER_WILD_COUNT 5
+#define ROCK_WILD_COUNT 5
+#define FISH_WILD_COUNT 10
+
+#define NUM_ALTERING_CAVE_TABLES 9
+
+#endif // GUARD_CONSTANTS_WILD_ENCOUNTER_H
diff --git a/include/easy_chat.h b/include/easy_chat.h
index 4d2bc7c98..c9ef4428f 100644
--- a/include/easy_chat.h
+++ b/include/easy_chat.h
@@ -2,7 +2,6 @@
#define GUARD_EASYCHAT_H
#include "main.h"
-#include "constants/easy_chat.h"
struct EasyChatScreenTemplate
{
diff --git a/include/global.h b/include/global.h
index 377e20e0e..51ecbcbce 100644
--- a/include/global.h
+++ b/include/global.h
@@ -12,6 +12,8 @@
#include "constants/pokedex.h"
#include "constants/berry.h"
#include "constants/maps.h"
+#include "constants/pokemon.h"
+#include "constants/easy_chat.h"
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
@@ -130,6 +132,7 @@
// values that don't appear in the Pokedex. NATIONAL_DEX_COUNT does not include these values.
#define NUM_DEX_FLAG_BYTES ROUND_BITS_TO_BYTES(NUM_SPECIES)
#define NUM_FLAG_BYTES ROUND_BITS_TO_BYTES(FLAGS_COUNT)
+#define NUM_ADDITIONAL_PHRASE_BYTES ROUND_BITS_TO_BYTES(NUM_ADDITIONAL_PHRASES)
struct Coords8
{
@@ -987,7 +990,7 @@ struct SaveBlock1
/*0x2BC8*/ u16 easyChatBattleWon[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
- /*0x2E20*/ u8 additionalPhrases[8]; // bitfield for 33 additional phrases in easy chat system
+ /*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system
/*0x2E28*/ OldMan oldMan;
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
diff --git a/include/menu.h b/include/menu.h
index 69000d408..bf3f56aea 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -4,7 +4,6 @@
#include "task.h"
#include "text.h"
#include "window.h"
-#include "constants/pokemon.h"
#define MENU_NOTHING_CHOSEN -2
#define MENU_B_PRESSED -1
diff --git a/include/pokeblock.h b/include/pokeblock.h
index 9e0161495..24e6ea856 100644
--- a/include/pokeblock.h
+++ b/include/pokeblock.h
@@ -1,9 +1,6 @@
#ifndef GUARD_POKEBLOCK_H
#define GUARD_POKEBLOCK_H
-#include "constants/berry.h"
-#include "constants/pokemon.h"
-
#define TAG_POKEBLOCK 14818
enum
diff --git a/include/pokemon.h b/include/pokemon.h
index 315416c38..28460bbe6 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -1,7 +1,6 @@
#ifndef GUARD_POKEMON_H
#define GUARD_POKEMON_H
-#include "constants/pokemon.h"
#include "sprite.h"
struct PokemonSubstruct0
diff --git a/include/save.h b/include/save.h
index be7961136..89fc9ad33 100644
--- a/include/save.h
+++ b/include/save.h
@@ -52,8 +52,7 @@ enum
{
SAVE_NORMAL,
SAVE_LINK, // Link / Battle Frontier
- //EREADER_SAVE, // deprecated in Emerald
- SAVE_LINK2, // unknown 2nd link save
+ SAVE_EREADER, // deprecated in Emerald
SAVE_HALL_OF_FAME,
SAVE_OVERWRITE_DIFFERENT_FILE,
SAVE_HALL_OF_FAME_ERASE_BEFORE // unused
diff --git a/include/wild_encounter.h b/include/wild_encounter.h
index 09525beff..8608ec5b1 100644
--- a/include/wild_encounter.h
+++ b/include/wild_encounter.h
@@ -1,10 +1,7 @@
#ifndef GUARD_WILD_ENCOUNTER_H
#define GUARD_WILD_ENCOUNTER_H
-#define LAND_WILD_COUNT 12
-#define WATER_WILD_COUNT 5
-#define ROCK_WILD_COUNT 5
-#define FISH_WILD_COUNT 10
+#include "constants/wild_encounter.h"
struct WildPokemon
{