Browse Source

Added Node::setUserObject(Ref* obj)
Fixed JoystickControl from break on lua binding generation.
Stripped Win32 Configs from encoder and luagen projects.
Updated encoder to use latest FBX SDK 2015.1 on VS2013 project.

seanpaultaylor 11 years ago
parent
commit
fe9892b95e

+ 3 - 25
gameplay/src/Control.cpp

@@ -45,14 +45,12 @@ Control::AutoSize Control::parseAutoSize(const char* str)
 {
     if (str == NULL)
         return _autoSize;
-
     if (strcmpnocase(str, "AUTO_SIZE_WIDTH") == 0 )
         return AUTO_SIZE_WIDTH;
     if (strcmpnocase(str, "AUTO_SIZE_HEIGHT") == 0)
         return AUTO_SIZE_HEIGHT;
     if (strcmpnocase(str, "AUTO_SIZE_BOTH") == 0)
         return AUTO_SIZE_BOTH;
-
     return _autoSize;
 }
 
@@ -69,8 +67,7 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
             // The passed in style is our parent control's style : attempt to load our style from it.
             _style = style->getTheme()->getStyle(styleName);
         }
-
-        if (!_style)
+        else
         {
             // Use an empty style from our parent's theme
             _style = style->getTheme()->getEmptyStyle();
@@ -86,17 +83,14 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
     {
         // Search for a style from the default theme that matches this control's name
         _style = Theme::getDefault()->getStyle(typeName);
-
         if (!_style)
         {
             // No style was found, use an empty style
             _style = style ? style->getTheme()->getEmptyStyle() : Theme::getDefault()->getEmptyStyle();
         }
     }
-
     // Increase the reference count of the style's theme while we hold the style
     _style->getTheme()->addRef();
-
     if (properties)
     {
         const char* id = properties->getId();
@@ -105,11 +99,8 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
 
 		// Properties not defined by the style.
 		const char* alignmentString = properties->getString("alignment");
-
 		_alignment = getAlignment(alignmentString);
-
 		_consumeInputEvents = properties->getBool("consumeInputEvents", true);
-
 		_visible = properties->getBool("visible", true);
 
 		if (properties->exists("zIndex"))
@@ -120,10 +111,8 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
 		{
 			_zIndex = -1;
 		}
-
 		if (properties->exists("canFocus"))
 			_canFocus = properties->getBool("canFocus", false);
-
 		if (properties->exists("focusIndex"))
 		{
 			_focusIndex = properties->getInt("focusIndex");
@@ -132,7 +121,6 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
 		{
 			_focusIndex = -1;
 		}
-
 		float bounds[2];
 		bool boundsBits[2];
         const char* position = properties->getString("position");
@@ -154,7 +142,6 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
                 setY(bounds[1], boundsBits[1]);
             }
 		}
-
         // If there is an explicitly specified size, width or height, unset the corresponding autoSize bit
         const char* size = properties->getString("size");
         if (size && parseCoordPair(size, &bounds[0], &bounds[1], &boundsBits[0], &boundsBits[1]))
@@ -177,7 +164,6 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
                 setHeight(bounds[1], boundsBits[1]);
             }
 		}
-
         // Backwards Compatibility: Support deprecated autoWidth and autoHeight properties,
         // which resolve to width=100% and height=100%.
         if (properties->getBool("autoWidth"))
@@ -248,7 +234,6 @@ void Control::initialize(const char* typeName, Theme::Style* style, Properties*
 				setPadding(innerSpace->getFloat("top"), innerSpace->getFloat("bottom"),
 					innerSpace->getFloat("left"), innerSpace->getFloat("right"));
 			}
-
 			innerSpace = properties->getNextNamespace();
 		}
 	}
@@ -561,10 +546,10 @@ void Control::setEnabled(bool enabled)
     if (enabled != isEnabled())
     {
         if (!enabled)
+        {
             Form::controlDisabled(this);
-
+        }
         _state = enabled ? NORMAL : DISABLED;
-
         setDirty(DIRTY_STATE);
     }
 }
@@ -578,7 +563,6 @@ bool Control::isEnabledInHierarchy() const
 {
     if (!isEnabled())
         return false;
-
     if (_parent)
         return _parent->isEnabledInHierarchy();
 
@@ -596,7 +580,6 @@ void Control::setBorder(float top, float bottom, float left, float right, unsign
         if (overlays[i])
             overlays[i]->setBorder(top, bottom, left, right);
     }
-
     setDirty(DIRTY_BOUNDS);
 }
 
@@ -1734,7 +1717,6 @@ void Control::overrideThemedProperties(Properties* properties, unsigned char sta
     {
         setTextRightToLeft(properties->getBool("rightToLeft"), states);
     }
-
     if (properties->exists("opacity"))
     {
         setOpacity(properties->getFloat("opacity"), states);
@@ -1752,7 +1734,6 @@ void Control::setImageList(Theme::ImageList* imageList, unsigned char states)
         if( overlays[i] )
             overlays[i]->setImageList(imageList);
     }
-
     if (_autoSize != AUTO_SIZE_NONE)
         setDirty(DIRTY_BOUNDS);
 }
@@ -1781,7 +1762,6 @@ void Control::setSkin(Theme::Skin* skin, unsigned char states)
         if( overlays[i] )
             overlays[i]->setSkin(skin);
     }
-
     if (_autoSize != AUTO_SIZE_NONE)
         setDirty(DIRTY_BOUNDS);
 }
@@ -1864,8 +1844,6 @@ Control::Alignment Control::getAlignment(const char* alignment)
     {
         GP_ERROR("Failed to get corresponding control alignment for unsupported value '%s'.", alignment);
     }
-
-    // Default.
     return Control::ALIGN_TOP_LEFT;
 }
 

+ 8 - 8
gameplay/src/JoystickControl.cpp

@@ -125,7 +125,7 @@ unsigned int JoystickControl::getIndex() const
     return _index;
 }
 
