mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Add member constants for the base data struct, same as most other structs
This commit is contained in:
parent
8c2c9e91b5
commit
4afc2f01ef
@ -3484,8 +3484,8 @@ IsThePlayerPkmnTypesEffectiveAgainstOTPkmn: ; 3d618
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
dec a
|
||||
ld hl, BaseData + 7 ; type
|
||||
ld bc, BaseData1 - BaseData0
|
||||
ld hl, BaseData + BASE_TYPES
|
||||
ld bc, BASE_DATA_SIZE
|
||||
call AddNTimes
|
||||
ld de, EnemyMonType
|
||||
ld bc, 2
|
||||
|
@ -1,3 +1,30 @@
|
||||
; base data struct members (see data/base_stats/*.asm)
|
||||
BASE_DEX_NO EQUS "(BaseDexNo - CurBaseData)"
|
||||
BASE_STATS EQUS "(BaseStats - CurBaseData)"
|
||||
BASE_HP EQUS "(BaseHP - CurBaseData)"
|
||||
BASE_ATK EQUS "(BaseAttack - CurBaseData)"
|
||||
BASE_SPD EQUS "(BaseSpeed - CurBaseData)"
|
||||
BASE_SAT EQUS "(BaseSpecialAttack - CurBaseData)"
|
||||
BASE_SDF EQUS "(BaseSpecialDefense - CurBaseData)"
|
||||
BASE_TYPES EQUS "(BaseType - CurBaseData)"
|
||||
BASE_TYPE_1 EQUS "(BaseType1 - CurBaseData)"
|
||||
BASE_TYPE_2 EQUS "(BaseType2 - CurBaseData)"
|
||||
BASE_CATCH_RATE EQUS "(BaseCatchRate - CurBaseData)"
|
||||
BASE_EXP EQUS "(BaseExp - CurBaseData)"
|
||||
BASE_ITEMS EQUS "(BaseItems - CurBaseData)"
|
||||
BASE_ITEM_1 EQUS "(BaseItem1 - CurBaseData)"
|
||||
BASE_ITEM_2 EQUS "(BaseItem2 - CurBaseData)"
|
||||
BASE_GENDER EQUS "(BaseGender - CurBaseData)"
|
||||
BASE_UNKNOWN_1 EQUS "(BaseUnknown1 - CurBaseData)"
|
||||
BASE_EGG_STEPS EQUS "(BaseEggSteps - CurBaseData)"
|
||||
BASE_UNKNOWN_2 EQUS "(BaseUnknown2 - CurBaseData)"
|
||||
BASE_PIC_SIZE EQUS "(BasePicSize - CurBaseData)"
|
||||
BASE_PADDING EQUS "(BasePadding - CurBaseData)"
|
||||
BASE_GROWTH_RATE EQUS "(BaseGrowthRate - CurBaseData)"
|
||||
BASE_EGG_GROUPS EQUS "(BaseEggGroups - CurBaseData)"
|
||||
BASE_TMHM EQUS "(BaseTMHM - CurBaseData)"
|
||||
BASE_DATA_SIZE EQUS "(CurBaseDataEnd - CurBaseData)"
|
||||
|
||||
; BaseGrowthRate values
|
||||
; GrowthRates indexes (see main.asm)
|
||||
const_def
|
||||
|
@ -1,6 +1,4 @@
|
||||
BaseData0::
|
||||
INCLUDE "data/base_stats/bulbasaur.asm"
|
||||
BaseData1::
|
||||
INCLUDE "data/base_stats/ivysaur.asm"
|
||||
INCLUDE "data/base_stats/venusaur.asm"
|
||||
INCLUDE "data/base_stats/charmander.asm"
|
||||
|
@ -737,8 +737,8 @@ Link_PrepPartyData_Gen1: ; 28499
|
||||
.skip_steel
|
||||
push bc
|
||||
dec a
|
||||
ld hl, BaseData + 7 ; type
|
||||
ld bc, BaseData1 - BaseData0
|
||||
ld hl, BaseData + BASE_TYPES
|
||||
ld bc, BASE_DATA_SIZE
|
||||
call AddNTimes
|
||||
ld bc, 2
|
||||
ld a, BANK(BaseData)
|
||||
|
8
home.asm
8
home.asm
@ -1704,11 +1704,11 @@ GetBaseData:: ; 3856
|
||||
|
||||
; Get BaseData
|
||||
dec a
|
||||
ld bc, BaseData1 - BaseData0
|
||||
ld bc, BASE_DATA_SIZE
|
||||
ld hl, BaseData
|
||||
call AddNTimes
|
||||
ld de, CurBaseData
|
||||
ld bc, BaseData1 - BaseData0
|
||||
ld bc, BASE_DATA_SIZE
|
||||
call CopyBytes
|
||||
jr .end
|
||||
|
||||
@ -1881,8 +1881,8 @@ Function392d:: ; 392d
|
||||
dec a
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld hl, BaseData + 0
|
||||
ld bc, BaseData1 - BaseData0
|
||||
ld hl, BaseData + BASE_DEX_NO
|
||||
ld bc, BASE_DATA_SIZE
|
||||
call AddNTimes
|
||||
ld a, BANK(BaseData)
|
||||
call GetFarHalfword
|
||||
|
@ -2374,12 +2374,12 @@ LoadTilesetHeader:: ; 2d27
|
||||
push bc
|
||||
|
||||
ld hl, Tilesets
|
||||
ld bc, Tileset1 - Tileset0
|
||||
ld bc, TilesetHeaderEnd - TilesetHeader
|
||||
ld a, [wTileset]
|
||||
call AddNTimes
|
||||
|
||||
ld de, TilesetBank
|
||||
ld bc, Tileset1 - Tileset0
|
||||
ld bc, TilesetHeaderEnd - TilesetHeader
|
||||
|
||||
ld a, BANK(Tilesets)
|
||||
call FarCopyBytes
|
||||
|
4
main.asm
4
main.asm
@ -3919,8 +3919,8 @@ GetGender: ; 50bdd
|
||||
push bc
|
||||
ld a, [CurPartySpecies]
|
||||
dec a
|
||||
ld hl, BaseData + BaseGender - CurBaseData
|
||||
ld bc, BaseData1 - BaseData
|
||||
ld hl, BaseData + BASE_GENDER
|
||||
ld bc, BASE_DATA_SIZE
|
||||
call AddNTimes
|
||||
pop bc
|
||||
|
||||
|
@ -7,9 +7,7 @@ tileset: macro
|
||||
dw \1PalMap
|
||||
endm
|
||||
|
||||
Tileset0::
|
||||
tileset Tileset0
|
||||
Tileset1::
|
||||
tileset TilesetJohto1
|
||||
tileset TilesetJohto2
|
||||
tileset TilesetKanto
|
||||
|
6
wram.asm
6
wram.asm
@ -1997,6 +1997,7 @@ TilesetCollisionAddress:: dw ; d1e0
|
||||
TilesetAnim:: dw ; bank 3f ; d1e2
|
||||
ds 2 ; unused ; d1e4
|
||||
TilesetPalettes:: dw ; bank 3f ; d1e6
|
||||
TilesetHeaderEnd::
|
||||
|
||||
EvolvableFlags:: flag_array PARTY_LENGTH ; d1e8
|
||||
|
||||
@ -2109,7 +2110,9 @@ BaseType1:: db ; d23d
|
||||
BaseType2:: db ; d23e
|
||||
BaseCatchRate:: db ; d23f
|
||||
BaseExp:: db ; d240
|
||||
BaseItems:: dw ; d241
|
||||
BaseItems:: ; d241
|
||||
BaseItem1:: db ; d241
|
||||
BaseItem2:: db ; d242
|
||||
BaseGender:: db ; d243
|
||||
BaseUnknown1:: db ; d244
|
||||
BaseEggSteps:: db ; d245
|
||||
@ -2119,6 +2122,7 @@ BasePadding:: ds 4 ; d248
|
||||
BaseGrowthRate:: db ; d24c
|
||||
BaseEggGroups:: db ; d24d
|
||||
BaseTMHM:: flag_array NUM_TM_HM_TUTOR ; d24e
|
||||
CurBaseDataEnd::
|
||||
|
||||
CurDamage:: dw ; d256
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user