Commit graph

1107 commits

Author SHA1 Message Date
Kurt
9ef93552c9 Add ability to set swarms for gen3 2021-08-20 20:50:16 -07:00
Kurt
48024f1245 Add Swarm data get/set for gen3-5
#3245
2021-08-20 19:52:31 -07:00
Kurt
bedc52943e Trailing commas
No functional change
2021-08-20 13:49:20 -07:00
Kurt
c6342a163f Minor clean
variable swaps, simplifications
2021-08-20 13:42:25 -07:00
Kurt
c0d748a975 Add Dream World upload slot indicator
Tested & works on bw & b2w2
Thanks Brokemia for the request!
2021-08-16 11:54:03 -07:00
Kurt
9793e9f1a0 Minor clean
Slap on interface for EntreeSlot
De-magic some 💯 numbers to indicate what they're doing
Improve perf of move-match-relearn check
Add an "else" as valid is never both values (history verifier)
2021-08-13 15:36:30 -07:00
Kurt
5ec2b12ae5 Handle some warnings for release build
Unused usings; just make PIDType stuff visible.
2021-08-06 09:41:39 -07:00
Kurt
0f3e5095c5 Replace more linq usage 2021-08-05 22:39:38 -07:00
Kurt
5c472a400d Expand shorthand parameters
int i => int index, or whatever the value is representing.
2021-08-05 20:33:25 -07:00
Kurt
a1f5c76790 Fix pgl jpeg save 2021-08-05 19:38:47 -07:00
Kurt
59d480c834 Minor tweaks
Discard empty pkm files (species 0) when loading boxes or templates
Add more xmldoc
Simplify some method parameter names for readability
2021-08-05 17:05:39 -07:00
Kurt
cc0397f087 Misc tweaks
Improved readability
2021-08-05 15:18:43 -07:00
sora10pls
bfcf081e5b Fix XY multiplayer sprite display
Reorder enums; Serena before Calem
2021-08-05 16:22:06 -04:00
Kurt
1efebe51d3 Simplify Country/Region/ConsoleRegion to byte from int
Only exists in gen6/7 games.
2021-08-02 19:43:57 -07:00
sora10pls
3fdf1396aa Update TrainerFashion6 structure
Rename EyeShadow => Eyeliner, fixes labeling for fields and getters for lip color and freckles data
2021-07-31 16:00:10 -04:00
Kurt
0c6254835d Add battle agency slots to main window misc viewables 2021-07-26 23:57:05 -07:00
Kurt
4ed0e30ace Minor tweaks
Muh infinitesimally small perf gainz found while waiting for next dota match
2021-07-26 23:33:56 -07:00
Kurt
c9640f8561 Comments: forme->form 2021-07-26 14:14:39 -07:00
Kurt
9c8bee19ca Gen5: Add give all musical props, b/w entree level changing
Abstract some things into their parent save block structure.
2021-07-25 23:44:03 -07:00
Kurt
a6176dc3d0 Add fused & gts slot indications for gen5 2021-07-24 17:23:58 -07:00
Kurt
4ee72b0020 Extract pass power enum from gui logic 2021-07-21 00:58:09 -07:00
Kurt
46f50a3a56 Use named consts for magic gender values
More personal magic value comparisons
2021-07-13 18:22:04 -07:00
Kurt
f5090e3ae7 Fix cgear png import
Closes #3231

