aboutsummaryrefslogtreecommitdiffstats
path: root/music/pokeredmusicdisasm/UnkCode.cpp
blob: 93c74f6648bbb1373e9ea704246e002d0cb09b56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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;
}