mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 23:55:24 +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
69
music/pokeredmusicdisasm/UnkEB.cpp
Normal file
69
music/pokeredmusicdisasm/UnkEB.cpp
Normal file
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue