mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:47:42 +00:00
Lots of CMFGame integration
This commit is contained in:
@@ -10,6 +10,21 @@ namespace urde
|
||||
{
|
||||
class CArchitectureQueue;
|
||||
|
||||
enum class EIOPort
|
||||
{
|
||||
Zero,
|
||||
One,
|
||||
Two,
|
||||
Three
|
||||
};
|
||||
|
||||
enum class EMotorState
|
||||
{
|
||||
Stop,
|
||||
Rumble,
|
||||
StopHard
|
||||
};
|
||||
|
||||
class CInputGenerator : public boo::DeviceFinder
|
||||
{
|
||||
enum class EStatusChange
|
||||
@@ -172,6 +187,24 @@ public:
|
||||
if (smashAdapter.get() == device)
|
||||
smashAdapter.reset(nullptr);
|
||||
}
|
||||
void SetMotorState(EIOPort port, EMotorState state)
|
||||
{
|
||||
if (smashAdapter)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case EMotorState::Stop:
|
||||
smashAdapter->stopRumble(unsigned(port));
|
||||
break;
|
||||
case EMotorState::Rumble:
|
||||
smashAdapter->startRumble(unsigned(port));
|
||||
break;
|
||||
case EMotorState::StopHard:
|
||||
smashAdapter->stopRumble(unsigned(port), true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This is where the game thread enters */
|
||||
void Update(float dt, CArchitectureQueue& queue);
|
||||
|
||||
Reference in New Issue
Block a user