summaryrefslogtreecommitdiff
path: root/constants
diff options
context:
space:
mode:
Diffstat (limited to 'constants')
-rw-r--r--constants/collision_constants.asm4
-rw-r--r--constants/engine_flags.asm4
-rw-r--r--constants/event_flags.asm60
-rw-r--r--constants/gfx_constants.asm1
-rw-r--r--constants/hardware_constants.asm11
-rw-r--r--constants/landmark_constants.asm5
-rw-r--r--constants/map_constants.asm2
-rw-r--r--constants/map_data_constants.asm2
-rw-r--r--constants/misc_constants.asm2
-rw-r--r--constants/pokemon_constants.asm4
-rw-r--r--constants/pokemon_data_constants.asm2
-rw-r--r--constants/scgb_constants.asm6
-rw-r--r--constants/serial_constants.asm5
-rw-r--r--constants/trainer_constants.asm2
-rw-r--r--constants/wram_constants.asm19
15 files changed, 76 insertions, 53 deletions
diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm
index 5626cb094..226f1a1fa 100644
--- a/constants/collision_constants.asm
+++ b/constants/collision_constants.asm
@@ -1,11 +1,11 @@
-; collision permissions (see data/collision_permissions.asm)
+; collision permissions (see data/collision/collision_permissions.asm)
LAND_TILE EQU $00
WATER_TILE EQU $01
WALL_TILE EQU $0f
TALK EQU $10
; collision data types (see data/tilesets/*_collision.asm)
-; TileCollisionTable indexes (see data/collision_permissions.asm)
+; TileCollisionTable indexes (see data/collision/collision_permissions.asm)
COLL_FLOOR EQU $00
COLL_01 EQU $01 ; garbage
COLL_03 EQU $03 ; garbage
diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm
index 800e7651b..5b45c4b22 100644
--- a/constants/engine_flags.asm
+++ b/constants/engine_flags.asm
@@ -15,7 +15,7 @@
const ENGINE_MOM_SAVING_MONEY
const ENGINE_MOM_ACTIVE
; wUnusedTwoDayTimerOn
- const ENGINE_0A
+ const ENGINE_UNUSED_TWO_DAY_TIMER_ON
; wStatusFlags
const ENGINE_POKEDEX
const ENGINE_UNOWN_DEX
@@ -115,7 +115,7 @@
; wSwarmFlags
const ENGINE_BUENAS_PASSWORD_2
const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
-; wGameTimerPause
+; wGameTimerPaused
const ENGINE_62
; wPlayerGender
const ENGINE_PLAYER_IS_FEMALE
diff --git a/constants/event_flags.asm b/constants/event_flags.asm
index 850b33e85..f4541e46f 100644
--- a/constants/event_flags.asm
+++ b/constants/event_flags.asm
@@ -136,9 +136,9 @@
const EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE
const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS
const EVENT_BURNED_TOWER_1F_HIDDEN_ETHER
- const_skip ; unused
- const_skip ; unused
- const_skip ; unused
+ const_skip ; unused in Crystal
+ const_skip ; unused in Crystal
+ const_skip ; unused in Crystal
const EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL
const EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION
const EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE
@@ -281,11 +281,11 @@
const EVENT_GAVE_KURT_PNK_APRICORN
; Phone events
const EVENT_JACK_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_HUEY_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_GOT_PROTEIN_FROM_HUEY
const EVENT_GOT_HP_UP_FROM_JOEY
const EVENT_GOT_CARBOS_FROM_VANCE
@@ -293,55 +293,55 @@
const EVENT_GOT_CALCIUM_FROM_ERIN
const EVENT_KENJI_ON_BREAK
const EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_BETH_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_JOSE_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_REENA_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_JOEY_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_WADE_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_RALPH_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_LIZ_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_ANTHONY_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_TODD_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_GINA_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_IRWIN_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_ARNIE_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_ALAN_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const_skip ; unused
const_skip ; unused
const EVENT_DANA_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_CHAD_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_DEREK_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_TULLY_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_BRENT_ASKED_FOR_PHONE_NUMBER
const_skip ; unused
const EVENT_TIFFANY_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_VANCE_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_WILTON_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_KENJI_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_PARRY_ASKED_FOR_PHONE_NUMBER
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_ERIN_ASKED_FOR_PHONE_NUMBER
const EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD
const_skip ; unused
@@ -1229,7 +1229,7 @@
const EVENT_COPYCAT_2
const EVENT_GOLDENROD_SALE_OFF
const EVENT_GOLDENROD_SALE_ON
- const_skip ; unused
+ const_skip ; unused in Crystal
const EVENT_ILEX_FOREST_APPRENTICE
const EVENT_ILEX_FOREST_CHARCOAL_MASTER
const EVENT_CHARCOAL_KILN_FARFETCH_D
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm
index f1d53085b..5e7391458 100644
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -21,6 +21,7 @@ SCREEN_META_WIDTH EQU 6 ; metatiles
SCREEN_META_HEIGHT EQU 5 ; metatiles
SURROUNDING_WIDTH EQU SCREEN_META_WIDTH * METATILE_WIDTH ; tiles
SURROUNDING_HEIGHT EQU SCREEN_META_HEIGHT * METATILE_WIDTH ; tiles
+MAP_CONNECTION_PADDING_WIDTH EQU 3 ; metatiles
HP_BAR_LENGTH EQU 6 ; tiles
EXP_BAR_LENGTH EQU 8 ; tiles
diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm
index ed5447e28..490da9c19 100644
--- a/constants/hardware_constants.asm
+++ b/constants/hardware_constants.asm
@@ -71,10 +71,10 @@ rTIMA EQU $ff05 ; Timer counter (R/W)
rTMA EQU $ff06 ; Timer Modulo (R/W)
rTAC EQU $ff07 ; Timer Control (R/W)
rTAC_ON EQU 2
-rTAC_4096_HZ EQU 0
-rTAC_262144_HZ EQU 1
-rTAC_65536_HZ EQU 2
-rTAC_16384_HZ EQU 3
+rTAC_4096_HZ EQU %00
+rTAC_262144_HZ EQU %01
+rTAC_65536_HZ EQU %10
+rTAC_16384_HZ EQU %11
rIF EQU $ff0f ; Interrupt Flag (R/W)
rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W)
rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W)
@@ -147,6 +147,9 @@ rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High
rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low
rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start
rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port
+rRP_LED_ON EQU 0
+rRP_RECEIVING EQU 1
+rRP_ENABLE_READ_MASK EQU %11000000
rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index
rBGPI_AUTO_INCREMENT EQU 7 ; increment rBGPI after write to rBGPD
rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data
diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm
index ccdc0f849..9b562288c 100644
--- a/constants/landmark_constants.asm
+++ b/constants/landmark_constants.asm
@@ -102,8 +102,9 @@ KANTO_LANDMARK EQU const_value
const LANDMARK_FAST_SHIP ; 5f
; used in CaughtData
-LANDMARK_GIFT EQU $7e
-LANDMARK_EVENT EQU $7f
+ const_def $7f, -1
+ const LANDMARK_EVENT ; $7f
+ const LANDMARK_GIFT ; $7e
; Regions
const_def
diff --git a/constants/map_constants.asm b/constants/map_constants.asm
index e946a2856..233c19935 100644
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -1,5 +1,5 @@
newgroup: MACRO
-const_value = const_value + 1
+ const_skip
__map_value__ = 1
ENDM
diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm
index d288e07d5..533157101 100644
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -66,7 +66,7 @@ NUM_MAP_PALETTES EQU const_value
shift_const NORTH
; SpawnPoints indexes (see data/maps/spawn_points.asm)
-const_value = -1
+ const_def -1
const SPAWN_N_A
const SPAWN_HOME
const SPAWN_DEBUG
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index a3c31141c..92e66f06b 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -14,6 +14,8 @@ FEMALE EQU 1
; G/S version ID: 0 = Gold, 1 = Silver (used by checkver)
GS_VERSION EQU 0
+; Pokémon Pikachu 2, a step counter / virtual pet device (used by Mystery Gift)
+POKEMON_PIKACHU_2_VERSION EQU 3
; save file corruption check values
SAVE_CHECK_VALUE_1 EQU 99
diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm
index edb9fc2e0..6f38f20c7 100644
--- a/constants/pokemon_constants.asm
+++ b/constants/pokemon_constants.asm
@@ -10,14 +10,14 @@
; - PokemonPalettes (see data/pokemon/palettes.asm)
; - PokedexDataPointerTable (see data/pokemon/dex_entry_pointers.asm)
; - AlphabeticalPokedexOrder (see data/pokemon/dex_order_alpha.asm)
-; - EZChat_SortedPokemon (see data/pokemon/ezchat_order.asm)
; - NewPokedexOrder (see data/pokemon/dex_order_new.asm)
; - Pokered_MonIndices (see data/pokemon/gen1_order.asm)
+; - Footprints (see gfx/footprints.asm)
; - AnimationPointers (see gfx/pokemon/anim_pointers.asm)
; - AnimationIdlePointers (see gfx/pokemon/idle_pointers.asm)
; - BitmasksPointers (see gfx/pokemon/bitmask_pointers.asm)
; - FramesPointers (see gfx/pokemon/frame_pointers.asm)
-; - Footprints (see gfx/footprints.asm)
+; - EZChat_SortedPokemon (see data/pokemon/ezchat_order.asm)
const_def 1
const BULBASAUR ; 01
const IVYSAUR ; 02
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
index 61e28f6f2..328a6a6fa 100644
--- a/constants/pokemon_data_constants.asm
+++ b/constants/pokemon_data_constants.asm
@@ -179,7 +179,7 @@ NUM_TREEMON_SETS EQU const_value
const TREEMON_SCORE_RARE ; 2
; ChangeHappiness arguments (see data/happiness_changes.asm)
-const_value = 1
+ const_def 1
const HAPPINESS_GAINLEVEL ; 01
const HAPPINESS_USEDITEM ; 02
const HAPPINESS_USEDXITEM ; 03
diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm
index 785bf3933..eac530a44 100644
--- a/constants/scgb_constants.asm
+++ b/constants/scgb_constants.asm
@@ -35,6 +35,12 @@
SCGB_PARTY_MENU_HP_BARS EQU $fc
SCGB_DEFAULT EQU $ff
+; GetCrystalCGBLayout arguments (see engine/gfx/crystal_layouts.asm)
+ const_def
+ const CRYSTAL_CGB_MOBILE_0
+ const CRYSTAL_CGB_MOBILE_1
+ const CRYSTAL_CGB_NAME_CARD
+
; PredefPals indexes (see gfx/sgb/predef.pal)
; GetPredefPal arguments (see engine/gfx/color.asm)
const_def
diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm
index 0b711e877..715534372 100644
--- a/constants/serial_constants.asm
+++ b/constants/serial_constants.asm
@@ -30,3 +30,8 @@ SERIAL_NO_DATA_BYTE EQU $fe
SERIAL_PATCH_LIST_PART_TERMINATOR EQU $ff
SERIAL_PREAMBLE_LENGTH EQU 6
+
+; timeout duration after exchanging a byte
+SERIAL_LINK_BYTE_TIMEOUT EQU $5000
+
+MAX_MYSTERY_GIFT_PARTNERS EQU 5
diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm
index cbc28e87e..4d45b7a11 100644
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -3,7 +3,7 @@ __trainer_class__ = 0
trainerclass: MACRO
\1 EQU __trainer_class__
__trainer_class__ = __trainer_class__ + 1
-const_value = 1
+ const_def 1
ENDM
; trainer class ids
diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm
index c571faf8b..2b3d61e36 100644
--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -21,9 +21,13 @@ AUTO_INPUT EQU $ff
const TEMPMON ; 3
const WILDMON ; 4
-; wGameTimerPause::
-GAMETIMERPAUSE_TIMER_PAUSED_F EQU 0
-GAMETIMERPAUSE_MOBILE_7_F EQU 7
+; wGameTimerPaused::
+GAME_TIMER_PAUSED_F EQU 0
+GAME_TIMER_MOBILE_F EQU 7
+
+; wJoypadDisable::
+JOYPAD_DISABLE_MON_FAINT_F EQU 6
+JOYPAD_DISABLE_SGB_TRANSFER_F EQU 7
; wOptions::
TEXT_DELAY_MASK EQU %111
@@ -80,11 +84,12 @@ LEFT_MASK EQU 1 << LEFT
RIGHT_MASK EQU 1 << RIGHT
; wFacingDirection::
+ const_def NUM_DIRECTIONS - 1, -1
+ shift_const FACE_DOWN ; 8
+ shift_const FACE_UP ; 4
+ shift_const FACE_LEFT ; 2
+ shift_const FACE_RIGHT ; 1
FACE_CURRENT EQU 0
-FACE_DOWN EQU 8
-FACE_UP EQU 4
-FACE_LEFT EQU 2
-FACE_RIGHT EQU 1
; wPokemonWithdrawDepositParameter::
PC_WITHDRAW EQU 0