From 8edfcc4b1e36111d400b5f104a04001c66416426 Mon Sep 17 00:00:00 2001 From: "U-Fish-PC\\Daniel" Date: Sat, 12 Oct 2013 14:40:37 -0400 Subject: All music and sfx --- music/pokeredmusicdisasm/Duty.cpp | 93 --------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 music/pokeredmusicdisasm/Duty.cpp (limited to 'music/pokeredmusicdisasm/Duty.cpp') diff --git a/music/pokeredmusicdisasm/Duty.cpp b/music/pokeredmusicdisasm/Duty.cpp deleted file mode 100644 index 0723074b..00000000 --- a/music/pokeredmusicdisasm/Duty.cpp +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include "Duty.h" -using namespace std; - -Duty::Duty() -{ - duty = 0; -} - -Duty::Duty(unsigned char* byte) // Parse Immidiately -{ - Parse(byte); -} - -Duty::Duty(unsigned char value, bool) // Set value -{ - SetDuty(value); -} - -unsigned char Duty::GetDuty() -{ - return duty; -} - -void Duty::SetDuty(unsigned char value) -{ - // Clamp duty to 3 since that's the highest possible - duty = value; - if(duty >= 3) duty = 3; -} - -// Byte 0 - The Command Code -// Byte 1 - The Value -bool Duty::IsValid(unsigned char* byte) -{ - if((byte[0] == 0xEC) && - (byte[1] >= 0x0) && - (byte[1] <= 0x3)) - { - error = false; // Unblock assembling - return true; - } - else - { - error = true; // Block assembling - return false; - } -} - -string Duty::GenAsm() -{ - string ret = AbstractData::GenAsm(); - if(ret != "") return ret; - - stringstream tmpAsmOut; - tmpAsmOut << "mus_duty " << LookupDutyString(); - return tmpAsmOut.str(); -} - -bool Duty::Parse(unsigned char* byte) -{ - if(!AbstractData::Parse(byte)) return false; - - duty = byte[1]; - return true; -} - -string Duty::LookupDutyString() -{ - // In case some error happens and the values doesn't match the list below - stringstream defTmp; - - switch(duty) - { - case duty12_5: - return "duty12_5"; - case duty25: - return "duty25"; - case duty50: - return "duty50"; - case duty75: - return "duty75"; - default: - defTmp << "$" << uppercase << hex << (short)duty; - return defTmp.str(); - } -} - -unsigned int Duty::Arguments() -{ - //1 1-byte argument = 1 - return 1; -} \ No newline at end of file -- cgit v1.3.1-sl0p