Skip to content

Commit

Permalink
Replace POKEMON_SLOTS_NUMBER
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards authored and huderlem committed Oct 1, 2020
1 parent 22c6c03 commit 5259898
Show file tree
Hide file tree
Showing 82 changed files with 2 additions and 86 deletions.
1 change: 0 additions & 1 deletion include/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define GUARD_DATA_H

#include "constants/moves.h"
#include "constants/species.h"

#define SPECIES_SHINY_TAG 500

Expand Down
5 changes: 2 additions & 3 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "constants/global.h"
#include "constants/flags.h"
#include "constants/vars.h"
#include "constants/species.h"

// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
Expand Down Expand Up @@ -65,8 +66,6 @@
// Converts a Q24.8 fixed-point format number to a regular integer
#define Q_24_8_TO_INT(n) ((int)((n) >> 8))

#define POKEMON_SLOTS_NUMBER 412

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))

Expand Down Expand Up @@ -115,7 +114,7 @@

#define ROUND_BITS_TO_BYTES(numBits)(((numBits) / 8) + (((numBits) % 8) ? 1 : 0))

#define DEX_FLAGS_NO (ROUND_BITS_TO_BYTES(POKEMON_SLOTS_NUMBER))
#define DEX_FLAGS_NO (ROUND_BITS_TO_BYTES(NUM_SPECIES))
#define NUM_FLAG_BYTES (ROUND_BITS_TO_BYTES(FLAGS_COUNT))

struct Coords8
Expand Down
1 change: 0 additions & 1 deletion src/apprentice.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "constants/items.h"
#include "constants/pokemon.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/trainers.h"
#include "constants/moves.h"

Expand Down
1 change: 0 additions & 1 deletion src/battle_ai_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "constants/battle_ai.h"
#include "constants/battle_move_effects.h"
#include "constants/moves.h"
#include "constants/species.h"

#define AI_ACTION_DONE 0x0001
#define AI_ACTION_FLEE 0x0002
Expand Down
1 change: 0 additions & 1 deletion src/battle_ai_switch_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "constants/item_effects.h"
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/species.h"

// this file's functions
static bool8 HasSuperEffectiveMoveAgainstOpponents(bool8 noRng);
Expand Down
1 change: 0 additions & 1 deletion src/battle_anim_effects_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "constants/battle_anim.h"
#include "constants/rgb.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/weather.h"

extern const struct SpriteTemplate gThoughtBubbleSpriteTemplate;
Expand Down
1 change: 0 additions & 1 deletion src/battle_anim_mons.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "trig.h"
#include "util.h"
#include "constants/battle_anim.h"
#include "constants/species.h"

#define GET_UNOWN_LETTER(personality) (( \
(((personality & 0x03000000) >> 24) << 6) \
Expand Down
1 change: 0 additions & 1 deletion src/battle_anim_sound_tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "sound.h"
#include "task.h"
#include "constants/battle_anim.h"
#include "constants/species.h"

// this file's functions
static void sub_8158B98(u8 taskId);
Expand Down
1 change: 0 additions & 1 deletion src/battle_controllers.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "task.h"
#include "util.h"
#include "constants/abilities.h"
#include "constants/species.h"

static EWRAM_DATA u8 sLinkSendTaskId = 0;
static EWRAM_DATA u8 sLinkReceiveTaskId = 0;
Expand Down
1 change: 0 additions & 1 deletion src/battle_dome.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "graphics.h"
#include "constants/battle_dome.h"
#include "constants/frontier_util.h"
#include "constants/species.h"
#include "constants/moves.h"
#include "constants/pokemon.h"
#include "constants/trainers.h"
Expand Down
1 change: 0 additions & 1 deletion src/battle_factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "frontier_util.h"
#include "battle_tower.h"
#include "random.h"
#include "constants/species.h"
#include "constants/battle_ai.h"
#include "constants/battle_factory.h"
#include "constants/battle_frontier.h"
Expand Down
1 change: 0 additions & 1 deletion src/battle_gfx_sfx_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "sound.h"
#include "party_menu.h"
#include "m4a.h"
#include "constants/species.h"
#include "decompress.h"
#include "data.h"
#include "palette.h"
Expand Down
1 change: 0 additions & 1 deletion src/battle_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "util.h"
#include "gpu_regs.h"
#include "battle_message.h"
#include "constants/species.h"
#include "pokedex.h"
#include "palette.h"
#include "international_string_util.h"
Expand Down
1 change: 0 additions & 1 deletion src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#include "constants/party_menu.h"
#include "constants/rgb.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/trainers.h"
#include "cable_club.h"

