diff options
| author | dannye <33dannye@gmail.com> | 2025-07-02 21:15:13 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2025-07-02 21:15:13 -0500 |
| commit | ca019eac8fd96559f4d4e712f0b53e95492e5dcb (patch) | |
| tree | 209a500e3bda6c2109e5acec60448e9e52f8c2af /engine/gfx/bg_map_attributes.asm | |
| parent | Use more ldpikacry (diff) | |
| parent | Require RGBDS 0.9.3 for its DMG palette specs (#513) (diff) | |
| download | pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.gz pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.xz pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/gfx/bg_map_attributes.asm')
| -rw-r--r-- | engine/gfx/bg_map_attributes.asm | 26 |
1 files changed, 13 insertions, 13 deletions
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 |
