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/Parser.h | |
| 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/Parser.h')
| -rw-r--r-- | music/pokeredmusicdisasm/Parser.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/music/pokeredmusicdisasm/Parser.h b/music/pokeredmusicdisasm/Parser.h new file mode 100644 index 00000000..9f7550c0 --- /dev/null +++ b/music/pokeredmusicdisasm/Parser.h @@ -0,0 +1,72 @@ +#ifndef PARSER_H
+#define PARSER_H
+
+#include <fstream>
+#include <string>
+#include <vector>
+
+#include "AbstractData.h"
+#include "Call.h"
+#include "Console.h"
+#include "Duty.h"
+#include "Jump.h"
+#include "Modulation.h"
+#include "Note.h"
+#include "Octave.h"
+#include "Parser.h"
+#include "Stop.h"
+#include "Tempo.h"
+#include "Velocity.h"
+#include "Volume.h"
+
+// This is the final class, it takes all of the data types, abstract class, and helper functions and uses them
+// for parsing
+
+// the final decided plan was to read the whole file into memory (a rom isn't exactly a big memory breaker)
+class Parser
+{
+public:
+ // Constructors
+ Parser();
+ Parser(std::string filename);
+
+ // Deconstructors
+ ~Parser();
+
+ // Getters / Setters
+ std::string GetFilename();
+ void SetFilename(std::string value);
+
+ std::string GetParsedAsm();
+
+ // File Operations
+ void Read();
+
+ // Code Operations
+ void Parse(unsigned int offset);
+ void ParseNext(); // Parses the block immidiately following
+
+private:
+ std::string filename;
+ std::vector<AbstractData*> parsedBytes;
+ std::vector<std::string> parsedString;
+
+ char* rawBytes;
+ unsigned int fileLength;
+ unsigned int filePos;
+ bool stop;
+
+ // A lot of tmp classes
+ Call tmpCall;
+ Duty tmpDuty;
+ Jump tmpJump;
+ Modulation tmpModulation;
+ Note tmpNote;
+ Octave tmpOctave;
+ Stop tmpStop;
+ Tempo tmpTempo;
+ Velocity tmpVelocity;
+ Volume tmpVolume;
+};
+
+#endif
\ No newline at end of file |
