ソースを参照

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

Conflicts:
	gameplay-samples/sample03-character/res/scene.scene
	gameplay-samples/sample03-character/src/CharacterGame.cpp
Steve Grenier 13 年 前
コミット
f621773448
46 ファイル変更747 行追加580 行削除
  1. 6 7
      gameplay-encoder/README.md
  2. 10 10
      gameplay-encoder/gameplay-bundle.txt
  3. 2 2
      gameplay-encoder/gameplay-encoder.xcodeproj/project.pbxproj
  4. 3 3
      gameplay-template/gameplay-template.xcodeproj/project.pbxproj
  5. 1 1
      gameplay/android/jni/Android.mk
  6. 4 3
      gameplay/gameplay.vcxproj
  7. 6 12
      gameplay/gameplay.vcxproj.filters
  8. 14 14
      gameplay/gameplay.xcodeproj/project.pbxproj
  9. 1 1
      gameplay/src/AbsoluteLayout.h
  10. 1 1
      gameplay/src/Animation.h
  11. 118 118
      gameplay/src/Bundle.cpp
  12. 24 24
      gameplay/src/Bundle.h
  13. 15 13
      gameplay/src/Button.h
  14. 17 15
      gameplay/src/CheckBox.h
  15. 1 0
      gameplay/src/Container.cpp
  16. 29 27
      gameplay/src/Container.h
  17. 129 0
      gameplay/src/Control.cpp
  18. 9 0
      gameplay/src/Control.h
  19. 10 10
      gameplay/src/Font.cpp
  20. 6 6
      gameplay/src/Font.h
  21. 27 29
      gameplay/src/Form.h
  22. 9 0
      gameplay/src/FrameBuffer.h
  23. 2 2
      gameplay/src/Joint.h
  24. 15 13
      gameplay/src/Label.h
  25. 5 5
      gameplay/src/Mesh.h
  26. 2 1
      gameplay/src/MeshBatch.cpp
  27. 3 0
      gameplay/src/MeshBatch.h
  28. 6 6
      gameplay/src/MeshBatch.inl
  29. 2 2
      gameplay/src/MeshSkin.h
  30. 2 2
      gameplay/src/Model.h
  31. 5 2
      gameplay/src/Node.h
  32. 4 4
      gameplay/src/PhysicsController.cpp
  33. 67 70
      gameplay/src/Properties.h
  34. 1 1
      gameplay/src/Quaternion.h
  35. 17 15
      gameplay/src/RadioButton.h
  36. 3 0
      gameplay/src/RenderState.h
  37. 4 0
      gameplay/src/RenderTarget.h
  38. 16 16
      gameplay/src/SceneLoader.cpp
  39. 17 16
      gameplay/src/Slider.h
  40. 1 1
      gameplay/src/SpriteBatch.h
  41. 15 13
      gameplay/src/TextBox.h
  42. 1 1
      gameplay/src/Theme.cpp
  43. 109 107
      gameplay/src/Theme.h
  44. 4 4
      gameplay/src/ThemeStyle.cpp
  45. 3 2
      gameplay/src/ThemeStyle.h
  46. 1 1
      gameplay/src/gameplay.h

+ 6 - 7
gameplay-encoder/README.md

@@ -1,6 +1,6 @@
 ## gameplay-encoder
 ## gameplay-encoder
 Command-line tool for encoding games assets like true-type fonts and 3D scene files
 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. 
+into a simple binary-based bundle 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.
@@ -30,7 +30,7 @@ You must then rebuild gameplay-encoder with the follow platform/tooling instruct
   * Example: copy /Y "C:\Program Files\Autodesk\FBX\FbxSdk\2012.2\lib\vs2010\x86\fbxsdk-2012.2d.dll" "$(TargetDir)"
   * Example: copy /Y "C:\Program Files\Autodesk\FBX\FbxSdk\2012.2\lib\vs2010\x86\fbxsdk-2012.2d.dll" "$(TargetDir)"
 - Build gameplay-encoder
 - Build gameplay-encoder
 
 
-### Building FBX Support on Mac OS X using XCode 4
+### Building FBX Support on Mac OS X using XCode 4.3.2+
 - Download and install the FBX SDK for Mac OS X (http://www.autodesk.com/fbx)
 - Download and install the FBX SDK for Mac OS X (http://www.autodesk.com/fbx)
 - Edit the project properties of target "gameplay-encoder".
 - Edit the project properties of target "gameplay-encoder".
 - Add Preprocessor Macro "USE_FBX" to both Debug/Release sections. (Build Settings)
 - Add Preprocessor Macro "USE_FBX" to both Debug/Release sections. (Build Settings)
@@ -41,12 +41,11 @@ You must then rebuild gameplay-encoder with the follow platform/tooling instruct
   * Example: libiconv.dylib, Cocoa.framework, SystemConfiguration.framework
   * Example: libiconv.dylib, Cocoa.framework, SystemConfiguration.framework
 - Build gameplay-encoder
 - Build gameplay-encoder
 
 
-## Binary Format
-The gameplay binary package format is well defined in the gameplay-encoder/gameplay-binary.txt file.
+## Bundle File Format
+The gameplay bundle file format is well defined in the gameplay-encoder/gameplay-bundle.txt file.
 
 
-## Binary Loading
-Binary package files can easily be loaded using the gameplay/Package.h which is part
-of the GamePlay runtime framework.
+## Bundle File Loading
+Bundle files can easily be loaded using the gameplay/Bundle.h which is part of the gameplay runtime framework.
 
 
 ## Disclaimer
 ## Disclaimer
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 

+ 10 - 10
gameplay-encoder/gameplay-binary.txt → gameplay-encoder/gameplay-bundle.txt

@@ -1,16 +1,16 @@
-gameplay Binary file format
+gameplay Bundle File Format (.gpb)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 File Description
 File Description
 ================
 ================
-A sample binary file format supporting definition of primitve and builtin objects.
+A simple binary bundle file format supporting definition of primitve and builtin objects.
 
 
 File Extension and Mime Type
 File Extension and Mime Type
 ============================
 ============================
-File extension is '.bbb' and the mime type is 'application/bbb'
+File extension is '.gpb' and the mime type is 'application/gpb'
 
 
 File Structure
 File Structure
-===============
+==============
 
 
 Section      Name            Type
 Section      Name            Type
 ------------------------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------------------------
@@ -22,31 +22,31 @@ Data
              Objects         Object[]
              Objects         Object[]
 
 
 Objects
 Objects
-===========
+=======
 Supported object types are defined in the table below. Object with unique ids are included
 Supported object types are defined in the table below. Object with unique ids are included
 in the Reference table (see below).
 in the Reference table (see below).
 
 
 References
 References
-===========
+==========
 A Reference is an Object that has a unique id. The Reference contains the unique id of the
 A Reference is an Object that has a unique id. The Reference contains the unique id of the
 object, a uint for the TypeID a uint for the offset into the package for the object definition.
 object, a uint for the TypeID a uint for the offset into the package for the object definition.
 
 
 ID's
 ID's
-===========
+====
 Object ID's are represented as a string which is guaranteed to be unique per file.
 Object ID's are represented as a string which is guaranteed to be unique per file.
 Any object which host an object id should be added to the header Reference table so that it can
 Any object which host an object id should be added to the header Reference table so that it can
 be consumed by reference internally and externally.
 be consumed by reference internally and externally.
 
 
 Xrefs
 Xrefs
-===========
+=====
 Xrefs are string with a specific format used for referencing objects internal and external to
 Xrefs are string with a specific format used for referencing objects internal and external to
 a package. An xref with the format "#id" references an object within the current package with
 a package. An xref with the format "#id" references an object within the current package with
 the given ID. Xrefs can also have the format "file#id", where "file" is the name of package file
 the given ID. Xrefs can also have the format "file#id", where "file" is the name of package file
 (relative to the locaiton of the current package) and "id" is the unique identifier of an object
 (relative to the locaiton of the current package) and "id" is the unique identifier of an object
-in that package.
+in that bundle.
 
 
 Primitives
 Primitives
-===========
+==========
 
 
 Name            Description
 Name            Description
 ------------------------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------------------------

+ 2 - 2
gameplay-encoder/gameplay-encoder.xcodeproj/project.pbxproj

@@ -499,7 +499,7 @@
 		42475CF1147208A100610A6A /* Debug */ = {
 		42475CF1147208A100610A6A /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
 				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
 				CLANG_CXX_LIBRARY = "compiler-default";
 				CLANG_CXX_LIBRARY = "compiler-default";
 				GCC_C_LANGUAGE_STANDARD = "compiler-default";
 				GCC_C_LANGUAGE_STANDARD = "compiler-default";
@@ -531,7 +531,7 @@
 		42475CF2147208A100610A6A /* Release */ = {
 		42475CF2147208A100610A6A /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
 				CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
 				CLANG_CXX_LIBRARY = "compiler-default";
 				CLANG_CXX_LIBRARY = "compiler-default";
 				GCC_C_LANGUAGE_STANDARD = "compiler-default";
 				GCC_C_LANGUAGE_STANDARD = "compiler-default";

+ 3 - 3
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-macosx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "TEMPLATE_PROJECT-macosx.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; };
@@ -427,7 +427,7 @@
 		42C932DB1491A0DB0098216A /* Debug */ = {
 		42C932DB1491A0DB0098216A /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				GCC_PRECOMPILE_PREFIX_HEADER = NO;
 				GCC_PRECOMPILE_PREFIX_HEADER = NO;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				GCC_WARN_UNUSED_VARIABLE = NO;
@@ -453,7 +453,7 @@
 		42C932DC1491A0DB0098216A /* Release */ = {
 		42C932DC1491A0DB0098216A /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				GCC_PRECOMPILE_PREFIX_HEADER = NO;
 				GCC_PRECOMPILE_PREFIX_HEADER = NO;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_UNUSED_VARIABLE = NO;
 				GCC_WARN_UNUSED_VARIABLE = NO;

+ 1 - 1
gameplay/android/jni/Android.mk

@@ -16,7 +16,7 @@ LOCAL_PATH := $(call my-dir)/../../src
 
 
 include $(CLEAR_VARS)
 include $(CLEAR_VARS)
 LOCAL_MODULE    := libgameplay
 LOCAL_MODULE    := libgameplay
-LOCAL_SRC_FILES := AbsoluteLayout.cpp Animation.cpp AnimationClip.cpp AnimationController.cpp AnimationTarget.cpp AnimationValue.cpp AudioBuffer.cpp AudioController.cpp AudioListener.cpp AudioSource.cpp BoundingBox.cpp BoundingSphere.cpp Button.cpp Camera.cpp CheckBox.cpp Container.cpp Control.cpp Curve.cpp DebugNew.cpp DepthStencilTarget.cpp Effect.cpp FileSystem.cpp Font.cpp Form.cpp FrameBuffer.cpp Frustum.cpp Game.cpp gameplay-main-android.cpp gameplay-main-qnx.cpp gameplay-main-win32.cpp Image.cpp Joint.cpp Label.cpp Layout.cpp Light.cpp Material.cpp MaterialParameter.cpp Matrix.cpp Mesh.cpp MeshBatch.cpp MeshPart.cpp MeshSkin.cpp Model.cpp Node.cpp Package.cpp ParticleEmitter.cpp Pass.cpp PhysicsCharacter.cpp PhysicsCollisionObject.cpp PhysicsCollisionShape.cpp PhysicsConstraint.cpp PhysicsController.cpp PhysicsFixedConstraint.cpp PhysicsGenericConstraint.cpp PhysicsGhostObject.cpp PhysicsHingeConstraint.cpp PhysicsMotionState.cpp PhysicsRigidBody.cpp PhysicsSocketConstraint.cpp PhysicsSpringConstraint.cpp Plane.cpp PlatformAndroid.cpp PlatformQNX.cpp PlatformWin32.cpp Properties.cpp Quaternion.cpp RadioButton.cpp Ray.cpp Rectangle.cpp Ref.cpp RenderState.cpp RenderTarget.cpp Scene.cpp SceneLoader.cpp Slider.cpp SpriteBatch.cpp Technique.cpp TextBox.cpp Texture.cpp Theme.cpp ThemeStyle.cpp Transform.cpp Vector2.cpp Vector3.cpp Vector4.cpp VertexAttributeBinding.cpp VertexFormat.cpp VerticalLayout.cpp
+LOCAL_SRC_FILES := AbsoluteLayout.cpp Animation.cpp AnimationClip.cpp AnimationController.cpp AnimationTarget.cpp AnimationValue.cpp AudioBuffer.cpp AudioController.cpp AudioListener.cpp AudioSource.cpp BoundingBox.cpp BoundingSphere.cpp Bundle.cpp Button.cpp Camera.cpp CheckBox.cpp Container.cpp Control.cpp Curve.cpp DebugNew.cpp DepthStencilTarget.cpp Effect.cpp FileSystem.cpp Font.cpp Form.cpp FrameBuffer.cpp Frustum.cpp Game.cpp gameplay-main-android.cpp Image.cpp Joint.cpp Label.cpp Layout.cpp Light.cpp Material.cpp MaterialParameter.cpp Matrix.cpp Mesh.cpp MeshBatch.cpp MeshPart.cpp MeshSkin.cpp Model.cpp Node.cpp ParticleEmitter.cpp Pass.cpp PhysicsCharacter.cpp PhysicsCollisionObject.cpp PhysicsCollisionShape.cpp PhysicsConstraint.cpp PhysicsController.cpp PhysicsFixedConstraint.cpp PhysicsGenericConstraint.cpp PhysicsGhostObject.cpp PhysicsHingeConstraint.cpp PhysicsMotionState.cpp PhysicsRigidBody.cpp PhysicsSocketConstraint.cpp PhysicsSpringConstraint.cpp Plane.cpp PlatformAndroid.cpp Properties.cpp Quaternion.cpp RadioButton.cpp Ray.cpp Rectangle.cpp Ref.cpp RenderState.cpp RenderTarget.cpp Scene.cpp SceneLoader.cpp Slider.cpp SpriteBatch.cpp Technique.cpp TextBox.cpp Texture.cpp Theme.cpp ThemeStyle.cpp Transform.cpp Vector2.cpp Vector3.cpp Vector4.cpp VertexAttributeBinding.cpp VertexFormat.cpp VerticalLayout.cpp
 LOCAL_CFLAGS := -D__ANDROID__ -I"../../external-deps/bullet/include" -I"../../external-deps/libpng/include"
 LOCAL_CFLAGS := -D__ANDROID__ -I"../../external-deps/bullet/include" -I"../../external-deps/libpng/include"
 LOCAL_STATIC_LIBRARIES := android_native_app_glue
 LOCAL_STATIC_LIBRARIES := android_native_app_glue
 
 

+ 4 - 3
gameplay/gameplay.vcxproj

@@ -37,6 +37,7 @@
     <ClCompile Include="src\DepthStencilTarget.cpp" />
     <ClCompile Include="src\DepthStencilTarget.cpp" />
     <ClCompile Include="src\Effect.cpp" />
     <ClCompile Include="src\Effect.cpp" />
     <ClCompile Include="src\FileSystem.cpp" />
     <ClCompile Include="src\FileSystem.cpp" />
+    <ClCompile Include="src\FlowLayout.cpp" />
     <ClCompile Include="src\Font.cpp" />
     <ClCompile Include="src\Font.cpp" />
     <ClCompile Include="src\Form.cpp" />
     <ClCompile Include="src\Form.cpp" />
     <ClCompile Include="src\FrameBuffer.cpp" />
     <ClCompile Include="src\FrameBuffer.cpp" />
@@ -60,7 +61,7 @@
     <ClCompile Include="src\MeshSkin.cpp" />
     <ClCompile Include="src\MeshSkin.cpp" />
     <ClCompile Include="src\Model.cpp" />
     <ClCompile Include="src\Model.cpp" />
     <ClCompile Include="src\Node.cpp" />
     <ClCompile Include="src\Node.cpp" />
-    <ClCompile Include="src\Package.cpp" />
+    <ClCompile Include="src\Bundle.cpp" />
     <ClCompile Include="src\ParticleEmitter.cpp" />
     <ClCompile Include="src\ParticleEmitter.cpp" />
     <ClCompile Include="src\PhysicsCharacter.cpp" />
     <ClCompile Include="src\PhysicsCharacter.cpp" />
     <ClCompile Include="src\PhysicsCollisionObject.cpp" />
     <ClCompile Include="src\PhysicsCollisionObject.cpp" />
@@ -128,6 +129,7 @@
     <ClInclude Include="src\DepthStencilTarget.h" />
     <ClInclude Include="src\DepthStencilTarget.h" />
     <ClInclude Include="src\Effect.h" />
     <ClInclude Include="src\Effect.h" />
     <ClInclude Include="src\FileSystem.h" />
     <ClInclude Include="src\FileSystem.h" />
+    <ClInclude Include="src\FlowLayout.h" />
     <ClInclude Include="src\Font.h" />
     <ClInclude Include="src\Font.h" />
     <ClInclude Include="src\Form.h" />
     <ClInclude Include="src\Form.h" />
     <ClInclude Include="src\FrameBuffer.h" />
     <ClInclude Include="src\FrameBuffer.h" />
@@ -151,7 +153,7 @@
     <ClInclude Include="src\MeshSkin.h" />
     <ClInclude Include="src\MeshSkin.h" />
     <ClInclude Include="src\Model.h" />
     <ClInclude Include="src\Model.h" />
     <ClInclude Include="src\Node.h" />
     <ClInclude Include="src\Node.h" />
-    <ClInclude Include="src\Package.h" />
+    <ClInclude Include="src\Bundle.h" />
     <ClInclude Include="src\ParticleEmitter.h" />
     <ClInclude Include="src\ParticleEmitter.h" />
     <ClInclude Include="src\PhysicsCharacter.h" />
     <ClInclude Include="src\PhysicsCharacter.h" />
     <ClInclude Include="src\PhysicsCollisionObject.h" />
     <ClInclude Include="src\PhysicsCollisionObject.h" />
@@ -221,7 +223,6 @@
     <None Include="res\shaders\solid.vsh" />
     <None Include="res\shaders\solid.vsh" />
     <None Include="res\shaders\textured.fsh" />
     <None Include="res\shaders\textured.fsh" />
     <None Include="res\shaders\textured.vsh" />
     <None Include="res\shaders\textured.vsh" />
-    <None Include="res\textures\particle-default.png" />
     <None Include="src\BoundingBox.inl" />
     <None Include="src\BoundingBox.inl" />
     <None Include="src\BoundingSphere.inl" />
     <None Include="src\BoundingSphere.inl" />
     <None Include="src\Curve.inl" />
     <None Include="src\Curve.inl" />

+ 6 - 12
gameplay/gameplay.vcxproj.filters

@@ -10,9 +10,6 @@
     <Filter Include="res\shaders">
     <Filter Include="res\shaders">
       <UniqueIdentifier>{be0b36f1-49ed-4a06-9f1f-57c654a554fe}</UniqueIdentifier>
       <UniqueIdentifier>{be0b36f1-49ed-4a06-9f1f-57c654a554fe}</UniqueIdentifier>
     </Filter>
     </Filter>
-    <Filter Include="res\textures">
-      <UniqueIdentifier>{7c4ef2fb-63f2-4d5a-b31e-0dc78329abfd}</UniqueIdentifier>
-    </Filter>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ClCompile Include="src\Animation.cpp">
     <ClCompile Include="src\Animation.cpp">
@@ -75,9 +72,6 @@
     <ClCompile Include="src\Node.cpp">
     <ClCompile Include="src\Node.cpp">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClCompile>
     </ClCompile>
-    <ClCompile Include="src\Package.cpp">
-      <Filter>src</Filter>
-    </ClCompile>
     <ClCompile Include="src\Plane.cpp">
     <ClCompile Include="src\Plane.cpp">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClCompile>
     </ClCompile>
@@ -279,6 +273,9 @@
     <ClCompile Include="src\Layout.cpp">
     <ClCompile Include="src\Layout.cpp">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="src\Bundle.cpp">
+      <Filter>src</Filter>
+    </ClCompile>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ClInclude Include="src\Animation.h">
     <ClInclude Include="src\Animation.h">
@@ -350,9 +347,6 @@
     <ClInclude Include="src\Node.h">
     <ClInclude Include="src\Node.h">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClInclude>
     </ClInclude>
-    <ClInclude Include="src\Package.h">
-      <Filter>src</Filter>
-    </ClInclude>
     <ClInclude Include="src\Plane.h">
     <ClInclude Include="src\Plane.h">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClInclude>
     </ClInclude>
@@ -551,6 +545,9 @@
     <ClInclude Include="src\ThemeStyle.h">
     <ClInclude Include="src\ThemeStyle.h">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="src\Bundle.h">
+      <Filter>src</Filter>
+    </ClInclude>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="res\shaders\bumped-specular.vsh">
     <None Include="res\shaders\bumped-specular.vsh">
@@ -619,9 +616,6 @@
     <None Include="src\PlatformMacOSX.mm">
     <None Include="src\PlatformMacOSX.mm">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </None>
     </None>
-    <None Include="res\textures\particle-default.png">
-      <Filter>res\textures</Filter>
-    </None>
     <None Include="src\Curve.inl">
     <None Include="src\Curve.inl">
       <Filter>src</Filter>
       <Filter>src</Filter>
     </None>
     </None>

+ 14 - 14
gameplay/gameplay.xcodeproj/project.pbxproj

@@ -13,6 +13,10 @@
 		4208DEEA14A4079F00D3C511 /* Image.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEE714A4079F00D3C511 /* Image.h */; };
 		4208DEEA14A4079F00D3C511 /* Image.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEE714A4079F00D3C511 /* Image.h */; };
 		4208DEEC14A407B900D3C511 /* Keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEEB14A407B900D3C511 /* Keyboard.h */; };
 		4208DEEC14A407B900D3C511 /* Keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEEB14A407B900D3C511 /* Keyboard.h */; };
 		4208DEEE14A407D500D3C511 /* Touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEED14A407D500D3C511 /* Touch.h */; };
 		4208DEEE14A407D500D3C511 /* Touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEED14A407D500D3C511 /* Touch.h */; };
