pokecrystal-board/constants.asm

295 lines
4.6 KiB
NASM
Raw Normal View History

2012-05-23 19:05:19 -07:00
_CRYSTAL EQU 1
2013-06-10 18:56:34 -07:00
INCLUDE "pokemon_constants.asm"
INCLUDE "move_constants.asm"
INCLUDE "battle_constants.asm"
INCLUDE "map_constants.asm"
INCLUDE "item_constants.asm"
INCLUDE "trainer_constants.asm"
INCLUDE "script_constants.asm"
INCLUDE "music_constants.asm"
; rst vectors
2013-01-25 00:42:39 -08:00
FarCall EQU $08
Bankswitch EQU $10
2013-06-10 18:56:34 -07:00
2012-09-22 16:27:57 -07:00
dwb: MACRO
dw \1
db \2
ENDM
dbw: MACRO
db \1
dw \2
ENDM
2012-10-09 11:54:39 -07:00
dn: MACRO
db \1 << 4 + \2
ENDM
2013-06-10 18:56:34 -07:00
bigdw: MACRO ; big-endian word
dw ((\1)/$100) + (((\1)&$ff)*$100)
ENDM
2013-06-10 18:56:34 -07:00
callab: MACRO ; address, bank
2012-09-26 12:43:48 -07:00
ld hl, \1
ld a, BANK(\1)
2013-01-25 00:42:39 -08:00
rst FarCall
2012-09-26 12:43:48 -07:00
ENDM
2013-06-10 18:56:34 -07:00
callba: MACRO ; bank, address
2012-09-26 12:43:48 -07:00
ld a, BANK(\1)
ld hl, \1
2013-01-25 00:42:39 -08:00
rst FarCall
2012-09-26 12:43:48 -07:00
ENDM
2013-01-10 17:31:06 -08:00
TX_RAM: MACRO
db 1
dw \1
2012-09-26 12:43:48 -07:00
ENDM
2012-07-14 19:16:04 -07:00
TX_FAR: MACRO
db $16
dw \1
db BANK(\1)
ENDM
2013-01-12 21:38:48 -08:00
RGB: MACRO
dw ((\3 << 10) | (\2 << 5) | (\1))
ENDM
2012-11-30 03:03:04 -08:00
note: MACRO
db \1
ENDM
; It's better to use *coord than FuncCoord.
FuncCoord: MACRO
Coord = $c4a0 + 20 * \2 + \1
ENDM
bccoord: MACRO
2013-02-15 19:01:48 -08:00
FuncCoord \1, \2
ld bc, Coord
ENDM
decoord: MACRO
2013-02-15 19:01:48 -08:00
FuncCoord \1, \2
ld de, Coord
ENDM
hlcoord: MACRO
2013-02-15 19:01:48 -08:00
FuncCoord \1, \2
ld hl, Coord
ENDM
2012-11-30 03:03:04 -08:00
2013-02-15 19:01:48 -08:00
; pic animations
frame: MACRO
db \1
db \2
ENDM
setrepeat: MACRO
db $fe
db \1
ENDM
dorepeat: MACRO
db $fd
db \1
ENDM
endanim: MACRO
db $ff
ENDM
2013-02-04 18:10:34 -08:00
NONE EQU 0
2012-03-20 18:00:56 -07:00
2013-06-10 18:56:34 -07:00
; types
2012-03-20 21:03:03 -07:00
NORMAL EQU $00
FIGHTING EQU $01
FLYING EQU $02
POISON EQU $03
GROUND EQU $04
ROCK EQU $05
BUG EQU $07
GHOST EQU $08
STEEL EQU $09
2012-03-20 21:19:48 -07:00
CURSE_T EQU $13
2012-03-20 21:03:03 -07:00
FIRE EQU $14
WATER EQU $15
GRASS EQU $16
ELECTRIC EQU $17
PSYCHIC EQU $18
ICE EQU $19
DRAGON EQU $1A
DARK EQU $1B
; egg group constants
MONSTER EQU $01
AMPHIBIAN EQU $02
INSECT EQU $03
AVIAN EQU $04
FIELD EQU $05
FAIRY EQU $06
PLANT EQU $07
HUMANSHAPE EQU $08
INVERTEBRATE EQU $09
INANIMATE EQU $0A
AMORPHOUS EQU $0B
FISH EQU $0C
LADIES_MAN EQU $0D
REPTILE EQU $0E
NO_EGGS EQU $0F
2013-02-03 02:38:09 -08:00
; menu sprites
ICON_POLIWAG EQU $01
ICON_JIGGLYPUFF EQU $02
ICON_DIGLETT EQU $03
ICON_PIKACHU EQU $04
ICON_STARYU EQU $05
ICON_FISH EQU $06
ICON_BIRD EQU $07
ICON_MONSTER EQU $08
ICON_CLEFAIRY EQU $09
ICON_ODDISH EQU $0a
ICON_BUG EQU $0b
ICON_GHOST EQU $0c
ICON_LAPRAS EQU $0d
ICON_HUMANSHAPE EQU $0e
ICON_FOX EQU $0f
ICON_EQUINE EQU $10
ICON_SHELL EQU $11
ICON_BLOB EQU $12
ICON_SERPENT EQU $13
ICON_VOLTORB EQU $14
ICON_SQUIRTLE EQU $15
ICON_BULBASAUR EQU $16
ICON_CHARMANDER EQU $17
ICON_CATERPILLAR EQU $18
ICON_UNOWN EQU $19
ICON_GEODUDE EQU $1a
ICON_FIGHTER EQU $1b
ICON_EGG EQU $1c
ICON_JELLYFISH EQU $1d
ICON_MOTH EQU $1e
ICON_BAT EQU $1f
ICON_SNORLAX EQU $20
ICON_HO_OH EQU $21
ICON_LUGIA EQU $22
ICON_GYARADOS EQU $23
ICON_SLOWPOKE EQU $24
ICON_SUDOWOODO EQU $25
ICON_BIGMON EQU $26
2013-04-29 10:45:41 -07:00
2012-07-04 16:52:31 -07:00
; days of the week
2013-06-10 18:56:34 -07:00
SUNDAY EQU 0
MONDAY EQU 1
TUESDAY EQU 2
WEDNESDAY EQU 3
THURSDAY EQU 4
FRIDAY EQU 5
SATURDAY EQU 6
; time of day
MORN EQU 0
DAY EQU 1
NITE EQU 2
DARKNESS EQU 3
2012-05-23 19:05:19 -07:00
; evolution types
EVOLVE_LEVEL EQU 1
EVOLVE_ITEM EQU 2
EVOLVE_TRADE EQU 3
EVOLVE_HAPPINESS EQU 4
EVOLVE_STAT EQU 5
2013-04-29 12:42:31 -07:00
BASE_HAPPINESS EQU 70
2012-05-23 19:05:19 -07:00
; happiness evolution triggers
2013-04-12 14:21:31 -07:00
HAPPINESS_TO_EVOLVE EQU 220
2012-05-23 19:05:19 -07:00
TR_ANYTIME EQU 1
TR_MORNDAY EQU 2
TR_NITE EQU 3
; stat evolution triggers
ATK_GT_DEF EQU 1
ATK_LT_DEF EQU 2
ATK_EQ_DEF EQU 3
2012-05-24 22:16:16 -07:00
2013-06-10 18:56:34 -07:00
; main menu
2012-07-06 22:07:45 -07:00
CONTINUE EQU 0
NEW_GAME EQU 1
OPTION EQU 2
MYSTERY_GIFT EQU 3
MOBILE EQU 4
MOBILE_STUDIUM EQU 5
2012-09-23 09:50:44 -07:00
2013-05-22 00:11:07 -07:00
; kris's pc menu items
WITHDRAW_ITEM EQU 0
DEPOSIT_ITEM EQU 1
TOSS_ITEM EQU 2
MAIL_BOX EQU 3
DECORATION EQU 4
TURN_OFF EQU 5
LOG_OFF EQU 6
2012-09-23 09:50:44 -07:00
; name length
PLAYER_NAME_LENGTH EQU 8
2012-10-08 23:32:05 -07:00
PKMN_NAME_LENGTH EQU 11
; predefs
2013-04-29 13:32:05 -07:00
PREDEF_FLAG EQU $03
PREDEF_FILLPP EQU $05
2013-04-07 23:15:08 -07:00
PREDEF_ADDPARTYMON EQU $06
PREDEF_FILLSTATS EQU $0C
PREDEF_FILLMOVES EQU $1B
PREDEF_GETUNOWNLETTER EQU $2D
2013-06-10 18:56:34 -07:00
PREDEF_DECOMPRESS EQU $40
2013-05-03 23:13:44 -07:00
; flag manipulation
RESET_FLAG EQU 0
SET_FLAG EQU 1
CHECK_FLAG EQU 2
; player states
2013-06-10 18:56:34 -07:00
PLAYER_NORMAL EQU 0
PLAYER_BIKE EQU 1
PLAYER_SLIP EQU 2
PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8
; joypad
2013-02-19 20:57:07 -08:00
BUTTONS EQU %00010000
D_PAD EQU %00100000
AUTO_INPUT EQU $ff
NO_INPUT EQU %00000000
BUTTON_A EQU %00000001
BUTTON_B EQU %00000010
SELECT EQU %00000100
START EQU %00001000
D_RIGHT EQU %00010000
D_LEFT EQU %00100000
D_UP EQU %01000000
D_DOWN EQU %10000000
2013-06-10 18:56:34 -07:00
; Provisional wram bank 5 labels:
; 8 4-color palettes
Unkn1Pals EQU $d000
Unkn2Pals EQU $d040
BGPals EQU $d080
OBPals EQU $d0c0
2013-01-23 12:27:48 -08:00