Browse Source

Linux Support: Fix problems after merging in latest development code, most importantly LeapMotion support and Spine support.

Cameron Porter 11 years ago
parent
commit
ab36e18ef9

+ 25 - 0
engine/compilers/Make/Torque2D

@@ -67,6 +67,7 @@ SOURCES := ../../lib/ljpeg/jcapimin.c \
 	../../source/2d/assets/ParticleAssetEmitter.cc \
 	../../source/2d/assets/ParticleAssetEmitter.cc \
 	../../source/2d/assets/ParticleAssetField.cc \
 	../../source/2d/assets/ParticleAssetField.cc \
 	../../source/2d/assets/ParticleAssetFieldCollection.cc \
 	../../source/2d/assets/ParticleAssetFieldCollection.cc \
+	../../source/2d/assets/SkeletonAsset.cc \
 	../../source/2d/controllers/AmbientForceController.cc \
 	../../source/2d/controllers/AmbientForceController.cc \
 	../../source/2d/controllers/BuoyancyController.cc \
 	../../source/2d/controllers/BuoyancyController.cc \
 	../../source/2d/controllers/core/GroupedSceneController.cc \
 	../../source/2d/controllers/core/GroupedSceneController.cc \
@@ -97,6 +98,7 @@ SOURCES := ../../lib/ljpeg/jcapimin.c \
 	../../source/2d/sceneobject/SceneObjectSet.cc \
 	../../source/2d/sceneobject/SceneObjectSet.cc \
 	../../source/2d/sceneobject/Scroller.cc \
 	../../source/2d/sceneobject/Scroller.cc \
 	../../source/2d/sceneobject/ShapeVector.cc \
 	../../source/2d/sceneobject/ShapeVector.cc \
+	../../source/2d/sceneobject/Skeleton.cc \
 	../../source/2d/sceneobject/Sprite.cc \
 	../../source/2d/sceneobject/Sprite.cc \
 	../../source/2d/sceneobject/Trigger.cc \
 	../../source/2d/sceneobject/Trigger.cc \
 	../../source/2d/scene/ContactFilter.cc \
 	../../source/2d/scene/ContactFilter.cc \
@@ -338,6 +340,7 @@ SOURCES := ../../lib/ljpeg/jcapimin.c \
 	../../source/math/mMathFn.cc \
 	../../source/math/mMathFn.cc \
 	../../source/math/mMatrix.cc \
 	../../source/math/mMatrix.cc \
 	../../source/math/mPlaneTransformer.cc \
 	../../source/math/mPlaneTransformer.cc \
+	../../source/math/mPoint.cpp \
 	../../source/math/mQuadPatch.cc \
 	../../source/math/mQuadPatch.cc \
 	../../source/math/mQuat.cc \
 	../../source/math/mQuat.cc \
 	../../source/math/mRandom.cc \
 	../../source/math/mRandom.cc \
@@ -399,6 +402,28 @@ SOURCES := ../../lib/ljpeg/jcapimin.c \
 	../../source/sim/SimObjectList.cc \
 	../../source/sim/SimObjectList.cc \
 	../../source/sim/simSerialize.cpp \
 	../../source/sim/simSerialize.cpp \
 	../../source/sim/simSet.cc \
 	../../source/sim/simSet.cc \
+	../../source/spine/Animation.c \
+	../../source/spine/AnimationState.c \
+	../../source/spine/AnimationStateData.c \
+	../../source/spine/Atlas.c \
+	../../source/spine/AtlasAttachmentLoader.c \
+	../../source/spine/Attachment.c \
+	../../source/spine/AttachmentLoader.c \
+	../../source/spine/Bone.c \
+	../../source/spine/BoneData.c \
+	../../source/spine/BoundingBoxAttachment.c \
+	../../source/spine/Event.c \
+	../../source/spine/EventData.c \
+	../../source/spine/extension.c \
+	../../source/spine/Json.c \
+	../../source/spine/RegionAttachment.c \
+	../../source/spine/Skeleton.c \
+	../../source/spine/SkeletonBounds.c \
+	../../source/spine/SkeletonData.c \
+	../../source/spine/SkeletonJson.c \
+	../../source/spine/Skin.c \
+	../../source/spine/Slot.c \
+	../../source/spine/SlotData.c \
 	../../source/string/findMatch.cc \
 	../../source/string/findMatch.cc \
 	../../source/string/stringBuffer.cc \
 	../../source/string/stringBuffer.cc \
 	../../source/string/stringStack.cc \
 	../../source/string/stringStack.cc \

