diff options
| author | KuroiIeWa5Da <tyuki@adu.me> | 2012-01-23 03:59:25 -0600 |
|---|---|---|
| committer | KuroiIeWa5Da <tyuki@adu.me> | 2012-01-23 03:59:25 -0600 |
| commit | a297c105b5269f51d85b07308aa1c0c87eb9daca (patch) | |
| tree | d96aa0ab800f1846a67305264c4ec715a3cb4dec /music/pokeredmusicdisasm/Parser.cpp | |
| parent | Completed Routes2 music data channel 4 (diff) | |
| download | pokeyellow-a297c105b5269f51d85b07308aa1c0c87eb9daca.tar.gz pokeyellow-a297c105b5269f51d85b07308aa1c0c87eb9daca.tar.xz pokeyellow-a297c105b5269f51d85b07308aa1c0c87eb9daca.zip | |
updated disassembly program to support a custom stop address
hg-commit-id: a2bee0bdb345
Diffstat (limited to 'music/pokeredmusicdisasm/Parser.cpp')
| -rw-r--r-- | music/pokeredmusicdisasm/Parser.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/music/pokeredmusicdisasm/Parser.cpp b/music/pokeredmusicdisasm/Parser.cpp index a548b015..f11d57b6 100644 --- a/music/pokeredmusicdisasm/Parser.cpp +++ b/music/pokeredmusicdisasm/Parser.cpp @@ -9,6 +9,7 @@ Parser::Parser() fileLength = 0;
filePos = 0;
stop = false;
+ stopAddress = 0;
}
Parser::Parser(std::string filename)
@@ -46,6 +47,16 @@ void Parser::SetFilename(std::string value) Read();
}
+unsigned int Parser::GetStopAddress()
+{
+ return stopAddress;
+}
+
+void Parser::SetStopAddress(unsigned int value)
+{
+ stopAddress = value;
+}
+
string Parser::GetParsedAsm()
{
string tmpStr;
@@ -192,6 +203,9 @@ void Parser::ParseNext() // Parses the block immidiately following unkCode << "db $" << hex << uppercase << (short)rawBytesFixed[i];
parsedString.push_back(unkCode.str());
}
+
+ // If the stop address parameter is set, break when we get there
+ if( (stopAddress != 0) && (i >= stopAddress) ) break;
}
// Now record the postion we left off
|