-void setBit(bool set, int& bitSetOut, int bit)
+void JoystickControl::setBoundsBit(bool set, int& bitSetOut, int bit)
 {
     if(set)
     {
@@ -140,7 +140,7 @@ void setBit(bool set, int& bitSetOut, int bit)
 void JoystickControl::setRadius(float radius, bool isPercentage)
 {
     _radiusCoord = radius;
-    setBit(isPercentage, _boundsBits, BOUNDS_RADIUS_PERCENTAGE_BIT);
+    setBoundsBit(isPercentage, _boundsBits, BOUNDS_RADIUS_PERCENTAGE_BIT);
     updateAbsoluteSizes();
 }
 
@@ -174,7 +174,7 @@ void JoystickControl::initialize(const char* typeName, Theme::Style* style, Prop
         const char* radiusStr = properties->getString(radiusId);
         bool isPercentage = false;
         _radiusCoord = parseCoord(radiusStr, &isPercentage);
-        setBit(isPercentage, _boundsBits, BOUNDS_RADIUS_PERCENTAGE_BIT);
+        setBoundsBit(isPercentage, _boundsBits, BOUNDS_RADIUS_PERCENTAGE_BIT);
     }
 
     const char* relativeId = "relative";
@@ -213,17 +213,17 @@ void JoystickControl::updateAbsoluteBounds(const Vector2& offset)
 void JoystickControl::setRegion(const Vector2& regionSizeIn, Vector2& regionSizeOut, int& regionBoundsBitsOut, bool isWidthPercentage, bool isHeightPercentage)
 {
     regionSizeOut = regionSizeIn;
-    setBit(isWidthPercentage, regionBoundsBitsOut, BOUNDS_WIDTH_PERCENTAGE_BIT);
-    setBit(isHeightPercentage, regionBoundsBitsOut, BOUNDS_HEIGHT_PERCENTAGE_BIT);
+    setBoundsBit(isWidthPercentage, regionBoundsBitsOut, BOUNDS_WIDTH_PERCENTAGE_BIT);
+    setBoundsBit(isHeightPercentage, regionBoundsBitsOut, BOUNDS_HEIGHT_PERCENTAGE_BIT);
 }
 
-void JoystickControl::getRegion(Vector2& regionOut, int & regionBoundsBitsOut, const char* regionPropertyId) const
+void JoystickControl::getRegion(Vector2& regionOut, int& regionBoundsBitsOut, const char* regionPropertyId)
 {
     bool isWidthPercent = false;
     bool isHeightPercent = false;
     parseCoordPair(regionPropertyId, &regionOut.x, &regionOut.y, &isWidthPercent, &isHeightPercent);
-    setBit(isWidthPercent, regionBoundsBitsOut, BOUNDS_WIDTH_PERCENTAGE_BIT);
-    setBit(isHeightPercent, regionBoundsBitsOut, BOUNDS_HEIGHT_PERCENTAGE_BIT);
+    setBoundsBit(isWidthPercent, regionBoundsBitsOut, BOUNDS_WIDTH_PERCENTAGE_BIT);
+    setBoundsBit(isHeightPercent, regionBoundsBitsOut, BOUNDS_HEIGHT_PERCENTAGE_BIT);
 }
 
 Vector2 JoystickControl::getPixelSize(const Vector2& region, const int regionBoundsBits) const

+ 3 - 6
gameplay/src/JoystickControl.h

@@ -202,14 +202,11 @@ protected:
 
 private:
 
-    /**
-     * Copy constructor.
-     */
     JoystickControl(const JoystickControl& copy);
 
     void setRegion(const Vector2& regionSizeIn, Vector2& regionSizeOut, int& regionBoundsBitsOut, bool isWidthPercentage, bool isHeightPercentage);
 
-    void getRegion(Vector2& regionOut, int & regionBoundsBitsOut, const char* regionPropertyId) const;
+    void getRegion(Vector2& regionOut, int& regionBoundsBitsOut, const char* regionPropertyId);
 
     Vector2 getPixelSize(const Vector2& region, const int regionBoundsBits) const;
 
@@ -219,17 +216,17 @@ private:
 
     void updateAbsoluteSizes();
 
+    void setBoundsBit(bool set, int& bitSetOut, int bit);
+
     float _radiusCoord;
     Vector2* _innerRegionCoord;
     Vector2* _outerRegionCoord;
     int _innerRegionCoordBoundsBits;
     int _outerRegionCoordBoundsBits;
-
     float _radiusPixels;
     Vector2* _innerSizePixels;
     Vector2* _outerSizePixels;
     Rectangle _screenRegionPixels;
-
     bool _relative;
     Vector2 _value;
     Vector2 _displacement;

+ 73 - 84
gameplay/src/Node.cpp

@@ -12,19 +12,21 @@
 #include "Game.h"
 #include "Drawable.h"
 #include "Form.h"
+#include "Ref.h"
 
 // Node dirty flags
 #define NODE_DIRTY_WORLD 1
 #define NODE_DIRTY_BOUNDS 2
-#define NODE_DIRTY_ALL (NODE_DIRTY_WORLD | NODE_DIRTY_BOUNDS)
+#define NODE_DIRTY_HIERARCHY 4
+#define NODE_DIRTY_ALL (NODE_DIRTY_WORLD | NODE_DIRTY_BOUNDS | NODE_DIRTY_HIERARCHY)
 
 namespace gameplay
 {
 
 Node::Node(const char* id)
     : _scene(NULL), _firstChild(NULL), _nextSibling(NULL), _prevSibling(NULL), _parent(NULL), _childCount(0), _enabled(true), _tags(NULL),
-      _drawable(NULL), _camera(NULL), _light(NULL), _audioSource(NULL), _collisionObject(NULL), _agent(NULL),
-      _dirtyBits(NODE_DIRTY_ALL), _notifyHierarchyChanged(true)
+    _drawable(NULL), _camera(NULL), _light(NULL), _audioSource(NULL), _collisionObject(NULL), _agent(NULL), _userObject(NULL),
+      _dirtyBits(NODE_DIRTY_ALL)
 {
     GP_REGISTER_SCRIPT_EVENTS();
     if (id)
@@ -36,7 +38,6 @@ Node::Node(const char* id)
 Node::~Node()
 {
     removeAllChildren();
-
     if (_drawable)
         _drawable->setNode(NULL);
     if (_audioSource)
@@ -47,6 +48,7 @@ Node::~Node()
     SAFE_RELEASE(_light);
     SAFE_RELEASE(_audioSource);
     SAFE_DELETE(_collisionObject);
+    SAFE_RELEASE(_userObject);
     SAFE_DELETE(_tags);
     setAgent(NULL);
 }
@@ -88,7 +90,6 @@ void Node::addChild(Node* child)
         // This node is already present in our hierarchy
         return;
     }
-
     child->addRef();
 
     // If the item belongs to another hierarchy, remove it first.
@@ -100,7 +101,6 @@ void Node::addChild(Node* child)
     {
         child->_scene->removeNode(child);
     }
-
     // Add child to the end of the list.
     // NOTE: This is different than the original behavior which inserted nodes
     // into the beginning of the list. Although slightly slower to add to the
@@ -118,14 +118,11 @@ void Node::addChild(Node* child)
     {
         _firstChild = child;
     }
-
     child->_parent = this;
-
     ++_childCount;
-
     setBoundsDirty();
 
-    if (_notifyHierarchyChanged)
+    if (_dirtyBits & NODE_DIRTY_HIERARCHY)
     {
         hierarchyChanged();
     }
@@ -138,23 +135,19 @@ void Node::removeChild(Node* child)
         // The child is not in our hierarchy.
         return;
     }
-
     // Call remove on the child.
     child->remove();
-
     SAFE_RELEASE(child);
 }
 
 void Node::removeAllChildren()
 {
-    _notifyHierarchyChanged = false;
-
+    _dirtyBits &= ~NODE_DIRTY_HIERARCHY;
     while (_firstChild)
     {
         removeChild(_firstChild);
     }
-
-    _notifyHierarchyChanged = true;
+    _dirtyBits |= NODE_DIRTY_HIERARCHY;
     hierarchyChanged();
 }
 
@@ -169,7 +162,6 @@ void Node::remove()
     {
         _nextSibling->_prevSibling = _prevSibling;
     }
-
     // Update our parent.
     Node* parent = _parent;
     if (parent)
@@ -178,15 +170,13 @@ void Node::remove()
         {
             parent->_firstChild = _nextSibling;
         }
-
         --parent->_childCount;
     }
