Commit graph

570 commits

Author SHA1 Message Date
Kurt
4b8082be23 Add Pokegear number editing (hgss)
Closes #2379
2019-09-02 21:24:49 -07:00
Kurt
61bee67908 Misc fixes
revert HoF reads as they are stored outside the general/storage blocks
2019-09-02 20:25:38 -07:00
Kurt
b81a1e1e29 Refactoring
Increase abstraction for arbitrary slot get/set operations, and fracture
SAV4 behavior for each game type.

Adds: Undo/Redo of party slot changes
Fixes: Fixed Gen5 daycare slot 2 reading, and EXP reading
Fixes: Some slot color glitchiness
Fixed: Box layout editor now hides the flag label if no flags are
present
Fixed: Gen7 box flags are now shown (unknown purpose lol)
Changed: savefile objects are generally smaller (removed a few shared
offset fields)
2019-09-02 19:30:58 -07:00
Kurt
bf6c25eca7 Break up SlotChangeManager logic
A little bit cleaner when the logic is separated
Keep an abstraction of BoxEdit to cache the current box contents.
Already fetched to show sprites; any future fetches (for preview text /
hover sprite) can reuse the already fetched pkm data.

Should probably rewrite this stuff completely, but effort better spent
elsewhere
2019-08-20 19:50:28 -07:00
Kurt
39f5500d8a Show summary tooltip on mouse enter
Thanks SadisticMystic for the suggestion!
2019-08-14 22:51:49 -07:00
Kurt
a608e0b252 Minor clean
Remove some unnecessary properties from SaveFile
Enumerate checksum flag results for GC memcard checking
Remove unnecessary checks on savefile type
Add some documentation
Decapitalize some method parameters
2019-07-14 15:06:45 -07:00
Kurt
c7eecf5976 Extract summary object to core 2019-07-13 17:43:05 -07:00
Kurt
c64ff5dd76 Fix sav5 behavior
Closes #2356 ty @Ammako
2019-07-10 00:19:59 -07:00
Kurt
f2ac29ff4e Relocate some logic
slightly reduces savefile.cs footprint
2019-07-05 22:02:29 -07:00
Kurt
9a61f0de0f Minor relocation of logic
and the gradual shift to full-oop continues
2019-07-05 21:39:47 -07:00
Kurt
aa94c70df2 Hide gen6 dex logic behind zukan class
Same as prior commit for gen5 & gen7
2019-07-05 18:04:36 -07:00
Kurt
adbb3e842a Hide gen7 dex logic behind zukan class
Same as prior commit for gen5
2019-07-05 17:05:42 -07:00
Kurt
79a9269fbe Hide gen5 dex logic in Zukan class
Didn't change any of the bulk modifications, but the data get/set is now
done via the Zukan object rather than raw data manipulation
2019-07-05 16:21:53 -07:00
Kurt
01fee15c1f Show tooltip for inventory tabs
quality of life feature
2019-07-05 13:49:30 -07:00
Kurt
7f186048fb Really fix dex lang flag offset style
c345688f6d

base(x) -> base(x - y) resulted in incorrect offsets for LGPE. Great.
Just make PokeDexLanguageFlags a shift offset instead of absolute;
update all usages.

