shithub: pokecrystal

Download patch

ref: 449bda272ae8f85a7a2a23fd1e1b80bcf4157245
parent: 084083add038cf3618803be76282640ca071bbc4
author: yenatch <[email protected]>
date: Mon Aug 19 14:42:26 EDT 2013

$ffd1 $ffd2 -> hWX hWY

--- a/engine/vblank.asm
+++ b/engine/vblank.asm
@@ -92,10 +92,10 @@
 	ld a, [$ffd0]
 	ld [rSCY], a
 ; window y
-	ld a, [$ffd2]
+	ld a, [hWY]
 	ld [rWY], a
 ; window x + 7
-	ld a, [$ffd1]
+	ld a, [hWX]
 	ld [rWX], a
 	
 ; some time management is in order
--- a/main.asm
+++ b/main.asm
@@ -159,10 +159,10 @@
 	ld a, $8
 	ld [rSTAT], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	ld [rWY], a
 	ld a, $7
-	ld [$ffd1], a
+	ld [hWX], a
 	ld [rWX], a
 	ld a, $e3
 	ld [rLCDC], a
@@ -8966,7 +8966,7 @@
 	ld [hBGMapMode], a
 	call Function2e31
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	call Functione4a
 	ld a, $2e
 	ld hl, $4000
@@ -17849,17 +17849,17 @@
 
 Function6182: ; 6182
 	ld a, $77
-	ld [$ffd1], a
+	ld [hWX], a
 	call DelayFrame
 	ld a, $e4
 	call DmgToCgbBGPals
 .asm_618e
 	call DelayFrame
-	ld a, [$ffd1]
+	ld a, [hWX]
 	sub $8
 	cp $ff
 	ret z
-	ld [$ffd1], a
+	ld [hWX], a
 	jr .asm_618e
 ; 619c
 
@@ -17964,9 +17964,9 @@
 	ld [$ffcf], a
 	ld [$ffd0], a
 	ld a, $7
-	ld [$ffd1], a
+	ld [hWX], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	ld b, $8
 	call GetSGBLayout
 	call Function485
@@ -18101,7 +18101,7 @@
 	call StartMusic
 
 	ld a, $88
-	ld [$ffd2], a
+	ld [hWY], a
 	ret
 ; 62f6
 
@@ -18295,7 +18295,7 @@
 	ld [$ffcf], a
 	ld [$ffd0], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	call WaitBGMap
 	jp Function620b
 ; 6454
@@ -18325,7 +18325,7 @@
 	ld [hLCDStatCustom], a
 	ld [hBGMapMode], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	call Function2173
 	ld a, $9c
 	call Function64b9
@@ -18340,7 +18340,7 @@
 	ld [hCGBPalUpdate], a
 	xor a
 	ld [hBGMapMode], a
-	ld [$ffd2], a
+	ld [hWY], a
 	ld a, $1
 	ld hl, $64db
 	rst FarCall
@@ -18378,7 +18378,7 @@
 Function64cd: ; 64cd
 	call Functione5f
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	call Function2e31
 	call $0e51
 	ret
@@ -26467,7 +26467,7 @@
 	ld [hBGMapMode], a
 	ld [PlayerEvaLevel], a
 	ld a, $7
-	ld [$ffd1], a
+	ld [hWX], a
 	ret
 ; 11cb7
 
@@ -37949,7 +37949,7 @@
 	call ClearTileMap
 	xor a
 	ld [hBGMapMode], a
-	ld [$ffd2], a
+	ld [hWY], a
 	ld [rWY], a
 	ld [$ffde], a
 	ret
@@ -48347,7 +48347,7 @@
 	ld [$ffde], a
 	ld [$ffd0], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	ld [rWY], a
 	call WaitBGMap
 	xor a
@@ -48364,7 +48364,7 @@
 	ld a, $13
 	call Predef
 	xor a
-	ld [$ffd2], a
+	ld [hWY], a
 	ld [rWY], a
 	call WaitBGMap
 	call HideSprites
@@ -48372,7 +48372,7 @@
 	call GetSGBLayout
 	call Function32f9
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	xor a
 	ld [$ffcf], a
 	ret
@@ -48606,9 +48606,9 @@
 SECTION "bank10",DATA,BANK[$10]
 
 Function40000: ; 40000
-	ld a, [$ffd1]
+	ld a, [hWX]
 	ld l, a
-	ld a, [$ffd2]
+	ld a, [hWY]
 	ld h, a
 	push hl
 	ld a, [$ffcf]
@@ -48655,9 +48655,9 @@
 	ld [$ffcf], a
 	pop hl
 	ld a, l
-	ld [$ffd1], a
+	ld [hWX], a
 	ld a, h
-	ld [$ffd2], a
+	ld [hWY], a
 	ret
 ; 40063
 
@@ -60350,7 +60350,7 @@
 	ld [$ffaa], a
 	call WhiteBGMap
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	xor a
 	ld [hBGMapAddress], a
 	ld a, $98
@@ -64264,7 +64264,7 @@
 	ld [$c2d8], a
 	ld a, $90
 	ld [rWY], a
-	ld [$ffd2], a
+	ld [hWY], a
 	xor a
 	ld [hLCDStatCustom], a
 	ret
@@ -66974,7 +66974,7 @@
 	ld [$ffcf], a
 	ld [$ffd0], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	call WaitBGMap
 	ld b, $19
 	call GetSGBLayout
@@ -67065,7 +67065,7 @@
 	ld a, $1
 	ld [hBGMapMode], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	ld de, $e4e4
 	call DmgToCgbObjPals
 	ret
@@ -67132,9 +67132,9 @@
 	ld [$ffcf], a
 	ld [$ffd0], a
 	ld a, $7
-	ld [$ffd1], a
+	ld [hWX], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	pop af
 	ld [$ff9e], a
 	pop af
@@ -72335,9 +72335,9 @@
 	ld a, $8
 	ld [$ffd0], a
 	ld a, $7
-	ld [$ffd1], a
+	ld [hWX], a
 	ld a, $90
-	ld [$ffd2], a
+	ld [hWY], a
 	
 	ld a, $1
 	ld [hCGBPalUpdate], a