-
     _nextSibling = NULL;
     _prevSibling = NULL;
     _parent = NULL;
 
-    if (parent && parent->_notifyHierarchyChanged)
+    if (parent && parent->_dirtyBits & NODE_DIRTY_HIERARCHY)
     {
         parent->hierarchyChanged();
     }
@@ -248,7 +238,6 @@ Node* Node::findNode(const char* id, bool recursive, bool exactMatch) const
             }
         }
     }
-
     // Search immediate children first.
     for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
     {
@@ -258,7 +247,6 @@ Node* Node::findNode(const char* id, bool recursive, bool exactMatch) const
             return child;
         }
     }
-
     // Recurse.
     if (recursive)
     {
@@ -271,7 +259,6 @@ Node* Node::findNode(const char* id, bool recursive, bool exactMatch) const
             }
         }
     }
-
     return NULL;
 }
 
@@ -279,9 +266,8 @@ unsigned int Node::findNodes(const char* id, std::vector<Node*>& nodes, bool rec
 {
     GP_ASSERT(id);
 
-    unsigned int count = 0;
-
     // If the drawable is a model with a mesh skin, search the skin's hierarchy as well.
+    unsigned int count = 0;
     Node* rootNode = NULL;
     Model* model = dynamic_cast<Model*>(_drawable);
     if (model)
@@ -296,7 +282,6 @@ unsigned int Node::findNodes(const char* id, std::vector<Node*>& nodes, bool rec
             count += rootNode->findNodes(id, nodes, true, exactMatch);
         }
     }
-
     // Search immediate children first.
     for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
     {
@@ -307,7 +292,6 @@ unsigned int Node::findNodes(const char* id, std::vector<Node*>& nodes, bool rec
             ++count;
         }
     }
-
     // Recurse.
     if (recursive)
     {
@@ -332,14 +316,12 @@ Scene* Node::getScene() const
         if (scene)
             return scene;
     }
-
     return NULL;
 }
 
 bool Node::hasTag(const char* name) const
 {
     GP_ASSERT(name);
-
     return (_tags ? _tags->find(name) != _tags->end() : false);
 }
 
@@ -462,7 +444,6 @@ const Matrix& Node::getWorldMatrix() const
             }
         }
     }
-
     return _world;
 }
 
@@ -626,7 +607,6 @@ Vector3 Node::getActiveCameraTranslationWorld() const
             }
         }
     }
-
     return Vector3::zero();
 }
 
@@ -645,13 +625,13 @@ Vector3 Node::getActiveCameraTranslationView() const
             }
         }
     }
-
     return Vector3::zero();
 }
 
 void Node::hierarchyChanged()
 {
     // When our hierarchy changes our world transform is affected, so we must dirty it.
+    _dirtyBits |= NODE_DIRTY_HIERARCHY;
     transformChanged();
 }
 
@@ -677,7 +657,6 @@ void Node::transformChanged()
             n->transformChanged();
         }
     }
-
     Transform::transformChanged();
 }
 
@@ -758,21 +737,21 @@ Camera* Node::getCamera() const
 
 void Node::setCamera(Camera* camera)
 {
-    if (_camera != camera)
+    if (_camera == camera)
+        return;
+
+    if (_camera)
     {
-        if (_camera)
-        {
-            _camera->setNode(NULL);
-            SAFE_RELEASE(_camera);
-        }
+        _camera->setNode(NULL);
+        SAFE_RELEASE(_camera);
+    }
 
-        _camera = camera;
+    _camera = camera;
 
-        if (_camera)
-        {
-            _camera->addRef();
-            _camera->setNode(this);
-        }
+    if (_camera)
+    {
+        _camera->addRef();
+        _camera->setNode(this);
     }
 }
 
