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;
}
void Attachment::GetState(u8* const data)
{
}
bool Attachment::IsButtonPressed() const
{
return false;
}
std::string Attachment::GetName() const
{
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_calibration.cbegin(), m_calibration.cend(), m_reg.calibration);
}
}
} // namespace WiimoteEmu
void ControllerEmu::Extension::GetState(u8* const data)
{

View File

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