diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-11-23 21:19:29 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-11-23 21:19:29 -0500 |
commit | 7574e186e7505e237efc3ab0969fed60bec6eb9d (patch) | |
tree | 527ec48412989e98cca7827c5e31d89cdf742b05 /engine/gfx | |
parent | 70baa4f3e80bceedd00cafbbab219665eb189225 (diff) | |
parent | 09e92c554c7563b52a9484b26d96d903c7635b0d (diff) |
Merge remote-tracking branch 'remotes/pokered/master'
Diffstat (limited to 'engine/gfx')
-rw-r--r-- | engine/gfx/palettes.asm | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index b480c6d0..fa7bb7c5 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -740,9 +740,7 @@ InitGBCPalettes: inc hl -index = 0 - - REPT NUM_ACTIVE_PALS + FOR index, NUM_ACTIVE_PALS IF index > 0 pop hl ENDC @@ -774,8 +772,6 @@ index = 0 call DMGPalToGBCPal ld a, index + 4 call TransferCurOBPData - -index = index + 1 ENDR ret @@ -820,8 +816,7 @@ DMGPalToGBCPal:: ldh a, [rOBP1] ld [wLastOBP1], a .convert -color_index = 0 - REPT NUM_PAL_COLORS + FOR color_index, NUM_PAL_COLORS ld b, a and %11 call .GetColorAddress @@ -835,8 +830,6 @@ color_index = 0 rrca rrca ENDC - -color_index = color_index + 1 ENDR ret @@ -980,9 +973,7 @@ _UpdateGBCPal_BGP_CheckDMG:: ; fall through _UpdateGBCPal_BGP:: -index = 0 - - REPT NUM_ACTIVE_PALS + FOR index, NUM_ACTIVE_PALS ld a, [wGBCBasePalPointers + index * 2] ld e, a ld a, [wGBCBasePalPointers + index * 2 + 1] @@ -991,17 +982,13 @@ index = 0 call DMGPalToGBCPal ld a, index call BufferBGPPal - -index = index + 1 ENDR call TransferBGPPals ret _UpdateGBCPal_OBP:: -index = 0 - - REPT NUM_ACTIVE_PALS + FOR index, NUM_ACTIVE_PALS ld a, [wGBCBasePalPointers + index * 2] ld e, a ld a, [wGBCBasePalPointers + index * 2 + 1] @@ -1022,8 +1009,6 @@ index = 0 ENDC call TransferCurOBPData - -index = index + 1 ENDR ret |