@@ -783,24 +762,24 @@ Light* Node::getLight() const
 
 void Node::setLight(Light* light)
 {
-    if (_light != light)
-    {
-        if (_light)
-        {
-            _light->setNode(NULL);
-            SAFE_RELEASE(_light);
-        }
+    if (_light == light)
+        return;
 
-        _light = light;
+    if (_light)
+    {
+        _light->setNode(NULL);
+        SAFE_RELEASE(_light);
+    }
 
-        if (_light)
-        {
-            _light->addRef();
-            _light->setNode(this);
-        }
+    _light = light;
 
-        setBoundsDirty();
+    if (_light)
+    {
+        _light->addRef();
+        _light->setNode(this);
     }
+
+    setBoundsDirty();
 }
 
 Drawable* Node::getDrawable() const
@@ -1032,20 +1011,20 @@ AudioSource* Node::getAudioSource() const
 void Node::setAudioSource(AudioSource* audio)
 {
     if (_audioSource != audio)
+        return;
+
+    if (_audioSource)
     {
-        if (_audioSource)
-        {
-            _audioSource->setNode(NULL);
-            SAFE_RELEASE(_audioSource);
-        }
+        _audioSource->setNode(NULL);
+        SAFE_RELEASE(_audioSource);
+    }
         
-        _audioSource = audio;
+    _audioSource = audio;
 
-        if (_audioSource)
-        {
-            _audioSource->addRef();
-            _audioSource->setNode(this);
-        }
+    if (_audioSource)
+    {
+        _audioSource->addRef();
+        _audioSource->setNode(this);
     }
 }
 
@@ -1196,26 +1175,36 @@ AIAgent* Node::getAgent() const
 
 void Node::setAgent(AIAgent* agent)
 {
-    if (agent != _agent)
+    if (agent == _agent)
+        return;
+
+    if (_agent)
     {
-        if (_agent)
-        {
-            Game::getInstance()->getAIController()->removeAgent(_agent);
-            _agent->setNode(NULL);
-            SAFE_RELEASE(_agent);
-        }
+        Game::getInstance()->getAIController()->removeAgent(_agent);
+        _agent->setNode(NULL);
+        SAFE_RELEASE(_agent);
+    }
 
-        _agent = agent;
+    _agent = agent;
 
-        if (_agent)
-        {
-            _agent->addRef();
-            _agent->setNode(this);
-            Game::getInstance()->getAIController()->addAgent(_agent);
-        }
+    if (_agent)
+    {
+        _agent->addRef();
+        _agent->setNode(this);
+        Game::getInstance()->getAIController()->addAgent(_agent);
     }
 }
 
+Ref* Node::getUserObject() const
+{
+    return _userObject;
+}
+
+void Node::setUserObject(Ref* obj)
+{
+    _userObject = obj;
+}
+
 NodeCloneContext::NodeCloneContext()
 {
 }

+ 21 - 90
gameplay/src/Node.h

@@ -30,14 +30,14 @@ class Drawable;
  * Defines a hierarchical structure of objects in 3D transformation spaces.
  *
  * This object allow you to attach components to a scene such as:
- * Model, Camera, Light, PhysicsCollisionObject, AudioSource, ParticleEmitter and
- * Form components.
+ * Drawable's(Model, Camera, Light, PhysicsCollisionObject, AudioSource, etc.
  *
  * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Node
  */
 class Node : public Transform, public Ref
 {
     friend class Scene;
+    friend class SceneLoader;
     friend class Bundle;
     friend class MeshSkin;
     friend class Light;
@@ -540,7 +540,6 @@ public:
                                                PhysicsRigidBody::Parameters* rigidBodyParameters = NULL,
                                                int group = PHYSICS_COLLISION_GROUP_DEFAULT,
                                                int mask = PHYSICS_COLLISION_MASK_DEFAULT);
-
     /**
      * Sets the physics collision object for this node using the data from the Properties object defined at the specified URL,
      * where the URL is of the format "<file-path>.<extension>#<namespace-id>/<namespace-id>/.../<namespace-id>"
@@ -551,14 +550,7 @@ public:
     PhysicsCollisionObject* setCollisionObject(const char* url);
 
     /**
-     * Sets the physics collision object for this node from the given properties object.
-     *
-     * @param properties The properties object defining the collision object.
-     */
-    PhysicsCollisionObject* setCollisionObject(Properties* properties);
-
-    /**
-     * Returns the AI agent assigned to this node.
+     * Gets the AI agent assigned to this node
      *
      * @return The AI agent for this node.
      */
@@ -571,6 +563,20 @@ public:
      */
     void setAgent(AIAgent* agent);
 
+    /**
+     * Gets the user object assigned to this node.
+     *
+     * @return The user object assigned object to this node.
+     */
+    Ref* getUserObject() const;
+
+    /**
+    * Sets a user object to be assigned object to this node.
+    *
+    * @param obj The user object assigned object to this node.
+    */
+    void setUserObject(Ref* obj);
+
     /**
      * Returns the bounding sphere for the Node, in world space.
      *
@@ -670,108 +676,33 @@ private:
      */
     Node& operator=(const Node&);
 
+    PhysicsCollisionObject* setCollisionObject(Properties* properties);
+
 protected:
 
-    /**
-     * The Scene this node belongs to.
-     */
     Scene* _scene;
-
-    /**
-     * Node's ID.
-     */
     std::string _id;
-
-    /**
-     * Node's first child.
-     */
     Node* _firstChild;
-
-    /**
-     * Node's next child.
-     */
     Node* _nextSibling;
-
-    /**
-     * Node's previous sibling.
-     */
     Node* _prevSibling;
-
-    /**
-     * Node's parent.
-     */
     Node* _parent;
-
-    /**
-     * The number of children belonging to the Node.
-     */
     unsigned int _childCount;
-
-    /**
-     * If this node is enabled in the scene.
-     * This may not be enabled in hierarchy if its parents are not enabled.
-     */
-    bool _enabled;
-
-    /**
-     * List of tags for a node.
-     */
+    bool _enabled; 
     std::map<std::string, std::string>* _tags;
-
-    /**
-     * Drawable objects attached to the Node.
-     */
     Drawable* _drawable;
-
-    /**
-     * Camera attached to the Node.
-     */
     Camera* _camera;
-
-    /**
-     * Light attached to the Node.
-     */
     Light* _light;
-
-    /**
-     * Pointer to the AudioSource attached to the Node.
-     */
     AudioSource* _audioSource;
-
-    /**
-     * Pointer to the PhysicsCollisionObject attached to the Node.
-     */
     PhysicsCollisionObject* _collisionObject;
-
-    /**
-     * Pointer to the AI agent attached to the Node.
-     */
     mutable AIAgent* _agent;
-
-    /**
-     * World Matrix representation of the Node.
-     */
+    Ref* _userObject;
     mutable Matrix _world;
-
-    /**
-     * Dirty bits flag for the Node.
-     */
     mutable int _dirtyBits;
-
-    /**
-     * A flag indicating if the Node's hierarchy has changed.
-     */
-    bool _notifyHierarchyChanged;
-
-    /**
-     * The Bounding Sphere containing the Node.
-     */
     mutable BoundingSphere _bounds;
 };
 
 /**
  * NodeCloneContext represents the context data that is kept when cloning a node.
- *
  * The NodeCloneContext is used to make sure objects don't get cloned twice.
  */
 class NodeCloneContext

+ 88 - 30
gameplay/src/lua/lua_Joint.cpp

@@ -98,6 +98,7 @@ void luaRegister_Joint()
         {"getTypeName", lua_Joint_getTypeName},
         {"getUpVector", lua_Joint_getUpVector},
         {"getUpVectorWorld", lua_Joint_getUpVectorWorld},
+        {"getUserObject", lua_Joint_getUserObject},
         {"getViewMatrix", lua_Joint_getViewMatrix},
         {"getViewProjectionMatrix", lua_Joint_getViewProjectionMatrix},
         {"getWorldMatrix", lua_Joint_getWorldMatrix},
@@ -143,6 +144,7 @@ void luaRegister_Joint()
         {"setTranslationX", lua_Joint_setTranslationX},
         {"setTranslationY", lua_Joint_setTranslationY},
         {"setTranslationZ", lua_Joint_setTranslationZ},
+        {"setUserObject", lua_Joint_setUserObject},
         {"transformPoint", lua_Joint_transformPoint},
         {"transformVector", lua_Joint_transformVector},
         {"translate", lua_Joint_translate},
@@ -3591,6 +3593,50 @@ int lua_Joint_getUpVectorWorld(lua_State* state)
     return 0;
 }
 
