More constants and data tables

This commit is contained in:
Remy Oukaour 2018-01-11 01:45:27 -05:00
parent cc8dac5a22
commit b45f89f80c
32 changed files with 450 additions and 430 deletions

View File

@ -63,6 +63,7 @@ const_value set 1
const STAT_SATK
const STAT_SDEF
NUM_STATS EQU const_value
STAT_SPC EQU STAT_SATK
; stat formula constants
STAT_MIN_NORMAL EQU 5

View File

@ -164,7 +164,7 @@ const_value set 70
; PartyMenuActionText values
; GetPartyMenuTilemapPointers arguments (see engine/party_menu.asm)
; GetPartyMenuQualityIndexes arguments (see engine/party_menu.asm)
const_def
const PARTYMENUACTION_CHOOSE_POKEMON
const PARTYMENUACTION_HEALING_ITEM

View File

@ -244,6 +244,7 @@ NUM_TREEMON_SETS EQU const_value
EMOTE_MEM EQU -1
; FruitTreeItems indexes (see data/items/fruit_trees.asm)
; used by fruittree command
const_value set 1
const FRUITTREE_ROUTE_29 ; 01
const FRUITTREE_ROUTE_30_1 ; 02
@ -278,8 +279,8 @@ const_value set 1
NUM_FRUIT_TREES EQU const_value +- 1
; elevator floors
; used by elevfloor
; ElevatorFloorNames indexes (see data/elevator_floors.asm)
; used by elevfloor macro
const_def
const FLOOR_B4F
const FLOOR_B3F

View File

@ -1,7 +1,8 @@
; radio channel ids
; indexes for:
; - PlayRadioShow/RadioJumptable (see engine/radio.asm)
; - RadioChannelSongs (see data/radio/channel_music.asm)
; - PlayRadioShow/RadioJumptable (see engine/radio.asm)
; - RadioChannels (see engine/radio.asm)
const_def
const OAKS_POKEMON_TALK ; 00
const POKEDEX_SHOW ; 01

View File

@ -1,7 +1,8 @@
; TypeNames indexes (see data/type_names.asm)
; TypeNames indexes (see data/types/names.asm)
; also used in:
; - TypeMatchups (see data/type_matchups.asm)
; - Pokedex_SearchForMons.TypeConversionTable and Pokedex_PlaceSearchScreenTypeStrings.TypeStrings (see engine/pokedex.asm)
; - PokedexTypeSearchConversionTable (see data/types/search_types.asm)
; - PokedexTypeSearchStrings (see data/types/search_strings.asm)
; - TypeMatchups (see data/battle/type_matchups.asm)
const_def
PHYSICAL EQU const_value
@ -38,5 +39,6 @@ SPECIAL EQU const_value
const ICE
const DRAGON
const DARK
TYPES_END EQU const_value
NUM_TYPES EQU TYPES_END + UNUSED_TYPES - UNUSED_TYPES_END

35
data/elevator_floors.asm Normal file
View File

@ -0,0 +1,35 @@
ElevatorFloorNames:
; entries correspond to FLOOR_* constants
dw .B4F
dw .B3F
dw .B2F
dw .B1F
dw ._1F
dw ._2F
dw ._3F
dw ._4F
dw ._5F
dw ._6F
dw ._7F
dw ._8F
dw ._9F
dw ._10F
dw ._11F
dw .ROOF
.B4F: db "B4F@"
.B3F: db "B3F@"
.B2F: db "B2F@"
.B1F: db "B1F@"
._1F: db "1F@"
._2F: db "2F@"
._3F: db "3F@"
._4F: db "4F@"
._5F: db "5F@"
._6F: db "6F@"
._7F: db "7F@"
._8F: db "8F@"
._9F: db "9F@"
._10F: db "10F@"
._11F: db "11F@"
.ROOF: db "ROOF@"

View File

@ -0,0 +1,11 @@
ApricornBalls: ; 24ca0
; apricorn, ball
db RED_APRICORN, LEVEL_BALL
db BLU_APRICORN, LURE_BALL
db YLW_APRICORN, MOON_BALL
db GRN_APRICORN, FRIEND_BALL
db WHT_APRICORN, FAST_BALL
db BLK_APRICORN, HEAVY_BALL
db PNK_APRICORN, LOVE_BALL
db -1
; 24caf

File diff suppressed because it is too large Load Diff

18
data/items/heal_hp.asm Normal file
View File

@ -0,0 +1,18 @@
HealingHPAmounts: ; f3af
dbw FRESH_WATER, 50
dbw SODA_POP, 60
dbw LEMONADE, 80
dbw HYPER_POTION, 200
dbw SUPER_POTION, 50
dbw POTION, 20
dbw MAX_POTION, MAX_STAT_VALUE
dbw FULL_RESTORE, MAX_STAT_VALUE
dbw MOOMOO_MILK, 100
dbw BERRY, 10
dbw GOLD_BERRY, 30
dbw ENERGYPOWDER, 50
dbw ENERGY_ROOT, 200
dbw RAGECANDYBAR, 20
dbw BERRY_JUICE, 20
dbw -1, 0 ; end
; f3df

