diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-11-04 15:16:20 -0500 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-11-04 19:44:31 -0500 |
| commit | aae999f72bd81a3156c7e00da4ebf499f52da5a6 (patch) | |
| tree | 32fef70a31af3a0b5ad2b0d34042c312574fb42d /engine/gfx | |
| parent | Merge branch 'master' of https://github.com/pret/pokered (diff) | |
| download | pokeyellow-aae999f72bd81a3156c7e00da4ebf499f52da5a6.tar.gz pokeyellow-aae999f72bd81a3156c7e00da4ebf499f52da5a6.tar.xz pokeyellow-aae999f72bd81a3156c7e00da4ebf499f52da5a6.zip | |
Start reorganizing pokeyellow
Diffstat (limited to '')
| -rwxr-xr-x | engine/gfx/animated_objects.asm (renamed from engine/animated_objects_3e.asm) | 8 | ||||
| -rw-r--r-- | engine/gfx/bg_map_attributes.asm (renamed from engine/bg_map_attributes.asm) | 6 | ||||
| -rwxr-xr-x | engine/gfx/palettes.asm | 34 | ||||
| -rw-r--r-- | engine/gfx/sprite_oam.asm | 2 |
4 files changed, 25 insertions, 25 deletions
diff --git a/engine/animated_objects_3e.asm b/engine/gfx/animated_objects.asm index 2373e19e..971af6b5 100755 --- a/engine/animated_objects_3e.asm +++ b/engine/gfx/animated_objects.asm @@ -28,10 +28,10 @@ RunObjectAnimations: jr nz, .loop ld a, [wCurrentAnimatedObjectOAMBufferOffset] ld l, a - ld h, wOAMBuffer / $100 + ld h, HIGH(wOAMBuffer) .deinit_unused_oam_loop ld a, l - cp wOAMBufferEnd % $100 + cp LOW(wOAMBufferEnd) jr nc, .quit xor a ld [hli], a @@ -158,7 +158,7 @@ UpdateCurrentAnimatedObjectFrame: push bc ld a, [wCurrentAnimatedObjectOAMBufferOffset] ld e, a - ld d, wOAMBuffer / $100 + ld d, HIGH(wOAMBuffer) ld a, [hli] ld c, a .loop @@ -205,7 +205,7 @@ UpdateCurrentAnimatedObjectFrame: inc de ld a, e ld [wCurrentAnimatedObjectOAMBufferOffset], a - cp wOAMBufferEnd % $100 + cp LOW(wOAMBufferEnd) jr nc, .oam_is_full dec c jr nz, .loop diff --git a/engine/bg_map_attributes.asm b/engine/gfx/bg_map_attributes.asm index 4c50bcf8..6f81af63 100644 --- a/engine/bg_map_attributes.asm +++ b/engine/gfx/bg_map_attributes.asm @@ -1,4 +1,4 @@ -INCLUDE "data/bg_map_attributes.asm" +INCLUDE "data/cgb/bg_map_attributes.asm" LoadBGMapAttributes:: ld hl, BGMapAttributesPointers @@ -195,9 +195,9 @@ HandlePartyHPBarAttributes: push hl ld a, [de] and $3 ; 4 possible palettes - rept 7 ; hp bar length in tiles +REPT 7 ; hp bar length in tiles ld [hli], a - endr +ENDR pop hl ld bc, $40 ; get 2nd party location add hl, bc diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index dd723afa..c08992d3 100755 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -752,7 +752,7 @@ index = 0 ld a, [hli] inc hl - IF index < (NUM_ACTIVE_PALS + -1) + IF index < NUM_ACTIVE_PALS - 1 push hl ENDC @@ -823,7 +823,7 @@ DMGPalToGBCPal:: ld [wLastOBP1], a .convert color_index = 0 - REPT NUM_COLORS + REPT NUM_PAL_COLORS ld b, a and %11 call .GetColorAddress @@ -832,7 +832,7 @@ color_index = 0 ld a, [hl] ld [wGBCPal + color_index * 2 + 1], a - IF color_index < (NUM_COLORS + -1) + IF color_index < NUM_PAL_COLORS - 1 ld a, b rrca rrca @@ -863,14 +863,14 @@ TransferCurBGPData:: ldh a, [rLCDC] and rLCDC_ENABLE_MASK jr nz, .lcdEnabled - rept NUM_COLORS - call TransferPalColorLCDDisabled - endr + REPT NUM_PAL_COLORS + call TransferPalColorLCDDisabled + ENDR jr .done .lcdEnabled - rept NUM_COLORS - call TransferPalColorLCDEnabled - endr + REPT NUM_PAL_COLORS + call TransferPalColorLCDEnabled + ENDR .done pop de ret @@ -887,7 +887,7 @@ BufferBGPPal:: ld de, wBGPPalsBuffer add hl, de ld de, wGBCPal - ld c, PAL_SIZE + ld c, PALETTE_SIZE .loop ld a, [de] ld [hli], a @@ -918,7 +918,7 @@ TransferBGPPals:: ldh [rBGPI], a ld de, rBGPD ld hl, wBGPPalsBuffer - ld c, 4 * PAL_SIZE + ld c, 4 * PALETTE_SIZE .loop ld a, [hli] ld [de], a @@ -939,14 +939,14 @@ TransferCurOBPData: ldh a, [rLCDC] and rLCDC_ENABLE_MASK jr nz, .lcdEnabled - rept NUM_COLORS - call TransferPalColorLCDDisabled - endr + REPT NUM_PAL_COLORS + call TransferPalColorLCDDisabled + ENDR jr .done .lcdEnabled - rept NUM_COLORS - call TransferPalColorLCDEnabled - endr + REPT NUM_PAL_COLORS + call TransferPalColorLCDEnabled + ENDR .done pop de ret diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm index 01b2c412..b62d9d4b 100644 --- a/engine/gfx/sprite_oam.asm +++ b/engine/gfx/sprite_oam.asm @@ -153,7 +153,7 @@ PrepareOAMData:: cp c ret nc ld l, a - ld h, wOAMBuffer / $100 + ld h, HIGH(wOAMBuffer) ld a, c ld de, $4 ; entry size ld b, $a0 |
