Closes#1699
tested on black2 & white, skin isn't corrupt on game boot and appears
correctly
still don't like setpixel/System.Drawing reliance (maybe split logic to
CGearSkin & CGearSkinVisualizer) for PKHeX.Core compat
closes#1755
also:
fix vc transfer checks not being called (EncounterOriginalGB is no
longer GBEncounterData).
remove usages of GBEncounterData -- class is (as of a ~~month ago) now
never leaked out of the EncounterGenerator -- always returns the actual
encounter data as the wrapper is not needed.
simplify logic flow / references
move logic back to cgearbackground, initialize the bg regardless of
psk/cgb input format
cache background data to return psk (potentially unintended side effects
if importing bw psk to b2w2, will have to fix cgb->psk first then undo
this tempfix)
#1699
pseudo future proofing in the event new species sprites are added and
recolored variants are not
Closes#1735 , thanks @trainboy2019 !
(reimplemented alterations with GUI-saved settings)
indicates met location for transferred mons
most gen1/2 encounters won't show values due to the location not being
stored respective to the string tables (anyone wanna do a location remap
after initial load?)
StringLength is the raw buffer size, needs to be offset by 1 as the
string length enforced does not consider the terminator
12char OT name in sav7 loaded to tabs -> load gen1/2 save = exception
(now fixed)
loading pbr/rsbox -> loading a game that has party & daycare causes the
daycare tab to be loaded in the incorrect spot.
PartyTab needs to be calculated closer to its use
condense repeated logic, reduce overall operations
removes 1 array alloc for pkm encryption (shuffle clones the array, so
don't clone->clone)
removes 1 array alloc for pkm decryption (mutate encrypted array), be
aware that no current use cases input an encrypted region and expect the
reference to stay encrypted (always was a temp array).
remove duplicate bounds checks (early return & for loop)
GetBytes returns an array that is immediately discarded (GC pressure)
reduces overhead when loading large pkm collections from save files
(shaved off a couple seconds from my loading from 200+ bak saves)
could probably go faster with unsafe code to r/w ushort directly
then again im profiling under debug but i'd assume the improvements made
actually do improve speed for release builds
Species and Nicknamed params were never used; foreign always resulted in
true for cases when it actually mattered.
Filter to the non-fullwidth characters, check the char type (latin base
vs jp/zh/ko) in order to determine if the full/half symbols should be
squished
could be faster replacing char instead of string, so change those
add two test cases for half width & full width string
sanitization/unsanitization