Replace magic numbers with TILE_WIDTH (#1056)

* Replace magic numbers with TILE_WIDTH

* Address more instances
This commit is contained in:
Idain
2023-07-26 20:50:16 -04:00
committed by GitHub
parent 1d64befdb7
commit 94df3c5aa3
17 changed files with 62 additions and 62 deletions

View File

@@ -681,7 +681,7 @@ Slots_InitReelTiles:
ld [hl], d
ld hl, REEL_X_COORD
add hl, bc
ld [hl], 6 * 8
ld [hl], 6 * TILE_WIDTH
call .OAM
ld bc, wReel2
@@ -699,7 +699,7 @@ Slots_InitReelTiles:
ld [hl], d
ld hl, REEL_X_COORD
add hl, bc
ld [hl], 10 * 8
ld [hl], 10 * TILE_WIDTH
call .OAM
ld bc, wReel3
@@ -717,7 +717,7 @@ Slots_InitReelTiles:
ld [hl], d
ld hl, REEL_X_COORD
add hl, bc
ld [hl], 14 * 8
ld [hl], 14 * TILE_WIDTH
call .OAM
ret
@@ -785,7 +785,7 @@ Slots_UpdateReelPositionAndOAM:
add hl, bc
ld a, [hl]
ld [wCurReelXCoord], a
ld a, 10 * 8
ld a, 10 * TILE_WIDTH
ld [wCurReelYCoord], a
ld hl, REEL_POSITION
add hl, bc
@@ -2019,7 +2019,7 @@ Slots_AnimateGolem:
jr c, .play_sound
dec [hl]
ld e, a
ld d, 14 * 8
ld d, 14 * TILE_WIDTH
farcall BattleAnim_Sine_e
ld a, e
ld hl, SPRITEANIMSTRUCT_YOFFSET
@@ -2046,7 +2046,7 @@ Slots_AnimateGolem:
ld a, [hl]
inc [hl]
inc [hl]
cp 9 * 8
cp 9 * TILE_WIDTH
jr nc, .restart
and $3
ret nz
@@ -2090,7 +2090,7 @@ Slots_AnimateChansey:
add hl, bc
ld a, [hl]
inc [hl]
cp 13 * 8
cp 13 * TILE_WIDTH
jr z, .limit
and $f
ret nz