diff options
| author | Sylvie <35663410+Rangi42@users.noreply.github.com> | 2024-09-18 21:41:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-18 21:41:58 -0400 |
| commit | 5a622f628de6908210091a05956b0d8ce3620237 (patch) | |
| tree | 9cc32420b50f09531c58f4c5019ef167e133b95c /engine/battle/experience.asm | |
| parent | Split `hSpriteIndexOrTextID` into `hSpriteIndex` and `hTextID` (#462) (diff) | |
| download | pokeyellow-5a622f628de6908210091a05956b0d8ce3620237.tar.gz pokeyellow-5a622f628de6908210091a05956b0d8ce3620237.tar.xz pokeyellow-5a622f628de6908210091a05956b0d8ce3620237.zip | |
Identify remaining uses of `wd0b5` and `wd11e` (#463)
Diffstat (limited to 'engine/battle/experience.asm')
| -rw-r--r-- | engine/battle/experience.asm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm index 798d7ce1..57d37f01 100644 --- a/engine/battle/experience.asm +++ b/engine/battle/experience.asm @@ -113,8 +113,8 @@ GainExperience: ld b, 0 ld hl, wPartySpecies add hl, bc - ld a, [hl] ; species - ld [wd0b5], a + ld a, [hl] + ld [wCurSpecies], a call GetMonHeader ld d, MAX_LEVEL callfar CalcExperience ; get max exp @@ -168,9 +168,9 @@ GainExperience: ld [hl], a ld bc, wPartyMon1Species - wPartyMon1Level add hl, bc - ld a, [hl] ; species - ld [wd0b5], a - ld [wd11e], a + ld a, [hl] + ld [wCurSpecies], a + ld [wPokedexNum], a call GetMonHeader ld bc, (wPartyMon1MaxHP + 1) - wPartyMon1Species add hl, bc @@ -251,8 +251,8 @@ GainExperience: call LoadScreenTilesFromBuffer1 xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a - ld a, [wd0b5] - ld [wd11e], a + ld a, [wCurSpecies] + ld [wPokedexNum], a predef LearnMoveFromLevelUp ld hl, wCanEvolveFlags ld a, [wWhichPokemon] @@ -306,7 +306,7 @@ DivideExpDataByNumMonsGainingExp: jr nz, .countSetBitsLoop cp $2 ret c ; return if only one mon is gaining exp - ld [wd11e], a ; store number of mons gaining exp + ld [wTempByteValue], a ; store number of mons gaining exp ld hl, wEnemyMonBaseStats ld c, wEnemyMonBaseExp + 1 - wEnemyMonBaseStats .divideLoop @@ -314,7 +314,7 @@ DivideExpDataByNumMonsGainingExp: ldh [hDividend], a ld a, [hl] ldh [hDividend + 1], a - ld a, [wd11e] + ld a, [wTempByteValue] ldh [hDivisor], a ld b, $2 call Divide ; divide value by number of mons gaining exp |