View File

@ -0,0 +1,18 @@
StatusHealingActions: ; f071
; item, party menu action text, status
db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
db ICE_HEAL, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
db AWAKENING, PARTYMENUTEXT_HEAL_SLP, SLP
db PARLYZ_HEAL, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
db FULL_HEAL, PARTYMENUTEXT_HEAL_ALL, %11111111
db FULL_RESTORE, PARTYMENUTEXT_HEAL_ALL, %11111111
db HEAL_POWDER, PARTYMENUTEXT_HEAL_ALL, %11111111
db PSNCUREBERRY, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
db PRZCUREBERRY, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
db BURNT_BERRY, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
db ICE_BERRY, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
db MINT_BERRY, PARTYMENUTEXT_HEAL_SLP, SLP
db MIRACLEBERRY, PARTYMENUTEXT_HEAL_ALL, %11111111
db -1, 0, 0 ; end
; f09e

7
data/items/x_stats.asm Normal file
View File

@ -0,0 +1,7 @@
XItemStats: ; f504
; item, stat
db X_ATTACK, ATTACK
db X_DEFEND, DEFENSE
db X_SPEED, SPEED
db X_SPECIAL, SP_ATTACK
; f50c

32
data/maps/sgb_roofs.asm Normal file
View File

@ -0,0 +1,32 @@
; Crystal does not support SGB, so this is unused.
MapGroupRoofSGBPalInds: ; 8a45
; entries correspond to map groups
db $00 ; group 0 (unused)
db $12 ; group 1 (Olivine)
db $14 ; group 2 (Mahogany)
db $18 ; group 3 (dungeons)
db $11 ; group 4 (Ecruteak)
db $15 ; group 5 (Blackthorn)
db $09 ; group 6 (Cinnabar)
db $04 ; group 7 (Cerulean)
db $0f ; group 8 (Azalea)
db $16 ; group 9 (Lake of Rage)
db $0e ; group 10 (Violet)
db $10 ; group 11 (Goldenrod)
db $06 ; group 12 (Vermilion)
db $01 ; group 13 (Pallet)
db $03 ; group 14 (Pewter)
db $06 ; group 15 (Mount Moon Square)
db $0b ; group 16 (Indigo)
db $08 ; group 17 (Fuchsia)
db $05 ; group 18 (Lavender)
db $17 ; group 19 (Silver Cave)
db $08 ; group 20 (Cable Club)
db $07 ; group 21 (Celadon)
db $13 ; group 22 (Cianwood)
db $02 ; group 23 (Viridian)
db $0c ; group 24 (New Bark)
db $0a ; group 25 (Saffron)
db $0d ; group 26 (Cherrygrove)
; 8a60

View File

@ -0,0 +1,5 @@
PermanentNumbers: ; 90066
db PHONECONTACT_MOM
db PHONECONTACT_ELM
db -1 ; end
; 90069

View File

@ -48,3 +48,5 @@ Ghost: db "GHOST@"
Steel: db "STEEL@"
Dragon: db "DRAGON@"
Dark: db "DARK@"
; 50a28

View File

@ -0,0 +1,21 @@
PokedexTypeSearchStrings: ; 40fe4
; entries correspond with PokedexTypeSearchConversionTable (see data/types/search_types.asm)
db " ---- @"
db " NORMAL @"
db " FIRE @"
db " WATER @"
db " GRASS @"
db "ELECTRIC@"
db " ICE @"
db "FIGHTING@"
db " POISON @"
db " GROUND @"
db " FLYING @"
db "PSYCHIC @"
db " BUG @"
db " ROCK @"
db " GHOST @"
db " DRAGON @"
db " DARK @"
db " STEEL @"
; 41086

View File

@ -0,0 +1,20 @@
PokedexTypeSearchConversionTable: ; 410f6
; entries correspond with PokedexTypeSearchStrings (see data/types/search_strings.asm)
db NORMAL
db FIRE
db WATER
db GRASS
db ELECTRIC
db ICE
db FIGHTING
db POISON
db GROUND
db FLYING
db PSYCHIC
db BUG
db ROCK
db GHOST
db DRAGON
db DARK
db STEEL
; 41107

View File

@ -0,0 +1,15 @@
Dakutens: ; dummied out
db "かが", "きぎ", "くぐ", "けげ", "こご"
db "さざ", "しじ", "すず", "せぜ", "そぞ"
db "ただ", "ちぢ", "つづ", "てで", "とど"
db "はば", "ひび", "ふぶ", "へべ", "ほぼ"
db "カガ", "キギ", "クグ", "ケゲ", "コゴ"
db "サザ", "シジ", "スズ", "セゼ", "ソゾ"
db "タダ", "チヂ", "ツヅ", "テデ", "トド"
db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
db -1 ; end
Handakutens: ; dummied out
db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
db -1 ; end

