diff options
| author | dannye <corrnondacqb@yahoo.com> | 2015-08-10 00:00:12 -0500 |
|---|---|---|
| committer | dannye <corrnondacqb@yahoo.com> | 2015-08-10 00:00:12 -0500 |
| commit | 66bc517605860c9f716a176ed467d34097985895 (patch) | |
| tree | 4c126cbb3bbdb2b0a236375c2140e7a6c25260a6 /engine/pokedex_rating.asm | |
| parent | Replace some hardcoded data sizes (diff) | |
| parent | commented audio code (diff) | |
| download | pokeyellow-66bc517605860c9f716a176ed467d34097985895.tar.gz pokeyellow-66bc517605860c9f716a176ed467d34097985895.tar.xz pokeyellow-66bc517605860c9f716a176ed467d34097985895.zip | |
Merge branch 'master' of https://github.com/YamaArashi/pokered
Diffstat (limited to 'engine/pokedex_rating.asm')
| -rwxr-xr-x | engine/pokedex_rating.asm | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm index ca88673f..265eff40 100755 --- a/engine/pokedex_rating.asm +++ b/engine/pokedex_rating.asm @@ -2,18 +2,18 @@ DisplayDexRating: ; 44169 (11:4169) ld hl, wPokedexSeen ld b, wPokedexSeenEnd - wPokedexSeen call CountSetBits - ld a, [wd11e] ; result of CountSetBits (seen count) - ld [$FFDB], a + ld a, [wNumSetBits] + ld [hDexRatingNumMonsSeen], a ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned call CountSetBits - ld a, [wd11e] ; result of CountSetBits (own count) - ld [$FFDC], a + ld a, [wNumSetBits] + ld [hDexRatingNumMonsOwned], a ld hl, DexRatingsTable .findRating ld a, [hli] ld b, a - ld a, [$FFDC] ; number of pokemon owned + ld a, [hDexRatingNumMonsOwned] cp b jr c, .foundRating inc hl @@ -24,30 +24,30 @@ DisplayDexRating: ; 44169 (11:4169) ld h, [hl] ld l, a ; load text pointer into hl CheckAndResetEventA EVENT_HALL_OF_FAME_DEX_RATING - jr nz, .label3 + jr nz, .hallOfFame push hl ld hl, PokedexRatingText_441cc call PrintText pop hl call PrintText callba PlayPokedexRatingSfx - jp WaitForTextScrollButtonPress ; wait for button press -.label3 + jp WaitForTextScrollButtonPress +.hallOfFame ld de, wcc5b - ld a, [$FFDB] + ld a, [hDexRatingNumMonsSeen] ld [de], a inc de - ld a, [$FFDC] + ld a, [hDexRatingNumMonsOwned] ld [de], a inc de -.label4 +.copyRatingTextLoop ld a, [hli] - cp a, $50 - jr z, .label5 + cp a, "@" + jr z, .doneCopying ld [de], a inc de - jr .label4 -.label5 + jr .copyRatingTextLoop +.doneCopying ld [de], a ret |