+		422260D61537790F0011E3AB /* Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 422260D41537790F0011E3AB /* Bundle.cpp */; };
+		422260D71537790F0011E3AB /* Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 422260D41537790F0011E3AB /* Bundle.cpp */; };
+		422260D81537790F0011E3AB /* Bundle.h in Headers */ = {isa = PBXBuildFile; fileRef = 422260D51537790F0011E3AB /* Bundle.h */; };
+		422260D91537790F0011E3AB /* Bundle.h in Headers */ = {isa = PBXBuildFile; fileRef = 422260D51537790F0011E3AB /* Bundle.h */; };
 		4234D99E14686C52003031B3 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4234D99D14686C52003031B3 /* Cocoa.framework */; };
 		4234D99E14686C52003031B3 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4234D99D14686C52003031B3 /* Cocoa.framework */; };
 		4251B131152D049B002F6199 /* ScreenDisplayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4251B12E152D049B002F6199 /* ScreenDisplayer.h */; };
 		4251B131152D049B002F6199 /* ScreenDisplayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4251B12E152D049B002F6199 /* ScreenDisplayer.h */; };
 		4251B132152D049B002F6199 /* ScreenDisplayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4251B12E152D049B002F6199 /* ScreenDisplayer.h */; };
 		4251B132152D049B002F6199 /* ScreenDisplayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4251B12E152D049B002F6199 /* ScreenDisplayer.h */; };
@@ -99,8 +103,6 @@
 		42CD0E88147D8FF60000361E /* Model.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF6147D8FF50000361E /* Model.h */; };
 		42CD0E88147D8FF60000361E /* Model.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF6147D8FF50000361E /* Model.h */; };
 		42CD0E89147D8FF60000361E /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF7147D8FF50000361E /* Node.cpp */; };
 		42CD0E89147D8FF60000361E /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF7147D8FF50000361E /* Node.cpp */; };
 		42CD0E8A147D8FF60000361E /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF8147D8FF50000361E /* Node.h */; };
 		42CD0E8A147D8FF60000361E /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF8147D8FF50000361E /* Node.h */; };
-		42CD0E8B147D8FF60000361E /* Package.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF9147D8FF50000361E /* Package.cpp */; };
-		42CD0E8C147D8FF60000361E /* Package.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFA147D8FF50000361E /* Package.h */; };
 		42CD0E8D147D8FF60000361E /* ParticleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */; };
 		42CD0E8D147D8FF60000361E /* ParticleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */; };
 		42CD0E8E147D8FF60000361E /* ParticleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFC147D8FF50000361E /* ParticleEmitter.h */; };
 		42CD0E8E147D8FF60000361E /* ParticleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFC147D8FF50000361E /* ParticleEmitter.h */; };
 		42CD0E8F147D8FF60000361E /* Pass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFD147D8FF50000361E /* Pass.cpp */; };
 		42CD0E8F147D8FF60000361E /* Pass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFD147D8FF50000361E /* Pass.cpp */; };
@@ -192,7 +194,6 @@
 		5B04C54C14BFCFE100EB0071 /* MeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF3147D8FF50000361E /* MeshSkin.cpp */; };
 		5B04C54C14BFCFE100EB0071 /* MeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF3147D8FF50000361E /* MeshSkin.cpp */; };
 		5B04C54D14BFCFE100EB0071 /* Model.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF5147D8FF50000361E /* Model.cpp */; };
 		5B04C54D14BFCFE100EB0071 /* Model.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF5147D8FF50000361E /* Model.cpp */; };
 		5B04C54E14BFCFE100EB0071 /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF7147D8FF50000361E /* Node.cpp */; };
 		5B04C54E14BFCFE100EB0071 /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF7147D8FF50000361E /* Node.cpp */; };
-		5B04C54F14BFCFE100EB0071 /* Package.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF9147D8FF50000361E /* Package.cpp */; };
 		5B04C55014BFCFE100EB0071 /* ParticleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */; };
 		5B04C55014BFCFE100EB0071 /* ParticleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */; };
 		5B04C55114BFCFE100EB0071 /* Pass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFD147D8FF50000361E /* Pass.cpp */; };
 		5B04C55114BFCFE100EB0071 /* Pass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFD147D8FF50000361E /* Pass.cpp */; };
 		5B04C55214BFCFE100EB0071 /* PhysicsConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFF147D8FF50000361E /* PhysicsConstraint.cpp */; };
 		5B04C55214BFCFE100EB0071 /* PhysicsConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFF147D8FF50000361E /* PhysicsConstraint.cpp */; };
@@ -264,7 +265,6 @@
 		5B04C59F14BFCFE100EB0071 /* MeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF4147D8FF50000361E /* MeshSkin.h */; };
 		5B04C59F14BFCFE100EB0071 /* MeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF4147D8FF50000361E /* MeshSkin.h */; };
 		5B04C5A014BFCFE100EB0071 /* Model.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF6147D8FF50000361E /* Model.h */; };
 		5B04C5A014BFCFE100EB0071 /* Model.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF6147D8FF50000361E /* Model.h */; };
 		5B04C5A114BFCFE100EB0071 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF8147D8FF50000361E /* Node.h */; };
 		5B04C5A114BFCFE100EB0071 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF8147D8FF50000361E /* Node.h */; };
-		5B04C5A214BFCFE100EB0071 /* Package.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFA147D8FF50000361E /* Package.h */; };
 		5B04C5A314BFCFE100EB0071 /* ParticleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFC147D8FF50000361E /* ParticleEmitter.h */; };
 		5B04C5A314BFCFE100EB0071 /* ParticleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFC147D8FF50000361E /* ParticleEmitter.h */; };
 		5B04C5A414BFCFE100EB0071 /* Pass.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFE147D8FF50000361E /* Pass.h */; };
 		5B04C5A414BFCFE100EB0071 /* Pass.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFE147D8FF50000361E /* Pass.h */; };
 		5B04C5A514BFCFE100EB0071 /* PhysicsConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0E00147D8FF50000361E /* PhysicsConstraint.h */; };
 		5B04C5A514BFCFE100EB0071 /* PhysicsConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0E00147D8FF50000361E /* PhysicsConstraint.h */; };
@@ -391,6 +391,8 @@
 		4208DEE814A4079F00D3C511 /* Image.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Image.inl; path = src/Image.inl; sourceTree = SOURCE_ROOT; };
 		4208DEE814A4079F00D3C511 /* Image.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Image.inl; path = src/Image.inl; sourceTree = SOURCE_ROOT; };
 		4208DEEB14A407B900D3C511 /* Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Keyboard.h; path = src/Keyboard.h; sourceTree = SOURCE_ROOT; };
 		4208DEEB14A407B900D3C511 /* Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Keyboard.h; path = src/Keyboard.h; sourceTree = SOURCE_ROOT; };
 		4208DEED14A407D500D3C511 /* Touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Touch.h; path = src/Touch.h; sourceTree = SOURCE_ROOT; };
 		4208DEED14A407D500D3C511 /* Touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Touch.h; path = src/Touch.h; sourceTree = SOURCE_ROOT; };
+		422260D41537790F0011E3AB /* Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Bundle.cpp; path = src/Bundle.cpp; sourceTree = SOURCE_ROOT; };
+		422260D51537790F0011E3AB /* Bundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bundle.h; path = src/Bundle.h; sourceTree = SOURCE_ROOT; };
 		4234D99A14686C52003031B3 /* libgameplay.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libgameplay.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		4234D99A14686C52003031B3 /* libgameplay.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libgameplay.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		4234D99D14686C52003031B3 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
 		4234D99D14686C52003031B3 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
 		4251B12E152D049B002F6199 /* ScreenDisplayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenDisplayer.h; path = src/ScreenDisplayer.h; sourceTree = SOURCE_ROOT; };
 		4251B12E152D049B002F6199 /* ScreenDisplayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenDisplayer.h; path = src/ScreenDisplayer.h; sourceTree = SOURCE_ROOT; };
@@ -478,8 +480,6 @@
 		42CD0DF6147D8FF50000361E /* Model.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Model.h; path = src/Model.h; sourceTree = SOURCE_ROOT; };
 		42CD0DF6147D8FF50000361E /* Model.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Model.h; path = src/Model.h; sourceTree = SOURCE_ROOT; };
 		42CD0DF7147D8FF50000361E /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = src/Node.cpp; sourceTree = SOURCE_ROOT; };
 		42CD0DF7147D8FF50000361E /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = src/Node.cpp; sourceTree = SOURCE_ROOT; };
 		42CD0DF8147D8FF50000361E /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = src/Node.h; sourceTree = SOURCE_ROOT; };
 		42CD0DF8147D8FF50000361E /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = src/Node.h; sourceTree = SOURCE_ROOT; };
-		42CD0DF9147D8FF50000361E /* Package.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Package.cpp; path = src/Package.cpp; sourceTree = SOURCE_ROOT; };
-		42CD0DFA147D8FF50000361E /* Package.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Package.h; path = src/Package.h; sourceTree = SOURCE_ROOT; };
 		42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleEmitter.cpp; path = src/ParticleEmitter.cpp; sourceTree = SOURCE_ROOT; };
 		42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleEmitter.cpp; path = src/ParticleEmitter.cpp; sourceTree = SOURCE_ROOT; };
 		42CD0DFC147D8FF50000361E /* ParticleEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleEmitter.h; path = src/ParticleEmitter.h; sourceTree = SOURCE_ROOT; };
 		42CD0DFC147D8FF50000361E /* ParticleEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleEmitter.h; path = src/ParticleEmitter.h; sourceTree = SOURCE_ROOT; };
 		42CD0DFD147D8FF50000361E /* Pass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Pass.cpp; path = src/Pass.cpp; sourceTree = SOURCE_ROOT; };
 		42CD0DFD147D8FF50000361E /* Pass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Pass.cpp; path = src/Pass.cpp; sourceTree = SOURCE_ROOT; };
@@ -707,6 +707,8 @@
 				42CD0DC7147D8FF50000361E /* BoundingSphere.cpp */,
 				42CD0DC7147D8FF50000361E /* BoundingSphere.cpp */,
 				42CD0DC8147D8FF50000361E /* BoundingSphere.h */,
 				42CD0DC8147D8FF50000361E /* BoundingSphere.h */,
 				42CD0DC9147D8FF50000361E /* BoundingSphere.inl */,
 				42CD0DC9147D8FF50000361E /* BoundingSphere.inl */,
+				422260D41537790F0011E3AB /* Bundle.cpp */,
+				422260D51537790F0011E3AB /* Bundle.h */,
 				5BD52636150F822A004C9099 /* Button.cpp */,
 				5BD52636150F822A004C9099 /* Button.cpp */,
 				5BD52637150F822A004C9099 /* Button.h */,
 				5BD52637150F822A004C9099 /* Button.h */,
 				42CD0DCA147D8FF50000361E /* Camera.cpp */,
 				42CD0DCA147D8FF50000361E /* Camera.cpp */,
@@ -779,8 +781,6 @@
 				5BB0823C14C6FEC40019975F /* Mouse.h */,
 				5BB0823C14C6FEC40019975F /* Mouse.h */,
 				42CD0DF7147D8FF50000361E /* Node.cpp */,
 				42CD0DF7147D8FF50000361E /* Node.cpp */,
 				42CD0DF8147D8FF50000361E /* Node.h */,
 				42CD0DF8147D8FF50000361E /* Node.h */,
-				42CD0DF9147D8FF50000361E /* Package.cpp */,
-				42CD0DFA147D8FF50000361E /* Package.h */,
 				42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */,
 				42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */,
 				42CD0DFC147D8FF50000361E /* ParticleEmitter.h */,
 				42CD0DFC147D8FF50000361E /* ParticleEmitter.h */,
 				42CD0DFD147D8FF50000361E /* Pass.cpp */,
 				42CD0DFD147D8FF50000361E /* Pass.cpp */,
@@ -998,7 +998,6 @@
 				42CD0E86147D8FF60000361E /* MeshSkin.h in Headers */,
 				42CD0E86147D8FF60000361E /* MeshSkin.h in Headers */,
 				42CD0E88147D8FF60000361E /* Model.h in Headers */,
 				42CD0E88147D8FF60000361E /* Model.h in Headers */,
 				42CD0E8A147D8FF60000361E /* Node.h in Headers */,
 				42CD0E8A147D8FF60000361E /* Node.h in Headers */,
-				42CD0E8C147D8FF60000361E /* Package.h in Headers */,
 				42CD0E8E147D8FF60000361E /* ParticleEmitter.h in Headers */,
 				42CD0E8E147D8FF60000361E /* ParticleEmitter.h in Headers */,
 				42CD0E90147D8FF60000361E /* Pass.h in Headers */,
 				42CD0E90147D8FF60000361E /* Pass.h in Headers */,
 				42CD0E92147D8FF60000361E /* PhysicsConstraint.h in Headers */,
 				42CD0E92147D8FF60000361E /* PhysicsConstraint.h in Headers */,
