shithub: pokecrystal

Download patch

ref: af7d328d6613925111be3ff3dbc5165874b24bc7
parent: 5a7ddb327200295ce32be389fab3524b23eec55b
author: vulcandth <vulcandth@gmail.com>
date: Tue Apr 5 10:02:37 EDT 2022

Cleanup Magic Numbers

--- a/engine/movie/intro.asm
+++ b/engine/movie/intro.asm
@@ -32,9 +32,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	pop af
 	ldh [hVBlank], a
@@ -132,9 +132,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	call Intro_SetCGBPalUpdate
@@ -205,9 +205,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	call Intro_ResetLYOverrides
 	call Intro_SetCGBPalUpdate
@@ -271,9 +271,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	call Intro_SetCGBPalUpdate
@@ -381,9 +381,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	call Intro_ResetLYOverrides
 	farcall ClearSpriteAnims
@@ -536,9 +536,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	call Intro_SetCGBPalUpdate
@@ -662,9 +662,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	depixel 13, 11, 4, 0
@@ -770,11 +770,11 @@
 	ldh [rSVBK], a
 	xor a
 	ldh [hSCX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	call Intro_SetCGBPalUpdate
@@ -845,9 +845,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	call Intro_SetCGBPalUpdate
@@ -918,11 +918,11 @@
 	ldh [rSVBK], a
 	xor a
 	ldh [hSCX], a
-	ld a, $d8
+	ld a, 27 * TILE_WIDTH
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	ld hl, wSpriteAnimDict
@@ -1089,9 +1089,9 @@
 	xor a
 	ldh [hSCX], a
 	ldh [hSCY], a
-	ld a, $7
+	ld a, 7
 	ldh [hWX], a
-	ld a, $90
+	ld a, SCREEN_HEIGHT_PX
 	ldh [hWY], a
 	farcall ClearSpriteAnims
 	call Intro_SetCGBPalUpdate