diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/battle/core.asm | 24 | ||||
-rw-r--r-- | engine/battle/move_effects/beat_up.asm | 20 | ||||
-rw-r--r-- | engine/events/print_unown_2.asm | 2 | ||||
-rw-r--r-- | engine/events/prof_oaks_pc.asm | 10 | ||||
-rw-r--r-- | engine/games/unown_puzzle.asm | 6 | ||||
-rw-r--r-- | engine/items/item_effects.asm | 29 | ||||
-rw-r--r-- | engine/link/link.asm | 52 | ||||
-rw-r--r-- | engine/link/time_capsule.asm | 12 | ||||
-rw-r--r-- | engine/overworld/decorations.asm | 29 | ||||
-rw-r--r-- | engine/overworld/scripting.asm | 2 | ||||
-rw-r--r-- | engine/pokemon/bills_pc.asm | 26 | ||||
-rw-r--r-- | engine/pokemon/evolve.asm | 2 | ||||
-rw-r--r-- | engine/pokemon/mail.asm | 2 | ||||
-rw-r--r-- | engine/pokemon/move_mon.asm | 6 | ||||
-rw-r--r-- | engine/pokemon/switchpartymons.asm | 20 |
15 files changed, 124 insertions, 118 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index a006f376..0587c750 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -7168,13 +7168,13 @@ AnimateExpBar: jp z, .finish ldh a, [hProduct + 3] - ld [wceef], a + ld [wExperienceGained + 2], a push af ldh a, [hProduct + 2] - ld [wceee], a + ld [wExperienceGained + 1], a push af xor a - ld [wceed], a + ld [wExperienceGained], a xor a ; PARTYMON ld [wMonType], a predef CopyMonToTempMon @@ -7186,10 +7186,10 @@ AnimateExpBar: call CalcExpBar push bc ld hl, wTempMonExp + 2 - ld a, [wceef] + ld a, [wExperienceGained + 2] add [hl] ld [hld], a - ld a, [wceee] + ld a, [wExperienceGained + 1] adc [hl] ld [hld], a jr nc, .NoOverflow @@ -8393,7 +8393,7 @@ AddLastLinkBattleToLinkRecord: .FindOpponentAndAppendRecord: ld b, NUM_LINK_BATTLE_RECORDS ld hl, sLinkBattleRecord1End - 1 - ld de, wceed + ld de, wLinkBattleRecordBuffer .loop3 push bc push de @@ -8422,16 +8422,16 @@ AddLastLinkBattleToLinkRecord: add b add b ld e, a - ld d, $0 - ld hl, wceed + ld d, 0 + ld hl, wLinkBattleRecordBuffer add hl, de push hl ld a, c add c add c ld e, a - ld d, $0 - ld hl, wceed + ld d, 0 + ld hl, wLinkBattleRecordBuffer add hl, de ld d, h ld e, l @@ -8463,7 +8463,7 @@ AddLastLinkBattleToLinkRecord: ld hl, sLinkBattleRecord call AddNTimes push hl - ld de, wceed + ld de, wLinkBattleRecordBuffer ld bc, LINK_BATTLE_RECORD_LENGTH call CopyBytes pop hl @@ -8477,7 +8477,7 @@ AddLastLinkBattleToLinkRecord: push hl ld bc, LINK_BATTLE_RECORD_LENGTH call CopyBytes - ld hl, wceed + ld hl, wLinkBattleRecordBuffer ld bc, LINK_BATTLE_RECORD_LENGTH pop de call CopyBytes diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm index 8546c37d..32e0112c 100644 --- a/engine/battle/move_effects/beat_up.asm +++ b/engine/battle/move_effects/beat_up.asm @@ -14,7 +14,7 @@ BattleCommand_BeatUp: call DelayFrames xor a ld [wPlayerRolloutCount], a - ld [wceed], a + ld [wCurBeatUpPartyMon], a ld [wBeatUpHitAtLeastOnce], a jr .got_mon @@ -23,10 +23,10 @@ BattleCommand_BeatUp: ld b, a ld a, [wPartyCount] sub b - ld [wceed], a + ld [wCurBeatUpPartyMon], a .got_mon - ld a, [wceed] + ld a, [wCurBeatUpPartyMon] ld hl, wPartyMonNicknames call GetNick ld a, MON_HP @@ -34,7 +34,7 @@ BattleCommand_BeatUp: ld a, [hli] or [hl] jp z, .beatup_fail ; fainted - ld a, [wceed] + ld a, [wCurBeatUpPartyMon] ld c, a ld a, [wCurBattleMon] ; BUG: this can desynchronize link battles @@ -88,7 +88,7 @@ BattleCommand_BeatUp: xor a ld [wEnemyRolloutCount], a - ld [wceed], a + ld [wCurBeatUpPartyMon], a ld [wBeatUpHitAtLeastOnce], a jr .enemy_got_mon @@ -97,7 +97,7 @@ BattleCommand_BeatUp: ld b, a ld a, [wOTPartyCount] sub b - ld [wceed], a + ld [wCurBeatUpPartyMon], a .enemy_got_mon ld a, [wBattleMode] @@ -108,7 +108,7 @@ BattleCommand_BeatUp: and a jr nz, .linked - ld a, [wceed] + ld a, [wCurBeatUpPartyMon] ld c, a ld b, 0 ld hl, wOTPartySpecies @@ -119,7 +119,7 @@ BattleCommand_BeatUp: jr .got_enemy_nick .linked - ld a, [wceed] + ld a, [wCurBeatUpPartyMon] ld hl, wOTPartyMonNicknames ld bc, NAME_LENGTH call AddNTimes @@ -133,7 +133,7 @@ BattleCommand_BeatUp: or [hl] jp z, .beatup_fail - ld a, [wceed] + ld a, [wCurBeatUpPartyMon] ld b, a ld a, [wCurOTMon] cp b @@ -213,7 +213,7 @@ GetBeatupMonLocation: ld hl, wOTPartyMon1Species .got_species - ld a, [wceed] + ld a, [wCurBeatUpPartyMon] add hl, bc call GetPartyLocation pop bc diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm index cc441e2d..4926bf53 100644 --- a/engine/events/print_unown_2.asm +++ b/engine/events/print_unown_2.asm @@ -65,7 +65,7 @@ RotateUnownFrontpic: ld a, b ld [hli], a push hl - ld hl, wceee + ld hl, wPrintedUnownTileSource + 1 call .CountSetBit pop hl ld a, b diff --git a/engine/events/prof_oaks_pc.asm b/engine/events/prof_oaks_pc.asm index 40230d5b..b272e3fb 100644 --- a/engine/events/prof_oaks_pc.asm +++ b/engine/events/prof_oaks_pc.asm @@ -36,18 +36,18 @@ Rate: ld hl, wPokedexSeen ld b, wEndPokedexSeen - wPokedexSeen call CountSetBits - ld [wceed], a + ld [wTempPokedexSeenCount], a ld hl, wPokedexCaught ld b, wEndPokedexCaught - wPokedexCaught call CountSetBits - ld [wceee], a + ld [wTempPokedexCaughtCount], a ; print appropriate rating call .UpdateRatingBuffers ld hl, OakPCText3 call PrintText call JoyWaitAorB - ld a, [wceee] + ld a, [wTempPokedexCaughtCount] ld hl, OakRatings call FindOakRating push de @@ -57,10 +57,10 @@ Rate: .UpdateRatingBuffers: ld hl, wStringBuffer3 - ld de, wceed + ld de, wTempPokedexSeenCount call .UpdateRatingBuffer ld hl, wStringBuffer4 - ld de, wceee + ld de, wTempPokedexCaughtCount call .UpdateRatingBuffer ret diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm index 35caada2..48e36b89 100644 --- a/engine/games/unown_puzzle.asm +++ b/engine/games/unown_puzzle.asm @@ -504,13 +504,13 @@ CheckSolvedUnownPuzzle: RedrawUnownPuzzlePieces: call GetCurrentPuzzlePieceVTileCorner - ld [wceed], a + ld [wUnownPuzzleCornerTile], a xor a call GetUnownPuzzleCoordData ; get pixel positions ld a, [hli] ld b, [hl] ld c, a - ld a, [wceed] + ld a, [wUnownPuzzleCornerTile] cp $e0 jr z, .NoPiece ld hl, .OAM_HoldingPiece @@ -532,7 +532,7 @@ RedrawUnownPuzzlePieces: add c ld [de], a ; x inc de - ld a, [wceed] + ld a, [wUnownPuzzleCornerTile] add [hl] ld [de], a ; tile id inc hl diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index f9eeebec..7b43eb82 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2132,11 +2132,12 @@ INCLUDE "data/items/x_stats.asm" PokeFluteEffect: ld a, [wBattleMode] and a - jr nz, .dummy -.dummy + jr nz, .in_battle + ; overworld flute code was dummied out here +.in_battle xor a - ld [wceed], a + ld [wPokeFluteCuredSleep], a ld b, $ff ^ SLP @@ -2159,7 +2160,7 @@ PokeFluteEffect: and b ld [hl], a - ld a, [wceed] + ld a, [wPokeFluteCuredSleep] and a ld hl, .PlayedFluteText jp z, PrintText @@ -2168,22 +2169,22 @@ PokeFluteEffect: ld a, [wLowHealthAlarm] and 1 << DANGER_ON_F - jr nz, .dummy2 -.dummy2 + jr nz, .dummy + ; more code was dummied out here +.dummy ld hl, .FluteWakeUpText jp PrintText .CureSleep: ld de, PARTYMON_STRUCT_LENGTH ld c, PARTY_LENGTH - .loop ld a, [hl] push af and SLP jr z, .not_asleep - ld a, 1 - ld [wceed], a + ld a, TRUE + ld [wPokeFluteCuredSleep], a .not_asleep pop af and b @@ -2252,7 +2253,7 @@ ItemfinderEffect: RestorePPEffect: ld a, [wCurItem] - ld [wceed], a + ld [wTempRestorePPItem], a .loop ; Party Screen opens to choose on which mon to use the Item @@ -2261,14 +2262,14 @@ RestorePPEffect: jp c, PPRestoreItem_Cancel .loop2 - ld a, [wceed] + ld a, [wTempRestorePPItem] cp MAX_ELIXER jp z, Elixer_RestorePPofAllMoves cp ELIXER jp z, Elixer_RestorePPofAllMoves ld hl, RaiseThePPOfWhichMoveText - ld a, [wceed] + ld a, [wTempRestorePPItem] cp PP_UP jr z, .ppup ld hl, RestoreThePPOfWhichMoveText @@ -2299,7 +2300,7 @@ RestorePPEffect: call CopyName1 pop hl - ld a, [wceed] + ld a, [wTempRestorePPItem] cp PP_UP jp nz, Not_PP_Up @@ -2448,7 +2449,7 @@ RestorePP: cp b jr nc, .dont_restore - ld a, [wceed] + ld a, [wTempRestorePPItem] cp MAX_ELIXER jr z, .restore_all cp MAX_ETHER diff --git a/engine/link/link.asm b/engine/link/link.asm index f80bb86e..e2449950 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -25,7 +25,7 @@ LinkCommunications: hlcoord 4, 10 ld de, String_PleaseWait call PlaceString - ld hl, wce5d + ld hl, wLinkByteTimeout xor a ; LOW($5000) ld [hli], a ld [hl], HIGH($5000) @@ -451,6 +451,8 @@ LinkTimeout: text_end ExchangeBytes: +; This is similar to Serial_ExchangeBytes, +; but without a SERIAL_PREAMBLE_BYTE check. ld a, TRUE ldh [hSerialIgnoringInitialData], a .loop @@ -461,9 +463,9 @@ ExchangeBytes: ld b, a inc hl ld a, 48 -.delay_cycles +.wait dec a - jr nz, .delay_cycles + jr nz, .wait ldh a, [hSerialIgnoringInitialData] and a ld a, b @@ -1301,13 +1303,13 @@ LinkTrade_TradeStatsMenu: pop af ld [wMenuCursorY], a dec a - ld [wceed], a + ld [wCurTradePartyMon], a ld [wPlayerLinkAction], a call Serial_PrintWaitingTextAndSyncAndExchangeNybble ld a, [wOtherPlayerLinkMode] cp $f jp z, InitTradeMenuDisplay - ld [wceee], a + ld [wCurOTTradePartyMon], a call LinkTradePlaceArrow ld c, 100 call DelayFrames @@ -1331,7 +1333,7 @@ LinkTrade_TradeStatsMenu: xor a ld [wce57], a ld [wOtherPlayerLinkAction], a - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld hl, wOTPartySpecies ld c, a ld b, 0 @@ -1471,7 +1473,7 @@ LinkTrade: ld b, 4 ld c, 18 call LinkTextboxAtHL - ld a, [wceed] + ld a, [wCurTradePartyMon] ld hl, wPartySpecies ld c, a ld b, 0 @@ -1480,10 +1482,10 @@ LinkTrade: ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, wStringBuffer1 - ld de, wceef + ld de, wBufferTrademonNick ld bc, MON_NAME_LENGTH call CopyBytes - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld hl, wOTPartySpecies ld c, a ld b, 0 @@ -1562,7 +1564,7 @@ LinkTrade: .do_trade: ld hl, sPartyMail - ld a, [wceed] + ld a, [wCurTradePartyMon] ld bc, MAIL_STRUCT_LENGTH call AddNTimes ld a, BANK(sPartyMail) @@ -1571,7 +1573,7 @@ LinkTrade: ld e, l ld bc, MAIL_STRUCT_LENGTH add hl, bc - ld a, [wceed] + ld a, [wCurTradePartyMon] ld c, a .copy_mail inc c @@ -1592,7 +1594,7 @@ LinkTrade: call AddNTimes push hl ld hl, wc8f4 - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld bc, MAIL_STRUCT_LENGTH call AddNTimes pop de @@ -1607,7 +1609,7 @@ LinkTrade: ld bc, NAME_LENGTH call CopyBytes ; species - ld a, [wceed] + ld a, [wCurTradePartyMon] ld hl, wPartySpecies ld b, 0 ld c, a @@ -1616,7 +1618,7 @@ LinkTrade: ld [wPlayerTrademonSpecies], a push af ; OT name - ld a, [wceed] + ld a, [wCurTradePartyMon] ld hl, wPartyMonOT call SkipNames ld de, wPlayerTrademonOTName @@ -1624,7 +1626,7 @@ LinkTrade: call CopyBytes ; ID ld hl, wPartyMon1ID - ld a, [wceed] + ld a, [wCurTradePartyMon] call GetPartyLocation ld a, [hli] ld [wPlayerTrademonID], a @@ -1632,7 +1634,7 @@ LinkTrade: ld [wPlayerTrademonID + 1], a ; DVs ld hl, wPartyMon1DVs - ld a, [wceed] + ld a, [wCurTradePartyMon] call GetPartyLocation ld a, [hli] ld [wPlayerTrademonDVs], a @@ -1646,7 +1648,7 @@ LinkTrade: ld bc, NAME_LENGTH call CopyBytes ; species - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld hl, wOTPartySpecies ld b, 0 ld c, a @@ -1654,7 +1656,7 @@ LinkTrade: ld a, [hl] ld [wOTTrademonSpecies], a ; OT name - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld hl, wOTPartyMonOT call SkipNames ld de, wOTTrademonOTName @@ -1662,7 +1664,7 @@ LinkTrade: call CopyBytes ; ID ld hl, wOTPartyMon1ID - ld a, [wceee] + ld a, [wCurOTTradePartyMon] call GetPartyLocation ld a, [hli] ld [wOTTrademonID], a @@ -1670,21 +1672,21 @@ LinkTrade: ld [wOTTrademonID + 1], a ; DVs ld hl, wOTPartyMon1DVs - ld a, [wceee] + ld a, [wCurOTTradePartyMon] call GetPartyLocation ld a, [hli] ld [wOTTrademonDVs], a ld a, [hl] ld [wOTTrademonDVs + 1], a - ld a, [wceed] + ld a, [wCurTradePartyMon] ld [wCurPartyMon], a ld hl, wPartySpecies ld b, 0 ld c, a add hl, bc ld a, [hl] - ld [wceed], a + ld [wCurTradePartyMon], a xor a ; REMOVE_PARTY ld [wPokemonWithdrawDepositParameter], a @@ -1694,14 +1696,14 @@ LinkTrade: ld [wCurPartyMon], a ld a, TRUE ld [wForceEvolution], a - ld a, [wceee] + ld a, [wCurOTTradePartyMon] push af ld hl, wOTPartySpecies ld b, 0 ld c, a add hl, bc ld a, [hl] - ld [wceee], a + ld [wCurOTTradePartyMon], a ld c, 100 call DelayFrames @@ -2129,7 +2131,7 @@ CheckLinkTimeout_Receptionist: ld a, $1 ld [wPlayerLinkAction], a ld hl, wLinkTimeoutFrames - ld a, $3 + ld a, 3 ld [hli], a xor a ld [hl], a diff --git a/engine/link/time_capsule.asm b/engine/link/time_capsule.asm index 158e7ec9..3c1cfb5f 100644 --- a/engine/link/time_capsule.asm +++ b/engine/link/time_capsule.asm @@ -1,11 +1,11 @@ ; These functions seem to be related to backwards compatibility ValidateOTTrademon: - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld hl, wOTPartyMon1Species call GetPartyLocation push hl - ld a, [wceee] + ld a, [wCurOTTradePartyMon] inc a ld c, a ld b, 0 @@ -30,7 +30,7 @@ ValidateOTTrademon: cp LINK_TIMECAPSULE jr nz, .normal ld hl, wOTPartySpecies - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld c, a ld b, 0 add hl, bc @@ -65,11 +65,11 @@ ValidateOTTrademon: ret CheckAnyOtherAliveMonsForTrade: - ld a, [wceed] + ld a, [wCurTradePartyMon] ld d, a ld a, [wPartyCount] ld b, a - ld c, $0 + ld c, 0 .loop ld a, c cp d @@ -87,7 +87,7 @@ CheckAnyOtherAliveMonsForTrade: inc c dec b jr nz, .loop - ld a, [wceee] + ld a, [wCurOTTradePartyMon] ld hl, wOTPartyMon1HP call GetPartyLocation ld a, [hli] diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm index 8f8257bc..059f915a 100644 --- a/engine/overworld/decorations.asm +++ b/engine/overworld/decorations.asm @@ -44,7 +44,7 @@ _PlayerDecorationMenu: .MenuData: db STATICMENU_CURSOR | STATICMENU_WRAP ; flags db 0 ; items - dw wceed + dw wNumOwnedDecoCategories dw PlaceNthMenuStrings dw .pointers @@ -75,7 +75,7 @@ _PlayerDecorationMenu: ld a, 7 call .AppendToStringBuffer2 ld hl, wStringBuffer2 - ld de, wceed + ld de, wDecoNameBuffer ld bc, ITEM_NAME_LENGTH call CopyBytes ret @@ -133,10 +133,11 @@ _PlayerDecorationMenu: Deco_FillTempWithMinusOne: xor a - ld hl, wceed + ld hl, wNumOwnedDecoCategories ld [hli], a + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories ld a, -1 - ld bc, $10 + ld bc, 16 call ByteFill ret @@ -161,10 +162,11 @@ CheckAllDecorationFlags: ret AppendDecoIndex: - ld hl, wceed + ld hl, wNumOwnedDecoCategories inc [hl] + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories ld e, [hl] - ld d, $0 + ld d, 0 add hl, de ld [hl], a ret @@ -176,7 +178,7 @@ FindOwnedDecosInCategory: pop hl call CheckAllDecorationFlags pop bc - ld a, [wceed] + ld a, [wNumOwnedDecoCategories] and a ret z @@ -335,7 +337,7 @@ DecoExitMenu: ret PopulateDecoCategoryMenu: - ld a, [wceed] + ld a, [wNumOwnedDecoCategories] and a jr z, .empty cp 8 @@ -353,9 +355,10 @@ PopulateDecoCategoryMenu: ret .beyond_eight - ld hl, wceed + ld hl, wNumOwnedDecoCategories ld e, [hl] dec [hl] + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories ld d, 0 add hl, de ld [hl], -1 @@ -395,7 +398,7 @@ PopulateDecoCategoryMenu: .NonscrollingMenuData: db STATICMENU_CURSOR | STATICMENU_WRAP ; flags db 0 ; items - dw wceed + dw wDecoNameBuffer dw DecorationMenuFunction dw DecorationAttributes @@ -409,10 +412,10 @@ PopulateDecoCategoryMenu: db SCROLLINGMENU_DISPLAY_ARROWS ; flags db 8, 0 ; rows, columns db SCROLLINGMENU_ITEMS_NORMAL ; item format - dbw 0, wceed ; text pointer + dbw 0, wDecoNameBuffer ; text pointer dba DecorationMenuFunction - dbw 0, 0 - dbw 0, 0 + dbw 0, NULL + dbw 0, NULL GetDecorationData: ld hl, DecorationAttributes diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm index 105f53e2..ffb878a9 100644 --- a/engine/overworld/scripting.asm +++ b/engine/overworld/scripting.asm @@ -1587,7 +1587,7 @@ Script_givepokemail: push bc inc hl ld bc, MAIL_MSG_LENGTH - ld de, wceed + ld de, wMonMailMessageBuffer ld a, [wScriptBank] call FarCopyBytes pop bc diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 43d79586..3be170ec 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -1362,20 +1362,20 @@ copy_box_data: MACRO jr z, .done\@ and a jr z, .done\@ - ld [de], a + ld [de], a ; species inc de ld a, [wBillsPC_LoadedBox] - ld [de], a + ld [de], a ; box number inc de - ld a, [wceee] - ld [de], a + ld a, [wBillsPCTempListIndex] + ld [de], a ; list index inc a - ld [wceee], a + ld [wBillsPCTempListIndex], a inc de inc hl - ld a, [wceef] + ld a, [wBillsPCTempBoxCount] inc a - ld [wceef], a + ld [wBillsPCTempBoxCount], a jr .loop\@ .done\@ @@ -1384,7 +1384,7 @@ if \1 endc ld a, -1 ld [de], a - ld a, [wceef] + ld a, [wBillsPCTempBoxCount] inc a ld [wBillsPC_NumMonsInBox], a ENDM @@ -1396,8 +1396,8 @@ CopyBoxmonSpecies: call ByteFill ld de, wBillsPCPokemonList xor a - ld [wceee], a - ld [wceef], a + ld [wBillsPCTempListIndex], a + ld [wBillsPCTempBoxCount], a ld a, [wBillsPC_LoadedBox] and a jr z, .party @@ -2433,7 +2433,7 @@ BillsPC_ChangeBoxSubmenu: .Name: ld b, NAME_BOX - ld de, wceed + ld de, wBoxNameBuffer farcall NamingScreen call ClearTilemap call LoadStandardFont @@ -2443,13 +2443,13 @@ BillsPC_ChangeBoxSubmenu: call GetBoxName ld e, l ld d, h - ld hl, wceed + ld hl, wBoxNameBuffer ld c, BOX_NAME_LENGTH - 1 call InitString ld a, [wMenuSelection] dec a call GetBoxName - ld de, wceed + ld de, wBoxNameBuffer call CopyName2 ret diff --git a/engine/pokemon/evolve.asm b/engine/pokemon/evolve.asm index d6e962fe..3619d2da 100644 --- a/engine/pokemon/evolve.asm +++ b/engine/pokemon/evolve.asm @@ -512,7 +512,7 @@ FillMoves: ld a, [wEvolutionOldSpecies] and a jr z, .CheckMove - ld a, [wceed] + ld a, [wPrevPartyLevel] cp b jr nc, .GetMove diff --git a/engine/pokemon/mail.asm b/engine/pokemon/mail.asm index 37a5f8f6..94006146 100644 --- a/engine/pokemon/mail.asm +++ b/engine/pokemon/mail.asm @@ -206,7 +206,7 @@ GivePokeMail:: call AddNTimes ld d, h ld e, l - ld hl, wceed + ld hl, wMonMailMessageBuffer ld bc, MAIL_MSG_LENGTH + 1 ld a, BANK(sPartyMail) call OpenSRAM diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm index 585d1e78..fe2a0886 100644 --- a/engine/pokemon/move_mon.asm +++ b/engine/pokemon/move_mon.asm @@ -780,7 +780,7 @@ RetrieveMonFromDayCareMan: call WaitSFX call GetBreedMon1LevelGrowth ld a, b - ld [wceed], a + ld [wPrevPartyLevel], a ld a, e ld [wCurPartyLevel], a xor a @@ -795,12 +795,12 @@ RetrieveMonFromDayCareLady: call WaitSFX call GetBreedMon2LevelGrowth ld a, b - ld [wceed], a + ld [wPrevPartyLevel], a ld a, e ld [wCurPartyLevel], a ld a, PC_DEPOSIT ld [wPokemonWithdrawDepositParameter], a - jp RetrieveBreedmon + jp RetrieveBreedmon ; pointless RetrieveBreedmon: ld hl, wPartyCount diff --git a/engine/pokemon/switchpartymons.asm b/engine/pokemon/switchpartymons.asm index 24d19df6..2c00b34b 100644 --- a/engine/pokemon/switchpartymons.asm +++ b/engine/pokemon/switchpartymons.asm @@ -65,7 +65,7 @@ _SwitchPartyMons: ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes push hl - ld de, wceed + ld de, wSwitchMonBuffer ld bc, PARTYMON_STRUCT_LENGTH call CopyBytes ld a, [wBuffer3] @@ -77,14 +77,14 @@ _SwitchPartyMons: ld bc, PARTYMON_STRUCT_LENGTH call CopyBytes pop de - ld hl, wceed + ld hl, wSwitchMonBuffer ld bc, PARTYMON_STRUCT_LENGTH call CopyBytes ld a, [wBuffer2] ld hl, wPartyMonOT call SkipNames push hl - call .CopyNameTowceed + call .CopyNameToSwitchMonBuffer ld a, [wBuffer3] ld hl, wPartyMonOT call SkipNames @@ -92,13 +92,13 @@ _SwitchPartyMons: push hl call .CopyName pop de - ld hl, wceed + ld hl, wSwitchMonBuffer call .CopyName ld hl, wPartyMonNicknames ld a, [wBuffer2] call SkipNames push hl - call .CopyNameTowceed + call .CopyNameToSwitchMonBuffer ld hl, wPartyMonNicknames ld a, [wBuffer3] call SkipNames @@ -106,14 +106,14 @@ _SwitchPartyMons: push hl call .CopyName pop de - ld hl, wceed + ld hl, wSwitchMonBuffer call .CopyName ld hl, sPartyMail ld a, [wBuffer2] ld bc, MAIL_STRUCT_LENGTH call AddNTimes push hl - ld de, wceed + ld de, wSwitchMonBuffer ld bc, MAIL_STRUCT_LENGTH ld a, BANK(sPartyMail) call OpenSRAM @@ -127,7 +127,7 @@ _SwitchPartyMons: ld bc, MAIL_STRUCT_LENGTH call CopyBytes pop de - ld hl, wceed + ld hl, wSwitchMonBuffer ld bc, MAIL_STRUCT_LENGTH call CopyBytes call CloseSRAM @@ -136,8 +136,8 @@ _SwitchPartyMons: pop hl ret -.CopyNameTowceed: - ld de, wceed +.CopyNameToSwitchMonBuffer: + ld de, wSwitchMonBuffer .CopyName: ld bc, NAME_LENGTH |