diff --git a/macros.asm b/macros.asm index aa8876055..efd43318a 100644 --- a/macros.asm +++ b/macros.asm @@ -13,6 +13,8 @@ page EQUS "db $50," ; Start a new Pokedex page. dex EQUS "db $e8, $50" ; End a Pokedex entry. +percent EQUS "* $ff / 100" + ; macros require rst vectors to be defined FarCall EQU $08 Bankswitch EQU $10 @@ -118,15 +120,15 @@ B_ EQU 12 bccoord: MACRO - ld bc, TileMap + SCREEN_WIDTH * \2 + \1 + ld bc, TileMap + SCREEN_WIDTH * (\2) + (\1) ENDM decoord: MACRO - ld de, TileMap + SCREEN_WIDTH * \2 + \1 + ld de, TileMap + SCREEN_WIDTH * (\2) + (\1) ENDM hlcoord: MACRO - ld hl, TileMap + SCREEN_WIDTH * \2 + \1 + ld hl, TileMap + SCREEN_WIDTH * (\2) + (\1) ENDM