@@ -1055,6 +1054,7 @@
 				42554EA3152BC35C000ED910 /* PhysicsCollisionShape.h in Headers */,
 				42554EA3152BC35C000ED910 /* PhysicsCollisionShape.h in Headers */,
 				4251B131152D049B002F6199 /* ScreenDisplayer.h in Headers */,
 				4251B131152D049B002F6199 /* ScreenDisplayer.h in Headers */,
 				4251B135152D049B002F6199 /* ThemeStyle.h in Headers */,
 				4251B135152D049B002F6199 /* ThemeStyle.h in Headers */,
+				422260D81537790F0011E3AB /* Bundle.h in Headers */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -1095,7 +1095,6 @@
 				5B04C59F14BFCFE100EB0071 /* MeshSkin.h in Headers */,
 				5B04C59F14BFCFE100EB0071 /* MeshSkin.h in Headers */,
 				5B04C5A014BFCFE100EB0071 /* Model.h in Headers */,
 				5B04C5A014BFCFE100EB0071 /* Model.h in Headers */,
 				5B04C5A114BFCFE100EB0071 /* Node.h in Headers */,
 				5B04C5A114BFCFE100EB0071 /* Node.h in Headers */,
-				5B04C5A214BFCFE100EB0071 /* Package.h in Headers */,
 				5B04C5A314BFCFE100EB0071 /* ParticleEmitter.h in Headers */,
 				5B04C5A314BFCFE100EB0071 /* ParticleEmitter.h in Headers */,
 				5B04C5A414BFCFE100EB0071 /* Pass.h in Headers */,
 				5B04C5A414BFCFE100EB0071 /* Pass.h in Headers */,
 				5B04C5A514BFCFE100EB0071 /* PhysicsConstraint.h in Headers */,
 				5B04C5A514BFCFE100EB0071 /* PhysicsConstraint.h in Headers */,
@@ -1151,6 +1150,7 @@
 				42554EA4152BC35C000ED910 /* PhysicsCollisionShape.h in Headers */,
 				42554EA4152BC35C000ED910 /* PhysicsCollisionShape.h in Headers */,
 				4251B132152D049B002F6199 /* ScreenDisplayer.h in Headers */,
 				4251B132152D049B002F6199 /* ScreenDisplayer.h in Headers */,
 				4251B136152D049B002F6199 /* ThemeStyle.h in Headers */,
 				4251B136152D049B002F6199 /* ThemeStyle.h in Headers */,
+				422260D91537790F0011E3AB /* Bundle.h in Headers */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -1254,7 +1254,6 @@
 				42CD0E85147D8FF60000361E /* MeshSkin.cpp in Sources */,
 				42CD0E85147D8FF60000361E /* MeshSkin.cpp in Sources */,
 				42CD0E87147D8FF60000361E /* Model.cpp in Sources */,
 				42CD0E87147D8FF60000361E /* Model.cpp in Sources */,
 				42CD0E89147D8FF60000361E /* Node.cpp in Sources */,
 				42CD0E89147D8FF60000361E /* Node.cpp in Sources */,
-				42CD0E8B147D8FF60000361E /* Package.cpp in Sources */,
 				42CD0E8D147D8FF60000361E /* ParticleEmitter.cpp in Sources */,
 				42CD0E8D147D8FF60000361E /* ParticleEmitter.cpp in Sources */,
 				42CD0E8F147D8FF60000361E /* Pass.cpp in Sources */,
 				42CD0E8F147D8FF60000361E /* Pass.cpp in Sources */,
 				42CD0E91147D8FF60000361E /* PhysicsConstraint.cpp in Sources */,
 				42CD0E91147D8FF60000361E /* PhysicsConstraint.cpp in Sources */,
@@ -1306,6 +1305,7 @@
 				42554EA1152BC35C000ED910 /* PhysicsCollisionShape.cpp in Sources */,
 				42554EA1152BC35C000ED910 /* PhysicsCollisionShape.cpp in Sources */,
 				4251B133152D049B002F6199 /* ThemeStyle.cpp in Sources */,
 				4251B133152D049B002F6199 /* ThemeStyle.cpp in Sources */,
 				4271C08E15337C8200B89DA7 /* Layout.cpp in Sources */,
 				4271C08E15337C8200B89DA7 /* Layout.cpp in Sources */,
+				422260D61537790F0011E3AB /* Bundle.cpp in Sources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -1344,7 +1344,6 @@
 				5B04C54C14BFCFE100EB0071 /* MeshSkin.cpp in Sources */,
 				5B04C54C14BFCFE100EB0071 /* MeshSkin.cpp in Sources */,
 				5B04C54D14BFCFE100EB0071 /* Model.cpp in Sources */,
 				5B04C54D14BFCFE100EB0071 /* Model.cpp in Sources */,
 				5B04C54E14BFCFE100EB0071 /* Node.cpp in Sources */,
 				5B04C54E14BFCFE100EB0071 /* Node.cpp in Sources */,
-				5B04C54F14BFCFE100EB0071 /* Package.cpp in Sources */,
 				5B04C55014BFCFE100EB0071 /* ParticleEmitter.cpp in Sources */,
 				5B04C55014BFCFE100EB0071 /* ParticleEmitter.cpp in Sources */,
 				5B04C55114BFCFE100EB0071 /* Pass.cpp in Sources */,
 				5B04C55114BFCFE100EB0071 /* Pass.cpp in Sources */,
 				5B04C55214BFCFE100EB0071 /* PhysicsConstraint.cpp in Sources */,
 				5B04C55214BFCFE100EB0071 /* PhysicsConstraint.cpp in Sources */,
@@ -1397,6 +1396,7 @@
 				42554EA2152BC35C000ED910 /* PhysicsCollisionShape.cpp in Sources */,
 				42554EA2152BC35C000ED910 /* PhysicsCollisionShape.cpp in Sources */,
 				4251B134152D049B002F6199 /* ThemeStyle.cpp in Sources */,
 				4251B134152D049B002F6199 /* ThemeStyle.cpp in Sources */,
 				4271C08F15337C8200B89DA7 /* Layout.cpp in Sources */,
 				4271C08F15337C8200B89DA7 /* Layout.cpp in Sources */,
+				422260D71537790F0011E3AB /* Bundle.cpp in Sources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -1426,7 +1426,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				COPY_PHASE_STRIP = NO;
 				COPY_PHASE_STRIP = NO;
 				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
 				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
 				GCC_C_LANGUAGE_STANDARD = gnu99;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -1474,7 +1474,7 @@
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				COPY_PHASE_STRIP = YES;
 				COPY_PHASE_STRIP = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
 				FRAMEWORK_SEARCH_PATHS = "$(inherited)";

+ 1 - 1
gameplay/src/AbsoluteLayout.h

@@ -29,7 +29,7 @@ protected:
     /**
     /**
      * Create an AbsoluteLayout.
      * Create an AbsoluteLayout.
      *
      *
-     * @return an AbsoluteLayout object.
+     * @return An AbsoluteLayout object.
      */
      */
     static AbsoluteLayout* create();
     static AbsoluteLayout* create();
 
 

+ 1 - 1
gameplay/src/Animation.h

