2
0
Эх сурвалжийг харах

Merge branch 'next' of https://github.com/gameplay3d/GamePlay into next

Conflicts:
	gameplay/android/jni/Android.mk
	gameplay/gameplay.vcxproj
	gameplay/gameplay.xcodeproj/project.pbxproj
	gameplay/src/lua/lua_Global.cpp
	gameplay/src/lua/lua_Global.h
	gameplay/src/lua/lua_ParticleEmitter.cpp
	samples/lua/game.config
	samples/lua/res/ai.lua
	samples/lua/res/game.lua
	samples/lua/res/lua.scene
	samples/lua/sample-lua.vcxproj
	samples/lua/sample-lua.vcxproj.filters
	samples/lua/src/LuaGame.cpp
sgrenier 11 жил өмнө
parent
commit
233ba952e5
100 өөрчлөгдсөн 805 нэмэгдсэн , 628 устгасан
  1. 1 82
      .gitignore
  2. 9 3
      CHANGES.md
  3. 16 15
      README.md
  4. 4 4
      api/header.html
  5. 1 34
      gameplay.sln
  6. 0 9
      gameplay.xcworkspace/contents.xcworkspacedata
  7. 2 2
      gameplay/CMakeLists.txt
  8. 7 8
      gameplay/android/jni/Android.mk
  9. 1 1
      gameplay/android/jni/Application.mk
  10. 1 1
      gameplay/gameplay.pro
  11. BIN
      gameplay/res/icon_tray.png
  12. 13 0
      gameplay/res/shaders/terrain.frag
  13. 1 1
      gameplay/src/Animation.h
  14. 1 1
      gameplay/src/AudioSource.h
  15. 1 1
      gameplay/src/Button.h
  16. 1 1
      gameplay/src/CheckBox.h
  17. 1 1
      gameplay/src/Container.h
  18. 1 1
      gameplay/src/Control.h
  19. 2 2
      gameplay/src/Effect.cpp
  20. 34 8
      gameplay/src/FileSystem.cpp
  21. 17 0
      gameplay/src/FileSystem.h
  22. 1 1
      gameplay/src/Form.cpp
  23. 1 1
      gameplay/src/Form.h
  24. 1 1
      gameplay/src/Game.h
  25. 1 1
      gameplay/src/Image.cpp
  26. 1 1
      gameplay/src/ImageControl.h
  27. 1 1
      gameplay/src/JoystickControl.h
  28. 1 1
      gameplay/src/Label.h
  29. 1 1
      gameplay/src/Layout.h
  30. 1 1
      gameplay/src/Material.h
  31. 10 10
      gameplay/src/Node.cpp
  32. 12 12
      gameplay/src/Node.h
  33. 31 27
      gameplay/src/ParticleEmitter.cpp
  34. 19 19
      gameplay/src/ParticleEmitter.h
  35. 1 1
      gameplay/src/PhysicsCharacter.h
  36. 1 1
      gameplay/src/PhysicsCollisionObject.h
  37. 1 1
      gameplay/src/PhysicsConstraint.h
  38. 1 1
      gameplay/src/PhysicsController.h
  39. 1 1
      gameplay/src/PhysicsFixedConstraint.h
  40. 1 1
      gameplay/src/PhysicsGenericConstraint.h
  41. 1 1
      gameplay/src/PhysicsGhostObject.h
  42. 1 1
      gameplay/src/PhysicsHingeConstraint.h
  43. 1 1
      gameplay/src/PhysicsRigidBody.h
  44. 1 1
      gameplay/src/PhysicsSocketConstraint.h
  45. 1 1
      gameplay/src/PhysicsSpringConstraint.h
  46. 1 1
      gameplay/src/PhysicsVehicle.h
  47. 1 1
      gameplay/src/PhysicsVehicleWheel.h
  48. 6 5
      gameplay/src/PlatformAndroid.cpp
  49. 1 1
      gameplay/src/PlatformMacOSX.mm
  50. 1 1
      gameplay/src/RadioButton.h
  51. 1 1
      gameplay/src/Scene.cpp
  52. 1 1
      gameplay/src/Scene.h
  53. 1 1
      gameplay/src/Slider.h
  54. 1 1
      gameplay/src/Terrain.h
  55. 1 1
      gameplay/src/TextBox.h
  56. 1 1
      gameplay/src/Theme.h
  57. 124 1
      gameplay/src/lua/lua_Global.cpp
  58. 56 0
      gameplay/src/lua/lua_Global.h
  59. 45 45
      gameplay/src/lua/lua_Joint.cpp
  60. 3 3
      gameplay/src/lua/lua_Joint.h
  61. 45 45
      gameplay/src/lua/lua_Node.cpp
  62. 3 3
      gameplay/src/lua/lua_Node.h
  63. 40 12
      gameplay/src/lua/lua_ParticleEmitter.cpp
  64. 3 3
      gameplay/src/lua/lua_ParticleEmitter.h
  65. 41 0
      gameplay/src/lua/lua_ParticleEmitterBlendMode.cpp
  66. 15 0
      gameplay/src/lua/lua_ParticleEmitterBlendMode.h
  67. 3 3
      gameplay/src/org/gameplay3d/GamePlayNativeActivity.java
  68. 3 3
      install.bat
  69. 1 1
      install.sh
  70. 0 3
      samples/CMakeLists.txt
  71. 4 55
      samples/browser/CMakeLists.txt
  72. 1 1
      samples/browser/android/AndroidManifest.xml
  73. 9 8
      samples/browser/android/jni/Android.mk
  74. 1 1
      samples/browser/android/jni/Application.mk
  75. BIN
      samples/browser/android/res/drawable/icon.png
  76. BIN
      samples/browser/icon.png
  77. 2 1
      samples/browser/res/common/inputs.form
  78. 47 54
      samples/browser/res/common/particles/editor.form
  79. 0 0
      samples/browser/res/common/particles/editor.png
  80. 0 0
      samples/browser/res/common/particles/editor.theme
  81. 0 0
      samples/browser/res/common/particles/explosion.particle
  82. 0 0
      samples/browser/res/common/particles/explosion.png
  83. 0 0
      samples/browser/res/common/particles/fire.particle
  84. 0 0
      samples/browser/res/common/particles/fire.png
  85. 0 0
      samples/browser/res/common/particles/grid.material
  86. 0 0
      samples/browser/res/common/particles/smoke.particle
  87. 0 0
      samples/browser/res/common/particles/smoke.png
  88. 2 0
      samples/browser/sample-browser.pro
  89. 19 0
      samples/browser/sample-browser.vcxproj
  90. 8 0
      samples/browser/sample-browser.xcodeproj/project.pbxproj
  91. 1 1
      samples/browser/src/Audio3DSample.cpp
  92. 1 1
      samples/browser/src/BillboardSample.cpp
  93. 1 1
      samples/browser/src/CreateSceneSample.cpp
  94. 1 1
      samples/browser/src/FormsSample.cpp
  95. 1 1
      samples/browser/src/InputSample.cpp
  96. 1 1
      samples/browser/src/LightSample.cpp
  97. 1 1
      samples/browser/src/LoadSceneSample.cpp
  98. 85 83
      samples/browser/src/ParticlesSample.cpp
  99. 13 15
      samples/browser/src/ParticlesSample.h
  100. 3 3
      samples/browser/src/SamplesGame.cpp

+ 1 - 82
.gitignore

@@ -124,88 +124,6 @@ gameplay.xcworkspace/xcshareddata/gameplay.xccheckout
 /samples/character/res/gamepad.xcf
 /samples/character/sample-character.xcodeproj/xcuserdata
 
-/samples/lua/Debug
-/samples/lua/DebugMem
-/samples/lua/Release
-/samples/lua/Simulator
-/samples/lua/Simulator-Coverage
-/samples/lua/Simulator-Profile
-/samples/lua/Device-Debug
-/samples/lua/Device-Coverage
-/samples/lua/Device-Profile
-/samples/lua/Device-Release
-/samples/lua/res/shaders
-/samples/lua/res/ui
-/samples/lua/res/logo_powered_white.png
-/samples/lua/src/org
-/samples/lua/android/src
-/samples/lua/android/assets
-/samples/lua/android/bin
-/samples/lua/android/gen
-/samples/lua/android/libs
-/samples/lua/android/obj
-/samples/lua/android/NUL
-/samples/lua/android/local.properties
-/samples/lua/android/proguard-project.txt
-/samples/lua/android/proguard.cfg
-/samples/lua/android/src/org/gameplay3d
-/samples/lua/sample-lua.xcodeproj/xcuserdata
-
-/samples/mesh/Debug
-/samples/mesh/DebugMem
-/samples/mesh/Release
-/samples/mesh/Simulator
-/samples/mesh/Simulator-Coverage
-/samples/mesh/Simulator-Profile
-/samples/mesh/Device-Debug
-/samples/mesh/Device-Coverage
-/samples/mesh/Device-Profile
-/samples/mesh/Device-Release
-/samples/mesh/res/shaders
-/samples/mesh/res/ui
-/samples/mesh/res/logo_powered_white.png
-/samples/mesh/src/org
-/samples/mesh/android/src
-/samples/mesh/android/assets
-/samples/mesh/android/bin
-/samples/mesh/android/gen
-/samples/mesh/android/libs
-/samples/mesh/android/obj
-/samples/mesh/android/NUL
-/samples/mesh/android/local.properties
-/samples/mesh/android/proguard-project.txt
-/samples/mesh/android/proguard.cfg
-/samples/mesh/sample-mesh.xcodeproj/xcuserdata
-
-/samples/particles/Debug
-/samples/particles/DebugMem
-/samples/particles/Release
-/samples/particles/Simulator
-/samples/particles/Simulator-Coverage
-/samples/particles/Simulator-Profile
-/samples/particles/Device-Debug
-/samples/particles/Device-Coverage
-/samples/particles/Device-Profile
-/samples/particles/Device-Release
-/samples/particles/res/shaders
-/samples/particles/res/ui
-/samples/particles/res/logo_powered_white.png
-/samples/particles/Device-Debug
-/samples/particles/Debug
-/samples/particles/DebugMem
-/samples/particles/src/org
-/samples/particles/android/src
-/samples/particles/android/assets
-/samples/particles/android/bin
-/samples/particles/android/gen
-/samples/particles/android/libs
-/samples/particles/android/obj
-/samples/particles/android/NUL
-/samples/particles/android/local.properties
-/samples/particles/android/proguard-project.txt
-/samples/particles/android/proguard.cfg
-/samples/particles/sample-particles.xcodeproj/xcuserdata
-
 /samples/racer/Debug
 /samples/racer/DebugMem
 /samples/racer/Release
@@ -263,3 +181,4 @@ gameplay.xcworkspace/xcshareddata/gameplay.xccheckout
 
 /tools/encoder/windows
 /tools/luagen/windows
+/tools/encoder/gameplay-encoder.xcodeproj/project.xcworkspace/

+ 9 - 3
CHANGES.md

@@ -1,15 +1,21 @@
 ## v3.0.0
 
 - Adds support for MacOSX 64-bit.
-- Adds support for iOS 8
-- Adds support for XCode 6
+- Adds support for iOS 8+.
+- Adds support for XCode 6+.
+- Adds support for QTCreator 3.2+ for Linux.
 - Adds support for Eclipse for Linux.
 - Adds support for Eclipse for Android.
 - Adds updates to FBX SDK 2015.1
 - Adds support for Bullet Physics 2.82
-- Adds gameplay-encoder support for Visual Studio 2013.
 - Adds support for C++11.
+- Adds support for cubemap textures.
 - Adds support for font kerning.
+- Adds support for Android x86.
+- Adds support for gamepads on Android.
+- Adds supoprt for Android extensions through new custom native activity
+- Adds new WaterSample to sample browser.
+- Fixes Image to support grayscale PNGs.
 - Fixes Android to build with arm instead of thumb.
 
 

+ 16 - 15
README.md

@@ -2,35 +2,36 @@
 
 GamePlay3D is an open-source, cross-platform 3D native C++ game framework making it easy to learn and write mobile and desktop games. 
 
