Ver Fonte

Merge pull request #60 from blackberry-gaming/next

Next
Sean Paul Taylor há 13 anos atrás
pai
commit
85e08736d3

+ 5 - 6
README.md

@@ -1,9 +1,9 @@
-## GamePlay v1.2.0
-GamePlay is a open-source, cross-platform 3D native gaming framework making it easy to learn and write mobile and desktop games. 
+## gameplay v1.2.0
+An open-source, cross-platform 3D native game framework making it easy to learn and write mobile and desktop games. 
 
 
 ## Supported Mobile Platforms
 ## Supported Mobile Platforms
 - BlackBerry PlayBook 2 (using BlackBerry Native SDK 2)
 - BlackBerry PlayBook 2 (using BlackBerry Native SDK 2)
-- Google Android 4 (using Google Android NDK 7)
+- Google Android 2.3+ (using Google Android NDK 7)
 - Apple iOS 5 (using Apple XCode 4.3)
 - Apple iOS 5 (using Apple XCode 4.3)
 
 
 ## Supported Desktop Platforms
 ## Supported Desktop Platforms
@@ -11,9 +11,8 @@ GamePlay is a open-source, cross-platform 3D native gaming framework making it e
 - Apple MacOS X (using Apple XCode 4.3)
 - Apple MacOS X (using Apple XCode 4.3)
 
 
 ## Roadmap for 'next' branch
 ## Roadmap for 'next' branch
-- Lua script bindings
-- Terrain and Water
-- Lighting enhancements
+- Lua Scripting
+- Terrain
 - Editor
 - Editor
 
 
 ## Licence
 ## Licence

+ 5 - 5
gameplay-encoder/README.md

@@ -1,6 +1,6 @@
-## GamePlay Encoder
-GamePlay Encoder is a command-line tool for encoding/packaging games assets like fonts and 3D scene files
-into a binary package file format for the GamePlay runtime framework. 
+## gameplay-encoder
+Command-line tool for encoding games assets like true-type fonts and 3D scene files
+into a binary package file format for the gameplay 3D game framework runtime. 
 
 
 ## TrueType Font Support
 ## TrueType Font Support
 TrueType Fonts conversion is enabled/built-in by default into gameplay-encoder via freetype 2 library.
 TrueType Fonts conversion is enabled/built-in by default into gameplay-encoder via freetype 2 library.
@@ -42,10 +42,10 @@ You must then rebuild gameplay-encoder with the follow platform/tooling instruct
 - Build gameplay-encoder
 - Build gameplay-encoder
 
 
 ## Binary Format
 ## Binary Format
-The GamePlay binary package format is well defined in the gameplay-encoder/gameplay-binary.txt file.
+The gameplay binary package format is well defined in the gameplay-encoder/gameplay-binary.txt file.
 
 
 ## Binary Loading
 ## Binary Loading
-GamePlay binary package files can easily be loaded using the gameplay/Package.h which is part
+Binary package files can easily be loaded using the gameplay/Package.h which is part
 of the GamePlay runtime framework.
 of the GamePlay runtime framework.
 
 
 ## Disclaimer
 ## Disclaimer

+ 0 - 6
gameplay/gameplay.xcodeproj/project.pbxproj

@@ -328,7 +328,6 @@
 		5BC4E746150F843D00CBE1C0 /* Container.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263B150F822A004C9099 /* Container.h */; };
 		5BC4E746150F843D00CBE1C0 /* Container.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263B150F822A004C9099 /* Container.h */; };
 		5BC4E747150F843D00CBE1C0 /* Control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263C150F822A004C9099 /* Control.cpp */; };
 		5BC4E747150F843D00CBE1C0 /* Control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263C150F822A004C9099 /* Control.cpp */; };
 		5BC4E748150F843D00CBE1C0 /* Control.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263D150F822A004C9099 /* Control.h */; };
 		5BC4E748150F843D00CBE1C0 /* Control.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263D150F822A004C9099 /* Control.h */; };
-		5BC4E749150F843D00CBE1C0 /* FlowLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263E150F822A004C9099 /* FlowLayout.h */; };
 		5BC4E74A150F843D00CBE1C0 /* Form.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263F150F822A004C9099 /* Form.cpp */; };
 		5BC4E74A150F843D00CBE1C0 /* Form.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263F150F822A004C9099 /* Form.cpp */; };
 		5BC4E74B150F843D00CBE1C0 /* Form.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD52640150F822A004C9099 /* Form.h */; };
 		5BC4E74B150F843D00CBE1C0 /* Form.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD52640150F822A004C9099 /* Form.h */; };
 		5BC4E74C150F843D00CBE1C0 /* Label.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD52641150F822A004C9099 /* Label.cpp */; };
 		5BC4E74C150F843D00CBE1C0 /* Label.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD52641150F822A004C9099 /* Label.cpp */; };
@@ -354,7 +353,6 @@
 		5BD52656150F822A004C9099 /* Container.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263B150F822A004C9099 /* Container.h */; };
 		5BD52656150F822A004C9099 /* Container.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263B150F822A004C9099 /* Container.h */; };
 		5BD52657150F822A004C9099 /* Control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263C150F822A004C9099 /* Control.cpp */; };
 		5BD52657150F822A004C9099 /* Control.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263C150F822A004C9099 /* Control.cpp */; };
 		5BD52658150F822A004C9099 /* Control.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263D150F822A004C9099 /* Control.h */; };
 		5BD52658150F822A004C9099 /* Control.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263D150F822A004C9099 /* Control.h */; };
-		5BD52659150F822A004C9099 /* FlowLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD5263E150F822A004C9099 /* FlowLayout.h */; };
 		5BD5265A150F822A004C9099 /* Form.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263F150F822A004C9099 /* Form.cpp */; };
 		5BD5265A150F822A004C9099 /* Form.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD5263F150F822A004C9099 /* Form.cpp */; };
 		5BD5265B150F822A004C9099 /* Form.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD52640150F822A004C9099 /* Form.h */; };
 		5BD5265B150F822A004C9099 /* Form.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BD52640150F822A004C9099 /* Form.h */; };
 		5BD5265C150F822A004C9099 /* Label.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD52641150F822A004C9099 /* Label.cpp */; };
 		5BD5265C150F822A004C9099 /* Label.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD52641150F822A004C9099 /* Label.cpp */; };
@@ -589,7 +587,6 @@
 		5BD5263B150F822A004C9099 /* Container.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Container.h; path = src/Container.h; sourceTree = SOURCE_ROOT; };
 		5BD5263B150F822A004C9099 /* Container.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Container.h; path = src/Container.h; sourceTree = SOURCE_ROOT; };
 		5BD5263C150F822A004C9099 /* Control.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Control.cpp; path = src/Control.cpp; sourceTree = SOURCE_ROOT; };
 		5BD5263C150F822A004C9099 /* Control.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Control.cpp; path = src/Control.cpp; sourceTree = SOURCE_ROOT; };
 		5BD5263D150F822A004C9099 /* Control.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Control.h; path = src/Control.h; sourceTree = SOURCE_ROOT; };
 		5BD5263D150F822A004C9099 /* Control.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Control.h; path = src/Control.h; sourceTree = SOURCE_ROOT; };
-		5BD5263E150F822A004C9099 /* FlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlowLayout.h; path = src/FlowLayout.h; sourceTree = SOURCE_ROOT; };
 		5BD5263F150F822A004C9099 /* Form.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Form.cpp; path = src/Form.cpp; sourceTree = SOURCE_ROOT; };
 		5BD5263F150F822A004C9099 /* Form.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Form.cpp; path = src/Form.cpp; sourceTree = SOURCE_ROOT; };
 		5BD52640150F822A004C9099 /* Form.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Form.h; path = src/Form.h; sourceTree = SOURCE_ROOT; };
 		5BD52640150F822A004C9099 /* Form.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Form.h; path = src/Form.h; sourceTree = SOURCE_ROOT; };
 		5BD52641150F822A004C9099 /* Label.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Label.cpp; path = src/Label.cpp; sourceTree = SOURCE_ROOT; };
 		5BD52641150F822A004C9099 /* Label.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Label.cpp; path = src/Label.cpp; sourceTree = SOURCE_ROOT; };
@@ -727,7 +724,6 @@
 				42CD0DD3147D8FF50000361E /* Effect.h */,
 				42CD0DD3147D8FF50000361E /* Effect.h */,
 				42CD0DD4147D8FF50000361E /* FileSystem.cpp */,
 				42CD0DD4147D8FF50000361E /* FileSystem.cpp */,
 				42CD0DD5147D8FF50000361E /* FileSystem.h */,
 				42CD0DD5147D8FF50000361E /* FileSystem.h */,
-				5BD5263E150F822A004C9099 /* FlowLayout.h */,
 				42CD0DD6147D8FF50000361E /* Font.cpp */,
 				42CD0DD6147D8FF50000361E /* Font.cpp */,
 				42CD0DD7147D8FF50000361E /* Font.h */,
 				42CD0DD7147D8FF50000361E /* Font.h */,
 				5BD5263F150F822A004C9099 /* Form.cpp */,
 				5BD5263F150F822A004C9099 /* Form.cpp */,
@@ -1038,7 +1034,6 @@
 				5BD52654150F822A004C9099 /* CheckBox.h in Headers */,
 				5BD52654150F822A004C9099 /* CheckBox.h in Headers */,
 				5BD52656150F822A004C9099 /* Container.h in Headers */,
 				5BD52656150F822A004C9099 /* Container.h in Headers */,
 				5BD52658150F822A004C9099 /* Control.h in Headers */,
 				5BD52658150F822A004C9099 /* Control.h in Headers */,
-				5BD52659150F822A004C9099 /* FlowLayout.h in Headers */,
 				5BD5265B150F822A004C9099 /* Form.h in Headers */,
 				5BD5265B150F822A004C9099 /* Form.h in Headers */,
 				5BD5265D150F822A004C9099 /* Label.h in Headers */,
 				5BD5265D150F822A004C9099 /* Label.h in Headers */,
 				5BD5265E150F822A004C9099 /* Layout.h in Headers */,
 				5BD5265E150F822A004C9099 /* Layout.h in Headers */,
@@ -1138,7 +1133,6 @@
 				5BC4E744150F843D00CBE1C0 /* CheckBox.h in Headers */,
 				5BC4E744150F843D00CBE1C0 /* CheckBox.h in Headers */,
 				5BC4E746150F843D00CBE1C0 /* Container.h in Headers */,
 				5BC4E746150F843D00CBE1C0 /* Container.h in Headers */,
 				5BC4E748150F843D00CBE1C0 /* Control.h in Headers */,
 				5BC4E748150F843D00CBE1C0 /* Control.h in Headers */,