View File

@ -200,12 +200,12 @@ Elevator_MenuData2: ; 0x13558
db 4, 0 ; rows, columns
db 1 ; horizontal spacing
dbw 0, CurElevator
dba GetElevatorFlorStrings
dba GetElevatorFloorStrings
dba NULL
dba NULL
; 13568
GetElevatorFlorStrings: ; 13568
GetElevatorFloorStrings: ; 13568
ld a, [MenuSelection]
GetFloorString: ; 1356b
push de
@ -220,7 +220,7 @@ FloorToString: ; 13575
push de
ld e, a
ld d, 0
ld hl, .floors
ld hl, ElevatorFloorNames
add hl, de
add hl, de
ld a, [hli]
@ -230,54 +230,4 @@ FloorToString: ; 13575
ret
; 13583
.floors
dw .b4f
dw .b3f
dw .b2f
dw .b1f
dw ._1f
dw ._2f
dw ._3f
dw ._4f
dw ._5f
dw ._6f
dw ._7f
dw ._8f
dw ._9f
dw ._10f
dw ._11f
dw .roof
.b4f
db "B4F@"
.b3f
db "B3F@"
.b2f
db "B2F@"
.b1f
db "B1F@"
._1f
db "1F@"
._2f
db "2F@"
._3f
db "3F@"
._4f
db "4F@"
._5f
db "5F@"
._6f
db "6F@"
._7f
db "7F@"
._8f
db "8F@"
._9f
db "9F@"
._10f
db "10F@"
._11f
db "11F@"
.roof
db "ROOF@"
; 135db
INCLUDE "data/elevator_floors.asm"

View File

@ -220,8 +220,7 @@ GetMagnetTrainBGTiles: ; 8cd74
; 8cd82
MagnetTrainBGTiles: ; 8cd82
; Alternating tiles for each line
; of the Magnet Train tilemap.
; Alternating tiles for each line of the Magnet Train tilemap.
db $4c, $4d ; bush
db $5c, $5d ; bush
db $4c, $4d ; bush
@ -263,25 +262,25 @@ SetMagnetTrainPals: ; 8cdc3
; bushes
hlbgcoord 0, 0
ld bc, 4 * BG_MAP_WIDTH
ld a, $2
ld a, PAL_BG_GREEN
call ByteFill
; train
hlbgcoord 0, 4
ld bc, 10 * BG_MAP_WIDTH
xor a
xor a ; PAL_BG_GRAY
call ByteFill
; more bushes
hlbgcoord 0, 14
ld bc, 4 * BG_MAP_WIDTH
ld a, $2
ld a, PAL_BG_GREEN
call ByteFill
; train window
hlbgcoord 7, 8
ld bc, 6
ld a, $4
ld a, PAL_BG_YELLOW
call ByteFill
ld a, $0
@ -459,23 +458,11 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
; 8ceff
MagnetTrainTilemap1:
db $1f, $05, $06, $0a, $0a
db $0a, $09, $0a, $0a, $0a
db $0a, $0a, $0a, $09, $0a
db $0a, $0a, $0b, $0c, $1f
db $1f, $05, $06, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0b, $0c, $1f
MagnetTrainTilemap2:
db $14, $15, $16, $1a, $1a
db $1a, $19, $1a, $1a, $1a
db $1a, $1a, $1a, $19, $1a
db $1a, $1a, $1b, $1c, $1d
db $14, $15, $16, $1a, $1a, $1a, $19, $1a, $1a, $1a, $1a, $1a, $1a, $19, $1a, $1a, $1a, $1b, $1c, $1d
MagnetTrainTilemap3:
db $24, $25, $26, $27, $07
db $2f, $29, $28, $28, $28
db $28, $28, $28, $29, $07
db $2f, $2a, $2b, $2c, $2d
db $24, $25, $26, $27, $07, $2f, $29, $28, $28, $28, $28, $28, $28, $29, $07, $2f, $2a, $2b, $2c, $2d
MagnetTrainTilemap4:
db $20, $1f, $2e, $1f, $17
db $00, $2e, $1f, $1f, $1f
db $1f, $1f, $1f, $2e, $17
db $00, $1f, $2e, $1f, $0f
db $20, $1f, $2e, $1f, $17, $00, $2e, $1f, $1f, $1f, $1f, $1f, $1f, $2e, $17, $00, $1f, $2e, $1f, $0f
; 8cf4f

View File

@ -31,7 +31,6 @@ LoadPoisonBGPals: ; cbcdd
ld hl, wBGPals2
ld c, 4 palettes
.loop
; RGB 28, 21, 31
ld a, LOW(palred 28 + palgreen 21 + palblue 31)
ld [hli], a
ld a, HIGH(palred 28 + palgreen 21 + palblue 31)

Some files were not shown because too many files have changed in this diff Show More