Expand Down
1 change: 0 additions & 1 deletion src/battle_pike.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "constants/layouts.h"
#include "constants/rgb.h"
#include "constants/trainers.h"
#include "constants/species.h"
#include "constants/moves.h"
#include "constants/party_menu.h"
#include "constants/battle_pike.h"
Expand Down
1 change: 0 additions & 1 deletion src/battle_pyramid.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "constants/layouts.h"
#include "constants/maps.h"
#include "constants/moves.h"
#include "constants/species.h"
#include "constants/trainers.h"

extern const struct MapLayout *const gMapLayouts[];
Expand Down
1 change: 0 additions & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "random.h"
#include "battle_controllers.h"
#include "battle_interface.h"
#include "constants/species.h"
#include "constants/songs.h"
#include "constants/trainers.h"
#include "constants/battle_anim.h"
Expand Down
1 change: 0 additions & 1 deletion src/battle_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "constants/songs.h"
#include "constants/map_types.h"
#include "constants/maps.h"
#include "constants/species.h"
#include "constants/trainers.h"
#include "constants/trainer_hill.h"

Expand Down
1 change: 0 additions & 1 deletion src/battle_tent.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "constants/items.h"
#include "constants/layouts.h"
#include "constants/region_map_sections.h"
#include "constants/species.h"
#include "constants/trainers.h"

// This file's functions.
Expand Down
1 change: 0 additions & 1 deletion src/battle_tower.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "constants/trainers.h"
#include "constants/event_objects.h"
#include "constants/moves.h"
#include "constants/species.h"
#include "constants/easy_chat.h"
#include "constants/tv.h"

Expand Down
1 change: 0 additions & 1 deletion src/battle_tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "constants/battle_string_ids.h"
#include "constants/battle_anim.h"
#include "constants/moves.h"
#include "constants/species.h"
#include "battle_message.h"
#include "tv.h"

Expand Down
1 change: 0 additions & 1 deletion src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "constants/hold_effects.h"
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/species.h"
#include "constants/weather.h"
#include "battle_arena.h"
#include "battle_pyramid.h"
Expand Down
1 change: 0 additions & 1 deletion src/birch_pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "event_data.h"
#include "field_message_box.h"
#include "pokedex.h"
#include "constants/species.h"
#include "strings.h"

bool16 ScriptGetPokedexInfo(void)
Expand Down
1 change: 0 additions & 1 deletion src/braille_puzzles.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "constants/field_effects.h"
#include "constants/maps.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/metatile_labels.h"
#include "fieldmap.h"
#include "party_menu.h"
Expand Down
1 change: 0 additions & 1 deletion src/contest.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "constants/moves.h"
#include "constants/rgb.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/tv.h"

// This file's functions.
Expand Down
1 change: 0 additions & 1 deletion src/credits.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "pokedex.h"
#include "event_data.h"
#include "random.h"
#include "constants/species.h"