-				5BC4E749150F843D00CBE1C0 /* FlowLayout.h in Headers */,
 				5BC4E74B150F843D00CBE1C0 /* Form.h in Headers */,
 				5BC4E74B150F843D00CBE1C0 /* Form.h in Headers */,
 				5BC4E74D150F843D00CBE1C0 /* Label.h in Headers */,
 				5BC4E74D150F843D00CBE1C0 /* Label.h in Headers */,
 				5BC4E74E150F843D00CBE1C0 /* Layout.h in Headers */,
 				5BC4E74E150F843D00CBE1C0 /* Layout.h in Headers */,

+ 12 - 1
gameplay/src/AbsoluteLayout.h

@@ -44,9 +44,20 @@ protected:
     void update(const Container* container);
     void update(const Container* container);
 
 
 private:
 private:
-
+    
+    /*
+     * Constructor.
+     */
     AbsoluteLayout();
     AbsoluteLayout();
+    
+    /*
+     * Constructor.
+     */
     AbsoluteLayout(const AbsoluteLayout& copy);
     AbsoluteLayout(const AbsoluteLayout& copy);
+    
+    /*
+     * Destructor.
+     */
     virtual ~AbsoluteLayout();
     virtual ~AbsoluteLayout();
 };
 };
 
 

+ 4 - 3
gameplay/src/AnimationClip.h

@@ -36,6 +36,9 @@ public:
 
 
     public:
     public:
 
 
+        /*
+         * Constructor.
+         */
         Listener() 
         Listener() 
         {
         {
         }
         }
@@ -225,9 +228,7 @@ public:
     void addListener(AnimationClip::Listener* listener, unsigned long eventTime);
     void addListener(AnimationClip::Listener* listener, unsigned long eventTime);
 
 
 private:
 private:
-    /**
-     * State bits.
-     */
+    
     static const unsigned char CLIP_IS_PLAYING_BIT = 0x01;             // Bit representing whether AnimationClip is a running clip in AnimationController
     static const unsigned char CLIP_IS_PLAYING_BIT = 0x01;             // Bit representing whether AnimationClip is a running clip in AnimationController
     static const unsigned char CLIP_IS_STARTED_BIT = 0x02;             // Bit representing whether the AnimationClip has actually been started (ie: received first call to update())
     static const unsigned char CLIP_IS_STARTED_BIT = 0x02;             // Bit representing whether the AnimationClip has actually been started (ie: received first call to update())
     static const unsigned char CLIP_IS_FADING_OUT_STARTED_BIT = 0x04;  // Bit representing that a cross fade has started.
     static const unsigned char CLIP_IS_FADING_OUT_STARTED_BIT = 0x04;  // Bit representing that a cross fade has started.

+ 3 - 0
gameplay/src/AnimationController.h

@@ -28,6 +28,9 @@ public:
        
        
 private:
 private:
 
 
