mirror of
https://github.com/risingPhil/PokeMe64.git
synced 2026-03-22 02:14:20 -05:00
* Feature/add support for other game languages (#13) * Add support for other game localizations/languages * Increase PokeMe64 version to v0.3 * Update README.md * Slightly improve the text in docs/Why_I_Had_To_Give_Up_On_Batteryless_Repros.md * Update libpokemegb submodule to commit 3d86aa8 * Add Japanese characters to the fonts * Make validating Japanese save files work correctly Turns out these Japanese cartridges are using an MBC1 controller. There's a notable difference between it and MBC3: by default it is doing banking mode 0. But in this mode, you can't switch SRAM banks! So in order to make japanese cartridges work, we must switch to mode 1. * Update Arial font: add Japanese glyphs from Osaka Regular-Mono.ttf In order to render japanese characters, we need to have a font which has japanese characters and make sure they are added to the .font64 file with mkfont during compilation. I wrote a small program before to figure out which Japanese characters are actually used in the Japanese gameboy cartridges. I only added those unicode ranges to the fonts to keep them small. There was no easy way to have a font that has both latin and Japanese characters, especially not free. So I used FontForge to merge the japanese glyphs from Osaka Regular-Mono into Arial.ttf * Update libpokemegb to commit 0ef7a3a * Update libpokemegb submodule * Update libpokemegb submodule to commit d6f3423 * Various changes - Upgrade libpokemegb to commit c47f8b3 - [Korean gen II games]: Make the UI show Trainer and Pokémon instead of the actual trainer name and pokémon name. This is needed because our font does not include the necessary characters for the Korean games. And while I could attempt to add them, I don't sufficiently care to do so. - Attempt to randomize random values. This is needed for random IVs and shininess chances. It's not entirely clear to me whether the rand() function would actually return random values in previous versions of PokeMe64. While libdragon does gather entropy at bootup and implements a getentropy() function, I don't see this function referenced anywhere. That being said, it DOES look like libstdc++ would call a getentropy() function, so perhaps this is a way in which getentropy() from libdragon would get called. But I'm not using libstdc++'s functionality to obtain random values, I'm using libc's rand() function. And I don't see any reference from libc (for rand()) to getentropy(), so... At the very least we might need to use values from getentropy() to seed with srand(). But because I have trust issues with randomizing pseudo-random values in a system that doesn't have a system clock, I also added trainerID, trainerName and the number of elapsed cpu cycles until we are going to the main menu to the seed. I might consider adding the RTC values for gen II games to the seed as well later. * Update README.md * More README.md * Update libpokemegb to commit 17232c4 * Feature/automatically reset rtc in backed up save file for gen2 (#14) * Add support for other game localizations/languages * Increase PokeMe64 version to v0.3 * Update README.md * Slightly improve the text in docs/Why_I_Had_To_Give_Up_On_Batteryless_Repros.md * Update libpokemegb submodule to commit 3d86aa8 * Set the flag to reconfigure RTC in the backed up save file when backing up the save of a cartridge. * Update libpokemegb submodule to commit 5037690 * Update libpokemegb submodule to commit 8ff128c * Add support for Pokémon Green (JPN) * Update libpokemegb submodule to commit 1897845 * Update README.md -> japanese pokemon fallback OT name change -> PokeMe64 -> PM64 * Add gen I move delete feature. (Idea by /u/ImranFZakhaev on Reddit) * Add check to make sure the player is in a pokémon center before allowing him/her to delete a pokémon move. The reason behind this check is to avoid getting the player stuck on a map after deleting an HM. * Forgot to add the actual check in the last commit * Feature/implement gen1 move deleter (#15) * Add gen I move delete feature. (Idea by /u/ImranFZakhaev on Reddit) * Add check to make sure the player is in a pokémon center before allowing him/her to delete a pokémon move. The reason behind this check is to avoid getting the player stuck on a map after deleting an HM. * Update screenshots * Update CREDITS and add some people as Testing/Validation credits in the AboutScene These people have been a great help in getting PokeMe64 to work correctly. Thank you, everyone! * Fix whitespace issues * Update libpokemegb to commit aedb588
119 lines
4.1 KiB
C++
Executable File
119 lines
4.1 KiB
C++
Executable File
#ifndef _MENUFUNCTIONS_H
|
|
#define _MENUFUNCTIONS_H
|
|
|
|
#include "scenes/DataCopyScene.h"
|
|
#include "Moves.h"
|
|
|
|
#include <cstdint>
|
|
|
|
// these are used to pass as a pointer to the gen1PrepareToTeachPikachu function
|
|
extern const Move MOVE_SURF;
|
|
extern const Move MOVE_FLY;
|
|
|
|
// these are used to pass as a pointer to the goToDataCopyScene function
|
|
extern const DataCopyOperation DATACOPY_BACKUP_SAVE;
|
|
extern const DataCopyOperation DATACOPY_BACKUP_ROM;
|
|
extern const DataCopyOperation DATACOPY_RESTORE_SAVE;
|
|
extern const DataCopyOperation DATACOPY_WIPE_SAVE;
|
|
|
|
extern const uint16_t GEN2_EVENTFLAG_DECORATION_PIKACHU_BED;
|
|
extern const uint16_t GEN2_EVENTFLAG_DECORATION_UNOWN_DOLL;
|
|
extern const uint16_t GEN2_EVENTFLAG_DECORATION_TENTACOOL_DOLL;
|
|
|
|
void activateFrameLog(void* context, const void* param);
|
|
void advanceDialog(void* context, const void* param);
|
|
|
|
// UI navigation functions
|
|
void goToTestScene(void* context, const void* param);
|
|
void goToPokeTransporterGBRef(void* context, const void* param);
|
|
void goToAboutScene(void* context, const void* param);
|
|
void goToDataCopyScene(void* context, const void* param);
|
|
void goToGen1MovesMenu(void* context, const void* param);
|
|
void goToGen1DistributionPokemonMenu(void* context, const void* param);
|
|
void goToGen2DistributionPokemonMenu(void* context, const void* param);
|
|
void goToGen2PCNYDistributionPokemonMenu(void* context, const void* param);
|
|
void goToGen2DecorationMenu(void* context, const void* param);
|
|
void goToBackupRestoreMenu(void* context, const void* param);
|
|
|
|
/**
|
|
* The first step to teach pikachu something. In this step we find a pikachu in the Trainer's
|
|
* party and check if there's currently room to add the new move.
|
|
*
|
|
* If not, we will prompt the user to select a move to replace.
|
|
*
|
|
* When the selection of the move index has been made, we'll call gen1TeachPikachu()
|
|
*
|
|
* @param context a MenuScene*
|
|
* @param param a const Move* indicating which move to teach
|
|
*/
|
|
void gen1PrepareToTeachPikachu(void* context, const void* param);
|
|
|
|
/**
|
|
* This function actually sets the given Move at the specified index in the party pokémon's data
|
|
* and saves the game.
|
|
*
|
|
* @param context a MenuScene*
|
|
* @param param a Gen1TeachPikachuParams struct pointer
|
|
*/
|
|
void gen1TeachPikachu(void* context, const void* param);
|
|
|
|
/**
|
|
* This function is the first stage of the move deleter functionality.
|
|
* It gives the user a prompt to select the pokémon in the trainer's party
|
|
* from which to delete a move.
|
|
*
|
|
* @param context a MenuScene*
|
|
* @param param a nullpointer (dummy param)
|
|
*/
|
|
void gen1MoveDeleterSelectPokemon(void* context, const void* param);
|
|
|
|
/**
|
|
* This function is the second stage of the move deleter functionality.
|
|
* It gives the user a prompt to select the move of the selected pokémon to delete
|
|
*
|
|
* @param context a MenuScene*
|
|
* @param param a uint8_t value stored as the const void* value
|
|
*/
|
|
void gen1MoveDeleterSelectMove(void* context, const void* param);
|
|
|
|
/**
|
|
* This function is the third stage of the move deleter functionality.
|
|
* It applies the move deletion to the selected pokémon.
|
|
*
|
|
* @param context a MenuScene*
|
|
* @param param a MoveDeleterParams struct pointer
|
|
*/
|
|
void gen1MoveDeleterApply(void* context, const void* param);
|
|
|
|
/**
|
|
* This function will unlock the GS Ball event in a Pokémon Crystal save
|
|
*
|
|
* @param context a MenuScene*
|
|
* @param param a nullpointer (dummy param)
|
|
*/
|
|
void gen2ReceiveGSBall(void* context, const void* param);
|
|
/**
|
|
* This function will set a gen II event flag
|
|
*
|
|
* @param context a MenuScene*
|
|
* @param param a uint16_t* which indicates the event flag index
|
|
*/
|
|
void gen2SetEventFlag(void* context, const void* param);
|
|
|
|
/**
|
|
* This function will ask for confirmation to wipe a save from the cartridge.
|
|
*
|
|
* If confirmed by the user, the DataCopyScene will be navigated to with the DATACOPY_WIPE_SAVE command
|
|
*/
|
|
void askConfirmationWipeSave(void* context, const void* param);
|
|
|
|
/**
|
|
* This function will change an SRAM field to let gen 2 games prompt you
|
|
* to reconfigure the game clock
|
|
*
|
|
* @param context a MenuScene* context
|
|
* @param param a nullpointer (dummy param)
|
|
*/
|
|
void resetRTC(void* context, const void* param);
|
|
|
|
#endif |