Permalink
Browse files

Removed Leap

Removed Leap from the code base and VS2017 project and solutions. Other
platforms to follow.
  • Loading branch information...
greenfire27 committed May 7, 2018
1 parent 22a91a1 commit 2351cf8e4e615117f2695a5d3fa6caddb0443de2
BIN -1.17 MB Leap.dll
Binary file not shown.
BIN -1.89 MB Leapd.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -101,10 +101,10 @@
<AdditionalIncludeDirectories>../../Lib/MSPlatformSDK/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>Leap.lib;COMCTL32.LIB;COMDLG32.LIB;USER32.LIB;ADVAPI32.LIB;GDI32.LIB;RPCRT4.LIB;WINMM.LIB;WS2_32.LIB;vfw32.lib;Imm32.lib;shell32.lib;shlwapi.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>COMCTL32.LIB;COMDLG32.LIB;USER32.LIB;ADVAPI32.LIB;GDI32.LIB;RPCRT4.LIB;WINMM.LIB;WS2_32.LIB;vfw32.lib;Imm32.lib;shell32.lib;shlwapi.lib;ole32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>../../../Torque2D_DEBUG.exe</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>../../lib/LeapSDK/lib/x86;../../Lib/unicode;../../lib/MSPlatformSDK/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>../../Lib/unicode;../../lib/MSPlatformSDK/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(ProjectName).pdb</ProgramDatabaseFile>
@@ -150,10 +150,10 @@
<AdditionalIncludeDirectories>../../Lib/MSPlatformSDK/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>Leap.lib;COMCTL32.LIB;COMDLG32.LIB;USER32.LIB;ADVAPI32.LIB;GDI32.LIB;WINMM.LIB;WS2_32.LIB;vfw32.lib;Imm32.lib;shell32.lib;shlwapi.lib;ole32.lib;RPCRT4.LIB;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>COMCTL32.LIB;COMDLG32.LIB;USER32.LIB;ADVAPI32.LIB;GDI32.LIB;WINMM.LIB;WS2_32.LIB;vfw32.lib;Imm32.lib;shell32.lib;shlwapi.lib;ole32.lib;RPCRT4.LIB;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>../../../Torque2D.exe</OutputFile>
<SuppressStartupBanner>false</SuppressStartupBanner>
<AdditionalLibraryDirectories>../../lib/LeapSDK/lib/x86;../../Lib/unicode;../../Lib/MSPlatformSDK/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>../../Lib/unicode;../../Lib/MSPlatformSDK/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(ProjectName).pdb</ProgramDatabaseFile>
@@ -210,10 +210,10 @@
<AdditionalIncludeDirectories>../../Lib/MSPlatformSDK/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>Leap.lib;COMCTL32.LIB;COMDLG32.LIB;USER32.LIB;ADVAPI32.LIB;GDI32.LIB;WINMM.LIB;WS2_32.LIB;vfw32.lib;Imm32.lib;shell32.lib;shlwapi.lib;ole32.lib;RPCRT4.LIB;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>COMCTL32.LIB;COMDLG32.LIB;USER32.LIB;ADVAPI32.LIB;GDI32.LIB;WINMM.LIB;WS2_32.LIB;vfw32.lib;Imm32.lib;shell32.lib;shlwapi.lib;ole32.lib;RPCRT4.LIB;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>../../../Torque2D.exe</OutputFile>
<SuppressStartupBanner>false</SuppressStartupBanner>
<AdditionalLibraryDirectories>../../lib/LeapSDK/lib/x86;../../Lib/unicode;../../Lib/MSPlatformSDK/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>../../Lib/unicode;../../Lib/MSPlatformSDK/Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(ProjectName).pdb</ProgramDatabaseFile>
@@ -419,8 +419,6 @@
<ClCompile Include="..\..\source\gui\language\lang.cc" />
<ClCompile Include="..\..\source\gui\messageVector.cc" />
<ClCompile Include="..\..\source\input\actionMap.cc" />
<ClCompile Include="..\..\source\input\leapMotion\leapMotionManager.cc" />
<ClCompile Include="..\..\source\input\leapMotion\leapMotionUtil.cpp" />
<ClCompile Include="..\..\source\io\bitStream.cc" />
<ClCompile Include="..\..\source\io\bufferStream.cc" />
<ClCompile Include="..\..\source\io\byteBuffer.cpp" />
@@ -932,10 +930,6 @@
<ClInclude Include="..\..\source\gui\messageVector.h" />
<ClInclude Include="..\..\source\input\actionMap.h" />
<ClInclude Include="..\..\source\input\actionMap_ScriptBinding.h" />
<ClInclude Include="..\..\source\input\leapMotion\leapMotionConstants.h" />
<ClInclude Include="..\..\source\input\leapMotion\leapMotionManager.h" />
<ClInclude Include="..\..\source\input\leapMotion\LeapMotionManager_ScriptBinding.h" />
<ClInclude Include="..\..\source\input\leapMotion\leapMotionUtil.h" />
<ClInclude Include="..\..\source\io\bitStream.h" />
<ClInclude Include="..\..\source\io\bufferStream.h" />
<ClInclude Include="..\..\source\io\byteBuffer.h" />
@@ -193,9 +193,6 @@
<Filter Include="persistence\taml\xml">
<UniqueIdentifier>{cc1c1416-376b-4686-a4ac-21d1a35c9390}</UniqueIdentifier>
</Filter>
<Filter Include="input\leapMotion">
<UniqueIdentifier>{addcb993-5059-42bf-a1ea-871f700c67c3}</UniqueIdentifier>
</Filter>
<Filter Include="spine">
<UniqueIdentifier>{bb776838-ed6f-477c-b366-dd0c5c60ae5f}</UniqueIdentifier>
</Filter>
@@ -1338,12 +1335,6 @@
<ClCompile Include="..\..\source\console\Package.cc">
<Filter>console</Filter>
</ClCompile>
<ClCompile Include="..\..\source\input\leapMotion\leapMotionManager.cc">
<Filter>input\leapMotion</Filter>
</ClCompile>
<ClCompile Include="..\..\source\input\leapMotion\leapMotionUtil.cpp">
<Filter>input\leapMotion</Filter>
</ClCompile>
<ClCompile Include="..\..\source\math\mPoint.cpp">
<Filter>math</Filter>
</ClCompile>
@@ -3067,18 +3058,6 @@
<ClInclude Include="..\..\source\console\Package.h">
<Filter>console</Filter>
</ClInclude>
<ClInclude Include="..\..\source\input\leapMotion\leapMotionConstants.h">
<Filter>input\leapMotion</Filter>
</ClInclude>
<ClInclude Include="..\..\source\input\leapMotion\leapMotionManager.h">
<Filter>input\leapMotion</Filter>
</ClInclude>
<ClInclude Include="..\..\source\input\leapMotion\LeapMotionManager_ScriptBinding.h">
<Filter>input\leapMotion</Filter>
</ClInclude>
<ClInclude Include="..\..\source\input\leapMotion\leapMotionUtil.h">
<Filter>input\leapMotion</Filter>
</ClInclude>
<ClInclude Include="..\..\source\spine\Animation.h">
<Filter>spine</Filter>
</ClInclude>
@@ -812,11 +812,6 @@ bool ActionMap::getDeviceTypeAndInstance(const char *pDeviceName, U32 &deviceTyp
deviceType = GamepadDeviceType;
offset = dStrlen("gamepad");
}
else if (dStrnicmp(pDeviceName, "leapdevice", dStrlen("leapdevice")) == 0)
{
deviceType = LeapMotionDeviceType;
offset = dStrlen("leapdevice");
}
else
return false;

