diff options
| author | KuroiIeWa5Da <tyuki@adu.me> | 2012-01-26 06:22:29 -0600 |
|---|---|---|
| committer | KuroiIeWa5Da <tyuki@adu.me> | 2012-01-26 06:22:29 -0600 |
| commit | bf1968297996fa8e2a5f004d60b83e516840a632 (patch) | |
| tree | 5ae653257dc979e098c4a7aaac3996cdb42138d3 /music/pokeredmusicdisasm/UnkEB.cpp | |
| parent | Finished MeetProfOak Channel 3 Music Data (diff) | |
| download | pokeyellow-bf1968297996fa8e2a5f004d60b83e516840a632.tar.gz pokeyellow-bf1968297996fa8e2a5f004d60b83e516840a632.tar.xz pokeyellow-bf1968297996fa8e2a5f004d60b83e516840a632.zip | |
Made several large upgrades to Music Disassembler
hg-commit-id: 0b180a6e2ec5
Diffstat (limited to 'music/pokeredmusicdisasm/UnkEB.cpp')
| -rw-r--r-- | music/pokeredmusicdisasm/UnkEB.cpp | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/music/pokeredmusicdisasm/UnkEB.cpp b/music/pokeredmusicdisasm/UnkEB.cpp new file mode 100644 index 00000000..c8db595f --- /dev/null +++ b/music/pokeredmusicdisasm/UnkEB.cpp @@ -0,0 +1,69 @@ +#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 "UnkEB.h"
+
+using namespace std;
+
+UnkEB::UnkEB()
+{
+ param = 0;
+}
+
+UnkEB::UnkEB(unsigned char* byte)
+{
+ param = 0;
+ Parse(byte);
+}
+
+UnkEB::UnkEB(unsigned char code, bool)
+{
+ SetParam(code);
+}
+
+// Getters / Setters
+unsigned char UnkEB::GetParam()
+{
+ return param;
+}
+
+void UnkEB::SetParam(unsigned char value)
+{
+ param = value;
+}
+
+// Re-implemented
+string UnkEB::GenAsm()
+{
+ stringstream tmpAsmOut;
+ tmpAsmOut << hex << "db $" << (short)0xEB << ", $" << (short)param;
+ return tmpAsmOut.str();
+}
+
+bool UnkEB::Parse(unsigned char* byte)
+{
+ param = byte[1];
+ return true;
+}
+
+bool UnkEB::IsValid(unsigned char* byte)
+{
+ if(byte[0] == 0xEB) return true;
+ else return false;
+}
+
+unsigned int UnkEB::Arguments()
+{
+ // 1 1-Byte param
+ return 1;
+}
\ No newline at end of file |
