added boo namespace

This commit is contained in:
Jack Andersen
2015-04-29 00:24:39 -10:00
parent 8442c492d4
commit d4b1211c24
31 changed files with 197 additions and 57 deletions

View File

@@ -1,5 +1,9 @@
#ifndef CCAFEPROPAD_HPP
#define CCAFEPROPAD_HPP
namespace boo
{
}
#endif // CCAFEPROPAD_HPP

View File

@@ -4,6 +4,9 @@
#include <stdint.h>
#include <stdlib.h>
namespace boo
{
class CDeviceBase
{
friend class CDeviceToken;
@@ -33,4 +36,6 @@ public:
};
}
#endif // CDEVICEBASE

View File

@@ -8,6 +8,9 @@
#include "IHIDListener.hpp"
#include "DeviceClasses.hpp"
namespace boo
{
static class CDeviceFinder* skDevFinder = NULL;
class CDeviceFinder
@@ -132,4 +135,6 @@ public:
};
}
#endif // CDEVICEFINDER_HPP

View File

@@ -5,6 +5,9 @@
#include "CDeviceBase.hpp"
#include "DeviceClasses.hpp"
namespace boo
{
class CDeviceToken
{
unsigned m_vendorId;
@@ -55,4 +58,6 @@ public:
{return m_devPath < rhs.m_devPath;}
};
}
#endif // CDEVICETOKEN

View File

@@ -4,36 +4,42 @@
#include <stdint.h>
#include "CDeviceBase.hpp"
namespace boo
{
enum EDolphinControllerType
{
DOL_TYPE_NONE = 0,
DOL_TYPE_NORMAL = 0x10,
DOL_TYPE_WAVEBIRD = 0x20,
};
enum EDolphinControllerButtons
{
DOL_START = 1<<0,
DOL_Z = 1<<1,
DOL_L = 1<<2,
DOL_R = 1<<3,
DOL_A = 1<<8,
DOL_B = 1<<9,
DOL_X = 1<<10,
DOL_Y = 1<<11,
DOL_LEFT = 1<<12,
DOL_RIGHT = 1<<13,
DOL_DOWN = 1<<14,
DOL_UP = 1<<15
};
struct SDolphinControllerState
{
uint8_t m_leftStick[2];
uint8_t m_rightStick[2];
uint8_t m_analogTriggers[2];
uint16_t m_btns;
};
struct IDolphinSmashAdapterCallback
{
enum EDolphinControllerType
{
DOL_TYPE_NONE = 0,
DOL_TYPE_NORMAL = 0x10,
DOL_TYPE_WAVEBIRD = 0x20,
};
enum EDolphinControllerButtons
{
DOL_START = 1<<0,
DOL_Z = 1<<1,
DOL_L = 1<<2,
DOL_R = 1<<3,
DOL_A = 1<<8,
DOL_B = 1<<9,
DOL_X = 1<<10,
DOL_Y = 1<<11,
DOL_LEFT = 1<<12,
DOL_RIGHT = 1<<13,
DOL_DOWN = 1<<14,
DOL_UP = 1<<15
};
struct SDolphinControllerState
{
uint8_t m_leftStick[2];
uint8_t m_rightStick[2];
uint8_t m_analogTriggers[2];
uint16_t m_btns;
};
virtual void controllerConnected(unsigned idx, EDolphinControllerType type) {}
virtual void controllerDisconnected(unsigned idx, EDolphinControllerType type) {}
virtual void controllerUpdate(unsigned idx, EDolphinControllerType type,
@@ -60,4 +66,6 @@ public:
inline void stopRumble(unsigned idx) {if (idx >= 4) return; m_rumbleRequest &= ~(1<<idx);}
};
}
#endif // CDOLPHINSMASHADAPTER_HPP

View File

@@ -1,5 +1,9 @@
#ifndef CDUALSHOCKPAD_HPP
#define CDUALSHOCKPAD_HPP
namespace boo
{
}
#endif // CDUALSHOCKPAD_HPP

View File

@@ -1,5 +1,9 @@
#ifndef CGENERICPAD_HPP
#define CGENERICPAD_HPP
namespace boo
{
}
#endif // CGENERICPAD_HPP

View File

@@ -1,5 +1,9 @@
#ifndef CREVOLUTIONPAD_HPP
#define CREVOLUTIONPAD_HPP
namespace boo
{
}
#endif // CREVOLUTIONPAD_HPP

View File

@@ -7,6 +7,9 @@
#include "CDualshockPad.hpp"
#include "CGenericPad.hpp"
namespace boo
{
#define VID_NINTENDO 0x57e
#define PID_SMASH_ADAPTER 0x337
@@ -24,4 +27,6 @@ enum EDeviceMask
bool BooDeviceMatchToken(const CDeviceToken& token, EDeviceMask mask);
CDeviceBase* BooDeviceNew(CDeviceToken& token);
}
#endif // CDEVICECLASSES_HPP

View File

@@ -4,6 +4,10 @@
#include <unordered_map>
#include <mutex>
#include "CDeviceToken.hpp"
namespace boo
{
typedef std::unordered_map<std::string, CDeviceToken> TDeviceTokens;
typedef std::pair<TDeviceTokens::iterator, bool> TInsertedDeviceToken;
class CDeviceFinder;
@@ -25,4 +29,6 @@ public:
/* Platform-specific constructor */
IHIDListener* IHIDListenerNew(CDeviceFinder& finder);
}
#endif // IHIDLISTENER_HPP