+int lua_Joint_getUserObject(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Joint* instance = getInstance(state);
+                void* returnPtr = ((void*)instance->getUserObject());
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Ref");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Joint_getUserObject - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joint_getViewMatrix(lua_State* state)
 {
     // Get the number of parameters.
@@ -5096,36 +5142,6 @@ int lua_Joint_setCollisionObject(lua_State* state)
                 }
             } while (0);
 
-            do
-            {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
-                {
-                    // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Properties> param1 = gameplay::ScriptUtil::getObjectPointer<Properties>(2, "Properties", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
-
-                    Joint* instance = getInstance(state);
-                    void* returnPtr = ((void*)instance->setCollisionObject(param1));
-                    if (returnPtr)
-                    {
-                        gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
-                        object->instance = returnPtr;
-                        object->owns = false;
-                        luaL_getmetatable(state, "PhysicsCollisionObject");
-                        lua_setmetatable(state, -2);
-                    }
-                    else
-                    {
-                        lua_pushnil(state);
-                    }
-
-                    return 1;
-                }
-            } while (0);
-
             lua_pushstring(state, "lua_Joint_setCollisionObject - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
@@ -6073,6 +6089,48 @@ int lua_Joint_setTranslationZ(lua_State* state)
     return 0;
 }
 
+int lua_Joint_setUserObject(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Ref> param1 = gameplay::ScriptUtil::getObjectPointer<Ref>(2, "Ref", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Ref'.");
+                    lua_error(state);
+                }
+
+                Joint* instance = getInstance(state);
+                instance->setUserObject(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Joint_setUserObject - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joint_static_ANIMATE_ROTATE(lua_State* state)
 {
     // Validate the number of parameters.

+ 2 - 0
gameplay/src/lua/lua_Joint.h

@@ -72,6 +72,7 @@ int lua_Joint_getType(lua_State* state);
 int lua_Joint_getTypeName(lua_State* state);
 int lua_Joint_getUpVector(lua_State* state);
 int lua_Joint_getUpVectorWorld(lua_State* state);
+int lua_Joint_getUserObject(lua_State* state);
 int lua_Joint_getViewMatrix(lua_State* state);
 int lua_Joint_getViewProjectionMatrix(lua_State* state);
 int lua_Joint_getWorldMatrix(lua_State* state);
@@ -117,6 +118,7 @@ int lua_Joint_setTranslation(lua_State* state);
 int lua_Joint_setTranslationX(lua_State* state);
 int lua_Joint_setTranslationY(lua_State* state);
 int lua_Joint_setTranslationZ(lua_State* state);
+int lua_Joint_setUserObject(lua_State* state);
 int lua_Joint_static_ANIMATE_ROTATE(lua_State* state);
 int lua_Joint_static_ANIMATE_ROTATE_TRANSLATE(lua_State* state);
 int lua_Joint_static_ANIMATE_SCALE(lua_State* state);

+ 383 - 4
gameplay/src/lua/lua_JoystickControl.cpp

@@ -62,6 +62,7 @@ void luaRegister_JoystickControl()
         {"getOuterRegionSize", lua_JoystickControl_getOuterRegionSize},
         {"getPadding", lua_JoystickControl_getPadding},
         {"getParent", lua_JoystickControl_getParent},
+        {"getRadius", lua_JoystickControl_getRadius},
         {"getRefCount", lua_JoystickControl_getRefCount},
         {"getScriptEvent", lua_JoystickControl_getScriptEvent},
         {"getSkinColor", lua_JoystickControl_getSkinColor},
@@ -86,6 +87,7 @@ void luaRegister_JoystickControl()
         {"isEnabled", lua_JoystickControl_isEnabled},
         {"isEnabledInHierarchy", lua_JoystickControl_isEnabledInHierarchy},
         {"isHeightPercentage", lua_JoystickControl_isHeightPercentage},
+        {"isRadiusPercentage", lua_JoystickControl_isRadiusPercentage},
         {"isRelative", lua_JoystickControl_isRelative},
         {"isVisible", lua_JoystickControl_isVisible},
         {"isVisibleInHierarchy", lua_JoystickControl_isVisibleInHierarchy},
@@ -120,6 +122,7 @@ void luaRegister_JoystickControl()
         {"setOuterRegionSize", lua_JoystickControl_setOuterRegionSize},
         {"setPadding", lua_JoystickControl_setPadding},
         {"setPosition", lua_JoystickControl_setPosition},
+        {"setRadius", lua_JoystickControl_setRadius},
         {"setRelative", lua_JoystickControl_setRelative},
         {"setSize", lua_JoystickControl_setSize},
         {"setSkinColor", lua_JoystickControl_setSkinColor},
@@ -1943,9 +1946,73 @@ int lua_JoystickControl_getInnerRegionSize(lua_State* state)
             lua_error(state);
             break;
         }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<bool> param1 = gameplay::ScriptUtil::getBoolPointer(2);
+
+                JoystickControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getInnerRegionSize(param1));
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Vector2");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_getInnerRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                (lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TLIGHTUSERDATA))
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<bool> param1 = gameplay::ScriptUtil::getBoolPointer(2);
+
+                // Get parameter 2 off the stack.
+                gameplay::ScriptUtil::LuaArray<bool> param2 = gameplay::ScriptUtil::getBoolPointer(3);
+
+                JoystickControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getInnerRegionSize(param1, param2));
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Vector2");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_getInnerRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
         default:
         {
-            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_pushstring(state, "Invalid number of parameters (expected 1, 2 or 3).");
             lua_error(state);
             break;
         }
@@ -2087,9 +2154,73 @@ int lua_JoystickControl_getOuterRegionSize(lua_State* state)
             lua_error(state);
             break;
         }
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA))
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<bool> param1 = gameplay::ScriptUtil::getBoolPointer(2);
+
+                JoystickControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getOuterRegionSize(param1));
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Vector2");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_getOuterRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TLIGHTUSERDATA) &&
+                (lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TLIGHTUSERDATA))
+            {
+                // Get parameter 1 off the stack.
+                gameplay::ScriptUtil::LuaArray<bool> param1 = gameplay::ScriptUtil::getBoolPointer(2);
+
+                // Get parameter 2 off the stack.
+                gameplay::ScriptUtil::LuaArray<bool> param2 = gameplay::ScriptUtil::getBoolPointer(3);
+
+                JoystickControl* instance = getInstance(state);
+                void* returnPtr = (void*)&(instance->getOuterRegionSize(param1, param2));
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Vector2");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_getOuterRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
         default:
         {
-            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_pushstring(state, "Invalid number of parameters (expected 1, 2 or 3).");
             lua_error(state);
             break;
         }
@@ -2185,6 +2316,41 @@ int lua_JoystickControl_getParent(lua_State* state)
     return 0;
 }
 