+    /**
+     * The states that the AnimationController may be in.
+     */
     enum State
     enum State
     {
     {
         RUNNING,
         RUNNING,

+ 5 - 3
gameplay/src/AnimationTarget.h

@@ -152,6 +152,9 @@ public:
 
 
 protected:
 protected:
     
     
+    /**
+     * The type of animation target. 
+     */
     enum TargetType
     enum TargetType
     {
     {
         SCALAR,
         SCALAR,
@@ -197,9 +200,8 @@ protected:
      */
      */
     void cloneInto(AnimationTarget* target, NodeCloneContext &context) const;
     void cloneInto(AnimationTarget* target, NodeCloneContext &context) const;
 
 
-    TargetType _targetType;             // The type of target this is.
-
-    unsigned char _animationPropertyBitFlag;     // Bit flag used to indicate which properties on the AnimationTarget are currently animating.
+    TargetType _targetType;                     // The type of target this is.
+    unsigned char _animationPropertyBitFlag;    // Bit flag used to indicate which properties on the AnimationTarget are currently animating.
 
 
 private:
 private:
 
 

+ 2 - 1
gameplay/src/AudioBuffer.h

@@ -11,13 +11,14 @@ class AudioSource;
 /**
 /**
  * The actual audio buffer data.
  * The actual audio buffer data.
  *
  *
- * Currently only supports OpenAL supported formats: .wav, .au and .raw files.
+ * Currently only supports supported formats: .wav, .au and .raw files.
  */
  */
 class AudioBuffer : public Ref
 class AudioBuffer : public Ref
 {
 {
     friend class AudioSource;
     friend class AudioSource;
 
 
 private:
 private:
+    
 #ifndef __ANDROID__
 #ifndef __ANDROID__
     /**
     /**
      * Constructor.
      * Constructor.

+ 0 - 3
gameplay/src/AudioSource.h

@@ -152,16 +152,13 @@ private:
      * Constructor that takes an AudioBuffer.
      * Constructor that takes an AudioBuffer.
      */
      */
     AudioSource(AudioBuffer* buffer, ALuint source);
     AudioSource(AudioBuffer* buffer, ALuint source);
-
 #else
 #else
-
     /**
     /**
      * Constructor that takes an AudioBuffer.
      * Constructor that takes an AudioBuffer.
      */
      */
     AudioSource(AudioBuffer* buffer, const SLObjectItf& player);
     AudioSource(AudioBuffer* buffer, const SLObjectItf& player);
 #endif
 #endif
 
 
-
     /**
     /**
      * Destructor.
      * Destructor.
      */
      */

+ 0 - 2
gameplay/src/Base.h

@@ -168,7 +168,6 @@ extern void printError(const char* format, ...);
 #include <SLES/OpenSLES.h>
 #include <SLES/OpenSLES.h>
 #include <SLES/OpenSLES_Android.h>
 #include <SLES/OpenSLES_Android.h>
 #else
 #else
-
 #ifdef __QNX__
 #ifdef __QNX__
 #include <AL/al.h>
 #include <AL/al.h>
 #include <AL/alc.h>
 #include <AL/alc.h>
@@ -179,7 +178,6 @@ extern void printError(const char* format, ...);
 #include <OpenAL/al.h>
 #include <OpenAL/al.h>
 #include <OpenAL/alc.h>
 #include <OpenAL/alc.h>
 #endif
 #endif
-
 #include <vorbis/vorbisfile.h>
 #include <vorbis/vorbisfile.h>
 #endif
 #endif
 
 

+ 4 - 1
gameplay/src/Button.h

@@ -10,7 +10,7 @@ namespace gameplay
 {
 {
 
 
 /**
 /**
- * Defines a button UI control.  This is essentially a label that can have a callback method set on it.
+ * Defines a button UI control. This is essentially a label that can have a callback method set on it.
  *
  *
  * The following properties are available for buttons:
  * The following properties are available for buttons:
  *
  *
@@ -64,6 +64,9 @@ protected:
 
 
 private:
 private:
 
 
+    /*
+     * Constructor.
+     */
     Button(const Button& copy);
     Button(const Button& copy);
 };
 };
 
 

+ 0 - 1
gameplay/src/Camera.h

@@ -250,7 +250,6 @@ private:
      * Clones the camera and returns a new camera.
      * Clones the camera and returns a new camera.
      * 
      * 
      * @param context The clone context.
      * @param context The clone context.
-     * 
      * @return The newly created camera.
      * @return The newly created camera.
      */
      */
     Camera* clone(NodeCloneContext &context) const;
     Camera* clone(NodeCloneContext &context) const;

+ 4 - 1
gameplay/src/CheckBox.h

@@ -16,7 +16,7 @@ namespace gameplay
  *
  *
  * checkBox <checkBoxID>
  * checkBox <checkBoxID>
  * {
  * {
- *      style       = <Style ID>
+ *      style       = <styleID>
  *      position    = <x, y>
  *      position    = <x, y>
  *      size        = <width, height>
  *      size        = <width, height>
  *      text        = <string>
  *      text        = <string>
@@ -121,6 +121,9 @@ protected:
 
 
 private:
 private:
 
 
+    /*
+     * Constructor.
+     */
     CheckBox(const CheckBox& copy);
     CheckBox(const CheckBox& copy);
 };
 };
 
 

+ 12 - 9
gameplay/src/Container.h

@@ -12,23 +12,26 @@ namespace gameplay
  *
  *
  * The following properties are available for containers:
  * The following properties are available for containers:
  *
  *
- * container <Container ID>
+ * container <containerID>
  * {
  * {
  *      // Container properties.
  *      // Container properties.
- *      layout   = <Layout Type>        // A value from the Layout::Type enum.  E.g.: LAYOUT_VERTICAL
- *      style    = <Style ID>           // A style from the form's theme.
+ *      layout   = <Layout::Type>        // A value from the Layout::Type enum.  E.g.: LAYOUT_VERTICAL
+ *      style    = <styleID>           // A style from the form's theme.
  *      position = <x, y>               // Position of the container on-screen, measured in pixels.
  *      position = <x, y>               // Position of the container on-screen, measured in pixels.
  *      size     = <width, height>      // Size of the container, measured in pixels.
  *      size     = <width, height>      // Size of the container, measured in pixels.
  *   
  *   
  *      // All the nested controls within this container.
  *      // All the nested controls within this container.
- *      container { }
-
+ *      container 
+ *      { 
+ *          ...
+ *      }
+ * 
  *      label { }
  *      label { }
  *      textBox { }
  *      textBox { }
- *      button{}
- *      checkBox{}
- *      radioButton{}
- *      slider{}
+ *      button { }
+ *      checkBox { }
+ *      radioButton { }
+ *      slider { }
  * }
  * }
  */
  */
 class Container : public Control
 class Container : public Control

+ 18 - 17
gameplay/src/Control.h

@@ -722,23 +722,35 @@ protected:
 
 
 private:
 private:
 
 
-    // Animation blending bits.
     static const char ANIMATION_POSITION_X_BIT = 0x01;
     static const char ANIMATION_POSITION_X_BIT = 0x01;
     static const char ANIMATION_POSITION_Y_BIT = 0x02;
     static const char ANIMATION_POSITION_Y_BIT = 0x02;
     static const char ANIMATION_SIZE_WIDTH_BIT = 0x04;
     static const char ANIMATION_SIZE_WIDTH_BIT = 0x04;
     static const char ANIMATION_SIZE_HEIGHT_BIT = 0x08;
     static const char ANIMATION_SIZE_HEIGHT_BIT = 0x08;
     static const char ANIMATION_OPACITY_BIT = 0x10;
     static const char ANIMATION_OPACITY_BIT = 0x10;
 
 
-    bool _styleOverridden;
-
+    /*
+     * Constructor.
+     */    
+    Control(const Control& copy);
+    
     void applyAnimationValuePositionX(float x, float blendWeight);
     void applyAnimationValuePositionX(float x, float blendWeight);
+    
     void applyAnimationValuePositionY(float y, float blendWeight);
     void applyAnimationValuePositionY(float y, float blendWeight);
+    
     void applyAnimationValueSizeWidth(float width, float blendWeight);
     void applyAnimationValueSizeWidth(float width, float blendWeight);
+    
     void applyAnimationValueSizeHeight(float height, float blendWeight);
     void applyAnimationValueSizeHeight(float height, float blendWeight);
+    
     void applyAnimationValueOpacity();
     void applyAnimationValueOpacity();
 
 
-    Control(const Control& copy);
+    Theme::Style::Overlay** getOverlays(unsigned char overlayTypes, Theme::Style::Overlay** overlays);
 
 
+    Theme::Style::Overlay* getOverlay(Control::State state) const;
+
+    void overrideStyle();
+    
+    void addSpecificListener(Control::Listener* listener, Listener::EventType eventType);
+    
     /**
     /**
      * Draws the themed border and background of a control.
      * Draws the themed border and background of a control.
      *
      *
@@ -746,19 +758,8 @@ private:
      * @param clip The clipping rectangle of this control's parent container.
      * @param clip The clipping rectangle of this control's parent container.
      */
      */
     virtual void drawBorder(SpriteBatch* spriteBatch, const Rectangle& clip);
     virtual void drawBorder(SpriteBatch* spriteBatch, const Rectangle& clip);
-
-    void addSpecificListener(Control::Listener* listener, Listener::EventType eventType);
-
-    // Gets the overlays requested in the overlayTypes bitflag.
-    Theme::Style::Overlay** getOverlays(unsigned char overlayTypes, Theme::Style::Overlay** overlays);
-
-    /**
-     * Gets an overlay from a control state.
-     */
-    Theme::Style::Overlay* getOverlay(Control::State state) const;
-
-    // Ensures that this control has a copy of its style so that it can override it without affecting other controls.
-    void overrideStyle();
+    
+    bool _styleOverridden;
 };
 };
 
 
 }
 }

+ 2 - 2
gameplay/src/Curve.h

@@ -401,7 +401,7 @@ private:
     Curve(unsigned int pointCount, unsigned int componentCount);
     Curve(unsigned int pointCount, unsigned int componentCount);
 
 
     /**
     /**
-     * Hidden copy constructor.
+     * Constructor.
      */
      */
     Curve(const Curve& copy);
     Curve(const Curve& copy);
 
 
@@ -411,7 +411,7 @@ private:
     ~Curve();
     ~Curve();
 
 
     /**
     /**
-     * Hidden copy assignment operator.
+     * Copy assignment operator.
      */
      */
     Curve& operator=(const Curve&);
     Curve& operator=(const Curve&);
 
 

+ 1 - 0
gameplay/src/DebugNew.h

@@ -90,6 +90,7 @@ T* bullet_new(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
 }
 }
 
 
 #if defined(WIN32)
 #if defined(WIN32)
+
 /**
 /**
  * Sets whether stack traces are tracked on memory allocations or not.
  * Sets whether stack traces are tracked on memory allocations or not.
  * 
  * 

+ 0 - 24
gameplay/src/FlowLayout.h

@@ -1,24 +0,0 @@
-#ifndef FLOWLAYOUT_H_
-#define FLOWLAYOUT_H_
-
-#include "Layout.h"
-
-namespace gameplay
-{
-
-class FlowLayout : public Layout
-{
-public:
-    static FlowLayout* create();
-
-    void setRightToLeft(bool rightToLeft);
-
-private:
-    FlowLayout();
-    FlowLayout(const FlowLayout& copy);
-    virtual ~FlowLayout();
-};
-
-}
-
-#endif

+ 1 - 4
gameplay/src/Font.h

@@ -202,7 +202,7 @@ private:
     Font();
     Font();
 
 
     /**
     /**
-     * Copy constructor.
+     * Constructor.
      */
      */
     Font(const Font& copy);
     Font(const Font& copy);
 
 
@@ -211,16 +211,13 @@ private:
      */
      */
     ~Font();
     ~Font();
 
 
-    // Used by both getIndexAtLocation and getLocationAtIndex.
     unsigned int getIndexOrLocation(const char* text, const Rectangle& clip, unsigned int size, const Vector2& inLocation, Vector2* outLocation,
     unsigned int getIndexOrLocation(const char* text, const Rectangle& clip, unsigned int size, const Vector2& inLocation, Vector2* outLocation,
                                     const int destIndex = -1, Justify justify = ALIGN_TOP_LEFT, bool wrap = true, bool rightToLeft = false);
                                     const int destIndex = -1, Justify justify = ALIGN_TOP_LEFT, bool wrap = true, bool rightToLeft = false);
 
 
-    // Utilities
     unsigned int getTokenWidth(const char* token, unsigned int length, unsigned int size, float scale);
     unsigned int getTokenWidth(const char* token, unsigned int length, unsigned int size, float scale);
 
 
     unsigned int getReversedTokenLength(const char* token, const char* bufStart);
     unsigned int getReversedTokenLength(const char* token, const char* bufStart);
 
 
-    // Returns 0 if EOF was reached, 1 if delimiters were handles correctly, and 2 if the stopAtPosition was reached while handling delimiters.
     int handleDelimiters(const char** token, const unsigned int size, const int iteration, const int areaX, int* xPos, int* yPos, unsigned int* lineLength,
     int handleDelimiters(const char** token, const unsigned int size, const int iteration, const int areaX, int* xPos, int* yPos, unsigned int* lineLength,
                          std::vector<int>::const_iterator* xPositionsIt, std::vector<int>::const_iterator xPositionsEnd, unsigned int* charIndex = NULL,
                          std::vector<int>::const_iterator* xPositionsIt, std::vector<int>::const_iterator xPositionsEnd, unsigned int* charIndex = NULL,
                          const Vector2* stopAtPosition = NULL, const int currentIndex = -1, const int destIndex = -1);
                          const Vector2* stopAtPosition = NULL, const int currentIndex = -1, const int destIndex = -1);

+ 11 - 8
gameplay/src/Form.h

@@ -27,17 +27,20 @@ public:
      * Create from properties file.
      * Create from properties file.
      * The top-most namespace in the file must be named 'form'.  The following properties are available for forms:
      * The top-most namespace in the file must be named 'form'.  The following properties are available for forms:
      *
      *
-     * form <Form ID>
+     * form <formID>
      * {
      * {
      *      // Form properties.
      *      // Form properties.
-     *      theme    = <Path to Theme File> // See Theme.h.
-     *      layout   = <Layout Type>        // A value from the Layout::Type enum.  E.g.: LAYOUT_VERTICAL
-     *      style    = <Style ID>           // A style from the referenced theme.
-     *      position = <x, y>               // Position of the form on-screen, measured in pixels.
-     *      size     = <width, height>      // Size of the form, measured in pixels.
+     *      theme    = <Path to .theme File>    // See Theme.h.
+     *      layout   = <Layout::Type>           // A value from the Layout::Type enum.  e.g.: LAYOUT_VERTICAL
+     *      style    = <styleID>                // A style from the referenced theme.
+     *      position = <x, y>                   // Position of the form on-screen, measured in pixels.
+     *      size     = <width, height>          // Size of the form, measured in pixels.
      *   
      *   
-     *      // All the controls within this form.
-     *      container { }
+     *      // All the nested controls within this form.
+     *      container 
+     *      {
+     *          ...
+     *      }
      *      label { }
      *      label { }
      *      textBox { }
      *      textBox { }
      *      button { }
      *      button { }

+ 4 - 1
gameplay/src/FrameBuffer.h

@@ -99,10 +99,13 @@ public:
      
      
 private:
 private:
  
  
+    /**
+     * Constructor.
+     */
     FrameBuffer(const char* id);
     FrameBuffer(const char* id);
 
 
     /**
     /**
-     * Destructor.  Removes this FrameBuffer from the list of available FrameBuffers.
+     * Destructor.
      */
      */
     ~FrameBuffer();
     ~FrameBuffer();
 
 

+ 2 - 2
gameplay/src/Joint.h

@@ -77,12 +77,12 @@ protected:
 private:
 private:
 
 
     /**
     /**
-     * Hidden copy constructor.
+     * Constructor.
      */
      */
     Joint(const Joint& copy);
     Joint(const Joint& copy);
 
 
     /**
     /**
-     * Hidden copy assignment operator.
+     * Copy assignment operator.
      */
      */
     Joint& operator=(const Joint&);
     Joint& operator=(const Joint&);
 
 

+ 5 - 2
gameplay/src/Label.h

@@ -12,9 +12,9 @@ namespace gameplay
  *
  *
  * The following properties are available for labels:
  * The following properties are available for labels:
  *
  *
- * label <Label ID>
+ * label <labelID>
  * {
  * {
- *      style       = <Style ID>
+ *      style       = <styleID>
  *      position    = <x, y>
  *      position    = <x, y>
  *      size        = <width, height>
  *      size        = <width, height>
  *      text        = <string>
  *      text        = <string>
@@ -90,6 +90,9 @@ protected:
 
 
 private:
 private:
 
 
+    /**
+     * Constructor.
+     */
     Label(const Label& copy);
     Label(const Label& copy);
 };
 };
 
 

+ 1 - 3
gameplay/src/Light.h

@@ -12,7 +12,6 @@ class NodeCloneContext;
 
 
 /**
 /**
  * Defines a light.
  * Defines a light.
- *
  */
  */
 class Light : public Ref
 class Light : public Ref
 {
 {
@@ -30,7 +29,6 @@ public:
         SPOT = 3
         SPOT = 3
     };
     };
 
 
-
     /**
     /**
      * Creates a directional light.
      * Creates a directional light.
      * 
      * 
@@ -158,7 +156,6 @@ public:
      */
      */
     float getOuterAngleCos() const;
     float getOuterAngleCos() const;
 
 
-
 private:
 private:
 
 
     /**
     /**
@@ -234,6 +231,7 @@ private:
     Light* clone(NodeCloneContext &context) const;
     Light* clone(NodeCloneContext &context) const;
 
 
     Light::Type _type;
     Light::Type _type;
+    
     union
     union
     {
     {
         Directional* _directional;
         Directional* _directional;

+ 5 - 5
gameplay/src/Material.h

@@ -134,14 +134,14 @@ private:
     Material();
     Material();
 
 
     /**
     /**
-     * Destructor.
+     * Constructor.
      */
      */
-    ~Material();
-
+    Material(const Material& m);
+    
     /**
     /**
-     * Hidden copy constructor.
+     * Destructor.
      */
      */
-    Material(const Material& m);
+    ~Material();
 
 
     /**
     /**
      * Loads a technique from the given properties object into the specified material.
      * Loads a technique from the given properties object into the specified material.

+ 18 - 23
gameplay/src/MaterialParameter.h

@@ -168,6 +168,18 @@ public:
 
 
 private:
 private:
 
 
+    static const char ANIMATION_UNIFORM_BIT = 0x01;
+    
+    /**
+     * Constructor.
+     */
+    MaterialParameter(const char* name);
+    
+    /**
+     * Destructor.
+     */
+    ~MaterialParameter();
+    
     /**
     /**
      * Interface implemented by templated method bindings for simple storage and iteration.
      * Interface implemented by templated method bindings for simple storage and iteration.
      */
      */
@@ -218,20 +230,14 @@ private:
         CountMethod _countMethod;
         CountMethod _countMethod;
     };
     };
 
 
-    /**
-     * Constructor.
-     */
-    MaterialParameter(const char* name);
-
-    /**
-     * Destructor.
-     */
-    ~MaterialParameter();
-
     void clearValue();
     void clearValue();
 
 
     void bind(Effect* effect);
     void bind(Effect* effect);
 
 
+    void applyAnimationValue(AnimationValue* value, float blendWeight, int components);
+
+    void cloneInto(MaterialParameter* materialParameter) const;
+    
     union
     union
     {
     {
         float floatValue;
         float floatValue;
@@ -241,7 +247,7 @@ private:
         const Texture::Sampler* samplerValue;
         const Texture::Sampler* samplerValue;
         MethodBinding* method;
         MethodBinding* method;
     } _value;
     } _value;
-
+    
     enum
     enum
     {
     {
         NONE,
         NONE,
@@ -254,18 +260,7 @@ private:
         SAMPLER,
         SAMPLER,
         METHOD
         METHOD
     } _type;
     } _type;
-
-    static const char ANIMATION_UNIFORM_BIT = 0x01;
-
-    void applyAnimationValue(AnimationValue* value, float blendWeight, int components);
-
-    /**
-     * Copies the data from this MaterialParameter into the given MaterialParameter.
-     * 
-     * @param materialParameter The MaterialParameter to copy the data to.
-     */
-    void cloneInto(MaterialParameter* materialParameter) const;
-
+    
     unsigned int _count;
     unsigned int _count;
     bool _dynamic;
     bool _dynamic;
     std::string _name;
     std::string _name;

+ 0 - 2
gameplay/src/Mesh.h

@@ -299,8 +299,6 @@ private:
 
 
     /**
     /**
      * Constructor.
      * Constructor.
-     *
-     * @param copy The mesh to copy from.
      */
      */
     Mesh(const Mesh& copy);
     Mesh(const Mesh& copy);
 
 

+ 6 - 0
gameplay/src/MeshBatch.h

@@ -111,8 +111,14 @@ public:
 
 
 private:
 private:
 
 
+    /**
+     * Constructor.
+     */
     MeshBatch(const VertexFormat& vertexFormat, Mesh::PrimitiveType primitiveType, Material* material, bool indexed, unsigned int initialCapacity, unsigned int growSize);
     MeshBatch(const VertexFormat& vertexFormat, Mesh::PrimitiveType primitiveType, Material* material, bool indexed, unsigned int initialCapacity, unsigned int growSize);
 
 
+    /**
+     * Constructor.
+     */
     MeshBatch(const MeshBatch& copy);
     MeshBatch(const MeshBatch& copy);
 
 
     void updateVertexAttributeBinding();
     void updateVertexAttributeBinding();

+ 3 - 2
gameplay/src/MeshSkin.h

@@ -117,7 +117,7 @@ private:
     MeshSkin();
     MeshSkin();
 
 
     /**
     /**
-     * Hidden copy constructor.
+     * Constructor.
      */
      */
     MeshSkin(const MeshSkin&);
     MeshSkin(const MeshSkin&);
 
 
@@ -127,7 +127,7 @@ private:
     ~MeshSkin();
     ~MeshSkin();
     
     
     /**
     /**
-     * Hidden copy assignment operator.
+     * Copy assignment operator.
      */
      */
     MeshSkin& operator=(const MeshSkin&);
     MeshSkin& operator=(const MeshSkin&);
 
 
@@ -169,6 +169,7 @@ private:
     Matrix _bindShape;
     Matrix _bindShape;
     std::vector<Joint*> _joints;
     std::vector<Joint*> _joints;
     Joint* _rootJoint;
     Joint* _rootJoint;
+    
     // Pointer to the root node of the mesh skin.
     // Pointer to the root node of the mesh skin.
     // The purpose is so that the joint hierarchy doesn't need to be in the scene.
     // The purpose is so that the joint hierarchy doesn't need to be in the scene.
     // If the joints are not in the scene then something has to hold a reference to it.
     // If the joints are not in the scene then something has to hold a reference to it.

+ 0 - 1
gameplay/src/Model.h

@@ -182,7 +182,6 @@ private:
      * Clones the model and returns a new model.
      * Clones the model and returns a new model.
      * 
      * 
      * @param context The clone context.
      * @param context The clone context.
-     * 
      * @return The new cloned model.
      * @return The new cloned model.
      */
      */
     Model* clone(NodeCloneContext &context);
     Model* clone(NodeCloneContext &context);

+ 6 - 2
gameplay/src/Slider.h

@@ -16,15 +16,16 @@ namespace gameplay
  *
  *
  *  slider
  *  slider
  *  {
  *  {
- *      style       = <Style ID>                // A Style from the Theme.
+ *      style       = <styleID>                 // A Style from the Theme.
  *      position    = <x, y>                    // Position of the Control on-screen, measured in pixels.
  *      position    = <x, y>                    // Position of the Control on-screen, measured in pixels.
  *      size        = <width, height>           // Size of the Control, measured in pixels.
  *      size        = <width, height>           // Size of the Control, measured in pixels.
- *      // TODO: orientation = <HORIZONTAL or VERTICAL>  // Determines whether a slider is stretched along its width or its height
  *      min         = <float>                   // The value of the left- / bottom-most point on the slider.
  *      min         = <float>                   // The value of the left- / bottom-most point on the slider.
  *      max         = <float>                   // The value of the right- / top-most point on the slider.
  *      max         = <float>                   // The value of the right- / top-most point on the slider.
  *      value       = <float>                   // The default position of the marker.
  *      value       = <float>                   // The default position of the marker.
  *      step        = <float>                   // If greater than 0, force the marker to snap to discrete multiples of 'step'.
  *      step        = <float>                   // If greater than 0, force the marker to snap to discrete multiples of 'step'.
  *      text        = <string>                  // Text to display above, below or alongside the slider (depending on the style).
  *      text        = <string>                  // Text to display above, below or alongside the slider (depending on the style).
+ *
+*      // TODO: orientation = <HORIZONTAL or VERTICAL>  // Determines whether a slider is stretched along its width or its height
  *  }
  *  }
  */
  */
 class Slider : public Label
 class Slider : public Label
@@ -154,6 +155,9 @@ protected:
 
 
 private:
 private:
 
 
+    /**
+     * Constructor.
+     */
     Slider(const Slider& copy);
     Slider(const Slider& copy);
 };
 };
 
 