enum
{
Expand Down
1 change: 0 additions & 1 deletion src/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "graphics.h"
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/species.h"
#include "constants/trainers.h"
#include "constants/battle_ai.h"

Expand Down
1 change: 0 additions & 1 deletion src/data/bard_music/pokemon.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef GUARD_DATA_BARD_MUSIC_POKEMON_H
#define GUARD_DATA_BARD_MUSIC_POKEMON_H
#include "constants/species.h"

const u16 gNumSpeciesNames = NUM_SPECIES;

Expand Down
1 change: 0 additions & 1 deletion src/data/contest_opponents.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

#include "global.h"
#include "contest.h"
#include "constants/species.h"

#define CONTEST_OPPONENT_JIMMY 0
#define CONTEST_OPPONENT_EDITH 1
Expand Down
2 changes: 0 additions & 2 deletions src/data/easy_chat/easy_chat_group_pokemon.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "constants/species.h"

const u16 gEasyChatGroup_Pokemon[] = {
SPECIES_ABRA,
SPECIES_ABSOL,
Expand Down
2 changes: 0 additions & 2 deletions src/data/easy_chat/easy_chat_group_pokemon2.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "constants/species.h"

const u16 gEasyChatGroup_Pokemon2[] = {
SPECIES_ABRA,
SPECIES_AERODACTYL,
Expand Down
1 change: 0 additions & 1 deletion src/data/lilycove_lady.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "constants/easy_chat.h"
#include "constants/event_objects.h"
#include "constants/items.h"
#include "constants/species.h"
#include "constants/moves.h"

static const u16 sContestLadyMonGfxId[] =
Expand Down
1 change: 0 additions & 1 deletion src/daycare.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/region_map_sections.h"
#include "constants/species.h"

// this file's functions
static void ClearDaycareMonMail(struct DayCareMail *mail);
Expand Down
1 change: 0 additions & 1 deletion src/decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "decompress.h"
#include "pokemon.h"
#include "text.h"
#include "constants/species.h"

EWRAM_DATA ALIGNED(4) u8 gDecompressionBuffer[0x4000] = {0};

Expand Down
1 change: 0 additions & 1 deletion src/dodrio_berry_picking.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "window.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/species.h"

struct DodrioSubstruct_0160
{
Expand Down
1 change: 0 additions & 1 deletion src/easy_chat.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "constants/lilycove_lady.h"
#include "constants/mauville_old_man.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/rgb.h"

#define EZCHAT_TASK_STATE 0
Expand Down
1 change: 0 additions & 1 deletion src/ereader_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "trainer_hill.h"
#include "constants/easy_chat.h"
#include "constants/trainers.h"
#include "constants/species.h"
#include "constants/moves.h"
#include "constants/items.h"

Expand Down
1 change: 0 additions & 1 deletion src/evolution_scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "trade.h"
#include "util.h"
#include "constants/battle_string_ids.h"
#include "constants/species.h"
#include "constants/songs.h"
#include "constants/rgb.h"

Expand Down
1 change: 0 additions & 1 deletion src/field_player_avatar.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "constants/maps.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/trainer_types.h"

static EWRAM_DATA u8 gUnknown_0203734C = 0;
Expand Down
1 change: 0 additions & 1 deletion src/field_poison.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "trainer_hill.h"
#include "constants/field_poison.h"
#include "constants/party_menu.h"
#include "constants/species.h"

static bool32 IsMonValidSpecies(struct Pokemon *pokemon)
{
Expand Down
1 change: 0 additions & 1 deletion src/field_specials.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
#include "constants/script_menu.h"
#include "constants/slot_machine.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/moves.h"
#include "constants/party_menu.h"
#include "constants/battle_frontier.h"
Expand Down
1 change: 0 additions & 1 deletion src/frontier_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "constants/battle_frontier.h"
#include "constants/frontier_util.h"
#include "constants/trainers.h"
#include "constants/species.h"
#include "constants/game_stat.h"
#include "constants/moves.h"
#include "constants/items.h"
Expand Down
1 change: 0 additions & 1 deletion src/hall_of_fame.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "window.h"
#include "credits.h"
#include "bg.h"
#include "constants/species.h"
#include "constants/game_stat.h"
#include "util.h"
#include "string_util.h"
Expand Down
1 change: 0 additions & 1 deletion src/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "intro.h"
#include "graphics.h"
#include "sound.h"
#include "constants/species.h"
#include "util.h"
#include "title_screen.h"
#include "constants/rgb.h"
Expand Down
1 change: 0 additions & 1 deletion src/link_rfu_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "string_util.h"
#include "task.h"
#include "text.h"
#include "constants/species.h"
#include "save.h"
#include "mystery_gift.h"

Expand Down
1 change: 0 additions & 1 deletion src/lottery_corner.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "pokemon.h"
#include "constants/items.h"
#include "random.h"
#include "constants/species.h"
#include "string_util.h"
#include "text.h"
#include "pokemon_storage_system.h"
Expand Down
1 change: 0 additions & 1 deletion src/mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "gpu_regs.h"
#include "bg.h"
#include "pokemon_icon.h"
#include "constants/species.h"
#include "malloc.h"
#include "easy_chat.h"
#include "constants/rgb.h"
Expand Down
1 change: 0 additions & 1 deletion src/mail_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "constants/items.h"
#include "pokemon.h"
#include "pokemon_icon.h"
#include "constants/species.h"
#include "text.h"
#include "international_string_util.h"

Expand Down
Loading

0 comments on commit 5259898

Please sign in to comment.