From 0380c2a493ccc85cd3a6ab3430fb6bed87cf49eb Mon Sep 17 00:00:00 2001 From: Rangi Date: Thu, 25 Jan 2018 17:00:31 -0500 Subject: [PATCH] Move some more constants out of misc_constants.asm --- constants.asm | 70 ++++++++++++++-------------- constants/gfx_constants.asm | 5 ++ constants/misc_constants.asm | 48 +++++++------------ constants/pokemon_data_constants.asm | 9 ++++ 4 files changed, 67 insertions(+), 65 deletions(-) diff --git a/constants.asm b/constants.asm index 4931bdd5f..0cd14bfbe 100644 --- a/constants.asm +++ b/constants.asm @@ -5,48 +5,48 @@ INCLUDE "macros.asm" INCLUDE "hram.asm" INCLUDE "constants/hardware_constants.asm" +INCLUDE "constants/deco_constants.asm" INCLUDE "constants/wram_constants.asm" -INCLUDE "constants/pokemon_constants.asm" -INCLUDE "constants/type_constants.asm" -INCLUDE "constants/move_constants.asm" -INCLUDE "constants/move_effect_constants.asm" -INCLUDE "constants/battle_constants.asm" +INCLUDE "constants/misc_constants.asm" +INCLUDE "constants/input_constants.asm" +INCLUDE "constants/gfx_constants.asm" +INCLUDE "constants/text_constants.asm" +INCLUDE "constants/audio_constants.asm" INCLUDE "constants/battle_anim_constants.asm" +INCLUDE "constants/battle_constants.asm" +INCLUDE "constants/battle_tower_constants.asm" +INCLUDE "constants/collision_constants.asm" +INCLUDE "constants/credits_constants.asm" +INCLUDE "constants/cry_constants.asm" +INCLUDE "constants/engine_flags.asm" +INCLUDE "constants/event_flags.asm" +INCLUDE "constants/icon_constants.asm" +INCLUDE "constants/item_constants.asm" +INCLUDE "constants/item_data_constants.asm" +INCLUDE "constants/landmark_constants.asm" INCLUDE "constants/map_constants.asm" INCLUDE "constants/map_data_constants.asm" INCLUDE "constants/map_setup_constants.asm" -INCLUDE "constants/landmark_constants.asm" -INCLUDE "constants/item_constants.asm" -INCLUDE "constants/item_data_constants.asm" -INCLUDE "constants/trainer_constants.asm" -INCLUDE "constants/trainer_data_constants.asm" -INCLUDE "constants/script_constants.asm" -INCLUDE "constants/event_flags.asm" -INCLUDE "constants/engine_flags.asm" -INCLUDE "constants/music_constants.asm" -INCLUDE "constants/sfx_constants.asm" -INCLUDE "constants/phone_constants.asm" -INCLUDE "constants/credits_constants.asm" -INCLUDE "constants/gfx_constants.asm" -INCLUDE "constants/input_constants.asm" -INCLUDE "constants/pokemon_data_constants.asm" -INCLUDE "constants/icon_constants.asm" -INCLUDE "constants/serial_constants.asm" +INCLUDE "constants/menu_constants.asm" INCLUDE "constants/mobile_constants.asm" -INCLUDE "constants/text_constants.asm" -INCLUDE "constants/misc_constants.asm" -INCLUDE "constants/std_constants.asm" -INCLUDE "constants/deco_constants.asm" -INCLUDE "constants/radio_constants.asm" +INCLUDE "constants/move_constants.asm" +INCLUDE "constants/move_effect_constants.asm" +INCLUDE "constants/music_constants.asm" INCLUDE "constants/npctrade_constants.asm" +INCLUDE "constants/phone_constants.asm" +INCLUDE "constants/pokemon_constants.asm" +INCLUDE "constants/pokemon_data_constants.asm" +INCLUDE "constants/printer_constants.asm" +INCLUDE "constants/radio_constants.asm" +INCLUDE "constants/scgb_constants.asm" +INCLUDE "constants/script_constants.asm" +INCLUDE "constants/serial_constants.asm" +INCLUDE "constants/sfx_constants.asm" +INCLUDE "constants/sprite_anim_constants.asm" INCLUDE "constants/sprite_constants.asm" INCLUDE "constants/sprite_data_constants.asm" -INCLUDE "constants/sprite_anim_constants.asm" +INCLUDE "constants/std_constants.asm" INCLUDE "constants/tileset_constants.asm" -INCLUDE "constants/collision_constants.asm" -INCLUDE "constants/scgb_constants.asm" -INCLUDE "constants/battle_tower_constants.asm" -INCLUDE "constants/cry_constants.asm" -INCLUDE "constants/audio_constants.asm" -INCLUDE "constants/printer_constants.asm" -INCLUDE "constants/menu_constants.asm" +INCLUDE "constants/trainer_constants.asm" +INCLUDE "constants/trainer_data_constants.asm" +INCLUDE "constants/type_constants.asm" diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 1b287b236..a3d68da1a 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -25,6 +25,11 @@ EXP_BAR_LENGTH EQU 8 ; tiles HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels +; GetHPPal return values (see home.asm) +HP_GREEN EQU 0 +HP_YELLOW EQU 1 +HP_RED EQU 2 + ; sprite_oam_struct members (see macros/wram.asm) const_def diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 9af003e5a..a6c0b0888 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -11,11 +11,6 @@ RESET_FLAG EQU 0 SET_FLAG EQU 1 CHECK_FLAG EQU 2 -; GetHPPal return values (see home.asm) -HP_GREEN EQU 0 -HP_YELLOW EQU 1 -HP_RED EQU 2 - ; G/S version ID: 0 = Gold, 1 = Silver (used by checkver) GS_VERSION EQU 0 @@ -27,6 +22,24 @@ SAVE_CHECK_VALUE_2 EQU 127 HMENURETURN_SCRIPT EQU %10000000 HMENURETURN_ASM EQU %11111111 +; time of day boundaries +MORN_HOUR EQU 4 ; 4 AM +DAY_HOUR EQU 10 ; 10 AM +NITE_HOUR EQU 18 ; 6 PM +NOON_HOUR EQU 12 ; 12 PM +MAX_HOUR EQU 24 ; 12 AM + +; significant money values +START_MONEY EQU 3000 +MOM_MONEY EQU 2300 +MAX_MONEY EQU 999999 +MAX_COINS EQU 9999 + +MAX_LINK_RECORD EQU 9999 + +MAX_DAY_CARE_EXP EQU $500000 + + ; DoPlayerMovement.DoStep arguments (see engine/player_movement.asm) const_def const STEP_SLOW ; 0 @@ -38,29 +51,6 @@ HMENURETURN_ASM EQU %11111111 const STEP_BACK_LEDGE ; 6 const STEP_WALK_IN_PLACE ; 7 -; time of day boundaries -MORN_HOUR EQU 4 ; 4 AM -DAY_HOUR EQU 10 ; 10 AM -NITE_HOUR EQU 18 ; 6 PM -NOON_HOUR EQU 12 ; 12 PM -MAX_HOUR EQU 24 ; 12 AM - -; boxes -MONS_PER_BOX EQU 20 -NUM_BOXES EQU 14 - -; hall of fame -HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (MON_NAME_LENGTH +- 1) ; species, id, dvs, level, nick -HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator -NUM_HOF_TEAMS = 30 - -MAX_LINK_RECORD EQU 9999 - -; significant money values -START_MONEY EQU 3000 -MOM_MONEY EQU 2300 -MAX_MONEY EQU 999999 -MAX_COINS EQU 9999 ; ChangeHappiness arguments (see data/happiness_changes.asm) const_value = 1 @@ -84,8 +74,6 @@ const_value = 1 const HAPPINESS_GROOMING ; 12 const HAPPINESS_GAINLEVELATHOME ; 13 -; day-care -MAX_DAY_CARE_EXP EQU $500000 ; bug-catching contest BUG_CONTEST_MINUTES EQU 20 diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index b223f2e15..d07862390 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -120,6 +120,15 @@ CAUGHT_EGG_LEVEL EQU 1 ; maximum number of party pokemon PARTY_LENGTH EQU 6 +; boxes +MONS_PER_BOX EQU 20 +NUM_BOXES EQU 14 + +; hall of fame +HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (MON_NAME_LENGTH +- 1) ; species, id, dvs, level, nick +HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator +NUM_HOF_TEAMS = 30 + ; evolution types (used in data/pokemon/evos_attacks.asm) const_value set 1