From 4d2594cb24b7e67cde4e1373c9a2b5e0ae7ff473 Mon Sep 17 00:00:00 2001 From: Narishma-gb <194818981+Narishma-gb@users.noreply.github.com> Date: Wed, 3 Sep 2025 17:56:09 +0200 Subject: Label and constant cleanup (#528) * Label cleanup, add some constants instead of raw numbers * Rename load/save game functions to be more explicit --- engine/gfx/palettes.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/gfx') diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index 429d8123..0497f74a 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -523,15 +523,15 @@ CopyGfxToSuperNintendoVRAM: call CopySGBBorderTiles jr .next .notCopyingTileData - ld bc, $1000 + ld bc, 256 tiles call CopyData .next ld hl, vBGMap0 - ld de, $c + ld de, TILEMAP_WIDTH - SCREEN_WIDTH ld a, $80 - ld c, $d + ld c, (256 + SCREEN_WIDTH - 1) / SCREEN_WIDTH ; enough rows to fit 256 tiles .loop - ld b, $14 + ld b, SCREEN_WIDTH .innerLoop ld [hli], a inc a @@ -540,7 +540,7 @@ CopyGfxToSuperNintendoVRAM: add hl, de dec c jr nz, .loop - ld a, $e3 + ld a, LCDC_DEFAULT ldh [rLCDC], a pop hl call SendSGBPacket -- cgit v1.3.1-sl0p