Selaa lähdekoodia

Merge branch 'next' of https://github.com/blackberry-gaming/GamePlay into next-sgrenier

Steve Grenier 13 vuotta sitten
vanhempi
sitoutus
641ba4db04

+ 2 - 2
README.md

@@ -3,7 +3,7 @@ An open-source, cross-platform 3D native C++ game framework making it easy to le
 
 
 ## Supported Mobile Platforms
 ## Supported Mobile Platforms
 - BlackBerry 10 and PlayBook 2.0 (using BlackBerry Native SDK)
 - BlackBerry 10 and PlayBook 2.0 (using BlackBerry Native SDK)
-- Google Android 2.3+ (using Google Android NDK r7, SDK API level 9+)
+- Google Android 2.3+ (using Google Android NDK, SDK API level 9+)
 - Apple iOS 5.1 (using Apple XCode 4.3.2)
 - Apple iOS 5.1 (using Apple XCode 4.3.2)
 
 
 ## Supported Desktop Platforms
 ## Supported Desktop Platforms
@@ -11,8 +11,8 @@ An open-source, cross-platform 3D native C++ game framework making it easy to le
 - Apple MacOS X (using Apple XCode 4.3.2)
 - Apple MacOS X (using Apple XCode 4.3.2)
 
 
 ## Roadmap for 'next' branch
 ## Roadmap for 'next' branch
-- Gamepad support
 - Lua script bindings
 - Lua script bindings
+- Gamepad support
 - Vehicle physics
 - Vehicle physics
 - Terrain
 - Terrain
 - Lightmaps
 - Lightmaps

+ 1 - 1
gameplay-encoder/src/GPBFile.cpp

@@ -429,7 +429,7 @@ void GPBFile::decomposeTransformAnimationChannel(Animation* animation, const Ani
 
 
 static bool isAlmostOne(float value)
 static bool isAlmostOne(float value)
 {
 {
-    return std::abs(value - 1.0f) < EPSILON;
+    return std::fabs(value - 1.0f) < EPSILON;
 }
 }
 
 
 }
 }

+ 19 - 19
gameplay-template/gameplay-template.xcodeproj/project.pbxproj

@@ -43,7 +43,7 @@
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
 		42438B521491AD2000D218B8 /* libgameplay.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgameplay.a; path = "~/Library/Developer/Xcode/DerivedData/gameplay-exiunaubxxjndaapmcqkaoeboiob/Build/Products/Debug/libgameplay.a"; sourceTree = "<group>"; };
 		42438B521491AD2000D218B8 /* libgameplay.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgameplay.a; path = "~/Library/Developer/Xcode/DerivedData/gameplay-exiunaubxxjndaapmcqkaoeboiob/Build/Products/Debug/libgameplay.a"; sourceTree = "<group>"; };
-		42C932BC1491A0DB0098216A /* TEMPLATE_PROJECT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TEMPLATE_PROJECT.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		42C932BC1491A0DB0098216A /* TEMPLATE_PROJECT-macosx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TEMPLATE_PROJECT-macosx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		42C932C01491A0DB0098216A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
 		42C932C01491A0DB0098216A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
 		42C932ED1491A4CB0098216A /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
 		42C932ED1491A4CB0098216A /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
 		42C932EF1491A5160098216A /* TemplateGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemplateGame.cpp; path = src/TemplateGame.cpp; sourceTree = SOURCE_ROOT; };
 		42C932EF1491A5160098216A /* TemplateGame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemplateGame.cpp; path = src/TemplateGame.cpp; sourceTree = SOURCE_ROOT; };
@@ -60,7 +60,7 @@
 		42C9332A1491A7390098216A /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "GAMEPLAY_PATH/external-deps/libpng/lib/macosx/libpng.a"; sourceTree = "<group>"; };
 		42C9332A1491A7390098216A /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "GAMEPLAY_PATH/external-deps/libpng/lib/macosx/libpng.a"; sourceTree = "<group>"; };
 		42C9332D1491A7810098216A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
 		42C9332D1491A7810098216A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
 		5B61611214CCC2200073B857 /* TEMPLATE_PROJECT-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TEMPLATE_PROJECT-macosx.plist"; sourceTree = "<group>"; };
 		5B61611214CCC2200073B857 /* TEMPLATE_PROJECT-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TEMPLATE_PROJECT-macosx.plist"; sourceTree = "<group>"; };
-		5B61612C14CCC24C0073B857 /* TEMPLATE_PROJECT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TEMPLATE_PROJECT.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		5B61612C14CCC24C0073B857 /* TEMPLATE_PROJECT-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TEMPLATE_PROJECT-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		5B61612E14CCC24D0073B857 /* TEMPLATE_PROJECT-ios.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TEMPLATE_PROJECT-ios.plist"; sourceTree = "<group>"; };
 		5B61612E14CCC24D0073B857 /* TEMPLATE_PROJECT-ios.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TEMPLATE_PROJECT-ios.plist"; sourceTree = "<group>"; };
 		5BAF2067152F2DDD003E2AC3 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; };
 		5BAF2067152F2DDD003E2AC3 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; };
 		5BAF2068152F2DDD003E2AC3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
 		5BAF2068152F2DDD003E2AC3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
@@ -133,8 +133,8 @@
 		42C932BD1491A0DB0098216A /* Products */ = {
 		42C932BD1491A0DB0098216A /* Products */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				42C932BC1491A0DB0098216A /* TEMPLATE_PROJECT.app */,
-				5B61612C14CCC24C0073B857 /* TEMPLATE_PROJECT.app */,
+				42C932BC1491A0DB0098216A /* TEMPLATE_PROJECT-macosx.app */,
+				5B61612C14CCC24C0073B857 /* TEMPLATE_PROJECT-ios.app */,
 			);
 			);
 			name = Products;
 			name = Products;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -209,9 +209,9 @@
 /* End PBXGroup section */
 /* End PBXGroup section */
 
 
 /* Begin PBXNativeTarget section */
 /* Begin PBXNativeTarget section */
-		42C932BB1491A0DB0098216A /* TEMPLATE_PROJECT-MacOSX */ = {
+		42C932BB1491A0DB0098216A /* TEMPLATE_PROJECT-macosx */ = {
 			isa = PBXNativeTarget;
 			isa = PBXNativeTarget;
-			buildConfigurationList = 42C932DA1491A0DB0098216A /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-MacOSX" */;
+			buildConfigurationList = 42C932DA1491A0DB0098216A /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-macosx" */;
 			buildPhases = (
 			buildPhases = (
 				42C932B81491A0DB0098216A /* Sources */,
 				42C932B81491A0DB0098216A /* Sources */,
 				42C932B91491A0DB0098216A /* Frameworks */,
 				42C932B91491A0DB0098216A /* Frameworks */,
@@ -223,28 +223,28 @@
 			);
 			);
 			dependencies = (
 			dependencies = (
 			);
 			);
-			name = "TEMPLATE_PROJECT-MacOSX";
+			name = "TEMPLATE_PROJECT-macosx";
 			productName = TEMPLATE_PROJECT;
 			productName = TEMPLATE_PROJECT;
-			productReference = 42C932BC1491A0DB0098216A /* TEMPLATE_PROJECT.app */;
+			productReference = 42C932BC1491A0DB0098216A /* TEMPLATE_PROJECT-macosx.app */;
 			productType = "com.apple.product-type.application";
 			productType = "com.apple.product-type.application";
 		};
 		};