+ 1 - 1
engine/source/2d/assets/SkeletonAsset.h

@@ -28,7 +28,7 @@
 #endif
 #endif
 
 
 #ifndef _IMAGE_ASSET_H_
 #ifndef _IMAGE_ASSET_H_
-#include "2d/assets/imageAsset.h"
+#include "2d/assets/ImageAsset.h"
 #endif
 #endif
 
 
 #ifndef SPINE_SPINE_H_
 #ifndef SPINE_SPINE_H_

+ 13 - 13
engine/source/platformX86UNIX/x86UNIXInputManager.cc

@@ -341,7 +341,7 @@ void UInputManager::resetKeyboardState()
          event.objType = SI_KEY;
          event.objType = SI_KEY;
          event.objInst = i;
          event.objInst = i;
          event.action = SI_BREAK;
          event.action = SI_BREAK;
-         event.fValue = 0.0;
+         event.fValues[0] = 0.0;
          Game->postEvent(event);
          Game->postEvent(event);
       }
       }
    }
    }
@@ -370,7 +370,7 @@ void UInputManager::resetMouseState()
          event.objType = SI_BUTTON;
          event.objType = SI_BUTTON;
          event.objInst = buttonID;
          event.objInst = buttonID;
          event.action = SI_BREAK;
          event.action = SI_BREAK;
-         event.fValue = 0.0;
+         event.fValues[0] = 0.0;
          Game->postEvent(event);
          Game->postEvent(event);
       }
       }
    }
    }
@@ -469,13 +469,13 @@ void UInputManager::mouseMotionEvent(const SDL_Event& event)
       if (event.motion.xrel != 0)
       if (event.motion.xrel != 0)
       {
       {
          ievent.objType = SI_XAXIS;
          ievent.objType = SI_XAXIS;
-         ievent.fValue = event.motion.xrel;
+         ievent.fValues[0] = event.motion.xrel;
          Game->postEvent(ievent);
          Game->postEvent(ievent);
       }
       }
       if (event.motion.yrel != 0)
       if (event.motion.yrel != 0)
       {
       {
          ievent.objType = SI_YAXIS;
          ievent.objType = SI_YAXIS;
-         ievent.fValue = event.motion.yrel; 
+         ievent.fValues[0] = event.motion.yrel; 
          Game->postEvent(ievent);
          Game->postEvent(ievent);
       }
       }
 #ifdef LOG_INPUT
 #ifdef LOG_INPUT
@@ -526,7 +526,7 @@ void UInputManager::joyButtonEvent(U8 deviceID, U8 buttonNum, bool pressed)
    ievent.objType = SI_BUTTON;
    ievent.objType = SI_BUTTON;
    ievent.objInst = objInst;
    ievent.objInst = objInst;
    ievent.action = action;
    ievent.action = action;
-   ievent.fValue = (action == SI_MAKE) ? 1.0 : 0.0;
+   ievent.fValues[0] = (action == SI_MAKE) ? 1.0 : 0.0;
 
 
    Game->postEvent(ievent);
    Game->postEvent(ievent);
 #ifdef LOG_INPUT
 #ifdef LOG_INPUT
