Misc fixes for the usage of constants

Several improvements that will make it easier to edit some data
structures for everyone.
This commit is contained in:
mid-kid 2017-12-19 21:28:06 +01:00
parent 21607bdd1f
commit cbec3771e2
4 changed files with 6 additions and 6 deletions

View File

@ -3454,7 +3454,7 @@ IsThePlayerPkmnTypesEffectiveAgainstOTPkmn: ; 3d618
ld bc, BASE_DATA_SIZE ld bc, BASE_DATA_SIZE
call AddNTimes call AddNTimes
ld de, EnemyMonType ld de, EnemyMonType
ld bc, 2 ld bc, BASE_CATCH_RATE - BASE_TYPES
ld a, BANK(BaseData) ld a, BANK(BaseData)
call FarCopyBytes call FarCopyBytes
ld a, [BattleMonType1] ld a, [BattleMonType1]

View File

@ -3881,11 +3881,11 @@ BattleCommand_Counter: ; 35813
ld de, StringBuffer1 ld de, StringBuffer1
call GetMoveData call GetMoveData
ld a, [StringBuffer1 + 2] ld a, [StringBuffer1 + MOVE_POWER]
and a and a
ret z ret z
ld a, [StringBuffer1 + 3] ld a, [StringBuffer1 + MOVE_TYPE]
cp SPECIAL cp SPECIAL
ret nc ret nc

View File

@ -740,7 +740,7 @@ Link_PrepPartyData_Gen1: ; 28499
ld hl, BaseData + BASE_TYPES ld hl, BaseData + BASE_TYPES
ld bc, BASE_DATA_SIZE ld bc, BASE_DATA_SIZE
call AddNTimes call AddNTimes
ld bc, 2 ld bc, BASE_CATCH_RATE - BASE_TYPES
ld a, BANK(BaseData) ld a, BANK(BaseData)
call FarCopyBytes call FarCopyBytes
pop bc pop bc

View File

@ -377,7 +377,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
call .PlaceHPBar call .PlaceHPBar
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
ld a, [CurBaseData] ld a, [BaseDexNo]
ld [wd265], a ld [wd265], a
ld [CurSpecies], a ld [CurSpecies], a
hlcoord 8, 0 hlcoord 8, 0
@ -401,7 +401,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
hlcoord 9, 4 hlcoord 9, 4
ld a, "/" ld a, "/"
ld [hli], a ld [hli], a
ld a, [CurBaseData] ld a, [BaseDexNo]
ld [wd265], a ld [wd265], a
call GetPokemonName call GetPokemonName
call PlaceString call PlaceString