ref: 771ebcbf23a2b479ca5af4ed07f1bacf1fe03faf
parent: 106b0e139f0195f5fb27536ee573b6aa56311fc4
author: yenatch <[email protected]>
date: Sun Sep 8 22:34:07 EDT 2013
PokedexSeen and PokedexCaught were swapped
--- a/main.asm
+++ b/main.asm
@@ -1383,39 +1383,38 @@
SetSeenAndCaughtMon: ; 3380
push af
ld c, a
- ld hl, PokedexSeen
- ld b, 1
- call GetWramFlag
+ ld hl, PokedexCaught
+ ld b, SET_FLAG
+ call PokedexFlagAction
pop af
; fallthrough
; 338b
-SetCaughtMon: ; 338b
+SetSeenMon: ; 338b
ld c, a
- ld hl, PokedexCaught
- ld b, 1
- jr GetWramFlag
+ ld hl, PokedexSeen
+ ld b, SET_FLAG
+ jr PokedexFlagAction
; 3393
-CheckSeenMon: ; 3393
+CheckCaughtMon: ; 3393
ld c, a
- ld hl, PokedexSeen
- ld b, 2
- jr GetWramFlag
+ ld hl, PokedexCaught
+ ld b, CHECK_FLAG
+ jr PokedexFlagAction
; 339b
-CheckCaughtMon: ; 339b
+CheckSeenMon: ; 339b
ld c, a
- ld hl, PokedexCaught
- ld b, 2
+ ld hl, PokedexSeen
+ ld b, CHECK_FLAG
; fallthrough
; 33a1
-GetWramFlag: ; 33a1
+PokedexFlagAction: ; 33a1
ld d, 0
ld a, PREDEF_FLAG
call Predef
-
ld a, c
and a
ret
@@ -8612,7 +8611,7 @@
bit 0, a
ret z
push hl
- ld hl, PokedexSeen
+ ld hl, PokedexCaught
ld b, $20
call CountSetBits
pop hl
@@ -13517,7 +13516,7 @@
Functionc230: ; c230
ld a, [ScriptVar]
dec a
- call CheckSeenMon
+ call CheckCaughtMon
ret nz
ld a, [ScriptVar]
dec a
@@ -13533,7 +13532,7 @@
Functionc252: ; c252
ld a, [ScriptVar]
dec a
- call SetCaughtMon
+ call SetSeenMon
ret
; c25a
@@ -17018,7 +17017,7 @@
ld [$d265], a
dec a
push de
- call CheckSeenMon
+ call CheckCaughtMon
ld a, [$d265]
dec a
call SetSeenAndCaughtMon
@@ -17924,10 +17923,10 @@
ld a, [CurPartySpecies]
dec a
push af
- call CheckSeenMon
+ call CheckCaughtMon
pop af
push bc
- call CheckCaughtMon
+ call CheckSeenMon
push bc
call Functiond88c
pop bc
@@ -17938,7 +17937,7 @@
dec a
ld c, a
ld d, $0
- ld hl, PokedexSeen
+ ld hl, PokedexCaught
ld b, $0
ld a, $3
call Predef
@@ -17952,7 +17951,7 @@
dec a
ld c, a
ld d, $0
- ld hl, PokedexCaught
+ ld hl, PokedexSeen
ld b, $0
ld a, $3
call Predef
@@ -31577,13 +31576,13 @@
Rate: ; 0x26616
; calculate Seen/Owned
- ld hl, PokedexCaught
- ld b, EndPokedexCaught - PokedexCaught
- call CountSetBits
- ld [DefaultFlypoint], a
ld hl, PokedexSeen
ld b, EndPokedexSeen - PokedexSeen
call CountSetBits
+ ld [DefaultFlypoint], a
+ ld hl, PokedexCaught
+ ld b, EndPokedexCaught - PokedexCaught
+ call CountSetBits
ld [$d003], a
; print appropriate rating
@@ -35982,7 +35981,7 @@
push bc
dec c
ld a, c
- call CheckCaughtMon
+ call CheckSeenMon
pop bc
jr nz, .asm_2a514
ld de, StringBuffer1
@@ -36474,7 +36473,7 @@
ret nz
ld a, [TempEnemyMonSpecies]
dec a
- call CheckSeenMon
+ call CheckCaughtMon
ret z
ld hl, $c4b5
ld [hl], $5d
@@ -44694,7 +44693,7 @@
dec a
ld c, a
ld b, 1 ; set
- ld hl, PokedexCaught
+ ld hl, PokedexSeen
ld a, PREDEF_FLAG
call Predef
@@ -47986,7 +47985,7 @@
push hl
ld a, [$d265]
dec a
- call CheckCaughtMon
+ call CheckSeenMon
pop hl
pop de
ret
@@ -49198,7 +49197,7 @@
call PrintNum
ld a, [$d265]
dec a
- call CheckSeenMon
+ call CheckCaughtMon
pop hl
pop bc
ret z
@@ -83255,7 +83254,7 @@
ld hl, rSVBK
ld e, $1
ld [hl], e
- call CheckCaughtMon
+ call CheckSeenMon
ld hl, rSVBK
ld e, $5
ld [hl], e
--- a/wram.asm
+++ b/wram.asm
@@ -2026,12 +2026,12 @@
PartyMonNicknamesEnd
SECTION "Pokedex",WRAMX[$de99],BANK[1]
-PokedexSeen: ; de99
+PokedexCaught: ; de99
ds 32
-EndPokedexSeen:
-PokedexCaught: ; deb9
- ds 32
EndPokedexCaught:
+PokedexSeen: ; deb9
+ ds 32
+EndPokedexSeen:
UnownDex: ; ded9
ds 26
UnlockedUnowns: ; def3