ref: fbc353f206ad457f32493b061b83e9067109e504
parent: cc0fd6e12c0afe9b70f55114eb3123014318e107
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Tue Jan 9 13:08:40 EST 2018
Replace some hex constants
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -1,13 +1,12 @@
-LEN_1BPP_TILE EQU 8 ; bytes
-LEN_2BPP_TILE EQU 16 ; bytes
-
TILE_WIDTH EQU 8 ; pixels
+LEN_1BPP_TILE EQU TILE_WIDTH ; bytes
+LEN_2BPP_TILE EQU TILE_WIDTH * 2 ; bytes
NUM_PAL_COLORS EQU 4
-SCREEN_WIDTH EQU 20 ; tiles
+SCREEN_WIDTH EQU 20 ; tiles
SCREEN_HEIGHT EQU 18 ; tiles
-SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
+SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels
BG_MAP_WIDTH EQU 32 ; tiles
@@ -15,9 +14,9 @@
WMISC_WIDTH EQU 6 * 4
WMISC_HEIGHT EQU 5 * 4
-HP_BAR_LENGTH EQU 6 ; tiles
-HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
+HP_BAR_LENGTH EQU 6 ; tiles
EXP_BAR_LENGTH EQU 8 ; tiles
+HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
PALPACKET_LENGTH EQU $10
--- a/gfx/load_pics.asm
+++ b/gfx/load_pics.asm
@@ -188,7 +188,7 @@
pop bc
.loop
push bc
- ld c, $0
+ ld c, 0
call LoadFrontpic
pop bc
dec b
--- a/gfx/overworld_font.asm
+++ b/gfx/overworld_font.asm
@@ -4,7 +4,7 @@
lb bc, BANK(.font), $80
call Get2bpp
ld de, .space
- ld hl, vTiles2 tile $7f
+ ld hl, vTiles2 tile " "
lb bc, BANK(.space), 1
call Get2bpp
ret
--- a/tilesets/animations.asm
+++ b/tilesets/animations.asm
@@ -367,9 +367,9 @@
ld d, [hl]
inc hl
ld e, [hl]
- ld bc, $e
+ ld bc, TILE_WIDTH * 2 - 2
add hl, bc
- ld a, 4
+ ld a, TILE_WIDTH / 2
.loop
ld c, [hl]
ld [hl], e
@@ -391,7 +391,7 @@
ScrollTileDown: ; fc36a
ld h, d
ld l, e
- ld de, $e
+ ld de, TILE_WIDTH * 2 - 2
push hl
add hl, de
ld d, [hl]
@@ -398,7 +398,7 @@
inc hl
ld e, [hl]
pop hl
- ld a, 4
+ ld a, TILE_WIDTH / 2
.loop
ld b, [hl]
ld [hl], d