+ 5 - 2
gameplay/src/TextBox.h

@@ -18,9 +18,9 @@ namespace gameplay
  *
  *
  * The following properties are available for text boxes:
  * The following properties are available for text boxes:
  *
  *
- * label <Label ID>
+ * label <labelID>
  * {
  * {
- *      style       = <Style ID>
+ *      style       = <styleID>
  *      position    = <x, y>
  *      position    = <x, y>
  *      size        = <width, height>
  *      size        = <width, height>
  *      text        = <string>
  *      text        = <string>
@@ -121,6 +121,9 @@ protected:
 
 
 private:
 private:
 
 
+    /**
+     * Constructor.
+     */
     TextBox(const TextBox& copy);
     TextBox(const TextBox& copy);
 
 
     void setCaretLocation(int x, int y);
     void setCaretLocation(int x, int y);

+ 5 - 5
gameplay/src/VertexFormat.h

@@ -90,7 +90,7 @@ public:
     };
     };
 
 
     /**
     /**
-     * Constructs a new vertex format for the requested vertex element layout.
+     * Constructor.
      *
      *
      * The passed in element array is copied into the new VertexFormat.
      * The passed in element array is copied into the new VertexFormat.
      *
      *
@@ -105,21 +105,21 @@ public:
     ~VertexFormat();
     ~VertexFormat();
 
 
     /**
     /**
-     * Returns the vertex element at the specified index.
+     * Gets the vertex element at the specified index.
      *
      *
-     * index The index of the element to retreive.
+     * @param index The index of the element to retreive.
      */
      */
     const Element& getElement(unsigned int index) const;
     const Element& getElement(unsigned int index) const;
 
 
     /**
     /**
-     * Returns the number of elements in this VertexFormat.
+     * Gets the number of elements in this VertexFormat.
      *
      *
      * @return The number of items in the elements array.
      * @return The number of items in the elements array.
      */
      */
     unsigned int getElementCount() const;
     unsigned int getElementCount() const;
 
 
     /**
     /**
-     * Returns the size (in bytes) of a single vertex using this format.
+     * Gets the size (in bytes) of a single vertex using this format.
      */
      */
     unsigned int getVertexSize() const;
     unsigned int getVertexSize() const;
 
 

