Skip to content

Commit

Permalink
Nayrus Pokedex v3.4 part 1: Hide Unseen Mons from Evo chart
Browse files Browse the repository at this point in the history
still need to add Curse Type GFX
  • Loading branch information
Nayru62 authored and xaerochill committed Aug 15, 2024
1 parent 14f3b3a commit d954619
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 28 deletions.
8 changes: 4 additions & 4 deletions engine/pokedex/pokedex.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2414,10 +2414,10 @@ Pokedex_CheckSeen:
ld a, [wTempSpecies]
dec a
call CheckSeenMon
IF DEF(_DEBUG)
ld a, 1 ; DEBUG, to unlock all unseen mon
and a ; DEBUG, to unlock all unseen mon
ENDC
; IF DEF(_DEBUG)
; ld a, 1 ; DEBUG, to unlock all unseen mon
; and a ; DEBUG, to unlock all unseen mon
; ENDC
pop hl
pop de
ret
Expand Down
1 change: 1 addition & 0 deletions engine/pokedex/pokedex_2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ DEX_NO_CUSTOM_GFX_PrintType_Short:
db "ICE @"
db "DRGN@"
db "DARK@"
db "FAIR@"
ENDC

INCLUDE "data/pokemon/dex_entry_pointers.asm"
Expand Down
120 changes: 96 additions & 24 deletions engine/pokedex/pokedex_evolution_page.asm
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,35 @@ DisplayDexMonEvos:
.dont_arrow_stage1
hlcoord 6, 2
call EVO_sethlcoord
call GetPokemonName

; will be overwritten if we havent seen mon, and the option is enabled
call GetPokemonName ; uses wNamedObjectIndex
IF EVO_HIDE_UNSEEN == TRUE
call EVO_CheckSeenMon
jr nz, .seen_1
ld de, EVO_Unseen_Mon_text
.seen_1
ENDC
call PlaceString

ld a, -1
ld [wStatsScreenFlags], a
call EVO_DrawSpriteBox
call EVO_place_CaughtIcon
hlcoord 6, 2
call EVO_sethlcoord
call EVO_place_Mon_Types
call EVO_place_Mon_Types

IF EVO_HIDE_UNSEEN == TRUE
call EVO_CheckSeenMon
jr z, .unseen_no_gfx_2
ENDC
call EVO_place_CaughtIcon
call EVO_place_Mon_Icon
IF EVO_HIDE_UNSEEN == TRUE
.unseen_no_gfx_2
ENDC

xor a
ld [wStatsScreenFlags], a
Expand Down Expand Up @@ -123,7 +142,15 @@ ENDC
ld a, BANK("Evolutions and Attacks")
call GetFarByte ; species
ld [wNamedObjectIndex], a
call GetPokemonName ; uses NamedObjectIndex

; will be overwritten if we havent seen mon, and the option is enabled
call GetPokemonName ; uses wNamedObjectIndex
IF EVO_HIDE_UNSEEN == TRUE
call EVO_CheckSeenMon
jr nz, .seen_2
ld de, EVO_Unseen_Mon_text
.seen_2
ENDC
call EVO_gethlcoord
call PlaceString

Expand All @@ -142,11 +169,21 @@ ENDC
pop af ; manner of evo

call EVO_DrawSpriteBox
call EVO_place_CaughtIcon
call EVO_place_Mon_Types
IF EVO_HIDE_UNSEEN == TRUE
push af
push bc
call EVO_CheckSeenMon
jr z, .unseen_no_gfx_1
ENDC
call EVO_place_CaughtIcon
call EVO_place_Mon_Icon
IF EVO_HIDE_UNSEEN == TRUE
.unseen_no_gfx_1
pop bc
pop af
ENDC
call EVO_inchlcoord

; done printing species
pop hl ; manner of evo byte +1
pop af ; manner of evo
Expand Down Expand Up @@ -1095,30 +1132,65 @@ IF USE_GEN3_STYLE_TYPE_GFX == FALSE
DEX_EVO_NO_CUSTOM_GFX_PrintType_Short:
; Print type a at hl.
push hl
IF EVO_HIDE_UNSEEN == TRUE
push af
call EVO_CheckSeenMon
jr nz, .seen
pop af ; discarding
ld a, 18 ; index of ???
jr .done
.seen
pop af
.done
ENDC
ld hl, .Types
ld bc, 5 ; since each entry is 4 bytes
ld bc, 4 ; since each entry is 4 bytes
call AddNTimes
ld d, h
ld e, l
pop hl
inc hl
jp PlaceString

.Types
db "NORM@"
db "FIGT@"
db "FLY @"
db "PSN @"
db "GRND@"
db "ROCK@"
db "BUG @"
db "GHST@"
db "STEL@"
db "FIRE@"
db "WATR@"
db "GRAS@"
db "ELEC@"
db "PSY @"
db "ICE @"
db "DRGN@"
db "DARK@"
db "NRM@"
db "FIT@"
db "FLY@"
db "PSN@"
db "GRD@"
db "RCK@"
db "BUG@"
db "GHS@"
db "STL@"
db "FIR@"
db "WAT@"
db "GRS@"
db "ELC@"
db "PSY@"
db "ICE@"
db "DRG@"
db "DRK@"
db "FAI@"
db "???@"
ENDC

IF EVO_HIDE_UNSEEN == TRUE
EVO_CheckSeenMon:
push de
push hl
ld a, [wNamedObjectIndex]
dec a
call CheckSeenMon
pop hl
pop de
and a ; 0 means unseen, 1 is seen
; jr nz, .seen_mon
; ld de, .EVO_Unseen_Mon_text
; .seen_mon
ret

EVO_Unseen_Mon_text:
db "?????@"
ENDC


4 changes: 4 additions & 0 deletions pokedex_options.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ DEF USE_GEN3_STYLE_TYPE_GFX EQU TRUE
; if FALSE, uses 4-letter shorthand for Types
; see 'engine\pokedex\pokedex2.asm'

; Want to obfuscate unseen pokemon from the Evolution chart Page?
DEF EVO_HIDE_UNSEEN EQU TRUE
; will still show evolution methods and requirements, but not name or icon

; Using custom Evolution Methods?
; see 'engine\pokedex\pokedex_evolution_page.asm'
; Currently supports:
Expand Down

0 comments on commit d954619

Please sign in to comment.