aboutsummaryrefslogtreecommitdiffstats
path: root/engine/gfx
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2025-07-02 21:15:13 -0500
committerdannye <33dannye@gmail.com>2025-07-02 21:15:13 -0500
commitca019eac8fd96559f4d4e712f0b53e95492e5dcb (patch)
tree209a500e3bda6c2109e5acec60448e9e52f8c2af /engine/gfx
parentUse more ldpikacry (diff)
parentRequire RGBDS 0.9.3 for its DMG palette specs (#513) (diff)
downloadpokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.gz
pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.xz
pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/gfx')
-rw-r--r--engine/gfx/animated_objects.asm10
-rw-r--r--engine/gfx/bg_map_attributes.asm26
-rw-r--r--engine/gfx/palettes.asm10
-rw-r--r--engine/gfx/sprite_oam.asm2
4 files changed, 24 insertions, 24 deletions
diff --git a/engine/gfx/animated_objects.asm b/engine/gfx/animated_objects.asm
index 0a71f59d..83d36aa9 100644
--- a/engine/gfx/animated_objects.asm
+++ b/engine/gfx/animated_objects.asm
@@ -227,7 +227,7 @@ GetCurrentAnimatedObjectTileYCoordinate:
push hl
ld a, [hl]
ld hl, wCurAnimatedObjectOAMAttributes
- bit OAM_Y_FLIP, [hl]
+ bit B_OAM_YFLIP, [hl]
jr z, .no_flip
add $8
xor $ff
@@ -240,7 +240,7 @@ GetCurrentAnimatedObjectTileXCoordinate:
push hl
ld a, [hl]
ld hl, wCurAnimatedObjectOAMAttributes
- bit OAM_X_FLIP, [hl]
+ bit B_OAM_XFLIP, [hl]
jr z, .no_flip
add $8
xor $ff
@@ -254,12 +254,12 @@ SetCurrentAnimatedObjectOAMAttributes:
ld b, a
ld a, [hl]
xor b
- and OAM_HFLIP | OAM_VFLIP | OAM_BEHIND_BG
+ and OAM_XFLIP | OAM_YFLIP | OAM_PRIO
ld b, a
ld a, [hl]
- and OAM_OBP1
+ and OAM_PAL1
or b
- bit OAM_OBP_NUM, a
+ bit B_OAM_PAL1, a
ret z
or OAM_HIGH_PALS
ret
diff --git a/engine/gfx/bg_map_attributes.asm b/engine/gfx/bg_map_attributes.asm
index 740e9994..cc550ff8 100644
--- a/engine/gfx/bg_map_attributes.asm
+++ b/engine/gfx/bg_map_attributes.asm
@@ -24,17 +24,17 @@ LoadBGMapAttributes::
ld de, $10
add hl, de
ld a, h
- ldh [rHDMA1], a
+ ldh [rVDMA_SRC_HIGH], a
ld a, l
- ldh [rHDMA2], a
+ ldh [rVDMA_SRC_LOW], a
ld de, vBGMap0
ld a, d
- ldh [rHDMA3], a
+ ldh [rVDMA_DEST_HIGH], a
ld a, e
- ldh [rHDMA4], a
+ ldh [rVDMA_DEST_LOW], a
ldh a, [rLCDC]
- and 1 << rLCDC_ENABLE ; is LCD off?
+ and LCDC_ON ; is LCD off?
jr z, .lcdOff ; if off, transfer immediately
; wait for VBlank if LCD is on
.waitForVBlankLoop1
@@ -47,7 +47,7 @@ LoadBGMapAttributes::
jr nz, .waitForAccessibleVRAMLoop1 ; loop until we're in a safe period to transfer to VRAM
.lcdOff
ld a, c ; number of BG attributes to transfer, plus 1 times 16
- ldh [rHDMA5], a ; initiate transfer
+ ldh [rVDMA_LEN], a ; initiate transfer
call Func_3082 ; update audio so it doesn't "lag"
pop hl
ld a, [hli]
@@ -58,17 +58,17 @@ LoadBGMapAttributes::
ld d, a ; offset of the attributes
add hl, de ; hl = new pointer
ld a, h
- ldh [rHDMA1], a
+ ldh [rVDMA_SRC_HIGH], a
ld a, l
- ldh [rHDMA2], a
+ ldh [rVDMA_SRC_LOW], a
ld de, vBGMap1 ; copy to vBGMap1
ld a, d
- ldh [rHDMA3], a
+ ldh [rVDMA_DEST_HIGH], a
ld a, e
- ldh [rHDMA4], a
+ ldh [rVDMA_DEST_LOW], a
; LCD check again
ldh a, [rLCDC]
- and 1 << rLCDC_ENABLE ; is LCD off?
+ and LCDC_ON ; is LCD off?
jr z, .lcdOff2 ; if off, transfer immediately
; wait for VBlank if LCD is on
.waitForVBlankLoop2
@@ -81,7 +81,7 @@ LoadBGMapAttributes::
jr nz, .waitForAccessibleVRAMLoop2 ; loop until we're in a safe period to transfer to VRAM
.lcdOff2
ld a, c
- ldh [rHDMA5], a
+ ldh [rVDMA_LEN], a
pop af
dec a
dec a
@@ -96,7 +96,7 @@ LoadBGMapAttributes::
.done
call Func_3082
ldh a, [rIF]
- res VBLANK, a
+ res B_IF_VBLANK, a
ldh [rIF], a
xor a
ldh [rVBK], a
diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm
index a618fe91..16869869 100644
--- a/engine/gfx/palettes.asm
+++ b/engine/gfx/palettes.asm
@@ -226,7 +226,7 @@ SetPal_TrainerCard:
srl a
push af
jr c, .haveBadge
-; The player doens't have the badge, so zero the badge's blk data.
+; The player doesn't have the badge, so zero the badge's blk data.
push bc
ld a, [de]
ld c, a
@@ -723,7 +723,7 @@ SendSGBPackets:
pop hl
call InitCGBPalettes
ldh a, [rLCDC]
- and 1 << rLCDC_ENABLE
+ and LCDC_ON
ret z
call Delay3
ret
@@ -853,7 +853,7 @@ TransferCurBGPData::
ld hl, wCGBPal
ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
ldh a, [rLCDC]
- and 1 << rLCDC_ENABLE
+ and LCDC_ON
jr nz, .lcdEnabled
REPT NUM_PAL_COLORS
call TransferPalColorLCDDisabled
@@ -892,7 +892,7 @@ BufferBGPPal::
TransferBGPPals::
; Transfer the buffered BG palettes.
ldh a, [rLCDC]
- and 1 << rLCDC_ENABLE
+ and LCDC_ON
jr z, .lcdDisabled
di
.waitLoop
@@ -929,7 +929,7 @@ TransferCurOBPData:
ld hl, wCGBPal
ld b, %10 ; mask for non-V-blank/non-H-blank STAT mode
ldh a, [rLCDC]
- and 1 << rLCDC_ENABLE
+ and LCDC_ON
jr nz, .lcdEnabled
REPT NUM_PAL_COLORS
call TransferPalColorLCDDisabled
diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm
index 506b50a7..a1549c6c 100644
--- a/engine/gfx/sprite_oam.asm
+++ b/engine/gfx/sprite_oam.asm
@@ -119,7 +119,7 @@ PrepareOAMData::
or [hl]
.skipPriority
and $f0
- bit OAM_OBP_NUM, a
+ bit B_OAM_PAL1, a
jr z, .spriteusesOBP0
or OAM_HIGH_PALS
.spriteusesOBP0