+ 3 - 0
gameplay/src/VerticalLayout.h

@@ -73,6 +73,9 @@ protected:
 
 
 private:
 private:
 
 
+    /**
+     * Constructor.
+     */
     VerticalLayout(const VerticalLayout& copy);
     VerticalLayout(const VerticalLayout& copy);
 };
 };
 
 

+ 7 - 5
gameplay/src/gameplay.h

@@ -7,7 +7,6 @@
 #include "Mouse.h"
 #include "Mouse.h"
 #include "FileSystem.h"
 #include "FileSystem.h"
 #include "Package.h"
 #include "Package.h"
-#include "ScreenDisplayer.h"
 
 
 // Math
 // Math
 #include "Rectangle.h"
 #include "Rectangle.h"
@@ -45,6 +44,7 @@
 #include "FrameBuffer.h"
 #include "FrameBuffer.h"
 #include "RenderTarget.h"
 #include "RenderTarget.h"
 #include "DepthStencilTarget.h"
 #include "DepthStencilTarget.h"
+#include "ScreenDisplayer.h"
 
 
 // Audio
 // Audio
 #include "AudioController.h"
 #include "AudioController.h"
@@ -68,21 +68,23 @@
 #include "PhysicsSocketConstraint.h"
 #include "PhysicsSocketConstraint.h"
 #include "PhysicsSpringConstraint.h"
 #include "PhysicsSpringConstraint.h"
 #include "PhysicsCollisionObject.h"
 #include "PhysicsCollisionObject.h"
-#include "PhysicsRigidBody.h"
-#include "PhysicsCharacter.h"
 #include "PhysicsCollisionShape.h"
 #include "PhysicsCollisionShape.h"
+#include "PhysicsRigidBody.h"
 #include "PhysicsGhostObject.h"
 #include "PhysicsGhostObject.h"
+#include "PhysicsCharacter.h"
 
 
 // UI
 // UI
 #include "Theme.h"
 #include "Theme.h"
 #include "Control.h"
 #include "Control.h"
 #include "Container.h"
 #include "Container.h"
 #include "Form.h"
 #include "Form.h"
-#include "Layout.h"
-#include "AbsoluteLayout.h"
 #include "Label.h"
 #include "Label.h"
 #include "Button.h"
 #include "Button.h"
 #include "CheckBox.h"
 #include "CheckBox.h"
 #include "TextBox.h"
 #include "TextBox.h"
 #include "RadioButton.h"
 #include "RadioButton.h"
 #include "Slider.h"
 #include "Slider.h"
+#include "Layout.h"
+#include "AbsoluteLayout.h"
+#include "VerticalLayout.h"
+