-		5B61611414CCC24C0073B857 /* TEMPLATE_PROJECT-iOS */ = {
+		5B61611414CCC24C0073B857 /* TEMPLATE_PROJECT-ios */ = {
 			isa = PBXNativeTarget;
 			isa = PBXNativeTarget;
-			buildConfigurationList = 5B61612914CCC24C0073B857 /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-iOS" */;
+			buildConfigurationList = 5B61612914CCC24C0073B857 /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-ios" */;
 			buildPhases = (
 			buildPhases = (
 				5B61611514CCC24C0073B857 /* Sources */,
 				5B61611514CCC24C0073B857 /* Sources */,
 				5B61611714CCC24C0073B857 /* Frameworks */,
 				5B61611714CCC24C0073B857 /* Frameworks */,
 				5B61612414CCC24C0073B857 /* ShellScript */,
 				5B61612414CCC24C0073B857 /* ShellScript */,
 				5B61612514CCC24C0073B857 /* Resources */,
 				5B61612514CCC24C0073B857 /* Resources */,
-				5BAF20A3152F2FCE003E2AC3 /* Copy Gameplay Reousrces Run Script */,
+				5BAF20A3152F2FCE003E2AC3 /* Copy Gameplay Resources Run Script */,
 			);
 			);
 			buildRules = (
 			buildRules = (
 			);
 			);
 			dependencies = (
 			dependencies = (
 			);
 			);
-			name = "TEMPLATE_PROJECT-iOS";
+			name = "TEMPLATE_PROJECT-ios";
 			productName = TEMPLATE_PROJECT;
 			productName = TEMPLATE_PROJECT;
-			productReference = 5B61612C14CCC24C0073B857 /* TEMPLATE_PROJECT.app */;
+			productReference = 5B61612C14CCC24C0073B857 /* TEMPLATE_PROJECT-ios.app */;
 			productType = "com.apple.product-type.application";
 			productType = "com.apple.product-type.application";
 		};
 		};
 /* End PBXNativeTarget section */
 /* End PBXNativeTarget section */
@@ -267,8 +267,8 @@
 			projectDirPath = "";
 			projectDirPath = "";
 			projectRoot = "";
 			projectRoot = "";
 			targets = (
 			targets = (
-				42C932BB1491A0DB0098216A /* TEMPLATE_PROJECT-MacOSX */,
-				5B61611414CCC24C0073B857 /* TEMPLATE_PROJECT-iOS */,
+				42C932BB1491A0DB0098216A /* TEMPLATE_PROJECT-macosx */,
+				5B61611414CCC24C0073B857 /* TEMPLATE_PROJECT-ios */,
 			);
 			);
 		};
 		};
 /* End PBXProject section */
 /* End PBXProject section */
@@ -321,7 +321,7 @@
 			shellPath = /bin/sh;
 			shellPath = /bin/sh;
 			shellScript = "touch -cm ${SRCROOT}/res";
 			shellScript = "touch -cm ${SRCROOT}/res";
 		};
 		};
-		5BAF20A3152F2FCE003E2AC3 /* Copy Gameplay Reousrces Run Script */ = {
+		5BAF20A3152F2FCE003E2AC3 /* Copy Gameplay Resources Run Script */ = {
 			isa = PBXShellScriptBuildPhase;
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
@@ -333,7 +333,7 @@
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellPath = /bin/sh;
-			shellScript = "cp -rn GAMEPLAY_PATH/gameplay/res/shaders ${SRCROOT}/res\ncp -rn GAMEPLAY_PATH/gameplay/res/logo_powered_white.png ${SRCROOT}/res\ntouch -cm ${SRCROOT}/res";
+			shellScript = "cp -rn GAMEPLAY_PATH/gameplay/res/shaders ${SRCROOT}/res\ncp -rf GAMEPLAY_PATH/gameplay/res/logo_powered_white.png ${SRCROOT}/res\ntouch -cm ${SRCROOT}/res";
 		};
 		};
 		5BAF20D7152F30C3003E2AC3 /* Copy Gameplay Resources - Run Script */ = {
 		5BAF20D7152F30C3003E2AC3 /* Copy Gameplay Resources - Run Script */ = {
 			isa = PBXShellScriptBuildPhase;
 			isa = PBXShellScriptBuildPhase;
@@ -544,7 +544,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 			defaultConfigurationName = Release;
 		};
 		};
-		42C932DA1491A0DB0098216A /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-MacOSX" */ = {
+		42C932DA1491A0DB0098216A /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-macosx" */ = {
 			isa = XCConfigurationList;
 			isa = XCConfigurationList;
 			buildConfigurations = (
 			buildConfigurations = (
 				42C932DB1491A0DB0098216A /* Debug */,
 				42C932DB1491A0DB0098216A /* Debug */,
@@ -553,7 +553,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 			defaultConfigurationName = Release;
 		};
 		};
