From 2085ebcc617fdd78cc8194dc4a9a34e9fb8e8b51 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 11 Jan 2018 23:04:50 -0500 Subject: [PATCH] maskbits for NUM_FRAMES --- constants/wram_constants.asm | 1 + gfx/font.asm | 2 +- mobile/mobile_41.asm | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index 755c89bdc..617cb906c 100644 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -28,6 +28,7 @@ TEXT_DELAY_SLOW EQU 5 const FRAME_6 ; 5 const FRAME_7 ; 6 const FRAME_8 ; 7 +NUM_FRAMES EQU const_value ; TextBoxFlags: const_def diff --git a/gfx/font.asm b/gfx/font.asm index 64ff86caf..3b7ec39e9 100755 --- a/gfx/font.asm +++ b/gfx/font.asm @@ -172,7 +172,7 @@ _LoadFontsBattleExtra:: ; fb4be LoadFrame: ; fb4cc ld a, [TextBoxFrame] - and 7 + maskbits NUM_FRAMES +- 1 ld bc, 6 * LEN_1BPP_TILE ld hl, Frames call AddNTimes diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm index 236502217..a23787d8b 100755 --- a/mobile/mobile_41.asm +++ b/mobile/mobile_41.asm @@ -1033,17 +1033,17 @@ Function106464:: ; 106464 Function10649b: ; 10649b ld a, [TextBoxFrame] - and $7 - ld bc, 3 tiles + maskbits NUM_FRAMES +- 1 + ld bc, 6 * LEN_1BPP_TILE ld hl, Frames call AddNTimes ld d, h ld e, l - ld hl, vTiles2 tile $79 - ld c, 6 + ld hl, vTiles2 tile "┌" ; $79 + ld c, 6 ; "┌" to "┘" ld b, BANK(Frames) call Function1064c3 - ld hl, vTiles2 tile $7f + ld hl, vTiles2 tile " " ; $7f ld de, TextBoxSpaceGFX ld c, 1 ld b, BANK(TextBoxSpaceGFX)