2
0
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:
Jack Andersen
2017-02-17 16:19:50 -10:00
parent 98a095d4e8
commit 56328c3e4d
52 changed files with 1017 additions and 84 deletions

View File

@@ -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);