diff options
| author | KuroiIeWa5Da <tyuki@adu.me> | 2012-01-23 01:41:05 -0600 |
|---|---|---|
| committer | KuroiIeWa5Da <tyuki@adu.me> | 2012-01-23 01:41:05 -0600 |
| commit | 4d0797bc3a6ae0ea4b44e8b6463339d662f5d669 (patch) | |
| tree | 03b824a1bb511bbb8c57ea378c1d27ea04c27ef7 /music/pokeredmusicdisasm/main.cpp | |
| parent | Finished PkmnHealed music data - all 3 channels (diff) | |
| download | pokeyellow-4d0797bc3a6ae0ea4b44e8b6463339d662f5d669.tar.gz pokeyellow-4d0797bc3a6ae0ea4b44e8b6463339d662f5d669.tar.xz pokeyellow-4d0797bc3a6ae0ea4b44e8b6463339d662f5d669.zip | |
made changes in repo
hg-commit-id: 1145e088ee27
Diffstat (limited to 'music/pokeredmusicdisasm/main.cpp')
| -rw-r--r-- | music/pokeredmusicdisasm/main.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/music/pokeredmusicdisasm/main.cpp b/music/pokeredmusicdisasm/main.cpp new file mode 100644 index 00000000..919fd719 --- /dev/null +++ b/music/pokeredmusicdisasm/main.cpp @@ -0,0 +1,39 @@ +#include "Console.h"
+#include "Parser.h"
+#include <sstream>
+#include <string>
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+ string arg1; // Offset
+ string arg2; // File
+
+ if(argc >= 3)
+ {
+ arg1 = argv[1];
+ arg2 = argv[2];
+ }
+ else if(argc == 2)
+ {
+ arg1 = argv[1];
+ arg2 = "../baserom.gbc";
+ }
+
+ if(arg1 == "") Console::Ask("What offset in the file in hex (0x----): ", arg1);
+ if(arg2 == "") Console::Ask("What file: ", arg2);
+
+ // Weird way of converting arg1 to an unsigned integer
+ stringstream arg1Conv;
+ unsigned int arg1ConvNum;
+ arg1Conv << arg1;
+ arg1Conv << hex;
+ arg1Conv >> arg1ConvNum;
+
+ Parser p(arg2);
+ p.Parse(arg1ConvNum);
+ Console::PrintLn(p.GetParsedAsm().c_str());
+
+ return 0;
+}
\ No newline at end of file |
