mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-07 08:05:23 +13:00
Made several large upgrades to Music Disassembler
hg-commit-id: 0b180a6e2ec5
This commit is contained in:
parent
25e09f5066
commit
bf19682979
7 changed files with 348 additions and 89 deletions
67
music/pokeredmusicdisasm/UnkCode.cpp
Normal file
67
music/pokeredmusicdisasm/UnkCode.cpp
Normal file
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue