diff options
author | metaphysicsIO <103212704+metaphysicsIO@users.noreply.github.com> | 2023-12-13 10:39:04 -0600 |
---|---|---|
committer | metaphysicsIO <103212704+metaphysicsIO@users.noreply.github.com> | 2023-12-13 10:39:04 -0600 |
commit | a9e2ab00ba0042519ada63083675140466aaf984 (patch) | |
tree | 6c2396b9ff9294015da04539d9332be293d4c732 | |
parent | b5bb6a2c84edf5fa6cd65560b6d8c781e29ab585 (diff) | |
download | PSE-a9e2ab00ba0042519ada63083675140466aaf984.tar.gz |
You only need to generate the hashmap once, so it's moved to the constructor.
-rw-r--r-- | PartyEdit.cpp | 10 | ||||
-rw-r--r-- | PrivateAccess.cpp | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/PartyEdit.cpp b/PartyEdit.cpp index 6c1bf12..83223f4 100644 --- a/PartyEdit.cpp +++ b/PartyEdit.cpp @@ -27,7 +27,6 @@ #include "SavEdit.h" - int SavEdit::selectStat() { /* @@ -105,6 +104,7 @@ int SavEdit::selectStat() std::cout << "Try again." << std::endl; break; } + // clear buffer std::cin.clear(); std::cin.ignore(); @@ -175,11 +175,6 @@ void SavEdit::modMainMenu() // Make room clear(); - // Create the pkmn name map - pkmnMap(); - // Create the move name map - moveMap(); - // Print a list of party members for the user to edit printParty(); @@ -195,8 +190,6 @@ void SavEdit::modMainMenu() } } - // Display party member being edited: - // Make room again clear(); @@ -241,7 +234,6 @@ void SavEdit::modMainMenu() printMovelist(); std::cin >> std::hex >> state_value; // TODO: Check user input party_member_offset = (start_point - 0x1A) + (0x2C * party_member) + (stat_val_offset - 0x0F); - //party_member_offset = 0x2f0f + (0x2C * party_member) + (stat_val_offset - 0x0F); break; default: party_member_offset = start_point + (44 * party_member) + (stat_val_offset * 0x02); diff --git a/PrivateAccess.cpp b/PrivateAccess.cpp index 36a90ed..beb2b70 100644 --- a/PrivateAccess.cpp +++ b/PrivateAccess.cpp @@ -9,7 +9,14 @@ SavEdit::SavEdit() */ filename = "Pokemon - Red Version (USA, Europe) (SGB Enhanced).sav"; + lang = en_US; + + // Generate the hashmaps + pkmnMap(); + moveMap(); + //TODO: itemMap(); + } std::string SavEdit::getFilename() |