Attachment: Move implementation details into the cpp file

This commit is contained in:
Lioncash 2017-01-23 01:17:08 -05:00
parent c87ee2a00e
commit 34262ee3d8
2 changed files with 14 additions and 4 deletions

View File

@ -30,6 +30,15 @@ None::None(ExtensionReg& reg) : Attachment("None", reg)
m_id = nothing_id; m_id = nothing_id;
} }
void Attachment::GetState(u8* const data)
{
}
bool Attachment::IsButtonPressed() const
{
return false;
}
std::string Attachment::GetName() const std::string Attachment::GetName() const
{ {
return m_name; return m_name;
@ -42,7 +51,7 @@ void Attachment::Reset()
std::copy(m_id.cbegin(), m_id.cend(), m_reg.constant_id); std::copy(m_id.cbegin(), m_id.cend(), m_reg.constant_id);
std::copy(m_calibration.cbegin(), m_calibration.cend(), m_reg.calibration); std::copy(m_calibration.cbegin(), m_calibration.cend(), m_reg.calibration);
} }
} } // namespace WiimoteEmu
void ControllerEmu::Extension::GetState(u8* const data) void ControllerEmu::Extension::GetState(u8* const data)
{ {

View File

@ -18,8 +18,9 @@ class Attachment : public ControllerEmu
public: public:
Attachment(const char* const name, ExtensionReg& reg); Attachment(const char* const name, ExtensionReg& reg);
virtual void GetState(u8* const data) {} virtual void GetState(u8* const data);
virtual bool IsButtonPressed() const { return false; } virtual bool IsButtonPressed() const;
void Reset(); void Reset();
std::string GetName() const override; std::string GetName() const override;
@ -40,4 +41,4 @@ class None : public Attachment
public: public:
None(ExtensionReg& reg); None(ExtensionReg& reg);
}; };
} } // namespace WiimoteEmu