zaksabeast / CaptureSight

Tesla Overlay to view Pokemon game info in Sword, Shield, Brilliant Diamond, Shining Pearl, and Legends Arceus!
GNU General Public License v3.0
156 stars 28 forks source link

Shiny sprites #15

Closed ulucs closed 4 years ago

ulucs commented 4 years ago

This is for #13

I tried passing the pokemon pointers to setPokemonSprite and getPokemonIconPath, but C++ templates seemed to give linking errors despite successfully compiling. So here is a naive version.

The current sprites are inverted placeholders as I'm waiting for /msikma/pokesprite/issues/54 to resolve.

zaksabeast commented 4 years ago

Thank you for the contribution!

Passing in properties instead of the PK8 works well. :+1:

While it makes sense to have one argument carrying all our necessary values, we'd only be able to use this function with a PK8, so future use of this function would be limited. With a template or overloading, this can be mitigated, but we'd either still have restrictions on use or extra code.

This implementation satisfies all our needs without any extra restrictions or code.

If I'm not mistaken, PKHeX has the non-inverted sprites - is there a reason not to use those?

ulucs commented 4 years ago

I checked under https://github.com/kwsch/PKHeX/tree/master/PKHeX.Drawing/Resources/img . It seems PKHeX only has the shiny sprites up to USUM. I think they're also waiting for the Pokesprites update.

To pass the Pokemon pointers, I tried using auto pkm as a parameter (and enabled -fconepts in the Makefile after a gcc warning) to get some kind of duck typing. It compiled, but the linker failed and I'm not proficient in C++ enough to debug those kinds of errors yet. But yes, I agree that this solution is sufficient and simple enough.

It also appears that my naming convention might be wrong (in kwsch/PKHeX/tree/master/PKHeX.Drawing/Resources/img/Shiny Pokemon Sprites , the shiny sprite names end in 's' rather than staring with it), so I'll take another look when the shiny sprites release.

zaksabeast commented 4 years ago

Sounds good - thank you!

msikma commented 4 years ago

I'm still not quite done yet with the Gen 8 shiny Pokémon update, but it's coming. It's just a matter of organizing everything now, since the sprites are done. Some trickery is needed for the SwSh items though, for various reasons. I'll update this topic here when it's done (progress topic here).

zaksabeast commented 4 years ago

Thank you for the update, and the awesome work :slightly_smiling_face:

ulucs commented 4 years ago

I'm closing this pull request because it branched off when there was no overlay, so the logic now belongs in a different place