summaryrefslogtreecommitdiff
path: root/src/constants
diff options
context:
space:
mode:
authorDaniel Harding <33dannye@gmail.com>2018-02-27 11:09:09 -0600
committerGitHub <noreply@github.com>2018-02-27 11:09:09 -0600
commit96b32412d82bdee2756b1a300b05d2647da9ad1f (patch)
tree677858a17041e829c8a442be2b16b43e20d2a341 /src/constants
parent24f40989d472407dc51653f2a671348126c6e816 (diff)
parent43d4b8644de2ffb3b1fc13638081cd228c4b2c74 (diff)
Merge pull request #35 from xCrystal/master
Lots of bank0 and some bank1 disasm, labeling and corrections ; Many constants related to duels, cards, and WRAM structs ; Replace hardcoded WRAM addresses with generic labels ; Style clean up ; Format SGB packets ; Reorganize some gfx files
Diffstat (limited to 'src/constants')
-rw-r--r--[-rwxr-xr-x]src/constants/booster_constants.asm0
-rw-r--r--[-rwxr-xr-x]src/constants/card_constants.asm0
-rw-r--r--src/constants/card_data_constants.asm141
-rw-r--r--[-rwxr-xr-x]src/constants/deck_constants.asm0
-rw-r--r--src/constants/duel_constants.asm119
-rw-r--r--src/constants/gfx_constants.asm41
-rw-r--r--[-rwxr-xr-x]src/constants/map_constants.asm0
-rw-r--r--src/constants/misc_constants.asm21
-rw-r--r--[-rwxr-xr-x]src/constants/music_constants.asm62
-rw-r--r--[-rwxr-xr-x]src/constants/npc_constants.asm0
-rw-r--r--[-rwxr-xr-x]src/constants/overworld_script_constants.asm0
-rw-r--r--src/constants/sgb_constants.asm13
-rw-r--r--[-rwxr-xr-x]src/constants/text_constants.asm20
13 files changed, 291 insertions, 126 deletions
diff --git a/src/constants/booster_constants.asm b/src/constants/booster_constants.asm
index f5efb9b..f5efb9b 100755..100644
--- a/src/constants/booster_constants.asm
+++ b/src/constants/booster_constants.asm
diff --git a/src/constants/card_constants.asm b/src/constants/card_constants.asm
index 30560c2..30560c2 100755..100644
--- a/src/constants/card_constants.asm
+++ b/src/constants/card_constants.asm
diff --git a/src/constants/card_data_constants.asm b/src/constants/card_data_constants.asm
index a98a0c7..6b6d299 100644
--- a/src/constants/card_data_constants.asm
+++ b/src/constants/card_data_constants.asm
@@ -1,11 +1,79 @@
NONE EQU $0
-PKMN_CARD_DATA_LENGTH EQU $41
+; sCardCollection constants
+CARD_COLLECTION_SIZE EQU $100 ; cards
+MAX_AMOUNT_OF_CARD EQU 99
+CARD_NOT_OWNED_F EQU 7
+CARD_NOT_OWNED EQU 1 << CARD_NOT_OWNED_F
+CARD_COUNT_MASK EQU $7f
+
+; sDeck* and generic deck constants
+NUM_DECKS EQU 4
+DECK_NAME_SIZE EQU 24
+DECK_SIZE EQU 60
+
+; card data offsets (data/cards.asm and card_data_struct)
+
+; all card types
+CARD_DATA_TYPE EQU $00
+CARD_DATA_GFX EQU $01
+CARD_DATA_NAME EQU $03
+CARD_DATA_RARITY EQU $05
+CARD_DATA_SET EQU $06
+CARD_DATA_ID EQU $07
+CARD_DATA_EFFECT_COMMANDS EQU $08 ; !TYPE_PKMN
+CARD_DATA_HP EQU $08 ; TYPE_PKMN
+CARD_DATA_STAGE EQU $09 ; TYPE_PKMN
+CARD_DATA_NONPKMN_DESCRIPTION EQU $0a ; !TYPE_PKMN
+CARD_DATA_PREEVO_NAME EQU $0a ; TYPE_PKMN
+
TRN_CARD_DATA_LENGTH EQU $0e
ENERGY_CARD_DATA_LENGTH EQU $0e
-;;; generic type constants
-; double up as Pokemon card types
+; TYPE_PKMN card only
+CARD_DATA_MOVE1 EQU $0c
+CARD_DATA_MOVE1_ENERGY EQU $0c
+CARD_DATA_MOVE1_NAME EQU $10
+CARD_DATA_MOVE1_DESCRIPTION EQU $12
+CARD_DATA_MOVE1_DAMAGE EQU $16
+CARD_DATA_MOVE1_CATEGORY EQU $17
+CARD_DATA_MOVE1_EFFECT_COMMANDS EQU $18
+CARD_DATA_MOVE1_FLAG1 EQU $1a
+CARD_DATA_MOVE1_FLAG2 EQU $1b
+CARD_DATA_MOVE1_FLAG3 EQU $1c
+CARD_DATA_MOVE1_UNKNOWN1 EQU $1d
+CARD_DATA_MOVE1_ANIMATION EQU $1e
+
+; TYPE_PKMN card only
+CARD_DATA_MOVE2 EQU $1f
+CARD_DATA_MOVE2_ENERGY EQU $1f
+CARD_DATA_MOVE2_NAME EQU $23
+CARD_DATA_MOVE2_DESCRIPTION EQU $25
+CARD_DATA_MOVE2_DAMAGE EQU $29
+CARD_DATA_MOVE2_CATEGORY EQU $2a
+CARD_DATA_MOVE2_EFFECT_COMMANDS EQU $2b
+CARD_DATA_MOVE2_FLAG1 EQU $2d
+CARD_DATA_MOVE2_FLAG2 EQU $2e
+CARD_DATA_MOVE2_FLAG3 EQU $2f
+CARD_DATA_MOVE2_UNKNOWN1 EQU $30
+CARD_DATA_MOVE2_ANIMATION EQU $31
+
+; TYPE_PKMN card only
+CARD_DATA_RETREAT_COST EQU $32
+CARD_DATA_WEAKNESS EQU $33
+CARD_DATA_RESISTANCE EQU $34
+CARD_DATA_KIND EQU $35
+CARD_DATA_POKEDEX_NUMBER EQU $37
+CARD_DATA_UNKNOWN1 EQU $38
+CARD_DATA_LEVEL EQU $39
+CARD_DATA_LENGTH EQU $3a
+CARD_DATA_WEIGHT EQU $3c
+CARD_DATA_PKMN_DESCRIPTION EQU $3e
+CARD_DATA_UNKNOWN2 EQU $40
+
+PKMN_CARD_DATA_LENGTH EQU $41
+
+; generic type (color) constants
const_def
const FIRE ; $0
const GRASS ; $1
@@ -13,41 +81,44 @@ ENERGY_CARD_DATA_LENGTH EQU $0e
const WATER ; $3
const FIGHTING ; $4
const PSYCHIC ; $5
+NUM_COLORED_TYPES EQU const_value
const COLORLESS ; $6
const UNUSED_TYPE ; $7
NUM_TYPES EQU const_value
-;;; card types
-TYPE_PKMN_FIRE EQUS "FIRE"
-TYPE_PKMN_GRASS EQUS "GRASS"
-TYPE_PKMN_LIGHTNING EQUS "LIGHTNING"
-TYPE_PKMN_WATER EQUS "WATER"
-TYPE_PKMN_FIGHTING EQUS "FIGHTING"
-TYPE_PKMN_PSYCHIC EQUS "PSYCHIC"
-TYPE_PKMN_COLORLESS EQUS "COLORLESS"
-TYPE_PKMN_UNUSED EQUS "UNUSED_TYPE"
+; CARD_DATA_TYPE constants
+TYPE_PKMN_FIRE EQU FIRE
+TYPE_PKMN_GRASS EQU GRASS
+TYPE_PKMN_LIGHTNING EQU LIGHTNING
+TYPE_PKMN_WATER EQU WATER
+TYPE_PKMN_FIGHTING EQU FIGHTING
+TYPE_PKMN_PSYCHIC EQU PSYCHIC
+TYPE_PKMN_COLORLESS EQU COLORLESS
+TYPE_PKMN_UNUSED EQU UNUSED_TYPE
const_def TYPE_PKMN_UNUSED + 1 - TYPE_PKMN_FIRE
- const TYPE_ENERGY_FIRE ; $8
- const TYPE_ENERGY_GRASS ; $9
- const TYPE_ENERGY_LIGHTNING ; $A
- const TYPE_ENERGY_WATER ; $B
- const TYPE_ENERGY_FIGHTING ; $C
- const TYPE_ENERGY_PSYCHIC ; $D
- const TYPE_ENERGY_DOUBLE_COLORLESS ; $E
- const TYPE_ENERGY_UNUSED ; $F
- const TYPE_TRAINER ; $10
- const TYPE_TRAINER_UNUSED ; $11
+ const TYPE_ENERGY_FIRE ; $08
+ const TYPE_ENERGY_GRASS ; $09
+ const TYPE_ENERGY_LIGHTNING ; $0a
+ const TYPE_ENERGY_WATER ; $0b
+ const TYPE_ENERGY_FIGHTING ; $0c
+ const TYPE_ENERGY_PSYCHIC ; $0d
+ const TYPE_ENERGY_DOUBLE_COLORLESS ; $0e
+ const TYPE_ENERGY_UNUSED ; $0f
+ const TYPE_TRAINER ; $10
+ const TYPE_TRAINER_UNUSED ; $11
NUM_CARD_TYPES EQU const_value + -1
-TYPE_ENERGY_F EQU 3
+TYPE_PKMN EQU %111
+TYPE_ENERGY_F EQU 3
+TYPE_TRAINER_F EQU 4
-;;; rarity
+; CARD_DATA_RARITY constants
CIRCLE EQU $0
DIAMOND EQU $1
STAR EQU $2
-PROMOSTAR EQU $FF
+PROMOSTAR EQU $ff
-;;; set 1
+; CARD_DATA_SET constants (set 1)
COLOSSEUM EQU $00
EVOLUTION EQU $10
MYSTERY EQU $20
@@ -55,18 +126,18 @@ LABORATORY EQU $30
PROMOTIONAL EQU $40
ENERGY EQU $50
-;;; set 2
+; CARD_DATA_SET constants (set 2)
JUNGLE EQU $1
FOSSIL EQU $2
GB EQU $7
PRO EQU $8
-;;; evolution stage
+; CARD_DATA_STAGE constants
BASIC EQU $0
STAGE1 EQU $1
STAGE2 EQU $2
-;;; weakness/resistance
+; CARD_DATA_WEAKNESS and CARD_DATA_RESISTANCE constants
WR_FIRE EQU $80
WR_GRASS EQU $40
WR_LIGHTNING EQU $20
@@ -74,7 +145,7 @@ WR_WATER EQU $10
WR_FIGHTING EQU $08
WR_PSYCHIC EQU $04
-;;; move category (6th param of Pokemon cards move data)
+; CARD_DATA_MOVE*_CATEGORY constants
DAMAGE_NORMAL EQU $0
DAMAGE_PLUS EQU $1
DAMAGE_MINUS EQU $2
@@ -83,7 +154,7 @@ POKEMON_POWER EQU $4
RESIDUAL_F EQU 7
RESIDUAL EQU 1 << RESIDUAL_F
-;;; flags 1 (8th param of Pokemon cards move data)
+; CARD_DATA_MOVE*_FLAG1 constants
INFLICT_POISON EQU %00000001
INFLICT_SLEEP EQU %00000010
INFLICT_PARALYSIS EQU %00000100
@@ -93,7 +164,7 @@ DAMAGE_TO_OPPONENT_BENCH EQU %00100000
HIGH_RECOIL EQU %01000000
DRAW_CARD EQU %10000000
-;;; flags 2 (9th param of Pokemon cards move data)
+; CARD_DATA_MOVE*_FLAG2 constants
; bits 5, 6 and 7 cover a wide variety of effects
SWITCH_OPPONENT_POKEMON EQU %00000001
HEAL_USER EQU %00000010
@@ -104,13 +175,11 @@ FLAG_2_BIT_5 EQU %00100000
FLAG_2_BIT_6 EQU %01000000
FLAG_2_BIT_7 EQU %10000000
-;;; flags 3 (10th param of Pokemon cards move data)
+; CARD_DATA_MOVE*_FLAG3 constants
; bit 1 covers a wide variety of effects
; bits 2-7 are unused
BOOST_IF_TAKEN_DAMAGE EQU %00000001
FLAG_3_BIT_1 EQU %00000010
-;;; special retreat values
+; special CARD_DATA_RETREAT_COST values
UNABLE_RETREAT EQU $64
-
-CARD_COLLECTION_SIZE EQU $100
diff --git a/src/constants/deck_constants.asm b/src/constants/deck_constants.asm
index d6e5b1a..d6e5b1a 100755..100644
--- a/src/constants/deck_constants.asm
+++ b/src/constants/deck_constants.asm
diff --git a/src/constants/duel_constants.asm b/src/constants/duel_constants.asm
index ee964b3..d033722 100644
--- a/src/constants/duel_constants.asm
+++ b/src/constants/duel_constants.asm
@@ -1,40 +1,64 @@
-DECK_NAME_SIZE EQU 24
-DECK_SIZE EQU 60
-BENCH_SIZE EQU 5
+MAX_BENCH_POKEMON EQU 5
+MAX_PLAY_AREA_POKEMON EQU 6 ; arena + bench
-PLAYER_TURN EQUS "wPlayerDuelVariables >> $8"
-OPPONENT_TURN EQUS "wOpponentDuelVariables >> $8"
+; hWhoseTurn constants
+PLAYER_TURN EQUS "HIGH(wPlayerDuelVariables)"
+OPPONENT_TURN EQUS "HIGH(wOpponentDuelVariables)"
+; wDuelFinished constants
DUEL_WON EQU $1
DUEL_LOST EQU $2
DUEL_DRAW EQU $3
-DUELVARS_CARD_LOCATIONS EQUS "wPlayerCardLocations & $ff" ; 00
-DUELVARS_HAND EQUS "wPlayerHand & $ff" ; 42
-DUELVARS_DECK_CARDS EQUS "wPlayerDeckCards & $ff" ; 7e
-DUELVARS_NUMBER_OF_CARDS_NOT_IN_DECK EQUS "wPlayerNumberOfCardsNotInDeck & $ff" ; ba
-DUELVARS_ARENA_CARD EQUS "wPlayerArenaCard & $ff" ; bb
-DUELVARS_BENCH EQUS "wPlayerBench & $ff" ; bc
-DUELVARS_ARENA_CARD_HP EQUS "wPlayerArenaCardHP & $ff" ; c8
-DUELVARS_BENCH1_CARD_HP EQUS "wPlayerBench1CardHP & $ff" ; c9
-DUELVARS_BENCH2_CARD_HP EQUS "wPlayerBench2CardHP & $ff" ; ca
-DUELVARS_BENCH3_CARD_HP EQUS "wPlayerBench3CardHP & $ff" ; cb
-DUELVARS_BENCH4_CARD_HP EQUS "wPlayerBench4CardHP & $ff" ; cc
-DUELVARS_BENCH5_CARD_HP EQUS "wPlayerBench5CardHP & $ff" ; cd
-DUELVARS_ARENA_CARD_SUBSTATUS1 EQUS "wPlayerArenaCardSubstatus1 & $ff" ; e7
-DUELVARS_ARENA_CARD_SUBSTATUS2 EQUS "wPlayerArenaCardSubstatus2 & $ff" ; e8
-DUELVARS_ARENA_CARD_SUBSTATUS3 EQUS "wPlayerArenaCardSubstatus3 & $ff" ; e9
-DUELVARS_ARENA_CARD_SUBSTATUS4 EQUS "wPlayerArenaCardSubstatus4 & $ff" ; ea
-DUELVARS_ARENA_CARD_SUBSTATUS5 EQUS "wPlayerArenaCardSubstatus5 & $ff" ; eb
-DUELVARS_PRIZES EQUS "wPlayerPrizes & $ff" ; ec
-DUELVARS_NUMBER_OF_CARDS_IN_DISCARD_PILE EQUS "wPlayerNumberOfCardsInDiscardPile & $ff" ; ed
-DUELVARS_NUMBER_OF_CARDS_IN_HAND EQUS "wPlayerNumberOfCardsInHand & $ff" ; ee
-DUELVARS_NUMBER_OF_POKEMON_IN_PLAY EQUS "wPlayerNumberOfPokemonInPlay & $ff" ; ef
-DUELVARS_ARENA_CARD_STATUS EQUS "wPlayerArenaCardStatus & $ff" ; f0
-DUELVARS_DUELIST_TYPE EQUS "wPlayerDuelistType & $ff" ; f1
-DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX EQUS "wPlayerArenaCardDisabledMoveIndex & $ff" ; f2
+; Box message id's
+ const_def
+ const BOXMSG_PLAYERS_TURN
+ const BOXMSG_OPPONENTS_TURN
+ const BOXMSG_BETWEEN_TURNS
+ const BOXMSG_DECISION
+ const BOXMSG_BENCH_POKEMON
+ const BOXMSG_ARENA_POKEMON
+ const BOXMSG_COIN_TOSS
-;;; card locations
+; wPlayerDuelVariables or wOpponentDuelVariables constants
+DUELVARS_CARD_LOCATIONS EQUS "LOW(wPlayerCardLocations)" ; 00
+DUELVARS_HAND EQUS "LOW(wPlayerHand)" ; 42
+DUELVARS_DECK_CARDS EQUS "LOW(wPlayerDeckCards)" ; 7e
+DUELVARS_NUMBER_OF_CARDS_NOT_IN_DECK EQUS "LOW(wPlayerNumberOfCardsNotInDeck)" ; ba
+DUELVARS_ARENA_CARD EQUS "LOW(wPlayerArenaCard)" ; bb
+DUELVARS_BENCH EQUS "LOW(wPlayerBench)" ; bc
+DUELVARS_ARENA_CARD_HP EQUS "LOW(wPlayerArenaCardHP)" ; c8
+DUELVARS_BENCH1_CARD_HP EQUS "LOW(wPlayerBench1CardHP)" ; c9
+DUELVARS_BENCH2_CARD_HP EQUS "LOW(wPlayerBench2CardHP)" ; ca
+DUELVARS_BENCH3_CARD_HP EQUS "LOW(wPlayerBench3CardHP)" ; cb
+DUELVARS_BENCH4_CARD_HP EQUS "LOW(wPlayerBench4CardHP)" ; cc
+DUELVARS_BENCH5_CARD_HP EQUS "LOW(wPlayerBench5CardHP)" ; cd
+DUELVARS_ARENA_CARD_STAGE EQUS "LOW(wPlayerArenaCardStage)" ; ce
+DUELVARS_BENCH1_CARD_STAGE EQUS "LOW(wPlayerBench1CardStage)" ; cf
+DUELVARS_BENCH2_CARD_STAGE EQUS "LOW(wPlayerBench2CardStage)" ; d0
+DUELVARS_BENCH3_CARD_STAGE EQUS "LOW(wPlayerBench3CardStage)" ; d1
+DUELVARS_BENCH4_CARD_STAGE EQUS "LOW(wPlayerBench4CardStage)" ; d2
+DUELVARS_BENCH5_CARD_STAGE EQUS "LOW(wPlayerBench5CardStage)" ; d3
+DUELVARS_ARENA_CARD_CHANGED_TYPE EQUS "LOW(wPlayerArenaCardChangedType)" ; d4
+DUELVARS_BENCH1_CARD_CHANGED_TYPE EQUS "LOW(wPlayerBench1CardChangedType)" ; d5
+DUELVARS_BENCH2_CARD_CHANGED_TYPE EQUS "LOW(wPlayerBench2CardChangedType)" ; d6
+DUELVARS_BENCH3_CARD_CHANGED_TYPE EQUS "LOW(wPlayerBench3CardChangedType)" ; d7
+DUELVARS_BENCH4_CARD_CHANGED_TYPE EQUS "LOW(wPlayerBench4CardChangedType)" ; d8
+DUELVARS_BENCH5_CARD_CHANGED_TYPE EQUS "LOW(wPlayerBench5CardChangedType)" ; d9
+DUELVARS_ARENA_CARD_SUBSTATUS1 EQUS "LOW(wPlayerArenaCardSubstatus1)" ; e7
+DUELVARS_ARENA_CARD_SUBSTATUS2 EQUS "LOW(wPlayerArenaCardSubstatus2)" ; e8
+DUELVARS_ARENA_CARD_CHANGED_WEAKNESS EQUS "LOW(wPlayerArenaCardChangedWeakness)" ; e9
+DUELVARS_ARENA_CARD_CHANGED_RESISTANCE EQUS "LOW(wPlayerArenaCardChangedResistance)" ; ea
+DUELVARS_ARENA_CARD_SUBSTATUS3 EQUS "LOW(wPlayerArenaCardSubstatus3)" ; eb
+DUELVARS_PRIZES EQUS "LOW(wPlayerPrizes)" ; ec
+DUELVARS_NUMBER_OF_CARDS_IN_DISCARD_PILE EQUS "LOW(wPlayerNumberOfCardsInDiscardPile)" ; ed
+DUELVARS_NUMBER_OF_CARDS_IN_HAND EQUS "LOW(wPlayerNumberOfCardsInHand)" ; ee
+DUELVARS_NUMBER_OF_POKEMON_IN_PLAY EQUS "LOW(wPlayerNumberOfPokemonInPlay)" ; ef
+DUELVARS_ARENA_CARD_STATUS EQUS "LOW(wPlayerArenaCardStatus)" ; f0
+DUELVARS_DUELIST_TYPE EQUS "LOW(wPlayerDuelistType)" ; f1
+DUELVARS_ARENA_CARD_DISABLED_MOVE_INDEX EQUS "LOW(wPlayerArenaCardDisabledMoveIndex)" ; f2
+
+; card location constants (DUELVARS_CARD_LOCATIONS)
CARD_LOCATION_DECK EQU $00
CARD_LOCATION_HAND EQU $01
CARD_LOCATION_DISCARD_PILE EQU $02
@@ -45,17 +69,27 @@ CARD_LOCATION_BENCH_2 EQU $12
CARD_LOCATION_BENCH_3 EQU $13
CARD_LOCATION_BENCH_4 EQU $14
CARD_LOCATION_BENCH_5 EQU $15
-CARD_LOCATION_JUST_DRAWN EQU $40
-;;; duelist types
+; card location flags (DUELVARS_CARD_LOCATIONS)
+CARD_LOCATION_PLAY_AREA_F EQU 4 ; includes arena and bench
+CARD_LOCATION_PLAY_AREA EQU 1 << CARD_LOCATION_PLAY_AREA_F
+CARD_LOCATION_JUST_DRAWN_F EQU 6
+CARD_LOCATION_JUST_DRAWN EQU 1 << CARD_LOCATION_JUST_DRAWN_F
+
+; play area location offsets (CARD_LOCATION_* - CARD_LOCATION_PLAY_AREA)
+PLAY_AREA_ARENA EQU $0
+PLAY_AREA_BENCH_1 EQU $1
+PLAY_AREA_BENCH_2 EQU $2
+PLAY_AREA_BENCH_3 EQU $3
+PLAY_AREA_BENCH_4 EQU $4
+PLAY_AREA_BENCH_5 EQU $5
+
+; duelist types (DUELVARS_DUELIST_TYPE)
DUELIST_TYPE_PLAYER EQU $00
DUELIST_TYPE_LINK_OPP EQU $01
DUELIST_TYPE_AI_OPP EQU $80
-;;; constant values
-MAX_POKEMON_IN_PLAY EQU $06
-
-;;; status conditions
+; status conditions (DUELVARS_ARENA_CARD_STATUS)
; two statuses can be combined if they are identified by a different nybble
NO_STATUS EQU $00
CONFUSED EQU $01
@@ -64,9 +98,9 @@ PARALYZED EQU $03
POISONED EQU $80
DOUBLE_POISONED EQU $c0
-PASSIVE_STATUS_MASK EQU $f ; confused, asleep or paralyzed
+CNF_SLP_PRZ EQU $0f ; confused, asleep or paralyzed
-;;; substatus conditions
+; substatus conditions (DUELVARS_ARENA_CARD_SUBSTATUS*)
SUBSTATUS1_AGILITY EQU $0c
SUBSTATUS1_FLY EQU $0d
SUBSTATUS1_HARDEN EQU $0e
@@ -92,11 +126,16 @@ SUBSTATUS2_UNABLE_RETREAT EQU $09
SUBSTATUS2_BONE_ATTACK EQU $0b
SUBSTATUS2_GROWL EQU $12
-SUBSTATUS5_THIS_TURN_DOUBLE_DAMAGE EQU 0
+SUBSTATUS3_THIS_TURN_DOUBLE_DAMAGE EQU 0
+SUBSTATUS3_HEADACHE EQU 1
-;;; wNoDamageOrEffect constants
+; wNoDamageOrEffect constants
NO_DAMAGE_OR_EFFECT_AGILITY EQU $01
NO_DAMAGE_OR_EFFECT_BARRIER EQU $02
NO_DAMAGE_OR_EFFECT_FLY EQU $03
NO_DAMAGE_OR_EFFECT_TRANSPARENCY EQU $04
NO_DAMAGE_OR_EFFECT_NSHIELD EQU $05
+
+; wDamageEffectiveness constants
+WEAKNESS EQU 1
+RESISTANCE EQU 2
diff --git a/src/constants/gfx_constants.asm b/src/constants/gfx_constants.asm
new file mode 100644
index 0000000..2f5ca4a
--- /dev/null
+++ b/src/constants/gfx_constants.asm
@@ -0,0 +1,41 @@
+; screen size
+SCREEN_WIDTH EQU 20 ; tiles
+SCREEN_HEIGHT EQU 18 ; tiles
+
+; background map size
+BG_MAP_WIDTH EQU 32 ; tiles
+BG_MAP_HEIGHT EQU 32 ; tiles
+
+; cgb palette size
+CGB_PAL_SIZE EQU 8 ; bytes
+
+; tile size
+TILE_SIZE EQU 16 ; bytes
+
+; wFlushPaletteFlags constants
+FLUSH_ONE EQU %10000000
+FLUSH_ALL EQU %11000000
+FLUSH_ALL_F EQU 6
+
+; wSpriteAnimBuffer
+SPRITE_ANIM_BUFFER_CAPACITY EQU 16 ; sprites
+
+; sprite_anim_struct constants
+ const_def
+ const SPRITE_ANIM_FIELD_00
+ const SPRITE_ANIM_FIELD_01
+ const SPRITE_ANIM_COORD_X
+ const SPRITE_ANIM_COORD_Y
+ const SPRITE_ANIM_TILE_ID
+ const SPRITE_ANIM_FIELD_05
+ const SPRITE_ANIM_FIELD_06
+ const SPRITE_ANIM_FIELD_07
+ const SPRITE_ANIM_FIELD_08
+ const SPRITE_ANIM_FIELD_09
+ const SPRITE_ANIM_FIELD_0A
+ const SPRITE_ANIM_FIELD_0B
+ const SPRITE_ANIM_FIELD_0C
+ const SPRITE_ANIM_FIELD_0D
+ const SPRITE_ANIM_MOVEMENT_COUNTER
+ const SPRITE_ANIM_FIELD_0F
+SPRITE_ANIM_LENGTH EQU const_value \ No newline at end of file
diff --git a/src/constants/map_constants.asm b/src/constants/map_constants.asm
index 4b74a29..4b74a29 100755..100644
--- a/src/constants/map_constants.asm
+++ b/src/constants/map_constants.asm
diff --git a/src/constants/misc_constants.asm b/src/constants/misc_constants.asm
index 422fda4..a6511df 100644
--- a/src/constants/misc_constants.asm
+++ b/src/constants/misc_constants.asm
@@ -1,12 +1,4 @@
-; screen size
-SCREEN_WIDTH EQU 20 ; tiles
-SCREEN_HEIGHT EQU 18 ; tiles
-
-; background map size
-BG_MAP_WIDTH EQU 32 ; tiles
-BG_MAP_HEIGHT EQU 32 ; tiles
-
-; console types (for wConsole)
+; console types (wConsole)
CONSOLE_DMG EQU $00
CONSOLE_SGB EQU $01
CONSOLE_CGB EQU $02
@@ -32,3 +24,14 @@ D_DOWN EQU 1 << D_DOWN_F ; $80
BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START ; $0f
D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN ; $f0
+
+; Game event constants (wGameEvent)
+ const_def
+ const GAME_EVENT_OVERWORLD ; $0
+ const GAME_EVENT_DUEL ; $1
+ const GAME_EVENT_BATTLE_CENTER ; $2
+ const GAME_EVENT_GIFT_CENTER ; $3
+ const GAME_EVENT_CREDITS ; $4
+ const GAME_EVENT_CONTINUE_DUEL ; $5
+ const GAME_EVENT_CHALLENGE_MACHINE ; $6
+NUM_GAME_EVENTS EQU const_value
diff --git a/src/constants/music_constants.asm b/src/constants/music_constants.asm
index ebcd75f..996baf2 100755..100644
--- a/src/constants/music_constants.asm
+++ b/src/constants/music_constants.asm
@@ -1,32 +1,32 @@
const_def
- const MUSIC_STOP ; $00
- const MUSIC_TITLESCREEN ; $01
- const MUSIC_DUELTHEME1 ; $02
- const MUSIC_DUELTHEME2 ; $03
- const MUSIC_DUELTHEME3 ; $04
- const MUSIC_PAUSEMENU ; $05
- const MUSIC_PCMAINMENU ; $06
- const MUSIC_DECKMACHINE ; $07
- const MUSIC_CARDPOP ; $08
- const MUSIC_OVERWORLD ; $09
- const MUSIC_POKEMONDOME ; $0A
- const MUSIC_CHALLENGEHALL ; $0B
- const MUSIC_CLUB1 ; $0C
- const MUSIC_CLUB2 ; $0D
- const MUSIC_CLUB3 ; $0E
- const MUSIC_RONALD ; $0F
- const MUSIC_IMAKUNI ; $10
- const MUSIC_HALLOFHONOR ; $11
- const MUSIC_CREDITS ; $12
- const MUSIC_UNUSED_13 ; $13
- const MUSIC_UNUSED_14 ; $14
- const MUSIC_MATCHSTART1 ; $15
- const MUSIC_MATCHSTART2 ; $16
- const MUSIC_MATCHSTART3 ; $17
- const MUSIC_MATCHVICTORY ; $18
- const MUSIC_MATCHLOSS ; $19
- const MUSIC_DARKDIDDLY ; $1A
- const MUSIC_UNUSED_1B ; $1B
- const MUSIC_BOOSTERPACK ; $1C
- const MUSIC_MEDAL ; $1D
- const MUSIC_UNUSED_1E ; $1E
+ const MUSIC_STOP ; $00
+ const MUSIC_TITLESCREEN ; $01
+ const MUSIC_DUEL_THEME_1 ; $02
+ const MUSIC_DUEL_THEME_2 ; $03
+ const MUSIC_DUEL_THEME_3 ; $04
+ const MUSIC_PAUSE_MENU ; $05
+ const MUSIC_PC_MAIN_MENU ; $06
+ const MUSIC_DECK_MACHINE ; $07
+ const MUSIC_CARD_POP ; $08
+ const MUSIC_OVERWORLD ; $09
+ const MUSIC_POKEMON_DOME ; $0A
+ const MUSIC_CHALLENGE_HALL ; $0B
+ const MUSIC_CLUB_1 ; $0C
+ const MUSIC_CLUB_2 ; $0D
+ const MUSIC_CLUB_3 ; $0E
+ const MUSIC_RONALD ; $0F
+ const MUSIC_IMAKUNI ; $10
+ const MUSIC_HALL_OF_HONOR ; $11
+ const MUSIC_CREDITS ; $12
+ const MUSIC_UNUSED_13 ; $13
+ const MUSIC_UNUSED_14 ; $14
+ const MUSIC_MATCH_START_1 ; $15
+ const MUSIC_MATCH_START_2 ; $16
+ const MUSIC_MATCH_START_3 ; $17
+ const MUSIC_MATCH_VICTORY ; $18
+ const MUSIC_MATCH_LOSS ; $19
+ const MUSIC_DARK_DIDDLY ; $1A
+ const MUSIC_UNUSED_1B ; $1B
+ const MUSIC_BOOSTER_PACK ; $1C
+ const MUSIC_MEDAL ; $1D
+ const MUSIC_UNUSED_1E ; $1E
diff --git a/src/constants/npc_constants.asm b/src/constants/npc_constants.asm
index f4972dc..f4972dc 100755..100644
--- a/src/constants/npc_constants.asm
+++ b/src/constants/npc_constants.asm
diff --git a/src/constants/overworld_script_constants.asm b/src/constants/overworld_script_constants.asm
index 167537c..167537c 100755..100644
--- a/src/constants/overworld_script_constants.asm
+++ b/src/constants/overworld_script_constants.asm
diff --git a/src/constants/sgb_constants.asm b/src/constants/sgb_constants.asm
index e956881..6ba250e 100644
--- a/src/constants/sgb_constants.asm
+++ b/src/constants/sgb_constants.asm
@@ -23,3 +23,16 @@ ATTR_TRN EQU $15 ; Set Attribute from ATF
ATTR_SET EQU $16 ; Set Data to ATF
MASK_EN EQU $17 ; Game Boy Window Mask
OBJ_TRN EQU $18 ; Super NES OBJ Mode
+
+ATTR_BLK_CTRL_INSIDE EQU 1
+ATTR_BLK_CTRL_LINE EQU 2
+ATTR_BLK_CTRL_OUTSIDE EQU 4
+
+MLT_REQ_1_PLAYER EQU 0
+MLT_REQ_2_PLAYERS EQU 1
+MLT_REQ_4_PLAYERS EQU 3
+
+MASK_EN_CANCEL_MASK EQU 0
+MASK_EN_FREEZE_SCREEN EQU 1
+MASK_EN_BLANK_SCREEN_BLACK EQU 2
+MASK_EN_BLANK_SCREEN_COLOR_0 EQU 3
diff --git a/src/constants/text_constants.asm b/src/constants/text_constants.asm
index 674037e..062f5e4 100755..100644
--- a/src/constants/text_constants.asm
+++ b/src/constants/text_constants.asm
@@ -6,15 +6,15 @@ TX_RAM1 EQU $09
TX_RAM2 EQU $0B
TX_RAM3 EQU $0C
-text EQUS "db TX_START,"
-line EQUS "db TX_LINE,"
+text EQUS "db TX_START, "
+line EQUS "db TX_LINE, "
done EQUS "db TX_END"
-TX_FIRE EQUS "$05,$01"
-TX_GRASS EQUS "$05,$02"
-TX_LIGHTNING EQUS "$05,$03"
-TX_WATER EQUS "$05,$04"
-TX_FIGHTING EQUS "$05,$05"
-TX_PSYCHIC EQUS "$05,$06"
-TX_COLORLESS EQUS "$05,$07"
-TX_LVL EQUS "$05,$11"
+TX_FIRE EQUS "$05, $01"
+TX_GRASS EQUS "$05, $02"
+TX_LIGHTNING EQUS "$05, $03"
+TX_WATER EQUS "$05, $04"
+TX_FIGHTING EQUS "$05, $05"
+TX_PSYCHIC EQUS "$05, $06"
+TX_COLORLESS EQUS "$05, $07"
+TX_LVL EQUS "$05, $11"