shithub: pokecrystal

Download patch

ref: 77803f571fed52bfce19b60ddafd98019c113e99
parent: 176257ea6f49597203887e610b03807901ba586e
author: mid-kid <esteve.varela@gmail.com>
date: Fri Nov 8 17:03:08 EST 2019

Fix some constants around wLinkMode

--- a/constants/serial_constants.asm
+++ b/constants/serial_constants.asm
@@ -1,4 +1,4 @@
-; link types
+; wLinkMode
 	const_def
 	const LINK_NULL        ; 0
 	const LINK_TIMECAPSULE ; 1
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -2088,7 +2088,7 @@
 	call DelayFrames
 	xor a
 	ldh [hVBlank], a
-	inc a
+	inc a ; LINK_TIMECAPSULE
 	ld [wLinkMode], a
 	ret
 
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -272,9 +272,9 @@
 
 	ldh a, [hTilesPerCycle]
 	push af
-
 	ld a, $8
 	ldh [hTilesPerCycle], a
+
 	ld a, [wLinkMode]
 	cp LINK_MOBILE
 	jr nz, .NotMobile
--- a/mobile/mobile_45_sprite_engine.asm
+++ b/mobile/mobile_45_sprite_engine.asm
@@ -691,7 +691,7 @@
 	ldh [rSVBK], a
 	farcall ReloadMapPart
 	ld a, [wLinkMode]
-	cp $4
+	cp LINK_MOBILE
 	jr z, .asm_11642a
 	ld a, $8
 	ld [wMusicFade], a
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -7322,7 +7322,7 @@
 	farcall Function17d1f1
 	ld a, $1
 	ld [wForceEvolution], a
-	ld a, $2
+	ld a, LINK_TRADECENTER
 	ld [wLinkMode], a
 	farcall EvolvePokemon
 	xor a
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -295,7 +295,7 @@
 	farcall Function17d1f1
 	ld a, $1
 	ld [wForceEvolution], a
-	ld a, $2
+	ld a, LINK_TRADECENTER
 	ld [wLinkMode], a
 	farcall EvolvePokemon
 	xor a