-<img align="right" src="https://raw.github.com/wiki/blackberry/GamePlay/img/logo.png" alt="gameplay3d" />
+<img align="right" src="https://raw.github.com/wiki/gameplay3d/GamePlay/img/logo.png" alt="gameplay3d" />
 
 - [Website](http://www.gameplay3d.org/)
 - [Forums](http://www.gameplay3d.org/forums/)
-- [Wiki](https://github.com/blackberry/GamePlay/wiki)
-- [API Reference](http://blackberry.github.io/GamePlay/api/index.html)
-- [Development Guide](https://github.com/blackberry/GamePlay/wiki#wiki-Development_Guide)
+- [Wiki](https://github.com/gameplay3d/GamePlay/wiki)
+- [API Reference](http://gameplay3d.github.io/GamePlay/api/index.html)
+- [Development Guide](https://github.com/gameplay3d/GamePlay/wiki#wiki-Development_Guide)
 
 ## Supported Platforms
-- [Microsoft Windows](https://github.com/blackberry/GamePlay/wiki/Visual-Studio-Setup) (using Microsoft Visual Studio)
-- [Apple MacOS X](https://github.com/blackberry/GamePlay/wiki/Apple-Xcode-Setup) (using Apple XCode)
-- [Linux](https://github.com/blackberry/GamePlay/wiki/Linux-Setup) (using CMake)
-- [Apple iOS](https://github.com/blackberry/GamePlay/wiki/Apple-Xcode-Setup) (using Apple XCode)
-- [Google Android](https://github.com/blackberry/GamePlay/wiki/Android-NDK-Setup) (using Google Android NDK)
-- [BlackBerry](https://github.com/blackberry/GamePlay/wiki/BlackBerry-Setup) (using BlackBerry Native SDK)
+- [Windows](https://github.com/gameplay3d/GamePlay/wiki/Visual-Studio-Setup) 
+- [Linux](https://github.com/gameplay3d/GamePlay/wiki/CMake Setup - Linux)
+- [MacOSX](https://github.com/gameplay3d/GamePlay/wiki/Apple-Xcode-Setup)
+- [iOS](https://github.com/gameplay3d/GamePlay/wiki/Apple-Xcode-Setup)
+- [Android](https://github.com/gameplay3d/GamePlay/wiki/Android-NDK-Setup)
 
 ## Roadmap for 'next' branch
-- [3.0.0](https://github.com/blackberry/GamePlay/issues?milestone=7&page=1&state=open)
-- [backlog](https://github.com/blackberry/GamePlay/issues?milestone=5&page=1&state=open)
+- [3.5.0](https://github.com/gameplay3d/GamePlay/milestones/3.5.0)
+- [backlog](https://github.com/gameplay3d/GamePlay/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone)
 
 ## License
-The project is open sourced under the [Apache 2.0 license](http://www.tldrlegal.com/license/apache-license-2.0-%28apache-2.0%29).
+Open-source under [Apache 2.0 license](http://www.tldrlegal.com/license/apache-license-2.0-%28apache-2.0%29).
 
 ## Bug Reporting
-Please log bugs under [Issues](https://github.com/blackberry/GamePlay/issues) on github.
+Please log bugs under [Issues](https://github.com/gameplay3d/GamePlay/issues) on github.
 If you are unsure if your problem is a bug then post on the [Help Forum](http://www.gameplay3d.org/forums/viewforum.php?f=3).
 
 ## Feature Requests
-Please post feature requests on the [Feature Request Forum](http://www.gameplay3d.org/forums/viewforum.php?f=4). Approved feature requests will be added to the github backlog issues list. 
+Please post feature requests on the [Feature Request Forum](http://www.gameplay3d.org/forums/viewforum.php?f=4). 
+
+Approved feature requests will be added to the github backlog issues list. 
 
 ## Disclaimer
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 

+ 4 - 4
api/header.html

@@ -25,10 +25,10 @@
 <td id="logo"><a href="http://gameplay3d.org/"><img src="images/logo.png" alt="gameplay" border="0" height="64px"/></a></td>
 <td width="100%"/>
 <td><a href="http://gameplay3d.org/"><span class="button">overview</span></a></td><td width="12px"/>
-<td><a href="https://github.com/blackberry/GamePlay/wiki"><span class="button">wiki</span></a></td><td width="12px"/>
-<td><a href="http://blackberry.github.com/GamePlay/api/index.html"><span class="button">api&nbsp;reference</span></a></td><td width="12px"/>
+<td><a href="https://github.com/gameplay3d/GamePlay/wiki"><span class="button">wiki</span></a></td><td width="12px"/>
+<td><a href="http://gameplay3d.github.com/GamePlay/api/index.html"><span class="button">api&nbsp;reference</span></a></td><td width="12px"/>
 <td><a href="http://www.gameplay3d.org/forums"><span class="button">forums</span></a></td>
-<td><a href="https://github.com/blackberry/GamePlay"><span class="button">download</span></a></td>
+<td><a href="https://github.com/gameplay3d/GamePlay"><span class="button">download</span></a></td>
 </tr>
 </tbody>
-</table>
+</table>

+ 1 - 34
gameplay.sln

@@ -1,13 +1,8 @@
-
+
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Express 2013 for Windows Desktop
 VisualStudioVersion = 12.0.21005.1
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-mesh", "samples\mesh\sample-mesh.vcxproj", "{D672DC66-3CE0-4878-B0D2-813CA731012F}"
-	ProjectSection(ProjectDependencies) = postProject
-		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
-	EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gameplay", "gameplay\gameplay.vcxproj", "{1032BA4B-57EB-4348-9E03-29DD63E80E4A}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-browser", "samples\browser\sample-browser.vcxproj", "{0F27C8C4-58B2-E367-8D1F-01B714FDBF1B}"
@@ -15,11 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-browser", "samples\b
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-lua", "samples\lua\sample-lua.vcxproj", "{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}"
-	ProjectSection(ProjectDependencies) = postProject
-		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
-	EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-spaceship", "samples\spaceship\sample-spaceship.vcxproj", "{CC37B8E9-6402-4841-8D6A-5D908A5909B3}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
@@ -30,11 +20,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-character", "samples
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-particles", "samples\particles\sample-particles.vcxproj", "{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}"
-	ProjectSection(ProjectDependencies) = postProject
-		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
-	EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-racer", "samples\racer\sample-racer.vcxproj", "{82522888-E09A-ED48-AD7D-247237B37B3A}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
@@ -47,12 +32,6 @@ Global
 		Release|x64 = Release|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{D672DC66-3CE0-4878-B0D2-813CA731012F}.Debug|x64.ActiveCfg = Debug|x64
-		{D672DC66-3CE0-4878-B0D2-813CA731012F}.Debug|x64.Build.0 = Debug|x64
-		{D672DC66-3CE0-4878-B0D2-813CA731012F}.DebugMem|x64.ActiveCfg = DebugMem|x64
-		{D672DC66-3CE0-4878-B0D2-813CA731012F}.DebugMem|x64.Build.0 = DebugMem|x64
-		{D672DC66-3CE0-4878-B0D2-813CA731012F}.Release|x64.ActiveCfg = Release|x64
-		{D672DC66-3CE0-4878-B0D2-813CA731012F}.Release|x64.Build.0 = Release|x64
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A}.Debug|x64.ActiveCfg = Debug|x64
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A}.Debug|x64.Build.0 = Debug|x64
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A}.DebugMem|x64.ActiveCfg = DebugMem|x64
@@ -65,12 +44,6 @@ Global
 		{0F27C8C4-58B2-E367-8D1F-01B714FDBF1B}.DebugMem|x64.Build.0 = DebugMem|x64
 		{0F27C8C4-58B2-E367-8D1F-01B714FDBF1B}.Release|x64.ActiveCfg = Release|x64
 		{0F27C8C4-58B2-E367-8D1F-01B714FDBF1B}.Release|x64.Build.0 = Release|x64
-		{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}.Debug|x64.ActiveCfg = Debug|x64
-		{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}.Debug|x64.Build.0 = Debug|x64
-		{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}.DebugMem|x64.ActiveCfg = DebugMem|x64
-		{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}.DebugMem|x64.Build.0 = DebugMem|x64
-		{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}.Release|x64.ActiveCfg = Release|x64
-		{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}.Release|x64.Build.0 = Release|x64
 		{CC37B8E9-6402-4841-8D6A-5D908A5909B3}.Debug|x64.ActiveCfg = Debug|x64
 		{CC37B8E9-6402-4841-8D6A-5D908A5909B3}.Debug|x64.Build.0 = Debug|x64
 		{CC37B8E9-6402-4841-8D6A-5D908A5909B3}.DebugMem|x64.ActiveCfg = DebugMem|x64
@@ -83,12 +56,6 @@ Global
 		{87388E8B-F3CF-428F-BC2C-C1886248C111}.DebugMem|x64.Build.0 = DebugMem|x64
 		{87388E8B-F3CF-428F-BC2C-C1886248C111}.Release|x64.ActiveCfg = Release|x64
 		{87388E8B-F3CF-428F-BC2C-C1886248C111}.Release|x64.Build.0 = Release|x64
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Debug|x64.ActiveCfg = Debug|x64
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Debug|x64.Build.0 = Debug|x64
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.DebugMem|x64.ActiveCfg = DebugMem|x64
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.DebugMem|x64.Build.0 = DebugMem|x64
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Release|x64.ActiveCfg = Release|x64
-		{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}.Release|x64.Build.0 = Release|x64
 		{82522888-E09A-ED48-AD7D-247237B37B3A}.Debug|x64.ActiveCfg = Debug|x64
 		{82522888-E09A-ED48-AD7D-247237B37B3A}.Debug|x64.Build.0 = Debug|x64
 		{82522888-E09A-ED48-AD7D-247237B37B3A}.DebugMem|x64.ActiveCfg = DebugMem|x64

+ 0 - 9
gameplay.xcworkspace/contents.xcworkspacedata

@@ -10,15 +10,6 @@
    <FileRef
       location = "group:samples/character/sample-character.xcodeproj">
    </FileRef>
-   <FileRef
-      location = "group:samples/lua/sample-lua.xcodeproj">
-   </FileRef>  
-   <FileRef
-      location = "group:samples/mesh/sample-mesh.xcodeproj">
-   </FileRef>
-   <FileRef
-      location = "group:samples/particles/sample-particles.xcodeproj">
-   </FileRef>
    <FileRef
       location = "group:samples/racer/sample-racer.xcodeproj">
    </FileRef>

+ 2 - 2
gameplay/CMakeLists.txt

@@ -422,8 +422,8 @@ set(GAMEPLAY_LUA
     src/lua/lua_NodeType.h
     src/lua/lua_ParticleEmitter.cpp
     src/lua/lua_ParticleEmitter.h
-    src/lua/lua_ParticleEmitterTextureBlending.cpp
-    src/lua/lua_ParticleEmitterTextureBlending.h
+    src/lua/lua_ParticleEmitterBlendMode.cpp
+    src/lua/lua_ParticleEmitterBlendMode.h
     src/lua/lua_Pass.cpp
     src/lua/lua_Pass.h
     src/lua/lua_PhysicsCharacter.cpp

+ 7 - 8
gameplay/android/jni/Android.mk

@@ -1,14 +1,13 @@
-
 GAMEPLAY_PATH := $(call my-dir)/../../src
 
 # external-deps
-PNG_PATH := ../../external-deps/png/lib/android/arm
-ZLIB_PATH := ../../external-deps/zlib/lib/android/arm
-LUA_PATH := ../../external-deps/lua/lib/android/arm
-BULLET_PATH := ../../external-deps/bullet/lib/android/arm
-OGG_PATH := ../../external-deps/ogg/lib/android/arm
-VORBIS_PATH := ../../external-deps/vorbis/lib/android/arm
-OPENAL_PATH := ../../external-deps/openal/lib/android/arm
+PNG_PATH := ../../external-deps/png/lib/android/$(TARGET_ARCH_ABI)
+ZLIB_PATH := ../../external-deps/zlib/lib/android/$(TARGET_ARCH_ABI)
+LUA_PATH := ../../external-deps/lua/lib/android/$(TARGET_ARCH_ABI)
+BULLET_PATH := ../../external-deps/bullet/lib/android/$(TARGET_ARCH_ABI)
+OGG_PATH := ../../external-deps/ogg/lib/android/$(TARGET_ARCH_ABI)
+VORBIS_PATH := ../../external-deps/vorbis/lib/android/$(TARGET_ARCH_ABI)
+OPENAL_PATH := ../../external-deps/openal/lib/android/$(TARGET_ARCH_ABI)
 
 # libpng
 LOCAL_PATH := $(PNG_PATH)

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

@@ -2,6 +2,6 @@ NDK_TOOLCHAIN_VERSION := 4.8
 APP_CPPFLAGS += -std=c++11
 APP_STL      := gnustl_static
 APP_MODULES  := libgameplay
-APP_ABI      := armeabi-v7a
+APP_ABI      := armeabi-v7a x86
 APP_PLATFORM := android-16
 

+ 1 - 1
gameplay/gameplay.pro

@@ -234,7 +234,7 @@ SOURCES += src/AbsoluteLayout.cpp \
     src/lua/lua_NodeCloneContext.cpp \
     src/lua/lua_NodeType.cpp \
     src/lua/lua_ParticleEmitter.cpp \
-    src/lua/lua_ParticleEmitterTextureBlending.cpp \
+    src/lua/lua_ParticleEmitterBlendMode.cpp \
     src/lua/lua_Pass.cpp \
     src/lua/lua_PhysicsCharacter.cpp \
     src/lua/lua_PhysicsCollisionObject.cpp \

BIN
gameplay/res/icon_tray.png


+ 13 - 0
gameplay/res/shaders/terrain.frag

@@ -71,6 +71,19 @@ vec4 _baseColor;
 varying vec3 v_normalVector;
 #else
 vec3 v_normalVector;
+
+#if (DIRECTIONAL_LIGHT_COUNT > 0)
+varying vec3 v_lightDirection[DIRECTIONAL_LIGHT_COUNT];
+#endif
+
+#if (POINT_LIGHT_COUNT > 0)
+varying vec3 v_vertexToPointLightDirection[POINT_LIGHT_COUNT];
+#endif
+
+#if (SPOT_LIGHT_COUNT > 0)
+varying vec3 v_vertexToSpotLightDirection[SPOT_LIGHT_COUNT];
+#endif
+
 #endif
 #endif
 

+ 1 - 1
gameplay/src/Animation.h

@@ -20,7 +20,7 @@ class AnimationClip;
  * You can create additional clips to run only parts of an animation and control
  * various runtime characteristics, such as repeat count, etc.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Animation
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Animation
  */
 class Animation : public Ref
 {

+ 1 - 1
gameplay/src/AudioSource.h

@@ -17,7 +17,7 @@ class NodeCloneContext;
  *
  * This can be attached to a Node for applying its 3D transformation.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Audio
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Audio
  */
 class AudioSource : public Ref, public Transform::Listener
 {

+ 1 - 1
gameplay/src/Button.h

@@ -13,7 +13,7 @@ namespace gameplay
 /**
  * Defines a button control. 
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class Button : public Label
 {

+ 1 - 1
gameplay/src/CheckBox.h

@@ -14,7 +14,7 @@ namespace gameplay
  *
  * This is a button that can be enabled or disabled.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class CheckBox : public Button
 {

+ 1 - 1
gameplay/src/Container.h

@@ -11,7 +11,7 @@ namespace gameplay
 /**
  * Defines a container that contains zero or more controls.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class Container : public Control
 {

+ 1 - 1
gameplay/src/Control.h

@@ -21,7 +21,7 @@ class Form;
 /**
  * Defines the base class for all controls.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class Control : public Ref, public AnimationTarget, public ScriptTarget
 {

+ 2 - 2
gameplay/src/Effect.cpp

@@ -498,11 +498,11 @@ Uniform* Effect::getUniform(const char* name) const
 				uniform->_type = puniform->getType();
 				_uniforms[name] = uniform;
 
-				delete parentname;
+				SAFE_DELETE_ARRAY(parentname);
 				return uniform;
 			}
 		}
-		delete parentname;
+		SAFE_DELETE_ARRAY(parentname);
     }
 
 	// No uniform variable found - return NULL

+ 34 - 8
gameplay/src/FileSystem.cpp

@@ -87,6 +87,7 @@ static bool androidFileExists(const char* filePath)
 
 /** @script{ignore} */
 static std::string __resourcePath("./");
+static std::string __assetPath("");
 static std::map<std::string, std::string> __aliases;
 
 /**
@@ -343,14 +344,18 @@ bool FileSystem::fileExists(const char* filePath)
 {
     GP_ASSERT(filePath);
 
+    std::string fullPath;
+
 #ifdef __ANDROID__
-    if (androidFileExists(resolvePath(filePath)))
+    fullPath = __assetPath;
+    fullPath += resolvePath(filePath);
+
+    if (androidFileExists(fullPath.c_str()))
     {
         return true;
     }
 #endif
 
-    std::string fullPath;
     getFullPath(filePath, fullPath);
 
     gp_stat_struct s;
@@ -364,17 +369,17 @@ Stream* FileSystem::open(const char* path, size_t streamMode)
     if ((streamMode & WRITE) != 0)
         modeStr[0] = 'w';
 #ifdef __ANDROID__
+    std::string fullPath(__resourcePath);
+    fullPath += resolvePath(path);
+
     if ((streamMode & WRITE) != 0)
     {
         // Open a file on the SD card
-        std::string fullPath(__resourcePath);
-        fullPath += resolvePath(path);
-
         size_t index = fullPath.rfind('/');
         if (index != std::string::npos)
         {
             std::string directoryPath = fullPath.substr(0, index);
-            struct stat s;
+            gp_stat_struct s;
             if (stat(directoryPath.c_str(), &s) != 0)
                 makepath(directoryPath, 0777);
         }
@@ -382,8 +387,19 @@ Stream* FileSystem::open(const char* path, size_t streamMode)
     }
     else
     {
-        // Open a file in the read-only asset directory
-        return FileStreamAndroid::create(resolvePath(path), modeStr);
+        // First try the SD card
+        Stream* stream = FileStream::create(fullPath.c_str(), modeStr);
+
+        if (!stream)
+        {
+            // Otherwise fall-back to assets loaded via the AssetManager
+            fullPath = __assetPath;
+            fullPath += resolvePath(path);
+
+            stream = FileStreamAndroid::create(fullPath.c_str(), modeStr);
+        }
+
+        return stream;
     }
 #else
     std::string fullPath;
@@ -456,6 +472,16 @@ bool FileSystem::isAbsolutePath(const char* filePath)
 #endif
 }
 
+void FileSystem::setAssetPath(const char* path)
+{
+    __assetPath = path;
+}
+
+const char* FileSystem::getAssetPath()
+{
+    return __assetPath.c_str();
+}
+
 void FileSystem::createFileFromAsset(const char* path)
 {
 #ifdef __ANDROID__

+ 17 - 0
gameplay/src/FileSystem.h

@@ -201,6 +201,23 @@ public:
      */
     static bool isAbsolutePath(const char* filePath);
 
+    /**
+    * Sets the asset root path for the game on platforms that have separate assets (currently just Android).
+    *
+    * Once set, all asset paths will be loaded relative to the given path.
+    * The default asset path is an empty string ("").
+    *
+    * @param path The asset root path.
+    */
+    static void setAssetPath(const char* path);
+
+    /**
+    * Returns the currently set asset root path.
+    *
+    * @return The currently set asset root path.
+    */
+    static const char* getAssetPath();
+
     /**
      * Creates a file on the file system from the specified asset (Android-specific).
      * 

+ 1 - 1
gameplay/src/Form.cpp

@@ -1024,7 +1024,7 @@ bool Form::projectPoint(int x, int y, Vector3* point)
 
         // To get the plane's distance from the origin, we project a point on the
         // plane onto the plane's normal vector.
-        const float distance = fabs(Vector3::dot(pointOnPlane, normal));
+        const float distance = Vector3::dot(pointOnPlane, normal);
         Plane plane(normal, -distance);
 
         // Check for collision with plane.

+ 1 - 1
gameplay/src/Form.h

@@ -21,7 +21,7 @@ class Theme;
  *
  * This can also be attached on a scene Node to support 3D forms.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class Form : public Container
 {

+ 1 - 1
gameplay/src/Game.h

@@ -26,7 +26,7 @@ class ScriptController;
  * This represents a running cross-platform game application and provides an abstraction
  * to most typical platform functionality and events.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Game_Config
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Game_Config
  */
 class Game
 {

+ 1 - 1
gameplay/src/Image.cpp

@@ -66,7 +66,7 @@ Image* Image::create(const char* path)
     png_set_sig_bytes(png, 8);
 
     // Read the entire image into memory.
-    png_read_png(png, info, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, NULL);
+    png_read_png(png, info, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_GRAY_TO_RGB, NULL);
 
     Image* image = new Image();
     image->_width = png_get_image_width(png, info);

+ 1 - 1
gameplay/src/ImageControl.h

@@ -15,7 +15,7 @@ namespace gameplay
  *
  * This allows forms to display seperate images from arbitrary files not specified in the theme.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class ImageControl : public Control
 {

+ 1 - 1
gameplay/src/JoystickControl.h

@@ -11,7 +11,7 @@ namespace gameplay
  *
  * This is used in virtual Gamepad instances.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class JoystickControl : public Control
 {

+ 1 - 1
gameplay/src/Label.h

@@ -12,7 +12,7 @@ namespace gameplay
  * 
  * This is capable of rendering text within its border.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class Label : public Control
 {

+ 1 - 1
gameplay/src/Layout.h

@@ -17,7 +17,7 @@ class Control;
  * Implementations are responsible for positioning, resizing and
  * calling update on all the controls within a container.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class Layout : public Ref
 {

+ 1 - 1
gameplay/src/Material.h

@@ -18,7 +18,7 @@ class NodeCloneContext;
  * material files (.material). When multiple techniques are loaded using a material file,
  * the current technique for an object can be set at runtime.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Materials
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Materials
  */
 class Material : public RenderState
 {

+ 10 - 10
gameplay/src/Node.cpp

@@ -20,7 +20,7 @@ namespace gameplay
 {
 
 Node::Node(const char* id)
-    : _scene(NULL), _firstChild(NULL), _nextSibling(NULL), _prevSibling(NULL), _parent(NULL), _childCount(0), _active(true),
+    : _scene(NULL), _firstChild(NULL), _nextSibling(NULL), _prevSibling(NULL), _parent(NULL), _childCount(0), _enabled(true),
     _tags(NULL), _camera(NULL), _light(NULL), _model(NULL), _terrain(NULL), _form(NULL), _audioSource(NULL), _particleEmitter(NULL),
     _collisionObject(NULL), _agent(NULL), _dirtyBits(NODE_DIRTY_ALL), _notifyHierarchyChanged(true), _userData(NULL)
 {
@@ -299,30 +299,30 @@ void Node::setUserPointer(void* pointer, void (*cleanupCallback)(void*))
     }
 }
 
-void Node::setActive(bool active)
+void Node::setEnabled(bool enabled)
 {
-    if (_active != active)
+    if (_enabled != enabled)
     {
         if (_collisionObject)
-            _collisionObject->setEnabled(active);
+            _collisionObject->setEnabled(enabled);
 
-        _active = active;
+        _enabled = enabled;
     }
 }
 
-bool Node::isActive() const
+bool Node::isEnabled() const
 {
-    return _active;
+    return _enabled;
 }
 
-bool Node::isActiveInHierarchy() const
+bool Node::isEnabledInHierarchy() const
 {
-    if (!_active)
+    if (!_enabled)
        return false;
    Node* node = _parent;
    while (node)
    {
-       if (!node->_active)
+       if (!node->_enabled)
            return false;
        node = node->_parent;
    }

+ 12 - 12
gameplay/src/Node.h

@@ -29,7 +29,7 @@ class Terrain;
  * Model, Camera, Light, PhysicsCollisionObject, AudioSource, ParticleEmitter and
  * Form components.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Node
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Node
  */
 class Node : public Transform, public Ref
 {
@@ -204,25 +204,25 @@ public:
     void setUserPointer(void* pointer, void (*cleanupCallback)(void*) = NULL);
 
     /**
-     * Sets if the node is active in the scene.
+     * Sets if the node is enabled in the scene.
      *
-     * @param active if the node is active in the scene.
+     * @param enabled if the node is enabled in the scene.
      */
-    void setActive(bool active);
+    void setEnabled(bool enabled);
 
     /**
-     * Gets if the node is active in the scene.
+     * Gets if the node is enabled in the scene.
      *
-     * @return if the node is active in the scene.
+     * @return if the node is enabled in the scene.
      */
-    bool isActive() const;
+    bool isEnabled() const;
 
     /**
-     * Gets if the node  either inherited active.
+     * Gets if the node either inherently enabled.
      *
-     * @return if visual components attached on this node should be drawn.
+     * @return if components attached on this node should be running.
      */
-    bool isActiveInHierarchy() const;
+    bool isEnabledInHierarchy() const;
 
     /**
      * Returns the number of direct children of this item.
@@ -800,9 +800,9 @@ protected:
     unsigned int _childCount;
 
     /**
-     * If this node is active in the scrne. This may not be active in hierarchy if its parents are not active.
+     * If this node is enabled in the scene. This may not be enabled in hierarchy if its parents are not enabled.
      */
-    bool _active;
+    bool _enabled;
 
     /**
      * List of custom tags for a node.

+ 31 - 27
gameplay/src/ParticleEmitter.cpp

@@ -26,7 +26,7 @@ ParticleEmitter::ParticleEmitter(unsigned int particleCountMax) :
     _rotationPerParticleSpeedMin(0.0f), _rotationPerParticleSpeedMax(0.0f),
     _rotationSpeedMin(0.0f), _rotationSpeedMax(0.0f),
     _rotationAxis(Vector3::zero()), _rotation(Matrix::identity()),
-    _spriteBatch(NULL), _spriteTextureBlending(BLEND_TRANSPARENT),  _spriteTextureWidth(0), _spriteTextureHeight(0), _spriteTextureWidthRatio(0), _spriteTextureHeightRatio(0), _spriteTextureCoords(NULL),
+    _spriteBatch(NULL), _spriteBlendMode(BLEND_ALPHA),  _spriteTextureWidth(0), _spriteTextureHeight(0), _spriteTextureWidthRatio(0), _spriteTextureHeightRatio(0), _spriteTextureCoords(NULL),
     _spriteAnimated(false),  _spriteLooped(false), _spriteFrameCount(1), _spriteFrameRandomOffset(0),_spriteFrameDuration(0L), _spriteFrameDurationSecs(0.0f), _spritePercentPerFrame(0.0f),
     _node(NULL), _orbitPosition(false), _orbitVelocity(false), _orbitAcceleration(false),
     _timePerEmission(PARTICLE_EMISSION_RATE_TIME_INTERVAL), _emitTime(0), _lastUpdated(0)
@@ -42,7 +42,7 @@ ParticleEmitter::~ParticleEmitter()
     SAFE_DELETE_ARRAY(_spriteTextureCoords);
 }
 
-ParticleEmitter* ParticleEmitter::create(const char* textureFile, TextureBlending textureBlending, unsigned int particleCountMax)
+ParticleEmitter* ParticleEmitter::create(const char* textureFile, BlendMode blendMode, unsigned int particleCountMax)
 {
     Texture* texture = Texture::create(textureFile, true);
 
@@ -54,17 +54,17 @@ ParticleEmitter* ParticleEmitter::create(const char* textureFile, TextureBlendin
     GP_ASSERT(texture->getWidth());
     GP_ASSERT(texture->getHeight());
 
-    ParticleEmitter* emitter = ParticleEmitter::create(texture, textureBlending, particleCountMax);
+    ParticleEmitter* emitter = ParticleEmitter::create(texture, blendMode, particleCountMax);
     SAFE_RELEASE(texture);
     return emitter;
 }
 
-ParticleEmitter* ParticleEmitter::create(Texture* texture, TextureBlending textureBlending,  unsigned int particleCountMax)
+ParticleEmitter* ParticleEmitter::create(Texture* texture, BlendMode blendMode,  unsigned int particleCountMax)
 {
     ParticleEmitter* emitter = new ParticleEmitter(particleCountMax);
     GP_ASSERT(emitter);
 
-    emitter->setTexture(texture, textureBlending);
+    emitter->setTexture(texture, blendMode);
 
     return emitter;
 }
@@ -108,8 +108,11 @@ ParticleEmitter* ParticleEmitter::create(Properties* properties)
         return NULL;
     }
 
-    const char* blendingString = sprite->getString("blending");
-    TextureBlending textureBlending = getTextureBlendingFromString(blendingString);
+    const char* blendModeString = sprite->getString("blendMode");
+    // Check for the old naming
+    if (blendModeString == NULL)
+        blendModeString = sprite->getString("blending");
+    BlendMode blendMode = getBlendModeFromString(blendModeString);
     int spriteWidth = sprite->getInt("width");
     int spriteHeight = sprite->getInt("height");
     bool spriteAnimated = sprite->getBool("animated");
@@ -174,7 +177,7 @@ ParticleEmitter* ParticleEmitter::create(Properties* properties)
     bool orbitAcceleration = properties->getBool("orbitAcceleration");
 
     // Apply all properties to a newly created ParticleEmitter.
-    ParticleEmitter* emitter = ParticleEmitter::create(texturePath.c_str(), textureBlending, particleCountMax);
+    ParticleEmitter* emitter = ParticleEmitter::create(texturePath.c_str(), blendMode, particleCountMax);
     if (!emitter)
     {
         GP_ERROR("Failed to create particle emitter.");
@@ -202,12 +205,12 @@ ParticleEmitter* ParticleEmitter::create(Properties* properties)
     return emitter;
 }
 
-void ParticleEmitter::setTexture(const char* texturePath, TextureBlending textureBlending)
+void ParticleEmitter::setTexture(const char* texturePath, BlendMode blendMode)
 {
     Texture* texture = Texture::create(texturePath, true);
     if (texture)
     {
-        setTexture(texture, textureBlending);
+        setTexture(texture, blendMode);
         texture->release();
     }
     else
@@ -216,7 +219,7 @@ void ParticleEmitter::setTexture(const char* texturePath, TextureBlending textur
     }
 }
 
-void ParticleEmitter::setTexture(Texture* texture, TextureBlending textureBlending)
+void ParticleEmitter::setTexture(Texture* texture, BlendMode blendMode)
 {
     // Create new batch before releasing old one, in case the same texture
     // is used for both (so it's not released before passing to the new batch).
@@ -230,7 +233,7 @@ void ParticleEmitter::setTexture(Texture* texture, TextureBlending textureBlendi
     _spriteBatch->getStateBlock()->setDepthWrite(false);
     _spriteBatch->getStateBlock()->setDepthTest(true);
 
-    setTextureBlending(textureBlending);
+    setBlendMode(blendMode);
     _spriteTextureWidth = texture->getWidth();
     _spriteTextureHeight = texture->getHeight();
     _spriteTextureWidthRatio = 1.0f / (float)texture->getWidth();
@@ -558,17 +561,17 @@ const Vector3& ParticleEmitter::getRotationAxisVariance() const
     return _rotationAxisVar;
 }
 
-void ParticleEmitter::setTextureBlending(TextureBlending textureBlending)
+void ParticleEmitter::setBlendMode(BlendMode blendMode)
 {
     GP_ASSERT(_spriteBatch);
     GP_ASSERT(_spriteBatch->getStateBlock());
 
-    switch (textureBlending)
+    switch (blendMode)
     {
-        case BLEND_OPAQUE:
+        case BLEND_NONE:
             _spriteBatch->getStateBlock()->setBlend(false);
             break;
-        case BLEND_TRANSPARENT:
+        case BLEND_ALPHA:
             _spriteBatch->getStateBlock()->setBlend(true);
             _spriteBatch->getStateBlock()->setBlendSrc(RenderState::BLEND_SRC_ALPHA);
             _spriteBatch->getStateBlock()->setBlendDst(RenderState::BLEND_ONE_MINUS_SRC_ALPHA);
@@ -584,16 +587,16 @@ void ParticleEmitter::setTextureBlending(TextureBlending textureBlending)
             _spriteBatch->getStateBlock()->setBlendDst(RenderState::BLEND_SRC_COLOR);
             break;
         default:
-            GP_ERROR("Unsupported texture blending mode (%d).", textureBlending);
+            GP_ERROR("Unsupported blend mode (%d).", blendMode);
             break;
     }
 
-    _spriteTextureBlending = textureBlending;
+    _spriteBlendMode = blendMode;
 }
 
-ParticleEmitter::TextureBlending ParticleEmitter::getTextureBlending() const
+ParticleEmitter::BlendMode ParticleEmitter::getBlendMode() const
 {
-    return _spriteTextureBlending;
+    return _spriteBlendMode;
 }
 
 void ParticleEmitter::setSpriteAnimated(bool animated)
@@ -832,17 +835,17 @@ void ParticleEmitter::generateColor(const Vector4& base, const Vector4& variance
     dst->w = base.w + variance.w * MATH_RANDOM_MINUS1_1();
 }
 
-ParticleEmitter::TextureBlending ParticleEmitter::getTextureBlendingFromString(const char* str)
+ParticleEmitter::BlendMode ParticleEmitter::getBlendModeFromString(const char* str)
 {
     GP_ASSERT(str);
 
-    if (strcmp(str, "BLEND_OPAQUE") == 0 || strcmp(str, "OPAQUE") == 0)
+    if (strcmp(str, "BLEND_NONE") == 0 || strcmp(str, "NONE") == 0 )
     {
-        return BLEND_OPAQUE;
+        return BLEND_NONE;
     }
-    else if (strcmp(str, "BLEND_TRANSPARENT") == 0 || strcmp(str, "TRANSPARENT") == 0)
+    else if (strcmp(str, "BLEND_ALPHA") == 0 || strcmp(str, "ALPHA") == 0 )
     {
-        return BLEND_TRANSPARENT;
+        return BLEND_ALPHA;
     }
     else if (strcmp(str, "BLEND_ADDITIVE") == 0 || strcmp(str, "ADDITIVE") == 0)
     {
@@ -854,7 +857,7 @@ ParticleEmitter::TextureBlending ParticleEmitter::getTextureBlendingFromString(c
     }
     else
     {
-        return BLEND_TRANSPARENT;
+        return BLEND_ALPHA;
     }
 }
 
@@ -1031,7 +1034,8 @@ unsigned int ParticleEmitter::draw()
 ParticleEmitter* ParticleEmitter::clone()
 {
     // Create a clone of this emitter
-    ParticleEmitter* emitter = ParticleEmitter::create(_spriteBatch->getSampler()->getTexture(), _spriteTextureBlending, _particleCountMax);
+    ParticleEmitter* emitter = ParticleEmitter::create(_spriteBatch->getSampler()->getTexture(),
+                                                       _spriteBlendMode, _particleCountMax);
 
     // Copy all properties to the clone
     emitter->setEmissionRate(_emissionRate);

+ 19 - 19
gameplay/src/ParticleEmitter.h

@@ -136,7 +136,7 @@ class Node;
  * be set before rendering the particle system and then will be reset to their original
  * values.  Accepts the same symbolic constants as glBlendFunc().
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Particles
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Particles
  */
 class ParticleEmitter : public Ref
 {
@@ -145,12 +145,12 @@ class ParticleEmitter : public Ref
 public:
 
     /**
-     * Defines the types of texture blending 
+     * Defines the types of blend modes
      */
-    enum TextureBlending
+    enum BlendMode
     {
-        BLEND_OPAQUE,
-        BLEND_TRANSPARENT,
+        BLEND_NONE,
+        BLEND_ALPHA,
         BLEND_ADDITIVE,
         BLEND_MULTIPLIED
     };
@@ -181,11 +181,11 @@ public:
      * Creates an uninitialized ParticleEmitter.
      *
      * @param texturePath A path to the image to use as this ParticleEmitter's texture.
-     * @param textureBlending The type of texture blending to be used for the particles emitted.
+     * @param blendMode The blend mode to be used for the particles emitted.
      * @param particleCountMax The maximum number of particles that can be alive at one time in this ParticleEmitter's system.
      * @script{create}
      */
-    static ParticleEmitter* create(const char* texturePath, TextureBlending textureBlending,  unsigned int particleCountMax);
+    static ParticleEmitter* create(const char* texturePath, BlendMode blendMode,  unsigned int particleCountMax);
 
     /**
      * Sets a new texture for this particle emitter.
@@ -193,9 +193,9 @@ public:
      * The current texture's reference count is decreased.
      *
      * @param texturePath Path to the new texture to set.
-     * @param textureBlending Blending mode for the new texture.
+     * @param blendMode Blend mode for the new texture.
      */
-    void setTexture(const char* texturePath, TextureBlending textureBlending);
+    void setTexture(const char* texturePath, BlendMode blendMode);
 
     /**
      * Sets a new texture for this particle emitter.
@@ -204,9 +204,9 @@ public:
      * current texture's reference count is decreased.
      *
      * @param texture The new texture to set.
-     * @param textureBlending Blending mode for the new texture.
+     * @param blendMode Blend mode for the new texture.
      */
-    void setTexture(Texture* texture, TextureBlending textureBlending);
+    void setTexture(Texture* texture, BlendMode blendMode);
 
     /**
      * Returns the texture currently set for this particle emitter.
@@ -705,23 +705,23 @@ public:
     unsigned int draw();
 
     /**
-     * Gets a TextureBlending enum from a corresponding string.
+     * Gets a blend mode from a corresponding string.
      */
-    static TextureBlending getTextureBlendingFromString(const char* src);
+    static ParticleEmitter::BlendMode getBlendModeFromString(const char* src);
 
     /**
      * Sets the texture blend mode for this particle emitter.
      *
-     * @param blending The new blend mode.
+     * @param blendMode The new blend mode.
      */
-    void setTextureBlending(TextureBlending blending);
+    void setBlendMode(BlendMode blendMode);
 
     /**
      * Gets the current texture blend mode for this particle emitter.
      *
      * @return The current blend mode.
      */
-    TextureBlending getTextureBlending() const;
+    BlendMode getBlendMode() const;
 
     /**
      * Clones the particle emitter and returns a new emitter.
@@ -746,11 +746,11 @@ private:
      * Creates an uninitialized ParticleEmitter.
      *
      * @param texture the texture to use.
-     * @param textureBlending The type of texture blending to be used for the particles emitted.
+     * @param blendMode The blend mode to be used for the particles emitted.
      * @param particleCountMax The maximum number of particles that can be alive at one time in this ParticleEmitter's system.
      * @script{create}
      */
-    static ParticleEmitter* create(Texture* texture, TextureBlending textureBlending,  unsigned int particleCountMax);
+    static ParticleEmitter* create(Texture* texture, BlendMode blendMode,  unsigned int particleCountMax);
 
     /**
      * Hidden copy assignment operator.
@@ -834,7 +834,7 @@ private:
     Vector3 _rotationAxisVar;
     Matrix _rotation;
     SpriteBatch* _spriteBatch;
-    TextureBlending _spriteTextureBlending;
+    BlendMode _spriteBlendMode;
     float _spriteTextureWidth;
     float _spriteTextureHeight;
     float _spriteTextureWidthRatio;

+ 1 - 1
gameplay/src/PhysicsCharacter.h

@@ -19,7 +19,7 @@ namespace gameplay
  * character than would be possible if trying to move a character by applying
  * physical simulation with forces.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
  */
 class PhysicsCharacter : public PhysicsGhostObject
 {

+ 1 - 1
gameplay/src/PhysicsCollisionObject.h

@@ -21,7 +21,7 @@ class PhysicsVehicleWheel;
 /**
  * Defines the base class for all physics objects that support collision events.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
  */
 class PhysicsCollisionObject
 {

+ 1 - 1
gameplay/src/PhysicsConstraint.h

@@ -12,7 +12,7 @@ namespace gameplay
 /**
  * Defines the base class for physics constraints.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
  */
 class PhysicsConstraint
 {

+ 1 - 1
gameplay/src/PhysicsController.h

@@ -20,7 +20,7 @@ class ScriptListener;
 /**
  * Defines a class for controlling game physics.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Physics
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Physics
  */
 class PhysicsController : public ScriptTarget
 {

+ 1 - 1
gameplay/src/PhysicsFixedConstraint.h

@@ -14,7 +14,7 @@ namespace gameplay
  * but can be used in specific situations for a more appropriate effect
  * Ex. for implementing sticky projectiles, etc.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
  */
 class PhysicsFixedConstraint : public PhysicsGenericConstraint
 {

+ 1 - 1
gameplay/src/PhysicsGenericConstraint.h

@@ -14,7 +14,7 @@ namespace gameplay
  * rigid bodies (or one rigid body and the world) where the
  * limits for all six degrees of freedom can be set individually.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
  */
 class PhysicsGenericConstraint : public PhysicsConstraint
 {

+ 1 - 1
gameplay/src/PhysicsGhostObject.h

@@ -14,7 +14,7 @@ namespace gameplay
  * It is a collision volume that does not participate in the physics
  * simulation but can be used the test against other phyics collision objects.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
  */
 class PhysicsGhostObject : public PhysicsCollisionObject, public Transform::Listener
 {

+ 1 - 1
gameplay/src/PhysicsHingeConstraint.h

@@ -14,7 +14,7 @@ namespace gameplay
  * (or one rigid body and the world) where movement is
  * restricted to rotation about one axis.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
  */
 class PhysicsHingeConstraint : public PhysicsConstraint
 {

+ 1 - 1
gameplay/src/PhysicsRigidBody.h

@@ -19,7 +19,7 @@ class PhysicsConstraint;
  * A rigid body can receive forces and torque to make your objects react to other collision
  * objects around it.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
  */
 class PhysicsRigidBody : public PhysicsCollisionObject, public Transform::Listener
 {

+ 1 - 1
gameplay/src/PhysicsSocketConstraint.h

@@ -13,7 +13,7 @@ namespace gameplay
  * between two rigid bodies (or one rigid body and the world)
  * where rotation is unrestricted about the constraint joint (pivot point).
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
  */
 class PhysicsSocketConstraint : public PhysicsConstraint
 {

+ 1 - 1
gameplay/src/PhysicsSpringConstraint.h

@@ -12,7 +12,7 @@ namespace gameplay
  * where the spring strength and damping can be set
  * for all six degrees of freedom.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Constraints
  */
 class PhysicsSpringConstraint : public PhysicsGenericConstraint
 {

+ 1 - 1
gameplay/src/PhysicsVehicle.h

@@ -17,7 +17,7 @@ class PhysicsVehicleWheel;
  * to it all of the properties of a rigid body such as shape, mass, friction,
  * etc which correspond to the vehicle body:
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
  */
 class PhysicsVehicle : public PhysicsCollisionObject
 {

+ 1 - 1
gameplay/src/PhysicsVehicleWheel.h

@@ -14,7 +14,7 @@ class PhysicsVehicle;
  * Defines a class for vehicle wheel physics which represents the individual wheel
  * itself as well as the tire and suspension.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects
  */
 
 class PhysicsVehicleWheel : public PhysicsCollisionObject

+ 6 - 5
gameplay/src/PlatformAndroid.cpp

@@ -736,6 +736,7 @@ Gamepad::ButtonMapping getGamepadButtonMapping(jint keycode)
     case AKEYCODE_DPAD_RIGHT:
         return Gamepad::BUTTON_RIGHT;
     case AKEYCODE_BUTTON_SELECT:
+    case AKEYCODE_BACK:
         return Gamepad::BUTTON_MENU1;
     case AKEYCODE_BUTTON_START:
         return Gamepad::BUTTON_MENU2;
@@ -807,13 +808,13 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
             float rightTrigger = AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_GAS, 0);
             gameplay::Platform::gamepadTriggerChangedEventInternal(deviceId, 1, rightTrigger);
 
-            // jJoystick handling
+            // Joystick handling
             float fuzz = 0.15f;
             float x = AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_X, 0);
-            float y = AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_Y, 0);
+            float y = -AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_Y, 0);
             gameplay::Platform::gamepadJoystickChangedEventInternal(deviceId, 0, clampFuzz(x, fuzz), clampFuzz(y, fuzz));
             float z = AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_Z, 0);
-            float rz = AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_RZ, 0);
+            float rz = -AMotionEvent_getAxisValue(event, AMOTION_EVENT_AXIS_RZ, 0);
             gameplay::Platform::gamepadJoystickChangedEventInternal(deviceId, 1, clampFuzz(z, fuzz), clampFuzz(rz, fuzz));
         }
         else
@@ -1764,7 +1765,7 @@ std::string Platform::displayFileDialog(size_t mode, const char* title, const ch
 extern "C"
 {
 
-JNIEXPORT void JNICALL Java_org_gameplay3d_GameNativeActivity_gamepadEventConnectedImpl(JNIEnv* env, jclass clazz, jint deviceId, jint buttonCount, jint joystickCount, jint triggerCount, jstring deviceName)
+JNIEXPORT void JNICALL Java_org_gameplay3d_GamePlayNativeActivity_gamepadEventConnectedImpl(JNIEnv* env, jclass clazz, jint deviceId, jint buttonCount, jint joystickCount, jint triggerCount, jstring deviceName)
 {
     const char* name = env->GetStringUTFChars(deviceName, JNI_FALSE);
     
@@ -1773,7 +1774,7 @@ JNIEXPORT void JNICALL Java_org_gameplay3d_GameNativeActivity_gamepadEventConnec
     env->ReleaseStringUTFChars(deviceName, name);
 }
 
-JNIEXPORT void JNICALL Java_org_gameplay3d_GameNativeActivity_gamepadEventDisconnectedImpl(JNIEnv* env, jclass clazz, jint deviceId)
+JNIEXPORT void JNICALL Java_org_gameplay3d_GamePlayNativeActivity_gamepadEventDisconnectedImpl(JNIEnv* env, jclass clazz, jint deviceId)
 {
 	gameplay::Platform::gamepadEventDisconnectedInternal(deviceId);
 }

+ 1 - 1
gameplay/src/PlatformMacOSX.mm

@@ -1135,7 +1135,7 @@ bool getMousePointForEvent(NSPoint& point, NSEvent* event)
     NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil];
 
     [__view->gameLock lock];
-    gameplay::Platform::mouseEventInternal(Mouse::MOUSE_WHEEL, point.x, __height - point.y, (int)([event deltaY] * 10.0f));
+    gameplay::Platform::mouseEventInternal(Mouse::MOUSE_WHEEL, point.x, __height - point.y, (int)([event deltaY]));
     [__view->gameLock unlock];
 }
 

+ 1 - 1
gameplay/src/RadioButton.h

@@ -15,7 +15,7 @@ namespace gameplay
  * A radio button can belong to a group, and only one radio button
  * from a group can be selected at one time.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class RadioButton : public Button
 {

+ 1 - 1
gameplay/src/Scene.cpp

@@ -443,7 +443,7 @@ Node* Scene::findNextVisibleSibling(Node* node)
 
 bool Scene::isNodeVisible(Node* node)
 {
-    if (!node->isActive())
+    if (!node->isEnabled())
         return false;
 
     if (node->getForm() || node->getParticleEmitter() || node->getTerrain() || node->getLight() || node->getCamera())

+ 1 - 1
gameplay/src/Scene.h

@@ -12,7 +12,7 @@ namespace gameplay
 /**
  * Defines the root container for a hierarchy of Node objects.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Scene
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Scene
  */
 class Scene : public Ref
 {

+ 1 - 1
gameplay/src/Slider.h

@@ -15,7 +15,7 @@ namespace gameplay
  *
  * A slider consists of a marker (grabber) that can slide along a track between two end-caps.
  * 
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class Slider : public Label
 {

+ 1 - 1
gameplay/src/Terrain.h

@@ -78,7 +78,7 @@ class TerrainAutoBindingResolver;
  * approaches. In practice, the skirts are often not noticeable at all unless the LOD variation
  * is very large and the terrain is excessively hilly on the edge of a LOD transition.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Terrain
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Terrain
  */
 class Terrain : public Ref, private Transform::Listener
 {

+ 1 - 1
gameplay/src/TextBox.h

@@ -16,7 +16,7 @@ namespace gameplay
  * On mobile device you can tap or click within the text box to
  * bring up the virtual keyboard.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms
  */
 class TextBox : public Label
 {

+ 1 - 1
gameplay/src/Theme.h

@@ -21,7 +21,7 @@ namespace gameplay
  * A Style describes the border, margin, and padding of a Control, what images, skins, and cursors
  * are associated with a Control, and Font properties to apply to a Control's text.
  *
- * @see http://blackberry.github.io/GamePlay/docs/file-formats.html#wiki-Theme
+ * @see http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Theme
  */
 class Theme: public Ref
 {

+ 124 - 1
gameplay/src/lua/lua_Global.cpp

@@ -709,14 +709,21 @@ void luaRegister_lua_Global()
         gameplay::ScriptUtil::registerEnumValue(Node::JOINT, "JOINT", scopePath);
     }
 
-    // Register enumeration ParticleEmitter::TextureBlending.
+    // Register enumeration ParticleEmitter::BlendMode.
     {
         std::vector<std::string> scopePath;
         scopePath.push_back("ParticleEmitter");
+<<<<<<< HEAD
         gameplay::ScriptUtil::registerEnumValue(ParticleEmitter::BLEND_OPAQUE, "BLEND_OPAQUE", scopePath);
         gameplay::ScriptUtil::registerEnumValue(ParticleEmitter::BLEND_TRANSPARENT, "BLEND_TRANSPARENT", scopePath);
         gameplay::ScriptUtil::registerEnumValue(ParticleEmitter::BLEND_ADDITIVE, "BLEND_ADDITIVE", scopePath);
         gameplay::ScriptUtil::registerEnumValue(ParticleEmitter::BLEND_MULTIPLIED, "BLEND_MULTIPLIED", scopePath);
+=======
+        gameplay::ScriptUtil::registerConstantString("BLEND_NONE", "BLEND_NONE", scopePath);
+        gameplay::ScriptUtil::registerConstantString("BLEND_ALPHA", "BLEND_ALPHA", scopePath);
+        gameplay::ScriptUtil::registerConstantString("BLEND_ADDITIVE", "BLEND_ADDITIVE", scopePath);
+        gameplay::ScriptUtil::registerConstantString("BLEND_MULTIPLIED", "BLEND_MULTIPLIED", scopePath);
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
     }
 
     // Register enumeration PhysicsCollisionObject::CollisionListener::EventType.
@@ -1018,4 +1025,120 @@ int lua__strcmpnocase(lua_State* state)
     return 0;
 }
 
+<<<<<<< HEAD
+=======
+static const char* enumStringEmpty = "";
+
+const char* lua_stringFromEnumGlobal(std::string& enumname, unsigned int value)
+{
+    if (enumname == "AIMessage::ParameterType")
+        return lua_stringFromEnum_AIMessageParameterType((AIMessage::ParameterType)value);
+    if (enumname == "AnimationClip::Listener::EventType")
+        return lua_stringFromEnum_AnimationClipListenerEventType((AnimationClip::Listener::EventType)value);
+    if (enumname == "AudioSource::State")
+        return lua_stringFromEnum_AudioSourceState((AudioSource::State)value);
+    if (enumname == "Camera::Type")
+        return lua_stringFromEnum_CameraType((Camera::Type)value);
+    if (enumname == "Container::Direction")
+        return lua_stringFromEnum_ContainerDirection((Container::Direction)value);
+    if (enumname == "Container::Scroll")
+        return lua_stringFromEnum_ContainerScroll((Container::Scroll)value);
+    if (enumname == "Control::Alignment")
+        return lua_stringFromEnum_ControlAlignment((Control::Alignment)value);
+    if (enumname == "Control::AutoSize")
+        return lua_stringFromEnum_ControlAutoSize((Control::AutoSize)value);
+    if (enumname == "Control::Listener::EventType")
+        return lua_stringFromEnum_ControlListenerEventType((Control::Listener::EventType)value);
+    if (enumname == "Control::State")
+        return lua_stringFromEnum_ControlState((Control::State)value);
+    if (enumname == "Curve::InterpolationType")
+        return lua_stringFromEnum_CurveInterpolationType((Curve::InterpolationType)value);
+    if (enumname == "DepthStencilTarget::Format")
+        return lua_stringFromEnum_DepthStencilTargetFormat((DepthStencilTarget::Format)value);
+    if (enumname == "Font::Format")
+        return lua_stringFromEnum_FontFormat((Font::Format)value);
+    if (enumname == "Font::Justify")
+        return lua_stringFromEnum_FontJustify((Font::Justify)value);
+    if (enumname == "Font::Style")
+        return lua_stringFromEnum_FontStyle((Font::Style)value);
+    if (enumname == "Game::ClearFlags")
+        return lua_stringFromEnum_GameClearFlags((Game::ClearFlags)value);
+    if (enumname == "Game::State")
+        return lua_stringFromEnum_GameState((Game::State)value);
+    if (enumname == "Gamepad::ButtonMapping")
+        return lua_stringFromEnum_GamepadButtonMapping((Gamepad::ButtonMapping)value);
+    if (enumname == "Gamepad::GamepadEvent")
+        return lua_stringFromEnum_GamepadGamepadEvent((Gamepad::GamepadEvent)value);
+    if (enumname == "Gesture::GestureEvent")
+        return lua_stringFromEnum_GestureGestureEvent((Gesture::GestureEvent)value);
+    if (enumname == "Image::Format")
+        return lua_stringFromEnum_ImageFormat((Image::Format)value);
+    if (enumname == "Keyboard::Key")
+        return lua_stringFromEnum_KeyboardKey((Keyboard::Key)value);
+    if (enumname == "Keyboard::KeyEvent")
+        return lua_stringFromEnum_KeyboardKeyEvent((Keyboard::KeyEvent)value);
+    if (enumname == "Layout::Type")
+        return lua_stringFromEnum_LayoutType((Layout::Type)value);
+    if (enumname == "Light::Type")
+        return lua_stringFromEnum_LightType((Light::Type)value);
+    if (enumname == "Logger::Level")
+        return lua_stringFromEnum_LoggerLevel((Logger::Level)value);
+    if (enumname == "Mesh::IndexFormat")
+        return lua_stringFromEnum_MeshIndexFormat((Mesh::IndexFormat)value);
+    if (enumname == "Mesh::PrimitiveType")
+        return lua_stringFromEnum_MeshPrimitiveType((Mesh::PrimitiveType)value);
+    if (enumname == "Mouse::MouseEvent")
+        return lua_stringFromEnum_MouseMouseEvent((Mouse::MouseEvent)value);
+    if (enumname == "Node::Type")
+        return lua_stringFromEnum_NodeType((Node::Type)value);
+    if (enumname == "ParticleEmitter::BlendMode")
+        return lua_stringFromEnum_ParticleEmitterBlendMode((ParticleEmitter::BlendMode)value);
+    if (enumname == "PhysicsCollisionObject::CollisionListener::EventType")
+        return lua_stringFromEnum_PhysicsCollisionObjectCollisionListenerEventType((PhysicsCollisionObject::CollisionListener::EventType)value);
+    if (enumname == "PhysicsCollisionObject::Type")
+        return lua_stringFromEnum_PhysicsCollisionObjectType((PhysicsCollisionObject::Type)value);
+    if (enumname == "PhysicsCollisionShape::Type")
+        return lua_stringFromEnum_PhysicsCollisionShapeType((PhysicsCollisionShape::Type)value);
+    if (enumname == "PhysicsController::Listener::EventType")
+        return lua_stringFromEnum_PhysicsControllerListenerEventType((PhysicsController::Listener::EventType)value);
+    if (enumname == "Properties::Type")
+        return lua_stringFromEnum_PropertiesType((Properties::Type)value);
+    if (enumname == "RenderState::AutoBinding")
+        return lua_stringFromEnum_RenderStateAutoBinding((RenderState::AutoBinding)value);
+    if (enumname == "RenderState::Blend")
+        return lua_stringFromEnum_RenderStateBlend((RenderState::Blend)value);
+    if (enumname == "RenderState::CullFaceSide")
+        return lua_stringFromEnum_RenderStateCullFaceSide((RenderState::CullFaceSide)value);
+    if (enumname == "RenderState::DepthFunction")
+        return lua_stringFromEnum_RenderStateDepthFunction((RenderState::DepthFunction)value);
+    if (enumname == "RenderState::FrontFace")
+        return lua_stringFromEnum_RenderStateFrontFace((RenderState::FrontFace)value);
+    if (enumname == "RenderState::StencilFunction")
+        return lua_stringFromEnum_RenderStateStencilFunction((RenderState::StencilFunction)value);
+    if (enumname == "RenderState::StencilOperation")
+        return lua_stringFromEnum_RenderStateStencilOperation((RenderState::StencilOperation)value);
+    if (enumname == "Terrain::Flags")
+        return lua_stringFromEnum_TerrainFlags((Terrain::Flags)value);
+    if (enumname == "TextBox::InputMode")
+        return lua_stringFromEnum_TextBoxInputMode((TextBox::InputMode)value);
+    if (enumname == "Texture::CubeFace")
+        return lua_stringFromEnum_TextureCubeFace((Texture::CubeFace)value);
+    if (enumname == "Texture::Filter")
+        return lua_stringFromEnum_TextureFilter((Texture::Filter)value);
+    if (enumname == "Texture::Format")
+        return lua_stringFromEnum_TextureFormat((Texture::Format)value);
+    if (enumname == "Texture::Type")
+        return lua_stringFromEnum_TextureType((Texture::Type)value);
+    if (enumname == "Texture::Wrap")
+        return lua_stringFromEnum_TextureWrap((Texture::Wrap)value);
+    if (enumname == "Touch::TouchEvent")
+        return lua_stringFromEnum_TouchTouchEvent((Touch::TouchEvent)value);
+    if (enumname == "VertexFormat::Usage")
+        return lua_stringFromEnum_VertexFormatUsage((VertexFormat::Usage)value);
+
+    GP_ERROR("Unrecognized enumeration type '%s'.", enumname.c_str());
+    return enumStringEmpty;
+}
+
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 }

+ 56 - 0
gameplay/src/lua/lua_Global.h

@@ -2,6 +2,62 @@
 #ifndef LUA_GLOBAL_H_
 #define LUA_GLOBAL_H_
 
+<<<<<<< HEAD
+=======
+#include "lua_AIMessageParameterType.h"
+#include "lua_AnimationClipListenerEventType.h"
+#include "lua_AudioSourceState.h"
+#include "lua_CameraType.h"
+#include "lua_ContainerDirection.h"
+#include "lua_ContainerScroll.h"
+#include "lua_ControlAlignment.h"
+#include "lua_ControlAutoSize.h"
+#include "lua_ControlListenerEventType.h"
+#include "lua_ControlState.h"
+#include "lua_CurveInterpolationType.h"
+#include "lua_DepthStencilTargetFormat.h"
+#include "lua_FontFormat.h"
+#include "lua_FontJustify.h"
+#include "lua_FontStyle.h"
+#include "lua_GameClearFlags.h"
+#include "lua_GameState.h"
+#include "lua_GamepadButtonMapping.h"
+#include "lua_GamepadGamepadEvent.h"
+#include "lua_GestureGestureEvent.h"
+#include "lua_ImageFormat.h"
+#include "lua_KeyboardKey.h"
+#include "lua_KeyboardKeyEvent.h"
+#include "lua_LayoutType.h"
+#include "lua_LightType.h"
+#include "lua_LoggerLevel.h"
+#include "lua_MeshIndexFormat.h"
+#include "lua_MeshPrimitiveType.h"
+#include "lua_MouseMouseEvent.h"
+#include "lua_NodeType.h"
+#include "lua_ParticleEmitterBlendMode.h"
+#include "lua_PhysicsCollisionObjectCollisionListenerEventType.h"
+#include "lua_PhysicsCollisionObjectType.h"
+#include "lua_PhysicsCollisionShapeType.h"
+#include "lua_PhysicsControllerListenerEventType.h"
+#include "lua_PropertiesType.h"
+#include "lua_RenderStateAutoBinding.h"
+#include "lua_RenderStateBlend.h"
+#include "lua_RenderStateCullFaceSide.h"
+#include "lua_RenderStateDepthFunction.h"
+#include "lua_RenderStateFrontFace.h"
+#include "lua_RenderStateStencilFunction.h"
+#include "lua_RenderStateStencilOperation.h"
+#include "lua_TerrainFlags.h"
+#include "lua_TextBoxInputMode.h"
+#include "lua_TextureCubeFace.h"
+#include "lua_TextureFilter.h"
+#include "lua_TextureFormat.h"
+#include "lua_TextureType.h"
+#include "lua_TextureWrap.h"
+#include "lua_TouchTouchEvent.h"
+#include "lua_VertexFormatUsage.h"
+
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 namespace gameplay
 {
 

+ 45 - 45
gameplay/src/lua/lua_Joint.cpp

@@ -104,8 +104,8 @@ void luaRegister_Joint()
         {"getWorldViewProjectionMatrix", lua_Joint_getWorldViewProjectionMatrix},
         {"hasScriptListener", lua_Joint_hasScriptListener},
         {"hasTag", lua_Joint_hasTag},
-        {"isActive", lua_Joint_isActive},
-        {"isActiveInHierarchy", lua_Joint_isActiveInHierarchy},
+        {"isEnabled", lua_Joint_isEnabled},
+        {"isEnabledInHierarchy", lua_Joint_isEnabledInHierarchy},
         {"isStatic", lua_Joint_isStatic},
         {"release", lua_Joint_release},
         {"removeAllChildren", lua_Joint_removeAllChildren},
@@ -122,12 +122,12 @@ void luaRegister_Joint()
         {"scaleY", lua_Joint_scaleY},
         {"scaleZ", lua_Joint_scaleZ},
         {"set", lua_Joint_set},
-        {"setActive", lua_Joint_setActive},
         {"setAgent", lua_Joint_setAgent},
         {"setAnimationPropertyValue", lua_Joint_setAnimationPropertyValue},
         {"setAudioSource", lua_Joint_setAudioSource},
         {"setCamera", lua_Joint_setCamera},
         {"setCollisionObject", lua_Joint_setCollisionObject},
+        {"setEnabled", lua_Joint_setEnabled},
         {"setForm", lua_Joint_setForm},
         {"setId", lua_Joint_setId},
         {"setIdentity", lua_Joint_setIdentity},
@@ -4047,7 +4047,7 @@ int lua_Joint_hasTag(lua_State* state)
     return 0;
 }
 
-int lua_Joint_isActive(lua_State* state)
+int lua_Joint_isEnabled(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -4060,7 +4060,7 @@ int lua_Joint_isActive(lua_State* state)
             if ((lua_type(state, 1) == LUA_TUSERDATA))
             {
                 Joint* instance = getInstance(state);
-                bool result = instance->isActive();
+                bool result = instance->isEnabled();
 
                 // Push the return value onto the stack.
                 lua_pushboolean(state, result);
@@ -4068,7 +4068,7 @@ int lua_Joint_isActive(lua_State* state)
                 return 1;
             }
 
-            lua_pushstring(state, "lua_Joint_isActive - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_Joint_isEnabled - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
         }
@@ -4082,7 +4082,7 @@ int lua_Joint_isActive(lua_State* state)
     return 0;
 }
 
-int lua_Joint_isActiveInHierarchy(lua_State* state)
+int lua_Joint_isEnabledInHierarchy(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -4095,7 +4095,7 @@ int lua_Joint_isActiveInHierarchy(lua_State* state)
             if ((lua_type(state, 1) == LUA_TUSERDATA))
             {
                 Joint* instance = getInstance(state);
-                bool result = instance->isActiveInHierarchy();
+                bool result = instance->isEnabledInHierarchy();
 
                 // Push the return value onto the stack.
                 lua_pushboolean(state, result);
@@ -4103,7 +4103,7 @@ int lua_Joint_isActiveInHierarchy(lua_State* state)
                 return 1;
             }
 
-            lua_pushstring(state, "lua_Joint_isActiveInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_Joint_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
         }
@@ -4962,42 +4962,6 @@ int lua_Joint_set(lua_State* state)
     return 0;
 }
 
-int lua_Joint_setActive(lua_State* state)
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 2:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                lua_type(state, 2) == LUA_TBOOLEAN)
-            {
-                // Get parameter 1 off the stack.
-                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
-
-                Joint* instance = getInstance(state);
-                instance->setActive(param1);
-                
-                return 0;
-            }
-
-            lua_pushstring(state, "lua_Joint_setActive - Failed to match the given parameters to a valid function signature.");
-            lua_error(state);
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 2).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
 int lua_Joint_setAgent(lua_State* state)
 {
     // Get the number of parameters.
@@ -5503,6 +5467,42 @@ int lua_Joint_setCollisionObject(lua_State* state)
     return 0;
 }
 
+int lua_Joint_setEnabled(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Joint* instance = getInstance(state);
+                instance->setEnabled(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Joint_setEnabled - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Joint_setForm(lua_State* state)
 {
     // Get the number of parameters.

+ 3 - 3
gameplay/src/lua/lua_Joint.h

@@ -82,8 +82,8 @@ int lua_Joint_getWorldViewMatrix(lua_State* state);
 int lua_Joint_getWorldViewProjectionMatrix(lua_State* state);
 int lua_Joint_hasScriptListener(lua_State* state);
 int lua_Joint_hasTag(lua_State* state);
-int lua_Joint_isActive(lua_State* state);
-int lua_Joint_isActiveInHierarchy(lua_State* state);
+int lua_Joint_isEnabled(lua_State* state);
+int lua_Joint_isEnabledInHierarchy(lua_State* state);
 int lua_Joint_isStatic(lua_State* state);
 int lua_Joint_release(lua_State* state);
 int lua_Joint_removeAllChildren(lua_State* state);
@@ -100,12 +100,12 @@ int lua_Joint_scaleX(lua_State* state);
 int lua_Joint_scaleY(lua_State* state);
 int lua_Joint_scaleZ(lua_State* state);
 int lua_Joint_set(lua_State* state);
-int lua_Joint_setActive(lua_State* state);
 int lua_Joint_setAgent(lua_State* state);
 int lua_Joint_setAnimationPropertyValue(lua_State* state);
 int lua_Joint_setAudioSource(lua_State* state);
 int lua_Joint_setCamera(lua_State* state);
 int lua_Joint_setCollisionObject(lua_State* state);
+int lua_Joint_setEnabled(lua_State* state);
 int lua_Joint_setForm(lua_State* state);
 int lua_Joint_setId(lua_State* state);
 int lua_Joint_setIdentity(lua_State* state);

+ 45 - 45
gameplay/src/lua/lua_Node.cpp

@@ -102,8 +102,8 @@ void luaRegister_Node()
         {"getWorldViewProjectionMatrix", lua_Node_getWorldViewProjectionMatrix},
         {"hasScriptListener", lua_Node_hasScriptListener},
         {"hasTag", lua_Node_hasTag},
-        {"isActive", lua_Node_isActive},
-        {"isActiveInHierarchy", lua_Node_isActiveInHierarchy},
+        {"isEnabled", lua_Node_isEnabled},
+        {"isEnabledInHierarchy", lua_Node_isEnabledInHierarchy},
         {"isStatic", lua_Node_isStatic},
         {"release", lua_Node_release},
         {"removeAllChildren", lua_Node_removeAllChildren},
@@ -120,12 +120,12 @@ void luaRegister_Node()
         {"scaleY", lua_Node_scaleY},
         {"scaleZ", lua_Node_scaleZ},
         {"set", lua_Node_set},
-        {"setActive", lua_Node_setActive},
         {"setAgent", lua_Node_setAgent},
         {"setAnimationPropertyValue", lua_Node_setAnimationPropertyValue},
         {"setAudioSource", lua_Node_setAudioSource},
         {"setCamera", lua_Node_setCamera},
         {"setCollisionObject", lua_Node_setCollisionObject},
+        {"setEnabled", lua_Node_setEnabled},
         {"setForm", lua_Node_setForm},
         {"setId", lua_Node_setId},
         {"setIdentity", lua_Node_setIdentity},
@@ -4002,7 +4002,7 @@ int lua_Node_hasTag(lua_State* state)
     return 0;
 }
 
-int lua_Node_isActive(lua_State* state)
+int lua_Node_isEnabled(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -4015,7 +4015,7 @@ int lua_Node_isActive(lua_State* state)
             if ((lua_type(state, 1) == LUA_TUSERDATA))
             {
                 Node* instance = getInstance(state);
-                bool result = instance->isActive();
+                bool result = instance->isEnabled();
 
                 // Push the return value onto the stack.
                 lua_pushboolean(state, result);
@@ -4023,7 +4023,7 @@ int lua_Node_isActive(lua_State* state)
                 return 1;
             }
 
-            lua_pushstring(state, "lua_Node_isActive - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_Node_isEnabled - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
         }
@@ -4037,7 +4037,7 @@ int lua_Node_isActive(lua_State* state)
     return 0;
 }
 
-int lua_Node_isActiveInHierarchy(lua_State* state)
+int lua_Node_isEnabledInHierarchy(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -4050,7 +4050,7 @@ int lua_Node_isActiveInHierarchy(lua_State* state)
             if ((lua_type(state, 1) == LUA_TUSERDATA))
             {
                 Node* instance = getInstance(state);
-                bool result = instance->isActiveInHierarchy();
+                bool result = instance->isEnabledInHierarchy();
 
                 // Push the return value onto the stack.
                 lua_pushboolean(state, result);
@@ -4058,7 +4058,7 @@ int lua_Node_isActiveInHierarchy(lua_State* state)
                 return 1;
             }
 
-            lua_pushstring(state, "lua_Node_isActiveInHierarchy - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_Node_isEnabledInHierarchy - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
         }
@@ -4917,42 +4917,6 @@ int lua_Node_set(lua_State* state)
     return 0;
 }
 
-int lua_Node_setActive(lua_State* state)
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 2:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                lua_type(state, 2) == LUA_TBOOLEAN)
-            {
-                // Get parameter 1 off the stack.
-                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
-
-                Node* instance = getInstance(state);
-                instance->setActive(param1);
-                
-                return 0;
-            }
-
-            lua_pushstring(state, "lua_Node_setActive - Failed to match the given parameters to a valid function signature.");
-            lua_error(state);
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 2).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
 int lua_Node_setAgent(lua_State* state)
 {
     // Get the number of parameters.
@@ -5458,6 +5422,42 @@ int lua_Node_setCollisionObject(lua_State* state)
     return 0;
 }
 
+int lua_Node_setEnabled(lua_State* state)
+{
+    // Get the number of parameters.
+    int paramCount = lua_gettop(state);
+
+    // Attempt to match the parameters to a valid binding.
+    switch (paramCount)
+    {
+        case 2:
+        {
+            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
+                lua_type(state, 2) == LUA_TBOOLEAN)
+            {
+                // Get parameter 1 off the stack.
+                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);
+
+                Node* instance = getInstance(state);
+                instance->setEnabled(param1);
+                
+                return 0;
+            }
+
+            lua_pushstring(state, "lua_Node_setEnabled - Failed to match the given parameters to a valid function signature.");
+            lua_error(state);
+            break;
+        }
+        default:
+        {
+            lua_pushstring(state, "Invalid number of parameters (expected 2).");
+            lua_error(state);
+            break;
+        }
+    }
+    return 0;
+}
+
 int lua_Node_setForm(lua_State* state)
 {
     // Get the number of parameters.

+ 3 - 3
gameplay/src/lua/lua_Node.h

@@ -81,8 +81,8 @@ int lua_Node_getWorldViewMatrix(lua_State* state);
 int lua_Node_getWorldViewProjectionMatrix(lua_State* state);
 int lua_Node_hasScriptListener(lua_State* state);
 int lua_Node_hasTag(lua_State* state);
-int lua_Node_isActive(lua_State* state);
-int lua_Node_isActiveInHierarchy(lua_State* state);
+int lua_Node_isEnabled(lua_State* state);
+int lua_Node_isEnabledInHierarchy(lua_State* state);
 int lua_Node_isStatic(lua_State* state);
 int lua_Node_release(lua_State* state);
 int lua_Node_removeAllChildren(lua_State* state);
@@ -99,12 +99,12 @@ int lua_Node_scaleX(lua_State* state);
 int lua_Node_scaleY(lua_State* state);
 int lua_Node_scaleZ(lua_State* state);
 int lua_Node_set(lua_State* state);
-int lua_Node_setActive(lua_State* state);
 int lua_Node_setAgent(lua_State* state);
 int lua_Node_setAnimationPropertyValue(lua_State* state);
 int lua_Node_setAudioSource(lua_State* state);
 int lua_Node_setCamera(lua_State* state);
 int lua_Node_setCollisionObject(lua_State* state);
+int lua_Node_setEnabled(lua_State* state);
 int lua_Node_setForm(lua_State* state);
 int lua_Node_setId(lua_State* state);
 int lua_Node_setIdentity(lua_State* state);

+ 40 - 12
gameplay/src/lua/lua_ParticleEmitter.cpp

@@ -10,6 +10,10 @@
 #include "Quaternion.h"
 #include "Ref.h"
 #include "Scene.h"
+<<<<<<< HEAD
+=======
+#include "lua_ParticleEmitterBlendMode.h"
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 
 namespace gameplay
 {
@@ -56,7 +60,7 @@ void luaRegister_ParticleEmitter()
         {"getSpriteHeight", lua_ParticleEmitter_getSpriteHeight},
         {"getSpriteWidth", lua_ParticleEmitter_getSpriteWidth},
         {"getTexture", lua_ParticleEmitter_getTexture},
-        {"getTextureBlending", lua_ParticleEmitter_getTextureBlending},
+        {"getBlendMode", lua_ParticleEmitter_getBlendMode},
         {"getVelocity", lua_ParticleEmitter_getVelocity},
         {"getVelocityVariance", lua_ParticleEmitter_getVelocityVariance},
         {"isActive", lua_ParticleEmitter_isActive},
@@ -83,7 +87,7 @@ void luaRegister_ParticleEmitter()
         {"setSpriteLooped", lua_ParticleEmitter_setSpriteLooped},
         {"setSpriteTexCoords", lua_ParticleEmitter_setSpriteTexCoords},
         {"setTexture", lua_ParticleEmitter_setTexture},
-        {"setTextureBlending", lua_ParticleEmitter_setTextureBlending},
+        {"setBlendMode", lua_ParticleEmitter_setBlendMode},
         {"setVelocity", lua_ParticleEmitter_setVelocity},
         {"start", lua_ParticleEmitter_start},
         {"stop", lua_ParticleEmitter_stop},
@@ -93,7 +97,7 @@ void luaRegister_ParticleEmitter()
     const luaL_Reg lua_statics[] = 
     {
         {"create", lua_ParticleEmitter_static_create},
-        {"getTextureBlendingFromString", lua_ParticleEmitter_static_getTextureBlendingFromString},
+        {"getBlendModeFromString", lua_ParticleEmitter_static_getBlendModeFromString},
         {NULL, NULL}
     };
     std::vector<std::string> scopePath;
@@ -1591,7 +1595,7 @@ int lua_ParticleEmitter_getTexture(lua_State* state)
     return 0;
 }
 
-int lua_ParticleEmitter_getTextureBlending(lua_State* state)
+int lua_ParticleEmitter_getBlendMode(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -1604,15 +1608,19 @@ int lua_ParticleEmitter_getTextureBlending(lua_State* state)
             if ((lua_type(state, 1) == LUA_TUSERDATA))
             {
                 ParticleEmitter* instance = getInstance(state);
-                ParticleEmitter::TextureBlending result = instance->getTextureBlending();
+                ParticleEmitter::BlendMode result = instance->getBlendMode();
 
                 // Push the return value onto the stack.
+<<<<<<< HEAD
                 lua_pushnumber(state, (int)result);
+=======
+                lua_pushstring(state, lua_stringFromEnum_ParticleEmitterBlendMode(result));
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 
                 return 1;
             }
 
-            lua_pushstring(state, "lua_ParticleEmitter_getTextureBlending - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_ParticleEmitter_getBlendMode - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
         }
@@ -2716,7 +2724,11 @@ int lua_ParticleEmitter_setTexture(lua_State* state)
                     const char* param1 = gameplay::ScriptUtil::getString(2, false);
 
                     // Get parameter 2 off the stack.
+<<<<<<< HEAD
                     ParticleEmitter::TextureBlending param2 = (ParticleEmitter::TextureBlending)luaL_checkint(state, 3);
+=======
+                    ParticleEmitter::BlendMode param2 = (ParticleEmitter::BlendMode)lua_enumFromString_ParticleEmitterBlendMode(luaL_checkstring(state, 3));
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 
                     ParticleEmitter* instance = getInstance(state);
                     instance->setTexture(param1, param2);
@@ -2738,7 +2750,11 @@ int lua_ParticleEmitter_setTexture(lua_State* state)
                         break;
 
                     // Get parameter 2 off the stack.
+<<<<<<< HEAD
                     ParticleEmitter::TextureBlending param2 = (ParticleEmitter::TextureBlending)luaL_checkint(state, 3);
+=======
+                    ParticleEmitter::BlendMode param2 = (ParticleEmitter::BlendMode)lua_enumFromString_ParticleEmitterBlendMode(luaL_checkstring(state, 3));
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 
                     ParticleEmitter* instance = getInstance(state);
                     instance->setTexture(param1, param2);
@@ -2761,7 +2777,7 @@ int lua_ParticleEmitter_setTexture(lua_State* state)
     return 0;
 }
 
-int lua_ParticleEmitter_setTextureBlending(lua_State* state)
+int lua_ParticleEmitter_setBlendMode(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -2775,15 +2791,19 @@ int lua_ParticleEmitter_setTextureBlending(lua_State* state)
                 lua_type(state, 2) == LUA_TNUMBER)
             {
                 // Get parameter 1 off the stack.
+<<<<<<< HEAD
                 ParticleEmitter::TextureBlending param1 = (ParticleEmitter::TextureBlending)luaL_checkint(state, 2);
+=======
+                ParticleEmitter::BlendMode param1 = (ParticleEmitter::BlendMode)lua_enumFromString_ParticleEmitterBlendMode(luaL_checkstring(state, 2));
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 
                 ParticleEmitter* instance = getInstance(state);
-                instance->setTextureBlending(param1);
+                instance->setBlendMode(param1);
                 
                 return 0;
             }
 
-            lua_pushstring(state, "lua_ParticleEmitter_setTextureBlending - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_ParticleEmitter_setBlendMode - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
         }
@@ -2960,7 +2980,11 @@ int lua_ParticleEmitter_static_create(lua_State* state)
                     const char* param1 = gameplay::ScriptUtil::getString(1, false);
 
                     // Get parameter 2 off the stack.
+<<<<<<< HEAD
                     ParticleEmitter::TextureBlending param2 = (ParticleEmitter::TextureBlending)luaL_checkint(state, 2);
+=======
+                    ParticleEmitter::BlendMode param2 = (ParticleEmitter::BlendMode)lua_enumFromString_ParticleEmitterBlendMode(luaL_checkstring(state, 2));
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 
                     // Get parameter 3 off the stack.
                     unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 3);
@@ -2997,7 +3021,7 @@ int lua_ParticleEmitter_static_create(lua_State* state)
     return 0;
 }
 
-int lua_ParticleEmitter_static_getTextureBlendingFromString(lua_State* state)
+int lua_ParticleEmitter_static_getBlendModeFromString(lua_State* state)
 {
     // Get the number of parameters.
     int paramCount = lua_gettop(state);
@@ -3012,15 +3036,19 @@ int lua_ParticleEmitter_static_getTextureBlendingFromString(lua_State* state)
                 // Get parameter 1 off the stack.
                 const char* param1 = gameplay::ScriptUtil::getString(1, false);
 
-                ParticleEmitter::TextureBlending result = ParticleEmitter::getTextureBlendingFromString(param1);
+                ParticleEmitter::BlendMode result = ParticleEmitter::getBlendModeFromString(param1);
 
                 // Push the return value onto the stack.
+<<<<<<< HEAD
                 lua_pushnumber(state, (int)result);
+=======
+                lua_pushstring(state, lua_stringFromEnum_ParticleEmitterBlendMode(result));
+>>>>>>> 56056e69d8e0dfc651a52a1888c65c01d0f1f51d
 
                 return 1;
             }
 
-            lua_pushstring(state, "lua_ParticleEmitter_static_getTextureBlendingFromString - Failed to match the given parameters to a valid function signature.");
+            lua_pushstring(state, "lua_ParticleEmitter_static_getBlendModeFromString - Failed to match the given parameters to a valid function signature.");
             lua_error(state);
             break;
         }

+ 3 - 3
gameplay/src/lua/lua_ParticleEmitter.h

@@ -45,7 +45,7 @@ int lua_ParticleEmitter_getSpriteFrameRandomOffset(lua_State* state);
 int lua_ParticleEmitter_getSpriteHeight(lua_State* state);
 int lua_ParticleEmitter_getSpriteWidth(lua_State* state);
 int lua_ParticleEmitter_getTexture(lua_State* state);
-int lua_ParticleEmitter_getTextureBlending(lua_State* state);
+int lua_ParticleEmitter_getBlendMode(lua_State* state);
 int lua_ParticleEmitter_getVelocity(lua_State* state);
 int lua_ParticleEmitter_getVelocityVariance(lua_State* state);
 int lua_ParticleEmitter_isActive(lua_State* state);
@@ -72,11 +72,11 @@ int lua_ParticleEmitter_setSpriteFrameRandomOffset(lua_State* state);
 int lua_ParticleEmitter_setSpriteLooped(lua_State* state);
 int lua_ParticleEmitter_setSpriteTexCoords(lua_State* state);
 int lua_ParticleEmitter_setTexture(lua_State* state);
-int lua_ParticleEmitter_setTextureBlending(lua_State* state);
+int lua_ParticleEmitter_setBlendMode(lua_State* state);
 int lua_ParticleEmitter_setVelocity(lua_State* state);
 int lua_ParticleEmitter_start(lua_State* state);
 int lua_ParticleEmitter_static_create(lua_State* state);
-int lua_ParticleEmitter_static_getTextureBlendingFromString(lua_State* state);
+int lua_ParticleEmitter_static_getBlendModeFromString(lua_State* state);
 int lua_ParticleEmitter_stop(lua_State* state);
 int lua_ParticleEmitter_update(lua_State* state);
 

+ 41 - 0
gameplay/src/lua/lua_ParticleEmitterBlendMode.cpp

@@ -0,0 +1,41 @@
+#include "Base.h"
+#include "lua_ParticleEmitterBlendMode.h"
+
+namespace gameplay
+{
+
+static const char* enumStringEmpty = "";
+
+static const char* luaEnumString_ParticleEmitterBlendMode_BLEND_NONE = "BLEND_NONE";
+static const char* luaEnumString_ParticleEmitterBlendMode_BLEND_ALPHA = "BLEND_ALPHA";
+static const char* luaEnumString_ParticleEmitterBlendMode_BLEND_ADDITIVE = "BLEND_ADDITIVE";
+static const char* luaEnumString_ParticleEmitterBlendMode_BLEND_MULTIPLIED = "BLEND_MULTIPLIED";
+
+ParticleEmitter::BlendMode lua_enumFromString_ParticleEmitterBlendMode(const char* s)
+{
+    if (strcmp(s, luaEnumString_ParticleEmitterBlendMode_BLEND_NONE) == 0)
+        return ParticleEmitter::BLEND_NONE;
+    if (strcmp(s, luaEnumString_ParticleEmitterBlendMode_BLEND_ALPHA) == 0)
+        return ParticleEmitter::BLEND_ALPHA;
+    if (strcmp(s, luaEnumString_ParticleEmitterBlendMode_BLEND_ADDITIVE) == 0)
+        return ParticleEmitter::BLEND_ADDITIVE;
+    if (strcmp(s, luaEnumString_ParticleEmitterBlendMode_BLEND_MULTIPLIED) == 0)
+        return ParticleEmitter::BLEND_MULTIPLIED;
+    return ParticleEmitter::BLEND_NONE;
+}
+
+const char* lua_stringFromEnum_ParticleEmitterBlendMode(ParticleEmitter::BlendMode e)
+{
+    if (e == ParticleEmitter::BLEND_NONE)
+        return luaEnumString_ParticleEmitterBlendMode_BLEND_NONE;
+    if (e == ParticleEmitter::BLEND_ALPHA)
+        return luaEnumString_ParticleEmitterBlendMode_BLEND_ALPHA;
+    if (e == ParticleEmitter::BLEND_ADDITIVE)
+        return luaEnumString_ParticleEmitterBlendMode_BLEND_ADDITIVE;
+    if (e == ParticleEmitter::BLEND_MULTIPLIED)
+        return luaEnumString_ParticleEmitterBlendMode_BLEND_MULTIPLIED;
+    return enumStringEmpty;
+}
+
+}
+

+ 15 - 0
gameplay/src/lua/lua_ParticleEmitterBlendMode.h

@@ -0,0 +1,15 @@
+#ifndef LUA_PARTICLEEMITTERBLENDMODE_H_
+#define LUA_PARTICLEEMITTERBLENDMODE_H_
+
+#include "ParticleEmitter.h"
+
+namespace gameplay
+{
+
+// Lua bindings for enum conversion functions for ParticleEmitter::BlendMode.
+ParticleEmitter::BlendMode lua_enumFromString_ParticleEmitterBlendMode(const char* s);
+const char* lua_stringFromEnum_ParticleEmitterBlendMode(ParticleEmitter::BlendMode e);
+
+}
+
+#endif

+ 3 - 3
gameplay/src/org/gameplay3d/GameNativeActivity.java → gameplay/src/org/gameplay3d/GamePlayNativeActivity.java

@@ -14,7 +14,7 @@ import android.view.MotionEvent;
 import android.view.View;
 
 /**
- * Game extension for Android platform.
+ * GamePlay native activity extension for Android platform.
  * 
  * Handles any platform features that cannot be handled natively in PlatformAndroid.cpp 
  * 
@@ -22,14 +22,14 @@ import android.view.View;
  * that are not offered directly the gameplay3d framework such as platform events, access to 
  * android user-interface, life-cycle events for saving game state and custom plug-ins/extensions.
  */
-public class GameNativeActivity extends NativeActivity
+public class GamePlayNativeActivity extends NativeActivity
     implements InputManager.InputDeviceListener {
     
     static {
         System.loadLibrary("gameplay");
     }
     
-    private static final String TAG = "GameNativeActivity";
+    private static final String TAG = "GamePlayNativeActivity";
     
     @Override
     protected void onCreate(Bundle savedInstanceState) {

+ 3 - 3
install.bat

@@ -7,7 +7,7 @@ REM
 REM Helps prevent repo bloat due to large binary files
 REM
 
-set prefix=https://github.com/blackberry/GamePlay/releases/download/v3.0.0
+set prefix=https://github.com/gameplay3d/GamePlay/releases/download/v3.0.0
 
 set filename=gameplay-deps
 
@@ -75,10 +75,10 @@ cd %~dp0
 >> temp1.vbs ECHO End if
 >> temp1.vbs ECHO Set objXMLHTTP = Nothing
 
-if exist %windir%\Microsoft.NET\Framework\v2.0.50727\NUL (
+if exist %windir%\Microsoft.NET\Framework\v2.0.50727\csc.exe (
     %windir%\Microsoft.NET\Framework\v2.0.50727\csc temp.cs
 ) else (
-if exist %windir%\Microsoft.NET\Framework\v4.0.30319\NUL (
+if exist %windir%\Microsoft.NET\Framework\v4.0.30319\csc.exe (
     %windir%\Microsoft.NET\Framework\v4.0.30319\csc temp.cs
 ) else (
     goto USE_VBS_AS_FALLBACK

+ 1 - 1
install.sh

@@ -7,7 +7,7 @@
 # Helps prevent repo bloat due to large binary files
 #
 
-prefix=https://github.com/blackberry/GamePlay/releases/download/v3.0.0
+prefix=https://github.com/gameplay3d/GamePlay/releases/download/v3.0.0
 
 filename=gameplay-deps
 

+ 0 - 3
samples/CMakeLists.txt

@@ -53,8 +53,5 @@ add_definitions(-lstdc++ -lgameplay -lm -llua -lz -lpng -lvorbis -logg -lBulletC
 
 add_subdirectory(browser)
 add_subdirectory(character)
-add_subdirectory(lua)
-add_subdirectory(mesh)
-add_subdirectory(particles)
 add_subdirectory(racer)
 add_subdirectory(spaceship)

+ 4 - 55
samples/browser/CMakeLists.txt

@@ -1,57 +1,4 @@
-
-include_directories( 
-    ${CMAKE_SOURCE_DIR}/gameplay/src
-    ${CMAKE_SOURCE_DIR}/external-deps/lua/include
-    ${CMAKE_SOURCE_DIR}/external-deps/bullet/include
-    ${CMAKE_SOURCE_DIR}/external-deps/png/include
-    ${CMAKE_SOURCE_DIR}/external-deps/ogg/include
-    ${CMAKE_SOURCE_DIR}/external-deps/vorbis/include
-    ${CMAKE_SOURCE_DIR}/external-deps/zlib/include
-    ${CMAKE_SOURCE_DIR}/external-deps/openal/include
-    ${CMAKE_SOURCE_DIR}/external-deps/glew/include
-)
-
-add_definitions(-D__linux__)
-
-link_directories(
-    ${CMAKE_SOURCE_DIR}/external-deps/lua/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/zlib/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/png/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/bullet/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/ogg/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/vorbis/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/openal/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/glew/lib/linux/${ARCH_DIR}
-)
-
-
-set(GAMEPLAY_LIBRARIES
-    gameplay
-    m
-    lua
-    png
-    z
-    vorbis
-    ogg
-    BulletDynamics
-    BulletCollision
-    LinearMath
-    openal
-    GLEW
-    GL
-    rt
-    dl
-    X11
-    pthread
-    gtk-x11-2.0
-    glib-2.0
-    gobject-2.0
-) 
-
-add_definitions(-std=c++11)
-add_definitions(-lstdc++ -lgameplay -lm -llua -lz -lpng -lvorbis -logg -lBulletCollision -lBulletDynamics -lLinearMath -lopenal -LGLEW -lGL -lrt -ldl -lX11 -lpthread -lgtk-x11-2.0 -lglib-2.0 -lgobject-2.0)
-
-set( GAME_NAME sample-browser)
+set(GAME_NAME sample-browser)
 
 set(GAME_SRC
     src/Audio3DSample.cpp
@@ -80,6 +27,8 @@ set(GAME_SRC
     src/MeshBatchSample.h
     src/MeshPrimitiveSample.cpp
     src/MeshPrimitiveSample.h
+    src/ParticlesSample.cpp
+    src/ParticlesSample.h
     src/PhysicsCollisionObjectSample.cpp
     src/PhysicsCollisionObjectSample.h
     src/PostProcessSample.cpp
@@ -99,7 +48,7 @@ set(GAME_SRC
     src/TriangleSample.cpp
     src/TriangleSample.h
     src/WaterSample.cpp
-    src.WaterSample.h
+    src/WaterSample.h
 )
 
 add_executable(${GAME_NAME}

+ 1 - 1
samples/browser/android/AndroidManifest.xml

@@ -9,7 +9,7 @@
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
-        <activity android:name="org.gameplay3d.GameNativeActivity"
+        <activity android:name="org.gameplay3d.GamePlayNativeActivity"
                   android:label="@string/app_name"
                   android:configChanges="orientation|screenSize|keyboardHidden"
 				  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

+ 9 - 8
samples/browser/android/jni/Android.mk

@@ -1,16 +1,16 @@
 SAMPLE_PATH := $(call my-dir)/../../src
 
 # external-deps
-PNG_PATH := $(call my-dir)/../../../../external-deps/png/lib/android/arm
-ZLIB_PATH := $(call my-dir)/../../../../external-deps/zlib/lib/android/arm
-LUA_PATH := $(call my-dir)/../../../../external-deps/lua/lib/android/arm
-BULLET_PATH := $(call my-dir)/../../../../external-deps/bullet/lib/android/arm
-OGG_PATH := $(call my-dir)/../../../../external-deps/ogg/lib/android/arm
-VORBIS_PATH := $(call my-dir)/../../../../external-deps/vorbis/lib/android/arm
-OPENAL_PATH := $(call my-dir)/../../../../external-deps/openal/lib/android/arm
+PNG_PATH := $(call my-dir)/../../../../external-deps/png/lib/android/$(TARGET_ARCH_ABI)
+ZLIB_PATH := $(call my-dir)/../../../../external-deps/zlib/lib/android/$(TARGET_ARCH_ABI)
+LUA_PATH := $(call my-dir)/../../../../external-deps/lua/lib/android/$(TARGET_ARCH_ABI)
+BULLET_PATH := $(call my-dir)/../../../../external-deps/bullet/lib/android/$(TARGET_ARCH_ABI)
+OGG_PATH := $(call my-dir)/../../../../external-deps/ogg/lib/android/$(TARGET_ARCH_ABI)
+VORBIS_PATH := $(call my-dir)/../../../../external-deps/vorbis/lib/android/$(TARGET_ARCH_ABI)
+OPENAL_PATH := $(call my-dir)/../../../../external-deps/openal/lib/android/$(TARGET_ARCH_ABI)
 
 # libgameplay
-LOCAL_PATH := $(call my-dir)/../../../../gameplay/android/libs/armeabi-v7a
+LOCAL_PATH := $(call my-dir)/../../../../gameplay/android/libs/$(TARGET_ARCH_ABI)
 include $(CLEAR_VARS)
 LOCAL_MODULE    := libgameplay
 LOCAL_SRC_FILES := libgameplay.so
@@ -100,6 +100,7 @@ LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp \
     LoadSceneSample.cpp \
     MeshBatchSample.cpp \
     MeshPrimitiveSample.cpp \
+	ParticlesSample.cpp \
     PhysicsCollisionObjectSample.cpp \
     PostProcessSample.cpp \
     SpriteBatchSample.cpp \

+ 1 - 1
samples/browser/android/jni/Application.mk

@@ -1,5 +1,5 @@
 NDK_TOOLCHAIN_VERSION := 4.8
 APP_CPPFLAGS += -std=c++11
 APP_STL      := gnustl_static
-APP_ABI      := armeabi-v7a
+APP_ABI      := armeabi-v7a x86
 APP_PLATFORM := android-16

BIN
samples/browser/android/res/drawable/icon.png


BIN
samples/browser/icon.png


+ 2 - 1
samples/browser/res/common/inputs.form

@@ -2,7 +2,8 @@ form inputTestControls
 {
     width = 200
     height = 350
-    alignment = ALIGN_TOP_RIGHT
+    alignment = ALIGN_BOTTOM_RIGHT
+    consumeInputEvents = false
 
     button showKeyboardButton
     {

+ 47 - 54
samples/particles/res/editor.form → samples/browser/res/common/particles/editor.form

@@ -2,18 +2,10 @@ form particleEditor
 {
     ${leftWidth} = 195
 
-    size = 100%, 100%
+    size = 95%, 100%
     consumeInputEvents = false
     style = Empty
 
-	checkBox vsync
-	{
-		position = 200, 5
-		text = VSYNC
-		checked = true
-        fontSize = 18
-	}
-
     container leftSide
     {
         layout = LAYOUT_VERTICAL
@@ -27,8 +19,8 @@ form particleEditor
 
 	        button save
 	        {
-                width = 100%
-		        text = Save
+                    width = 100%
+		    text = Save
 	        }
 
             button load : save
@@ -43,7 +35,7 @@ form particleEditor
             style = Form
             width = 100%
 
-	        layout
+            layout
             {
                 type = LAYOUT_VERTICAL
                 spacing = 5
@@ -57,14 +49,14 @@ form particleEditor
 
 	        image sprite
 	        {
-		        path = res/fire.png
-		        size = 120, 120
+                path = res/fire.png
+                size = 120, 120
 	        }
 
             container imageSettings
             {
                 width = 100%
-		        layout = LAYOUT_VERTICAL
+                layout = LAYOUT_VERTICAL
 
                 radioButton additive
                 {
@@ -148,8 +140,8 @@ form particleEditor
 
                 button updateFrames
                 {
-			        width = 100%
-			        text = Update
+                    width = 100%
+                    text = Update
                 }
             }
         }
@@ -158,64 +150,65 @@ form particleEditor
         container emission
         {
             style = Form
-	        layout = LAYOUT_VERTICAL
-	        width = ${leftWidth}
+            layout = LAYOUT_VERTICAL
+            width = ${leftWidth}
 
-	        // Burst emission
-	        button emit
-	        {
+            // Burst emission
+            button emit
+            {
                 width = 100%
-		        text = Emit
-	        }
+                text = Emit
+            }
 
             label spacer
             {
                 size = 5,5
             }
 
-	        // Emission rate
-	        slider emissionRate
-	        {
+            // Emission rate
+            slider emissionRate
+            {
                 width = 100%
-		        orientation = HORIZONTAL
-		        min = 1
-		        max = 500
-		        value = 100
-		        step = 1
-		        text = Emission Rate
-		        textAlignment = ALIGN_TOP_HCENTER
-		        valueTextVisible = true
-		        valueTextAlignment = ALIGN_BOTTOM_HCENTER
-		        valueTextPrecision = 2            
-	        }
+                orientation = HORIZONTAL
+                min = 1
+                max = 500
+                value = 100
+                step = 1
+                text = Emission Rate
+                textAlignment = ALIGN_TOP_HCENTER
+                valueTextVisible = true
+                valueTextAlignment = ALIGN_BOTTOM_HCENTER
+                valueTextPrecision = 2            
+            }
 
-	        slider burstSize : emissionRate
-	        {
-		        text = Burst Size
-		        value = 20
-		        max = 50
-		        step = 1
-	        }
+            slider burstSize : emissionRate
+            {
+                text = Burst Size
+                value = 20
+                max = 50
+                step = 1
+            }
 
-	        // Start / Stop Emitter
-	        checkBox started
-	        {
-		        text = Running
-		        checked = true
-	        }
+            // Start / Stop Emitter
+            checkBox started
+            {
+                text = Running
+                checked = true
+            }
         }
 
         button reset
-	    {
+        {
             width = ${leftWidth}
-		    text = Reset
-	    }
+            text = Reset
+        }
     }
 
     container particleProperties
     {
         style = Form
         alignment = ALIGN_TOP_RIGHT
+        y = 50
         size = 210, 100%
         layout = LAYOUT_VERTICAL
         scroll = SCROLL_VERTICAL

+ 0 - 0
samples/particles/res/editor.png → samples/browser/res/common/particles/editor.png


+ 0 - 0
samples/particles/res/editor.theme → samples/browser/res/common/particles/editor.theme


+ 0 - 0
samples/particles/res/explosion.particle → samples/browser/res/common/particles/explosion.particle


+ 0 - 0
samples/particles/res/explosion.png → samples/browser/res/common/particles/explosion.png


+ 0 - 0
samples/particles/res/fire.particle → samples/browser/res/common/particles/fire.particle


+ 0 - 0
samples/particles/res/fire.png → samples/browser/res/common/particles/fire.png


+ 0 - 0
samples/particles/res/grid.material → samples/browser/res/common/particles/grid.material


+ 0 - 0
samples/particles/res/smoke.particle → samples/browser/res/common/particles/smoke.particle


+ 0 - 0
samples/particles/res/smoke.png → samples/browser/res/common/particles/smoke.png


+ 2 - 0
samples/browser/sample-browser.pro

@@ -22,6 +22,7 @@ SOURCES += src/Audio3DSample.cpp \
     src/LoadSceneSample.cpp \
     src/MeshBatchSample.cpp \
     src/MeshPrimitiveSample.cpp \
+	src/ParticlesSample.cpp \
     src/PhysicsCollisionObjectSample.cpp \
     src/PostProcessSample.cpp \
     src/SpriteBatchSample.cpp \
@@ -46,6 +47,7 @@ HEADERS += src/Audio3DSample.h \
     src/LoadSceneSample.h \
     src/MeshBatchSample.h \
     src/MeshPrimitiveSample.h \
+	src/ParticlesSample.h \
     src/PhysicsCollisionObjectSample.h \
     src/PostProcessSample.h \
     src/SpriteBatchSample.h \

+ 19 - 0
samples/browser/sample-browser.vcxproj

@@ -204,6 +204,12 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <None Include="res\common\light.form" />
     <None Include="res\common\light.material" />
     <None Include="res\common\lightBrickWall.gpb" />
+    <None Include="res\common\particles\editor.form" />
+    <None Include="res\common\particles\editor.theme" />
+    <None Include="res\common\particles\explosion.particle" />
+    <None Include="res\common\particles\fire.particle" />
+    <None Include="res\common\particles\grid.material" />
+    <None Include="res\common\particles\smoke.particle" />
     <None Include="res\common\physics.form" />
     <None Include="res\common\physics.gpb" />
     <None Include="res\common\physics.material" />
@@ -233,6 +239,11 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <None Include="res\common\terrain\terrain.form" />
     <None Include="res\common\terrain\terrain.material" />
     <None Include="res\common\text.form" />
+    <None Include="res\common\water\pond.gpb" />
+    <None Include="res\common\water\watersample.frag" />
+    <None Include="res\common\water\watersample.material" />
+    <None Include="res\common\water\watersample.scene" />
+    <None Include="res\common\water\watersample.vert" />
     <None Include="res\shaders\colored.frag" />
     <None Include="res\shaders\colored.vert" />
     <None Include="res\shaders\font.frag" />
@@ -258,6 +269,7 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <ClCompile Include="src\GamepadSample.cpp" />
     <ClCompile Include="src\GestureSample.cpp" />
     <ClCompile Include="src\LightSample.cpp" />
+    <ClCompile Include="src\ParticlesSample.cpp" />
     <ClCompile Include="src\PostProcessSample.cpp" />
     <ClCompile Include="src\TerrainSample.cpp" />
     <ClCompile Include="src\TriangleSample.cpp" />
@@ -283,6 +295,7 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <ClInclude Include="src\GamepadSample.h" />
     <ClInclude Include="src\GestureSample.h" />
     <ClInclude Include="src\LightSample.h" />
+    <ClInclude Include="src\ParticlesSample.h" />
     <ClInclude Include="src\PostProcessSample.h" />
     <ClInclude Include="src\TerrainSample.h" />
     <ClInclude Include="src\TriangleSample.h" />
@@ -301,11 +314,17 @@ copy ..\..\gameplay\res\logo_powered_white.png res</Command>
     <ClInclude Include="src\WaterSample.h" />
   </ItemGroup>
   <ItemGroup>
+    <Image Include="res\common\particles\editor.png" />
+    <Image Include="res\common\particles\explosion.png" />
+    <Image Include="res\common\particles\fire.png" />
+    <Image Include="res\common\particles\smoke.png" />
     <Image Include="res\common\terrain\dirt.dds" />
     <Image Include="res\common\terrain\grass.dds" />
     <Image Include="res\common\terrain\normalmap.dds" />
     <Image Include="res\common\terrain\rock.dds" />
     <Image Include="res\common\terrain\sky.dds" />
+    <Image Include="res\common\water\water_normal.png" />
+    <Image Include="res\common\water\water_sample.png" />
     <Image Include="res\logo_powered_white.png" />
     <Image Include="res\png\brick.png" />
     <Image Include="res\png\brickn.png" />

+ 8 - 0
samples/browser/sample-browser.xcodeproj/project.pbxproj

@@ -44,6 +44,8 @@
 		4258369E1A0F2AF400AFDFEB /* WaterSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4258369B1A0F2AF400AFDFEB /* WaterSample.cpp */; };
 		425F3A5617FBCBF00085454F /* libgameplay.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 425F3A5517FBCBF00085454F /* libgameplay.a */; };
 		428F7BDE15CB131A009ED24C /* game.config in Resources */ = {isa = PBXBuildFile; fileRef = 428F7BDD15CB131A009ED24C /* game.config */; };
+		42A1BA201A27BCE200BF506D /* ParticlesSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42A1BA1E1A27BCE200BF506D /* ParticlesSample.cpp */; };
+		42A1BA211A27BCE200BF506D /* ParticlesSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42A1BA1E1A27BCE200BF506D /* ParticlesSample.cpp */; };
 		42BE773016A68CE3008AFA65 /* GamepadSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42BE772E16A68CE3008AFA65 /* GamepadSample.cpp */; };
 		42BE773116A68CE3008AFA65 /* GamepadSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42BE772E16A68CE3008AFA65 /* GamepadSample.cpp */; };
 		42BE773416A68CF2008AFA65 /* LightSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42BE773216A68CF2008AFA65 /* LightSample.cpp */; };
@@ -131,6 +133,8 @@
 		4258369C1A0F2AF400AFDFEB /* WaterSample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaterSample.h; sourceTree = "<group>"; };
 		425F3A5517FBCBF00085454F /* libgameplay.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgameplay.a; path = "/Users/setaylor/Code/GamePlay/samples/character/../../../../Library/Developer/Xcode/DerivedData/gameplay-exiunaubxxjndaapmcqkaoeboiob/Build/Products/Debug-iphoneos/libgameplay.a"; sourceTree = "<absolute>"; };
 		428F7BDD15CB131A009ED24C /* game.config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = game.config; sourceTree = "<group>"; };
+		42A1BA1E1A27BCE200BF506D /* ParticlesSample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticlesSample.cpp; sourceTree = "<group>"; };
+		42A1BA1F1A27BCE200BF506D /* ParticlesSample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticlesSample.h; sourceTree = "<group>"; };
 		42BE772E16A68CE3008AFA65 /* GamepadSample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GamepadSample.cpp; sourceTree = "<group>"; };
 		42BE772F16A68CE3008AFA65 /* GamepadSample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamepadSample.h; sourceTree = "<group>"; };
 		42BE773216A68CF2008AFA65 /* LightSample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LightSample.cpp; sourceTree = "<group>"; };
@@ -337,6 +341,8 @@
 				420D544715FE430D00AD0B91 /* MeshBatchSample.h */,
 				420D544815FE430D00AD0B91 /* MeshPrimitiveSample.cpp */,
 				420D544915FE430D00AD0B91 /* MeshPrimitiveSample.h */,
+				42A1BA1E1A27BCE200BF506D /* ParticlesSample.cpp */,
+				42A1BA1F1A27BCE200BF506D /* ParticlesSample.h */,
 				42BE773616A68D07008AFA65 /* PhysicsCollisionObjectSample.cpp */,
 				42BE773716A68D07008AFA65 /* PhysicsCollisionObjectSample.h */,
 				422FE592169690830062D1FE /* PostProcessSample.cpp */,
@@ -529,6 +535,7 @@
 				420D546C15FE430D00AD0B91 /* SpriteBatchSample.cpp in Sources */,
 				420D546E15FE430D00AD0B91 /* Sample.cpp in Sources */,
 				420D547015FE430D00AD0B91 /* TextSample.cpp in Sources */,
+				42A1BA201A27BCE200BF506D /* ParticlesSample.cpp in Sources */,
 				420D547215FE430D00AD0B91 /* TextureSample.cpp in Sources */,
 				420D547415FE430D00AD0B91 /* TriangleSample.cpp in Sources */,
 				9F4C6D00162735020076E137 /* GestureSample.cpp in Sources */,
@@ -559,6 +566,7 @@
 				420D546D15FE430D00AD0B91 /* SpriteBatchSample.cpp in Sources */,
 				420D546F15FE430D00AD0B91 /* Sample.cpp in Sources */,
 				420D547115FE430D00AD0B91 /* TextSample.cpp in Sources */,
+				42A1BA211A27BCE200BF506D /* ParticlesSample.cpp in Sources */,
 				420D547315FE430D00AD0B91 /* TextureSample.cpp in Sources */,
 				420D547515FE430D00AD0B91 /* TriangleSample.cpp in Sources */,
 				9F4C6D01162735020076E137 /* GestureSample.cpp in Sources */,

+ 1 - 1
samples/browser/src/Audio3DSample.cpp

@@ -3,7 +3,7 @@
 #include "SamplesGame.h"
 
 #if defined(ADD_SAMPLE)
-    ADD_SAMPLE("Audio", "3D Audio", Audio3DSample, 1);
+    ADD_SAMPLE("Media", "Audio Listener", Audio3DSample, 1);
 #endif
 
 static const unsigned int MOVE_FORWARD = 1;

+ 1 - 1
samples/browser/src/BillboardSample.cpp

@@ -3,7 +3,7 @@
 #include "SamplesGame.h"
 
 #if defined(ADD_SAMPLE)
-    ADD_SAMPLE("Graphics", "Billboards", BillboardSample, 12);
+    ADD_SAMPLE("Graphics", "Billboards", BillboardSample, 10);
 #endif
 
 static const unsigned int MOVE_FORWARD = 1;

+ 1 - 1
samples/browser/src/CreateSceneSample.cpp

@@ -2,7 +2,7 @@
 #include "SamplesGame.h"
 
 #if defined(ADD_SAMPLE)
-    ADD_SAMPLE("Scene", "Create Scene", CreateSceneSample, 1);
+    ADD_SAMPLE("Graphics", "Create Scene", CreateSceneSample, 15);
 #endif
 
 static Mesh* createCubeMesh(float size = 1.0f)

+ 1 - 1
samples/browser/src/FormsSample.cpp

@@ -1,7 +1,7 @@
 #include "FormsSample.h"
 
 #if defined(ADD_SAMPLE)
-    ADD_SAMPLE("Graphics", "Forms", FormsSample, 10);
+    ADD_SAMPLE("Graphics", "Forms", FormsSample, 7);
 #endif
 
 // Input bit-flags

+ 1 - 1
samples/browser/src/InputSample.cpp

@@ -340,7 +340,7 @@ bool InputSample::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheelDelta
         _mouseWheel = wheelDelta;
         break;
     }
-    return true;
+    return false;
 }
 
 void InputSample::keyEvent(Keyboard::KeyEvent evt, int key)

+ 1 - 1
samples/browser/src/LightSample.cpp

@@ -2,7 +2,7 @@
 #include "SamplesGame.h"
 
 #if defined(ADD_SAMPLE)
-    ADD_SAMPLE("Graphics", "Light", LightSample, 11);
+    ADD_SAMPLE("Graphics", "Light", LightSample, 8);
 #endif
 
 LightSample::LightSample()

+ 1 - 1
samples/browser/src/LoadSceneSample.cpp

@@ -2,7 +2,7 @@
 #include "SamplesGame.h"
 
 #if defined(ADD_SAMPLE)
-    ADD_SAMPLE("Scene", "Load Scene", LoadSceneSample, 2);
+    ADD_SAMPLE("Graphics", "Load Scene", LoadSceneSample, 17);
 #endif
 
 LoadSceneSample::LoadSceneSample()

+ 85 - 83
samples/particles/src/ParticlesGame.cpp → samples/browser/src/ParticlesSample.cpp

@@ -1,21 +1,43 @@
-#include "ParticlesGame.h"
+#include "ParticlesSample.h"
+#include "SamplesGame.h"
 
-// Declare our game instance.
-ParticlesGame game;
+#if defined(ADD_SAMPLE)
+ADD_SAMPLE("Graphics", "Particles", ParticlesSample, 9);
+#endif
 
-#define DEFAULT_PARTICLE_EMITTER "res/fire.particle"
+#define DEFAULT_PARTICLE_EMITTER "res/common/particles/fire.particle"
 
 const float INPUT_SENSITIVITY = 0.05f;
 const float PANNING_SENSITIVITY = 0.01f;
 const float ROTATE_SENSITIVITY = 0.25f;
 const Vector4 BACKGROUND_COLOR = Vector4::zero();
-const float ZOOM_DEFAULT = 6.0f;
-
-ParticlesGame::ParticlesGame() : _scene(NULL), _panning(false), _rotating(false), _zooming(false)
+const float ZOOM_DEFAULT = 4.0f;
+
+ParticlesSample::ParticlesSample()
+    : _scene(NULL), _cameraParent(NULL), _particleEmitterNode(NULL), _particleEmitter(NULL),
+      _wDown(false), _aDown(false), _sDown(false), _dDown(false), _touched(false), _prevX(0), _prevY(0),
+      _panning(false), _rotating(false), _zooming(false), _font(NULL), _form(NULL),
+      _startRed(NULL), _startGreen(NULL), _startBlue(NULL), _startAlpha(NULL),
+      _endRed(NULL), _endGreen(NULL), _endBlue(NULL), _endAlpha(NULL),
+      _startMin(NULL), _startMax(NULL), _endMin(NULL),_endMax(NULL),
+      _energyMin(NULL), _energyMax(NULL),
+      _emissionRate(NULL), _posVarX(NULL),_posVarY(NULL),
+      _posVarZ(NULL), _velX(NULL), _velY(NULL), _velZ(NULL),
+      _velVarX(NULL), _velVarY(NULL), _velVarZ(NULL),
+      _accelX(NULL), _accelY(NULL),_accelZ(NULL),
+      _accelVarX(NULL), _accelVarY(NULL), _accelVarZ(NULL),
+      _spinSpeedMin(NULL), _spinSpeedMax(NULL),
+      _axisX(NULL), _axisY(NULL), _axisZ(NULL),
+      _axisVarX(NULL), _axisVarY(NULL), _axisVarZ(NULL),
+      _rotationSpeedMin(NULL), _rotationSpeedMax(NULL),
+      _burstSize(NULL), _started(NULL), _reset(NULL),
+      _emit(NULL), _zoomIn(NULL), _zoomOut(NULL),
+      _save(NULL), _load(NULL),
+      _position(NULL), _particleProperties(NULL)
 {
 }
 
-void ParticlesGame::addGrid(unsigned int lineCount)
+void ParticlesSample::addGrid(unsigned int lineCount)
 {
     float z = -1;
     
@@ -95,18 +117,16 @@ void ParticlesGame::addGrid(unsigned int lineCount)
     mesh->setVertexData(&vertices[0], 0, pointCount);
 
     Model* model = Model::create(mesh);
-    model->setMaterial("res/grid.material");
+    model->setMaterial("res/common/particles/grid.material");
     SAFE_RELEASE(mesh);
 
     _scene->addNode("grid")->setModel(model);
     model->release();
 }
 
-void ParticlesGame::initialize()
+void ParticlesSample::initialize()
 {
     // Display the gameplay splash screen
-    displayScreen(this, &ParticlesGame::drawSplash, NULL, 250L);
-
     setMultiTouch(true);
 
     // Set keyboard state.
@@ -134,7 +154,7 @@ void ParticlesGame::initialize()
     _font = Font::create("res/ui/arial.gpb");
 
     // Load the form for editing ParticleEmitters.
-    _form = Form::create("res/editor.form");
+    _form = Form::create("res/common/particles/editor.form");
     _form->setConsumeInputEvents(false);
     //_form->setState(Control::FOCUS);
 
@@ -188,7 +208,6 @@ void ParticlesGame::initialize()
     _axisVarZ = (Slider*)_form->getControl("axisVarZ");
     _rotationSpeedMin = (Slider*)_form->getControl("rotationSpeedMin");
     _rotationSpeedMax = (Slider*)_form->getControl("rotationSpeedMax");
-    _vsync = (CheckBox*)_form->getControl("vsync");
 
     // Listen for UI events.
     _startRed->addListener(this, Listener::VALUE_CHANGED);
@@ -244,7 +263,6 @@ void ParticlesGame::initialize()
     _axisVarZ->addListener(this, Listener::VALUE_CHANGED);
     _rotationSpeedMin->addListener(this, Listener::VALUE_CHANGED);
     _rotationSpeedMax->addListener(this, Listener::VALUE_CHANGED);
-    _vsync->addListener(this, Listener::VALUE_CHANGED);
     _form->getControl("sprite")->addListener(this, Listener::CLICK);
     _form->getControl("additive")->addListener(this, Listener::VALUE_CHANGED);
     _form->getControl("transparent")->addListener(this, Listener::VALUE_CHANGED);
@@ -259,64 +277,64 @@ void ParticlesGame::initialize()
 }
 
 
-std::string ParticlesGame::toString(bool b)
+std::string ParticlesSample::toString(bool b)
 {
     return b ? "true" : "false";
 }
 
-std::string ParticlesGame::toString(int i)
+std::string ParticlesSample::toString(int i)
 {
     char buf[1024];
     sprintf(buf, "%d", i);
     return buf;
 }
 
-std::string ParticlesGame::toString(unsigned int i)
+std::string ParticlesSample::toString(unsigned int i)
 {
     char buf[1024];
     sprintf(buf, "%d", i);
     return buf;
 }
 
-std::string ParticlesGame::toString(const Vector3& v)
+std::string ParticlesSample::toString(const Vector3& v)
 {
     std::ostringstream s;
     s << v.x << ", " << v.y << ", " << v.z;
     return s.str();
 }
 
-std::string ParticlesGame::toString(const Vector4& v)
+std::string ParticlesSample::toString(const Vector4& v)
 {
     std::ostringstream s;
     s << v.x << ", " << v.y << ", " << v.z << ", " << v.w;
     return s.str();
 }
 
-std::string ParticlesGame::toString(const Quaternion& q)
+std::string ParticlesSample::toString(const Quaternion& q)
 {
     std::ostringstream s;
     s << q.x << ", " << q.y << ", " << q.z << ", " << q.w;
     return s.str();
 }
 
-std::string ParticlesGame::toString(ParticleEmitter::TextureBlending blending)
+std::string ParticlesSample::toString(ParticleEmitter::BlendMode blendMode)
 {
-    switch (blending)
+    switch (blendMode)
     {
-        case ParticleEmitter::BLEND_OPAQUE:
-            return "OPAQUE";
-        case ParticleEmitter::BLEND_TRANSPARENT:
-            return "TRANSPARENT";
+        case ParticleEmitter::BLEND_NONE:
+            return "NONE";
+        case ParticleEmitter::BLEND_ALPHA:
+            return "ALPHA";
         case ParticleEmitter::BLEND_ADDITIVE:
             return "ADDITIVE";
         case ParticleEmitter::BLEND_MULTIPLIED:
             return "MULTIPLIED";
         default:
-            return "TRANSPARENT";
+            return "ALPHA";
     }
 }
 
-void ParticlesGame::saveFile()
+void ParticlesSample::saveFile()
 {
     std::string filename;
     filename = FileSystem::displayFileDialog(FileSystem::SAVE, "Save Particle File", "Particle Files", "particle", "res");
@@ -350,7 +368,7 @@ void ParticlesGame::saveFile()
         "        path = " << texturePath << "\n" <<
         "        width = " << e->getSpriteWidth() << "\n" <<
         "        height = " << e->getSpriteHeight() << "\n" <<
-        "        blending = " << toString(e->getTextureBlending()) << "\n" <<
+        "        blendMode = " << toString(e->getBlendMode()) << "\n" <<
         "        animated = " << toString(e->isSpriteAnimated()) << "\n" <<
         "        looped = " << toString(e->isSpriteLooped()) << "\n" <<
         "        frameCount = " << e->getSpriteFrameCount() << "\n" <<
@@ -400,7 +418,7 @@ void ParticlesGame::saveFile()
     SAFE_DELETE(stream);
 }
 
-void ParticlesGame::controlEvent(Control* control, EventType evt)
+void ParticlesSample::controlEvent(Control* control, EventType evt)
 {
     std::string id = control->getId();
 
@@ -656,29 +674,25 @@ void ParticlesGame::controlEvent(Control* control, EventType evt)
                 emitter->stop();
             }
         }
-        else if (control == _vsync)
-        {
-            Game::getInstance()->setVsync(_vsync->isChecked());
-        }
         else if (id == "additive")
         {
             if (((RadioButton*)control)->isSelected())
-                emitter->setTextureBlending(ParticleEmitter::BLEND_ADDITIVE);
+                emitter->setBlendMode(ParticleEmitter::BLEND_ADDITIVE);
         }
-        else if (id == "transparent")
+        else if (id == "alpha")
         {
             if (((RadioButton*)control)->isSelected())
-                emitter->setTextureBlending(ParticleEmitter::BLEND_TRANSPARENT);
+                emitter->setBlendMode(ParticleEmitter::BLEND_ALPHA);
         }
         else if (id == "multiply")
         {
             if (((RadioButton*)control)->isSelected())
-                emitter->setTextureBlending(ParticleEmitter::BLEND_MULTIPLIED);
+                emitter->setBlendMode(ParticleEmitter::BLEND_MULTIPLIED);
         }
-        else if (id == "opaque")
+        else if (id == "none")
         {
             if (((RadioButton*)control)->isSelected())
-                emitter->setTextureBlending(ParticleEmitter::BLEND_OPAQUE);
+                emitter->setBlendMode(ParticleEmitter::BLEND_NONE);
         }
         break;
     case Listener::CLICK:
@@ -744,7 +758,7 @@ void ParticlesGame::controlEvent(Control* control, EventType evt)
     }
 }
 
-void ParticlesGame::updateFrames()
+void ParticlesSample::updateFrames()
 {
     Texture* texture = _particleEmitter->getTexture();
     TextBox* cBox = (TextBox*)_form->getControl("frameCount");
@@ -768,15 +782,14 @@ void ParticlesGame::updateFrames()
     }
 }
 
-void ParticlesGame::finalize()
+void ParticlesSample::finalize()
 {
-    SAFE_RELEASE(_scene);
-    SAFE_RELEASE(_form);
     SAFE_RELEASE(_font);
-    SAFE_RELEASE(_particleEmitter);
+    SAFE_RELEASE(_form);
+    SAFE_RELEASE(_scene);
 }
 
-void ParticlesGame::update(float elapsedTime)
+void ParticlesSample::update(float elapsedTime)
 {
     // Update camera movement
     if (_wDown)
@@ -812,13 +825,13 @@ void ParticlesGame::update(float elapsedTime)
     _particleEmitterNode->getParticleEmitter()->update(elapsedTime);
 }
 
-void ParticlesGame::render(float elapsedTime)
+void ParticlesSample::render(float elapsedTime)
 {
     // Clear the color and depth buffers.
     clear(CLEAR_COLOR_DEPTH, BACKGROUND_COLOR, 1.0f, 0);
 
     // Visit all the nodes in the scene for drawing.
-    _scene->visit(this, &ParticlesGame::drawScene, (void*)0);
+    _scene->visit(this, &ParticlesSample::drawScene, (void*)0);
 
     // Draw the UI.
     _form->draw();
@@ -827,7 +840,7 @@ void ParticlesGame::render(float elapsedTime)
     drawFrameRate(_font, Vector4(1, 1, 1, 1), 205, 40, getFrameRate());
 }
 
-bool ParticlesGame::drawScene(Node* node, void* cookie)
+bool ParticlesSample::drawScene(Node* node, void* cookie)
 {
     if (node->getModel())
         node->getModel()->draw();
@@ -836,34 +849,34 @@ bool ParticlesGame::drawScene(Node* node, void* cookie)
     return true;
 }
 
-bool ParticlesGame::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
+bool ParticlesSample::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheelDelta)
 {
     switch (evt)
     {
     case Mouse::MOUSE_PRESS_MIDDLE_BUTTON:
         Game::getInstance()->setMouseCaptured(true);
         _panning = true;
-        return true;
+        return false;
     case Mouse::MOUSE_RELEASE_MIDDLE_BUTTON:
         Game::getInstance()->setMouseCaptured(false);
         _panning = false;
-        return true;
+        return false;
     case Mouse::MOUSE_PRESS_LEFT_BUTTON:
         Game::getInstance()->setMouseCaptured(true);
         _rotating = true;
-        return true;
+        return false;
     case Mouse::MOUSE_RELEASE_LEFT_BUTTON:
         Game::getInstance()->setMouseCaptured(false);
         _rotating = false;
-        return true;
+        return false;
     case Mouse::MOUSE_PRESS_RIGHT_BUTTON:
         Game::getInstance()->setMouseCaptured(true);
         _zooming = true;
-        return true;
+        return false;
     case Mouse::MOUSE_RELEASE_RIGHT_BUTTON:
         Game::getInstance()->setMouseCaptured(false);
         _zooming = false;
-        return true;
+        return false;
     case Mouse::MOUSE_MOVE:
         if (_panning)
         {
@@ -903,7 +916,7 @@ bool ParticlesGame::mouseEvent(Mouse::MouseEvent evt, int x, int y, int wheelDel
     return true;
 }
 
-void ParticlesGame::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex)
+void ParticlesSample::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex)
 {
     // Touch events that don't hit the UI
     // allow the camera to rotate around the particle emitter.
@@ -938,7 +951,7 @@ void ParticlesGame::touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int
     };
 }
 
-void ParticlesGame::keyEvent(Keyboard::KeyEvent evt, int key)
+void ParticlesSample::keyEvent(Keyboard::KeyEvent evt, int key)
 {
     switch(evt)
     {
@@ -949,8 +962,7 @@ void ParticlesGame::keyEvent(Keyboard::KeyEvent evt, int key)
             exit();
             break;
         case Keyboard::KEY_B:
-            // Disable blending.
-            _particleEmitterNode->getParticleEmitter()->setTextureBlending(ParticleEmitter::BLEND_OPAQUE);
+            _particleEmitterNode->getParticleEmitter()->setBlendMode(ParticleEmitter::BLEND_NONE);
             break;
         case Keyboard::KEY_W:
             _wDown = true;
@@ -987,7 +999,7 @@ void ParticlesGame::keyEvent(Keyboard::KeyEvent evt, int key)
     }
 }
 
-void ParticlesGame::loadEmitters()
+void ParticlesSample::loadEmitters()
 {
     // Load the default particle emitter
     _url = DEFAULT_PARTICLE_EMITTER;
@@ -999,7 +1011,7 @@ void ParticlesGame::loadEmitters()
     emitterChanged();
 }
 
-void ParticlesGame::emitterChanged()
+void ParticlesSample::emitterChanged()
 {
     ParticleEmitter* emitter = _particleEmitter;
 
@@ -1117,17 +1129,7 @@ void ParticlesGame::emitterChanged()
     emitter->start();
 }
 
-void ParticlesGame::drawSplash(void* param)
-{
-    clear(CLEAR_COLOR_DEPTH, Vector4(0, 0, 0, 1), 1.0f, 0);
-    SpriteBatch* batch = SpriteBatch::create("res/logo_powered_white.png");
-    batch->start();
-    batch->draw(this->getWidth() * 0.5f, this->getHeight() * 0.5f, 0.0f, 512.0f, 512.0f, 0.0f, 1.0f, 1.0f, 0.0f, Vector4::one(), true);
-    batch->finish();
-    SAFE_DELETE(batch);
-}
-
-void ParticlesGame::drawFrameRate(Font* font, const Vector4& color, unsigned int x, unsigned int y, unsigned int fps)
+void ParticlesSample::drawFrameRate(Font* font, const Vector4& color, unsigned int x, unsigned int y, unsigned int fps)
 {
     char buffer[30];
     sprintf(buffer, "FPS: %u\nParticles: %u", fps, _particleEmitterNode->getParticleEmitter()->getParticlesCount());
@@ -1136,27 +1138,27 @@ void ParticlesGame::drawFrameRate(Font* font, const Vector4& color, unsigned int
     font->finish();
 }
 
-void ParticlesGame::resizeEvent(unsigned int width, unsigned int height)
+void ParticlesSample::resizeEvent(unsigned int width, unsigned int height)
 {
     setViewport(gameplay::Rectangle(width, height));
     _form->setSize(width, height);
     _scene->getActiveCamera()->setAspectRatio((float)getWidth() / (float)getHeight());
 }
 
-void ParticlesGame::updateTexture()
+void ParticlesSample::updateTexture()
 {
     std::string file = FileSystem::displayFileDialog(FileSystem::OPEN, "Select Texture", "Texture Files", "png", "res");
     if (file.length() > 0)
     {
         // Set new sprite on our emitter
-        _particleEmitter->setTexture(file.c_str(), _particleEmitter->getTextureBlending());
+        _particleEmitter->setTexture(file.c_str(), _particleEmitter->getBlendMode());
 
         // Update the UI to display the new sprite
         updateImageControl();
     }
 }
 
-void ParticlesGame::updateImageControl()
+void ParticlesSample::updateImageControl()
 {
     ImageControl* img = (ImageControl*)_form->getControl("sprite");
     img->setImage(_particleEmitter->getTexture()->getPath());
@@ -1178,7 +1180,7 @@ void ParticlesGame::updateImageControl()
     ((TextBox*)_form->getControl("frameWidth"))->setText(toString(_particleEmitter->getSpriteWidth()).c_str());
     ((TextBox*)_form->getControl("frameHeight"))->setText(toString(_particleEmitter->getSpriteHeight()).c_str());
 
-    switch (_particleEmitter->getTextureBlending())
+    switch (_particleEmitter->getBlendMode())
     {
     case ParticleEmitter::BLEND_ADDITIVE:
         ((RadioButton*)_form->getControl("additive"))->setSelected(true);
@@ -1186,11 +1188,11 @@ void ParticlesGame::updateImageControl()
     case ParticleEmitter::BLEND_MULTIPLIED:
         ((RadioButton*)_form->getControl("multiply"))->setSelected(true);
         break;
-    case ParticleEmitter::BLEND_OPAQUE:
-        ((RadioButton*)_form->getControl("opaque"))->setSelected(true);
+    case ParticleEmitter::BLEND_NONE:
+        ((RadioButton*)_form->getControl("none"))->setSelected(true);
         break;
-    case ParticleEmitter::BLEND_TRANSPARENT:
-        ((RadioButton*)_form->getControl("transparent"))->setSelected(true);
+    case ParticleEmitter::BLEND_ALPHA:
+        ((RadioButton*)_form->getControl("alpha"))->setSelected(true);
         break;
     }
 }

+ 13 - 15
samples/particles/src/ParticlesGame.h → samples/browser/src/ParticlesSample.h

@@ -1,21 +1,22 @@
-#ifndef PARTICLESGAME_H_
-#define PARTICLESGAME_H_
+#ifndef PARTICLESSAMPLE_H_
+#define PARTICLESSAMPLE_H_
 
 #include "gameplay.h"
+#include "Sample.h"
 
 using namespace gameplay;
 
 /**
  * Main game class.
  */
-class ParticlesGame: public Game, Control::Listener
+class ParticlesSample: public Sample, Control::Listener
 {
 public:
 
     /**
      * Constructor.
      */
-    ParticlesGame();
+    ParticlesSample();
 
     /**
      * @see Game::touchEvent
@@ -68,8 +69,6 @@ private:
 
     bool drawScene(Node* node, void* cookie);
 
-    void drawSplash(void* param);
-
     void loadEmitters();
 
     void emitterChanged();
@@ -98,19 +97,20 @@ private:
     
     std::string toString(const Quaternion& q);
     
-    std::string toString(ParticleEmitter::TextureBlending blending);
+    std::string toString(ParticleEmitter::BlendMode blendMode);
 
     Scene* _scene;
-    Node* _particleEmitterNode;
     Node* _cameraParent;
-    Form* _form;
+    Node* _particleEmitterNode;
+    ParticleEmitter* _particleEmitter;
     bool _wDown, _sDown, _aDown, _dDown;
     bool _touched;
     int _prevX, _prevY;
-    ParticleEmitter* _particleEmitter;
-    std::string _url;
+    bool _panning;
+    bool _rotating;
+    bool _zooming;
     Font* _font;
-    
+    Form* _form;
     Slider* _startRed;
     Slider* _startGreen;
     Slider* _startBlue;
@@ -162,9 +162,7 @@ private:
     Container* _position;
     Container* _particleProperties;
     CheckBox* _vsync;
-    bool _panning;
-    bool _rotating;
-    bool _zooming;
+    std::string _url;
 };
 
 #endif

+ 3 - 3
samples/browser/src/SamplesGame.cpp

@@ -271,6 +271,7 @@ void SamplesGame::exitActiveSample()
 
     // Reset some game options
     setMultiTouch(false);
+    setMouseCaptured(false);
 }
 
 void SamplesGame::addSample(const char* category, const char* title, void* func, unsigned int order)
@@ -281,10 +282,9 @@ void SamplesGame::addSample(const char* category, const char* title, void* func,
     {
         _categories = new std::vector<std::string>();
         _categories->push_back("Graphics");
-        _categories->push_back("Scene");
-        _categories->push_back("Input");
         _categories->push_back("Physics");
-        _categories->push_back("Audio");
+        _categories->push_back("Media");
+        _categories->push_back("Input");
         _samples->resize(_categories->size());
     }
 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно