From fe42ef8a88cce02fdee08b46d01dff8ba4b4b1f1 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 25 May 2020 21:05:52 -0400 Subject: [PATCH] Some uses of SCREEN_WIDTH and SCREEN_HEIGHT --- engine/menus/trainer_card.asm | 11 ++++++++--- engine/movie/credits.asm | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm index 712032cbe..726148e20 100644 --- a/engine/menus/trainer_card.asm +++ b/engine/menus/trainer_card.asm @@ -356,7 +356,8 @@ TrainerCard_InitBorder: ld a, $23 ld [hli], a - ld e, SCREEN_HEIGHT - 1 + + ld e, SCREEN_WIDTH - 3 ld a, " " .loop2 ld [hli], a @@ -367,11 +368,12 @@ TrainerCard_InitBorder: ld [hli], a ld a, $23 ld [hli], a + .loop3 ld a, $23 ld [hli], a - ld e, SCREEN_HEIGHT + ld e, SCREEN_WIDTH - 2 ld a, " " .loop4 ld [hli], a @@ -380,6 +382,7 @@ TrainerCard_InitBorder: ld a, $23 ld [hli], a + dec d jr nz, .loop3 @@ -388,14 +391,16 @@ TrainerCard_InitBorder: ld a, $24 ld [hli], a - ld e, SCREEN_HEIGHT - 1 + ld e, SCREEN_WIDTH - 3 ld a, " " .loop5 ld [hli], a dec e jr nz, .loop5 + ld a, $23 ld [hli], a + ld e, SCREEN_WIDTH .loop6 ld a, $23 diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index a494d3681..650e056b7 100644 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -245,7 +245,7 @@ ParseCredits: xor a ldh [hBGMapMode], a hlcoord 0, 5 - ld bc, 20 * 12 + ld bc, SCREEN_WIDTH * 12 ld a, " " call ByteFill @@ -306,7 +306,7 @@ ParseCredits: .print ; Print strings spaced every two lines. call .get - ld bc, 20 * 2 + ld bc, SCREEN_WIDTH * 2 call AddNTimes call PlaceString jr .loop