summaryrefslogtreecommitdiff
path: root/music/pokeredmusicdisasm/Parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'music/pokeredmusicdisasm/Parser.h')
-rw-r--r--music/pokeredmusicdisasm/Parser.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/music/pokeredmusicdisasm/Parser.h b/music/pokeredmusicdisasm/Parser.h
deleted file mode 100644
index 385195ec..00000000
--- a/music/pokeredmusicdisasm/Parser.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#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 "Stop.h"
-#include "Tempo.h"
-#include "Velocity.h"
-#include "Volume.h"
-#include "UnkCode.h"
-#include "UnkEB.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);
-
- unsigned int GetStopAddress();
- void SetStopAddress(unsigned int value);
-
- bool GetForce();
- void SetForce(bool value);
-
- std::string GetParsedAsm();
-
- // File Operations
- void Read();
-
- // Code Operations
- void Parse(unsigned int offset);
- void ParseNext(); // Parses the block immidiately following
-
- // Templates
- template<class T>
- bool ParseData(unsigned int& pos, bool reado = false);
-
- enum dataType : unsigned char
- {
- DATA_NA,
- DATA_CALL,
- DATA_DUTY,
- DATA_JUMP,
- DATA_MODULATION,
- DATA_NOTE,
- DATA_OCTAVE,
- DATA_STOP,
- DATA_TEMPO,
- DATA_UNKCODE,
- DATA_UNKEB,
- DATA_VELOCITY,
- DATA_VOLUME
- };
-
-private:
- std::string filename;
- std::vector<AbstractData*> parsedBytes;
- std::vector<std::string> parsedString;
-
- char* rawBytes;
- unsigned char* rawBytesFixed;
- unsigned int fileLength;
- unsigned int filePos;
- bool stop;
- bool force;
-
- // Optional Settings
- unsigned int stopAddress;
-};
-
-#endif \ No newline at end of file