summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SavEdit.h1
-rw-r--r--UserOptions.cpp32
-rw-r--r--main.cpp8
3 files changed, 37 insertions, 4 deletions
diff --git a/SavEdit.h b/SavEdit.h
index 699cb81..2275f14 100644
--- a/SavEdit.h
+++ b/SavEdit.h
@@ -26,6 +26,7 @@ class SavEdit
void cashModify();
bool select();
void clear();
+ void debug();
private:
std::string filename;
diff --git a/UserOptions.cpp b/UserOptions.cpp
index 08768b8..0dcc494 100644
--- a/UserOptions.cpp
+++ b/UserOptions.cpp
@@ -56,6 +56,7 @@ void SavEdit::modify(const int BEGIN, const int END)
mem.at(BEGIN + i) = 0x50;
}
+
}
void SavEdit::cashModify()
@@ -136,7 +137,8 @@ bool SavEdit::select()
std::cout << "\t1. Player Name" << std::endl;
std::cout << "\t2. RIVAL Name" << std::endl;
std::cout << "\t3. MONEY" << std::endl;
- std::cout << "\t4. QUIT, DO NOT SAVE" << std::endl;
+ //std::cout << "\t4. QUIT, DO NOT SAVE" << std::endl;
+ std::cout << "\t4. EDIT ITEM #0." << std::endl;
std::cout << "\t0. SAVE AND QUIT" << std::endl;
std::cout << "YOUR INPUT: ";
@@ -192,3 +194,31 @@ bool SavEdit::select()
return finished;
}
+
+void SavEdit::debug()
+{
+ /*
+ * This subroutine is just for
+ * getting information. It
+ * shouldn't be used otherwise.
+ */
+
+ // CURRENT TASK:
+ // - Finding out all 255 items
+
+ int startingval = 0xC0;
+ int inc = 4;
+
+ int s = startingval + inc;
+
+ std::cout << "Items added to: " << std::endl;
+ mem.at(0x25CA) = s + 0; // ITEM #0 ID
+ std::cout << std::hex << s+0 << std::endl;
+ mem.at(0x25CC) = s + 1; // ITEM #1 ID
+ std::cout << std::hex << s+1 << std::endl;
+ mem.at(0x25CE) = s + 2; // ITEM #2 ID
+ std::cout << std::hex << s+2 << std::endl;
+ mem.at(0x25D0) = s + 3; // ITEM #3
+ std::cout << std::hex << s+3 << std::endl;
+
+}
diff --git a/main.cpp b/main.cpp
index eaca369..539293a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -33,19 +33,21 @@ int main(int argc, char *argv[])
//save.modify(0x2598, 0x259E);
// TEST OPTIONS
- bool done = false;
+ bool done = true; //false;
while(!done)
done = save.select();
+ // To make things faster.
+ save.debug();
// Test the rival.
//save.modify(0x25F6, 0x25FC);
// Update the checksum.
- //save.checksum();
+ save.checksum();
// Save the new file
- //save.saveNewFile();
+ save.saveNewFile();
return 0;
}