Remove remaining raw $xxxx values, and replace "+ -1" with "- 1" (supported by rgbds 0.4.0)

This commit is contained in:
Rangi 2020-07-04 01:00:45 -04:00
parent 7e92d5ba8c
commit e4e0af4d67
29 changed files with 172 additions and 158 deletions

View file

@ -1735,7 +1735,7 @@ AnimationSlideMonDownAndHide:
jr nz, .loop
call AnimationHideMonPic
ld hl, wTempPic
ld bc, $0310
ld bc, $310
xor a
call FillMemory
jp CopyTempPicToMonPic
@ -1896,7 +1896,7 @@ AnimationSubstitute:
; Changes the pokemon's sprite to the mini sprite
ld hl, wTempPic
xor a
ld bc, $0310
ld bc, $310
call FillMemory
ld a, [hWhoseTurn]
and a
@ -1932,7 +1932,7 @@ AnimationSubstitute:
jp AnimationShowMonPic
CopySlowbroSpriteData:
ld bc, $0010
ld bc, $10
ld a, BANK(SlowbroSprite)
jp FarCopyData2

View file

@ -582,7 +582,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP:
ld a, [de] ; increment toxic counter
inc a
ld [de], a
ld hl, $0000
ld hl, 0
.toxicTicksLoop
add hl, bc
dec a
@ -5345,8 +5345,8 @@ MoveHitTest:
ret z ; Swift never misses (interestingly, Azure Heights lists this is a myth, but it appears to be true)
call CheckTargetSubstitute ; substitute check (note that this overwrites a)
jr z, .checkForDigOrFlyStatus
; this code is buggy. it's supposed to prevent HP draining moves from working on substitutes.
; since $7b79 overwrites a with either $00 or $01, it never works.
; This code is buggy. It's supposed to prevent HP draining moves from working on substitutes.
; Since CheckTargetSubstitute overwrites a with either $00 or $01, it never works.
cp DRAIN_HP_EFFECT
jp z, .moveMissed
cp DREAM_EATER_EFFECT
@ -6335,9 +6335,9 @@ LoadPlayerBackPic:
ld de, vBackPic
call InterlaceMergeSpriteBuffers
ld a, $a
ld [$0], a
ld [MBC1SRamEnable], a
xor a
ld [$4000], a
ld [MBC1SRamBank], a
ld hl, vSprites
ld de, sSpriteBuffer1
ld a, [hLoadedROMBank]
@ -6345,7 +6345,7 @@ LoadPlayerBackPic:
ld c, 7 * 7
call CopyVideoData
xor a
ld [$0], a
ld [MBC1SRamEnable], a
ld a, $31
ld [hStartTileID], a
coord hl, 1, 5

View file

@ -134,7 +134,7 @@ AIMoveChoiceModification1:
push de
push bc
ld hl, StatusAilmentMoveEffects
ld de, $0001
ld de, 1
call IsInArray
pop bc
pop de