From 77803f571fed52bfce19b60ddafd98019c113e99 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Fri, 8 Nov 2019 22:03:08 +0100 Subject: [PATCH] Fix some constants around wLinkMode --- constants/serial_constants.asm | 2 +- engine/link/link.asm | 2 +- home/copy.asm | 2 +- mobile/mobile_45_sprite_engine.asm | 2 +- mobile/mobile_46.asm | 2 +- mobile/mobile_5f.asm | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm index 757292ee9..390390cc2 100644 --- 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 diff --git a/engine/link/link.asm b/engine/link/link.asm index 0ddff205f..077b3a9f0 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -2088,7 +2088,7 @@ EnterTimeCapsule: call DelayFrames xor a ldh [hVBlank], a - inc a + inc a ; LINK_TIMECAPSULE ld [wLinkMode], a ret diff --git a/home/copy.asm b/home/copy.asm index 803432dc5..5780beb95 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -272,9 +272,9 @@ Request1bpp:: ldh a, [hTilesPerCycle] push af - ld a, $8 ldh [hTilesPerCycle], a + ld a, [wLinkMode] cp LINK_MOBILE jr nz, .NotMobile diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm index e2863efc6..fe9b68517 100644 --- a/mobile/mobile_45_sprite_engine.asm +++ b/mobile/mobile_45_sprite_engine.asm @@ -691,7 +691,7 @@ Function1163c0: ldh [rSVBK], a farcall ReloadMapPart ld a, [wLinkMode] - cp $4 + cp LINK_MOBILE jr z, .asm_11642a ld a, $8 ld [wMusicFade], a diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index 9354e4704..95d53bded 100644 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -7322,7 +7322,7 @@ Function11b7e5: farcall Function17d1f1 ld a, $1 ld [wForceEvolution], a - ld a, $2 + ld a, LINK_TRADECENTER ld [wLinkMode], a farcall EvolvePokemon xor a diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm index 2350cd0c4..3fe6ce3b8 100644 --- a/mobile/mobile_5f.asm +++ b/mobile/mobile_5f.asm @@ -295,7 +295,7 @@ Function17d0f3: farcall Function17d1f1 ld a, $1 ld [wForceEvolution], a - ld a, $2 + ld a, LINK_TRADECENTER ld [wLinkMode], a farcall EvolvePokemon xor a