Closes #2348
2019-07-05 12:16:09 -07:00
pokecal
6b3d6999d1 update MailBoxEditor (#2344)
fixed FRLG offset, etc.
2019-07-04 21:48:18 -07:00
BlackShark
e911363399 added missing GameVersion check (#2340) 2019-06-26 07:11:19 -07:00
Kurt
f35a0d57a8 Fix revised alert message
Closes #2333
2019-06-24 20:50:21 -07:00
Kurt
7104f42f56 Trycatch savefile load, handle bad backups 2019-06-22 18:45:37 -07:00
Kurt
cbd039b18c Extract datasource filtered lists to object
GameInfo has been the storage for the current Game Language environment
When using GameInfo, only one environment is tracked at a time, which is
initialized by the PKM editor (items, moves). Rework things to allow
multiple filtered sources to exist, and keep the filtering logic in
PKHeX.Core for reuse in other programs... ;)
2019-06-22 10:50:32 -07:00
Kurt
32df9f2c39 Update trainer name on import
repop all lul, works
2019-06-20 21:38:06 -07:00
Kurt
e0de0780c7 Add or/as secret base i/o
extracted some logic for oop, works well enough as is without redoing
everything
2019-06-20 21:30:35 -07:00
Kurt
523c36d982 Add qr parse util
used in pkhex.mobile, might as well migrate some logic into core
I'd rather not untangle the decode-api response parsing to use QRUtil.
2019-06-18 20:10:01 -07:00
Kurt
55d486af31 Extract event block diff logic 2019-06-18 18:10:48 -07:00
Kurt
3083b04223 Add all combinations of gameversions
closes #2327
recent refactorings resulted in B/W being returned instead of BW
2019-06-17 20:55:36 -07:00
Kurt
455ab32722 Retain override version on clone
Also hide the pika friend label when YW features hidden #2283
2019-06-09 13:48:51 -07:00
Kurt
1b028198ad
Split gen5-7 saves with inheritance (#2319)
refer to pull request comments for summary
2019-06-08 19:56:11 -07:00
Kurt
de774ed131 readonly ComboItem
create once, never modified after
2019-06-01 19:12:41 -07:00
Kurt
8d781fd167 Simplify sorting to remove linq usage
create custom comparer to do the work
reorder some parameters
simplify gb hm set (All and FindIndex is duplicate work)

only usages of linq remaining are for the bulk action Where filtering
(ok)
2019-05-28 22:55:41 -07:00
Matt
44a257b832 Make Poffin names match in-game text (#2306) 2019-05-14 11:21:34 -07:00
Kurt
091b9e2281 Add g4 poffin editor (misc edits)
Thanks @sora10pls for docs!
https://pastebin.com/jNeVJQi0
2019-05-13 22:56:45 -07:00
Kurt
d4d26fd9b3 Fix eventflag data set to sav
cause:
300ef4d60a
Closes: #2301
2019-05-12 13:23:27 -07:00
Kurt
300ef4d60a Minor simplifications
Use "SetData" method to automatically apply the Edited flag
Use appropriate method for CopyTo
simplify expressions a tad
2019-04-29 17:21:19 -07:00
Kurt
a220970124 Fix wallpaper resource display fetch
CB_BG is the background selection, not the box.
https://twitter.com/yajegamer/status/1120717928322748420
2019-04-23 18:37:51 -07:00
Kurt
5da9051431 More accurate sound option names
Deviating from official option names, reflect the end result instead.
clarity > accuracy
#2283
2019-04-15 15:46:03 -07:00
Kurt
286df71c5a Hide sound type for nonyellow gen1 saves
Closes #2283
Fix label name & update translation file for them
2019-04-15 15:38:49 -07:00
Kurt
2f2512b09c Reduce allocations for checking file write time
FileInfo inherits from FileSystemInfo, which initializes a bunch of
strings that we don't need
this isn't a great optimization, just a fun exercise finding a quicker
approach to get these values
2019-04-05 18:45:59 -07:00
Kurt
bb8cf5d3d8 Simplify get/decrypt pkm access 2019-03-29 19:43:33 -07:00
Kurt
796e836811 Add Settings reset button
force closes program to prevent main form closing event from saving
settings
Closes #2272
2019-03-23 19:05:35 -07:00
Kurt
82a40cb965 Misc updates
add comboitem list to string[]
add regions list as cached comboitem list
lock resource cache on fetch
extract alola time list generating
2019-03-18 21:34:21 -07:00
Kurt
8a08d32dff Simplify pkm constructors
remove Identifier param. 99% of the time, identifier is not provided,
resulting in a useless call

end result:
provide 'create new' and 'create from' constructors
2019-03-16 18:41:56 -07:00
Kurt
13a6d16cb9 Relocate checksum/dexform logic 2019-03-16 12:01:21 -07:00
Kurt
7734e81adf Remove unnecessary bytesperchar check
current.Length will always start right after the terminator data;
shifting further is unnecessary.
#2261
2019-03-07 16:58:19 -08:00
Kurt
61bf82e2bd Add gs event flags
https://projectpokemon.org/home/forums/topic/49717-pkhex-flag-editing/?tab=comments#comment-240804

via pret repo; looks like 2000 event flags, and 0x100 event
consts/work-vals (byte)
add more rebattle toggles
2019-03-05 23:06:05 -08:00
Kurt
a4bf6335a9 Unclamp max date
values above 2100, whatever, let them get saved however they end up
2019-03-05 16:33:54 -08:00
Kurt
8d49400b07 Change SecondsTo* from int to uint
having a year > 2050 can result in a 32bit seconds value (top bit set);
instead of being negative, keep it as a 32bit number.
2019-03-05 15:55:26 -08:00
Kurt
d792c0d3a0 use u/L
use 'u' to denote uint values, so that less IL ops are required
~(21->17) in the case of IVs
no functional change, just a fun exercise looking at generated IL and
finding ways to use less ops
2019-02-23 15:36:26 -08:00
Kurt
5b29e71954 Misc tweaks
no functional change, just rewrite some logic for better flow
fix subform popup count restriction (OwnedForms requires forms to be
added/removed manually; it doesn't automatically update)

sanitize box names when dumping boxes with separate folders (and bad box
names)
2019-02-23 14:58:48 -08:00
Kurt
ca51edbdcf Change sav.LoadBoxes to return int
make MysteryGift specific method flexible so that any IEncounterable
enumerable can be passed.
2019-02-23 14:37:06 -08:00
Kurt
a339cc9289 Extract pouch manipulation logic
add overloads for API syntactic sugar
make ItemConverter internal again
2019-02-22 22:48:34 -08:00