Commit graph

114 commits

Author SHA1 Message Date
Kurt
66e8bf2645 Update 24.07.03
Update wc9 pkl
update dependencies (qrcoder got some perf improvements)
deduplicate HOME tracker message in SV by consolidating the methods
2024-07-02 23:51:10 -05:00
Kurt
899ee63434 Update dependencies 2024-05-17 22:55:11 -05:00
Kurt
10c5adadb8 Misc tweaks
Add more xmldoc
Move files/functions to better spot
Less allocation on hover glow
fix honeytree dppt group/slot/shake rand call (ty real.96)
2024-02-03 14:11:17 -06:00
Kurt
d47bb1d297
Update .NET Runtime to .NET 8.0 (#4082)
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
2023-12-03 20:13:20 -08:00
Kurt
f632aedd15
Encounter Templates: Searching and Creating (#3955)
We implement simple state machine iterators to iterate through every split type encounter array, and more finely control the path we iterate through. And, by using generics, we can have the compiler generate optimized code to avoid virtual calls.

In addition to this, we shift away from the big-5 encounter types and not inherit from an abstract class. This allows for creating a PK* of a specific type and directly writing properties (no virtual calls). Plus we can now fine-tune each encounter type to call specific code, and not have to worry about future game encounter types bothering the generation routines.
2023-08-12 16:01:16 -07:00
Kurt
d2bed713e4 Change Totem sprite indication to orange aura
Closes #3880

Co-Authored-By: Jonathan Herbert <3344332+foohyfooh@users.noreply.github.com>
2023-05-12 14:57:32 -07:00
Kurt
88830e0d00
Update from .NET Framework 4.6 to .NET 7 (#3729)
Updates from net46->net7, dropping support for mono in favor of using the latest runtime (along with the performance/API improvements). Releases will be posted as 64bit only for now.

Refactors a good amount of internal API methods to be more performant and more customizable for future updates & fixes.

Adds functionality for Batch Editor commands to `>`, `<` and <=/>=

TID/SID properties renamed to TID16/SID16 for clarity; other properties exposed for Gen7 / display variants.

Main window has a new layout to account for DPI scaling (8 point grid)

Fixed: Tatsugiri and Paldean Tauros now output Showdown form names as Showdown expects
Changed: Gen9 species now interact based on the confirmed National Dex IDs (closes #3724)
Fixed: Pokedex set all no longer clears species with unavailable non-base forms (closes #3720)
Changed: Hyper Training suggestions now apply for level 50 in SV. (closes #3714)
Fixed: B2/W2 hatched egg met locations exclusive to specific versions are now explicitly checked (closes #3691)
Added: Properties for ribbon/mark count (closes #3659)
Fixed: Traded SV eggs are now checked correctly (closes #3692)
2023-01-21 20:02:33 -08:00
Kurt
03182ebd3d Update 22.11.24
Adds support for Scarlet & Violet.

Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-11-24 17:42:17 -08:00
Kurt
186b2f2396 Update dependencies 2022-10-25 13:24:37 -07:00
Kurt
ba53f4a7bc Extract common csproj properties 2022-10-15 17:09:54 -07:00
Kurt
681756caf1 Minor perf improvement to write 1x instead of 4x 2022-05-08 13:02:24 -07:00
Kurt
47071b41f3
Refactoring: Span-based value writes and method signatures (#3361)
Existing `get`/`set` logic is flawed in that it doesn't work on Big Endian operating systems, and it allocates heap objects when it doesn't need to.

`System.Buffers.Binary.BinaryPrimitives` in the `System.Memory` NuGet package provides both Little Endian and Big Endian methods to read and write data; all the `get`/`set` operations have been reworked to use this new API. This removes the need for PKHeX's manual `BigEndian` class, as all functions are already covered by the BinaryPrimitives API.

The `StringConverter` has now been rewritten to accept a Span to read from & write to, no longer requiring a temporary StringBuilder.

Other Fixes included:
- The Super Training UI for Gen6 has been reworked according to the latest block structure additions.
- Cloning a Stadium2 Save File now works correctly (opening from the Folder browser list).
- Checksum & Sanity properties removed from parent PKM class, and is now implemented via interface.
2022-01-02 21:35:59 -08:00
Kurt
aa968f56aa File scoped namespace for drawing projects
Extract color util to separate class as it's not entirely image related.
2021-12-10 00:15:04 -08:00
Kurt
ba92024e54 Bump the net5 build to net6 2021-12-04 22:29:32 -08:00
Kurt
bc809af06c Split PKHeX.Drawing into subprojects
Allows trimmed dll usage by keeping pkm sprites in one project, and all other cosmetic UI stuff in another project
2021-11-27 15:48:08 -08:00
sora10pls
8bce248d95 Crop BDSP Box Wallpapers, re-tile Grass, and fix off-by-one 2021-11-26 22:11:54 -05:00
Kurt
723514e89c
Update 21.11.19 - Brilliant Diamond & Shining Pearl (#3289)
Big thanks to @SciresM @sora10pls @Lusamine @architdate @ReignOfComputer for testing and contributing code / test cases. Can't add co-authors from the PR menu :(

Builds will fail because azure pipelines not yet updated with net6.
2021-11-19 18:23:49 -08:00
Kurt
b77a197b74 Add optional EXP stripe toggle for sprite draw
helps visual identification of suspect EXP values
2021-11-07 14:48:59 -08:00
sora10pls
f23490f02a Update some Kanto sprites and Shiny Combusken
See: https://github.com/msikma/pokesprite/issues/106
Co-Authored-By: Michiel Sikma <mike@letsdeliver.com>
2021-11-02 11:58:02 -04:00
Kurt
5424600369 Shift gen4 arceus form sprites (curse type) 2021-09-06 11:21:59 -07:00
Kurt
de2d3a43be Add toggleable setting for encounter background types
Fine archit and matt, have it whichever way you want :)
2021-08-24 19:52:06 -07:00
Kurt
2a9f3585e5 Change background coloring to bottom-stripe 2021-08-24 16:11:48 -07:00
Kurt
a121f4d617 Add optional box slot coloring, add settings 2021-08-24 14:21:35 -07:00
Kurt
6e3bcd5b66 Encounter visualization: Show ball and differentiate visually 2021-08-24 14:03:20 -07:00
Kurt
bedc52943e Trailing commas
No functional change
2021-08-20 13:49:20 -07:00
Kurt
2f9b175cd2 Show gmax for encounters in encdb 2021-08-14 17:16:53 -07:00
Kurt
c5919dbec4 Show gmax X like pkm atop a mystery gift sprite 2021-08-14 17:07:23 -07:00
Kurt
44589e6fbb Minor tweaks
use switch expr for auto-backup load
trycatch plugin activator (just in case)
extract dialog prompt for easier reading
remove dead method
2021-08-13 15:37:21 -07:00
Kurt
bd826eef5c Show trainer sprites gen6 2021-08-05 13:11:50 -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
6b6a517214 Add xmldoc
Add some xmldoc to summarize recent changes to these properties.

See:
Co-Authored-By: LukeThe <54759100+LukeThe@users.noreply.github.com>
#3213
#3215
2021-06-10 18:14:38 -07:00
Kurt
f266b4f686
Crop Item sprites, Layer with adjusted X coordinate (#3215) 2021-06-10 18:07:26 -07:00
sora10pls
ba9e917647 Display typed sprites for Arceus/Silvally formes 2021-05-28 19:22:50 -04: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
aaa69eac15 Rename Gen3 Champ ribbon to be more accurate
been like this since mid 2016

this ribbon can be obtained in either Hoenn or Kanto within Gen3
https://bulbapedia.bulbagarden.net/wiki/List_of_Ribbons_in_the_games#League_Ribbons
2021-04-10 12:09:43 -07:00
Kurt
b3b60894b6 Remove 40x30 sprite assets
Farewell; let's assume things are 68x56 from now on.
2021-04-09 16:24:19 -07:00
sora10pls
3784ab39fc Update Shiny Ho-Oh sprite 2021-03-24 10:55:31 -04: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
09089da14e Use more expression return style
Reduces indentation & bracketing, a bit more concise
2021-01-01 17:08:49 -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
cce4d80419 Update nuget packages 2020-12-26 09:28:00 -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
sora10pls
c5d59d392e Update SWSH Box Wallpapers
It turns out that Pokémon HOME has pre-colored Box Wallpaper patterns in its assets... for some reason?
These new tiled wallpapers have much more vivid colors, which look a lot nicer now.
2020-12-23 14:24:31 -05: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
63aa8dcd43 Bump langver to 9 for other subprojects 2020-12-21 19:12:24 -08:00
Kurt
6d030831ab Bump PKHeX.Core to C#9 language version
Add FrameworkUtil.cs which is compiled if the build isn't net5+, needed to support init setters & records
2020-12-21 16:52:11 -08:00
Kurt
62018cce1a Unify concepts with different names
AltForm & Form & Forme => Form
GenNumber & Generation => Generation

Extract out SpeciesForm interface, and re-add IGeneration

For those using PKHeX as a dependency, this should be a pretty straightforward manual replacement... GenNumber and AltForm should be quick find-replace`s.
2020-12-10 20:42:30 -08:00
Kurt
05a3753404 Fix 40x30 cosplay sprite fetch
Closes #3102

#2966
2020-12-05 06:29:28 -08:00