shithub: pokered

Download patch

ref: ed55794d11e13bbc3c98e1c06d6acb6269406d3e
parent: 140b01bbd6dac2c29c4fbc2cbe4360380851448e
author: yenatch <yenatch@gmail.com>
date: Wed Apr 16 09:20:23 EDT 2014

Use map constants for hardcoded warp destinations.

--- a/main.asm
+++ b/main.asm
@@ -40565,7 +40565,7 @@
 	dw DiglettsCaveRoute2Object ; objects
 
 DiglettsCaveRoute2Script: ; 1deb0 (7:5eb0)
-	ld a, $d
+	ld a, ROUTE_2
 	ld [$d365], a
 	jp EnableAutoTextBoxDrawing
 
@@ -41109,7 +41109,7 @@
 	dw UndergroundPathEntranceRoute8Object ; objects
 
 UndergroundPathEntranceRoute8Script: ; 1e289 (7:6289)
-	ld a, $13
+	ld a, ROUTE_8
 	ld [$d365], a
 	jp EnableAutoTextBoxDrawing
 
@@ -41365,7 +41365,7 @@
 
 DiglettsCaveEntranceRoute11Script: ; 1e5ba (7:65ba)
 	call EnableAutoTextBoxDrawing
-	ld a, $16
+	ld a, ROUTE_11
 	ld [$d365], a
 	ret
 
@@ -41489,9 +41489,9 @@
 	call CallFunctionInTable
 	ld a, [$d361]
 	cp $4
-	ld a, $22
+	ld a, ROUTE_23
 	jr c, .asm_1e69a ; 0x1e696 $2
-	ld a, $21
+	ld a, ROUTE_22
 .asm_1e69a
 	ld [$d365], a
 	ret
@@ -90123,14 +90123,14 @@
 	ld [hl], a
 	xor a
 	ld [W_HALLOFFAMEROOMCURSCRIPT], a
-	ld a, $0
+	ld a, PALLET_TOWN
 	ld [$d719], a
 	ld b, BANK(SaveSAVtoSRAM)
 	ld hl, SaveSAVtoSRAM
 	call Bankswitch
-	ld b, $5
+	ld b, 5
 .asm_5a4ff
-	ld c, $78
+	ld c, 600 / 5
 	call DelayFrames
 	dec b
 	jr nz, .asm_5a4ff ; 0x5a505 $f8
@@ -93153,7 +93153,7 @@
 	dw UndergroundTunnelEntranceRoute5Object ; objects
 
 UndergroundTunnelEntranceRoute5Script: ; 5d6a9 (17:56a9)
-	ld a, $10
+	ld a, ROUTE_5
 	ld [$d365], a
 	ret
 
@@ -93198,7 +93198,7 @@
 	dw UndergroundTunnelEntranceRoute6Object ; objects
 
 UndergroundTunnelEntranceRoute6Script: ; 5d6ef (17:56ef)
-	ld a, $11
+	ld a, ROUTE_6
 	ld [$d365], a
 	jp EnableAutoTextBoxDrawing
 
@@ -93235,7 +93235,7 @@
 	dw UndergroundPathEntranceRoute7Object ; objects
 
 UndergroundPathEntranceRoute7Script: ; 5d72c (17:572c)
-	ld a, $12
+	ld a, ROUTE_7
 	ld [$d365], a
 	jp EnableAutoTextBoxDrawing
 
@@ -93272,7 +93272,7 @@
 	dw UndergroundPathEntranceRoute7CopyObject ; objects
 
 UndergroundPathEntranceRoute7CopyScript: ; 5d769 (17:5769)
-	ld a, $12
+	ld a, ROUTE_7
 	ld [$d365], a
 	ret
 
@@ -95329,7 +95329,7 @@
 	ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
 	ld a, $1
 	ld [$d42f], a
-	ld a, $4
+	ld a, LAVENDER_TOWN
 	ld [$d365], a
 	ld hl, $d72d
 	set 3, [hl]