mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -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
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
dec a
|
dec a
|
||||||
ld hl, BaseData + 7 ; type
|
ld hl, BaseData + BASE_TYPES
|
||||||
ld bc, BaseData1 - BaseData0
|
ld bc, BASE_DATA_SIZE
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld de, EnemyMonType
|
ld de, EnemyMonType
|
||||||
ld bc, 2
|
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
|
; BaseGrowthRate values
|
||||||
; GrowthRates indexes (see main.asm)
|
; GrowthRates indexes (see main.asm)
|
||||||
const_def
|
const_def
|
||||||
@ -28,37 +55,37 @@ const_value SET 1
|
|||||||
|
|
||||||
|
|
||||||
; party_struct members (see macros/wram.asm)
|
; party_struct members (see macros/wram.asm)
|
||||||
MON_SPECIES EQUS "(PartyMon1Species - PartyMon1)"
|
MON_SPECIES EQUS "(PartyMon1Species - PartyMon1)"
|
||||||
MON_ITEM EQUS "(PartyMon1Item - PartyMon1)"
|
MON_ITEM EQUS "(PartyMon1Item - PartyMon1)"
|
||||||
MON_MOVES EQUS "(PartyMon1Moves - PartyMon1)"
|
MON_MOVES EQUS "(PartyMon1Moves - PartyMon1)"
|
||||||
MON_ID EQUS "(PartyMon1ID - PartyMon1)"
|
MON_ID EQUS "(PartyMon1ID - PartyMon1)"
|
||||||
MON_EXP EQUS "(PartyMon1Exp - PartyMon1)"
|
MON_EXP EQUS "(PartyMon1Exp - PartyMon1)"
|
||||||
MON_STAT_EXP EQUS "(PartyMon1StatExp - PartyMon1)"
|
MON_STAT_EXP EQUS "(PartyMon1StatExp - PartyMon1)"
|
||||||
MON_HP_EXP EQUS "(PartyMon1HPExp - PartyMon1)"
|
MON_HP_EXP EQUS "(PartyMon1HPExp - PartyMon1)"
|
||||||
MON_ATK_EXP EQUS "(PartyMon1AtkExp - PartyMon1)"
|
MON_ATK_EXP EQUS "(PartyMon1AtkExp - PartyMon1)"
|
||||||
MON_DEF_EXP EQUS "(PartyMon1DefExp - PartyMon1)"
|
MON_DEF_EXP EQUS "(PartyMon1DefExp - PartyMon1)"
|
||||||
MON_SPD_EXP EQUS "(PartyMon1SpdExp - PartyMon1)"
|
MON_SPD_EXP EQUS "(PartyMon1SpdExp - PartyMon1)"
|
||||||
MON_SPC_EXP EQUS "(PartyMon1SpcExp - PartyMon1)"
|
MON_SPC_EXP EQUS "(PartyMon1SpcExp - PartyMon1)"
|
||||||
MON_DVS EQUS "(PartyMon1DVs - PartyMon1)"
|
MON_DVS EQUS "(PartyMon1DVs - PartyMon1)"
|
||||||
MON_PP EQUS "(PartyMon1PP - PartyMon1)"
|
MON_PP EQUS "(PartyMon1PP - PartyMon1)"
|
||||||
MON_HAPPINESS EQUS "(PartyMon1Happiness - PartyMon1)"
|
MON_HAPPINESS EQUS "(PartyMon1Happiness - PartyMon1)"
|
||||||
MON_PKRUS EQUS "(PartyMon1PokerusStatus - PartyMon1)"
|
MON_PKRUS EQUS "(PartyMon1PokerusStatus - PartyMon1)"
|
||||||
MON_CAUGHTDATA EQUS "(PartyMon1CaughtData - PartyMon1)"
|
MON_CAUGHTDATA EQUS "(PartyMon1CaughtData - PartyMon1)"
|
||||||
MON_CAUGHTLEVEL EQUS "(PartyMon1CaughtLevel - PartyMon1)"
|
MON_CAUGHTLEVEL EQUS "(PartyMon1CaughtLevel - PartyMon1)"
|
||||||
MON_CAUGHTTIME EQUS "(PartyMon1CaughtTime - PartyMon1)"
|
MON_CAUGHTTIME EQUS "(PartyMon1CaughtTime - PartyMon1)"
|
||||||
MON_CAUGHTGENDER EQUS "(PartyMon1CaughtGender - PartyMon1)"
|
MON_CAUGHTGENDER EQUS "(PartyMon1CaughtGender - PartyMon1)"
|
||||||
MON_CAUGHTLOCATION EQUS "(PartyMon1CaughtLocation - PartyMon1)"
|
MON_CAUGHTLOCATION EQUS "(PartyMon1CaughtLocation - PartyMon1)"
|
||||||
MON_LEVEL EQUS "(PartyMon1Level - PartyMon1)"
|
MON_LEVEL EQUS "(PartyMon1Level - PartyMon1)"
|
||||||
MON_STATUS EQUS "(PartyMon1Status - PartyMon1)"
|
MON_STATUS EQUS "(PartyMon1Status - PartyMon1)"
|
||||||
MON_HP EQUS "(PartyMon1HP - PartyMon1)"
|
MON_HP EQUS "(PartyMon1HP - PartyMon1)"
|
||||||
MON_MAXHP EQUS "(PartyMon1MaxHP - PartyMon1)"
|
MON_MAXHP EQUS "(PartyMon1MaxHP - PartyMon1)"
|
||||||
MON_ATK EQUS "(PartyMon1Attack - PartyMon1)"
|
MON_ATK EQUS "(PartyMon1Attack - PartyMon1)"
|
||||||
MON_DEF EQUS "(PartyMon1Defense - PartyMon1)"
|
MON_DEF EQUS "(PartyMon1Defense - PartyMon1)"
|
||||||
MON_SPD EQUS "(PartyMon1Speed - PartyMon1)"
|
MON_SPD EQUS "(PartyMon1Speed - PartyMon1)"
|
||||||
MON_SAT EQUS "(PartyMon1SpclAtk - PartyMon1)"
|
MON_SAT EQUS "(PartyMon1SpclAtk - PartyMon1)"
|
||||||
MON_SDF EQUS "(PartyMon1SpclDef - PartyMon1)"
|
MON_SDF EQUS "(PartyMon1SpclDef - PartyMon1)"
|
||||||
BOXMON_STRUCT_LENGTH EQUS "(PartyMon1End - PartyMon1)"
|
BOXMON_STRUCT_LENGTH EQUS "(PartyMon1End - PartyMon1)"
|
||||||
PARTYMON_STRUCT_LENGTH EQUS "(PartyMon1StatsEnd - PartyMon1)"
|
PARTYMON_STRUCT_LENGTH EQUS "(PartyMon1StatsEnd - PartyMon1)"
|
||||||
REDMON_STRUCT_LENGTH EQU 44
|
REDMON_STRUCT_LENGTH EQU 44
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
BaseData0::
|
|
||||||
INCLUDE "data/base_stats/bulbasaur.asm"
|
INCLUDE "data/base_stats/bulbasaur.asm"
|
||||||
BaseData1::
|
|
||||||
INCLUDE "data/base_stats/ivysaur.asm"
|
INCLUDE "data/base_stats/ivysaur.asm"
|
||||||
INCLUDE "data/base_stats/venusaur.asm"
|
INCLUDE "data/base_stats/venusaur.asm"
|
||||||
INCLUDE "data/base_stats/charmander.asm"
|
INCLUDE "data/base_stats/charmander.asm"
|
||||||
|
@ -737,8 +737,8 @@ Link_PrepPartyData_Gen1: ; 28499
|
|||||||
.skip_steel
|
.skip_steel
|
||||||
push bc
|
push bc
|
||||||
dec a
|
dec a
|
||||||
ld hl, BaseData + 7 ; type
|
ld hl, BaseData + BASE_TYPES
|
||||||
ld bc, BaseData1 - BaseData0
|
ld bc, BASE_DATA_SIZE
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld bc, 2
|
ld bc, 2
|
||||||
ld a, BANK(BaseData)
|
ld a, BANK(BaseData)
|
||||||
|
8
home.asm
8
home.asm
@ -1704,11 +1704,11 @@ GetBaseData:: ; 3856
|
|||||||
|
|
||||||
; Get BaseData
|
; Get BaseData
|
||||||
dec a
|
dec a
|
||||||
ld bc, BaseData1 - BaseData0
|
ld bc, BASE_DATA_SIZE
|
||||||
ld hl, BaseData
|
ld hl, BaseData
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld de, CurBaseData
|
ld de, CurBaseData
|
||||||
ld bc, BaseData1 - BaseData0
|
ld bc, BASE_DATA_SIZE
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
jr .end
|
jr .end
|
||||||
|
|
||||||
@ -1881,8 +1881,8 @@ Function392d:: ; 392d
|
|||||||
dec a
|
dec a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld hl, BaseData + 0
|
ld hl, BaseData + BASE_DEX_NO
|
||||||
ld bc, BaseData1 - BaseData0
|
ld bc, BASE_DATA_SIZE
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, BANK(BaseData)
|
ld a, BANK(BaseData)
|
||||||
call GetFarHalfword
|
call GetFarHalfword
|
||||||
|
@ -2374,12 +2374,12 @@ LoadTilesetHeader:: ; 2d27
|
|||||||
push bc
|
push bc
|
||||||
|
|
||||||
ld hl, Tilesets
|
ld hl, Tilesets
|
||||||
ld bc, Tileset1 - Tileset0
|
ld bc, TilesetHeaderEnd - TilesetHeader
|
||||||
ld a, [wTileset]
|
ld a, [wTileset]
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
|
|
||||||
ld de, TilesetBank
|
ld de, TilesetBank
|
||||||
ld bc, Tileset1 - Tileset0
|
ld bc, TilesetHeaderEnd - TilesetHeader
|
||||||
|
|
||||||
ld a, BANK(Tilesets)
|
ld a, BANK(Tilesets)
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
|
4
main.asm
4
main.asm
@ -3919,8 +3919,8 @@ GetGender: ; 50bdd
|
|||||||
push bc
|
push bc
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
dec a
|
dec a
|
||||||
ld hl, BaseData + BaseGender - CurBaseData
|
ld hl, BaseData + BASE_GENDER
|
||||||
ld bc, BaseData1 - BaseData
|
ld bc, BASE_DATA_SIZE
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
|
@ -7,9 +7,7 @@ tileset: macro
|
|||||||
dw \1PalMap
|
dw \1PalMap
|
||||||
endm
|
endm
|
||||||
|
|
||||||
Tileset0::
|
|
||||||
tileset Tileset0
|
tileset Tileset0
|
||||||
Tileset1::
|
|
||||||
tileset TilesetJohto1
|
tileset TilesetJohto1
|
||||||
tileset TilesetJohto2
|
tileset TilesetJohto2
|
||||||
tileset TilesetKanto
|
tileset TilesetKanto
|
||||||
|
6
wram.asm
6
wram.asm
@ -1997,6 +1997,7 @@ TilesetCollisionAddress:: dw ; d1e0
|
|||||||
TilesetAnim:: dw ; bank 3f ; d1e2
|
TilesetAnim:: dw ; bank 3f ; d1e2
|
||||||
ds 2 ; unused ; d1e4
|
ds 2 ; unused ; d1e4
|
||||||
TilesetPalettes:: dw ; bank 3f ; d1e6
|
TilesetPalettes:: dw ; bank 3f ; d1e6
|
||||||
|
TilesetHeaderEnd::
|
||||||
|
|
||||||
EvolvableFlags:: flag_array PARTY_LENGTH ; d1e8
|
EvolvableFlags:: flag_array PARTY_LENGTH ; d1e8
|
||||||
|
|
||||||
@ -2109,7 +2110,9 @@ BaseType1:: db ; d23d
|
|||||||
BaseType2:: db ; d23e
|
BaseType2:: db ; d23e
|
||||||
BaseCatchRate:: db ; d23f
|
BaseCatchRate:: db ; d23f
|
||||||
BaseExp:: db ; d240
|
BaseExp:: db ; d240
|
||||||
BaseItems:: dw ; d241
|
BaseItems:: ; d241
|
||||||
|
BaseItem1:: db ; d241
|
||||||
|
BaseItem2:: db ; d242
|
||||||
BaseGender:: db ; d243
|
BaseGender:: db ; d243
|
||||||
BaseUnknown1:: db ; d244
|
BaseUnknown1:: db ; d244
|
||||||
BaseEggSteps:: db ; d245
|
BaseEggSteps:: db ; d245
|
||||||
@ -2119,6 +2122,7 @@ BasePadding:: ds 4 ; d248
|
|||||||
BaseGrowthRate:: db ; d24c
|
BaseGrowthRate:: db ; d24c
|
||||||
BaseEggGroups:: db ; d24d
|
BaseEggGroups:: db ; d24d
|
||||||
BaseTMHM:: flag_array NUM_TM_HM_TUTOR ; d24e
|
BaseTMHM:: flag_array NUM_TM_HM_TUTOR ; d24e
|
||||||
|
CurBaseDataEnd::
|
||||||
|
|
||||||
CurDamage:: dw ; d256
|
CurDamage:: dw ; d256
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user