Symptoms observed:
- Tiles were too dark (not high enough RBG value due to >>3; keep 8bit color here.
- Red/Blue channel inverted, swap R & B. Works? Hope this isn't something related to png storing rgb vs bgr and we'd need to check input pixel format?
- Tiles were misplaced slightly, off by 1. Fix order of operations so that the tile choice value is correct.
2021-07-10 19:32:10 -07:00
Kurt
3fa311f6ed Misc tweaks
more annotations - all bool->out ? are annotated now
fix gender symbol inversion (forgot to set text)
extract some methods to reduce nesting
2021-07-06 08:42:15 -07:00
Kurt
de8e855116 Replace MC->MemoryCard
Simplify some interactions to be more clear
2021-07-05 14:32:09 -07:00
Kurt
103aa9aa4b
Revise EncounterArea and EncounterType for clarity (#3228)
EncounterArea now stores a more specific type'd array for encounter slots. Better iteration and less casting, as the nonspecific `Slots` fetch is rarely referenced.

EncounterType renamed to GroundTile to reflect how it actually works in Gen4. Was previously an ambiguous field that was clarified a little; we can describe it a little better now. Keep the GUI the same to not scare the end users.

Change Trash Byte properties to get/set a Span. Trash Byte legality checking easier on the garbage collector?
2021-06-29 20:58:06 -07:00
Kurt
9cd617708d Fix const size reference (same value)
Same value, but different name. Cosmetic, but prevents future confusion.
2021-06-29 16:04:05 -07:00
Kurt
595966b090 Improve range checks 2021-06-24 23:48:35 -07:00
Kurt
49488bb503 Use invariant culture for ToUpper/ToLower
Turkish is quite the language; let's try to prevent any errors down the road for internal/game string case changes.
2021-06-24 09:16:36 -07:00
Kurt
3e7775fc44
Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately (#3222)
* Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately

Don't store within the object, track the slot origin data separately.

Batch editing now pre-filters if using Box/Slot/Identifier logic; split up mods/filters as they're starting to get pretty hefty.

- Requesting a Box Data report now shows all slots in the save file (party, misc)
- Can now exclude backup saves from database search via toggle (separate from settings preventing load entirely)
- Replace some linq usages with direct code

* Remove WasLink virtual in PKM

Inline any logic, since we now have encounter objects to indicate matching, rather than the proto-legality logic checking properties of a PKM.

* Use Fateful to directly check gen5 mysterygift origins

No other encounter types in gen5 apply Fateful

* Simplify double ball comparison

Used to be separate for deferral cases, now no longer needed to be separate.

* Grab move/relearn reference and update locally

Fix relearn move identifier

* Inline defog HM transfer preference check

HasMove is faster than getting moves & checking contains. Skips allocation by setting values directly.

* Extract more met location metadata checks: WasBredEgg

* Replace Console.Write* with Debug.Write*

There's no console output UI, so don't include them in release builds.

* Inline WasGiftEgg, WasEvent, and WasEventEgg logic

Adios legality tags that aren't entirely correct for the specific format. Just put the computations in EncounterFinder.
2021-06-22 20:23:48 -07:00
Kurt
394c5c2c95 Minor clean
Shed some unused code
2021-06-15 20:00:51 -07:00
Kurt
0686922d5c Rewrite gen6ao secret base handling, i/o, GUI
Closes #3177

Format sizes are now accurate to game structure sizes. Added a few more editable fields, rid of label/textbox/etc for general base editing -- use a PropertyGrid instead.

Feels nice having a bank of saves to reference + idb to discover the struct layout.
2021-06-13 00:38:47 -07:00
Kurt
6029c15521 Fix incorrect GameVersion reference 2021-06-09 22:56:19 -07:00
Kurt
f529fd1432 Add xmldoc, split out some operations 2021-06-07 20:03:14 -07:00
Kurt
c98717bdc0 Fix namespaces 2021-06-06 23:34:15 -07:00
Kurt
871de4e213 Add more xmldoc 2021-06-06 11:56:54 -07:00
Kurt
6ee67e624d Update gen2/3 setdex's too 2021-06-04 17:29:55 -07:00
Kurt
d30e00ffbe Clean up SetDex guard clauses
add egg checks for gen4-6/8, group species bound checks
2021-06-04 17:26:06 -07:00
Kurt
7ee60d9e98 Update Zukan4.cs
Set seen after gender-seen, as we check seen in that method (first or second seen gender).
2021-06-04 17:19:12 -07:00
Kurt
3a1fbc9b88 Don't pass key byref
Pass byval and return the result; emits less IL
mark for inlining
2021-06-04 14:19:07 -07:00
Kurt
041074f26c Decrypt sav8 blocks in-place
Removes 1.5MB of allocation; we don't need to preserve the encrypted state.

Revise savefile clone operation to use its own constructor, as we need to call the base constructor first (backup file clone...) prior to decrypting.

Expose CryptStaticXorpadBytes as GetDecryptedRawData no longer exists.
2021-06-04 13:16:00 -07:00
Kurt
066aedfc21 Separate scblock ctor's
No longer need to set byte[] twice
Add value-setter checks for bad mutations (size change, bool1<->bool2 only)
2021-06-03 12:35:39 -07:00
Kurt
8c970ec991 Minor tweaks
no functional change, readability++
add more xmldoc
2021-06-03 12:04:19 -07:00
Kurt
138501da2f Minor clean
Condense some expressions
Use less linq
Rename some fields
2021-05-29 15:31:47 -07:00
Kurt
236fd2943f Add hgss pokewalker stored pk4 fetch
ty atrius
2021-05-25 10:07:14 -07:00
Kurt
b2e4ca393b Minor perf improvements
GetHexStringFromBytes: don't allocate temp slice array on heap
Tile: Span Slice toarray rather than new+copy
2021-05-23 10:56:25 -07:00
Kurt
15afd6f3bc Move mail get to sav obj 2021-05-22 09:28:04 -07:00
Kurt
96115916b2 Prevent overflow of memo write
Setting too many invalid entries will bloat above 500, so clamp the max.

Preallocate entries size rather than 4 always
2021-05-22 09:27:46 -07:00
Kurt
74e0cba3b0 Minor tweaks
use assert instead of manual exceptions
span
remove some dead logic
2021-05-18 16:16:48 -07:00
Kurt
215b1c6e23 Remove whitespace 2021-05-18 13:33:13 -07:00
Kurt
2c820bfbe9 Minor tweaks 2021-05-18 13:29:55 -07:00
Kurt
ae0b2f13ea Fix erroneous value setters 2021-05-18 13:12:43 -07:00
Kurt
2d8d3e04fc Move mxyz to subclasses 2021-05-18 13:04:23 -07:00
Kurt
2b25cd1e18 add notes for oras endscroll data
https://projectpokemon.org/home/forums/topic/49356-battle-chateau-help-well-not-really/?do=findComment&comment=266428
2021-05-15 01:46:33 -07:00
Kurt
acdbda4e12 Split DateUtil from Util class 2021-05-14 16:46:48 -07:00
Kurt
3ac1882151 Move BinaryCodedDecimal conversions to separate class
Add unit tests, clarify names
2021-05-14 16:32:26 -07:00
Kurt
50b15cd740 Use range/index
More in line with modernizing the codebase with latest c# syntax

improve web-qr decode speed slightly (no linq skiptake)
get money/coin mask without a temporary string (lol performance)
2021-05-14 15:30:55 -07:00
Kurt
871f9b0627 Convert checksum operations to span-based
Fix SAV.Data references in SAV_Misc4 to use the General block instead
2021-05-14 12:30:40 -07:00
Kurt
b9d9766674 Fix typos, update block list notes 2021-05-14 12:16:08 -07:00
Kurt
07584a8774 Add chateau score, seaside cycle score
Update some other areas too
looks like this fixes the sube pkx fetch method for extraslots, yay.
2021-05-13 23:12:53 -07:00
Kurt
d340642b09 Minor perf improvements 2021-05-10 01:01:45 -07:00
Kurt
8e9953dc0f Keep festaID separate from nex ID bytes 2021-05-09 23:38:14 -07:00
Kurt
ceede68861 Minor tweaks 2021-05-07 22:11:10 -07:00
Kurt
31142ee297 Replace some linq usage with direct logic 2021-05-06 23:26:38 -07:00
CanoeHope
c1cce9a892
Correct Colosseum/XD Item Quantities (#3203)
* Update SAV3Colosseum.cs

* Update SAV3XD.cs
2021-04-28 16:55:37 -07:00
CanoeHope
747d6ed6c7
Fix Colosseum/XD Max Money (#3202)
* Update SAV3Colosseum.cs

* Update SAV3XD.cs
2021-04-28 11:58:26 -07:00
Lusamine
e5867ce512 Add NormalEncountRigel2 block and Pokedex Rec block 2021-04-23 17:41:54 -05:00
Kurt
b89c4fb17f Database load on invalid party counts 2021-04-21 18:33:57 -07:00
Kurt
25565e6f07 More pattern matching expressions
Shapes are fancy; nested pattern checks
2021-04-20 02:17:28 -07:00
Kurt
c67e01849a Extract 3ds chinese glyph remapping, only do on 3DS games
Optimize some functions within gen7zh for perf (no linq, no allocation)
2021-04-18 18:29:02 -07:00
Kurt
8e52d2fddb Xmldoc updates 2021-04-17 13:07:28 -07:00
Kurt
0d45075d4b
Rewrite settings handling; enhance some user experiences (#3193)
- Settings now stored as json next to exe
- Settings now exposes all legality checking setttings that can be changed
- Slot hovering now can play cries in MGDB/PKMDB/etc, not just the main boxes.
- Enhanced hover text for mystery gifts and encounters that have movesets
- Show recently loaded save files in ctrl-f browser
- Toggle auto-load savefile setting to be none/detect-latest/last-loaded
- Custom extensions & extra backup paths can now be configured directly in the json settings
- Settings editor now uses propertygrid & tabs.
2021-04-11 18:09:54 -07:00
Kurt
c7b997865c Minor clean 2021-04-09 14:52:49 -07:00
Kurt
b0700ba281 Extract Gen7 HoF class, extend event flag count
4k flags exactly, and probably 4950 for USUM (alignment +1 byte for an even 4960)

The old flag + count (4 bytes total) are just +32 event flags.
2021-04-07 00:20:02 -07:00
Kurt
223b56d779 Fix gen3 save incorrect destination writes 2021-04-05 22:28:04 -07:00
Kurt
8c4ca3134a Fix Gen3 coin get/set 2021-04-04 11:53:55 -07:00
Kurt
1348f5deec Allocate smaller buffers for gen3 sav objects
n*0xF80 instead of n*0x1000
2021-04-02 14:57:30 -07:00
Kurt
cdc9710869 Fix gen3 record get/set
FR and LG are separate version IDs now
2021-04-01 14:15:11 -07:00
Kurt
a92f92e1c5 Fix gen3 TMHM pouch 2021-04-01 14:14:47 -07:00
Kurt
1e38f55007 Fix changes not being saved completely 2021-04-01 13:43:06 -07:00
Kurt
4700fdd1e3 Set updated version when resetting personal
Closes #3180

Improves handling for corrupt gen3 saves (pokedex cheaters)
2021-04-01 13:37:39 -07:00
Kurt
5c9ce494cf Minor perf improvements
Defer some value assignments
Pass already known values directly
Pass static references to reduce allocating small duplicate objects
2021-03-30 18:51:53 -07:00
Kurt
645f2b4db5 Revert implicit casting
Looks like netstandard2.0 wasn't meant to receive that new c#9 goodie
2021-03-29 00:14:44 -07:00
Kurt
f59d012cda Add gen3 battle video class
Just supports importing dumps (via code), and the GUI supports loading the party data to boxes like the other supported battle video formats.
2021-03-27 23:22:56 -07:00
Kurt
0190098e47 Gen3: Add methods to get/set external event data 2021-03-27 18:58:51 -07:00
Kurt
0c1d13bf4d Minor tweaks
Lift some temporary arrays for more reuse
reuse some temp references
less allocation overall
2021-03-23 23:10:30 -07:00
Kurt
3822981590
Rework EncounterCriteria to be ability indexed rather than direct ability (#3179)
* Exploration: rework ability criteria to ability numbers desired

* Sync remaining changes

* Update EncounterCriteria.cs

* Add xmldoc

* Improve speed of IsDualGender check

* More xmldoc updates

Should be doing this on main but meh, this branch is gonna get merged later

* Fix typo

* Update WC7.cs

* Update PersonalInfo.cs
2021-03-23 17:05:15 -07:00
Kurt
8d3f990667 Make some properties into consts 2021-03-20 12:47:21 -07:00
Kurt
27cdcb8b0c Simplify SAV3 loading
Remove hardcoded chunk lengths array
Remove cached chunk index array
Handle new-game files correctly (all blocks present check).
Consistently call things sector instead of chunk or block.

Somehow there was a bug with my FRLG save file's box data, which now loads completely?? Neat
2021-03-16 23:32:16 -07:00
Kurt
3b344bd5c3 Add batrev as a blank sav option via code 2021-03-16 18:49:27 -07:00
Kurt
98a80b4bf1 Fix party offset swap 2021-03-16 18:48:33 -07:00
Kurt
33e2c64721 Split SAV3 into version classes
Begone are the version-switch cases for value fetching.
2021-03-15 23:51:58 -07:00
Kurt
6bce4eea14 Minor clean
Annotations (nullable), some switch cases for readability
2021-03-14 16:16:55 -07:00
Kurt
649958ee68 Move EReader berry names from tables to settings class 2021-03-14 10:16:09 -07:00
Kurt
155e0283ce Inline some string logic, extract magic values, xmldoc 2021-03-09 21:31:53 -08:00
Kurt
e32bfcde2e Minor simplifications
Extract RSBOX checksum logic to checksum class
Allocate half as much for gen3 save detect
Simplify some expressions for GC save loading (x - size + offset, when x==size)
2021-03-08 11:39:15 -08:00
Kurt
49541e6073 Rework mainline sav3 to not operate off chunks
Previous style was to resize the sav buffer and concat all the storage chunks at the end. Allocated a double save file.

Now, just allocate 3 buffers.
2021-03-07 23:22:07 -08:00
Kurt
2826049e32 Add boxes unlocked & secret box toggle
ty @sora10pls
use box layout editor to change values (0-32 and toggle the flag)
2021-03-02 21:28:53 -08:00
sora10pls
94597b84e0 Increment Total Battle/Poké Ball usage records on set
Closes #3158
2021-02-24 11:12:59 -05:00
Kurt
41096fb56e Minor xmldoc / usage updates 2021-02-21 15:01:28 -08:00
Kurt
c11cf3d6d4 Extract gen4 pokedex logic 2021-02-21 09:59:10 -08:00
Kurt
4e92195b80 Add custom save type loading (hacks)
plugin adds a reader -> reader checks if it is a non-PKHeX.Core save type (they'd implement their own savefile/etc type) -> returns a matching save object if so

basically bypasses the base PKHeX logic
2021-02-13 01:53:38 -08:00
Kurt
6e4908b21e Simplify a little
path.getfilename will never return null unless you pass null, which we don't do

setchecksums' base method does the AllBlocks.SetChecksums. move the battle team set to right before the usage of SetChecksums
2021-02-13 01:38:09 -08:00
Kurt
c8d815dc59 Shift gen6 event flags to their actual index (+0xC*8) 2021-02-12 20:08:54 -08:00
Kurt
666a1805ba Relocate formargument logic 2021-02-08 20:42:19 -08:00
Kurt
37cb15749e Update FormArgument handling for gen6/7
Disassociate pk4/pk6 backing byte[] when converting to pk5|pk7, as we no longer make a copy of the byte[] in the pkm's constructor.

Change UpdatePKM to include isParty, as we want it optional to update FormArgument too.

Change FormArgument saving to be handled by FormConverter; kinda not really good to have it there, but nothing else is handling FormArgument values.

Expand IFormArgument to have all FormArgument values exposed. "Maximum" is furfrou only.
PK6: Max is in the "FormArgument" u32, and the remain/elapsed is in party stats (hence the reverting when boxed)
PK7: u8 remain, u8 elapsed, u8 max, u8 unused.
PK8: assumedly the same as PK7, given the disassembly hints that it's the same as past games (even though Furfrou and Hoopa are not in SWSH).
2021-02-08 20:26:53 -08:00
Kurt
61266e3d49 Use popcount when appropriate 2021-02-07 21:47:43 -08:00
Kurt
8dacc2f63e Clean up memcard handling a little 2021-01-30 16:45:08 -08:00
Kurt
1e86fdcea8
Fracture the encounter matching checks to allow progressive validation (#3137)
## Issue

We want to discard-but-remember any slots that aren't a perfect fit, on the off chance that a better one exists later in the search space. If there's no better match, then we gotta go with what we got.

## Example:
Wurmple exists in area `X`, and also has a more rare slot for Silcoon, with the same level for both slots. 
* We have a Silcoon that we've leveled up a few times.

Was our Silcoon originally a Wurmple, or was it caught as a Silcoon? 
* To be sure, we have to check the EC/PID if the Wurmple wouldn't evolve into Cascoon instead.
* We don't want to wholly reject that Wurmple slot, as maybe the Met Level isn't within Silcoon's slot range.

---

Existing implementation would store "deferred" matches in a list; we only need to keep 1 of these matches around (less allocation!). We also want to differentiate between a "good" deferral and a "bad" deferral; I don't think this is necessary but it's currently used by Mystery Gift matching (implemented for the Eeveelution mystery gifts which matter for evolution moves).

The existing logic didn't use inheritance, and instead had static methods being reused across generations. Quite kludgy. Also, the existing logic was a pain to modify the master encounter yield methods, as one generation's quirks had to not impact all other generations that used the method.

---

The new implementation splits out the encounter yielding methods to be separate for each generation / subset. Now, things don't have to check `WasLink` for Gen7 origin, because Pokémon Link wasn't a thing in Gen7.

---

## Future
Maybe refactoring yielders into "GameCores" that expose yielding behaviors / properties, rather than the static logic. As more generations and side-gamegroups get added (thanks LGPE/GO/GameCube), all this switch stuff gets annoying to maintain instead of just overriding/inheritance.

## Conclusion

This shouldn't impact any legality results negatively; if you notice any regressions, report them! This should reduce false flags where we didn't defer-discard an encounter when we should have (wild area mons being confused with raids).
2021-01-29 17:55:27 -08:00
Kurt
edfb8fc2ff Add TID/SID fetch for Battle Revolution
Can unlock boxes by setting a nonzero TID/SID

https://projectpokemon.org/home/forums/topic/36582-pok%C3%A9mon-battle-revolution-save-research-thread/?do=findComment&comment=221812
ty Akunoko
2021-01-22 22:55:55 -08:00
Kurt
5abd61816f Add gamesync interface for gen7
oops; gamesync ID now shows up as intended
2021-01-22 19:04:54 -08:00
Kurt
06e6242944 Update SAV4BR.cs
Uses Big Endian unicode for savefile strings, but pkm strings are big-endian-g4
2021-01-20 22:13:59 -08:00
Kurt
803b8675fe Rework batrev current slot handling
Show all slots even if they're uninitialized. Empty first slots but present second slots caused errors on init.
2021-01-20 20:29:26 -08:00
CanoeHope
121ae9b611
Rename SWSH blocks and update Chinese HGSS Event Constant (#3131)
* Update TrainerCard8.cs

* Update SaveBlockAccessor8SWSH.cs

* Update const_hgss_zh.txt
2021-01-19 12:46:54 -08:00
Kurt
b5c30193fa Set initial capacity for stringbuilder to reduce reallocation
Default capacity is 16 so it's rarely an issue, but sometimes we don't need that much.

Update xmldoc for more clarity
2021-01-16 17:31:05 -08:00
Kurt
613e6db744 Use StringConverter api consistently; use stringbuilder when possible
Retain a stringbuilder to mutate the string rather than finalizing temporary strings

yields some speed improvements (less gen0 string objects allocated)
2021-01-14 22:50:13 -08:00
Kurt
6566b0ed1f Add Pokedex flag properties
Closes #2954 ; can set directly from propertygrid already, but might as well clean things up a little bit to match the disassembly logic.

Open the simple editor center parent rather than next-form-position
2021-01-09 23:27:22 -08:00
Kurt
2deb51b365 Minor optimization for hashing
don't use FIPS compliant hashing methods explicitly, no real reason to. hash.Create() will select managed vs csp depending on the framework/core and reg flags.
add >net46 incremental hash logic for swsh
remove static sha256 instance (single threaded overkill)
2021-01-08 00:32:04 -08:00
Kurt
86d80a7d0b Minor perf improvement for advancing keys
Further improvements can be made if there's a way to have a union struct (4 u16s, lumped u64) that has a simple 4bit diagonal mirror operation on it. Can be at least twice as fast.

Benchmarking with optimizations shows about 80-90% of the prior time taken, so at least a 10% speed optimization

Rarely used, was fun to try and optimize a little more.

Eliminate bounds checks by accessing/setting the highest element, and only index twice instead of 6x.
Eliminate u16 casts by leaving as int type (same result)
Eliminate temp value caching and instead directly write to storage. (no more _0123).

End result looks neat too, since the >> 0's removed looks like a diagonal, like the nibble rotation :D
2021-01-07 20:50:28 -08:00
Kurt
1138cd44bc Minor rearranging 2021-01-07 18:05:21 -08:00
Kurt
19d40f61f5 Move save crypto types to focused folder 2021-01-07 16:01:34 -08:00
Kurt
f615814548 Add xmldoc, increase swish util flexibility 2021-01-07 15:34:26 -08:00
Kurt
5554651951 Mark scxorshift32 and xoro128p as ref structs
Prevents passing them as args, as intended. These are self mutating structs
2021-01-07 15:33:42 -08:00
Kurt
1c19bc86f4 Preallocate some holding objects to prevent doubling allocations
Saves 12 doubling reallocations for new List to hold blocks
Saves 21 for the memorystream on writing
2021-01-07 09:37:27 -08:00
Kurt
6e741a0cf0 Minor tweaks
Add xmldoc
Remove linq from memecrypto code (speed lmao)
Hide some methods that shouldn't be called directly
Name variables better for accessor const's
2021-01-06 23:30:30 -08:00
Kurt
9718d1d2aa Add save handler abstraction for detecting atypical save formats
GCI, DSV, DUC are already supported, so I've written the abstraction for those and seed the Handler list on startup.

Can add a new class with recognition via SaveUtil.Handlers.Add(myHandler);
2021-01-06 15:46:43 -08:00
Kurt
373aecdf7c Merge GO IV checks, behavior is now correct
Rename IV1/2/3 to HP/ATK/DEF in gp1 structure
2021-01-05 09:39:50 -08:00
Kurt
cc43550357 Simplify more expressions 2021-01-04 17:31:43 -08:00
Kurt
ad48f4e909 Set languageID if present for sav
Lowercase the "SAV" variable too
2021-01-04 16:28:46 -08:00
Kurt
cbc57dc794 Force sav1 BU to init as japanese 2021-01-04 15:18:16 -08:00
Kurt
0ab3493335 Skip save sub-type detection if we already it 2021-01-03 18:11:59 -08:00
Kurt
730640decc Minor clean 2021-01-03 16:53:13 -08:00
Kurt
f785231692 Fix backup filenaming 2021-01-02 10:34:33 -08:00
Kurt
09089da14e Use more expression return style
Reduces indentation & bracketing, a bit more concise
2021-01-01 17:08:49 -08:00
Kurt
1d22b74970 Remove unused block class
Copied from Gen7b, swsh is just a key,value list
2021-01-01 16:57:18 -08:00
Kurt
7523e0e200 Make ContestStat fields byte (from int) 2021-01-01 13:39:08 -08:00
Kurt
f4bf9dd208 Minor clean
add download count to changelog
move 2019 changelog to uncompiled resource (for record)
2020-12-31 10:36:09 -08:00
Kurt
2af9e800fb Add RotomAffection and rotoloto1/2 flag editing to GUI 2020-12-29 11:39:19 -08:00
Kurt
d9a4eacaf4 Allow deactivating all raids 2020-12-29 10:53:47 -08:00
Kurt
e8c23f6644 Simplify some repeated comparisons with expressions
Less prone for bugs since it uses the same value for all comparisons without re-specifying
2020-12-29 00:37:59 -08:00
Kurt
c119f18af3 spec->species 2020-12-28 22:22:52 -08:00
Kurt
ee5349ff98 moar is or 2020-12-25 12:30:26 -08:00
Kurt
4a8a495d04 Condense some switch expressions
Should be it for now; exhaustively searched for all that made sense to change
2020-12-25 10:58:33 -08:00
Kurt
43dd390f21 Split IContestStats, mark trades as records 2020-12-24 00:06:40 -08:00
Kurt
93910df2c6 Use new switch statements 2020-12-23 17:14:38 -08:00
Kurt
324ce9d6ac Minor clean 2020-12-23 09:34:29 -08:00
Kurt
e34c8df044 Revise some method signatures 2020-12-22 20:50:33 -08:00
Kurt
997e0751f3 Minor clean
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
514b60b447 Merge type check with usage in if statements
if x is y with z property true, then :D
2020-12-21 22:33:48 -08:00
Kurt
594db92ad0 Minor clean
Handle some stragglers
2020-12-21 17:48:08 -08:00