Commit Graph

23 Commits

Author SHA1 Message Date
Philippe Symons
3d86aa80f5 Merge remote-tracking branch 'origin/main' into feature/add-support-for-localized-versions 2024-12-06 16:06:49 +01:00
Philippe Symons
f31f31deff
Feature/integrate resetrtc (#2)
* Move resetRtc functionality to libpokemegb

I'll need to use it in 2 places in PokeMe64 and this will allow me to reuse code

* Forgot to commit this line
2024-12-06 16:05:54 +01:00
Philippe Symons
8beada932b Fix bug
When Gen1GameReader is triggering the language detection automatically, the
Gen1IconDecoder instance is not updated with the detected language
2024-11-21 21:51:01 +01:00
Philippe Symons
e3ae0845c9 Streamline the Gen I localization code to be structured similarly to the gen II's 2024-11-21 21:32:02 +01:00
Philippe Symons
a61b727023 Add support for the gen II localizations
Note: for Korean games, specifically, I did not implement the Korean character set
(nor do I plan to)

The reason is that it is entirely different and more complex to implement than the other
character sets. I'm not personally invested nor interested enough to go through the hassle.

This affects the pokémon names that will be displayed when using libpokemegb. Instead as
a fallback, it will return "poke-<number>" for these roms.

Feel free to contribute proper Korean character set (and pokémon names) support!
2024-11-20 23:46:27 +01:00
Philippe Symons
0f56da84b6 Add gen1_determineGameLanguage() and use it automatically in Gen1GameReader if not specified in the constructor 2024-11-15 12:34:33 +01:00
Philippe Symons
3065163b1b Add support for gen I localizations
There currently is no way to automatically detect the localization yet though.
2024-11-14 21:16:57 +01:00
risingPhil
bd518d0d87 Fix GameReader::decodePokemonIcon() API inconsistency in relation to decodeSprite() 2024-09-25 22:15:46 +02:00
risingPhil
a44b908587 Implement gen 2 party icon decoding
Now you can also decode the party icons for the gen 2 pokémon games
2024-09-25 20:22:17 +02:00
risingPhil
04bc493c03 Add Gen1GameReader::getPokemonIconType() 2024-09-24 22:52:26 +02:00
Philippe Symons
2643a00ca7 Add party icon decoding for gen 1 pokémon games.
Now you can decode the pokemon mini sprites/party icons from the rom into an RGB/RGBA buffer
2024-09-24 12:21:35 +02:00
Philippe Symons
0fd91fb8e5 Move the application of the GenXDistributionPokemon properties to separate functions
This allows us to use the genx_prepareDistributionPokemon() functions followed by GenXGameReader::addPokemon()
instead of GenXGameReader::addDistributionPokemon() in order to actually show the resulting GenXTrainerPokemon in
a stats screen in PokeMe64. After all: the genx_prepareDistributionPokemon() function does things like generate IV,
decide the trainer OT name and ID and apply shinyness chances.

So when showing the resulting pokemon in a stats screen, we need the actual resulting pokemon in order to show the right
stats, OT and shinyness
2024-08-13 12:45:10 +02:00
risingPhil
e5342451ce Add more SpriteRenderer output formats and move the removeBackground functionality
- Add SpriteRenderer::OutputFormat::RGBA32 and SpriteRenderer::OutputFormat::RGBA16
- Move the removeBackground functionality out of the decodeSprite example application and into SpriteRenderer. It's RGBA32 only though
2024-08-07 21:11:55 +02:00
risingPhil
a43345317b Add some example code to the decodeSprite example application to remove the white background from a Sprite 2024-08-07 12:55:24 +02:00
risingPhil
c9257d7e01 Change unlockGsBallEvent() significantly.
Now it not only unlocks the event, but it also makes it repeatable by removing the GS Ball from the players' inventory first
and resetting all GS Ball related event flags.

Not only does this cover up my screw up with PokeMe64. (it prevents players from having to create a new save
to get access to the GS Ball event if they used one of my previous versions of PokeMe64)

As a bonus, it also makes the event completely repeatable, which is nice!
2024-07-29 01:11:13 +02:00
risingPhil
4a3bc9de18 Add functionality to get and set event flags 2024-07-29 00:51:54 +02:00
risingPhil
80e8397b93 Add functionality to remove an item and 2 example programs to add or remove an item. 2024-07-28 22:57:59 +02:00
risingPhil
99e495dad9 Add an API in Gen2GameReader to unlock the GS Ball event 2024-07-26 23:13:24 +02:00
Philippe Symons
2adbacf43b Avoid performance hit in Gen1PlayerPokemonStorage
Make it possible for Gen1PlayerPokemonStorages' Gen1Party and Gen1Box to
avoid the performance hit in ::getPokemon caused by the recalculation of
the pokemons' level. This recalculation would read the pokemon stats
datastructure, which could be slow on the N64 transfer pak.
2024-07-23 23:40:19 +02:00
Philippe Symons
4fc77f27af Add getSpeciesAtIndex() function in Gen1PlayerPokemonStorage to enable
fast species type checking
2024-07-23 23:24:04 +02:00
risingPhil
d5f5648c36 Add list of Pokémon moves in Moves.h alongside a function to convert the enum to string 2024-07-23 22:46:44 +02:00
risingPhil
77d5d152e9 add setPokemon() function in Gen1PlayerPokemonStorage. This is useful for updating existing pokémon 2024-07-23 13:50:37 +02:00
risingPhil
5954a2a036 Initial import 2024-06-11 21:45:59 +02:00