diff options
author | YamaArashi <shadow962@live.com> | 2012-01-26 10:32:40 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2012-01-26 10:32:40 -0800 |
commit | b42672a0a07793f1ddd15e7132d229bd214877ac (patch) | |
tree | 481539931789a009fdbca4ab933e914cb6f3670a /music/pokeredmusicdisasm/UnkCode.cpp | |
parent | 96db7d1cd78232f345eb74bc2c91ad5698d1b11f (diff) | |
parent | c57d257243a214f269859439cbca46f55791e2e1 (diff) |
Merge music changes
hg-commit-id: 279fd0d79924
Diffstat (limited to 'music/pokeredmusicdisasm/UnkCode.cpp')
-rw-r--r-- | music/pokeredmusicdisasm/UnkCode.cpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/music/pokeredmusicdisasm/UnkCode.cpp b/music/pokeredmusicdisasm/UnkCode.cpp new file mode 100644 index 00000000..93c74f66 --- /dev/null +++ b/music/pokeredmusicdisasm/UnkCode.cpp @@ -0,0 +1,67 @@ +#include <sstream>
+
+#include "Call.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"
+
+using namespace std;
+
+UnkCode::UnkCode()
+{
+ code = 0;
+}
+
+UnkCode::UnkCode(unsigned char* byte)
+{
+ code = 0;
+ Parse(byte);
+}
+
+UnkCode::UnkCode(unsigned char code, bool)
+{
+ SetCode(code);
+}
+
+// Getters / Setters
+unsigned char UnkCode::GetCode()
+{
+ return code;
+}
+
+void UnkCode::SetCode(unsigned char value)
+{
+ code = value;
+}
+
+// Re-implemented
+string UnkCode::GenAsm()
+{
+ stringstream tmpAsmOut;
+ tmpAsmOut << "db $" << hex << (short)code;
+ return tmpAsmOut.str();
+}
+
+bool UnkCode::Parse(unsigned char* byte)
+{
+ code = byte[0];
+ return true;
+}
+
+bool UnkCode::IsValid(unsigned char* byte)
+{
+ return true;
+}
+
+unsigned int UnkCode::Arguments()
+{
+ return 0;
+}
\ No newline at end of file |