diff options
Diffstat (limited to 'engine/items')
-rw-r--r-- | engine/items/item_effects.asm | 40 | ||||
-rw-r--r-- | engine/items/mart.asm | 4 | ||||
-rw-r--r-- | engine/items/print_item_description.asm | 2 | ||||
-rw-r--r-- | engine/items/tmhm.asm | 53 | ||||
-rw-r--r-- | engine/items/tmhm2.asm | 4 |
5 files changed, 44 insertions, 59 deletions
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 1439b2c6d..e751b42e6 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1,6 +1,6 @@ _DoItemEffect:: ld a, [wCurItem] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetItemName call CopyName1 ld a, 1 @@ -489,7 +489,7 @@ PokeBallEffect: ld a, [wEnemyMonSpecies] ld [wWildMon], a ld [wCurPartySpecies], a - ld [wd265], a + ld [wTempSpecies], a ld a, [wBattleType] cp BATTLETYPE_TUTORIAL jp z, .FinishTutorial @@ -501,13 +501,13 @@ PokeBallEffect: call ClearSprites - ld a, [wd265] + ld a, [wTempSpecies] dec a call CheckCaughtMon ld a, c push af - ld a, [wd265] + ld a, [wTempSpecies] dec a call SetSeenAndCaughtMon pop af @@ -523,7 +523,7 @@ PokeBallEffect: call ClearSprites ld a, [wEnemyMonSpecies] - ld [wd265], a + ld [wTempSpecies], a predef NewPokedexEntry .skip_pokedex @@ -566,7 +566,7 @@ PokeBallEffect: call PrintText ld a, [wCurPartySpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName call YesNoBox @@ -626,7 +626,7 @@ PokeBallEffect: call PrintText ld a, [wCurPartySpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName call YesNoBox @@ -1276,7 +1276,7 @@ Table_eeeb: RareCandy_StatBooster_GetParameters: ld a, [wCurPartySpecies] ld [wCurSpecies], a - ld [wd265], a + ld [wTempSpecies], a ld a, MON_LEVEL call GetPartyParamLocation ld a, [hl] @@ -1368,7 +1368,7 @@ RareCandyEffect: xor a ; PARTYMON ld [wMonType], a ld a, [wCurPartySpecies] - ld [wd265], a + ld [wTempSpecies], a predef LearnLevelMoves xor a @@ -2159,7 +2159,7 @@ XItemEffect: ld [hBattleTurn], a ld [wAttackMissed], a ld [wEffectFailed], a - farcall CheckIfStatCanBeRaised + farcall RaiseStat call WaitSFX farcall BattleCommand_StatUpMessage @@ -2344,7 +2344,7 @@ RestorePPEffect: push hl ld a, [hl] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetMoveName call CopyName1 pop hl @@ -2373,8 +2373,8 @@ RestorePPEffect: ld a, [hl] add PP_UP_ONE ld [hl], a - ld a, $1 - ld [wd265], a + ld a, TRUE + ld [wUsePPUp], a call ApplyPPUp call Play_SFX_FULL_HEAL @@ -2492,7 +2492,7 @@ RestorePP: ld hl, wPartyMon1PP ld bc, PARTYMON_STRUCT_LENGTH call GetMthMoveOfNthPartymon - ld a, [wd265] + ld a, [wTempPP] ld b, a ld a, [hl] and PP_MASK @@ -2765,8 +2765,8 @@ ApplyPPUp: ld a, b cp NUM_MOVES + 1 ret z - ld a, [wd265] - dec a + ld a, [wUsePPUp] + dec a ; FALSE? jr nz, .use ld a, [wMenuCursorY] inc a @@ -2822,7 +2822,7 @@ ComputeMaxPP: .okay add b ld b, a - ld a, [wd265] + ld a, [wTempPP] dec a jr z, .NoPPUp dec c @@ -2857,7 +2857,7 @@ RestoreAllPP: ld a, [de] and PP_UP_MASK ld b, a - ld a, [wd265] + ld a, [wTempPP] add b ld [de], a inc de @@ -2933,12 +2933,12 @@ GetMaxPPOfMove: ld hl, wStringBuffer1 + 1 ld [hl], a xor a - ld [wd265], a + ld [wTempPP], a ld a, b ; this gets lost anyway call ComputeMaxPP ld a, [hl] and PP_MASK - ld [wd265], a + ld [wTempPP], a pop af ld [wStringBuffer1 + 1], a diff --git a/engine/items/mart.asm b/engine/items/mart.asm index 7e185662b..8afae541a 100644 --- a/engine/items/mart.asm +++ b/engine/items/mart.asm @@ -54,8 +54,8 @@ BargainShop: ld a, [hli] or [hl] jr z, .skip_set - ld hl, wDailyFlags - set DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl] + ld hl, wDailyFlags1 + set DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl] .skip_set ld hl, Text_BargainShop_ComeAgain diff --git a/engine/items/print_item_description.asm b/engine/items/print_item_description.asm index b0a3a0b33..5d944e206 100644 --- a/engine/items/print_item_description.asm +++ b/engine/items/print_item_description.asm @@ -9,7 +9,7 @@ PrintItemDescription: push de farcall GetTMHMItemMove pop hl - ld a, [wd265] + ld a, [wTempTMHM] ld [wCurSpecies], a predef PrintMoveDesc ret diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index 4958d2afc..14e481248 100644 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -33,7 +33,7 @@ ConvertCurItemIntoCurTMHM: ld c, a callfar GetTMHMNumber ld a, c - ld [wCurTMHM], a + ld [wTempTMHM], a ret GetTMHMItemMove: @@ -50,7 +50,7 @@ AskTeachTMHM: cp TM01 jr c, .NotTMHM call GetTMHMItemMove - ld a, [wCurTMHM] + ld a, [wTempTMHM] ld [wPutativeTMHMMove], a call GetMoveName call CopyName1 @@ -251,9 +251,9 @@ TMHM_ShowTMMoveDescription: ld a, [wCurItem] cp NUM_TMS + NUM_HMS + 1 jr nc, TMHM_JoypadLoop - ld [wd265], a + ld [wTempTMHM], a predef GetTMHMMove - ld a, [wd265] + ld a, [wTempTMHM] ld [wCurSpecies], a hlcoord 1, 14 call PrintMoveDesc @@ -261,14 +261,14 @@ TMHM_ShowTMMoveDescription: TMHM_ChooseTMorHM: call TMHM_PlaySFX_ReadText2 - call CountTMsHMs ; This stores the count to wd265. + call CountTMsHMs ; This stores the count to wTempTMHM. ld a, [wMenuCursorY] dec a ld b, a ld a, [wTMHMPocketScrollPosition] add b ld b, a - ld a, [wd265] + ld a, [wTempTMHM] cp b jr z, _TMHM_ExitPack ; our cursor was hovering over CANCEL TMHM_CheckHoveringOverCancel: @@ -354,16 +354,16 @@ TMHM_DisplayPocketItems: jr z, .loop2 ld b, a ld a, c - ld [wd265], a + ld [wTempTMHM], a push hl push de push bc call TMHMPocket_GetCurrentLineCoord push hl - ld a, [wd265] + ld a, [wTempTMHM] cp NUM_TMS + 1 jr nc, .HM - ld de, wd265 + ld de, wTempTMHM lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum jr .okay @@ -371,17 +371,17 @@ TMHM_DisplayPocketItems: .HM: push af sub NUM_TMS - ld [wd265], a + ld [wTempTMHM], a ld [hl], "H" inc hl - ld de, wd265 + ld de, wTempTMHM lb bc, PRINTNUM_RIGHTALIGN | 1, 2 call PrintNum pop af - ld [wd265], a + ld [wTempTMHM], a .okay predef GetTMHMMove - ld a, [wd265] + ld a, [wNamedObjectIndexBuffer] ld [wPutativeTMHMMove], a call GetMoveName pop hl @@ -403,8 +403,8 @@ TMHM_DisplayPocketItems: pop bc push bc ld a, b - ld [wd265], a - ld de, wd265 + ld [wTempTMHM], a + ld de, wTempTMHM lb bc, 1, 2 call PrintNum .hm2 @@ -445,7 +445,7 @@ Unreferenced_Function2ca95: ld bc, 3 add hl, bc predef GetTMHMMove - ld a, [wd265] + ld a, [wTempTMHM] ld [wPutativeTMHMMove], a call GetMoveName push hl @@ -508,7 +508,7 @@ Unreferenced_Function2cadf: db "@" .CheckHaveRoomForTMHM: - ld a, [wd265] + ld a, [wTempTMHM] dec a ld hl, wTMsHMs ld b, 0 @@ -523,7 +523,7 @@ Unreferenced_Function2cadf: ConsumeTM: call ConvertCurItemIntoCurTMHM - ld a, [wd265] + ld a, [wTempTMHM] dec a ld hl, wTMsHMs ld b, 0 @@ -555,20 +555,5 @@ CountTMsHMs: dec c jr nz, .loop ld a, b - ld [wd265], a + ld [wTempTMHM], a ret - -PrintMoveDesc: - push hl - ld hl, MoveDescriptions - ld a, [wCurSpecies] - dec a - ld c, a - ld b, 0 - add hl, bc - add hl, bc - ld a, [hli] - ld e, a - ld d, [hl] - pop hl - jp PlaceString diff --git a/engine/items/tmhm2.asm b/engine/items/tmhm2.asm index 10206d36b..057d0b346 100644 --- a/engine/items/tmhm2.asm +++ b/engine/items/tmhm2.asm @@ -33,14 +33,14 @@ CanLearnTMHMMove: ret GetTMHMMove: - ld a, [wd265] + ld a, [wTempTMHM] dec a ld hl, TMHMMoves ld b, 0 ld c, a add hl, bc ld a, [hl] - ld [wd265], a + ld [wTempTMHM], a ret INCLUDE "data/moves/tmhm_moves.asm" |