From f3326786259f4e53c06b7565369add7605bea8ba Mon Sep 17 00:00:00 2001 From: Narishma-gb <194818981+Narishma-gb@users.noreply.github.com> Date: Tue, 18 Nov 2025 21:17:31 +0100 Subject: Use more hardware and graphics constants (#532) - Use `OBJ_SIZE` and `TILE_SIZE` from hardware.inc. - `SPRITESTATEDATA1_LENGTH`, `NUM_SPRITESTATEDATA_STRUCTS` and `TILE_1BPP_SIZE` are used in some places. - Highlight an oversight in `OakSpeech` where several direct MBC bank switches are requested. - Remove redundant comments in home/overworld.asm. - Add unreferenced `FillBgMap` function to avoid a byte of dead code. - Some constants added in wram.asm. - Correctly separate the commented code in `SaveMainData`. --- home/text_script.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'home/text_script.asm') diff --git a/home/text_script.asm b/home/text_script.asm index 389f2499..36f6338b 100644 --- a/home/text_script.asm +++ b/home/text_script.asm @@ -113,8 +113,8 @@ CloseTextDisplay:: ldh [hAutoBGTransferEnabled], a ; disable continuous WRAM to VRAM transfer each V-blank ; loop to make sprites face the directions they originally faced before the dialogue ld hl, wSprite01StateData2OrigFacingDirection - ld c, $0f - ld de, $10 + ld c, NUM_SPRITESTATEDATA_STRUCTS - 1 + ld de, SPRITESTATEDATA1_LENGTH .restoreSpriteFacingDirectionLoop ld a, [hl] ; x#SPRITESTATEDATA2_ORIGFACINGDIRECTION dec h -- cgit v1.3.1-sl0p