diff options
Diffstat (limited to 'engine/link')
-rw-r--r-- | engine/link/link.asm | 44 | ||||
-rw-r--r-- | engine/link/mystery_gift.asm | 2 | ||||
-rw-r--r-- | engine/link/mystery_gift_2.asm | 2 | ||||
-rw-r--r-- | engine/link/time_capsule.asm | 2 | ||||
-rw-r--r-- | engine/link/time_capsule_2.asm | 15 |
5 files changed, 34 insertions, 31 deletions
diff --git a/engine/link/link.asm b/engine/link/link.asm index 5be738b23..5363a3047 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -149,13 +149,13 @@ Gen2ToGen1LinkComms: ld a, [hli] cp -1 jr z, .done_party - ld [wd265], a + ld [wTempSpecies], a push hl push de callfar ConvertMon_1to2 pop de pop hl - ld a, [wd265] + ld a, [wTempSpecies] ld [de], a inc de jr .party_loop @@ -651,13 +651,13 @@ Link_PrepPartyData_Gen1: ld a, [hli] cp -1 jr z, .done_party - ld [wd265], a + ld [wTempSpecies], a push hl push de callfar ConvertMon_2to1 pop de pop hl - ld a, [wd265] + ld a, [wTempSpecies] ld [de], a inc de jr .loop2 @@ -692,11 +692,11 @@ Link_PrepPartyData_Gen1: push de push bc ld a, [hl] - ld [wd265], a + ld [wTempSpecies], a callfar ConvertMon_2to1 pop bc pop de - ld a, [wd265] + ld a, [wTempSpecies] ld [de], a inc de ld hl, MON_HP @@ -976,11 +976,11 @@ Function2868a: inc de push bc push de - ld [wd265], a + ld [wTempSpecies], a callfar ConvertMon_1to2 pop de pop bc - ld a, [wd265] + ld a, [wTempSpecies] ld [bc], a ld [wCurSpecies], a ld hl, MON_HP @@ -1461,7 +1461,7 @@ Function28926: ld b, 0 add hl, bc ld a, [hl] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName hlcoord 0, 12 ld b, 4 @@ -1619,7 +1619,7 @@ LinkTrade: ld b, 0 add hl, bc ld a, [hl] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, wStringBuffer1 ld de, wd004 @@ -1631,7 +1631,7 @@ LinkTrade: ld b, 0 add hl, bc ld a, [hl] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, UnknownText_0x28eb8 bccoord 1, 14 @@ -2047,14 +2047,14 @@ CheckTimeCapsuleCompatibility: jr .done .mon_too_new - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld a, $1 jr .done .move_too_new push bc - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetMoveName call CopyName1 pop bc @@ -2079,7 +2079,7 @@ Function29c67: ld hl, wPartyCount add hl, bc ld a, [hl] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ret @@ -2146,13 +2146,13 @@ WaitForOtherPlayerToExit: SetBitsForLinkTradeRequest: ld a, LINK_TRADECENTER - 1 ld [wPlayerLinkAction], a - ld [wd265], a + ld [wChosenCableClubRoom], a ret SetBitsForBattleRequest: ld a, LINK_COLOSSEUM - 1 ld [wPlayerLinkAction], a - ld [wd265], a + ld [wChosenCableClubRoom], a ret SetBitsForTimeCapsuleRequest: @@ -2166,7 +2166,7 @@ SetBitsForTimeCapsuleRequest: ld [rSC], a xor a ; LINK_TIMECAPSULE - 1 ld [wPlayerLinkAction], a - ld [wd265], a + ld [wChosenCableClubRoom], a ret WaitForLinkedFriend: @@ -2373,7 +2373,7 @@ Link_CheckCommunicationError: ret TryQuickSave: - ld a, [wd265] + ld a, [wChosenCableClubRoom] push af farcall Link_SaveGame ld a, TRUE @@ -2384,11 +2384,11 @@ TryQuickSave: ld c, 30 call DelayFrames pop af - ld [wd265], a + ld [wChosenCableClubRoom], a ret CheckBothSelectedSameRoom: - ld a, [wd265] + ld a, [wChosenCableClubRoom] call Link_EnsureSync push af call LinkDataReceived @@ -2396,10 +2396,10 @@ CheckBothSelectedSameRoom: call LinkDataReceived pop af ld b, a - ld a, [wd265] + ld a, [wChosenCableClubRoom] cp b jr nz, .fail - ld a, [wd265] + ld a, [wChosenCableClubRoom] inc a ld [wLinkMode], a xor a diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm index 0a5dfcec3..6fba91619 100644 --- a/engine/link/mystery_gift.asm +++ b/engine/link/mystery_gift.asm @@ -1430,7 +1430,7 @@ Function105688: ld de, wMysteryGiftTrainerData farcall Function8ac70 ld a, c - ld [wd265], a + ld [wDeciramBuffer], a ld hl, Text_CardNotRegistered jr c, PrintTextAndExit_JP ld hl, Text_ListedCardAsNumber diff --git a/engine/link/mystery_gift_2.asm b/engine/link/mystery_gift_2.asm index c1b258724..b9c7eccb4 100644 --- a/engine/link/mystery_gift_2.asm +++ b/engine/link/mystery_gift_2.asm @@ -24,7 +24,7 @@ PrepMysteryGiftDataToSend: call CountSetBits pop de pop bc - ld a, [wd265] + ld a, [wNumSetBits] ld [de], a inc de ; wc80f call CloseSRAM diff --git a/engine/link/time_capsule.asm b/engine/link/time_capsule.asm index 195062c1e..499e9fc34 100644 --- a/engine/link/time_capsule.asm +++ b/engine/link/time_capsule.asm @@ -122,7 +122,7 @@ PlaceTradePartnerNamesAndParty: ld a, [de] cp -1 ret z - ld [wd265], a + ld [wNamedObjectIndexBuffer], a push bc push hl push de diff --git a/engine/link/time_capsule_2.asm b/engine/link/time_capsule_2.asm index be7027f34..6640f6b03 100644 --- a/engine/link/time_capsule_2.asm +++ b/engine/link/time_capsule_2.asm @@ -1,8 +1,10 @@ ConvertMon_2to1: -; Takes the Gen-2 Pokemon number stored in wd265, finds it in the Pokered_MonIndices table, and returns its index in wd265. +; Takes the Gen 2 Pokemon number stored in wTempSpecies, +; finds it in the Pokered_MonIndices table, +; and returns its index in wTempSpecies. push bc push hl - ld a, [wd265] + ld a, [wTempSpecies] ld b, a ld c, 0 ld hl, Pokered_MonIndices @@ -12,23 +14,24 @@ ConvertMon_2to1: cp b jr nz, .loop ld a, c - ld [wd265], a + ld [wTempSpecies], a pop hl pop bc ret ConvertMon_1to2: -; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265. +; Takes the Gen 1 Pokemon number stored in wTempSpecies +; and returns the corresponding value from Pokered_MonIndices in wTempSpecies. push bc push hl - ld a, [wd265] + ld a, [wTempSpecies] dec a ld hl, Pokered_MonIndices ld b, 0 ld c, a add hl, bc ld a, [hl] - ld [wd265], a + ld [wTempSpecies], a pop hl pop bc ret |