shithub: pokecrystal

Download patch

ref: 3be6ca012f8681c664977788fbe692eee72cb9ae
parent: ed15916f05fbd21a84b1ae033acfd79b29a68c89
author: yenatch <[email protected]>
date: Fri Aug 22 16:41:57 EDT 2014

Use AttrMap and TileMap labels for relative addressing.

--- a/gfx/pics/animation.asm
+++ b/gfx/pics/animation.asm
@@ -899,7 +899,7 @@
 	ld a, [hli]
 	ld h, [hl]
 	ld l, a
-	ld de, $939
+	ld de, AttrMap - TileMap
 	add hl, de
 	ret
 ; d055c
--- a/home.asm
+++ b/home.asm
@@ -2089,7 +2089,7 @@
 Function3eea:: ; 3eea
 	push hl
 	push bc
-	ld de, $0939
+	ld de, AttrMap - TileMap
 	add hl, de
 	inc b
 	inc b
@@ -2116,7 +2116,7 @@
 Function3f0d:: ; 3f0d
 	push hl
 	push bc
-	ld de, $0939
+	ld de, AttrMap - TileMap
 	add hl, de
 	inc b
 	inc b
--- a/main.asm
+++ b/main.asm
@@ -49847,7 +49847,7 @@
 	call Function48cfd
 	pop hl
 	pop bc
-	ld de, $939
+	ld de, AttrMap - TileMap
 	add hl, de
 	inc b
 	inc b
@@ -54575,7 +54575,7 @@
 	call Function4d37e
 	pop hl
 	pop bc
-	ld de, $0939
+	ld de, AttrMap - TileMap
 	add hl, de
 	inc b
 	inc b
@@ -66433,7 +66433,7 @@
 Function89215: ; 89215
 	push hl
 	push bc
-	ld bc, $0939
+	ld bc, AttrMap - TileMap
 	add hl, bc
 	ld [hl], a
 	pop bc
@@ -68959,7 +68959,7 @@
 
 Function8a0c1: ; 8a0c1 (22:60c1)
 	push hl
-	ld bc, $939
+	ld bc, AttrMap - TileMap
 	add hl, bc
 	ld a, [hl]
 	pop hl
@@ -68985,7 +68985,7 @@
 
 Function8a0de: ; 8a0de (22:60de)
 	call Function8a0c9
-	ld de, $939
+	ld de, AttrMap - TileMap
 	add hl, de
 	ret
 
@@ -70837,7 +70837,7 @@
 
 .asm_8aea5
 	call Function8af09
-	ld bc, $0939
+	ld bc, AttrMap - TileMap
 	add hl, bc
 	call Function8aee9
 	call Function3200
@@ -72367,7 +72367,7 @@
 ; 8b744
 
 Function8b744: ; 8b744
-	ld de, $0939
+	ld de, AttrMap - TileMap
 	add hl, de
 	inc b
 	inc b
@@ -85369,7 +85369,7 @@
 
 
 Functionb8115: ; b8115
-	ld de, $0939
+	ld de, AttrMap - TileMap
 	add hl, de
 	inc b
 	inc b
@@ -90058,7 +90058,7 @@
 	ld a, [hCGB]
 	and a
 	ret z
-	ld de, $0939
+	ld de, AttrMap - TileMap
 	add hl, de
 	ld a, [CurEnemyMoveNum]
 	and 3
@@ -113461,7 +113461,7 @@
 	call Function16d640
 	pop hl
 	pop bc
-	ld de, $0939
+	ld de, AttrMap - TileMap
 	add hl, de
 	inc b
 	inc b