@@ -557,7 +557,7 @@ void UInputManager::joyHatEvent(U8 deviceID, U8 hatNum,
 
 
    // first break any positions that are no longer valid
    // first break any positions that are no longer valid
    ievent.action = SI_BREAK;
    ievent.action = SI_BREAK;
-   ievent.fValue = 0.0;
+   ievent.fValues[0] = 0.0;
 
 
    if (prevHatState & SDL_HAT_UP && !(currHatState & SDL_HAT_UP))
    if (prevHatState & SDL_HAT_UP && !(currHatState & SDL_HAT_UP))
    {
    {
@@ -594,7 +594,7 @@ void UInputManager::joyHatEvent(U8 deviceID, U8 hatNum,
 
 
    // now do the make events
    // now do the make events
    ievent.action = SI_MAKE;
    ievent.action = SI_MAKE;
-   ievent.fValue = 1.0;
+   ievent.fValues[0] = 1.0;
 
 
    if (!(prevHatState & SDL_HAT_UP) && currHatState & SDL_HAT_UP)
    if (!(prevHatState & SDL_HAT_UP) && currHatState & SDL_HAT_UP)
    {
    {
@@ -674,13 +674,13 @@ void UInputManager::joyAxisEvent(U8 deviceID, U8 axisNum, S16 axisValue)
    ievent.objType = axisInfo.type;
    ievent.objType = axisInfo.type;
    ievent.objInst = 0;
    ievent.objInst = 0;
    ievent.action = SI_MOVE;
    ievent.action = SI_MOVE;
-   ievent.fValue = scaledValue;
+   ievent.fValues[0] = scaledValue;
 
 
    Game->postEvent(ievent);
    Game->postEvent(ievent);
 
 
 #ifdef LOG_INPUT
 #ifdef LOG_INPUT
       Input::log( "EVENT (Input): joystick axis %d moved: %.1f.\n",
       Input::log( "EVENT (Input): joystick axis %d moved: %.1f.\n",
-         axisNum, ievent.fValue);
+         axisNum, ievent.fValues[0]);
 #endif
 #endif
 
 
 }
 }
@@ -735,11 +735,11 @@ void UInputManager::mouseButtonEvent(const SDL_Event& event)
       ievent.objType = SI_ZAXIS;
       ievent.objType = SI_ZAXIS;
       ievent.objInst = 0;
       ievent.objInst = 0;
       ievent.action = SI_MOVE;
       ievent.action = SI_MOVE;
-      ievent.fValue = wheelDelta;
+      ievent.fValues[0] = wheelDelta;
 #ifdef LOG_INPUT
 #ifdef LOG_INPUT
       Input::log( "EVENT (Input): mouse wheel moved %s: %.1f. MODS:%c%c%c\n",
       Input::log( "EVENT (Input): mouse wheel moved %s: %.1f. MODS:%c%c%c\n",
          wheelDelta > 0 ? "up" : "down",
          wheelDelta > 0 ? "up" : "down",
-         ievent.fValue,
+         ievent.fValues[0],
          ( mModifierKeys & SI_SHIFT ? 'S' : '.' ), 
          ( mModifierKeys & SI_SHIFT ? 'S' : '.' ), 
          ( mModifierKeys & SI_CTRL ? 'C' : '.' ), 
          ( mModifierKeys & SI_CTRL ? 'C' : '.' ), 
          ( mModifierKeys & SI_ALT ? 'A' : '.' ));
          ( mModifierKeys & SI_ALT ? 'A' : '.' ));
@@ -754,7 +754,7 @@ void UInputManager::mouseButtonEvent(const SDL_Event& event)
       ievent.objType = SI_BUTTON;
       ievent.objType = SI_BUTTON;
       ievent.objInst = objInst;
       ievent.objInst = objInst;
       ievent.action = action;
       ievent.action = action;
-      ievent.fValue = (action == SI_MAKE) ? 1.0 : 0.0;
+      ievent.fValues[0] = (action == SI_MAKE) ? 1.0 : 0.0;
 #ifdef LOG_INPUT
 #ifdef LOG_INPUT
       Input::log( "EVENT (Input): mouse button%d %s. MODS:%c%c%c\n",
       Input::log( "EVENT (Input): mouse button%d %s. MODS:%c%c%c\n",
          buttonID,
          buttonID,
@@ -872,7 +872,7 @@ void UInputManager::keyEvent(const SDL_Event& event)
    if (action == SI_MAKE && mKeyboardState[ievent.objInst])
    if (action == SI_MAKE && mKeyboardState[ievent.objInst])
       action = SI_REPEAT;
       action = SI_REPEAT;
    ievent.action = action;
    ievent.action = action;
-   ievent.fValue = (action == SI_MAKE || action == SI_REPEAT) ? 1.0 : 0.0;
+   ievent.fValues[0] = (action == SI_MAKE || action == SI_REPEAT) ? 1.0 : 0.0;
 
 
    processKeyEvent(ievent);
    processKeyEvent(ievent);
    Game->postEvent(ievent);
    Game->postEvent(ievent);