diff options
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
|