summaryrefslogtreecommitdiff
path: root/constants
diff options
context:
space:
mode:
authorThomas Winwood <twwinwood@gmail.com>2018-07-21 02:06:31 +0100
committerGitHub <noreply@github.com>2018-07-21 02:06:31 +0100
commit23ef2f50a7b94c23b50e9e690a7482ac349c9ef3 (patch)
tree63c20c67efbdf8334c6e273f78065b83135e3886 /constants
parent17a4d0540acc00e3f5ad260009115eb36e72b7d2 (diff)
parent2d73d040d16a7836f935a7a6cb2a311aed2ca5a2 (diff)
Merge branch 'master' into the-diffening
Diffstat (limited to 'constants')
-rw-r--r--constants/battle_constants.asm1
-rw-r--r--constants/collision_constants.asm2
-rw-r--r--constants/gfx_constants.asm4
-rw-r--r--constants/hardware_constants.asm10
-rw-r--r--constants/item_data_constants.asm49
-rw-r--r--constants/landmark_constants.asm1
-rw-r--r--constants/map_data_constants.asm4
-rw-r--r--constants/map_object_constants.asm2
-rw-r--r--constants/mart_constants.asm44
-rw-r--r--constants/menu_constants.asm2
-rw-r--r--constants/npc_trade_constants.asm1
-rw-r--r--constants/pokemon_data_constants.asm10
-rw-r--r--constants/script_constants.asm19
-rw-r--r--constants/sfx_constants.asm4
-rw-r--r--constants/wram_constants.asm10
15 files changed, 70 insertions, 93 deletions
diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm
index 64e99d1d7..e9fe6acbd 100644
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -61,6 +61,7 @@ MOVE_LENGTH EQU const_value
const STAT_DEF
const STAT_SPD
const STAT_SATK
+NUM_EXP_STATS EQU const_value + -1
const STAT_SDEF
NUM_STATS EQU const_value
STAT_SPC EQU STAT_SATK
diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm
index 86fdf9384..b693dc8f8 100644
--- a/constants/collision_constants.asm
+++ b/constants/collision_constants.asm
@@ -113,3 +113,5 @@ HI_NYBBLE_WALK EQU $40
HI_NYBBLE_WALK_ALT EQU $50
HI_NYBBLE_WARPS EQU $70
HI_NYBBLE_LEDGES EQU $a0
+HI_NYBBLE_SIDE_WALLS EQU $b0
+HI_NYBBLE_UNUSED_C0 EQU $c0
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm
index 0da273f89..41a67a648 100644
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -8,7 +8,6 @@ PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE
PALRGB_WHITE EQUS "palred 31 + palgreen 31 + palblue 31" ; $7fff
-
SCREEN_WIDTH EQU 20 ; tiles
SCREEN_HEIGHT EQU 18 ; tiles
SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
@@ -23,7 +22,6 @@ SCREEN_META_HEIGHT EQU 5 ; metatiles
SURROUNDING_WIDTH EQU SCREEN_META_WIDTH * METATILE_WIDTH ; tiles
SURROUNDING_HEIGHT EQU SCREEN_META_HEIGHT * METATILE_WIDTH ; tiles
-
HP_BAR_LENGTH EQU 6 ; tiles
EXP_BAR_LENGTH EQU 8 ; tiles
HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
@@ -34,7 +32,6 @@ HP_GREEN EQU 0
HP_YELLOW EQU 1
HP_RED EQU 2
-
; sprite_oam_struct members (see macros/wram.asm)
const_def
const SPRITEOAMSTRUCT_YCOORD ; 0
@@ -44,7 +41,6 @@ HP_RED EQU 2
SPRITEOAMSTRUCT_LENGTH EQU const_value
NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wVirtualOAM
-
; PokeAnims indexes (see engine/gfx/pic_animation.asm)
const_def
const ANIM_MON_SLOW
diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm
index d96672c3a..34c7d6813 100644
--- a/constants/hardware_constants.asm
+++ b/constants/hardware_constants.asm
@@ -58,10 +58,6 @@ X_FLIP EQU 1 << OAM_X_FLIP ; $20
Y_FLIP EQU 1 << OAM_Y_FLIP ; $40
PRIORITY EQU 1 << OAM_PRIORITY ; $80
-; Other useful constants
-LCDC_DEFAULT EQU %11100011
-LY_VBLANK EQU 144
-
; Hardware registers
rJOYP EQU $ff00 ; Joypad (R/W)
rSB EQU $ff01 ; Serial transfer data (R/W)
@@ -119,14 +115,20 @@ rWave_d EQU $ff3d
rWave_e EQU $ff3e
rWave_f EQU $ff3f
rLCDC EQU $ff40 ; LCD Control (R/W)
+rLCDC_BG_PRIORITY EQU 0 ; 0=Off, 1=On
rLCDC_SPRITES_ENABLE EQU 1 ; 0=Off, 1=On
rLCDC_SPRITE_SIZE EQU 2 ; 0=8x8, 1=8x16
+rLCDC_BG_TILEMAP EQU 3 ; 0=9800-9BFF, 1=9C00-9FFF
+rLCDC_TILE_DATA EQU 4 ; 0=8800-97FF, 1=8000-8FFF
+rLCDC_WINDOW_ENABLE EQU 5 ; 0=Off, 1=On
rLCDC_WINDOW_TILEMAP EQU 6 ; 0=9800-9BFF, 1=9C00-9FFF
rLCDC_ENABLE EQU 7 ; 0=Off, 1=On
+LCDC_DEFAULT EQU (1 << rLCDC_ENABLE) | (1 << rLCDC_WINDOW_TILEMAP) | (1 << rLCDC_WINDOW_ENABLE) | (1 << rLCDC_SPRITES_ENABLE) | (1 << rLCDC_BG_PRIORITY)
rSTAT EQU $ff41 ; LCDC Status (R/W)
rSCY EQU $ff42 ; Scroll Y (R/W)
rSCX EQU $ff43 ; Scroll X (R/W)
rLY EQU $ff44 ; LCDC Y-Coordinate (R)
+LY_VBLANK EQU 144
rLYC EQU $ff45 ; LY Compare (R/W)
rDMA EQU $ff46 ; DMA Transfer and Start Address (W)
rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only
diff --git a/constants/item_data_constants.asm b/constants/item_data_constants.asm
index e503f3057..5040ab047 100644
--- a/constants/item_data_constants.asm
+++ b/constants/item_data_constants.asm
@@ -32,7 +32,6 @@ NO_LIMITS EQU 0
CANT_SELECT EQU 1 << CANT_SELECT_F
CANT_TOSS EQU 1 << CANT_TOSS_F
-
; pack pockets
const_def
const ITEM_POCKET ; 0
@@ -46,14 +45,12 @@ MAX_BALLS EQU 12
MAX_KEY_ITEMS EQU 25
MAX_PC_ITEMS EQU 50
-
; mail
MAIL_LINE_LENGTH EQU $10
MAIL_MSG_LENGTH EQU $20
MAILBOX_CAPACITY EQU 10
MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
-
; held item effects
const_def
const HELD_NONE
@@ -129,49 +126,3 @@ MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
const HELD_BRIGHTPOWDER
const HELD_78
const HELD_FOCUS_BAND
-
-
-; mart types (see engine/items/mart.asm)
- const_def
- const MARTTYPE_STANDARD
- const MARTTYPE_BITTER
- const MARTTYPE_BARGAIN
- const MARTTYPE_PHARMACY
- const MARTTYPE_ROOFTOP
-
-; Marts indexes (see data/items/marts.asm)
- const_def
- const MART_CHERRYGROVE
- const MART_CHERRYGROVE_DEX
- const MART_VIOLET
- const MART_AZALEA
- const MART_CIANWOOD
- const MART_GOLDENROD_2F_1
- const MART_GOLDENROD_2F_2
- const MART_GOLDENROD_3F
- const MART_GOLDENROD_4F
- const MART_GOLDENROD_5F_1
- const MART_GOLDENROD_5F_2
- const MART_GOLDENROD_5F_3
- const MART_GOLDENROD_5F_4
- const MART_OLIVINE
- const MART_ECRUTEAK
- const MART_MAHOGANY_1
- const MART_MAHOGANY_2
- const MART_BLACKTHORN
- const MART_VIRIDIAN
- const MART_PEWTER
- const MART_CERULEAN
- const MART_LAVENDER
- const MART_VERMILION
- const MART_CELADON_2F_1
- const MART_CELADON_2F_2
- const MART_CELADON_3F
- const MART_CELADON_4F
- const MART_CELADON_5F_1
- const MART_CELADON_5F_2
- const MART_FUCHSIA
- const MART_SAFFRON
- const MART_MT_MOON
- const MART_INDIGO_PLATEAU
- const MART_UNDERGROUND
diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm
index 5f74b3386..a07af44f8 100644
--- a/constants/landmark_constants.asm
+++ b/constants/landmark_constants.asm
@@ -105,7 +105,6 @@ KANTO_LANDMARK EQU const_value
GIFT_LOCATION EQU $7e
EVENT_LOCATION EQU $7f
-
; Regions
const_def
const JOHTO_REGION ; 0
diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm
index 9a160a2fa..5098e28df 100644
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -3,7 +3,6 @@ MAP_N_A EQU -1
GROUP_NONE EQU 0
MAP_NONE EQU 0
-
; map struct members (see data/maps/maps.asm)
const_def
const MAP_MAPATTRIBUTES_BANK ; 0
@@ -51,7 +50,6 @@ MAP_NONE EQU 0
const FISHGROUP_REMORAID
const FISHGROUP_QWILFISH_NO_SWARM
-
; connection directions (see data/maps/data.asm)
const_def
const EAST_F
@@ -66,7 +64,6 @@ MAP_NONE EQU 0
shift_const SOUTH
shift_const NORTH
-
; SpawnPoints indexes (see data/maps/spawn_points.asm)
const_value = -1
const SPAWN_N_A
@@ -102,7 +99,6 @@ const_value = -1
const SPAWN_FAST_SHIP
NUM_SPAWNS EQU const_value
-
; outdoor sprite limits (see engine/overworld/overworld.asm)
MAX_OUTDOOR_SPRITES EQU 23
SPRITE_GFX_LIST_CAPACITY EQU $20
diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm
index ee0b21356..55a3f358b 100644
--- a/constants/map_object_constants.asm
+++ b/constants/map_object_constants.asm
@@ -126,7 +126,6 @@ NUM_SPRITEMOVEDATA_FIELDS EQU const_value
MAPOBJECT_SCREEN_WIDTH EQU (SCREEN_WIDTH / 2) + 2
MAPOBJECT_SCREEN_HEIGHT EQU (SCREEN_HEIGHT / 2) + 2
-
; SpriteMovementData indexes (see data/sprites/map_objects.asm)
const_def
const SPRITEMOVEDATA_00 ; 00
@@ -283,7 +282,6 @@ NUM_SPRITEMOVEDATA EQU const_value
const FACING_GRASS_1 ; 1e
const FACING_GRASS_2 ; 1f
-
; DoPlayerMovement.DoStep arguments (see engine/overworld/player_movement.asm)
const_def
const STEP_SLOW ; 0
diff --git a/constants/mart_constants.asm b/constants/mart_constants.asm
new file mode 100644
index 000000000..c4834f524
--- /dev/null
+++ b/constants/mart_constants.asm
@@ -0,0 +1,44 @@
+; mart types (see engine/items/mart.asm)
+ const_def
+ const MARTTYPE_STANDARD
+ const MARTTYPE_BITTER
+ const MARTTYPE_BARGAIN
+ const MARTTYPE_PHARMACY
+ const MARTTYPE_ROOFTOP
+
+; Marts indexes (see data/items/marts.asm)
+ const_def
+ const MART_CHERRYGROVE
+ const MART_CHERRYGROVE_DEX
+ const MART_VIOLET
+ const MART_AZALEA
+ const MART_CIANWOOD
+ const MART_GOLDENROD_2F_1
+ const MART_GOLDENROD_2F_2
+ const MART_GOLDENROD_3F
+ const MART_GOLDENROD_4F
+ const MART_GOLDENROD_5F_1
+ const MART_GOLDENROD_5F_2
+ const MART_GOLDENROD_5F_3
+ const MART_GOLDENROD_5F_4
+ const MART_OLIVINE
+ const MART_ECRUTEAK
+ const MART_MAHOGANY_1
+ const MART_MAHOGANY_2
+ const MART_BLACKTHORN
+ const MART_VIRIDIAN
+ const MART_PEWTER
+ const MART_CERULEAN
+ const MART_LAVENDER
+ const MART_VERMILION
+ const MART_CELADON_2F_1
+ const MART_CELADON_2F_2
+ const MART_CELADON_3F
+ const MART_CELADON_4F
+ const MART_CELADON_5F_1
+ const MART_CELADON_5F_2
+ const MART_FUCHSIA
+ const MART_SAFFRON
+ const MART_MT_MOON
+ const MART_INDIGO_PLATEAU
+ const MART_UNDERGROUND
diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm
index 46c65474d..7c5f23377 100644
--- a/constants/menu_constants.asm
+++ b/constants/menu_constants.asm
@@ -32,7 +32,6 @@
shift_const SCROLLINGMENU_ENABLE_START
shift_const SCROLLINGMENU_ENABLE_SELECT
-
; MonMenuOptions indexes (see data/mon_menu.asm)
; used by PokemonActionSubmenu (see engine/menus/start_menu.asm)
const_def 1
@@ -70,7 +69,6 @@ NUM_MONMENU_ITEMS EQU 8
HMENURETURN_SCRIPT EQU %10000000
HMENURETURN_ASM EQU %11111111
-
; PartyMenuQualityPointers indexes (see data/party_menu_qualities.asm)
const_def
const PARTYMENUACTION_CHOOSE_POKEMON
diff --git a/constants/npc_trade_constants.asm b/constants/npc_trade_constants.asm
index 653ce3555..f84db5df4 100644
--- a/constants/npc_trade_constants.asm
+++ b/constants/npc_trade_constants.asm
@@ -19,6 +19,7 @@ NPCTRADE_PADDING EQU 31 ; db
const NPC_TRADE_CHRIS ; 4
const NPC_TRADE_KIM ; 5
const NPC_TRADE_FOREST ; 6
+NUM_NPC_TRADES EQU const_value
; trade gender limits
const_def
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
index 3d27e5877..1aedf20cb 100644
--- a/constants/pokemon_data_constants.asm
+++ b/constants/pokemon_data_constants.asm
@@ -62,11 +62,9 @@ GENDER_UNKNOWN EQU -1
const EGG_DRAGON ; e
const EGG_NONE ; f (Undiscovered)
-
; pokedex entries (see data/pokemon/dex_entries.asm)
NUM_DEX_ENTRY_BANKS EQU 4
-
; party_struct members (see macros/wram.asm)
MON_SPECIES EQUS "(wPartyMon1Species - wPartyMon1)"
MON_ITEM EQUS "(wPartyMon1Item - wPartyMon1)"
@@ -101,7 +99,6 @@ BOXMON_STRUCT_LENGTH EQUS "(wPartyMon1End - wPartyMon1)"
PARTYMON_STRUCT_LENGTH EQUS "(wPartyMon1StatsEnd - wPartyMon1)"
REDMON_STRUCT_LENGTH EQU 44
-
; caught data
CAUGHT_TIME_MASK EQU %11000000
@@ -116,7 +113,6 @@ CAUGHT_BY_BOY EQU 2
CAUGHT_EGG_LEVEL EQU 1
-
; maximum number of party pokemon
PARTY_LENGTH EQU 6
@@ -129,7 +125,6 @@ HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (MON_NAME_LENGTH + -1) ; species, id, dvs, leve
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_def 1
const EVOLVE_LEVEL
@@ -150,7 +145,6 @@ NUM_HOF_TEAMS = 30
const ATK_LT_DEF
const ATK_EQ_DEF
-
; wild data
NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size
@@ -158,10 +152,10 @@ NUM_WATERMON EQU 3 ; data/wild/*_water.asm table size
GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2
WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2
+FISHGROUP_DATA_LENGTH EQU 1 + 2 * 3
NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.asm)
-
; treemon sets
; TreeMons indexes (see data/wild/treemons.asm)
const_def
@@ -181,7 +175,6 @@ NUM_TREEMON_SETS EQU const_value
const TREEMON_SCORE_GOOD ; 1
const TREEMON_SCORE_RARE ; 2
-
; ChangeHappiness arguments (see data/happiness_changes.asm)
const_value = 1
const HAPPINESS_GAINLEVEL ; 01
@@ -211,7 +204,6 @@ HAPPINESS_TO_EVOLVE EQU 220
HAPPINESS_THRESHOLD_1 EQU 100
HAPPINESS_THRESHOLD_2 EQU 200
-
; PP
PP_UP_MASK EQU %11000000
PP_UP_ONE EQU %01000000
diff --git a/constants/script_constants.asm b/constants/script_constants.asm
index 3b9220095..a31394a36 100644
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -2,7 +2,6 @@
PLAYER EQU 0
LAST_TALKED EQU -2
-
; memory constants
const_def
const MEM_BUFFER_0 ; use wStringBuffer3
@@ -10,7 +9,6 @@ LAST_TALKED EQU -2
const MEM_BUFFER_2 ; use wStringBuffer5
NUM_MEM_BUFFERS EQU const_value
-
; checkmoney/takemoney accounts
const_def
const YOUR_MONEY ; 0
@@ -36,7 +34,6 @@ NUM_MEM_BUFFERS EQU const_value
const PHONE_CONTACTS_FULL ; 1
const PHONE_CONTACT_REFUSED ; 2
-
; writecode/checkcode arguments
; _GetVarAction.VarActionTable indexes (see engine/overworld/variables.asm)
const_def
@@ -74,7 +71,6 @@ RETVAR_STRBUF2 EQU (0 << 6)
RETVAR_ADDR_DE EQU (1 << 6)
RETVAR_EXECUTE EQU (2 << 6)
-
; PlayerEventScriptPointers indexes (see engine/overworld/events.asm)
const_def -1
const PLAYEREVENT_MAPSCRIPT
@@ -90,7 +86,6 @@ RETVAR_EXECUTE EQU (2 << 6)
const PLAYEREVENT_JOYCHANGEFACING
NUM_PLAYER_EVENTS EQU const_value
-
; bg_event types
; TryBGEvent arguments (see engine/overworld/events.asm)
const_def
@@ -115,7 +110,6 @@ NUM_PLAYER_EVENTS EQU const_value
const OBJECTTYPE_5
const OBJECTTYPE_6
-
; command queue members
CMDQUEUE_TYPE EQU 0
CMDQUEUE_ADDR EQU 1
@@ -125,9 +119,14 @@ CMDQUEUE_05 EQU 5
CMDQUEUE_ENTRY_SIZE EQU 6
CMDQUEUE_CAPACITY EQU 4
-; command queue types
-CMDQUEUE_STONETABLE EQU 2
-
+; HandleQueuedCommand.Jumptable indexes (see engine/overworld/events.asm)
+ const_def
+ const CMDQUEUE_NULL
+ const CMDQUEUE_NULL2
+ const CMDQUEUE_STONETABLE
+ const CMDQUEUE_TYPE3
+ const CMDQUEUE_TYPE4
+NUM_CMDQUEUE_TYPES EQU const_value
; elevfloor macro values
; ElevatorFloorNames indexes (see data/events/elevator_floors.asm)
@@ -149,7 +148,6 @@ CMDQUEUE_STONETABLE EQU 2
const FLOOR_11F
const FLOOR_ROOF
-
; showemote arguments
; Emotes indexes (see data/sprites/emotes.asm)
const_def
@@ -217,7 +215,6 @@ NUM_FRUIT_TREES EQU const_value + -1
const SWARM_DUNSPARCE ; 0
const SWARM_YANMA ; 1
-
; ActivateFishingSwarm writebyte arguments
const_def
const FISHSWARM_NONE ; 0
diff --git a/constants/sfx_constants.asm b/constants/sfx_constants.asm
index 9d98e147d..37fd908db 100644
--- a/constants/sfx_constants.asm
+++ b/constants/sfx_constants.asm
@@ -128,7 +128,7 @@
const SFX_SWEET_KISS ; 7c
const SFX_SWEET_KISS_2 ; 7d
const SFX_BELLY_DRUM ; 7e
- const SFX_UNKNOWN_7F ; 7f
+ const SFX_TOXIC ; 7f
const SFX_SLUDGE_BOMB ; 80
const SFX_FORESIGHT ; 81
const SFX_SPITE ; 82
@@ -206,7 +206,7 @@
const SFX_INTRO_SUICUNE_4 ; c8
const SFX_GAME_FREAK_PRESENTS ; c9
const SFX_TINGLE ; ca
- const SFX_UNKNOWN_CB ; cb
+ const SFX_INTRO_WHOOSH ; cb
const SFX_TWO_PC_BEEPS ; cc
const SFX_4_NOTE_DITTY ; cd
const SFX_TWINKLE ; ce
diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm
index 9f9132a66..5889ca7a6 100644
--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -20,17 +20,17 @@ AUTO_INPUT EQU $ff
GAMETIMERPAUSE_TIMER_PAUSED_F EQU 0
GAMETIMERPAUSE_MOBILE_7_F EQU 7
-; wOptions:: (bits 4-7) ; cfcc
+; wOptions:: ; cfcc
+TEXT_DELAY_MASK EQU %111
const_def 4
const NO_TEXT_SCROLL ; 4
const STEREO ; 5
const BATTLE_SHIFT ; 6
const BATTLE_SCENE ; 7
-; wOptions:: (bits 0-2) ; cfcc
-TEXT_DELAY_FAST EQU 1
-TEXT_DELAY_MED EQU 3
-TEXT_DELAY_SLOW EQU 5
+TEXT_DELAY_FAST EQU %001 ; 1
+TEXT_DELAY_MED EQU %011 ; 3
+TEXT_DELAY_SLOW EQU %101 ; 5
; wTextBoxFrame:: ; cfce
const_def