diff options
Diffstat (limited to 'include/constants')
-rw-r--r-- | include/constants/battle_setup.h | 14 | ||||
-rw-r--r-- | include/constants/berry.h | 32 | ||||
-rwxr-xr-x | include/constants/event_object_movement.h | 2 | ||||
-rw-r--r-- | include/constants/event_objects.h | 3 | ||||
-rw-r--r-- | include/constants/field_weather.h | 24 | ||||
-rw-r--r-- | include/constants/flags.h | 6 | ||||
-rw-r--r-- | include/constants/global.h | 92 | ||||
-rw-r--r-- | include/constants/items.h | 14 | ||||
-rw-r--r-- | include/constants/map_scripts.h | 11 | ||||
-rw-r--r-- | include/constants/pokemon.h | 4 | ||||
-rw-r--r-- | include/constants/script_menu.h | 34 | ||||
-rw-r--r-- | include/constants/vars.h | 10 |
12 files changed, 238 insertions, 8 deletions
diff --git a/include/constants/battle_setup.h b/include/constants/battle_setup.h new file mode 100644 index 000000000..e1a663e44 --- /dev/null +++ b/include/constants/battle_setup.h @@ -0,0 +1,14 @@ +#ifndef GUARD_CONSTANTS_BATTLE_SETUP_H +#define GUARD_CONSTANTS_BATTLE_SETUP_H + +#define TRAINER_BATTLE_SINGLE 0 +#define TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC 1 +#define TRAINER_BATTLE_CONTINUE_SCRIPT 2 +#define TRAINER_BATTLE_SINGLE_NO_INTRO_TEXT 3 +#define TRAINER_BATTLE_DOUBLE 4 +#define TRAINER_BATTLE_REMATCH 5 +#define TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE 6 +#define TRAINER_BATTLE_REMATCH_DOUBLE 7 +#define TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC 8 + +#endif // GUARD_CONSTANTS_BATTLE_SETUP_H diff --git a/include/constants/berry.h b/include/constants/berry.h new file mode 100644 index 000000000..9dc8474f1 --- /dev/null +++ b/include/constants/berry.h @@ -0,0 +1,32 @@ +#ifndef GUARD_CONSTANTS_BERRY_H +#define GUARD_CONSTANTS_BERRY_H + +#define BERRY_NAME_LENGTH 6 +#define BERRY_REGROW_LIMIT 10 +#define MAX_BERRY_TREES 128 + +#define BERRY_NONE 0 + +#define BERRY_FIRMNESS_UNKNOWN 0 +#define BERRY_FIRMNESS_VERY_SOFT 1 +#define BERRY_FIRMNESS_SOFT 2 +#define BERRY_FIRMNESS_HARD 3 +#define BERRY_FIRMNESS_VERY_HARD 4 +#define BERRY_FIRMNESS_SUPER_HARD 5 + +#define FLAVOR_SPICY 0 +#define FLAVOR_DRY 1 +#define FLAVOR_SWEET 2 +#define FLAVOR_BITTER 3 +#define FLAVOR_SOUR 4 +#define FLAVOR_COUNT 5 + +#define BERRY_STAGE_NO_BERRY 0 // there is no tree planted and the soil is completely flat. +#define BERRY_STAGE_PLANTED 1 +#define BERRY_STAGE_SPROUTED 2 +#define BERRY_STAGE_TALLER 3 +#define BERRY_STAGE_FLOWERING 4 +#define BERRY_STAGE_BERRIES 5 +#define BERRY_STAGE_SPARKLING 255 + +#endif // GUARD_CONSTANTS_BERRY_H diff --git a/include/constants/event_object_movement.h b/include/constants/event_object_movement.h index a93a2ac05..81826c6fc 100755 --- a/include/constants/event_object_movement.h +++ b/include/constants/event_object_movement.h @@ -218,4 +218,6 @@ #define MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_LEFT 0x88 #define MOVEMENT_ACTION_ACRO_END_WHEELIE_MOVE_RIGHT 0x89 +#define MOVEMENT_ACTION_STEP_END 0xFE + #endif // GUARD_CONSTANTS_EVENT_OBJECT_MOVEMENT_H diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h index 21cb3f7f4..f28f315b5 100644 --- a/include/constants/event_objects.h +++ b/include/constants/event_objects.h @@ -252,4 +252,7 @@ #define TRACKS_FOOT 1 #define TRACKS_BIKE_TIRE 2 +#define OBJ_EVENT_ID_PLAYER 0xFF +#define OBJ_EVENT_ID_CAMERA 0x7F + #endif // GUARD_CONSTANTS_EVENT_OBJECTS_H diff --git a/include/constants/field_weather.h b/include/constants/field_weather.h new file mode 100644 index 000000000..e84dbc48c --- /dev/null +++ b/include/constants/field_weather.h @@ -0,0 +1,24 @@ +#ifndef GUARD_CONSTANTS_FIELD_WEATHER_H +#define GUARD_CONSTANTS_FIELD_WEATHER_H + +#define MAX_RAIN_SPRITES 24 +#define NUM_CLOUD_SPRITES 3 +#define NUM_FOG_HORIZONTAL_SPRITES 20 +#define NUM_ASH_SPRITES 20 +#define NUM_FOG_DIAGONAL_SPRITES 20 +#define NUM_SANDSTORM_SPRITES 20 +#define NUM_SWIRL_SANDSTORM_SPRITES 5 + +// Controls how the weather should be changing the screen palettes. +#define WEATHER_PAL_STATE_CHANGING_WEATHER 0 +#define WEATHER_PAL_STATE_SCREEN_FADING_IN 1 +#define WEATHER_PAL_STATE_SCREEN_FADING_OUT 2 +#define WEATHER_PAL_STATE_IDLE 3 + +// Modes for FadeScreen +#define FADE_FROM_BLACK 0 +#define FADE_TO_BLACK 1 +#define FADE_FROM_WHITE 2 +#define FADE_TO_WHITE 3 + +#endif // GUARD_CONSTANTS_FIELD_WEATHER_H diff --git a/include/constants/flags.h b/include/constants/flags.h index a6fa4c806..0fadd7d93 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -219,7 +219,7 @@ #define FLAG_RECEIVED_TM41 0x109 #define FLAG_RECEIVED_LAVARIDGE_EGG 0x10A #define FLAG_RECEIVED_FOSSIL_MON 0x10B -#define FLAG_DECORATION_16 0x10C +#define FLAG_SECRET_BASE_REGISTRY_ENABLED 0x10C #define FLAG_RECEIVED_TM46 0x10D #define FLAG_CONTEST_SKETCH_CREATED 0x10E #define FLAG_EVIL_TEAM_ESCAPED_STERN_SPOKE 0x10F @@ -744,7 +744,7 @@ #define FLAG_ITEM_MT_PYRE_4F_1 0x46A #define FLAG_ITEM_SAFARI_ZONE_SOUTHWEST 0x46B #define FLAG_ITEM_AQUA_HIDEOUT_B1F_3 0x46C -#define FLAG_ITEM_MOSSDEEP_STEVENS_HOUSE_1 0x46D +#define FLAG_ITEM_MOSSDEEP_STEVENS_HOUSE_HM08 0x46D #define FLAG_ITEM_MAGMA_HIDEOUT_B1F_3 0x46E #define FLAG_ITEM_ROUTE104_4 0x46F @@ -901,6 +901,6 @@ // SPECIAL FLAGS (unknown purpose) #define FLAG_SPECIAL_FLAG_0 0x4000 -#define FLAG_SPECIAL_FLAG_1 0x4001 +#define FLAG_DONT_TRANSITION_MUSIC 0x4001 #endif // GUARD_CONSTANTS_FLAGS_H diff --git a/include/constants/global.h b/include/constants/global.h new file mode 100644 index 000000000..cd60f0be4 --- /dev/null +++ b/include/constants/global.h @@ -0,0 +1,92 @@ +#ifndef GUARD_CONSTANTS_GLOBAL_H +#define GUARD_CONSTANTS_GLOBAL_H +// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen. +// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen. +// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------". +// Gen 5 and up read Diamond, Pearl, or Platinum's ID as "Sinnoh". +// In Gen 4 and up, migrated Pokemon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string. +#define VERSION_SAPPHIRE 1 +#define VERSION_RUBY 2 +#define VERSION_EMERALD 3 +#define VERSION_FIRE_RED 4 +#define VERSION_LEAF_GREEN 5 +#define VERSION_HEART_GOLD 7 +#define VERSION_SOUL_SILVER 8 +#define VERSION_DIAMOND 10 +#define VERSION_PEARL 11 +#define VERSION_PLATINUM 12 +#define VERSION_GAMECUBE 15 + +#define LANGUAGE_JAPANESE 1 +#define LANGUAGE_ENGLISH 2 +#define LANGUAGE_FRENCH 3 +#define LANGUAGE_ITALIAN 4 +#define LANGUAGE_GERMAN 5 +#define LANGUAGE_KOREAN 6 // 6 goes unused but the theory is it was meant to be Korean +#define LANGUAGE_SPANISH 7 +#define NUM_LANGUAGES 7 + +#if defined(ENGLISH) +#define GAME_LANGUAGE (LANGUAGE_ENGLISH) +#elif defined(GERMAN) +#define GAME_LANGUAGE (LANGUAGE_GERMAN) +#endif + +#if defined(SAPPHIRE) +#define GAME_VERSION (VERSION_SAPPHIRE) +#elif defined(RUBY) +#define GAME_VERSION (VERSION_RUBY) +#endif + +// capacities of various saveblock objects +#define DAYCARE_MON_COUNT 2 +#define POKEBLOCKS_COUNT 40 +#define OBJECT_EVENTS_COUNT 16 +#define BERRY_TREES_COUNT 128 +#define FLAGS_COUNT 288 +#define VARS_COUNT 256 +#define MAIL_COUNT 16 +#define SECRET_BASES_COUNT 20 +#define TV_SHOWS_COUNT 25 +#define POKE_NEWS_COUNT 16 +#define PC_ITEMS_COUNT 50 +#define BAG_ITEMS_COUNT 20 +#define BAG_KEYITEMS_COUNT 20 +#define BAG_POKEBALLS_COUNT 16 +#define BAG_TMHM_COUNT 64 +#define BAG_BERRIES_COUNT 46 +#define OBJECT_EVENT_TEMPLATES_COUNT 64 +#define DECOR_MAX_SECRET_BASE 16 +#define DECOR_MAX_PLAYERS_HOUSE 12 +#define MAX_REMATCH_ENTRIES 100 + +#define TRAINER_ID_LENGTH 4 +#define MAX_MON_MOVES 4 +#define NUM_STATS 6 +#define PARTY_SIZE 6 + +#define MALE 0 +#define FEMALE 1 +#define GENDER_COUNT 2 + +#define OPTIONS_BUTTON_MODE_NORMAL 0 +#define OPTIONS_BUTTON_MODE_LR 1 +#define OPTIONS_BUTTON_MODE_L_EQUALS_A 2 + +#define OPTIONS_TEXT_SPEED_SLOW 0 +#define OPTIONS_TEXT_SPEED_MID 1 +#define OPTIONS_TEXT_SPEED_FAST 2 + +#define OPTIONS_SOUND_MONO 0 +#define OPTIONS_SOUND_STEREO 1 + +#define OPTIONS_BATTLE_STYLE_SHIFT 0 +#define OPTIONS_BATTLE_STYLE_SET 1 + +#define BAG_ITEMS 1 +#define BAG_POKEBALLS 2 +#define BAG_TMsHMs 3 +#define BAG_BERRIES 4 +#define BAG_KEYITEMS 5 + +#endif // GUARD_CONSTANTS_GLOBAL_H diff --git a/include/constants/items.h b/include/constants/items.h index a52c72599..9dd381076 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -363,11 +363,23 @@ #define ITEM_15B 347 #define ITEM_15C 348 +#define ITEMS_COUNT 349 +#define ITEM_FIELD_ARROW ITEMS_COUNT + #define NUM_TECHNICAL_MACHINES 50 #define NUM_HIDDEN_MACHINES 8 +#define MAX_BAG_ITEM_CAPACITY 99 +#define MAX_PC_ITEM_CAPACITY 999 +#define MAX_BERRY_CAPACITY 999 + +#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY +#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY + +#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1)) + // Check if the item is one that can be used on a Pokemon. -#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) +#define ITEM_HAS_EFFECT(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) #define IS_ITEM_MAIL(item) ((item) >= ITEM_ORANGE_MAIL && (item) <= ITEM_RETRO_MAIL) diff --git a/include/constants/map_scripts.h b/include/constants/map_scripts.h new file mode 100644 index 000000000..d096edb90 --- /dev/null +++ b/include/constants/map_scripts.h @@ -0,0 +1,11 @@ +#ifndef GUARD_CONSTANTS_MAP_SCRIPTS_H +#define GUARD_CONSTANTS_MAP_SCRIPTS_H + +#define MAP_SCRIPT_ON_LOAD 1 +#define MAP_SCRIPT_ON_FRAME_TABLE 2 +#define MAP_SCRIPT_ON_TRANSITION 3 +#define MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE 4 +#define MAP_SCRIPT_ON_RESUME 5 +#define MAP_SCRIPT_ON_DIVE_WARP 6 + +#endif // GUARD_CONSTANTS_MAP_SCRIPTS_H diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 8e7c01eb5..5d1539179 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -141,4 +141,8 @@ #define NUM_STATS 6 #define UNOWN_FORM_COUNT 28 +#define PLAYER_HAS_TWO_USABLE_MONS 0 +#define PLAYER_HAS_ONE_MON 1 +#define PLAYER_HAS_ONE_USABLE_MON 2 + #endif // GUARD_CONSTANTS_POKEMON_H diff --git a/include/constants/script_menu.h b/include/constants/script_menu.h new file mode 100644 index 000000000..fc429b620 --- /dev/null +++ b/include/constants/script_menu.h @@ -0,0 +1,34 @@ +#ifndef GUARD_SCRIPT_MENU_CONSTANTS_H +#define GUARD_SCRIPT_MENU_CONSTANTS_H + +#define MULTICHOICE(name) {name, ARRAY_COUNT(name)} + +#define MAX_MULTICHOICE_WIDTH 28 + +#define MULTI_B_PRESSED 127 + +// Multichoice Ids +// TODO + +// Std String Ids +#define STDSTRING_COOL 0 +#define STDSTRING_BEAUTY 1 +#define STDSTRING_CUTE 2 +#define STDSTRING_SMART 3 +#define STDSTRING_TOUGH 4 +#define STDSTRING_NORMAL 5 +#define STDSTRING_SUPER 6 +#define STDSTRING_HYPER 7 +#define STDSTRING_MASTER 8 +#define STDSTRING_COOL2 9 +#define STDSTRING_BEAUTY2 10 +#define STDSTRING_CUTE2 11 +#define STDSTRING_SMART2 12 +#define STDSTRING_TOUGH2 13 +#define STDSTRING_ITEMS 14 +#define STDSTRING_KEYITEMS 15 +#define STDSTRING_POKEBALLS 16 +#define STDSTRING_TMHMS 17 +#define STDSTRING_BERRIES 18 + +#endif //GUARD_SCRIPT_MENU_CONSTANTS_H diff --git a/include/constants/vars.h b/include/constants/vars.h index 795498212..e7917ee0f 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_VARS_H #define GUARD_CONSTANTS_VARS_H -#define VAR_0x3F20 0x3F20 - #define VARS_START 0x4000 // temporary vars @@ -110,7 +108,7 @@ #define VAR_LINK_CONTEST_ROOM_STATE 0x4086 #define VAR_CABLE_CLUB_STATE 0x4087 #define VAR_CONTEST_LOCATION 0x4088 -#define VAR_0x4089 0x4089 // TODO: related to decorations +#define VAR_SECRET_BASE_INITIALIZED 0x4089 #define VAR_CONTEST_PRIZE_PICKUP 0x408A #define VAR_LITTLEROOT_HOUSES_STATE_2 0x408C // TODO: needs more investigation @@ -124,7 +122,7 @@ #define VAR_LILYCOVE_MUSEUM_2F_STATE 0x4094 #define VAR_LILYCOVE_FAN_CLUB_STATE 0x4095 #define VAR_BRINEY_LOCATION 0x4096 -#define VAR_0x4097 0x4097 // TODO: related to creating new secret base +#define VAR_INIT_SECRET_BASE 0x4097 #define VAR_PETALBURG_WOODS_STATE 0x4098 #define VAR_LILYCOVE_CONTEST_LOBBY_STATE 0x4099 #define VAR_RUSTURF_TUNNEL_STATE 0x409a @@ -172,6 +170,8 @@ #define VAR_STEVENS_HOUSE_STATE 0x40C6 #define VAR_OLDALE_STATE 0x40C7 +#define VARS_END 0x40FF + #define SPECIAL_VARS_START 0x8000 // special vars // They are commonly used as parameters to commands, or return values from commands. @@ -194,4 +194,6 @@ #define VAR_CONTEST_RANK 0x8010 #define VAR_CONTEST_CATEGORY 0x8011 +#define SPECIAL_VARS_END 0x8015 + #endif // GUARD_CONSTANTS_VARS_H |