@@ -869,10 +864,6 @@ bool ActionMap::getDeviceName(const U32 deviceType, const U32 deviceInstance, ch
dSprintf(buffer, 16, "gamepad%d", deviceInstance);
break;

case LeapMotionDeviceType:
dStrcpy(buffer, "leapdevice");
break;

default:
Con::errorf( "ActionMap::getDeviceName: unknown device type specified, %d (inst: %d)", deviceType, deviceInstance);
return false;
@@ -1199,112 +1190,6 @@ bool ActionMap::processBind(const U32 argc, const char** argv, SimObject* object

//------------------------------------------------------------------------------

bool ActionMap::processLeap(const InputEvent* pEvent)
{
static const char *argv[5];
char buffer[64];

const Node* pNode = findNode( pEvent->deviceType, pEvent->deviceInst, pEvent->modifier, pEvent->objType );

if (pNode == NULL)
{
// Check to see if we clear the modifiers, do we find an action?
if (pEvent->modifier != 0)
pNode = findNode(pEvent->deviceType, pEvent->deviceInst, 0, pEvent->objInst);

if (pNode == NULL)
return false;
}

// "Do nothing" bind:
if ( !pNode->consoleFunction[0] )
return( true );

argv[0] = pNode->consoleFunction;

float values[3];
values[0] = pEvent->fValues[0];
values[1] = pEvent->fValues[1];
values[2] = pEvent->fValues[2];

if ( pNode->flags & Node::HasDeadZone )
{
if ( pEvent->fValues[0] >= pNode->deadZoneBegin && pEvent->fValues[0] <= pNode->deadZoneEnd )
values[0] = 0.0f;
if ( pEvent->fValues[1] >= pNode->deadZoneBegin && pEvent->fValues[1] <= pNode->deadZoneEnd )
values[1] = 0.0f;
if ( pEvent->fValues[2] >= pNode->deadZoneBegin && pEvent->fValues[2] <= pNode->deadZoneEnd )
values[2] = 0.0f;

// All values are all null, so don't bother executing the function
if (!values[0] && !values[1] && !values[2])
return true;
}

switch(pEvent->objType)
{
case LM_HANDPOS:

// ID
argv[1] = Con::getIntArg(pEvent->iValue);

// Position
dSprintf(buffer, sizeof(buffer), "%f %f %f", values[0], values[1], values[2]);

argv[2] = buffer;

if (pNode->object)
Con::executef(pNode->object, 3, argv[0], argv[1], argv[2]);
else
Con::execute(3, argv);
break;

case LM_HANDROT:

// ID
argv[1] = Con::getIntArg(pEvent->iValue);

// Rotation
dSprintf(buffer, sizeof(buffer), "%f %f %f", values[0], values[1], values[2]);

argv[2] = buffer;

if (pNode->object)
Con::executef(pNode->object, 3, argv[0], argv[1], argv[2]);
else
Con::execute(3, argv);
break;

case LM_FINGERPOS:

// IDs
argv[1] = pEvent->fingerIDs;

// X-coordinates
argv[2] = pEvent->fingersX;

// Y-coordinates
argv[3] = pEvent->fingersY;

// Z-coordinates
argv[4] = pEvent->fingersZ;

if (pNode->object)
Con::executef(pNode->object, 5, argv[0], argv[1], argv[2], argv[3], argv[4]);
else
Con::execute(5, argv);
break;

case LM_HANDAXIS:
default:
return false;
}

return true;
}

//------------------------------------------------------------------------------

bool ActionMap::processGesture(const InputEvent* pEvent)
{
static const char *argv[6];
@@ -1849,9 +1734,6 @@ bool ActionMap::processAction(const InputEvent* pEvent)
{
switch(pEvent->action)
{
case SI_LEAP:
return processLeap(pEvent);
break;
case SI_GESTURE:
return processGesture(pEvent);
break;
@@ -2263,13 +2145,6 @@ CodeMapping gVirtualMap[] =
{ "keyTapGesture", SI_GESTURE, SI_KEYTAP_GESTURE },
{ "pinchGesture", SI_GESTURE, SI_PINCH_GESTURE },
{ "scaleGesture", SI_GESTURE, SI_SCALE_GESTURE },

//-------------------------------------- GESTURE EVENTS
// Preset gesture events:
{ "leapHandAxis", SI_LEAP, LM_HANDAXIS },
{ "leapHandPos", SI_LEAP, LM_HANDPOS },
{ "leapHandRot", SI_LEAP, LM_HANDROT },
{ "leapFingerPos", SI_LEAP, LM_FINGERPOS },

//-------------------------------------- MISCELLANEOUS EVENTS
//
@@ -166,7 +166,6 @@ class ActionMap : public SimObject
static const char* buildActionString( const InputEvent* event );

bool processAction(const InputEvent*);
bool processLeap(const InputEvent*);
bool processGesture(const InputEvent*);
bool processTouch(const InputEvent*);
bool processButton(const InputEvent*);
Oops, something went wrong.

0 comments on commit 2351cf8

Please sign in to comment.