mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Add some comments regarding 16-bit increment/decrement
This commit is contained in:
parent
dc18e188b2
commit
2fe0cbbb19
@ -982,6 +982,7 @@ ApplyPitchSlide:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
add [hl]
|
add [hl]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
; could have done "jr nc, .no_rollover / inc de / .no_rollover"
|
||||||
ld a, 0
|
ld a, 0
|
||||||
adc e
|
adc e
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -1022,6 +1023,7 @@ ApplyPitchSlide:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
add a
|
add a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
; could have done "jr nc, .no_rollover / dec de / .no_rollover"
|
||||||
ld a, e
|
ld a, e
|
||||||
sbc 0
|
sbc 0
|
||||||
ld e, a
|
ld e, a
|
||||||
|
@ -628,14 +628,16 @@ PokeAnim_ConvertAndApplyBitmask:
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, [wBoxAlignment]
|
ld a, [wBoxAlignment]
|
||||||
and a
|
and a
|
||||||
jr nz, .go
|
jr nz, .subtract
|
||||||
|
; hl += [wPokeAnimBitmaskCurCol]
|
||||||
ld a, [wPokeAnimBitmaskCurCol]
|
ld a, [wPokeAnimBitmaskCurCol]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
add hl, de
|
add hl, de
|
||||||
jr .skip2
|
jr .done
|
||||||
|
|
||||||
.go
|
.subtract
|
||||||
|
; hl -= [wPokeAnimBitmaskCurCol]
|
||||||
ld a, [wPokeAnimBitmaskCurCol]
|
ld a, [wPokeAnimBitmaskCurCol]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, l
|
ld a, l
|
||||||
@ -645,7 +647,7 @@ PokeAnim_ConvertAndApplyBitmask:
|
|||||||
sbc 0
|
sbc 0
|
||||||
ld h, a
|
ld h, a
|
||||||
|
|
||||||
.skip2
|
.done
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.UnusedSizeData: ; unreferenced
|
.UnusedSizeData: ; unreferenced
|
||||||
|
Loading…
Reference in New Issue
Block a user