+int lua_JoystickControl_getRadius(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                JoystickControl* instance = getInstance(state);
+                float result = instance->getRadius();
+
+                // Push the return value onto the stack.
+                lua_pushnumber(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_getRadius - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_JoystickControl_getRefCount(lua_State* state)
 {
     // Get the number of parameters.
@@ -3271,6 +3437,41 @@ int lua_JoystickControl_isHeightPercentage(lua_State* state)
     return 0;
 }
 
+int lua_JoystickControl_isRadiusPercentage(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                JoystickControl* instance = getInstance(state);
+                bool result = instance->isRadiusPercentage();
+
+                // Push the return value onto the stack.
+                lua_pushboolean(state, result);
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_isRadiusPercentage - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_JoystickControl_isRelative(lua_State* state)
 {
     // Get the number of parameters.
@@ -4595,9 +4796,69 @@ int lua_JoystickControl_setInnerRegionSize(lua_State* state)
             lua_error(state);
             break;
         }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+
+                JoystickControl* instance = getInstance(state);
+                instance->setInnerRegionSize(*param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_setInnerRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 4:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TBOOLEAN &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
+
+                JoystickControl* instance = getInstance(state);
+                instance->setInnerRegionSize(*param1, param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_setInnerRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
         default:
         {
-            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 4).");
             lua_error(state);
             break;
         }
@@ -4743,9 +5004,69 @@ int lua_JoystickControl_setOuterRegionSize(lua_State* state)
             lua_error(state);
             break;
         }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+
+                JoystickControl* instance = getInstance(state);
+                instance->setOuterRegionSize(*param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_setOuterRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 4:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
+                lua_type(state, 3) == LUA_TBOOLEAN &&
+                lua_type(state, 4) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Vector2> param1 = gameplay::ScriptUtil::getObjectPointer<Vector2>(2, "Vector2", true, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector2'.");
+                    lua_error(state);
+                }
+
+                // Get parameter 2 off the stack.
+                bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+
+                // Get parameter 3 off the stack.
+                bool param3 = gameplay::ScriptUtil::luaCheckBool(state, 4);
+
+                JoystickControl* instance = getInstance(state);
+                instance->setOuterRegionSize(*param1, param2, param3);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_setOuterRegionSize - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
         default:
         {
-            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 4).");
             lua_error(state);
             break;
         }
@@ -4841,6 +5162,64 @@ int lua_JoystickControl_setPosition(lua_State* state)
     return 0;
 }
 
+int lua_JoystickControl_setRadius(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                JoystickControl* instance = getInstance(state);
+                instance->setRadius(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_setRadius - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+
+                JoystickControl* instance = getInstance(state);
+                instance->setRadius(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_JoystickControl_setRadius - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_JoystickControl_setRelative(lua_State* state)
 {
     // Get the number of parameters.

+ 3 - 0
gameplay/src/lua/lua_JoystickControl.h

@@ -46,6 +46,7 @@ int lua_JoystickControl_getOpacity(lua_State* state);
 int lua_JoystickControl_getOuterRegionSize(lua_State* state);
 int lua_JoystickControl_getPadding(lua_State* state);
 int lua_JoystickControl_getParent(lua_State* state);
+int lua_JoystickControl_getRadius(lua_State* state);
 int lua_JoystickControl_getRefCount(lua_State* state);
 int lua_JoystickControl_getScriptEvent(lua_State* state);
 int lua_JoystickControl_getSkinColor(lua_State* state);
@@ -70,6 +71,7 @@ int lua_JoystickControl_isContainer(lua_State* state);
 int lua_JoystickControl_isEnabled(lua_State* state);
 int lua_JoystickControl_isEnabledInHierarchy(lua_State* state);
 int lua_JoystickControl_isHeightPercentage(lua_State* state);
+int lua_JoystickControl_isRadiusPercentage(lua_State* state);
 int lua_JoystickControl_isRelative(lua_State* state);
 int lua_JoystickControl_isVisible(lua_State* state);
 int lua_JoystickControl_isVisibleInHierarchy(lua_State* state);
@@ -104,6 +106,7 @@ int lua_JoystickControl_setOpacity(lua_State* state);
 int lua_JoystickControl_setOuterRegionSize(lua_State* state);
 int lua_JoystickControl_setPadding(lua_State* state);
 int lua_JoystickControl_setPosition(lua_State* state);
+int lua_JoystickControl_setRadius(lua_State* state);
 int lua_JoystickControl_setRelative(lua_State* state);
 int lua_JoystickControl_setSize(lua_State* state);
 int lua_JoystickControl_setSkinColor(lua_State* state);

+ 88 - 30
gameplay/src/lua/lua_Node.cpp

@@ -95,6 +95,7 @@ void luaRegister_Node()
         {"getTypeName", lua_Node_getTypeName},
         {"getUpVector", lua_Node_getUpVector},
         {"getUpVectorWorld", lua_Node_getUpVectorWorld},
+        {"getUserObject", lua_Node_getUserObject},
         {"getViewMatrix", lua_Node_getViewMatrix},
         {"getViewProjectionMatrix", lua_Node_getViewProjectionMatrix},
         {"getWorldMatrix", lua_Node_getWorldMatrix},
@@ -140,6 +141,7 @@ void luaRegister_Node()
         {"setTranslationX", lua_Node_setTranslationX},
         {"setTranslationY", lua_Node_setTranslationY},
         {"setTranslationZ", lua_Node_setTranslationZ},
+        {"setUserObject", lua_Node_setUserObject},
         {"transformPoint", lua_Node_transformPoint},
         {"transformVector", lua_Node_transformVector},
         {"translate", lua_Node_translate},
@@ -3545,6 +3547,50 @@ int lua_Node_getUpVectorWorld(lua_State* state)
     return 0;
 }
 
+int lua_Node_getUserObject(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                Node* instance = getInstance(state);
+                void* returnPtr = ((void*)instance->getUserObject());
+                if (returnPtr)
+                {
+                    gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
+                    object->instance = returnPtr;
+                    object->owns = false;
+                    luaL_getmetatable(state, "Ref");
+                    lua_setmetatable(state, -2);
+                }
+                else
+                {
+                    lua_pushnil(state);
+                }
+
+                return 1;
+            }
+
+            lua_pushstring(state, "lua_Node_getUserObject - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Node_getViewMatrix(lua_State* state)
 {
     // Get the number of parameters.
@@ -5050,36 +5096,6 @@ int lua_Node_setCollisionObject(lua_State* state)
                 }
             } while (0);
 
-            do
-            {
-                if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                    (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
-                {
-                    // Get parameter 1 off the stack.
-                    bool param1Valid;
-                    gameplay::ScriptUtil::LuaArray<Properties> param1 = gameplay::ScriptUtil::getObjectPointer<Properties>(2, "Properties", false, &param1Valid);
-                    if (!param1Valid)
-                        break;
-
-                    Node* instance = getInstance(state);
-                    void* returnPtr = ((void*)instance->setCollisionObject(param1));
-                    if (returnPtr)
-                    {
-                        gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
-                        object->instance = returnPtr;
-                        object->owns = false;
-                        luaL_getmetatable(state, "PhysicsCollisionObject");
-                        lua_setmetatable(state, -2);
-                    }
-                    else
-                    {
-                        lua_pushnil(state);
-                    }
-
-                    return 1;
-                }
-            } while (0);
-
             lua_pushstring(state, "lua_Node_setCollisionObject - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
@@ -6027,6 +6043,48 @@ int lua_Node_setTranslationZ(lua_State* state)
     return 0;
 }
 
+int lua_Node_setUserObject(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
+            {
+                // Get parameter 1 off the stack.
+                bool param1Valid;
+                gameplay::ScriptUtil::LuaArray<Ref> param1 = gameplay::ScriptUtil::getObjectPointer<Ref>(2, "Ref", false, &param1Valid);
+                if (!param1Valid)
+                {
+                    lua_pushstring(state, "Failed to convert parameter 1 to type 'Ref'.");
+                    lua_error(state);
+                }
+
+                Node* instance = getInstance(state);
+                instance->setUserObject(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Node_setUserObject - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Node_static_ANIMATE_ROTATE(lua_State* state)
 {
     // Validate the number of parameters.

+ 2 - 0
gameplay/src/lua/lua_Node.h

@@ -71,6 +71,7 @@ int lua_Node_getType(lua_State* state);
 int lua_Node_getTypeName(lua_State* state);
 int lua_Node_getUpVector(lua_State* state);
 int lua_Node_getUpVectorWorld(lua_State* state);
+int lua_Node_getUserObject(lua_State* state);
 int lua_Node_getViewMatrix(lua_State* state);
 int lua_Node_getViewProjectionMatrix(lua_State* state);
 int lua_Node_getWorldMatrix(lua_State* state);
@@ -116,6 +117,7 @@ int lua_Node_setTranslation(lua_State* state);
 int lua_Node_setTranslationX(lua_State* state);
 int lua_Node_setTranslationY(lua_State* state);
 int lua_Node_setTranslationZ(lua_State* state);
+int lua_Node_setUserObject(lua_State* state);
 int lua_Node_static_ANIMATE_ROTATE(lua_State* state);
 int lua_Node_static_ANIMATE_ROTATE_TRANSLATE(lua_State* state);
 int lua_Node_static_ANIMATE_SCALE(lua_State* state);

+ 56 - 1
gameplay/src/lua/lua_PhysicsCharacter.cpp

@@ -43,6 +43,7 @@ void luaRegister_PhysicsCharacter()
         {"isStatic", lua_PhysicsCharacter_isStatic},
         {"jump", lua_PhysicsCharacter_jump},
         {"removeCollisionListener", lua_PhysicsCharacter_removeCollisionListener},
+        {"resetVelocityState", lua_PhysicsCharacter_resetVelocityState},
         {"rotate", lua_PhysicsCharacter_rotate},
         {"setEnabled", lua_PhysicsCharacter_setEnabled},
         {"setForwardVelocity", lua_PhysicsCharacter_setForwardVelocity},
@@ -696,9 +697,31 @@ int lua_PhysicsCharacter_jump(lua_State* state)
             lua_error(state);
             break;
         }
+        case 3:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TNUMBER &&
+                lua_type(state, 3) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                float param1 = (float)luaL_checknumber(state, 2);
+
+                // Get parameter 2 off the stack.
+                bool param2 = gameplay::ScriptUtil::luaCheckBool(state, 3);
+
+                PhysicsCharacter* instance = getInstance(state);
+                instance->jump(param1, param2);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_PhysicsCharacter_jump - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
         default:
         {
-            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
             lua_error(state);
             break;
         }
@@ -816,6 +839,38 @@ int lua_PhysicsCharacter_removeCollisionListener(lua_State* state)
     return 0;
 }
 
+int lua_PhysicsCharacter_resetVelocityState(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 1:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA))
+            {
+                PhysicsCharacter* instance = getInstance(state);
+                instance->resetVelocityState();
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_PhysicsCharacter_resetVelocityState - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 1).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_PhysicsCharacter_rotate(lua_State* state)
 {
     // Get the number of parameters.

+ 1 - 0
gameplay/src/lua/lua_PhysicsCharacter.h

@@ -22,6 +22,7 @@ int lua_PhysicsCharacter_isPhysicsEnabled(lua_State* state);
 int lua_PhysicsCharacter_isStatic(lua_State* state);
 int lua_PhysicsCharacter_jump(lua_State* state);
 int lua_PhysicsCharacter_removeCollisionListener(lua_State* state);
+int lua_PhysicsCharacter_resetVelocityState(lua_State* state);
 int lua_PhysicsCharacter_rotate(lua_State* state);
 int lua_PhysicsCharacter_setEnabled(lua_State* state);
 int lua_PhysicsCharacter_setForwardVelocity(lua_State* state);

+ 1 - 1
tools/encoder/README.md

@@ -2,7 +2,7 @@
 Command-line tool for encoding games assets like true-type fonts and 3D scene files
 into a simple binary-based bundle file format for the gameplay 3D game framework runtime. 
 The 'bin' folder contains pre-built 64-bit versions of the gameplay-encoder executables for 
-Windows 7, MacOS X and Linux Ubuntu with support built-in support for:
+Windows, MacOS X and Linux Ubuntu with support built-in support for:
 
 ## TrueType Font
 TrueType Fonts represent a standard in defining outline fonts and has become the 

+ 2 - 88
tools/encoder/gameplay-encoder.vcxproj

@@ -1,18 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|x64">
       <Configuration>Debug</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|x64">
       <Configuration>Release</Configuration>
       <Platform>x64</Platform>
@@ -128,25 +120,12 @@
     <RootNamespace>gameplay-encoder</RootNamespace>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v120</PlatformToolset>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v120</PlatformToolset>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
@@ -157,62 +136,23 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(Configuration)\</OutDir>
-    <IntDir>$(Configuration)\</IntDir>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(SolutionDir)\windows\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>windows\$(Platform)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
     <OutDir>$(Configuration)\</OutDir>
     <IntDir>$(Configuration)\</IntDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(SolutionDir)\windows\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>windows\$(Platform)\$(Configuration)\</IntDir>
+    <OutDir>$(Configuration)\</OutDir>
+    <IntDir>$(Configuration)\</IntDir>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level4</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=2;USE_FBX;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.2.1/include;../../external-deps/include</AdditionalIncludeDirectories>
-      <DisableLanguageExtensions>
-      </DisableLanguageExtensions>
-    </ClCompile>
-    <Link>
-      <SubSystem>Console</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.2.1/lib/vs2012/x86/debug;../../external-deps/lib/windows/x86/Debug</AdditionalLibraryDirectories>
-      <AdditionalDependencies>libfbxsdk-md.lib;freetype245.lib;gameplay-deps.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <IgnoreSpecificDefaultLibraries>MSVCRT</IgnoreSpecificDefaultLibraries>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <ClCompile>
       <PrecompiledHeader>
@@ -236,32 +176,6 @@
       </Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=0;USE_FBX;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.2.1/include;../../external-deps/include</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Console</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>libfbxsdk-md.lib;freetype245.lib;libpng.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.2.1/lib/vs2012/x86/release;../../external-deps/lib/windows/x86/Release</AdditionalLibraryDirectories>
-      <IgnoreSpecificDefaultLibraries>
-      </IgnoreSpecificDefaultLibraries>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <ClCompile>
       <WarningLevel>Level4</WarningLevel>

+ 0 - 16
tools/encoder/gameplay-encoder.vcxproj.user

@@ -1,27 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LocalDebuggerCommandArguments>
-    </LocalDebuggerCommandArguments>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-    <LocalDebuggerEnvironment>
-    </LocalDebuggerEnvironment>
-    <LocalDebuggerWorkingDirectory>.\Debug</LocalDebuggerWorkingDirectory>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <LocalDebuggerCommandArguments />
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <LocalDebuggerEnvironment />
     <LocalDebuggerWorkingDirectory>.\Debug</LocalDebuggerWorkingDirectory>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LocalDebuggerEnvironment>
-    </LocalDebuggerEnvironment>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-    <LocalDebuggerCommandArguments>
-    </LocalDebuggerCommandArguments>
-    <LocalDebuggerWorkingDirectory>.\Release</LocalDebuggerWorkingDirectory>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LocalDebuggerEnvironment />
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>

+ 2 - 0
tools/encoder/src/Base.h

@@ -33,10 +33,12 @@ using std::endl;
 #if defined(WIN32)
     #pragma warning( disable : 4005 )
     #pragma warning( disable : 4172 )
+    #pragma warning( disable : 4189)
     #pragma warning( disable : 4244 )
     #pragma warning( disable : 4267 )
     #pragma warning( disable : 4311 )
     #pragma warning( disable : 4390 )
+    #pragma warning( disable : 4701 )
     #pragma warning( disable : 4800 )
     #pragma warning( disable : 4996 )
 #endif

+ 4 - 110
tools/luagen/gameplay-luagen.vcxproj

@@ -1,18 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Debug|x64">
       <Configuration>Debug</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
     <ProjectConfiguration Include="Release|x64">
       <Configuration>Release</Configuration>
       <Platform>x64</Platform>
@@ -37,28 +29,15 @@
   <PropertyGroup Label="Globals">
     <ProjectGuid>{CA137C5D-FDE1-4095-926A-59E8472504BF}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
-    <RootNamespace>gameplayluagen</RootNamespace>
+    <RootNamespace>gameplay-luagen</RootNamespace>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v120</PlatformToolset>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <CharacterSet>Unicode</CharacterSet>
     <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v120</PlatformToolset>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
@@ -69,72 +48,25 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <CustomBuildBeforeTargets>
-    </CustomBuildBeforeTargets>
-    <OutDir>$(Configuration)\</OutDir>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <LinkIncremental>true</LinkIncremental>
     <CustomBuildBeforeTargets />
-    <IntDir>windows\$(Platform)\$(Configuration)\</IntDir>
-    <OutDir>$(SolutionDir)\windows\$(Platform)\$(Configuration)\</OutDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-    <CustomBuildBeforeTargets>
-    </CustomBuildBeforeTargets>
+    <IntDir>$(Configuration)\</IntDir>
     <OutDir>$(Configuration)\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LinkIncremental>false</LinkIncremental>
     <CustomBuildBeforeTargets />
-    <IntDir>windows\$(Platform)\$(Configuration)\</IntDir>
-    <OutDir>$(SolutionDir)\windows\$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Configuration)\</IntDir>
+    <OutDir>$(Configuration)\</OutDir>
   </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>GP_ERRORS_AS_WARNINGS;_ITERATOR_DEBUG_LEVEL=0;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>../../external-deps/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-    </ClCompile>
-    <Link>
-      <SubSystem>Console</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>../../external-deps/lib/windows/x86/Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>gameplay-deps.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PreBuildEvent>
-      <Command>
-      </Command>
-    </PreBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-    </CustomBuildStep>
-    <CustomBuildStep>
-      <Message>
-      </Message>
-    </CustomBuildStep>
-  </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <ClCompile>
       <PrecompiledHeader>
@@ -164,44 +96,6 @@
       </Message>
     </CustomBuildStep>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>../../external-deps/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Console</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>../../external-deps/lib/windows/x86/Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>gameplay-deps.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-    <PreBuildEvent>
-      <Command>
-      </Command>
-    </PreBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-    </CustomBuildStep>
-    <CustomBuildStep>
-      <Message>
-      </Message>
-    </CustomBuildStep>
-    <PostBuildEvent>
-      <Command>copy $(TargetPath) $(ProjectDir)..\..\bin\windows\$(TargetFileName)</Command>
-    </PostBuildEvent>
-    <PostBuildEvent>
-      <Message>Copying executable to bin/windows folder ...</Message>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <ClCompile>
       <WarningLevel>Level3</WarningLevel>

+ 0 - 10
tools/luagen/gameplay-luagen.vcxproj.user

@@ -1,20 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LocalDebuggerCommandArguments>"$(ProjectDir)xml/" "$(ProjectDir)../../gameplay/src/lua/" gameplay</LocalDebuggerCommandArguments>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-    <LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <LocalDebuggerCommandArguments>"$(ProjectDir)xml/" "$(ProjectDir)../../gameplay/src/lua/" gameplay</LocalDebuggerCommandArguments>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LocalDebuggerCommandArguments>"$(ProjectDir)xml/" "$(ProjectDir)../../gameplay/src/lua/" gameplay</LocalDebuggerCommandArguments>
-    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-    <LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand>
-  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LocalDebuggerCommandArguments>"$(ProjectDir)xml/" "$(ProjectDir)../../gameplay/src/lua/" gameplay</LocalDebuggerCommandArguments>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>

+ 1 - 0
tools/luagen/src/Base.h

@@ -22,6 +22,7 @@ using namespace std;
 #include <windows.h>
 #pragma warning(disable : 4996)
 #pragma warning(disable : 4244)
+#pragma warning(disable : 4267)
 #pragma warning(disable : 4345)
 #else
 #include <dirent.h>