Commit Graph

22 Commits

Author SHA1 Message Date
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
risingPhil
7ac7c29f3e Merge branch 'main' of github.com:risingPhil/libpokemegb into main 2024-07-26 21:54:02 +02:00
risingPhil
5b85c04b5a Fix gen1 bug reported by /u/imranFZakhaev
When adding a pokémon to a save with a full party, the behaviour is completely broken.

Not only did we add a pokémon to every box, but it also would be a completely different one or even crash the game when trying to access the box.

Fixes:

- Stop after adding a pokemon to a box. Don't add it to all.
- In commit 77d5d15 I added a ::setPokemon function and reworked the Gen1Box::add() function to use it. That's where it went wrong:

in the add() function, we would modify the number_of_pokemon counter of the box, but not manipulate the species list and write it.
Then in the setPokemon() function, we would read the box metadata and correct it because the number did not match the species list. This is what went wrong.

To fix it, I just had to modify the species list in the add() function as well again.
2024-07-26 21:49:39 +02:00
Philippe Symons
ce1714b74e Update README.md: now that PokeMe64 exists, I can link to it 2024-07-25 14:24:50 +02:00
Philippe Symons
b275d12a97 Also recalculate lvl in gen1_recalculatePokeStats 2024-07-25 10:40:08 +02:00
Philippe Symons
76ecc15ede Fix name bug with getMoveString 2024-07-23 23:50:07 +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
8e569b9141 Fix capitalization 2024-07-23 22:54:53 +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
747bdd4b4b Fix bug gen2 addItem 2024-07-19 21:31:16 +02:00
risingPhil
20ba1f67fe More README.md 2024-06-11 22:14:34 +02:00
risingPhil
c6ba70b9dc Some more work on the README.md 2024-06-11 22:08:24 +02:00
risingPhil
942b49c600 Try again formatting the titles 2024-06-11 21:59:03 +02:00
risingPhil
8cf17064ad Switch CREDITS file to markdown format as well 2024-06-11 21:57:57 +02:00
risingPhil
38b44048f7 Try to fix formatting 2024-06-11 21:50:43 +02:00
risingPhil
620f9c339a Update LICENSE 2024-06-11 21:47:38 +02:00
risingPhil
5954a2a036 Initial import 2024-06-11 21:45:59 +02:00
risingPhil
2b1041b560 Initial commit 2024-06-11 21:40:05 +02:00