-		5B61612914CCC24C0073B857 /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-iOS" */ = {
+		5B61612914CCC24C0073B857 /* Build configuration list for PBXNativeTarget "TEMPLATE_PROJECT-ios" */ = {
 			isa = XCConfigurationList;
 			isa = XCConfigurationList;
 			buildConfigurations = (
 			buildConfigurations = (
 				5B61612A14CCC24C0073B857 /* Debug */,
 				5B61612A14CCC24C0073B857 /* Debug */,

+ 39 - 82
gameplay.doxyfile

@@ -1,4 +1,4 @@
-# Doxyfile 1.8.0
+# Doxyfile 1.7.5.1
 
 
 # This file describes the settings to be used by the documentation system
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project
 # doxygen (www.doxygen.org) for a project
@@ -32,7 +32,7 @@ PROJECT_NAME           = gameplay
 # This could be handy for archiving the generated documentation or 
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 # if some version control system is used.
 
 
-PROJECT_NUMBER         = 1.2.0
+PROJECT_NUMBER         = 1.3.0
 
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
 # for a project that appears at the top of each page and should give viewer 
@@ -205,13 +205,6 @@ TAB_SIZE               = 8
 
 
 ALIASES                = 
 ALIASES                = 
 
 
-# This tag can be used to specify a number of word-keyword mappings (TCL only). 
-# A mapping has the form "name=value". For example adding 
-# "class=itcl::class" will allow you to use the command class in the 
-# itcl::class meaning.
-
-TCL_SUBST              = 
-
 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
 # sources only. Doxygen will then generate output that is more tailored for C. 
 # sources only. Doxygen will then generate output that is more tailored for C. 
 # For instance, some of the names that are used will be different. The list 
 # For instance, some of the names that are used will be different. The list 
@@ -250,15 +243,6 @@ OPTIMIZE_OUTPUT_VHDL   = NO
 
 
 EXTENSION_MAPPING      = 
 EXTENSION_MAPPING      = 
 
 
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all 
-# comments according to the Markdown format, which allows for more readable 
-# documentation. See http://daringfireball.net/projects/markdown/ for details. 
-# The output of markdown processing is further processed by doxygen, so you 
-# can mix doxygen, HTML, and XML commands with Markdown formatting. 
-# Disable only in case of backward compatibilities issues.
-
-MARKDOWN_SUPPORT       = YES
-
 # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
 # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
 # to include (a tag file for) the STL sources as input, then you should 
 # to include (a tag file for) the STL sources as input, then you should 
 # set this tag to YES in order to let doxygen match functions declarations and 
 # set this tag to YES in order to let doxygen match functions declarations and 
@@ -341,21 +325,10 @@ TYPEDEF_HIDES_STRUCT   = NO
 # a logarithmic scale so increasing the size by one will roughly double the 
 # a logarithmic scale so increasing the size by one will roughly double the 
 # memory usage. The cache size is given by this formula: 
 # memory usage. The cache size is given by this formula: 
 # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
 # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
-# corresponding to a cache size of 2^16 = 65536 symbols.
+# corresponding to a cache size of 2^16 = 65536 symbols
 
 
 SYMBOL_CACHE_SIZE      = 0
 SYMBOL_CACHE_SIZE      = 0
 
 
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 
-# their name and scope. Since this can be an expensive process and often the 
-# same symbol appear multiple times in the code, doxygen keeps a cache of 
-# pre-resolved symbols. If the cache is too small doxygen will become slower. 
-# If the cache is too large, memory is wasted. The cache size is given by this 
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-LOOKUP_CACHE_SIZE      = 0
-
 #---------------------------------------------------------------------------
 #---------------------------------------------------------------------------
 # Build related configuration options
 # Build related configuration options
 #---------------------------------------------------------------------------
 #---------------------------------------------------------------------------
@@ -372,11 +345,6 @@ EXTRACT_ALL            = NO
 
 
 EXTRACT_PRIVATE        = NO
 EXTRACT_PRIVATE        = NO
 
 
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-
-EXTRACT_PACKAGE        = NO
-
 # If the EXTRACT_STATIC tag is set to YES all static members of a file 
 # If the EXTRACT_STATIC tag is set to YES all static members of a file 
 # will be included in the documentation.
 # will be included in the documentation.
 
 
@@ -606,8 +574,7 @@ LAYOUT_FILE            =
 # .bib extension is automatically appended if omitted. Using this command 
 # .bib extension is automatically appended if omitted. Using this command 
 # requires the bibtex tool to be installed. See also 
 # requires the bibtex tool to be installed. See also 
 # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 
 # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 
-# feature you need bibtex and perl available in the search path.
+# of the bibliography can be controlled using LATEX_BIB_STYLE.
 
 
 CITE_BIB_FILES         = 
 CITE_BIB_FILES         = 
 
 
@@ -698,15 +665,14 @@ FILE_PATTERNS          = *.h \
 
 
 RECURSIVE              = NO
 RECURSIVE              = NO
 
 
-# The EXCLUDE tag can be used to specify files and/or directories that should be 
+# The EXCLUDE tag can be used to specify files and/or directories that should 
 # excluded from the INPUT source files. This way you can easily exclude a 
 # excluded from the INPUT source files. This way you can easily exclude a 
 # subdirectory from a directory tree whose root is specified with the INPUT tag. 
 # subdirectory from a directory tree whose root is specified with the INPUT tag. 
-# Note that relative paths are relative to the directory from which doxygen is 
-# run.
+# Note that relative paths are relative to directory from which doxygen is run.
 
 
 EXCLUDE                = 
 EXCLUDE                = 
 
 
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
 # directories that are symbolic links (a Unix file system feature) are excluded 
 # directories that are symbolic links (a Unix file system feature) are excluded 
 # from the input.
 # from the input.
 
 
@@ -891,7 +857,7 @@ HTML_FILE_EXTENSION    = .html
 # standard header. Note that when using a custom header you are responsible  
 # standard header. Note that when using a custom header you are responsible  
 # for the proper inclusion of any scripts and style sheets that doxygen 
 # for the proper inclusion of any scripts and style sheets that doxygen 
 # needs, which is dependent on the configuration options used. 
 # needs, which is dependent on the configuration options used. 
-# It is advised to generate a default header using "doxygen -w html 
+# It is adviced to generate a default header using "doxygen -w html 
 # header.html footer.html stylesheet.css YourConfigFile" and then modify 
 # header.html footer.html stylesheet.css YourConfigFile" and then modify 
 # that header. Note that the header is subject to change so you typically 
 # that header. Note that the header is subject to change so you typically 
 # have to redo this when upgrading to a newer version of doxygen or when 
 # have to redo this when upgrading to a newer version of doxygen or when 
@@ -910,7 +876,7 @@ HTML_FOOTER            =
 # fine-tune the look of the HTML output. If the tag is left blank doxygen 
 # fine-tune the look of the HTML output. If the tag is left blank doxygen 
 # will generate a default style sheet. Note that doxygen will try to copy 
 # will generate a default style sheet. Note that doxygen will try to copy 
 # the style sheet file to the HTML output directory, so don't put your own 
 # the style sheet file to the HTML output directory, so don't put your own 
-# style sheet in the HTML output directory as well, or it will be erased!
+# stylesheet in the HTML output directory as well, or it will be erased!
 
 
 HTML_STYLESHEET        = 
 HTML_STYLESHEET        = 
 
 
@@ -924,7 +890,7 @@ HTML_STYLESHEET        =
 HTML_EXTRA_FILES       = 
 HTML_EXTRA_FILES       = 
 
 
 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
-# Doxygen will adjust the colors in the style sheet and background images 
+# Doxygen will adjust the colors in the stylesheet and background images 
 # according to this color. Hue is specified as an angle on a colorwheel, 
 # according to this color. Hue is specified as an angle on a colorwheel, 
 # see http://en.wikipedia.org/wiki/Hue for more information. 
 # see http://en.wikipedia.org/wiki/Hue for more information. 
 # For instance the value 0 represents red, 60 is yellow, 120 is green, 
 # For instance the value 0 represents red, 60 is yellow, 120 is green, 
@@ -1119,33 +1085,29 @@ GENERATE_ECLIPSEHELP   = NO
 
 
 ECLIPSE_DOC_ID         = org.doxygen.Project
 ECLIPSE_DOC_ID         = org.doxygen.Project
 
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 
-# at top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it. Since the tabs have the same information as the 
-# navigation tree you can set this option to NO if you already set 
-# GENERATE_TREEVIEW to YES.
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
 
 
 DISABLE_INDEX          = NO
 DISABLE_INDEX          = NO
 
 
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML 
+# documentation. Note that a value of 0 will completely suppress the enum 
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE   = 4
+
 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
 # structure should be generated to display hierarchical information. 
 # structure should be generated to display hierarchical information. 
 # If the tag value is set to YES, a side panel will be generated 
 # If the tag value is set to YES, a side panel will be generated 
 # containing a tree-like index structure (just like the one that 
 # containing a tree-like index structure (just like the one that 
 # is generated for HTML Help). For this to work a browser that supports 
 # is generated for HTML Help). For this to work a browser that supports 
 # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
 # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
-# Windows users are probably better off using the HTML help feature. 
-# Since the tree basically has the same information as the tab index you 
-# could consider to set DISABLE_INDEX to NO when enabling this option.
+# Windows users are probably better off using the HTML help feature.
 
 
 GENERATE_TREEVIEW      = NO
 GENERATE_TREEVIEW      = NO
 
 
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML 
-# documentation. Note that a value of 0 will completely suppress the enum 
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
 # and Class Hierarchy pages using a tree view instead of an ordered list.
 # and Class Hierarchy pages using a tree view instead of an ordered list.
 
 
@@ -1182,7 +1144,7 @@ FORMULA_TRANSPARENT    = YES
 # (see http://www.mathjax.org) which uses client side Javascript for the 
 # (see http://www.mathjax.org) which uses client side Javascript for the 
 # rendering instead of using prerendered bitmaps. Use this if you do not 
 # rendering instead of using prerendered bitmaps. Use this if you do not 
 # have LaTeX installed or if you want to formulas look prettier in the HTML 
 # have LaTeX installed or if you want to formulas look prettier in the HTML 
-# output. When enabled you may also need to install MathJax separately and 
+# output. When enabled you also need to install MathJax separately and 
 # configure the path to it using the MATHJAX_RELPATH option.
 # configure the path to it using the MATHJAX_RELPATH option.
 
 
 USE_MATHJAX            = NO
 USE_MATHJAX            = NO
@@ -1191,10 +1153,10 @@ USE_MATHJAX            = NO
 # HTML output directory using the MATHJAX_RELPATH option. The destination 
 # HTML output directory using the MATHJAX_RELPATH option. The destination 
 # directory should contain the MathJax.js script. For instance, if the mathjax 
 # directory should contain the MathJax.js script. For instance, if the mathjax 
 # directory is located at the same level as the HTML output directory, then 
 # directory is located at the same level as the HTML output directory, then 
-# MATHJAX_RELPATH should be ../mathjax. The default value points to 
-# the MathJax Content Delivery Network so you can quickly see the result without 
-# installing MathJax.  However, it is strongly recommended to install a local 
-# copy of MathJax from http://www.mathjax.org before deployment.
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the 
+# mathjax.org site, so you can quickly see the result without installing 
+# MathJax, but it is strongly recommended to install a local copy of MathJax 
+# before deployment.
 
 
 MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
 MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
 
 
@@ -1353,7 +1315,7 @@ COMPACT_RTF            = NO
 
 
 RTF_HYPERLINKS         = NO
 RTF_HYPERLINKS         = NO
 
 
-# Load style sheet definitions from file. Syntax is similar to doxygen's 
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
 # config file, i.e. a series of assignments. You only have to provide 
 # config file, i.e. a series of assignments. You only have to provide 
 # replacements, missing definitions are set to their default value.
 # replacements, missing definitions are set to their default value.
 
 
@@ -1542,16 +1504,20 @@ SKIP_FUNCTION_MACROS   = YES
 # Configuration::additions related to external references
 # Configuration::additions related to external references
 #---------------------------------------------------------------------------
 #---------------------------------------------------------------------------
 
 
-# The TAGFILES option can be used to specify one or more tagfiles. For each 
-# tag file the location of the external documentation should be added. The 
-# format of a tag file without this location is as follows: 
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
 #   TAGFILES = file1 file2 ... 
 #   TAGFILES = file1 file2 ... 
 # Adding location for the tag files is done as follows: 
 # Adding location for the tag files is done as follows: 
 #   TAGFILES = file1=loc1 "file2 = loc2" ... 
 #   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths 
-# or URLs. Note that each tag file must have a unique name (where the name does 
-# NOT include the path). If a tag file is not located in the directory in which 
-# doxygen is run, you must also specify the path to the tagfile here.
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
 
 
 TAGFILES               = 
 TAGFILES               = 
 
 
@@ -1642,7 +1608,7 @@ DOT_FONTPATH           =
 # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
 # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
 # will generate a graph for each documented class showing the direct and 
 # will generate a graph for each documented class showing the direct and 
 # indirect inheritance relations. Setting this tag to YES will force the 
 # indirect inheritance relations. Setting this tag to YES will force the 
-# CLASS_DIAGRAMS tag to NO.
+# the CLASS_DIAGRAMS tag to NO.
 
 
 CLASS_GRAPH            = YES
 CLASS_GRAPH            = YES
 
 
@@ -1664,15 +1630,6 @@ GROUP_GRAPHS           = YES
 
 
 UML_LOOK               = NO
 UML_LOOK               = NO
 
 
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside 
-# the class node. If there are many fields or methods and many nodes the 
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS 
-# threshold limits the number of items for each type to make the size more 
-# managable. Set this to 0 for no limit. Note that the threshold may be 
-# exceeded by 50% before the limit is enforced.
-
-UML_LIMIT_NUM_FIELDS   = 10
-
 # If set to YES, the inheritance and collaboration graphs will show the 
 # If set to YES, the inheritance and collaboration graphs will show the 
 # relations between templates and their instances.
 # relations between templates and their instances.
 
 

+ 1 - 0
gameplay/src/AbsoluteLayout.h

@@ -40,6 +40,7 @@ protected:
      * It simply calls update() on any control that is dirty.
      * It simply calls update() on any control that is dirty.
      *
      *
      * @param container The container to update.
      * @param container The container to update.
+     * @param offset The layout offset.
      */
      */
     void update(const Container* container, const Vector2& offset);
     void update(const Container* container, const Vector2& offset);
 
 

+ 4 - 3
gameplay/src/AnimationClip.cpp

@@ -283,7 +283,7 @@ void AnimationClip::addListener(AnimationClip::Listener* listener, unsigned long
                 if (isClipStateBitSet(CLIP_IS_PLAYING_BIT))
                 if (isClipStateBitSet(CLIP_IS_PLAYING_BIT))
                 {
                 {
                     unsigned long currentTime = _elapsedTime % _duration;
                     unsigned long currentTime = _elapsedTime % _duration;
-                    GP_ASSERT(**_listenerItr);
+                    GP_ASSERT(**_listenerItr || *_listenerItr == _listeners->end());
                     if ((_speed >= 0.0f && currentTime < eventTime && (*_listenerItr == _listeners->end() || eventTime < (**_listenerItr)->_eventTime)) || 
                     if ((_speed >= 0.0f && currentTime < eventTime && (*_listenerItr == _listeners->end() || eventTime < (**_listenerItr)->_eventTime)) || 
                         (_speed <= 0 && currentTime > eventTime && (*_listenerItr == _listeners->begin() || eventTime > (**_listenerItr)->_eventTime)))
                         (_speed <= 0 && currentTime > eventTime && (*_listenerItr == _listeners->begin() || eventTime > (**_listenerItr)->_eventTime)))
                         *_listenerItr = itr;
                         *_listenerItr = itr;
@@ -343,6 +343,7 @@ bool AnimationClip::update(unsigned long elapsedTime)
     if (_repeatCount != REPEAT_INDEFINITE && ((_speed >= 0.0f && _elapsedTime >= (long) _activeDuration) || (_speed <= 0.0f && _elapsedTime <= 0L)))
     if (_repeatCount != REPEAT_INDEFINITE && ((_speed >= 0.0f && _elapsedTime >= (long) _activeDuration) || (_speed <= 0.0f && _elapsedTime <= 0L)))
     {
     {
         resetClipStateBit(CLIP_IS_STARTED_BIT);
         resetClipStateBit(CLIP_IS_STARTED_BIT);
+        
         if (_speed >= 0.0f)
         if (_speed >= 0.0f)
         {
         {
             // If _duration == 0, we have a "pose". Just set currentTime to 0.
             // If _duration == 0, we have a "pose". Just set currentTime to 0.
@@ -415,13 +416,13 @@ bool AnimationClip::update(unsigned long elapsedTime)
         if (isClipStateBitSet(CLIP_IS_FADING_OUT_STARTED_BIT)) // Calculate elapsed time since the fade out begin.
         if (isClipStateBitSet(CLIP_IS_FADING_OUT_STARTED_BIT)) // Calculate elapsed time since the fade out begin.
         {
         {
             GP_ASSERT(_crossFadeToClip);
             GP_ASSERT(_crossFadeToClip);
-            _crossFadeOutElapsed = (Game::getGameTime() - _crossFadeToClip->_timeStarted) * abs(_speed); 
+            _crossFadeOutElapsed = (Game::getGameTime() - _crossFadeToClip->_timeStarted) * fabs(_speed); 
             resetClipStateBit(CLIP_IS_FADING_OUT_STARTED_BIT);
             resetClipStateBit(CLIP_IS_FADING_OUT_STARTED_BIT);
         }
         }
         else
         else
         {
         {
             // continue tracking elapsed time.
             // continue tracking elapsed time.
-            _crossFadeOutElapsed += elapsedTime * abs(_speed);
+            _crossFadeOutElapsed += elapsedTime * fabs(_speed);
         }
         }
 
 
         if (_crossFadeOutElapsed < _crossFadeOutDuration)
         if (_crossFadeOutElapsed < _crossFadeOutDuration)

+ 0 - 1
gameplay/src/AnimationTarget.cpp

@@ -419,7 +419,6 @@ Animation::Channel* AnimationTarget::getChannel(const char* id) const
     if (_animationChannels)
     if (_animationChannels)
     {
     {
         std::vector<Animation::Channel*>::iterator itr = _animationChannels->begin();
         std::vector<Animation::Channel*>::iterator itr = _animationChannels->begin();
-        GP_ASSERT(*itr);
 
 
         if (id == NULL)
         if (id == NULL)
             return (*itr);
             return (*itr);

+ 1 - 0
gameplay/src/CheckBox.h

@@ -119,6 +119,7 @@ protected:
      * properties, such as its text viewport.
      * properties, such as its text viewport.
      *
      *
      * @param container This control's parent container.
      * @param container This control's parent container.
+     * @param offset The position offset.
      */
      */
     void update(const Control* container, const Vector2& offset);
     void update(const Control* container, const Vector2& offset);
 
 

+ 12 - 5
gameplay/src/Container.cpp

@@ -102,9 +102,16 @@ void Container::addControls(Theme* theme, Properties* properties)
 
 
         const char* controlStyleName = controlSpace->getString("style");
         const char* controlStyleName = controlSpace->getString("style");
         Theme::Style* controlStyle = NULL;
         Theme::Style* controlStyle = NULL;
-        GP_ASSERT(controlStyleName);
-        controlStyle = theme->getStyle(controlStyleName);
-        GP_ASSERT(controlStyle);
+        if (controlStyleName)
+        {
+            controlStyle = theme->getStyle(controlStyleName);
+        }
+        else
+        {
+            Theme::Style::Overlay* overlay = Theme::Style::Overlay::create();
+            controlStyle = new Theme::Style(theme, "", 1.0f / theme->_texture->getWidth(), 1.0f / theme->_texture->getHeight(),
+                Theme::Margin::empty(), Theme::Border::empty(), overlay, overlay, overlay, overlay);
+        }
 
 
         std::string controlName(controlSpace->getNamespace());
         std::string controlName(controlSpace->getNamespace());
         std::transform(controlName.begin(), controlName.end(), controlName.begin(), (int(*)(int))toupper);
         std::transform(controlName.begin(), controlName.end(), controlName.begin(), (int(*)(int))toupper);
@@ -676,9 +683,9 @@ void Container::updateScroll()
         _scrollingVelocity.x *= dampening;
         _scrollingVelocity.x *= dampening;
         _scrollingVelocity.y *= dampening;
         _scrollingVelocity.y *= dampening;
 
 
-        if (abs(_scrollingVelocity.x) < 100.0f)
+        if (fabs(_scrollingVelocity.x) < 100.0f)
             _scrollingVelocity.x = 0.0f;
             _scrollingVelocity.x = 0.0f;
-        if (abs(_scrollingVelocity.y) < 100.0f)
+        if (fabs(_scrollingVelocity.y) < 100.0f)
             _scrollingVelocity.y = 0.0f;
             _scrollingVelocity.y = 0.0f;
     }
     }
 
 

+ 128 - 29
gameplay/src/Container.h

@@ -25,7 +25,8 @@ namespace gameplay
          size        = <width, height>   // Size of the container, measured in pixels.
          size        = <width, height>   // Size of the container, measured in pixels.
          width       = <width>   // Can be used in place of 'size', e.g. with 'autoHeight = true'
          width       = <width>   // Can be used in place of 'size', e.g. with 'autoHeight = true'
          height      = <height>  // Can be used in place of 'size', e.g. with 'autoWidth = true'
          height      = <height>  // Can be used in place of 'size', e.g. with 'autoWidth = true'
-         scroll      = <Container::Scroll constant>
+         scroll      = <Container::Scroll constant> // Whether scrolling is allowed and in which directions.
+         scrollBarsAutoHide = <bool>    // Whether scrollbars fade out when not in use.
   
   
          // All the nested controls within this container.
          // All the nested controls within this container.
          container 
          container 
@@ -46,6 +47,9 @@ class Container : public Control
 {
 {
 public:
 public:
 
 
+    /**
+     * Constant used to auto-hide scrollbars.
+     */
     static const int ANIMATE_SCROLLBAR_OPACITY = 8;
     static const int ANIMATE_SCROLLBAR_OPACITY = 8;
 
 
     /**
     /**
@@ -143,9 +147,9 @@ public:
     Scroll getScroll() const;
     Scroll getScroll() const;
 
 
     /**
     /**
-     * Set whether scrollbars are always visible, or only visible while scrolling.
+     * Set whether scrollbars auto hidden when they become static.
      *
      *
-     * @param alwaysVisible Whether scrollbars are always visible.
+     * @param autoHide true to auto hide the scrollbars when they become static.
      */
      */
     void setScrollBarsAutoHide(bool autoHide);
     void setScrollBarsAutoHide(bool autoHide);
 
 
@@ -164,17 +168,17 @@ public:
     /**
     /**
      * @see AnimationTarget#getAnimationPropertyComponentCount
      * @see AnimationTarget#getAnimationPropertyComponentCount
      */
      */
-    unsigned int getAnimationPropertyComponentCount(int propertyId) const;
+    virtual unsigned int getAnimationPropertyComponentCount(int propertyId) const;
 
 
     /**
     /**
      * @see AnimationTarget#getAnimationProperty
      * @see AnimationTarget#getAnimationProperty
      */
      */
-    void getAnimationPropertyValue(int propertyId, AnimationValue* value);
+    virtual void getAnimationPropertyValue(int propertyId, AnimationValue* value);
 
 
     /**
     /**
      * @see AnimationTarget#setAnimationProperty
      * @see AnimationTarget#setAnimationProperty
      */
      */
-    void setAnimationPropertyValue(int propertyId, AnimationValue* value, float blendWeight = 1.0f);
+    virtual void setAnimationPropertyValue(int propertyId, AnimationValue* value, float blendWeight = 1.0f);
 
 
 protected:
 protected:
 
 
@@ -192,6 +196,8 @@ protected:
      * Create an empty container.  A container's layout type must be specified at creation time.
      * Create an empty container.  A container's layout type must be specified at creation time.
      *
      *
      * @param type The container's layout type.
      * @param type The container's layout type.
+     *
+     * @return The new container.
      */
      */
     static Container* create(Layout::Type type);
     static Container* create(Layout::Type type);
 
 
@@ -211,6 +217,7 @@ protected:
      * and positions them according to the container's layout.
      * and positions them according to the container's layout.
      *
      *
      * @param container This container's parent container.
      * @param container This container's parent container.
+     * @param offset The offset.
      */
      */
     virtual void update(const Control* container, const Vector2& offset);
     virtual void update(const Control* container, const Vector2& offset);
 
 
@@ -242,28 +249,42 @@ protected:
 
 
     /**
     /**
      * Gets a Layout::Type enum from a matching string.
      * Gets a Layout::Type enum from a matching string.
+     *
+     * @param layoutString The layout string to parse
      */
      */
     static Layout::Type getLayoutType(const char* layoutString);
     static Layout::Type getLayoutType(const char* layoutString);
 
 
     /**
     /**
      * Returns whether this control is a container.
      * Returns whether this control is a container.
-     * This is true in this case.
+     * 
+     * @return true if this is a container, false if not.
      */
      */
     bool isContainer();
     bool isContainer();
 
 
     /**
     /**
      * Returns whether this container or any of its controls have been modified and require an update.
      * Returns whether this container or any of its controls have been modified and require an update.
+     * 
+     * @return true if this container or any of its controls have been modified and require an update.
      */
      */
     virtual bool isDirty();
     virtual bool isDirty();
 
 
     /**
     /**
      * Adds controls nested within a properties object to this container,
      * Adds controls nested within a properties object to this container,
      * searching for styles within the given theme.
      * searching for styles within the given theme.
+     *
+     * @param theme The them to add controls from
+     * @param properties The properties to use.
      */
      */
     void addControls(Theme* theme, Properties* properties);
     void addControls(Theme* theme, Properties* properties);
 
 
     /**
     /**
-     * Draws a sprite batch for the specified clipping rect 
+     * Draws a sprite batch for the specified clipping rect .
+     *
+     * @param spriteBatch The sprite batch to use.
+     * @param clip The clipping rectangle.
+     * @param needsClear Whether it needs to be cleared.
+     * @param cleared Whether it was previously cleared
+     * @param targetHeight The targets height
      */
      */
     virtual void draw(SpriteBatch* spriteBatch, const Rectangle& clip, bool needsClear, bool cleared, float targetHeight);
     virtual void draw(SpriteBatch* spriteBatch, const Rectangle& clip, bool needsClear, bool cleared, float targetHeight);
 
 
@@ -272,71 +293,149 @@ protected:
      */
      */
     void updateScroll();
     void updateScroll();
 
 
+    /**
+     * Applies touch events to scroll state.
+     *
+     * @param evt The touch event that occurred.
+     * @param x The x position of the touch in pixels. Left edge is zero.
+     * @param y The y position of the touch in pixels. Top edge is zero.
+     * @param contactIndex The order of occurrence for multiple touch contacts starting at zero.
+     *
+     * @return Whether the touch event was consumed by scrolling within this container.
+     *
+     * @see Touch::TouchEvent
+     */
     bool touchEventScroll(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex);
     bool touchEventScroll(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex);
 
 
+    /**
+     * Get a Scroll enum from a matching string.
+     *
+     * @param scroll A string representing a Scroll enum.
+     *
+     * @return The Scroll enum value that matches the given string.
+     */
     static Scroll getScroll(const char* scroll);
     static Scroll getScroll(const char* scroll);
 
 
     /**
     /**
      * The container's layout.
      * The container's layout.
      */
      */
     Layout* _layout;
     Layout* _layout;
-
     /**
     /**
      * List of controls within the container.
      * List of controls within the container.
      */
      */
     std::vector<Control*> _controls;
     std::vector<Control*> _controls;
-
+    /**
+     * Scrollbar top cap image.
+     */
     Theme::ThemeImage* _scrollBarTopCap;
     Theme::ThemeImage* _scrollBarTopCap;
+    /**
+     * Scrollbar verticle image.
+     */
     Theme::ThemeImage* _scrollBarVertical;
     Theme::ThemeImage* _scrollBarVertical;
+    /**
+     * Scrollbar bottom cap image.
+     */
     Theme::ThemeImage* _scrollBarBottomCap;
     Theme::ThemeImage* _scrollBarBottomCap;
+    /**
+     * Scrollbar left cap image.
+     */
     Theme::ThemeImage* _scrollBarLeftCap;
     Theme::ThemeImage* _scrollBarLeftCap;
+    /**
+     * Scrollbar horizontal image.
+     */
     Theme::ThemeImage* _scrollBarHorizontal;
     Theme::ThemeImage* _scrollBarHorizontal;
+    /**
+     * Scrollbar horizontal image.
+     */
     Theme::ThemeImage* _scrollBarRightCap;
     Theme::ThemeImage* _scrollBarRightCap;
-
-    // Flag representing whether scrolling is enabled, and in which directions.
+    /** 
+     * Flag representing whether scrolling is enabled, and in which directions.
+     */
     Scroll _scroll;
     Scroll _scroll;
-    // Scroll bar bounds
+    /** 
+     * Scroll bar bounds
+     */
     Rectangle _scrollBarBounds;
     Rectangle _scrollBarBounds;
-    // How far this layout has been scrolled in each direction.
+    /** 
+     * How far this layout has been scrolled in each direction.
+     */
     Vector2 _scrollPosition;
     Vector2 _scrollPosition;
-    // Should the scrollbars auto hide. Default is false.
+    /** 
+     * Should the scrollbars auto hide. Default is false.
+     */
     bool _scrollBarsAutoHide;
     bool _scrollBarsAutoHide;
-    // Used to animate scrollbars fading out.
+    /** 
+     * Used to animate scrollbars fading out.
+     */
     float _scrollBarOpacity;
     float _scrollBarOpacity;
-    // Whether the user is currently touching / holding the mouse down within this layout's container.
+    /** 
+     * Whether the user is currently touching / holding the mouse down within this layout's container.
+     */
     bool _scrolling;
     bool _scrolling;
-    // First scrolling touch x position
+    /** 
+     * First scrolling touch x position
+     */ 
     int _scrollingFirstX;
     int _scrollingFirstX;
-    // First scrolling touch y position
+    /** 
+     * First scrolling touch y position
+     */ 
     int _scrollingFirstY;
     int _scrollingFirstY;
-    // The last y position when scrolling
+    /** 
+     * The last y position when scrolling
+     */ 
     int _scrollingLastX;
     int _scrollingLastX;
-    // The last x position when scrolling
+    /** 
+     * The last x position when scrolling
+     */ 
     int _scrollingLastY;
     int _scrollingLastY;
-    // Time we started scrolling in the x
+    /** 
+     * Time we started scrolling in the x
+     */ 
     long _scrollingStartTimeX;
     long _scrollingStartTimeX;
-    // Time we started scrolling in the y
+    /** 
+     * Time we started scrolling in the y
+     */ 
     long _scrollingStartTimeY;
     long _scrollingStartTimeY;
-    // The last time we were scrolling
+    /** 
+     * The last time we were scrolling
+     */
     long _scrollingLastTime;
     long _scrollingLastTime;
-    // Speed to continue scrolling at after touch release.
+    /** 
+     * Speed to continue scrolling at after touch release.
+     */ 
     Vector2 _scrollingVelocity;
     Vector2 _scrollingVelocity;
-    // Friction dampens velocity.
+    /** 
+     * Friction dampens velocity.
+     */ 
     float _scrollingFriction;
     float _scrollingFriction;
-    // Are we scrolling to the right ?
+    /** 
+     * Are we scrolling to the right?
+     */ 
     bool _scrollingRight;
     bool _scrollingRight;
-    // Are we scrolling down ?
+    /** 
+     * Are we scrolling down?
+     */ 
     bool _scrollingDown;
     bool _scrollingDown;
 
 
 private:
 private:
 
 
+    /**
+     * Constructor.
+     */
     Container(const Container& copy);
     Container(const Container& copy);
 
 
     AnimationClip* _scrollBarOpacityClip;
     AnimationClip* _scrollBarOpacityClip;
     int _zIndexDefault;
     int _zIndexDefault;
 };
 };
 
 
-// Sort funtion for use with _controls.sort(), based on Z-Order.
+
+/**
+ * Sort funtion for use with _controls.sort(), based on Z-Order.
+ * 
+ * @param c1 The first control
+ * @param c2 The second control
+ * return true if the first controls z index is less than the second.
+ */
 bool sortControlsByZOrder(Control* c1, Control* c2);
 bool sortControlsByZOrder(Control* c1, Control* c2);
 
 
 }
 }

+ 19 - 6
gameplay/src/Control.h

@@ -687,17 +687,17 @@ public:
     /**
     /**
      * @see AnimationTarget#getAnimationPropertyComponentCount
      * @see AnimationTarget#getAnimationPropertyComponentCount
      */
      */
-    unsigned int getAnimationPropertyComponentCount(int propertyId) const;
+    virtual unsigned int getAnimationPropertyComponentCount(int propertyId) const;
 
 
     /**
     /**
      * @see AnimationTarget#getAnimationProperty
      * @see AnimationTarget#getAnimationProperty
      */
      */
-    void getAnimationPropertyValue(int propertyId, AnimationValue* value);
+    virtual void getAnimationPropertyValue(int propertyId, AnimationValue* value);
 
 
     /**
     /**
      * @see AnimationTarget#setAnimationProperty
      * @see AnimationTarget#setAnimationProperty
      */
      */
-    void setAnimationPropertyValue(int propertyId, AnimationValue* value, float blendWeight = 1.0f);
+    virtual void setAnimationPropertyValue(int propertyId, AnimationValue* value, float blendWeight = 1.0f);
 
 
 protected:
 protected:
 
 
@@ -758,7 +758,6 @@ protected:
      *
      *
      * @param spriteBatch The sprite batch containing this control's icons.
      * @param spriteBatch The sprite batch containing this control's icons.
      * @param clip The clipping rectangle of this control's parent container.
      * @param clip The clipping rectangle of this control's parent container.
-     * @param offset Layout-computed positioning offset to add to the control's position.
      */
      */
     virtual void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
     virtual void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
 
 
@@ -766,10 +765,18 @@ protected:
      * Draw this control's text.
      * Draw this control's text.
      *
      *
      * @param clip The clipping rectangle of this control's parent container.
      * @param clip The clipping rectangle of this control's parent container.
-     * @param offset Layout-computed positioning offset to add to the control's position.
      */
      */
     virtual void drawText(const Rectangle& clip);
     virtual void drawText(const Rectangle& clip);
 
 
+    /**
+     * Draws a sprite batch for the specified clipping rect .
+     *
+     * @param spriteBatch The sprite batch to use.
+     * @param clip The clipping rectangle.
+     * @param needsClear Whether it needs to be cleared.
+     * @param cleared Whether it was previously cleared
+     * @param targetHeight The targets height
+     */
     virtual void draw(SpriteBatch* spriteBatch, const Rectangle& clip, bool needsClear, bool cleared, float targetHeight);
     virtual void draw(SpriteBatch* spriteBatch, const Rectangle& clip, bool needsClear, bool cleared, float targetHeight);
 
 
     /**
     /**
@@ -865,6 +872,9 @@ protected:
      */
      */
     Rectangle _viewportClipBounds;
     Rectangle _viewportClipBounds;
 
 
+    /**
+     * If the control is dirty and need updating.
+     */
     bool _dirty;
     bool _dirty;
     
     
     /**
     /**
@@ -901,7 +911,10 @@ protected:
      * The current opacity of the control.
      * The current opacity of the control.
      */
      */
     float _opacity;
     float _opacity;
-
+    
+    /**
+     * The z-order of the control.
+     */
     int _zIndex;
     int _zIndex;
 
 
 private:
 private:

+ 1 - 4
gameplay/src/FlowLayout.cpp

@@ -78,10 +78,7 @@ void FlowLayout::update(const Container* container, const Vector2& offset)
         yPosition = rowY + margin.top;
         yPosition = rowY + margin.top;
 
 
         control->setPosition(xPosition, yPosition);
         control->setPosition(xPosition, yPosition);
-        if (control->isDirty() || control->isContainer())
-        {
-            control->update(container, offset);
-        }
+        control->update(container, offset);
 
 
         xPosition += bounds.width + margin.right;
         xPosition += bounds.width + margin.right;
 
 

+ 4 - 0
gameplay/src/FlowLayout.h

@@ -6,6 +6,9 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
+/**
+ * Defines a layout that arranges controls in order, left-to-right, row by row.
+ */
 class FlowLayout : public Layout
 class FlowLayout : public Layout
 {
 {
     friend class Form;
     friend class Form;
@@ -33,6 +36,7 @@ protected:
      * Update the controls contained by the specified container.
      * Update the controls contained by the specified container.
      *
      *
      * @param container The container to update.
      * @param container The container to update.
+     * @param offset The offset position.
      */
      */
     void update(const Container* container, const Vector2& offset);
     void update(const Container* container, const Vector2& offset);
 
 

+ 20 - 2
gameplay/src/Form.cpp

@@ -90,8 +90,19 @@ Form* Form::create(const char* url)
     Game* game = Game::getInstance();
     Game* game = Game::getInstance();
     Matrix::createOrthographicOffCenter(0, game->getWidth(), game->getHeight(), 0, 0, 1, &form->_defaultProjectionMatrix);
     Matrix::createOrthographicOffCenter(0, game->getWidth(), game->getHeight(), 0, 0, 1, &form->_defaultProjectionMatrix);
 
 
+    Theme::Style* style = NULL;
     const char* styleName = formProperties->getString("style");
     const char* styleName = formProperties->getString("style");
-    form->initialize(theme->getStyle(styleName), formProperties);
+    if (styleName)
+    {
+        style = theme->getStyle(styleName);
+    }
+    else
+    {
+        Theme::Style::Overlay* overlay = Theme::Style::Overlay::create();
+        style = new Theme::Style(theme, "", 1.0f / theme->_texture->getWidth(), 1.0f / theme->_texture->getHeight(),
+            Theme::Margin::empty(), Theme::Border::empty(), overlay, overlay, overlay, overlay);
+    }
+    form->initialize(style, formProperties);
 
 
     // Alignment
     // Alignment
     if ((form->_alignment & Control::ALIGN_BOTTOM) == Control::ALIGN_BOTTOM)
     if ((form->_alignment & Control::ALIGN_BOTTOM) == Control::ALIGN_BOTTOM)
@@ -113,10 +124,17 @@ Form* Form::create(const char* url)
     }
     }
 
 
     form->_scroll = getScroll(formProperties->getString("scroll"));
     form->_scroll = getScroll(formProperties->getString("scroll"));
+    form->_scrollBarsAutoHide = formProperties->getBool("scrollBarsAutoHide");
+    if (form->_scrollBarsAutoHide)
+    {
+        form->_scrollBarOpacity = 0.0f;
+    }
 
 
     // Add all the controls to the form.
     // Add all the controls to the form.
     form->addControls(theme, formProperties);
     form->addControls(theme, formProperties);
 
 
+    form->update();
+
     SAFE_DELETE(properties);
     SAFE_DELETE(properties);
 
 
     __forms.push_back(form);
     __forms.push_back(form);
@@ -553,7 +571,7 @@ bool Form::touchEventInternal(Touch::TouchEvent evt, int x, int y, unsigned int
                     // to the plane defined by the same vector and the origin.
                     // to the plane defined by the same vector and the origin.
                     const float& a = normal.x; const float& b = normal.y; const float& c = normal.z;
                     const float& a = normal.x; const float& b = normal.y; const float& c = normal.z;
                     const float d = -(a*min.x) - (b*min.y) - (c*min.z);
                     const float d = -(a*min.x) - (b*min.y) - (c*min.z);
-                    const float distance = abs(d) /  sqrt(a*a + b*b + c*c);
+                    const float distance = fabs(d) /  sqrt(a*a + b*b + c*c);
                     Plane plane(normal, -distance);
                     Plane plane(normal, -distance);
 
 
                     // Check for collision with plane.
                     // Check for collision with plane.

+ 3 - 1
gameplay/src/Joystick.h

@@ -6,6 +6,9 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
+/**
+ * Defines a control representing a joystick (axis).
+ */
 class Joystick : public Control
 class Joystick : public Control
 {
 {
     friend class Container;
     friend class Container;
@@ -121,7 +124,6 @@ protected:
      *
      *
      * @param spriteBatch The sprite batch containing this control's icons.
      * @param spriteBatch The sprite batch containing this control's icons.
      * @param clip The clipping rectangle of this control's parent container.
      * @param clip The clipping rectangle of this control's parent container.
-     * @param offset Layout-computed positioning offset to add to the control's position.
      */
      */
     void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
     void drawImages(SpriteBatch* spriteBatch, const Rectangle& clip);
 
 

+ 5 - 2
gameplay/src/Label.cpp

@@ -58,8 +58,11 @@ void Label::setText(const char* text)
 {
 {
     assert(text);
     assert(text);
 
 
-    _text = text;
-    _dirty = true;
+    if (strcmp(text, _text.c_str()) != 0)
+    {
+        _text = text;
+        _dirty = true;
+    }
 }
 }
 
 
 const char* Label::getText()
 const char* Label::getText()

+ 5 - 1
gameplay/src/Label.h

@@ -116,7 +116,11 @@ protected:
      * The text color being used to display the label.
      * The text color being used to display the label.
      */
      */
     Vector4 _textColor;
     Vector4 _textColor;
-    Rectangle _textBounds;  // The position and size of this control's text area, before clipping.  Used for text alignment.
+
+    /**
+     * The position and size of this control's text area, before clipping.  Used for text alignment.
+     */
+    Rectangle _textBounds;
 
 
 private:
 private:
 
 

+ 2 - 0
gameplay/src/Layout.h

@@ -64,10 +64,12 @@ public:
     virtual Type getType() = 0;
     virtual Type getType() = 0;
 
 
 protected:
 protected:
+
     /**
     /**
      * Position, resize, and update the controls within a container.
      * Position, resize, and update the controls within a container.
      *
      *
      * @param container The container to update.
      * @param container The container to update.
+     * @param offset The update offset.
      */
      */
     virtual void update(const Container* container, const Vector2& offset) = 0;
     virtual void update(const Container* container, const Vector2& offset) = 0;
 
 

+ 8 - 13
gameplay/src/ParticleEmitter.h

@@ -616,10 +616,13 @@ public:
     void draw();
     void draw();
 
 
     /**
     /**
-     * Gets a BlendMode enum from a corresponding string.
+     * Gets a TextureBlending enum from a corresponding string.
      */
      */
     static TextureBlending getTextureBlendingFromString(const char* src);
     static TextureBlending getTextureBlendingFromString(const char* src);
 
 
+    /**
+     * Sets a TextureBlending enum from a corresponding string.
+     */
     void setTextureBlending(TextureBlending blending);
     void setTextureBlending(TextureBlending blending);
 
 
 private:
 private:
@@ -639,28 +642,20 @@ private:
      */
      */
     void setNode(Node* node);
     void setNode(Node* node);
 
 
-    /**
-     * Generates a scalar within the range defined by min and max.
-     */
+    // Generates a scalar within the range defined by min and max.
     float generateScalar(float min, float max);
     float generateScalar(float min, float max);
 
 
     long generateScalar(long min, long max);
     long generateScalar(long min, long max);
 
 
-    /**
-     * Generates a vector within the domain defined by a base vector and its variance.
-     */
+    // Generates a vector within the domain defined by a base vector and its variance.
     void generateVectorInRect(const Vector3& base, const Vector3& variance, Vector3* dst);
     void generateVectorInRect(const Vector3& base, const Vector3& variance, Vector3* dst);
 
 
-    /**
-     * Generates a vector within the ellipsoidal domain defined by a center point and scale vector.
-     */
+    // Generates a vector within the ellipsoidal domain defined by a center point and scale vector.
     void generateVectorInEllipsoid(const Vector3& center, const Vector3& scale, Vector3* dst);
     void generateVectorInEllipsoid(const Vector3& center, const Vector3& scale, Vector3* dst);
 
 
     void generateVector(const Vector3& base, const Vector3& variance, Vector3* dst, bool ellipsoid);
     void generateVector(const Vector3& base, const Vector3& variance, Vector3* dst, bool ellipsoid);
 
 
-    /**
-     * Generates a color within the domain defined by a base vector and its variance.
-     */
+    // Generates a color within the domain defined by a base vector and its variance.
     void generateColor(const Vector4& base, const Vector4& variance, Vector4* dst);
     void generateColor(const Vector4& base, const Vector4& variance, Vector4* dst);
 
 
     /**
     /**

+ 2 - 2
gameplay/src/PhysicsCharacter.cpp

@@ -285,7 +285,7 @@ void PhysicsCharacter::updateCurrentVelocity()
         temp.normalize();
         temp.normalize();
         temp *= -_forwardVelocity;
         temp *= -_forwardVelocity;
         _normalizedVelocity += btVector3(temp.x, temp.y, temp.z);
         _normalizedVelocity += btVector3(temp.x, temp.y, temp.z);
-        velocity2 = std::max(std::abs(velocity2), std::abs(_forwardVelocity*_forwardVelocity));
+        velocity2 = std::max(std::fabs(velocity2), std::fabs(_forwardVelocity*_forwardVelocity));
     }
     }
 
 
     // Add right velocity contribution.
     // Add right velocity contribution.
@@ -295,7 +295,7 @@ void PhysicsCharacter::updateCurrentVelocity()
         temp.normalize();
         temp.normalize();
         temp *= _rightVelocity;
         temp *= _rightVelocity;
         _normalizedVelocity += btVector3(temp.x, temp.y, temp.z);
         _normalizedVelocity += btVector3(temp.x, temp.y, temp.z);
-        velocity2 = std::max(std::abs(velocity2), std::abs(_rightVelocity*_rightVelocity));
+        velocity2 = std::max(std::fabs(velocity2), std::fabs(_rightVelocity*_rightVelocity));
     }
     }
 
 
     // Compute final combined movement vectors
     // Compute final combined movement vectors

+ 1 - 1
gameplay/src/PhysicsController.cpp

@@ -694,7 +694,7 @@ PhysicsCollisionShape* PhysicsController::createShape(Node* node, const PhysicsC
                 // Automatically compute bounding box from mesh's bounding box.
                 // Automatically compute bounding box from mesh's bounding box.
                 BoundingBox box;
                 BoundingBox box;
                 getBoundingBox(node, &box);
                 getBoundingBox(node, &box);
-                collisionShape = createBox(Vector3(std::abs(box.max.x - box.min.x), std::abs(box.max.y - box.min.y), std::abs(box.max.z - box.min.z)), scale);
+                collisionShape = createBox(Vector3(std::fabs(box.max.x - box.min.x), std::fabs(box.max.y - box.min.y), std::fabs(box.max.z - box.min.z)), scale);
 
 
                 computeCenterOfMass(box.getCenter(), scale, centerOfMassOffset);
                 computeCenterOfMass(box.getCenter(), scale, centerOfMassOffset);
             }
             }

+ 4 - 1
gameplay/src/PlatformMacOSX.mm

@@ -566,7 +566,10 @@ int getKey(unsigned short keyCode, unsigned int modifierFlags)
 
 
 - (void) keyDown: (NSEvent*) event
 - (void) keyDown: (NSEvent*) event
 {    
 {    
-    gameplay::Platform::keyEventInternal(Keyboard::KEY_PRESS, getKey([event keyCode], [event modifierFlags]));
+    if([event isARepeat] == NO)
+    {
+        gameplay::Platform::keyEventInternal(Keyboard::KEY_PRESS, getKey([event keyCode], [event modifierFlags]));
+    }
 }
 }
 
 
 - (void) keyUp: (NSEvent*) event
 - (void) keyUp: (NSEvent*) event

+ 1 - 0
gameplay/src/RadioButton.h

@@ -113,6 +113,7 @@ protected:
      * properties, such as its text viewport.
      * properties, such as its text viewport.
      *
      *
      * @param container This control's parent container.
      * @param container This control's parent container.
+     * @param offset Positioning offset to add to the control's position.
      */
      */
     void update(const Control* container, const Vector2& offset);
     void update(const Control* container, const Vector2& offset);
 
 

+ 18 - 0
gameplay/src/SpriteBatch.h

@@ -146,6 +146,24 @@ public:
     void draw(const Vector3& dst, float width, float height, float u1, float v1, float u2, float v2, const Vector4& color,
     void draw(const Vector3& dst, float width, float height, float u1, float v1, float u2, float v2, const Vector4& color,
               const Vector2& rotationPoint, float rotationAngle, bool positionIsCenter = false);
               const Vector2& rotationPoint, float rotationAngle, bool positionIsCenter = false);
     
     
+    /**
+     * Draws a single sprite, rotated around rotationPoint by rotationAngle.
+     * 
+     * @param x The destination x position.
+     * @param y The destination y position.
+     * @param z The destination z position.
+     * @param width The source width.
+     * @param height The source height.
+     * @param u1 Texture coordinate.
+     * @param v1 Texture coordinate.
+     * @param u2 Texture coordinate.
+     * @param v2 Texture coordinate.
+     * @param color The color to tint the sprite. Use white for no tint.
+     * @param rotationPoint The point to rotate around, relative to dst's x and y values.
+     *                      (e.g. Use Vector2(0.5f, 0.5f) to rotate around the quad's center.)
+     * @param rotationAngle The rotation angle.
+     * @param positionIsCenter Specified whether the given destination is to be the center of the sprite or not (if not, it is treated as the bottom-left).
+     */
     void draw(float x, float y, float z, float width, float height, float u1, float v1, float u2, float v2, const Vector4& color,
     void draw(float x, float y, float z, float width, float height, float u1, float v1, float u2, float v2, const Vector4& color,
               const Vector2& rotationPoint, float rotationAngle, bool positionIsCenter = false);
               const Vector2& rotationPoint, float rotationAngle, bool positionIsCenter = false);
 
 

+ 5 - 0
gameplay/src/TextBox.h

@@ -111,6 +111,7 @@ protected:
      * properties, such as its text viewport.
      * properties, such as its text viewport.
      *
      *
      * @param container This control's parent container.
      * @param container This control's parent container.
+     * @param offset Positioning offset to add to the control's position.
      */
      */
     void update(const Control* container, const Vector2& offset);
     void update(const Control* container, const Vector2& offset);
 
 
@@ -126,6 +127,10 @@ protected:
      * The current position of the TextBox's caret.
      * The current position of the TextBox's caret.
      */
      */
     Vector2 _caretLocation;
     Vector2 _caretLocation;
+
+    /**
+     * The previous position of the TextBox's caret.
+     */
     Vector2 _prevCaretLocation;
     Vector2 _prevCaretLocation;
 
 
     /**
     /**

+ 3 - 1
gameplay/src/ThemeStyle.cpp

@@ -85,7 +85,9 @@ Theme::Style::Overlay* Theme::Style::Overlay::create()
     return overlay;
     return overlay;
 }
 }
 
 
-Theme::Style::Overlay::Overlay() : _skin(NULL), _cursor(NULL), _imageList(NULL), _font(NULL)
+Theme::Style::Overlay::Overlay()
+    : _skin(NULL), _cursor(NULL), _imageList(NULL), _font(NULL),
+    _fontSize(0), _alignment(Font::ALIGN_TOP_LEFT), _textRightToLeft(false), _textColor(Vector4::one()), _opacity(1.0f)
 {
 {
 }
 }
 
 

+ 4 - 0
gameplay/src/ThemeStyle.h

@@ -22,6 +22,8 @@ class Theme::Style
 {
 {
     friend class Theme;
     friend class Theme;
     friend class Control;
     friend class Control;
+    friend class Container;
+    friend class Form;
 
 
 private:
 private:
 
 
@@ -45,6 +47,8 @@ private:
         friend class Theme;
         friend class Theme;
         friend class Theme::Style;
         friend class Theme::Style;
         friend class Control;
         friend class Control;
+        friend class Container;
+        friend class Form;
 
 
     private:
     private:
 
 

+ 1 - 0
gameplay/src/VerticalLayout.h

@@ -66,6 +66,7 @@ protected:
      * the bottom-most edge of the container is reached.
      * the bottom-most edge of the container is reached.
      *
      *
      * @param container The container to update.
      * @param container The container to update.
+     * @param offset Positioning offset to add to the control's position.
      */
      */
     void update(const Container* container, const Vector2& offset);
     void update(const Container* container, const Vector2& offset);
 
 

+ 3 - 0
gameplay/src/gameplay-main-macosx.mm

@@ -1,5 +1,6 @@
 #ifdef __APPLE__
 #ifdef __APPLE__
 
 
+#import <Foundation/Foundation.h>
 #include "gameplay.h"
 #include "gameplay.h"
 
 
 using namespace gameplay;
 using namespace gameplay;
@@ -9,11 +10,13 @@ using namespace gameplay;
  */
  */
 int main(int argc, char** argv)
 int main(int argc, char** argv)
 {
 {
+    NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init];
     Game* game = Game::getInstance();
     Game* game = Game::getInstance();
     Platform* platform = Platform::create(game);
     Platform* platform = Platform::create(game);
     GP_ASSERT(platform);
     GP_ASSERT(platform);
     int result = platform->enterMessagePump();
     int result = platform->enterMessagePump();
 	delete platform;
 	delete platform;
+    [p release];
     return result;
     return result;
 }
 }