diff options
| author | Bryan Bishop <kanzure@gmail.com> | 2012-01-26 12:53:18 -0600 |
|---|---|---|
| committer | Bryan Bishop <kanzure@gmail.com> | 2012-01-26 12:53:18 -0600 |
| commit | 5ca3748f4cba85a4ba6a8abc994a20d73c0661e2 (patch) | |
| tree | a8148d51817ec272b1405e6f6a351e34998918ea /music/pokeredmusicdisasm/UnkCode.cpp | |
| parent | Pokemon Blue pointer at $29B3 to Unknown_74ee0. (diff) | |
| parent | Merge music changes (diff) | |
| download | pokeyellow-5ca3748f4cba85a4ba6a8abc994a20d73c0661e2.tar.gz pokeyellow-5ca3748f4cba85a4ba6a8abc994a20d73c0661e2.tar.xz pokeyellow-5ca3748f4cba85a4ba6a8abc994a20d73c0661e2.zip | |
Merge stag019/pokered
hg-commit-id: 601e69ebe196
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 |