@@ -24,7 +24,7 @@ class Animation : public Ref
 {
 {
     friend class AnimationClip;
     friend class AnimationClip;
     friend class AnimationTarget;
     friend class AnimationTarget;
-    friend class Package;
+    friend class Bundle;
 
 
 public:
 public:
     
     

+ 118 - 118
gameplay/src/Package.cpp → gameplay/src/Bundle.cpp

@@ -1,50 +1,50 @@
 #include "Base.h"
 #include "Base.h"
-#include "Package.h"
+#include "Bundle.h"
 #include "FileSystem.h"
 #include "FileSystem.h"
 #include "MeshPart.h"
 #include "MeshPart.h"
 #include "Scene.h"
 #include "Scene.h"
 #include "Joint.h"
 #include "Joint.h"
 
 
-#define GPB_PACKAGE_VERSION_MAJOR 1
-#define GPB_PACKAGE_VERSION_MINOR 1
-
-#define PACKAGE_TYPE_SCENE 1
-#define PACKAGE_TYPE_NODE 2
-#define PACKAGE_TYPE_ANIMATIONS 3
-#define PACKAGE_TYPE_ANIMATION 4
-#define PACKAGE_TYPE_ANIMATION_CHANNEL 5
-#define PACKAGE_TYPE_MMODEL 10
-#define PACKAGE_TYPE_MATERIAL 16
-#define PACKAGE_TYPE_EFFECT 18
-#define PACKAGE_TYPE_CAMERA 32
-#define PACKAGE_TYPE_LIGHT 33
-#define PACKAGE_TYPE_MESH 34
-#define PACKAGE_TYPE_MESHPART 35
-#define PACKAGE_TYPE_MESHSKIN 36
-#define PACKAGE_TYPE_FONT 128
+#define BUNDLE_VERSION_MAJOR            1
+#define BUNDLE_VERSION_MINOR            1
+
+#define BUNDLE_TYPE_SCENE               1
+#define BUNDLE_TYPE_NODE                2
+#define BUNDLE_TYPE_ANIMATIONS          3
+#define BUNDLE_TYPE_ANIMATION           4
+#define BUNDLE_TYPE_ANIMATION_CHANNEL   5
+#define BUNDLE_TYPE_MODEL               10
+#define BUNDLE_TYPE_MATERIAL            16
+#define BUNDLE_TYPE_EFFECT              18
+#define BUNDLE_TYPE_CAMERA              32
+#define BUNDLE_TYPE_LIGHT               33
+#define BUNDLE_TYPE_MESH                34
+#define BUNDLE_TYPE_MESHPART            35
+#define BUNDLE_TYPE_MESHSKIN            36
+#define BUNDLE_TYPE_FONT                128
 
 
 // For sanity checking string reads
 // For sanity checking string reads
-#define PACKAGE_MAX_STRING_LENGTH 5000
+#define BUNDLE_MAX_STRING_LENGTH        5000
 
 
 namespace gameplay
 namespace gameplay
 {
 {
 
 
-static std::vector<Package*> __packageCache;
+static std::vector<Bundle*> __bundleCache;
 
 
-Package::Package(const char* path) :
+Bundle::Bundle(const char* path) :
     _path(path), _referenceCount(0), _references(NULL), _file(NULL)
     _path(path), _referenceCount(0), _references(NULL), _file(NULL)
 {
 {
 }
 }
 
 
-Package::~Package()
+Bundle::~Bundle()
 {
 {
     clearLoadSession();
     clearLoadSession();
 
 
-    // Remove this Package from the cache
-    std::vector<Package*>::iterator itr = std::find(__packageCache.begin(), __packageCache.end(), this);
-    if (itr != __packageCache.end())
+    // Remove this Bundle from the cache
+    std::vector<Bundle*>::iterator itr = std::find(__bundleCache.begin(), __bundleCache.end(), this);
+    if (itr != __bundleCache.end())
     {
     {
-        __packageCache.erase(itr);
+        __bundleCache.erase(itr);
     }
     }
 
 
     SAFE_DELETE_ARRAY(_references);
     SAFE_DELETE_ARRAY(_references);
@@ -57,7 +57,7 @@ Package::~Package()
 }
 }
 
 
 template <class T>
 template <class T>
-bool Package::readArray(unsigned int* length, T** ptr)
+bool Bundle::readArray(unsigned int* length, T** ptr)
 {
 {
     if (!read(length))
     if (!read(length))
     {
     {
@@ -76,7 +76,7 @@ bool Package::readArray(unsigned int* length, T** ptr)
 }
 }
 
 
 template <class T>
 template <class T>
-bool Package::readArray(unsigned int* length, std::vector<T>* values)
+bool Bundle::readArray(unsigned int* length, std::vector<T>* values)
 {
 {
     if (!read(length))
     if (!read(length))
     {
     {
@@ -94,7 +94,7 @@ bool Package::readArray(unsigned int* length, std::vector<T>* values)
 }
 }
 
 
 template <class T>
 template <class T>
-bool Package::readArray(unsigned int* length, std::vector<T>* values, unsigned int readSize)
+bool Bundle::readArray(unsigned int* length, std::vector<T>* values, unsigned int readSize)
 {
 {
     assert(sizeof(T) >= readSize);
     assert(sizeof(T) >= readSize);
 
 
@@ -122,7 +122,7 @@ std::string readString(FILE* fp)
     }
     }
 
 
     // Sanity check to detect if string length is far too big
     // Sanity check to detect if string length is far too big
-    assert(length < PACKAGE_MAX_STRING_LENGTH);
+    assert(length < BUNDLE_MAX_STRING_LENGTH);
 
 
     std::string str;
     std::string str;
     if (length > 0)
     if (length > 0)
@@ -136,12 +136,12 @@ std::string readString(FILE* fp)
     return str;
     return str;
 }
 }
 
 
-Package* Package::create(const char* path)
+Bundle* Bundle::create(const char* path)
 {
 {
-    // Search the cache for this package
-    for (unsigned int i = 0, count = __packageCache.size(); i < count; ++i)
+    // Search the cache for this bundle
+    for (unsigned int i = 0, count = __bundleCache.size(); i < count; ++i)
     {
     {
-        Package* p = __packageCache[i];
+        Bundle* p = __bundleCache[i];
         if (p->_path == path)
         if (p->_path == path)
         {
         {
             // Found a match
             // Found a match
@@ -150,7 +150,7 @@ Package* Package::create(const char* path)
         }
         }
     }
     }
 
 
-    // Open the package
+    // Open the bundle
     FILE* fp = FileSystem::openFile(path, "rb");
     FILE* fp = FileSystem::openFile(path, "rb");
     if (!fp)
     if (!fp)
     {
     {
@@ -162,16 +162,16 @@ Package* Package::create(const char* path)
     char sig[9];
     char sig[9];
     if (fread(sig, 1, 9, fp) != 9 || memcmp(sig, "«GPB»\r\n\x1A\n", 9) != 0)
     if (fread(sig, 1, 9, fp) != 9 || memcmp(sig, "«GPB»\r\n\x1A\n", 9) != 0)
     {
     {
-        LOG_ERROR_VARG("Invalid package header: %s", path);
+        LOG_ERROR_VARG("Invalid bundle header: %s", path);
         fclose(fp);
         fclose(fp);
         return NULL;
         return NULL;
     }
     }
 
 
     // Read version
     // Read version
     unsigned char ver[2];
     unsigned char ver[2];
-    if (fread(ver, 1, 2, fp) != 2 || ver[0] != GPB_PACKAGE_VERSION_MAJOR || ver[1] != GPB_PACKAGE_VERSION_MINOR)
+    if (fread(ver, 1, 2, fp) != 2 || ver[0] != BUNDLE_VERSION_MAJOR || ver[1] != BUNDLE_VERSION_MINOR)
     {
     {
-        LOG_ERROR_VARG("Unsupported version (%d.%d) for package: %s (expected %d.%d)", (int)ver[0], (int)ver[1], path, GPB_PACKAGE_VERSION_MAJOR, GPB_PACKAGE_VERSION_MINOR);
+        LOG_ERROR_VARG("Unsupported version (%d.%d) for bundle: %s (expected %d.%d)", (int)ver[0], (int)ver[1], path, BUNDLE_VERSION_MAJOR, BUNDLE_VERSION_MINOR);
         fclose(fp);
         fclose(fp);
         return NULL;
         return NULL;
     }
     }
@@ -199,15 +199,15 @@ Package* Package::create(const char* path)
     }
     }
 
 
     // Keep file open for faster reading later
     // Keep file open for faster reading later
-    Package* pkg = new Package(path);
-    pkg->_referenceCount = refCount;
-    pkg->_references = refs;
-    pkg->_file = fp;
+    Bundle* bundle = new Bundle(path);
+    bundle->_referenceCount = refCount;
+    bundle->_references = refs;
+    bundle->_file = fp;
 
 
-    return pkg;
+    return bundle;
 }
 }
 
 
-Package::Reference* Package::find(const char* id) const
+Bundle::Reference* Bundle::find(const char* id) const
 {
 {
     // Search the ref table for the given id (case-sensitive)
     // Search the ref table for the given id (case-sensitive)
     for (unsigned int i = 0; i < _referenceCount; ++i)
     for (unsigned int i = 0; i < _referenceCount; ++i)
@@ -222,7 +222,7 @@ Package::Reference* Package::find(const char* id) const
     return NULL;
     return NULL;
 }
 }
 
 
-void Package::clearLoadSession()
+void Bundle::clearLoadSession()
 {
 {
     for (unsigned int i = 0, count = _meshSkins.size(); i < count; ++i)
     for (unsigned int i = 0, count = _meshSkins.size(); i < count; ++i)
     {
     {
@@ -231,12 +231,12 @@ void Package::clearLoadSession()
     _meshSkins.clear();
     _meshSkins.clear();
 }
 }
 
 
-const char* Package::getIdFromOffset() const
+const char* Bundle::getIdFromOffset() const
 {
 {
     return getIdFromOffset((unsigned int) ftell(_file));
     return getIdFromOffset((unsigned int) ftell(_file));
 }
 }
 
 
-const char* Package::getIdFromOffset(unsigned int offset) const
+const char* Bundle::getIdFromOffset(unsigned int offset) const
 {
 {
     // Search the ref table for the given offset
     // Search the ref table for the given offset
     if (offset > 0)
     if (offset > 0)
@@ -252,32 +252,32 @@ const char* Package::getIdFromOffset(unsigned int offset) const
     return NULL;
     return NULL;
 }
 }
 
 
-Package::Reference* Package::seekTo(const char* id, unsigned int type)
+Bundle::Reference* Bundle::seekTo(const char* id, unsigned int type)
 {
 {
     Reference* ref = find(id);
     Reference* ref = find(id);
     if (ref == NULL)
     if (ref == NULL)
     {
     {
-        LOG_ERROR_VARG("No object with name '%s' in package '%s'.", id, _path.c_str());
+        LOG_ERROR_VARG("No object with name '%s' in bundle '%s'.", id, _path.c_str());
         return NULL;
         return NULL;
     }
     }
 
 
     if (ref->type != type)
     if (ref->type != type)
     {
     {
-        LOG_ERROR_VARG("Object '%s' in package '%s' has type %d (expected type %d).", id, _path.c_str(), (int)ref->type, (int)type);
+        LOG_ERROR_VARG("Object '%s' in bundle '%s' has type %d (expected type %d).", id, _path.c_str(), (int)ref->type, (int)type);
         return NULL;
         return NULL;
     }
     }
 
 
     // Seek to the offset of this object
     // Seek to the offset of this object
     if (fseek(_file, ref->offset, SEEK_SET) != 0)
     if (fseek(_file, ref->offset, SEEK_SET) != 0)
     {
     {
-        LOG_ERROR_VARG("Failed to seek to object '%s' in package '%s'.", id, _path.c_str());
+        LOG_ERROR_VARG("Failed to seek to object '%s' in bundle '%s'.", id, _path.c_str());
         return NULL;
         return NULL;
     }
     }
 
 
     return ref;
     return ref;
 }
 }
 
 
-Package::Reference* Package::seekToFirstType(unsigned int type)
+Bundle::Reference* Bundle::seekToFirstType(unsigned int type)
 {
 {
     // for each Reference
     // for each Reference
     for (unsigned int i = 0; i < _referenceCount; ++i)
     for (unsigned int i = 0; i < _referenceCount; ++i)
@@ -288,7 +288,7 @@ Package::Reference* Package::seekToFirstType(unsigned int type)
             // Found a match
             // Found a match
             if (fseek(_file, ref->offset, SEEK_SET) != 0)
             if (fseek(_file, ref->offset, SEEK_SET) != 0)
             {
             {
-                LOG_ERROR_VARG("Failed to seek to object '%s' in package '%s'.", ref->id.c_str(), _path.c_str());
+                LOG_ERROR_VARG("Failed to seek to object '%s' in bundle '%s'.", ref->id.c_str(), _path.c_str());
                 return NULL;
                 return NULL;
             }
             }
             return ref;
             return ref;
@@ -297,38 +297,38 @@ Package::Reference* Package::seekToFirstType(unsigned int type)
     return NULL;
     return NULL;
 }
 }
 
 
-bool Package::read(unsigned int* ptr)
+bool Bundle::read(unsigned int* ptr)
 {
 {
     return fread(ptr, sizeof(unsigned int), 1, _file) == 1;
     return fread(ptr, sizeof(unsigned int), 1, _file) == 1;
 }
 }
 
 
-bool Package::read(unsigned char* ptr)
+bool Bundle::read(unsigned char* ptr)
 {
 {
     return fread(ptr, sizeof(unsigned char), 1, _file) == 1;
     return fread(ptr, sizeof(unsigned char), 1, _file) == 1;
 }
 }
 
 
-bool Package::read(float* ptr)
+bool Bundle::read(float* ptr)
 {
 {
     return fread(ptr, sizeof(float), 1, _file) == 1;
     return fread(ptr, sizeof(float), 1, _file) == 1;
 }
 }
 
 
-bool Package::readMatrix(float* m)
+bool Bundle::readMatrix(float* m)
 {
 {
     return (fread(m, sizeof(float), 16, _file) == 16);
     return (fread(m, sizeof(float), 16, _file) == 16);
 }
 }
 
 
-Scene* Package::loadScene(const char* id)
+Scene* Bundle::loadScene(const char* id)
 {
 {
     clearLoadSession();
     clearLoadSession();
 
 
     Reference* ref = NULL;
     Reference* ref = NULL;
     if (id)
     if (id)
     {
     {
-        ref = seekTo(id, PACKAGE_TYPE_SCENE);
+        ref = seekTo(id, BUNDLE_TYPE_SCENE);
     }
     }
     else
     else
     {
     {
-        ref = seekToFirstType(PACKAGE_TYPE_SCENE);
+        ref = seekToFirstType(BUNDLE_TYPE_SCENE);
     }
     }
     if (!ref)
     if (!ref)
     {
     {
@@ -393,12 +393,12 @@ Scene* Package::loadScene(const char* id)
     for (unsigned int i = 0; i < _referenceCount; ++i)
     for (unsigned int i = 0; i < _referenceCount; ++i)
     {
     {
         Reference* ref = &_references[i];
         Reference* ref = &_references[i];
-        if (ref->type == PACKAGE_TYPE_ANIMATIONS)
+        if (ref->type == BUNDLE_TYPE_ANIMATIONS)
         {
         {
             // Found a match
             // Found a match
             if (fseek(_file, ref->offset, SEEK_SET) != 0)
             if (fseek(_file, ref->offset, SEEK_SET) != 0)
             {
             {
-                LOG_ERROR_VARG("Failed to seek to object '%s' in package '%s'.", ref->id.c_str(), _path.c_str());
+                LOG_ERROR_VARG("Failed to seek to object '%s' in bundle '%s'.", ref->id.c_str(), _path.c_str());
                 return NULL;
                 return NULL;
             }
             }
             readAnimations(scene);
             readAnimations(scene);
@@ -410,7 +410,7 @@ Scene* Package::loadScene(const char* id)
     return scene;
     return scene;
 }
 }
 
 
-Node* Package::loadNode(const char* id)
+Node* Bundle::loadNode(const char* id)
 {
 {
     assert(id);
     assert(id);
 
 
@@ -426,7 +426,7 @@ Node* Package::loadNode(const char* id)
     return node;
     return node;
 }
 }
 
 
-Node* Package::loadNode(const char* id, Scene* sceneContext, Node* nodeContext)
+Node* Bundle::loadNode(const char* id, Scene* sceneContext, Node* nodeContext)
 {
 {
     assert(id);
     assert(id);
 
 
@@ -446,7 +446,7 @@ Node* Package::loadNode(const char* id, Scene* sceneContext, Node* nodeContext)
     if (node == NULL)
     if (node == NULL)
     {
     {
         // If not yet found, search the ref table and read
         // If not yet found, search the ref table and read
-        Reference* ref = seekTo(id, PACKAGE_TYPE_NODE);
+        Reference* ref = seekTo(id, BUNDLE_TYPE_NODE);
         if (ref == NULL)
         if (ref == NULL)
         {
         {
             return NULL;
             return NULL;
@@ -458,7 +458,7 @@ Node* Package::loadNode(const char* id, Scene* sceneContext, Node* nodeContext)
     return node;
     return node;
 }
 }
 
 
-Node* Package::readNode(Scene* sceneContext, Node* nodeContext)
+Node* Bundle::readNode(Scene* sceneContext, Node* nodeContext)
 {
 {
     const char* id = getIdFromOffset();
     const char* id = getIdFromOffset();
 
 
@@ -545,12 +545,12 @@ Node* Package::readNode(Scene* sceneContext, Node* nodeContext)
     return node;
     return node;
 }
 }
 
 
-Camera* Package::readCamera()
+Camera* Bundle::readCamera()
 {
 {
     unsigned char cameraType;
     unsigned char cameraType;
     if (!read(&cameraType))
     if (!read(&cameraType))
     {
     {
-        LOG_ERROR_VARG("Failed to load camera type in package '%s'.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load camera type in bundle '%s'.", _path.c_str());
     }
     }
 
 
     if (cameraType == 0)
     if (cameraType == 0)
@@ -562,21 +562,21 @@ Camera* Package::readCamera()
     float aspectRatio;
     float aspectRatio;
     if (!read(&aspectRatio))
     if (!read(&aspectRatio))
     {
     {
-        LOG_ERROR_VARG("Failed to load camera aspectRatio in package '%s'.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load camera aspectRatio in bundle '%s'.", _path.c_str());
     }
     }
 
 
     // near plane
     // near plane
     float nearPlane;
     float nearPlane;
     if (!read(&nearPlane))
     if (!read(&nearPlane))
     {
     {
-        LOG_ERROR_VARG("Failed to load camera near plane in package '%s'.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load camera near plane in bundle '%s'.", _path.c_str());
     }
     }
 
 
     // far plane
     // far plane
     float farPlane;
     float farPlane;
     if (!read(&farPlane))
     if (!read(&farPlane))
     {
     {
-        LOG_ERROR_VARG("Failed to load camera far plane in package '%s'.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load camera far plane in bundle '%s'.", _path.c_str());
     }
     }
 
 
     Camera* camera = NULL;
     Camera* camera = NULL;
@@ -586,7 +586,7 @@ Camera* Package::readCamera()
         float fieldOfView;
         float fieldOfView;
         if (!read(&fieldOfView))
         if (!read(&fieldOfView))
         {
         {
-            LOG_ERROR_VARG("Failed to load camera field of view in package '%s'.", _path.c_str());
+            LOG_ERROR_VARG("Failed to load camera field of view in bundle '%s'.", _path.c_str());
         }
         }
 
 
         camera = Camera::createPerspective(fieldOfView, aspectRatio, nearPlane, farPlane);
         camera = Camera::createPerspective(fieldOfView, aspectRatio, nearPlane, farPlane);
@@ -597,30 +597,30 @@ Camera* Package::readCamera()
         float zoomX;
         float zoomX;
         if (!read(&zoomX))
         if (!read(&zoomX))
         {
         {
-            LOG_ERROR_VARG("Failed to load camera zoomX in package '%s'.", _path.c_str());
+            LOG_ERROR_VARG("Failed to load camera zoomX in bundle '%s'.", _path.c_str());
         }
         }
 
 
         float zoomY;
         float zoomY;
         if (!read(&zoomY))
         if (!read(&zoomY))
         {
         {
-            LOG_ERROR_VARG("Failed to load camera zoomY in package '%s'.", _path.c_str());
+            LOG_ERROR_VARG("Failed to load camera zoomY in bundle '%s'.", _path.c_str());
         }
         }
 
 
         camera = Camera::createOrthographic(zoomX, zoomY, aspectRatio, nearPlane, farPlane);
         camera = Camera::createOrthographic(zoomX, zoomY, aspectRatio, nearPlane, farPlane);
     }
     }
     else
     else
     {
     {
-        LOG_ERROR_VARG("Failed to load camera type in package '%s'. Invalid camera type.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load camera type in bundle '%s'. Invalid camera type.", _path.c_str());
     }
     }
     return camera;
     return camera;
 }
 }
 
 
-Light* Package::readLight()
+Light* Bundle::readLight()
 {
 {
     unsigned char type;
     unsigned char type;
     if (!read(&type))
     if (!read(&type))
     {
     {
-        LOG_ERROR_VARG("Failed to load light %s in package '%s'.", "type", _path.c_str());
+        LOG_ERROR_VARG("Failed to load light %s in bundle '%s'.", "type", _path.c_str());
     }
     }
 
 
     if (type == 0)
     if (type == 0)
@@ -632,7 +632,7 @@ Light* Package::readLight()
     float red, blue, green;
     float red, blue, green;
     if (!read(&red) || !read(&blue) || !read(&green))
     if (!read(&red) || !read(&blue) || !read(&green))
     {
     {
-        LOG_ERROR_VARG("Failed to load light %s in package '%s'.", "color", _path.c_str());
+        LOG_ERROR_VARG("Failed to load light %s in bundle '%s'.", "color", _path.c_str());
     }
     }
     Vector3 color(red, blue, green);
     Vector3 color(red, blue, green);
 
 
@@ -646,7 +646,7 @@ Light* Package::readLight()
         float range;
         float range;
         if (!read(&range))
         if (!read(&range))
         {
         {
-            LOG_ERROR_VARG("Failed to load point light %s in package '%s'.", "point", _path.c_str());
+            LOG_ERROR_VARG("Failed to load point light %s in bundle '%s'.", "point", _path.c_str());
         }
         }
         light = Light::createPoint(color, range);
         light = Light::createPoint(color, range);
     }
     }
@@ -655,18 +655,18 @@ Light* Package::readLight()
         float range, innerAngle, outerAngle;
         float range, innerAngle, outerAngle;
         if (!read(&range) || !read(&innerAngle) || !read(&outerAngle))
         if (!read(&range) || !read(&innerAngle) || !read(&outerAngle))
         {
         {
-            LOG_ERROR_VARG("Failed to load spot light %s in package '%s'.", "spot", _path.c_str());
+            LOG_ERROR_VARG("Failed to load spot light %s in bundle '%s'.", "spot", _path.c_str());
         }
         }
         light = Light::createSpot(color, range, innerAngle, outerAngle);
         light = Light::createSpot(color, range, innerAngle, outerAngle);
     }
     }
     else
     else
     {
     {
-        LOG_ERROR_VARG("Failed to load light %s in package '%s'.", "type", _path.c_str());
+        LOG_ERROR_VARG("Failed to load light %s in bundle '%s'.", "type", _path.c_str());
     }
     }
     return light;
     return light;
 }
 }
 
 
-Model* Package::readModel(Scene* sceneContext, Node* nodeContext, const char* nodeId)
+Model* Bundle::readModel(Scene* sceneContext, Node* nodeContext, const char* nodeId)
 {
 {
     // Read mesh
     // Read mesh
     Mesh* mesh = NULL;
     Mesh* mesh = NULL;
@@ -683,7 +683,7 @@ Model* Package::readModel(Scene* sceneContext, Node* nodeContext, const char* no
             unsigned char hasSkin;
             unsigned char hasSkin;
             if (!read(&hasSkin))
             if (!read(&hasSkin))
             {
             {
-                LOG_ERROR_VARG("Failed to load hasSkin in package '%s'.", _path.c_str());
+                LOG_ERROR_VARG("Failed to load hasSkin in bundle '%s'.", _path.c_str());
                 return NULL;
                 return NULL;
             }
             }
             if (hasSkin)
             if (hasSkin)
@@ -698,7 +698,7 @@ Model* Package::readModel(Scene* sceneContext, Node* nodeContext, const char* no
             unsigned int materialCount;
             unsigned int materialCount;
             if (!read(&materialCount))
             if (!read(&materialCount))
             {
             {
-                LOG_ERROR_VARG("Failed to load materialCount in package '%s'.", _path.c_str());
+                LOG_ERROR_VARG("Failed to load materialCount in bundle '%s'.", _path.c_str());
                 return NULL;
                 return NULL;
             }
             }
             if (materialCount > 0)
             if (materialCount > 0)
@@ -712,7 +712,7 @@ Model* Package::readModel(Scene* sceneContext, Node* nodeContext, const char* no
     return NULL;
     return NULL;
 }
 }
 
 
-MeshSkin* Package::readMeshSkin(Scene* sceneContext, Node* nodeContext)
+MeshSkin* Bundle::readMeshSkin(Scene* sceneContext, Node* nodeContext)
 {
 {
     MeshSkin* meshSkin = new MeshSkin();
     MeshSkin* meshSkin = new MeshSkin();
 
 
@@ -720,7 +720,7 @@ MeshSkin* Package::readMeshSkin(Scene* sceneContext, Node* nodeContext)
     float bindShape[16];
     float bindShape[16];
     if (!readMatrix(bindShape))
     if (!readMatrix(bindShape))
     {
     {
-        LOG_ERROR_VARG("Failed to load MeshSkin in package '%s'.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load MeshSkin in bundle '%s'.", _path.c_str());
         SAFE_DELETE(meshSkin);
         SAFE_DELETE(meshSkin);
         return NULL;
         return NULL;
     }
     }
@@ -733,7 +733,7 @@ MeshSkin* Package::readMeshSkin(Scene* sceneContext, Node* nodeContext)
     unsigned int jointCount;
     unsigned int jointCount;
     if (!read(&jointCount))
     if (!read(&jointCount))
     {
     {
-        LOG_ERROR_VARG("Failed to load MeshSkin in package '%s'.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load MeshSkin in bundle '%s'.", _path.c_str());
         SAFE_DELETE(meshSkin);
         SAFE_DELETE(meshSkin);
         SAFE_DELETE(skinData);
         SAFE_DELETE(skinData);
         return NULL;
         return NULL;
@@ -756,7 +756,7 @@ MeshSkin* Package::readMeshSkin(Scene* sceneContext, Node* nodeContext)
     unsigned int jointsBindPosesCount;
     unsigned int jointsBindPosesCount;
     if (!read(&jointsBindPosesCount))
     if (!read(&jointsBindPosesCount))
     {
     {
-        LOG_ERROR_VARG("Failed to load MeshSkin in package '%s'.", _path.c_str());
+        LOG_ERROR_VARG("Failed to load MeshSkin in bundle '%s'.", _path.c_str());
         SAFE_DELETE(meshSkin);
         SAFE_DELETE(meshSkin);
         SAFE_DELETE(skinData);
         SAFE_DELETE(skinData);
         return NULL;
         return NULL;
@@ -769,7 +769,7 @@ MeshSkin* Package::readMeshSkin(Scene* sceneContext, Node* nodeContext)
         {
         {
             if (!readMatrix(m))
             if (!readMatrix(m))
             {
             {
-                LOG_ERROR_VARG("Failed to load MeshSkin in package '%s'.", _path.c_str());
+                LOG_ERROR_VARG("Failed to load MeshSkin in bundle '%s'.", _path.c_str());
                 SAFE_DELETE(meshSkin);
                 SAFE_DELETE(meshSkin);
                 SAFE_DELETE(skinData);
                 SAFE_DELETE(skinData);
                 return NULL;
                 return NULL;
@@ -784,7 +784,7 @@ MeshSkin* Package::readMeshSkin(Scene* sceneContext, Node* nodeContext)
     return meshSkin;
     return meshSkin;
 }
 }
 
 
-void Package::resolveJointReferences(Scene* sceneContext, Node* nodeContext)
+void Bundle::resolveJointReferences(Scene* sceneContext, Node* nodeContext)
 {
 {
     const unsigned int skinCount = _meshSkins.size();
     const unsigned int skinCount = _meshSkins.size();
     for (unsigned int i = 0; i < skinCount; ++i)
     for (unsigned int i = 0; i < skinCount; ++i)
@@ -834,7 +834,7 @@ void Package::resolveJointReferences(Scene* sceneContext, Node* nodeContext)
     _meshSkins.clear();
     _meshSkins.clear();
 }
 }
 
 
-void Package::readAnimation(Scene* scene)
+void Bundle::readAnimation(Scene* scene)
 {
 {
     const std::string animationId = readString(_file);
     const std::string animationId = readString(_file);
 
 
@@ -854,7 +854,7 @@ void Package::readAnimation(Scene* scene)
     }
     }
 }
 }
 
 
-void Package::readAnimations(Scene* scene)
+void Bundle::readAnimations(Scene* scene)
 {
 {
     // read the number of animations in this object
     // read the number of animations in this object
     unsigned int animationCount;
     unsigned int animationCount;
@@ -870,7 +870,7 @@ void Package::readAnimations(Scene* scene)
     }
     }
 }
 }
 
 
-Animation* Package::readAnimationChannel(Scene* scene, Animation* animation, const char* animationId)
+Animation* Bundle::readAnimationChannel(Scene* scene, Animation* animation, const char* animationId)
 {
 {
     const char* id = animationId;
     const char* id = animationId;
 
 
@@ -975,18 +975,18 @@ Animation* Package::readAnimationChannel(Scene* scene, Animation* animation, con
     return animation;
     return animation;
 }
 }
 
 
-Mesh* Package::loadMesh(const char* id)
+Mesh* Bundle::loadMesh(const char* id)
 {
 {
     return loadMesh(id, false);
     return loadMesh(id, false);
 }
 }
 
 
-Mesh* Package::loadMesh(const char* id, const char* nodeId)
+Mesh* Bundle::loadMesh(const char* id, const char* nodeId)
 {
 {
     // Save the file position
     // Save the file position
     long position = ftell(_file);
     long position = ftell(_file);
 
 
     // Seek to the specified Mesh
     // Seek to the specified Mesh
-    Reference* ref = seekTo(id, PACKAGE_TYPE_MESH);
+    Reference* ref = seekTo(id, BUNDLE_TYPE_MESH);
     if (ref == NULL)
     if (ref == NULL)
     {
     {
         return NULL;
         return NULL;
@@ -1040,7 +1040,7 @@ Mesh* Package::loadMesh(const char* id, const char* nodeId)
     return mesh;
     return mesh;
 }
 }
 
 
-Package::MeshData* Package::readMeshData()
+Bundle::MeshData* Bundle::readMeshData()
 {
 {
     // Read vertex format/elements
     // Read vertex format/elements
     unsigned int vertexElementCount;
     unsigned int vertexElementCount;
@@ -1145,7 +1145,7 @@ Package::MeshData* Package::readMeshData()
     return meshData;
     return meshData;
 }
 }
 
 
-Package::MeshData* Package::readMeshData(const char* url)
+Bundle::MeshData* Bundle::readMeshData(const char* url)
 {
 {
     assert(url);
     assert(url);
 
 
@@ -1153,7 +1153,7 @@ Package::MeshData* Package::readMeshData(const char* url)
     if (len == 0)
     if (len == 0)
         return NULL;
         return NULL;
 
 
-    // Parse URL (formatted as 'package#id')
+    // Parse URL (formatted as 'bundle#id')
     std::string urlstring(url);
     std::string urlstring(url);
     unsigned int pos = urlstring.find('#');
     unsigned int pos = urlstring.find('#');
     if (pos == std::string::npos)
     if (pos == std::string::npos)
@@ -1162,28 +1162,28 @@ Package::MeshData* Package::readMeshData(const char* url)
     std::string file = urlstring.substr(0, pos);
     std::string file = urlstring.substr(0, pos);
     std::string id = urlstring.substr(pos + 1);
     std::string id = urlstring.substr(pos + 1);
 
 
-    // Load package
-    Package* pkg = Package::create(file.c_str());
-    if (pkg == NULL)
+    // Load bundle
+    Bundle* bundle = Bundle::create(file.c_str());
+    if (bundle == NULL)
         return NULL;
         return NULL;
 
 
-    // Seek to mesh with specified ID in package
-    Reference* ref = pkg->seekTo(id.c_str(), PACKAGE_TYPE_MESH);
+    // Seek to mesh with specified ID in bundle
+    Reference* ref = bundle->seekTo(id.c_str(), BUNDLE_TYPE_MESH);
     if (ref == NULL)
     if (ref == NULL)
         return NULL;
         return NULL;
 
 
     // Read mesh data from current file position
     // Read mesh data from current file position
-    MeshData* meshData = pkg->readMeshData();
+    MeshData* meshData = bundle->readMeshData();
 
 
-    SAFE_RELEASE(pkg);
+    SAFE_RELEASE(bundle);
 
 
     return meshData;
     return meshData;
 }
 }
 
 
-Font* Package::loadFont(const char* id)
+Font* Bundle::loadFont(const char* id)
 {
 {
     // Seek to the specified Font
     // Seek to the specified Font
-    Reference* ref = seekTo(id, PACKAGE_TYPE_FONT);
+    Reference* ref = seekTo(id, BUNDLE_TYPE_FONT);
     if (ref == NULL)
     if (ref == NULL)
     {
     {
         return NULL;
         return NULL;
@@ -1280,7 +1280,7 @@ Font* Package::loadFont(const char* id)
     return font;
     return font;
 }
 }
 
 
-void Package::setTransform(const float* values, Transform* transform)
+void Bundle::setTransform(const float* values, Transform* transform)
 {
 {
     // Load array into transform
     // Load array into transform
     Matrix matrix(values);
     Matrix matrix(values);
@@ -1292,46 +1292,46 @@ void Package::setTransform(const float* values, Transform* transform)
     transform->setRotation(rotation);
     transform->setRotation(rotation);
 }
 }
 
 
-bool Package::contains(const char* id) const
+bool Bundle::contains(const char* id) const
 {
 {
     return (find(id) != NULL);
     return (find(id) != NULL);
 }
 }
 
 
-unsigned int Package::getObjectCount() const
+unsigned int Bundle::getObjectCount() const
 {
 {
     return _referenceCount;
     return _referenceCount;
 }
 }
 
 
-const char* Package::getObjectID(unsigned int index) const
+const char* Bundle::getObjectID(unsigned int index) const
 {
 {
     return (index >= _referenceCount ? NULL : _references[index].id.c_str());
     return (index >= _referenceCount ? NULL : _references[index].id.c_str());
 }
 }
 
 
-Package::Reference::Reference()
+Bundle::Reference::Reference()
     : type(0), offset(0)
     : type(0), offset(0)
 {
 {
 }
 }
 
 
-Package::Reference::~Reference()
+Bundle::Reference::~Reference()
 {
 {
 }
 }
 
 
-Package::MeshPartData::MeshPartData() :
+Bundle::MeshPartData::MeshPartData() :
     indexCount(0), indexData(NULL)
     indexCount(0), indexData(NULL)
 {
 {
 }
 }
 
 
-Package::MeshPartData::~MeshPartData()
+Bundle::MeshPartData::~MeshPartData()
 {
 {
     SAFE_DELETE_ARRAY(indexData);
     SAFE_DELETE_ARRAY(indexData);
 }
 }
 
 
-Package::MeshData::MeshData(const VertexFormat& vertexFormat)
+Bundle::MeshData::MeshData(const VertexFormat& vertexFormat)
     : vertexFormat(vertexFormat), vertexCount(0), vertexData(NULL)
     : vertexFormat(vertexFormat), vertexCount(0), vertexData(NULL)
 {
 {
 }
 }
 
 
-Package::MeshData::~MeshData()
+Bundle::MeshData::~MeshData()
 {
 {
     SAFE_DELETE_ARRAY(vertexData);
     SAFE_DELETE_ARRAY(vertexData);
 
 

+ 24 - 24
gameplay/src/Package.h → gameplay/src/Bundle.h

@@ -1,5 +1,5 @@
-#ifndef PACKAGE_H_
-#define PACKAGE_H_
+#ifndef BUNDLE_H_
+#define BUNDLE_H_
 
 
 #include "Mesh.h"
 #include "Mesh.h"
 #include "Font.h"
 #include "Font.h"
@@ -10,29 +10,29 @@ namespace gameplay
 {
 {
 
 
 /**
 /**
- * Represents a gameplay binary package file (.gpb) that contains a
- * collection of game resources that can be loaded.
+ * Represents a gameplay bundle file (.gpb) that contains a
+ * collection of binary game assets that can be loaded.
  */
  */
-class Package : public Ref
+class Bundle : public Ref
 {
 {
     friend class PhysicsController;
     friend class PhysicsController;
 
 
 public:
 public:
 
 
     /**
     /**
-     * Returns a Package for the given resource path.
+     * Returns a Bundle for the given resource path.
      *
      *
-     * The specified path must reference a valid gameplay binary file.
-     * If the package is already loaded, the existing package is returned
+     * The specified path must reference a valid gameplay bundle file.
+     * If the bundle is already loaded, the existing bundle is returned
      * with its reference count incremented. When no longer needed, the
      * with its reference count incremented. When no longer needed, the
      * release() method must be called. Note that calling release() does
      * release() method must be called. Note that calling release() does
-     * NOT free any actual game objects created/returned from the Package
+     * NOT free any actual game objects created/returned from the Bundle
      * instance and those objects must be released separately.
      * instance and those objects must be released separately.
      */
      */
-    static Package* create(const char* path);
+    static Bundle* create(const char* path);
 
 
     /**
     /**
-     * Loads the scene with the specified ID from the package.
+     * Loads the scene with the specified ID from the bundle.
      * If id is NULL then the first scene found is loaded.
      * If id is NULL then the first scene found is loaded.
      * 
      * 
      * @param id The ID of the scene to load (NULL to load the first scene).
      * @param id The ID of the scene to load (NULL to load the first scene).
@@ -42,16 +42,16 @@ public:
     Scene* loadScene(const char* id = NULL);
     Scene* loadScene(const char* id = NULL);
 
 
     /**
     /**
-     * Loads a node with the specified ID from the package.
+     * Loads a node with the specified ID from the bundle.
      *
      *
-     * @param id The ID of the node to load in the package.
+     * @param id The ID of the node to load in the bundle.
      * 
      * 
      * @return The loaded node, or NULL if the node could not be loaded.
      * @return The loaded node, or NULL if the node could not be loaded.
      */
      */
     Node* loadNode(const char* id);
     Node* loadNode(const char* id);
 
 
     /**
     /**
-     * Loads a mesh with the specified ID from the package.
+     * Loads a mesh with the specified ID from the bundle.
      *
      *
      * @param id The ID of the mesh to load.
      * @param id The ID of the mesh to load.
      * 
      * 
@@ -60,7 +60,7 @@ public:
     Mesh* loadMesh(const char* id);
     Mesh* loadMesh(const char* id);
 
 
     /**
     /**
-     * Loads a font with the specified ID from the package.
+     * Loads a font with the specified ID from the bundle.
      *
      *
      * @param id The ID of the font to load.
      * @param id The ID of the font to load.
      * 
      * 
@@ -69,7 +69,7 @@ public:
     Font* loadFont(const char* id);
     Font* loadFont(const char* id);
 
 
     /**
     /**
-     * Determines if this package contains a top-level object with the given ID.
+     * Determines if this bundle contains a top-level object with the given ID.
      *
      *
      * This method performs a case-sensitive comparison.
      * This method performs a case-sensitive comparison.
      *
      *
@@ -78,12 +78,12 @@ public:
     bool contains(const char* id) const;
     bool contains(const char* id) const;
 
 
     /**
     /**
-     * Returns the number of top-level objects in this package.
+     * Returns the number of top-level objects in this bundle.
      */
      */
     unsigned int getObjectCount() const;
     unsigned int getObjectCount() const;
 
 
     /**
     /**
-     * Returns the unique identifier of the top-level object at the specified index in this package.
+     * Returns the unique identifier of the top-level object at the specified index in this bundle.
      *
      *
      * @param index The index of the object.
      * @param index The index of the object.
      * 
      * 
@@ -143,12 +143,12 @@ private:
         std::vector<MeshPartData*> parts;
         std::vector<MeshPartData*> parts;
     };
     };
 
 
-    Package(const char* path);
+    Bundle(const char* path);
 
 
     /**
     /**
      * Destructor.
      * Destructor.
      */
      */
-    ~Package();
+    ~Bundle();
 
 
     /**
     /**
      * Finds a reference by ID.
      * Finds a reference by ID.
@@ -156,7 +156,7 @@ private:
     Reference* find(const char* id) const;
     Reference* find(const char* id) const;
 
 
     /**
     /**
-     * Resets any load session specific state for the package.
+     * Resets any load session specific state for the bundle.
      */
      */
     void clearLoadSession();
     void clearLoadSession();
 
 
@@ -206,7 +206,7 @@ private:
     Node* loadNode(const char* id, Scene* sceneContext, Node* nodeContext);
     Node* loadNode(const char* id, Scene* sceneContext, Node* nodeContext);
 
 
     /**
     /**
-     * Loads a mesh with the specified ID from the package.
+     * Loads a mesh with the specified ID from the bundle.
      *
      *
      * @param id The ID of the mesh to load.
      * @param id The ID of the mesh to load.
      * @param nodeId The id of the mesh's model's parent node.
      * @param nodeId The id of the mesh's model's parent node.
@@ -331,8 +331,8 @@ private:
     /**
     /**
      * Reads mesh data for the specified URL.
      * Reads mesh data for the specified URL.
      *
      *
-     * The specified URL should be formatted as 'package#id', where
-     * 'package' is the package file containing the mesh and 'id' is the ID
+     * The specified URL should be formatted as 'bundle#id', where
+     * 'bundle' is the bundle file containing the mesh and 'id' is the ID
      * of the mesh to read data for.
      * of the mesh to read data for.
      *
      *
      * @param url The URL to read mesh data from.
      * @param url The URL to read mesh data from.

+ 15 - 13
gameplay/src/Button.h

@@ -13,19 +13,21 @@ 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:
- *
- * button <buttonID>
- * {
- *      style       = <styleID>
- *      alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
- *      position    = <x, y>
- *      autoWidth   = <bool>
- *      autoHeight  = <bool>
- *      size        = <width, height>
- *      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'
- *      text        = <string>
- * }
+
+ @verbatim
+    button <buttonID>
+    {
+         style       = <styleID>
+         alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
+         position    = <x, y>
+         autoWidth   = <bool>
+         autoHeight  = <bool>
+         size        = <width, height>
+         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'
+         text        = <string>
+    }
+ @endverbatim
  */
  */
 class Button : public Label
 class Button : public Label
 {
 {

+ 17 - 15
gameplay/src/CheckBox.h

@@ -13,21 +13,23 @@ namespace gameplay
  * Defines a checkbox UI control.  This is a button that toggles between two icons when clicked.
  * Defines a checkbox UI control.  This is a button that toggles between two icons when clicked.
  *
  *
  * The following properties are available for checkboxes:
  * The following properties are available for checkboxes:
- *
- * checkBox <checkBoxID>
- * {
- *      style       = <styleID>
- *      alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
- *      position    = <x, y>
- *      autoWidth   = <bool>
- *      autoHeight  = <bool>
- *      size        = <width, height>
- *      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'
- *      text        = <string>
- *      checked     = <bool>
- *      iconSize    = <width, height>   // The size to draw the checkbox icon, if different from its size in the texture.
- * }
+
+ @verbatim
+    checkBox <checkBoxID>
+    {
+         style       = <styleID>
+         alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
+         position    = <x, y>
+         autoWidth   = <bool>
+         autoHeight  = <bool>
+         size        = <width, height>
+         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'
+         text        = <string>
+         checked     = <bool>
+         iconSize    = <width, height>   // The size to draw the checkbox icon, if different from its size in the texture.
+    }
+ @endverbatim
  */
  */
 class CheckBox : public Button
 class CheckBox : public Button
 {
 {

+ 1 - 0
gameplay/src/Container.cpp

@@ -76,6 +76,7 @@ namespace gameplay
             {
             {
                  controlStyle = theme->getStyle(controlStyleName);
                  controlStyle = theme->getStyle(controlStyleName);
             }
             }
+            assert(controlStyle);
 
 
             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);

+ 29 - 27
gameplay/src/Container.h

@@ -11,33 +11,35 @@ namespace gameplay
  * A container is a UI control that can contain other controls.
  * A container is a UI control that can contain other controls.
  *
  *
  * The following properties are available for containers:
  * The following properties are available for containers:
- *
- * container <containerID>
- * {
- *      // Container properties.
- *      layout   = <Layout::Type>        // A value from the Layout::Type enum.  E.g.: LAYOUT_VERTICAL
- *      style    = <styleID>           // A style from the form's theme.
- *      alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
- *      position    = <x, y>    // Position of the container on-screen, measured in pixels.
- *      autoWidth   = <bool>
- *      autoHeight  = <bool>
- *      size        = <width, height>   // Size of the container, measured in pixels.
- *      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'
- *   
- *      // All the nested controls within this container.
- *      container 
- *      { 
- *          ...
- *      }
- * 
- *      label { }
- *      textBox { }
- *      button { }
- *      checkBox { }
- *      radioButton { }
- *      slider { }
- * }
+
+ @verbatim
+    container <containerID>
+    {
+         // Container properties.
+         layout   = <Layout::Type>        // A value from the Layout::Type enum.  E.g.: LAYOUT_VERTICAL
+         style    = <styleID>           // A style from the form's theme.
+         alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
+         position    = <x, y>    // Position of the container on-screen, measured in pixels.
+         autoWidth   = <bool>
+         autoHeight  = <bool>
+         size        = <width, height>   // Size of the container, measured in pixels.
+         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'
+  
+         // All the nested controls within this container.
+         container 
+         { 
+             ...
+         }
+
+         label { }
+         textBox { }
+         button { }
+         checkBox { }
+         radioButton { }
+         slider { }
+    }
+ @endverbatim
  */
  */
 class Container : public Control
 class Container : public Control
 {
 {

+ 129 - 0
gameplay/src/Control.cpp

@@ -36,6 +36,7 @@ namespace gameplay
     {
     {
         _style = style;
         _style = style;
 
 
+        // Properties not defined by the style.
         _alignment = getAlignment(properties->getString("alignment"));
         _alignment = getAlignment(properties->getString("alignment"));
         _autoWidth = properties->getBool("autoWidth");
         _autoWidth = properties->getBool("autoWidth");
         _autoHeight = properties->getBool("autoHeight");
         _autoHeight = properties->getBool("autoHeight");
@@ -68,6 +69,35 @@ namespace gameplay
         const char* id = properties->getId();
         const char* id = properties->getId();
         if (id)
         if (id)
             _id = id;
             _id = id;
+
+        // Potentially override themed properties for all states.
+        overrideThemedProperties(properties, STATE_ALL);
+
+        // Override themed properties on specific states.
+        Properties* stateSpace = properties->getNextNamespace();
+        while (stateSpace != NULL)
+        {
+            std::string stateName(stateSpace->getNamespace());
+            std::transform(stateName.begin(), stateName.end(), stateName.begin(), (int(*)(int))toupper);
+            if (stateName == "STATENORMAL")
+            {
+                overrideThemedProperties(stateSpace, NORMAL);
+            }
+            else if (stateName == "STATEFOCUS")
+            {
+                overrideThemedProperties(stateSpace, FOCUS);
+            }
+            else if (stateName == "STATEACTIVE")
+            {
+                overrideThemedProperties(stateSpace, ACTIVE);
+            }
+            else if (stateName == "STATEDISABLED")
+            {
+                overrideThemedProperties(stateSpace, DISABLED);
+            }
+
+            stateSpace = properties->getNextNamespace();
+        }
     }
     }
 
 
     const char* Control::getID() const
     const char* Control::getID() const
@@ -963,6 +993,105 @@ namespace gameplay
         _styleOverridden = true;
         _styleOverridden = true;
     }
     }
 
 
+    void Control::overrideThemedProperties(Properties* properties, unsigned char states)
+    {
+        Theme::ImageList* imageList = NULL;
+        Theme::Image* cursor = NULL;
+        Theme::Skin* skin = NULL;
+        _style->_theme->lookUpSprites(properties, &imageList, &cursor, &skin);
+
+        if (imageList)
+        {
+            setImageList(imageList, states);
+        }
+
+        if (cursor)
+        {
+            setCursor(cursor, states);
+        }
+
+        if (skin)
+        {
+            setSkin(skin, states);
+        }
+
+        if (properties->exists("font"))
+        {
+            Font* font = Font::create(properties->getString("font"));
+            setFont(font, states);
+            font->release();
+        }
+
+        if (properties->exists("fontSize"))
+        {
+            setFontSize(properties->getInt("fontSize"), states);
+        }
+
+        if (properties->exists("textColor"))
+        {
+            Vector4 textColor(0, 0, 0, 1);
+            properties->getColor("textColor", &textColor);
+            setTextColor(textColor, states);
+        }
+
+        if (properties->exists("textAlignment"))
+        {
+            setTextAlignment(Font::getJustify(properties->getString("textAlignment")), states);
+        }
+
+        if (properties->exists("rightToLeft"))
+        {
+            setTextRightToLeft(properties->getBool("rightToLeft"), states);
+        }
+
+        if (properties->exists("opacity"))
+        {
+            setOpacity(properties->getFloat("opacity"), states);
+        }
+    }
+
+    void Control::setImageList(Theme::ImageList* imageList, unsigned char states)
+    {
+        overrideStyle();
+        Theme::Style::Overlay* overlays[Theme::Style::OVERLAY_MAX] = { 0 };
+        getOverlays(states, overlays);
+
+        for (int i = 0; i < Theme::Style::OVERLAY_MAX - 1 && overlays[i]; ++i)
+        {
+            overlays[i]->setImageList(imageList);
+        }
+
+        _dirty = true;
+    }
+
+    void Control::setCursor(Theme::Image* cursor, unsigned char states)
+    {
+        overrideStyle();
+        Theme::Style::Overlay* overlays[Theme::Style::OVERLAY_MAX] = { 0 };
+        getOverlays(states, overlays);
+
+        for (int i = 0; i < Theme::Style::OVERLAY_MAX - 1 && overlays[i]; ++i)
+        {
+            overlays[i]->setCursor(cursor);
+        }
+
+        _dirty = true;
+    }
+
+    void Control::setSkin(Theme::Skin* skin, unsigned char states)
+    {
+        overrideStyle();
+        Theme::Style::Overlay* overlays[Theme::Style::OVERLAY_MAX] = { 0 };
+        getOverlays(states, overlays);
+
+        for (int i = 0; i < Theme::Style::OVERLAY_MAX - 1 && overlays[i]; ++i)
+        {
+            overlays[i]->setSkin(skin);
+        }
+
+        _dirty = true;
+    }
+
     Control::Alignment Control::getAlignment(const char* alignment)
     Control::Alignment Control::getAlignment(const char* alignment)
     {
     {
         if (!alignment)
         if (!alignment)

+ 9 - 0
gameplay/src/Control.h

@@ -23,6 +23,7 @@ class Control : public Ref, public AnimationTarget
     friend class Layout;
     friend class Layout;
     friend class AbsoluteLayout;
     friend class AbsoluteLayout;
     friend class VerticalLayout;
     friend class VerticalLayout;
+    friend class FlowLayout;
 
 
 public:
 public:
 
 
@@ -827,6 +828,14 @@ private:
     Theme::Style::Overlay* getOverlay(Control::State state) const;
     Theme::Style::Overlay* getOverlay(Control::State state) const;
 
 
     void overrideStyle();
     void overrideStyle();
+
+    void overrideThemedProperties(Properties* properties, unsigned char states);
+
+    void setImageList(Theme::ImageList* imageList, unsigned char states = STATE_ALL);
+
+    void setCursor(Theme::Image* cursor, unsigned char states = STATE_ALL);
+
+    void setSkin(Theme::Skin* skin, unsigned char states = STATE_ALL);
     
     
     void addSpecificListener(Control::Listener* listener, Listener::EventType eventType);
     void addSpecificListener(Control::Listener* listener, Listener::EventType eventType);
     
     

+ 10 - 10
gameplay/src/Font.cpp

@@ -2,7 +2,7 @@
 #include "Font.h"
 #include "Font.h"
 #include "Game.h"
 #include "Game.h"
 #include "FileSystem.h"
 #include "FileSystem.h"
-#include "Package.h"
+#include "Bundle.h"
 
 
 // Default font vertex shader
 // Default font vertex shader
 #define FONT_VSH \
 #define FONT_VSH \
@@ -78,9 +78,9 @@ Font* Font::create(const char* path, const char* id)
         }
         }
     }
     }
 
 
-    // Load the package.
-    Package* pkg = Package::create(path);
-    if (pkg == NULL)
+    // Load the bundle.
+    Bundle* bundle = Bundle::create(path);
+    if (bundle == NULL)
     {
     {
         return NULL;
         return NULL;
     }
     }
@@ -89,20 +89,20 @@ Font* Font::create(const char* path, const char* id)
 
 
     if (id == NULL)
     if (id == NULL)
     {
     {
-        // Get the ID of the first/only object in the package (assume it's a Font).
+        // Get the ID of the first/only object in the bundle (assume it's a Font).
         const char* id;
         const char* id;
-        if (pkg->getObjectCount() != 1 || (id = pkg->getObjectID(0)) == NULL)
+        if (bundle->getObjectCount() != 1 || (id = bundle->getObjectID(0)) == NULL)
         {
         {
             return NULL;
             return NULL;
         }
         }
 
 
-        // Load the font using the ID of the first object in the package.
-        font = pkg->loadFont(pkg->getObjectID(0));
+        // Load the font using the ID of the first object in the bundle.
+        font = bundle->loadFont(bundle->getObjectID(0));
     }
     }
     else
     else
     {
     {
         // Load the font with the given ID.
         // Load the font with the given ID.
-        font = pkg->loadFont(id);
+        font = bundle->loadFont(id);
     }
     }
 
 
     if (font)
     if (font)
@@ -111,7 +111,7 @@ Font* Font::create(const char* path, const char* id)
         __fontCache.push_back(font);
         __fontCache.push_back(font);
     }
     }
 
 
-    SAFE_RELEASE(pkg);
+    SAFE_RELEASE(bundle);
 
 
     return font;
     return font;
 }
 }

+ 6 - 6
gameplay/src/Font.h

@@ -11,7 +11,7 @@ namespace gameplay
  */
  */
 class Font : public Ref
 class Font : public Ref
 {
 {
-    friend class Package;
+    friend class Bundle;
     friend class TextBox;
     friend class TextBox;
 
 
 public:
 public:
@@ -77,17 +77,17 @@ public:
     };
     };
 
 
     /**
     /**
-     * Creates a font from the given package.
+     * Creates a font from the given bundle.
      *
      *
-     * If the 'id' parameter is NULL, it is assumed that the Package at 'path'
-     * contains exactly one Font resource. If the Package does not meet this criteria,
+     * If the 'id' parameter is NULL, it is assumed that the Bundle at 'path'
+     * contains exactly one Font resource. If the Bundle does not meet this criteria,
      * NULL is returned.
      * NULL is returned.
      *
      *
      * If a font for the given path has already been loaded, the existing font will be
      * If a font for the given path has already been loaded, the existing font will be
      * returned with its reference count increased.
      * returned with its reference count increased.
      *
      *
-     * @param path The path to a package file containing a font resource.
-     * @param id An optional ID of the font resource within the package (NULL for the first/only resource).
+     * @param path The path to a bundle file containing a font resource.
+     * @param id An optional ID of the font resource within the bundle (NULL for the first/only resource).
      * 
      * 
      * @return The specified font.
      * @return The specified font.
      */
      */

+ 27 - 29
gameplay/src/Form.h

@@ -26,35 +26,33 @@ 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 <formID>
-     * {
-     *      // 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    = <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.
-     *      alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
-     *      autoWidth   = <bool>                // Will result in a form the width of the display.
-     *      autoHeight  = <bool>                // Will result in a form the height of the display.
-     *      size        = <width, height>
-     *      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'
-     *   
-     *      // All the nested controls within this form.
-     *      container 
-     *      {
-     *          ...
-     *      }
-     *      label { }
-     *      textBox { }
-     *      button { }
-     *      checkBox { }
-     *      radioButton { }
-     *      slider { }
-     * }
-     *
+
+ @verbatim
+    form <formID>
+    {
+        // 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       = <styleID>             // A style from the referenced theme.
+        position   = <x, y>                // Position of the form on-screen, measured in pixels.
+        alignment  = <Control::Alignment>  // Note: 'position' will be ignored.
+        autoWidth  = <bool>                // Will result in a form the width of the display.
+        autoHeight = <bool>                // Will result in a form the height of the display.
+        size       = <width, height>       // Size of the form, measured in pixels.
+        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'
+      
+        // All the nested controls within this form.
+        container { }
+        label { }
+        textBox { }
+        button { }
+        checkBox { }
+        radioButton { }
+        slider { }
+    }
+ @endverbatim
+
      * @param path Path to the properties file to create a new form from.
      * @param path Path to the properties file to create a new form from.
      */
      */
     static Form* create(const char* path);
     static Form* create(const char* path);

+ 9 - 0
gameplay/src/FrameBuffer.h

@@ -8,6 +8,15 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
+/**
+ * Defines a video output off all graphics buffer containing a complete frame of data.
+ * This consists of a RenderTarget and DepthStencilTarget holding the color, depth and
+ * stencil data in the rendering frame. 
+ * 
+ * to change the default Game framebuffer call Game::setFrameBuffer(myFrameBuffer);
+ * To restore back to the default call Game::setFrameBuffer(NULL).
+ * This is useful for rendering shadows and other post-processing effects.
+ */
 class FrameBuffer : public Ref
 class FrameBuffer : public Ref
 {
 {
 public:
 public:

+ 2 - 2
gameplay/src/Joint.h

@@ -7,7 +7,7 @@ namespace gameplay
 {
 {
 
 
 class MeshSkin;
 class MeshSkin;
-class Package;
+class Bundle;
 
 
 /**
 /**
  * Defines a basic hierachial structure of transformation spaces.
  * Defines a basic hierachial structure of transformation spaces.
@@ -16,7 +16,7 @@ class Joint : public Node
 {
 {
     friend class Node;
     friend class Node;
     friend class MeshSkin;
     friend class MeshSkin;
-    friend class Package;
+    friend class Bundle;
 
 
 public:
 public:
 
 

+ 15 - 13
gameplay/src/Label.h

@@ -11,19 +11,21 @@ namespace gameplay
  * A label is the most basic type of control, capable only of rendering text within its border.
  * A label is the most basic type of control, capable only of rendering text within its border.
  *
  *
  * The following properties are available for labels:
  * The following properties are available for labels:
- *
- * label <labelID>
- * {
- *      style       = <styleID>
- *      alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
- *      position    = <x, y>
- *      autoWidth   = <bool>
- *      autoHeight  = <bool>
- *      size        = <width, height>
- *      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'
- *      text        = <string>
- * }
+
+ @verbatim
+    label <labelID>
+    {
+         style       = <styleID>
+         alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
+         position    = <x, y>
+         autoWidth   = <bool>
+         autoHeight  = <bool>
+         size        = <width, height>
+         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'
+         text        = <string>
+    }
+ @endverbatim
  */
  */
 class Label : public Control
 class Label : public Control
 {
 {

+ 5 - 5
gameplay/src/Mesh.h

@@ -21,7 +21,7 @@ class Model;
 class Mesh : public Ref
 class Mesh : public Ref
 {
 {
     friend class Model;
     friend class Model;
-    friend class Package;
+    friend class Bundle;
 
 
 public:
 public:
 
 
@@ -126,8 +126,8 @@ public:
     /**
     /**
      * Returns a URL from which the mesh was loaded from.
      * Returns a URL from which the mesh was loaded from.
      *
      *
-     * For meshes loaded from a Package, this URL will point
-     * to the file and ID of the mesh within the package. For
+     * For meshes loaded from a Bundle, this URL will point
+     * to the file and ID of the mesh within the bundle. For
      * all other meshes, an empty string will be returned.
      * all other meshes, an empty string will be returned.
      */
      */
     const char* getUrl() const;
     const char* getUrl() const;
@@ -230,7 +230,7 @@ public:
     /**
     /**
      * Returns the bounding box for the points in this mesh.
      * Returns the bounding box for the points in this mesh.
      * 
      * 
-     * Only meshes loaded from package files are imported with valid
+     * Only meshes loaded from bundle files are imported with valid
      * bounding volumes. Programmatically created meshes will contain
      * bounding volumes. Programmatically created meshes will contain
      * empty bounding volumes until the setBoundingBox and/or
      * empty bounding volumes until the setBoundingBox and/or
      * setBoundingSphere methods are called to specify the mesh's
      * setBoundingSphere methods are called to specify the mesh's
@@ -259,7 +259,7 @@ public:
     /**
     /**
      * Returns the bounding sphere for the points in the mesh.
      * Returns the bounding sphere for the points in the mesh.
      *
      *
-     * Only meshes loaded from package files are imported with valid
+     * Only meshes loaded from bundle files are imported with valid
      * bounding volumes. Programmatically created meshes will contain
      * bounding volumes. Programmatically created meshes will contain
      * empty bounding volumes until the setBoundingBox and/or
      * empty bounding volumes until the setBoundingBox and/or
      * setBoundingSphere methods are called to specify the mesh's
      * setBoundingSphere methods are called to specify the mesh's

+ 2 - 1
gameplay/src/MeshBatch.cpp

@@ -151,7 +151,7 @@ bool MeshBatch::resize(unsigned int capacity)
 
 
     return true;
     return true;
 }
 }
-
+    
 void MeshBatch::begin()
 void MeshBatch::begin()
 {
 {
     _vertexCount = 0;
     _vertexCount = 0;
@@ -193,5 +193,6 @@ void MeshBatch::draw()
         pass->unbind();
         pass->unbind();
     }
     }
 }
 }
+    
 
 
 }
 }

+ 3 - 0
gameplay/src/MeshBatch.h

@@ -7,6 +7,9 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
+/**
+ * Defines a class for rendering multiple mesh into a single draw call on the graphics device.
+ */
 class MeshBatch
 class MeshBatch
 {
 {
 public:
 public:

+ 6 - 6
gameplay/src/MeshBatch.inl

@@ -12,12 +12,12 @@ template <class T>
 void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indices, unsigned int indexCount)
 void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indices, unsigned int indexCount)
 {
 {
     assert(sizeof(T) == _vertexFormat.getVertexSize());
     assert(sizeof(T) == _vertexFormat.getVertexSize());
-
+    
     unsigned int newVertexCount = _vertexCount + vertexCount;
     unsigned int newVertexCount = _vertexCount + vertexCount;
     unsigned int newIndexCount = _indexCount + indexCount;
     unsigned int newIndexCount = _indexCount + indexCount;
     if (_primitiveType == Mesh::TRIANGLE_STRIP && _vertexCount > 0)
     if (_primitiveType == Mesh::TRIANGLE_STRIP && _vertexCount > 0)
         newIndexCount += 2; // need an extra 2 indices for connecting strips with degenerate triangles
         newIndexCount += 2; // need an extra 2 indices for connecting strips with degenerate triangles
-
+    
     // Do we need to grow the batch?
     // Do we need to grow the batch?
     while (newVertexCount > _vertexCapacity || (_indexed && newIndexCount > _indexCapacity))
     while (newVertexCount > _vertexCapacity || (_indexed && newIndexCount > _indexCapacity))
     {
     {
@@ -26,11 +26,11 @@ void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indic
         if (!resize(_capacity + _growSize))
         if (!resize(_capacity + _growSize))
             return; // failed to grow
             return; // failed to grow
     }
     }
-
+    
     // Copy vertex data
     // Copy vertex data
     unsigned int vBytes = vertexCount * _vertexFormat.getVertexSize();
     unsigned int vBytes = vertexCount * _vertexFormat.getVertexSize();
     memcpy(_verticesPtr, vertices, vBytes);
     memcpy(_verticesPtr, vertices, vBytes);
-
+    
     // Copy index data
     // Copy index data
     if (_indexed)
     if (_indexed)
     {
     {
@@ -49,7 +49,7 @@ void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indic
                 _indicesPtr[1] = _vertexCount;
                 _indicesPtr[1] = _vertexCount;
                 _indicesPtr += 2;
                 _indicesPtr += 2;
             }
             }
-
+            
             // Loop through all indices and insert them, their their value offset by
             // Loop through all indices and insert them, their their value offset by
             // 'vertexCount' so that they are relative to the first newly insertted vertex
             // 'vertexCount' so that they are relative to the first newly insertted vertex
             for (unsigned int i = 0; i < indexCount; ++i)
             for (unsigned int i = 0; i < indexCount; ++i)
@@ -60,7 +60,7 @@ void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indic
         _indicesPtr += indexCount;
         _indicesPtr += indexCount;
         _indexCount = newIndexCount;
         _indexCount = newIndexCount;
     }
     }
-
+    
     _verticesPtr += vBytes;
     _verticesPtr += vBytes;
     _vertexCount = newVertexCount;
     _vertexCount = newVertexCount;
 }
 }

+ 2 - 2
gameplay/src/MeshSkin.h

@@ -7,7 +7,7 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
-class Package;
+class Bundle;
 class Model;
 class Model;
 class Joint;
 class Joint;
 class Node;
 class Node;
@@ -17,7 +17,7 @@ class Node;
  */
  */
 class MeshSkin : public Transform::Listener
 class MeshSkin : public Transform::Listener
 {
 {
-    friend class Package;
+    friend class Bundle;
     friend class Model;
     friend class Model;
     friend class Joint;
     friend class Joint;
 
 

+ 2 - 2
gameplay/src/Model.h

@@ -8,7 +8,7 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
-class Package;
+class Bundle;
 class MeshSkin;
 class MeshSkin;
 class Node;
 class Node;
 class NodeCloneContext;
 class NodeCloneContext;
@@ -21,7 +21,7 @@ class Model : public Ref
 {
 {
     friend class Node;
     friend class Node;
     friend class Mesh;
     friend class Mesh;
-    friend class Package;
+    friend class Bundle;
 
 
 public:
 public:
 
 

+ 5 - 2
gameplay/src/Node.h

@@ -16,7 +16,7 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
-class Package;
+class Bundle;
 class Scene;
 class Scene;
 class Form;
 class Form;
 
 
@@ -26,7 +26,7 @@ class Form;
 class Node : public Transform, public Ref
 class Node : public Transform, public Ref
 {
 {
     friend class Scene;
     friend class Scene;
-    friend class Package;
+    friend class Bundle;
     friend class MeshSkin;
     friend class MeshSkin;
 
 
 public:
 public:
@@ -613,6 +613,9 @@ private:
 
 
 protected:
 protected:
 
 
+    /**
+     * Defines a pointer and cleanup callback to custom user data that can be store in a Node.
+     */
     struct UserData
     struct UserData
     {
     {
         UserData() : pointer(NULL), cleanupCallback(NULL) {}
         UserData() : pointer(NULL), cleanupCallback(NULL) {}

+ 4 - 4
gameplay/src/PhysicsController.cpp

@@ -5,7 +5,7 @@
 #include "PhysicsMotionState.h"
 #include "PhysicsMotionState.h"
 #include "Game.h"
 #include "Game.h"
 #include "MeshPart.h"
 #include "MeshPart.h"
-#include "Package.h"
+#include "Bundle.h"
 
 
 #include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
 #include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
 
 
@@ -927,7 +927,7 @@ PhysicsCollisionShape* PhysicsController::createMesh(Mesh* mesh, const Vector3&
         return NULL;
         return NULL;
     }
     }
 
 
-    // The mesh must have a valid URL (i.e. it must have been loaded from a Package)
+    // The mesh must have a valid URL (i.e. it must have been loaded from a Bundle)
     // in order to fetch mesh data for computing mesh rigid body.
     // in order to fetch mesh data for computing mesh rigid body.
     if (strlen(mesh->getUrl()) == 0)
     if (strlen(mesh->getUrl()) == 0)
     {
     {
@@ -935,7 +935,7 @@ PhysicsCollisionShape* PhysicsController::createMesh(Mesh* mesh, const Vector3&
         return NULL;
         return NULL;
     }
     }
 
 
-    Package::MeshData* data = Package::readMeshData(mesh->getUrl());
+    Bundle::MeshData* data = Bundle::readMeshData(mesh->getUrl());
     if (data == NULL)
     if (data == NULL)
     {
     {
         return NULL;
         return NULL;
@@ -968,7 +968,7 @@ PhysicsCollisionShape* PhysicsController::createMesh(Mesh* mesh, const Vector3&
     {
     {
         PHY_ScalarType indexType = PHY_UCHAR;
         PHY_ScalarType indexType = PHY_UCHAR;
         int indexStride = 0;
         int indexStride = 0;
-        Package::MeshPartData* meshPart = NULL;
+        Bundle::MeshPartData* meshPart = NULL;
         for (unsigned int i = 0; i < partCount; i++)
         for (unsigned int i = 0; i < partCount; i++)
         {
         {
             meshPart = data->parts[i];
             meshPart = data->parts[i];

+ 67 - 70
gameplay/src/Properties.h

@@ -22,48 +22,45 @@ namespace gameplay
  * Here's an example of a simple
  * Here's an example of a simple
  * file that uses all the available features of the markup language:
  * file that uses all the available features of the markup language:
  
  
-\verbatim
---- File Start: example.properties ---
+ @verbatim
+    // This is a comment.
  
  
-// This is a comment.
+    // This property is in the default namespace:
+    integerProperty = 5
  
  
-// This property is in the default namespace:
-integerProperty = 5
- 
-// This line defines a namespace of type "mynamespace" without an ID:
-mynamespace
-{
-    // This namespace can be retrieved by searching for its ID, "spriteTexture":
-    texture spriteTexture 
+    // This line defines a namespace of type "mynamespace" without an ID:
+    mynamespace
     {
     {
-        fileName = sprite.png
-        width = 64
-        height = 64
-    }
+        // This namespace can be retrieved by searching for its ID, "spriteTexture":
+        texture spriteTexture 
+        {
+            fileName = sprite.png
+            width = 64
+            height = 64
+        }
  
  
-    // This property is in the "space" namespace:
-    booleanProperty = true
+        // This property is in the "space" namespace:
+        booleanProperty = true
  
  
-    // It's legal to have a name without a value if you leave out the '=' character:
-    foo
+        // It's legal to have a name without a value if you leave out the '=' character:
+        foo
  
  
-    // In fact, the '=' character is optional if you'd rather write:
-    bar 23
+        // In fact, the '=' character is optional if you'd rather write:
+        bar 23
  
  
-    // But don't write this or you'll get an error:
-    // illegalProperty =
+        // But don't write this or you'll get an error:
+        // illegalProperty =
  
  
-    // Or this:
-    // = 15
+        // Or this:
+        // = 15
  
  
-    // Properties objects let you retrieve values as various types.
-    floatProperty = 3.333
-    stringProperty = This is a string.
-    vector3Property = 1.0, 5.0, 3.55
-    colorProperty = 1.0, 0.4, 0.0, 1.0
-}
---- File End ---
-\endverbatim
+        // Properties objects let you retrieve values as various types.
+        floatProperty = 3.333
+        stringProperty = This is a string.
+        vector3Property = 1.0, 5.0, 3.55
+        colorProperty = 1.0, 0.4, 0.0, 1.0
+    }
+ @endverbatim
  
  
  * Retrieving information out of a file like this could be done in two ways.  If the
  * Retrieving information out of a file like this could be done in two ways.  If the
  * available namespaces and name/value pairs are known in advance they can be queried by ID or name.
  * available namespaces and name/value pairs are known in advance they can be queried by ID or name.
@@ -72,54 +69,54 @@ mynamespace
  * A namespace is stored and retrieved as a Properties object.
  * A namespace is stored and retrieved as a Properties object.
  * Reading the spriteTexture properties out of the file above in this way could be done with the following code:
  * Reading the spriteTexture properties out of the file above in this way could be done with the following code:
  
  
-\verbatim
-// Create the top-level Properties object.
-Properties* properties = Properties::create("example.properties");
-// Retrieve the "spriteTexture" namespace.
-Properties* spriteTexture = properties->getNamespace("spriteTexture");
+ @verbatim
+    // Create the top-level Properties object.
+    Properties* properties = Properties::create("example.properties");
+    // Retrieve the "spriteTexture" namespace.
+    Properties* spriteTexture = properties->getNamespace("spriteTexture");
  
  
-// Get the values of known texture properties out of the namespace.
-const char* fileName = spriteTexture->getString("fileName");
-int width = spriteTexture->getInt("width");
-int height = spriteTexture->getInt("height");
+    // Get the values of known texture properties out of the namespace.
+    const char* fileName = spriteTexture->getString("fileName");
+    int width = spriteTexture->getInt("width");
+    int height = spriteTexture->getInt("height");
  
  
-// Deleting the top-level Properties object will clean up all nested namespaces.
-SAFE_DELETE(properties);
-\endverbatim
+    // Deleting the top-level Properties object will clean up all nested namespaces.
+    SAFE_DELETE(properties);
+ @endverbatim
 
 
  * On the other hand, if the structure of the file is not known in advance its 
  * On the other hand, if the structure of the file is not known in advance its 
  * namespaces and name/value pairs can be retrieved one by one using the getNextNamespace()
  * namespaces and name/value pairs can be retrieved one by one using the getNextNamespace()
  * and getNextProperty() methods.  The following method prints the contents of any properties file
  * and getNextProperty() methods.  The following method prints the contents of any properties file
  * to the console:
  * to the console:
  
  
-\verbatim
-void printProperties(Properties* properties)
-{
-    // Print the name and ID of the current namespace.
-    const char* spacename = properties->getNamespace();
-    const char* id = properties->getId();
-    WARN_VARG("Namespace: %s  ID: %s\n{", spacename, id);
- 
-    // Print all properties in this namespace.
-    const char* name = properties->getNextProperty();
-    const char* value = NULL;
-    while (name != NULL)
+ @verbatim
+    void printProperties(Properties* properties)
     {
     {
-        value = properties->getString(name);
-        WARN_VARG("%s = %s", name, value);
-        name = properties->getNextProperty();
-    }
-    WARN("}\n");
+        // Print the name and ID of the current namespace.
+        const char* spacename = properties->getNamespace();
+        const char* id = properties->getId();
+        WARN_VARG("Namespace: %s  ID: %s\n{", spacename, id);
  
  
-    // Print the properties of every namespace within this one.
-    Properties* space = properties->getNextNamespace();
-    while (space != NULL)
-    {
-        printProperties(space);
-        space = properties->getNextNamespace();
+        // Print all properties in this namespace.
+        const char* name = properties->getNextProperty();
+        const char* value = NULL;
+        while (name != NULL)
+        {
+            value = properties->getString(name);
+            WARN_VARG("%s = %s", name, value);
+            name = properties->getNextProperty();
+        }
+        WARN("}\n");
+ 
+        // Print the properties of every namespace within this one.
+        Properties* space = properties->getNextNamespace();
+        while (space != NULL)
+        {
+            printProperties(space);
+            space = properties->getNextNamespace();
+        }
     }
     }
-}
-\endverbatim
+ @endverbatim
 
 
  * Note that this method does not keep track of the namespace hierarchy, but could be
  * Note that this method does not keep track of the namespace hierarchy, but could be
  * modified to do so.  Also note that nothing in a properties file indicates the type
  * modified to do so.  Also note that nothing in a properties file indicates the type

+ 1 - 1
gameplay/src/Quaternion.h

@@ -16,7 +16,7 @@ class Matrix;
  * Quaternions are typically used as a replacement for euler angles and rotation matrices as a way to achieve smooth interpolation and avoid gimbal lock.
  * Quaternions are typically used as a replacement for euler angles and rotation matrices as a way to achieve smooth interpolation and avoid gimbal lock.
  *
  *
  * Note that this quaternion class does not automatically keep the quaternion normalized. Therefore, care must be taken to normalize the quaternion when neccessary, by calling the normalize method.
  * Note that this quaternion class does not automatically keep the quaternion normalized. Therefore, care must be taken to normalize the quaternion when neccessary, by calling the normalize method.
- * The package provides three methods for doing quaternion interpolation: lerp, slerp, and squad.
+ * This class provides three methods for doing quaternion interpolation: lerp, slerp, and squad.
  *
  *
  * lerp (linear interpolation): the interpolation curve gives a straight line in quaternion space. It is simple and fast to compute. The only problem is that it does not provide constant angular velocity. Note that a constant velocity is not necessarily a requirement for a curve;
  * lerp (linear interpolation): the interpolation curve gives a straight line in quaternion space. It is simple and fast to compute. The only problem is that it does not provide constant angular velocity. Note that a constant velocity is not necessarily a requirement for a curve;
  * slerp (spherical linear interpolation): the interpolation curve forms a great arc on the quaternion unit sphere. Slerp provides constant angular velocity;
  * slerp (spherical linear interpolation): the interpolation curve forms a great arc on the quaternion unit sphere. Slerp provides constant angular velocity;

+ 17 - 15
gameplay/src/RadioButton.h

@@ -15,21 +15,23 @@ namespace gameplay
  * from a group can be selected at one time.
  * from a group can be selected at one time.
  *
  *
  * The following properties are available for radio buttons:
  * The following properties are available for radio buttons:
- *
- * radioButton <RadioButton ID>
- * {
- *      style       = <Style ID>
- *      alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
- *      position    = <x, y>
- *      autoWidth   = <bool>
- *      autoHeight  = <bool>
- *      size        = <width, height>
- *      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'
- *      text        = <string>
- *      group       = <string>
- *      iconSize    = <width, height>   // The size to draw the radio button icon, if different from its size in the texture.
- * }
+
+ @verbatim
+    radioButton <RadioButton ID>
+    {
+         style       = <Style ID>
+         alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
+         position    = <x, y>
+         autoWidth   = <bool>
+         autoHeight  = <bool>
+         size        = <width, height>
+         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'
+         text        = <string>
+         group       = <string>
+         iconSize    = <width, height>   // The size to draw the radio button icon, if different from its size in the texture.
+    }
+ @endverbatim
  */
  */
 class RadioButton : public Button
 class RadioButton : public Button
 {
 {

+ 3 - 0
gameplay/src/RenderState.h

@@ -11,6 +11,9 @@ class Node;
 class NodeCloneContext;
 class NodeCloneContext;
 class Pass;
 class Pass;
 
 
+/**
+ * Defines the render state of the graphics device.
+ */
 class RenderState : public Ref
 class RenderState : public Ref
 {
 {
     friend class Game;
     friend class Game;

+ 4 - 0
gameplay/src/RenderTarget.h

@@ -7,6 +7,10 @@
 namespace gameplay
 namespace gameplay
 {
 {
 
 
+/**
+ * Represents a linear area of display memory and usually reside 
+ * in the display memory of the display card.
+ */
 class RenderTarget : public Ref
 class RenderTarget : public Ref
 {
 {
 public:
 public:

+ 16 - 16
gameplay/src/SceneLoader.cpp

@@ -1,6 +1,6 @@
 #include "Base.h"
 #include "Base.h"
 #include "Game.h"
 #include "Game.h"
-#include "Package.h"
+#include "Bundle.h"
 #include "SceneLoader.h"
 #include "SceneLoader.h"
 
 
 namespace gameplay
 namespace gameplay
@@ -438,15 +438,15 @@ void SceneLoader::applyNodeUrls(Scene* scene)
             {
             {
                 // An external file was referenced, so load the node from file and then insert it into the scene with the new ID.
                 // An external file was referenced, so load the node from file and then insert it into the scene with the new ID.
 
 
-                // TODO: Revisit this to determine if we should cache Package objects for the duration of the scene
-                // load to prevent constantly creating/destroying the same externally referenced packages each time
+                // TODO: Revisit this to determine if we should cache Bundle objects for the duration of the scene
+                // load to prevent constantly creating/destroying the same externally referenced bundles each time
                 // a url with a file is encountered.
                 // a url with a file is encountered.
-                Package* tmpPackage = Package::create(snp._file.c_str());
-                if (tmpPackage)
+                Bundle* tmpBundle = Bundle::create(snp._file.c_str());
+                if (tmpBundle)
                 {
                 {
                     if (sceneNode._exactMatch)
                     if (sceneNode._exactMatch)
                     {
                     {
-                        Node* node = tmpPackage->loadNode(snp._id.c_str());
+                        Node* node = tmpBundle->loadNode(snp._id.c_str());
                         if (node)
                         if (node)
                         {
                         {
                             node->setId(sceneNode._nodeID);
                             node->setId(sceneNode._nodeID);
@@ -460,18 +460,18 @@ void SceneLoader::applyNodeUrls(Scene* scene)
                     }
                     }
                     else
                     else
                     {
                     {
-                        // Search for nodes in the package using a partial match
+                        // Search for nodes in the bundle using a partial match
                         std::string partialMatch = snp._id;
                         std::string partialMatch = snp._id;
-                        unsigned int objectCount = tmpPackage->getObjectCount();
+                        unsigned int objectCount = tmpBundle->getObjectCount();
                         unsigned int matchCount = 0;
                         unsigned int matchCount = 0;
                         for (unsigned int k = 0; k < objectCount; ++k)
                         for (unsigned int k = 0; k < objectCount; ++k)
                         {
                         {
-                            const char* objid = tmpPackage->getObjectID(k);
+                            const char* objid = tmpBundle->getObjectID(k);
                             if (strstr(objid, snp._id.c_str()) == objid)
                             if (strstr(objid, snp._id.c_str()) == objid)
                             {
                             {
                                 // This object ID matches (starts with).
                                 // This object ID matches (starts with).
                                 // Try to load this object as a Node.
                                 // Try to load this object as a Node.
-                                Node* node = tmpPackage->loadNode(objid);
+                                Node* node = tmpBundle->loadNode(objid);
                                 if (node)
                                 if (node)
                                 {
                                 {
                                     // Construct a new node ID using _nodeID plus the remainder of the partial match.
                                     // Construct a new node ID using _nodeID plus the remainder of the partial match.
@@ -490,7 +490,7 @@ void SceneLoader::applyNodeUrls(Scene* scene)
                         }
                         }
                     }
                     }
 
 
-                    SAFE_RELEASE(tmpPackage);
+                    SAFE_RELEASE(tmpBundle);
                 }
                 }
                 else
                 else
                 {
                 {
@@ -755,19 +755,19 @@ PhysicsConstraint* SceneLoader::loadHingeConstraint(const Properties* constraint
 Scene* SceneLoader::loadMainSceneData(const Properties* sceneProperties)
 Scene* SceneLoader::loadMainSceneData(const Properties* sceneProperties)
 {
 {
     // Load the main scene from the specified path.
     // Load the main scene from the specified path.
-    Package* package = Package::create(_path.c_str());
-    if (!package)
+    Bundle* bundle = Bundle::create(_path.c_str());
+    if (!bundle)
     {
     {
         WARN_VARG("Failed to load scene GPB file '%s'.", _path.c_str());
         WARN_VARG("Failed to load scene GPB file '%s'.", _path.c_str());
         return NULL;
         return NULL;
     }
     }
 
 
     const char* sceneID = strlen(sceneProperties->getId()) == 0 ? NULL : sceneProperties->getId();
     const char* sceneID = strlen(sceneProperties->getId()) == 0 ? NULL : sceneProperties->getId();
-    Scene* scene = package->loadScene(sceneID);
+    Scene* scene = bundle->loadScene(sceneID);
     if (!scene)
     if (!scene)
     {
     {
         WARN_VARG("Failed to load scene from '%s'.", _path.c_str());
         WARN_VARG("Failed to load scene from '%s'.", _path.c_str());
-        SAFE_RELEASE(package);
+        SAFE_RELEASE(bundle);
         return NULL;
         return NULL;
     }
     }
 
 
@@ -780,7 +780,7 @@ Scene* SceneLoader::loadMainSceneData(const Properties* sceneProperties)
             scene->setActiveCamera(camera->getCamera());
             scene->setActiveCamera(camera->getCamera());
     }
     }
 
 
-    SAFE_RELEASE(package);
+    SAFE_RELEASE(bundle);
     return scene;
     return scene;
 }
 }
 
 

+ 17 - 16
gameplay/src/Slider.h

@@ -11,22 +11,23 @@ namespace gameplay
 {
 {
 
 
 /**
 /**
- *  A slider consists of a marker that can slide along a track between two end-caps.
- *  The following properties are available for sliders:
- *
- *  slider
- *  {
- *      style       = <styleID>                 // A Style from the Theme.
- *      position    = <x, y>                    // Position of the Control on-screen, measured in pixels.
- *      size        = <width, height>           // Size of the Control, measured in pixels.
- *      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.
- *      value       = <float>                   // The default position of the marker.
- *      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).
- *
-*      // TODO: orientation = <HORIZONTAL or VERTICAL>  // Determines whether a slider is stretched along its width or its height
- *  }
+ * A slider consists of a marker that can slide along a track between two end-caps.
+ * The following properties are available for sliders:
+
+ @verbatim
+    slider
+    {
+        style       = <styleID>                 // A Style from the Theme.
+        position    = <x, y>                    // Position of the Control on-screen, measured in pixels.
+        size        = <width, height>           // Size of the Control, measured in pixels.
+        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.
+        value       = <float>                   // The default position of the marker.
+        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).
+        // TODO: orientation = <HORIZONTAL or VERTICAL>  // Determines whether a slider is stretched along its width or its height
+    }
+ @endverbatim
  */
  */
 class Slider : public Label
 class Slider : public Label
 {
 {

+ 1 - 1
gameplay/src/SpriteBatch.h

@@ -24,7 +24,7 @@ namespace gameplay
  */
  */
 class SpriteBatch
 class SpriteBatch
 {
 {
-    friend class Package;
+    friend class Bundle;
 
 
 public:
 public:
 
 

+ 15 - 13
gameplay/src/TextBox.h

@@ -17,19 +17,21 @@ namespace gameplay
  * for the last keypress it received.
  * for the last keypress it received.
  *
  *
  * The following properties are available for text boxes:
  * The following properties are available for text boxes:
- *
- * label <labelID>
- * {
- *      style       = <styleID>
- *      alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
- *      position    = <x, y>
- *      autoWidth   = <bool>
- *      autoHeight  = <bool>
- *      size        = <width, height>
- *      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'
- *      text        = <string>
- * }
+
+ @verbatim
+    label <labelID>
+    {
+         style       = <styleID>
+         alignment   = <Control::Alignment constant> // Note: 'position' will be ignored.
+         position    = <x, y>
+         autoWidth   = <bool>
+         autoHeight  = <bool>
+         size        = <width, height>
+         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'
+         text        = <string>
+    }
+ @endverbatim
  */
  */
 class TextBox : public Label
 class TextBox : public Label
 {
 {

+ 1 - 1
gameplay/src/Theme.cpp

@@ -394,7 +394,7 @@ namespace gameplay
                     disabled->addRef();
                     disabled->addRef();
                 }
                 }
 
 
-                Theme::Style* s = new Theme::Style(space->getId(), tw, th, margin, padding, normal, focus, active, disabled);
+                Theme::Style* s = new Theme::Style(theme, space->getId(), tw, th, margin, padding, normal, focus, active, disabled);
                 theme->_styles.push_back(s);
                 theme->_styles.push_back(s);
             }
             }
 
 

+ 109 - 107
gameplay/src/Theme.h

@@ -21,113 +21,115 @@ namespace gameplay
  * are associated with a Control, and Font properties to apply to a Control's text.
  * are associated with a Control, and Font properties to apply to a Control's text.
  *
  *
  * Below is an explanation of the properties that can be set within themes:
  * Below is an explanation of the properties that can be set within themes:
- *
- * theme
- * {
- *     texture = <Path to texture>
- * 
- *     // Describes a single image, to be used as a cursor.
- *     cursor <Cursor ID>
- *     {
- *         region = <x, y, width, height>
- *         color = <#ffffffff>
- *     }
- * 
- *     // Describes all the images used by a control for one or more states.
- *     imageList <ImageList ID>
- *     {
- *         image checked
- *         {
- *             region = <x, y, width, height>
- *         }
- * 
- *         image unchecked
- *         {
- *             region = <x, y, width, height>
- *             color = <#fffffffff>            // Optionally override image-list color.
- *         }
- * 
- *         color = <#fffffffff>    // Default blend color for images that don't specify their own.
- *     }
- *     
- *     // Defines the border and background of a Control.
- *     skin <Skin ID>
- *     {
- *         // The corners and edges of the given region will be used as border sprites.
- *         border
- *         {
- *             top     =   <int>   // Height of top border, top corners.
- *             bottom  =   <int>   // Height of bottom border, bottom corners.
- *             left    =   <int>   // Width of left border, left corners.
- *             right   =   <int>   // Width of right border, right corners.
- *         }
- *         
- *         region  =   <x, y, width, height>   // Total container region including entire border.
- *         color   =   <#ffffffff>             // Tint to apply to skin.
- *     }
- *     
- *     style <Style ID>
- *     {
- *         // Layouts may make use of a style's margin to put space between adjacent controls.
- *         margin
- *         {
- *             top     =   <int>
- *             bottom  =   <int>
- *             left    =   <int>
- *             right   =   <int>        
- *         }
- *         
- *         // Padding is the space between a control's border and its content.
- *         padding
- *         {
- *             top     =   <int>
- *             bottom  =   <int>
- *             left    =   <int>
- *             right   =   <int>        
- *         }
- *         
- *         // Properties used when in control is in the normal state.
- *         stateNormal
- *         {
- *             skin   =   <Skin ID>             // Skin to use for border and background sprites.
- *             imageList = <ImageList ID>
- * 
- *             cursor      =   <Cursor ID>                 // Cursor to use when the mouse is over this control.
- *             font        =   <Path to font>              // Font to use for rendering text.
- *             fontSize    =   <int>                       // Size of text.
- *             textColor   =   <#ffffffff>                 // Color of text.
- *             alignment   =   <Text alignment constant>   // Member of Font::Justify enum.
- *             rightToLeft =   <bool>                      // Whether to draw text from right to left.
- *             opacity     =   <float>                     // Opacity to apply to all text/border/icon colors.
- *         }
- *         
- *         // Properties used when in control is in the focus state
- *         // If not specified, the 'normal' overlay will be used.
- *         stateFocus
- *         {
- *             skin   =   <Skin ID>             // Skin to use for border and background sprites.
- *             ...
- *         }
- *         
- *         // Properties used when in control is in the focus. 
- *         // This is when a touch/mouse is down within the control.
- *         // If not specified, the 'normal' overlay will be used.
- *         stateActive
- *         {
- *             skin   =   <Skin ID>             // Skin to use for border and background sprites.
- *             ...
- *         }
- * 
- *         // Properties used when in control is in the focus. 
- *         // This is when a touch/mouse is down within the control.
- *         // If not specified, the 'normal' overlay will be used.
- *         state-disabled
- *         {
- *             skin   =   <Skin ID>             // Skin to use for border and background sprites.
- *             ...        
- *         }
- *     }
- * }
+
+@verbatim
+    theme
+    {
+        texture = <Path to texture>
+
+        // Describes a single image, to be used as a cursor.
+        cursor <Cursor ID>
+        {
+            region = <x, y, width, height>
+            color = <#ffffffff>
+        }
+
+        // Describes all the images used by a control for one or more states.
+        imageList <ImageList ID>
+        {
+            image checked
+            {
+                region = <x, y, width, height>
+            }
+
+            image unchecked
+            {
+                region = <x, y, width, height>
+                color = <#fffffffff>            // Optionally override image-list color.
+            }
+
+            color = <#fffffffff>    // Default blend color for images that don't specify their own.
+        }
+    
+        // Defines the border and background of a Control.
+        skin <Skin ID>
+        {
+            // The corners and edges of the given region will be used as border sprites.
+            border
+            {
+                top     =   <int>   // Height of top border, top corners.
+                bottom  =   <int>   // Height of bottom border, bottom corners.
+                left    =   <int>   // Width of left border, left corners.
+                right   =   <int>   // Width of right border, right corners.
+            }
+        
+            region  =   <x, y, width, height>   // Total container region including entire border.
+            color   =   <#ffffffff>             // Tint to apply to skin.
+        }
+    
+        style <Style ID>
+        {
+            // Layouts may make use of a style's margin to put space between adjacent controls.
+            margin
+            {
+                top     =   <int>
+                bottom  =   <int>
+                left    =   <int>
+                right   =   <int>        
+            }
+        
+            // Padding is the space between a control's border and its content.
+            padding
+            {
+                top     =   <int>
+                bottom  =   <int>
+                left    =   <int>
+                right   =   <int>        
+            }
+        
+            // Properties used when in control is in the normal state.
+            stateNormal
+            {
+                skin   =   <Skin ID>             // Skin to use for border and background sprites.
+                imageList = <ImageList ID>
+
+                cursor      =   <Cursor ID>                 // Cursor to use when the mouse is over this control.
+                font        =   <Path to font>              // Font to use for rendering text.
+                fontSize    =   <int>                       // Size of text.
+                textColor   =   <#ffffffff>                 // Color of text.
+                alignment   =   <Text alignment constant>   // Member of Font::Justify enum.
+                rightToLeft =   <bool>                      // Whether to draw text from right to left.
+                opacity     =   <float>                     // Opacity to apply to all text/border/icon colors.
+            }
+        
+            // Properties used when in control is in the focus state
+            // If not specified, the 'normal' overlay will be used.
+            stateFocus
+            {
+                skin   =   <Skin ID>             // Skin to use for border and background sprites.
+                ...
+            }
+        
+            // Properties used when in control is in the focus. 
+            // This is when a touch/mouse is down within the control.
+            // If not specified, the 'normal' overlay will be used.
+            stateActive
+            {
+                skin   =   <Skin ID>             // Skin to use for border and background sprites.
+                ...
+            }
+
+            // Properties used when in control is in the focus. 
+            // This is when a touch/mouse is down within the control.
+            // If not specified, the 'normal' overlay will be used.
+            state-disabled
+            {
+                skin   =   <Skin ID>             // Skin to use for border and background sprites.
+                ...        
+            }
+        }
+    }
+@endverbatim
  *
  *
  */
  */
 class Theme: public Ref
 class Theme: public Ref

+ 4 - 4
gameplay/src/ThemeStyle.cpp

@@ -6,10 +6,10 @@ namespace gameplay
 /****************
 /****************
  * Theme::Style *
  * Theme::Style *
  ****************/
  ****************/
-Theme::Style::Style(const char* id, float tw, float th,
+Theme::Style::Style(Theme* theme, const char* id, float tw, float th,
         const Theme::Margin& margin, const Theme::Padding& padding,
         const Theme::Margin& margin, const Theme::Padding& padding,
         Theme::Style::Overlay* normal, Theme::Style::Overlay* focus, Theme::Style::Overlay* active, Theme::Style::Overlay* disabled)
         Theme::Style::Overlay* normal, Theme::Style::Overlay* focus, Theme::Style::Overlay* active, Theme::Style::Overlay* disabled)
-    : _id(id), _tw(tw), _th(th), _margin(margin), _padding(padding)
+    : _theme(theme), _id(id), _tw(tw), _th(th), _margin(margin), _padding(padding)
 {
 {
     _overlays[OVERLAY_NORMAL] = normal;
     _overlays[OVERLAY_NORMAL] = normal;
     _overlays[OVERLAY_FOCUS] = focus;
     _overlays[OVERLAY_FOCUS] = focus;
@@ -76,8 +76,8 @@ const Theme::Padding& Theme::Style::getPadding() const
 }
 }
     
     
 /*************************
 /*************************
-    * Theme::Style::Overlay *
-    *************************/
+ * Theme::Style::Overlay *
+ *************************/
 Theme::Style::Overlay* Theme::Style::Overlay::create()
 Theme::Style::Overlay* Theme::Style::Overlay::create()
 {
 {
     Overlay* overlay = new Overlay();
     Overlay* overlay = new Overlay();

+ 3 - 2
gameplay/src/ThemeStyle.h

@@ -162,7 +162,7 @@ private:
     /**
     /**
      * Constructor.
      * Constructor.
      */
      */
-    Style(const char* id, float tw, float th,
+    Style(Theme* theme, const char* id, float tw, float th,
           const Theme::Margin& margin, const Theme::Padding& padding,
           const Theme::Margin& margin, const Theme::Padding& padding,
           Overlay* normal, Overlay* focus, Overlay* active, Overlay* disabled);
           Overlay* normal, Overlay* focus, Overlay* active, Overlay* disabled);
 
 
@@ -209,7 +209,8 @@ private:
      * The margin is used by Layouts other than AbsoluteLayout to put space between Controls.
      * The margin is used by Layouts other than AbsoluteLayout to put space between Controls.
      */
      */
     void setMargin(float top, float bottom, float left, float right);
     void setMargin(float top, float bottom, float left, float right);
-        
+    
+    Theme* _theme;
     std::string _id;
     std::string _id;
     float _tw;
     float _tw;
     float _th;
     float _th;

+ 1 - 1
gameplay/src/gameplay.h

@@ -6,7 +6,7 @@
 #include "Touch.h"
 #include "Touch.h"
 #include "Mouse.h"
 #include "Mouse.h"
 #include "FileSystem.h"
 #include "FileSystem.h"
-#include "Package.h"
+#include "Bundle.h"
 
 
 // Math
 // Math
 #include "Rectangle.h"
 #include "Rectangle.h"