Browse Source

Merge remote-tracking branch 'origin/development'

MichPerry-GG 12 years ago
parent
commit
f12403e
76 changed files with 5710 additions and 1732 deletions
  1. 1 0
      engine/compilers/VisualStudio 2010/Torque 2D.vcxproj
  2. 3 0
      engine/compilers/VisualStudio 2010/Torque 2D.vcxproj.filters
  3. 1 1
      engine/compilers/VisualStudio 2012/Torque 2D.sln
  4. 1 1
      engine/compilers/VisualStudio 2012/Torque 2D.vcxproj
  5. 3 3
      engine/compilers/VisualStudio 2012/Torque 2D.vcxproj.filters
  6. 2 2
      engine/compilers/Xcode/Torque2D.xcodeproj/project.pbxproj
  7. 86 0
      engine/compilers/Xcode/Torque2D.xcodeproj/xcshareddata/xcschemes/Torque2D.xcscheme
  8. 4 2
      engine/compilers/Xcode_iOS/Torque2D.xcodeproj/project.pbxproj
  9. 86 0
      engine/compilers/Xcode_iOS/Torque2D.xcodeproj/xcshareddata/xcschemes/Torque2D.xcscheme
  10. 2 2
      engine/source/2d/core/SpriteBatch.cc
  11. 37 2
      engine/source/2d/core/SpriteProxyBase.cc
  12. 5 3
      engine/source/2d/core/SpriteProxyBase.h
  13. 40 246
      engine/source/2d/gui/guiSpriteCtrl.cc
  14. 12 43
      engine/source/2d/gui/guiSpriteCtrl.h
  15. 2 51
      engine/source/2d/gui/guiSpriteCtrl_ScriptBindings.h
  16. 8 2
      engine/source/2d/scene/Scene.cc
  17. 84 86
      engine/source/2d/scene/Scene_ScriptBinding.h
  18. 29 19
      engine/source/2d/sceneobject/SceneObject.cc
  19. 2 5
      engine/source/2d/sceneobject/SceneObject.h
  20. 29 76
      engine/source/2d/sceneobject/SceneObject_ScriptBinding.h
  21. 783 785
      engine/source/2d/sceneobject/ShapeVector.cc
  22. 5 2
      engine/source/assets/assetFieldTypes.h
  23. 9 9
      engine/source/assets/assetManager.cc
  24. 4 4
      engine/source/assets/tamlAssetDeclaredUpdateVisitor.h
  25. 4 4
      engine/source/assets/tamlAssetDeclaredVisitor.h
  26. 4 4
      engine/source/assets/tamlAssetReferencedUpdateVisitor.h
  27. 3 3
      engine/source/assets/tamlAssetReferencedVisitor.h
  28. 3 3
      engine/source/game/defaultGame.cc
  29. 13 1
      engine/source/persistence/taml/taml_ScriptBinding.h
  30. 8 4
      engine/source/platformOSX/platformOSX.mm
  31. 1 1
      engine/source/platformiOS/T2DAppDelegate.h
  32. 0 6
      engine/source/platformiOS/T2DAppDelegate.mm
  33. 20 27
      engine/source/platformiOS/iOSAlerts.mm
  34. 1 1
      engine/source/platformiOS/iOSMotionManager.h
  35. 3 10
      engine/source/platformiOS/iOSMotionManager.mm
  36. 0 1
      engine/source/platformiOS/iOSOGLVideo.mm
  37. 36 36
      engine/source/platformiOS/iOSPlatform.mm
  38. 1 2
      engine/source/platformiOS/iOSStrings.mm
  39. 5 5
      engine/source/platformiOS/iOSThread.mm
  40. 1 1
      engine/source/platformiOS/iOSUtil.mm
  41. 0 2
      engine/source/platformiOS/iOSWindow.mm
  42. 3 0
      engine/source/platformiOS/platformiOS.h
  43. 81 1
      engine/source/sim/simObject.cc
  44. 7 0
      engine/source/sim/simObject.h
  45. 68 55
      engine/source/sim/simObjectTimerEvent.h
  46. 6 4
      engine/source/string/stringTable.cc
  47. 8 1
      engine/source/string/stringTable.h
  48. 16 28
      modules/AlphaBlendToy/1/main.cs
  49. 8 27
      modules/AquariumToy/1/main.cs
  50. 7 10
      modules/DeathBallToy/1/main.cs
  51. 9 1
      modules/DeathBallToy/1/scripts/faceObjectBehavior.cs
  52. 29 5
      modules/MoveToToy/1/main.cs
  53. 30 5
      modules/RotateToToy/1/main.cs
  54. 141 0
      modules/ShapeVectorToy/1/main.cs
  55. 10 0
      modules/ShapeVectorToy/1/module.taml
  56. 11 27
      modules/SphereStackToy/1/main.cs
  57. 37 48
      modules/SpriteStressToy/1/main.cs
  58. 4 35
      modules/TruckToy/1/main.cs
  59. 10 30
      modules/TumblerToy/1/main.cs
  60. 2 0
      tools/documentation/.gitignore
  61. 18 0
      tools/documentation/ReadMe.txt
  62. BIN
      tools/documentation/doxygen.exe
  63. BIN
      tools/documentation/doxyindexer.exe
  64. BIN
      tools/documentation/doxysearch.cgi
  65. 36 0
      tools/documentation/generateDocs.bat
  66. 28 0
      tools/documentation/generateDocs.cs
  67. BIN
      tools/documentation/hhc.exe
  68. 2 0
      tools/documentation/input/.gitignore
  69. 27 0
      tools/documentation/main.generateDocs.cs
  70. 2 0
      tools/documentation/output/.gitignore
  71. 172 0
      tools/documentation/scriptRefLayout.xml
  72. 1514 0
      tools/documentation/scriptReference.OSX.cfg
  73. 1513 0
      tools/documentation/scriptReference.Windows.cfg
  74. 10 0
      tools/documentation/scriptref_footer.html
  75. 20 0
      tools/documentation/scriptref_header.html
  76. 540 0
      tools/documentation/torquedoc.css

+ 1 - 0
engine/compilers/VisualStudio 2010/Torque 2D.vcxproj

@@ -1003,6 +1003,7 @@
     <ClInclude Include="..\..\source\sim\simObject.h" />
     <ClInclude Include="..\..\source\sim\SimObjectList.h" />
     <ClInclude Include="..\..\source\sim\simObjectPtr.h" />
+    <ClInclude Include="..\..\source\sim\simObjectTimerEvent.h" />
     <ClInclude Include="..\..\source\sim\simSet.h" />
     <ClInclude Include="..\..\source\string\findMatch.h" />
     <ClInclude Include="..\..\source\string\stringBuffer.h" />

+ 3 - 0
engine/compilers/VisualStudio 2010/Torque 2D.vcxproj.filters

@@ -2586,6 +2586,9 @@
     <ClInclude Include="..\..\source\persistence\taml\tamlCustom.h">
       <Filter>persistence\taml</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\source\sim\simObjectTimerEvent.h">
+      <Filter>sim</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\source\math\mMath_ASM.asm">

+ 1 - 1
engine/compilers/VisualStudio 2012/Torque 2D.sln

@@ -1,5 +1,5 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio Express 2012 for Windows Desktop
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Torque2D", "Torque 2D.vcxproj", "{1564A07D-230E-4C90-AEE6-52AC9A58D6C9}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ljpeg", "ljpeg.vcxproj", "{0B07BA94-AA53-4FD4-ADB4-79EC2DA53B36}"

+ 1 - 1
engine/compilers/VisualStudio 2012/Torque 2D.vcxproj

@@ -647,7 +647,6 @@
     <ClInclude Include="..\..\source\2d\sceneobject\SceneObject.h" />
     <ClInclude Include="..\..\source\2d\sceneobject\SceneObjectMoveToEvent.h" />
     <ClInclude Include="..\..\source\2d\sceneobject\SceneObjectRotateToEvent.h" />
-    <ClInclude Include="..\..\source\2d\sceneobject\SceneObjectTimerEvent.h" />
     <ClInclude Include="..\..\source\2d\sceneobject\SceneObject_ScriptBinding.h" />
     <ClInclude Include="..\..\source\2d\sceneobject\Scroller.h" />
     <ClInclude Include="..\..\source\2d\sceneobject\Scroller_ScriptBinding.h" />
@@ -1009,6 +1008,7 @@
     <ClInclude Include="..\..\source\sim\simObject.h" />
     <ClInclude Include="..\..\source\sim\SimObjectList.h" />
     <ClInclude Include="..\..\source\sim\simObjectPtr.h" />
+    <ClInclude Include="..\..\source\sim\simObjectTimerEvent.h" />
     <ClInclude Include="..\..\source\sim\simSet.h" />
     <ClInclude Include="..\..\source\string\findMatch.h" />
     <ClInclude Include="..\..\source\string\stringBuffer.h" />

+ 3 - 3
engine/compilers/VisualStudio 2012/Torque 2D.vcxproj.filters

@@ -2348,9 +2348,6 @@
     <ClInclude Include="..\..\source\2d\sceneobject\SceneObjectRotateToEvent.h">
       <Filter>2d\sceneobject</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\2d\sceneobject\SceneObjectTimerEvent.h">
-      <Filter>2d\sceneobject</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\2d\sceneobject\Scroller.h">
       <Filter>2d\sceneobject</Filter>
     </ClInclude>
@@ -2586,6 +2583,9 @@
     <ClInclude Include="..\..\source\persistence\taml\tamlCustom.h">
       <Filter>persistence\taml</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\source\sim\simObjectTimerEvent.h">
+      <Filter>sim</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\source\math\mMath_ASM.asm">

+ 2 - 2
engine/compilers/Xcode/Torque2D.xcodeproj/project.pbxproj

@@ -459,6 +459,7 @@
 		2AC4404416B0142B00FC4091 /* ImageFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageFont.h; sourceTree = "<group>"; };
 		2AC5C7E71667C85700A0D046 /* platformStringTests.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = platformStringTests.cc; path = ../../../source/testing/tests/platformStringTests.cc; sourceTree = "<group>"; };
 		2ACFC0A7166CE1AB00FE7370 /* platformMemoryTests.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = platformMemoryTests.cc; path = ../../../source/testing/tests/platformMemoryTests.cc; sourceTree = "<group>"; };
+		2AD07B2616D15F5A0070DC79 /* simObjectTimerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simObjectTimerEvent.h; sourceTree = "<group>"; };
 		2AD35A541663608E00C75F30 /* platformFileIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = platformFileIO.h; sourceTree = "<group>"; };
 		2ADCAC0E16A41E4400E07619 /* tamlChildren.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tamlChildren.h; sourceTree = "<group>"; };
 		2ADCAC1016A41E5500E07619 /* ParticleAsset_ScriptBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleAsset_ScriptBinding.h; sourceTree = "<group>"; };
@@ -746,7 +747,6 @@
 		86BC7EC516518D4600D96ADF /* SceneObject_ScriptBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObject_ScriptBinding.h; sourceTree = "<group>"; };
 		86BC7EC816518D4600D96ADF /* SceneObjectMoveToEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObjectMoveToEvent.h; sourceTree = "<group>"; };
 		86BC7EC916518D4600D96ADF /* SceneObjectRotateToEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObjectRotateToEvent.h; sourceTree = "<group>"; };
-		86BC7ECD16518D4600D96ADF /* SceneObjectTimerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObjectTimerEvent.h; sourceTree = "<group>"; };
 		86BC7ECE16518D4600D96ADF /* Scroller.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scroller.cc; sourceTree = "<group>"; };
 		86BC7ECF16518D4600D96ADF /* Scroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scroller.h; sourceTree = "<group>"; };
 		86BC7ED016518D4600D96ADF /* Scroller_ScriptBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scroller_ScriptBinding.h; sourceTree = "<group>"; };
@@ -1868,7 +1868,6 @@
 				86BC7EC516518D4600D96ADF /* SceneObject_ScriptBinding.h */,
 				86BC7EC816518D4600D96ADF /* SceneObjectMoveToEvent.h */,
 				86BC7EC916518D4600D96ADF /* SceneObjectRotateToEvent.h */,
-				86BC7ECD16518D4600D96ADF /* SceneObjectTimerEvent.h */,
 				86BC7ECE16518D4600D96ADF /* Scroller.cc */,
 				86BC7ECF16518D4600D96ADF /* Scroller.h */,
 				86BC7ED016518D4600D96ADF /* Scroller_ScriptBinding.h */,
@@ -2580,6 +2579,7 @@
 		86BC812C16518D4600D96ADF /* sim */ = {
 			isa = PBXGroup;
 			children = (
+				2AD07B2616D15F5A0070DC79 /* simObjectTimerEvent.h */,
 				86BC812D16518D4600D96ADF /* scriptGroup.cc */,
 				86BC812E16518D4600D96ADF /* scriptGroup.h */,
 				86BC812F16518D4600D96ADF /* scriptObject.cc */,

+ 86 - 0
engine/compilers/Xcode/Torque2D.xcodeproj/xcshareddata/xcschemes/Torque2D.xcscheme

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0460"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "869FF8B71651518C002FE082"
+               BuildableName = "Torque2D.app"
+               BlueprintName = "Torque2D"
+               ReferencedContainer = "container:Torque2D.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      buildConfiguration = "Debug">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "869FF8B71651518C002FE082"
+            BuildableName = "Torque2D.app"
+            BlueprintName = "Torque2D"
+            ReferencedContainer = "container:Torque2D.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </TestAction>
+   <LaunchAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Debug"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "869FF8B71651518C002FE082"
+            BuildableName = "Torque2D.app"
+            BlueprintName = "Torque2D"
+            ReferencedContainer = "container:Torque2D.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Release"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "869FF8B71651518C002FE082"
+            BuildableName = "Torque2D.app"
+            BlueprintName = "Torque2D"
+            ReferencedContainer = "container:Torque2D.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 4 - 2
engine/compilers/Xcode_iOS/Torque2D.xcodeproj/project.pbxproj

@@ -478,6 +478,7 @@
 		2AC4404B16B0144500FC4091 /* ImageFont_ScriptBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageFont_ScriptBinding.h; sourceTree = "<group>"; };
 		2AC4404C16B0144500FC4091 /* ImageFont.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageFont.cc; sourceTree = "<group>"; };
 		2AC4404D16B0144500FC4091 /* ImageFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageFont.h; sourceTree = "<group>"; };
+		2AD07B2716D15F8E0070DC79 /* simObjectTimerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simObjectTimerEvent.h; sourceTree = "<group>"; };
 		2AED7D9216B70102003482CF /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
 		2AF1C54716B439D900C1CF3A /* declaredAssets.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = declaredAssets.cc; sourceTree = "<group>"; };
 		2AF1C54816B439D900C1CF3A /* declaredAssets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = declaredAssets.h; sourceTree = "<group>"; };
@@ -634,7 +635,6 @@
 		867BAD5416AEC9050033868F /* SceneObject_ScriptBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObject_ScriptBinding.h; sourceTree = "<group>"; };
 		867BAD5716AEC9050033868F /* SceneObjectMoveToEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObjectMoveToEvent.h; sourceTree = "<group>"; };
 		867BAD5816AEC9050033868F /* SceneObjectRotateToEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObjectRotateToEvent.h; sourceTree = "<group>"; };
-		867BAD5C16AEC9050033868F /* SceneObjectTimerEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneObjectTimerEvent.h; sourceTree = "<group>"; };
 		867BAD5D16AEC9050033868F /* Scroller.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scroller.cc; sourceTree = "<group>"; };
 		867BAD5E16AEC9050033868F /* Scroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scroller.h; sourceTree = "<group>"; };
 		867BAD5F16AEC9050033868F /* Scroller_ScriptBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scroller_ScriptBinding.h; sourceTree = "<group>"; };
@@ -1620,7 +1620,6 @@
 				867BAD5416AEC9050033868F /* SceneObject_ScriptBinding.h */,
 				867BAD5716AEC9050033868F /* SceneObjectMoveToEvent.h */,
 				867BAD5816AEC9050033868F /* SceneObjectRotateToEvent.h */,
-				867BAD5C16AEC9050033868F /* SceneObjectTimerEvent.h */,
 				867BAD5D16AEC9050033868F /* Scroller.cc */,
 				867BAD5E16AEC9050033868F /* Scroller.h */,
 				867BAD5F16AEC9050033868F /* Scroller_ScriptBinding.h */,
@@ -2425,6 +2424,7 @@
 		867BAFB516AEC9050033868F /* sim */ = {
 			isa = PBXGroup;
 			children = (
+				2AD07B2716D15F8E0070DC79 /* simObjectTimerEvent.h */,
 				867BAFB616AEC9050033868F /* scriptGroup.cc */,
 				867BAFB716AEC9050033868F /* scriptGroup.h */,
 				867BAFB816AEC9050033868F /* scriptObject.cc */,
@@ -3425,6 +3425,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
 				"FRAMEWORK_SEARCH_PATHS[arch=*]" = "";
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "Torque2D/Torque2D-Prefix.pch";
@@ -3447,6 +3448,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
 				"FRAMEWORK_SEARCH_PATHS[arch=*]" = "";
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "Torque2D/Torque2D-Prefix.pch";

+ 86 - 0
engine/compilers/Xcode_iOS/Torque2D.xcodeproj/xcshareddata/xcschemes/Torque2D.xcscheme

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0460"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "86A9A3AF16AEC786003F01E6"
+               BuildableName = "Torque2D.app"
+               BlueprintName = "Torque2D"
+               ReferencedContainer = "container:Torque2D.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      buildConfiguration = "Debug">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "86A9A3AF16AEC786003F01E6"
+            BuildableName = "Torque2D.app"
+            BlueprintName = "Torque2D"
+            ReferencedContainer = "container:Torque2D.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </TestAction>
+   <LaunchAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Debug"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "86A9A3AF16AEC786003F01E6"
+            BuildableName = "Torque2D.app"
+            BlueprintName = "Torque2D"
+            ReferencedContainer = "container:Torque2D.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Release"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "86A9A3AF16AEC786003F01E6"
+            BuildableName = "Torque2D.app"
+            BlueprintName = "Torque2D"
+            ReferencedContainer = "container:Torque2D.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 2 - 2
engine/source/2d/core/SpriteBatch.cc

@@ -31,7 +31,7 @@
 //------------------------------------------------------------------------------
 
 SpriteBatch::SpriteBatch() :
-    mMasterBatchId( 1 ),
+    mMasterBatchId( 0 ),
     mSelectedSprite( NULL ),
     mBatchSortMode( SceneRenderQueue::RENDER_SORT_OFF ),
     mDefaultSpriteStride( 1.0f, 1.0f),
@@ -931,7 +931,7 @@ SpriteBatchItem* SpriteBatch::createSprite( void )
     PROFILE_SCOPE(SpriteBatch_CreateSprite);
 
     // Allocate batch Id.
-    const U32 batchId = mMasterBatchId++;
+    const U32 batchId = ++mMasterBatchId;
 
     // Create sprite batch item,
     SpriteBatchItem* pSpriteBatchItem = SpriteBatchItemFactory.createObject();

+ 37 - 2
engine/source/2d/core/SpriteProxyBase.cc

@@ -28,6 +28,10 @@
 #include "graphics/dgl.h"
 #endif
 
+#ifndef _RENDER_PROXY_H_
+#include "2d/core/RenderProxy.h"
+#endif
+
 #ifndef _STRINGBUFFER_H_
 #include "string/stringBuffer.h"
 #endif
@@ -205,8 +209,14 @@ void SpriteProxyBase::renderGui( GuiControl& owner, Point2I offset, const RectI
             RectI destinationRegion(offset, owner.mBounds.extent);
 
             // Render image.
-            dglClearBitmapModulation();
+			dglSetBitmapModulation( owner.mProfile->mFillColor );
             dglDrawBitmapStretchSR( mImageAsset->getImageTexture(), destinationRegion, sourceRegion );
+            dglClearBitmapModulation();
+        }
+        else
+        {
+            // No, so render no-image render-proxy.
+            renderNoImage( owner, offset, updateRect );
         }
     }
     else
@@ -222,18 +232,43 @@ void SpriteProxyBase::renderGui( GuiControl& owner, Point2I offset, const RectI
             RectI destinationRegion(offset, owner.mBounds.extent);
 
             // Render animation image.
-            dglClearBitmapModulation();
+			dglSetBitmapModulation( owner.mProfile->mFillColor );
             dglDrawBitmapStretchSR( mpAnimationController->getImageTexture(), destinationRegion, sourceRegion );
+            dglClearBitmapModulation();
 
             // Update control.
             owner.setUpdate();
         }
+        else
+        {
+            // No, so render no-image render-proxy.
+            renderNoImage( owner, offset, updateRect );
+        }
     }
 
     // Render child controls.
     owner.renderChildControls(offset, updateRect);
 }
 
+
+//------------------------------------------------------------------------------
+
+void SpriteProxyBase::renderNoImage( GuiControl& owner, Point2I &offset, const RectI& updateRect ) const
+{
+    // Fetch the 'cannot render' proxy.
+    RenderProxy* pNoImageRenderProxy = Sim::findObject<RenderProxy>( CANNOT_RENDER_PROXY_NAME );
+
+    // Finish if no render proxy available or it can't render.
+    if ( pNoImageRenderProxy == NULL || !pNoImageRenderProxy->validRender() )
+        return;
+
+    // Render using render-proxy.
+    pNoImageRenderProxy->renderGui( owner, offset, updateRect );
+
+    // Update control.
+    owner.setUpdate();
+}
+
 //------------------------------------------------------------------------------
 
 void SpriteProxyBase::copyTo(SpriteProxyBase* pSpriteProxyBase) const

+ 5 - 3
engine/source/2d/core/SpriteProxyBase.h

@@ -87,20 +87,22 @@ public:
 
     void renderGui( GuiControl& owner, Point2I offset, const RectI &updateRect ) const;
 
+	void renderNoImage( GuiControl& owner, Point2I &offset, const RectI& updateRect ) const;
+
     virtual void copyTo(SpriteProxyBase* pSpriteProxyBase) const;
 
     void clearAsset( void );
 
     // Image.
     inline bool setImage( const char* pImageAssetId ) { return setImage( pImageAssetId, mImageFrame ); }
-    bool setImage( const char* pImageAssetId, const U32 frame );
+    virtual bool setImage( const char* pImageAssetId, const U32 frame );
     inline StringTableEntry getImage( void ) const { return mImageAsset.getAssetId(); }
-    bool setImageFrame( const U32 frame );
+    virtual bool setImageFrame( const U32 frame );
     inline U32 getImageFrame( void ) const { return mImageFrame; }
     inline StringTableEntry getAnimation( void ) const { return mAnimationAsset.getAssetId(); }
 
     /// Animation.
-    bool setAnimation( const char* pAnimationAssetId, const bool autoRestore = false );
+    virtual bool setAnimation( const char* pAnimationAssetId, const bool autoRestore = false );
     inline AnimationController* getAnimationController( void ) const { return mpAnimationController; }
     inline bool isStaticMode( void ) const { return mStaticMode; }
     inline void pauseAnimation( const bool animationPaused ) { mAnimationPaused = animationPaused; }

+ 40 - 246
engine/source/2d/gui/guiSpriteCtrl.cc

@@ -36,10 +36,6 @@
 #include "graphics/dgl.h"
 #endif
 
-#ifndef _RENDER_PROXY_H_
-#include "2d/core/RenderProxy.h"
-#endif
-
 #include "guiSpriteCtrl_ScriptBindings.h"
 
 //-----------------------------------------------------------------------------
@@ -50,23 +46,16 @@ IMPLEMENT_CONOBJECT(GuiSpriteCtrl);
 
 GuiSpriteCtrl::GuiSpriteCtrl( void ) :
     mImageAssetId( StringTable->EmptyString ),
-    mAnimationAssetId( StringTable->EmptyString ),
-    mImageFrame( 0 ),
-    mAnimationPaused( false ),
-    mpAnimationController(NULL)
+    mAnimationAssetId( StringTable->EmptyString )
 {
+	// Set to self ticking.
+	mSelfTick = true;
 }
 
 //-----------------------------------------------------------------------------
 
 GuiSpriteCtrl::~GuiSpriteCtrl()
 {
-    // Destroy animation controller if required.
-    if ( mpAnimationController != NULL )
-    {
-        delete mpAnimationController;
-        mpAnimationController = NULL;
-    }
 }
 
 //-----------------------------------------------------------------------------
@@ -90,27 +79,15 @@ bool GuiSpriteCtrl::onWake()
         return false;
 
     // Are we in static mode?
-    if ( isStaticMode() )
+    if ( mImageAssetId != StringTable->EmptyString )
     {
-        // Set image asset if it's valid.
-        if ( mImageAssetId != StringTable->EmptyString )
-            mImageAsset = mImageAssetId;
+        // Set image asset.
+		SpriteProxyBase::setImage( mImageAssetId );
     }
-    else
+    else if ( mAnimationAssetId != StringTable->EmptyString )
     {
-        // Set animation asset if it's valid.
-        if ( mAnimationAssetId != StringTable->EmptyString )
-        {
-            // Create animation controller if required.
-            if ( mpAnimationController == NULL )
-                mpAnimationController = new AnimationController();
-
-            // Play animation.
-            mpAnimationController->playAnimation( mAnimationAssetId, false );
-
-            // Turn-on tick processing.
-            setProcessTicks( true );
-        }
+        // Play animation asset.
+		SpriteProxyBase::setAnimation( mAnimationAssetId, false );
     }
 
     return true;
@@ -121,106 +98,59 @@ bool GuiSpriteCtrl::onWake()
 void GuiSpriteCtrl::onSleep()
 {
     // Clear assets.
-    mImageAsset.clear();
-
-    // Destroy animation controller if required.
-    if ( mpAnimationController != NULL )
-    {
-        delete mpAnimationController;
-        mpAnimationController = NULL;
-    }    
-
-    // Turn-off tick processing.
-    setProcessTicks( false );
+	SpriteProxyBase::clearAsset();
 
     // Call parent.
     Parent::onSleep();
 }
 
-//------------------------------------------------------------------------------
-
-void GuiSpriteCtrl::processTick( void )
-{
-    // Are we in static mode?
-    if ( isStaticMode() )
-    {
-        // Yes, so turn-off tick processing.
-        setProcessTicks( false );
-
-        return;
-    }
-
-    // Finish if no animation controller.
-    if ( mpAnimationController == NULL )
-        return;
-
-    // Finish if the animation has finished.
-    if ( mpAnimationController->isAnimationFinished() )
-        return;
-
-    // Finish if animation is paused.
-    if ( mAnimationPaused )
-        return;
-
-    // Update the animation.
-    mpAnimationController->updateAnimation( Tickable::smTickSec );
-
-    // Finish if the animation has not finished.
-    if ( !mpAnimationController->isAnimationFinished() )
-        return;
-
-    // Turn-off tick processing.
-    setProcessTicks( false );
-}
-
 //-----------------------------------------------------------------------------
 
-void GuiSpriteCtrl::setImage( const char* pImageAssetId )
+bool GuiSpriteCtrl::setImage( const char* pImageAssetId )
 {
     // Sanity!
     AssertFatal( pImageAssetId != NULL, "Cannot use a NULL asset Id." );
 
+    // Reset animation.
+    mAnimationAssetId = StringTable->EmptyString;
+
     // Fetch the asset Id.
     mImageAssetId = StringTable->insert(pImageAssetId);
 
     // Reset image frame.
-    mImageFrame = 0;
+	mImageFrame = 0;
 
-    // Assign asset if awake.
-    if ( isAwake() )
-        mImageAsset = mImageAssetId;
-    
-    // Set static mode.
-    mStaticMode = true;
+	// Finish if not awake.
+    if ( !isAwake() )
+		return true;
 
-    // Reset animation.
-    mAnimationAssetId = StringTable->EmptyString;
-
-    // Destroy animation controller if required.
-    if ( mpAnimationController != NULL )
-    {
-        delete mpAnimationController;
-        mpAnimationController = NULL;
-    }
+	// Call parent.
+	if ( !SpriteProxyBase::setImage( pImageAssetId, 0 ) )
+		return false;
 
     // Update control.
     setUpdate();
+
+	return true;
 }
 
 //-----------------------------------------------------------------------------
 
-void GuiSpriteCtrl::setImageFrame( const U32 imageFrame )
+bool GuiSpriteCtrl::setImageFrame( const U32 frame )
 {
-    // Set image frame.
-    mImageFrame = imageFrame;
+	// Call parent.
+	if ( !SpriteProxyBase::setImageFrame( frame ) )
+		return false;
 
     // Update control.
     setUpdate();
+
+	return true;
 }
 
 //-----------------------------------------------------------------------------
 
-void GuiSpriteCtrl::setAnimation( const char* pAnimationAssetId )
+bool GuiSpriteCtrl::setAnimation( const char* pAnimationAssetId )
 {
     // Sanity!
     AssertFatal( pAnimationAssetId != NULL, "Cannot use a NULL asset Id." );
@@ -231,165 +161,29 @@ void GuiSpriteCtrl::setAnimation( const char* pAnimationAssetId )
     // Reset the image asset Id.
     mImageAssetId = StringTable->EmptyString;
 
-    // Reset image frame.
-    mImageFrame = 0;
-
-    // Reset static mode.
-    mStaticMode = false;
-
-    // Assign asset if awake.
-    if ( isAwake() )
-    {
-        // Set animation asset if it's valid.
-        if ( mAnimationAssetId != StringTable->EmptyString )
-        {
-            // Create animation controller if required.
-            if ( mpAnimationController == NULL )
-                mpAnimationController = new AnimationController();
-
-            // Play animation.
-            mpAnimationController->playAnimation( mAnimationAssetId, false );
-
-            // Turn-on tick processing.
-            setProcessTicks( true );
-        }
-    }
-}
-
-//-----------------------------------------------------------------------------
-
-void GuiSpriteCtrl::play(void)
-{
-    // Sanity!
-    if (mStaticMode)
-        return;
-
-    // Reset animation pause.
-    mAnimationPaused = false;
-
-    // Assign asset if awake.
-    if ( isAwake() )
-    {
-        // Set animation asset if it's valid.
-        if ( mAnimationAssetId != StringTable->EmptyString )
-        {
-            // Play animation.
-            mpAnimationController->playAnimation( mAnimationAssetId, false );
-
-            // Turn-on tick processing.
-            setProcessTicks( true );
-        }
-    }
-}
-
-//-----------------------------------------------------------------------------
-
-void GuiSpriteCtrl::pause(bool flag)
-{
-    // Finish if not awake.
-    if ( !isAwake() )
-        return;
-
-    // Finish if no animation.
-    if ( mpAnimationController == NULL )
-        return;
-
-    // Pause the animation.
-    mAnimationPaused = flag;
-}
-
-//-----------------------------------------------------------------------------
-
-void GuiSpriteCtrl::stop(void)
-{
     // Finish if not awake.
     if ( !isAwake() )
-        return;
+		return true;
 
-    // Finish if no animation.
-    if ( mpAnimationController == NULL )
-        return;
+    // Play animation asset if it's valid.
+    if ( mAnimationAssetId != StringTable->EmptyString )
+		SpriteProxyBase::setAnimation( mAnimationAssetId, false );
 
-    // Stop the animation.
-    mAnimationPaused = false;
-    mpAnimationController->stopAnimation();
+	return true;
 }
 
 //-----------------------------------------------------------------------------
 
 void GuiSpriteCtrl::onRender( Point2I offset, const RectI &updateRect)
 {
-    // Are we in static mode?
-    if ( isStaticMode() )
-    {
-        // Do we have a valid image to render?
-        if ( mImageAsset.notNull() && mImageAsset->isAssetValid() && mImageFrame < mImageAsset->getFrameCount() )
-        {
-            // Yes, so calculate source region.
-            const ImageAsset::FrameArea::PixelArea& pixelArea = mImageAsset->getImageFrameArea( mImageFrame ).mPixelArea;
-            RectI sourceRegion( pixelArea.mPixelOffset, Point2I(pixelArea.mPixelWidth, pixelArea.mPixelHeight) );
-
-            // Calculate destination region.
-            RectI destinationRegion(offset, mBounds.extent);
-
-            // Render image.
-            dglSetBitmapModulation( mProfile->mFillColor );
-            dglDrawBitmapStretchSR( mImageAsset->getImageTexture(), destinationRegion, sourceRegion );
-            dglClearBitmapModulation();
-        }
-        else
-        {
-            // No, so render no-image render-proxy.
-            renderNoImage( offset, updateRect );
-        }
-    }
-    else
-    {
-        // Do we have a valid animation to render?
-        if ( mpAnimationController != NULL && mpAnimationController->isAnimationValid() )
-        {
-            // Yes, so calculate source region.
-            const ImageAsset::FrameArea::PixelArea& pixelArea = mpAnimationController->getCurrentImageFrameArea().mPixelArea;
-            RectI sourceRegion( pixelArea.mPixelOffset, Point2I(pixelArea.mPixelWidth, pixelArea.mPixelHeight) );
-
-            // Calculate destination region.
-            RectI destinationRegion(offset, mBounds.extent);
-
-            // Render animation image.
-            dglSetBitmapModulation( mProfile->mFillColor );
-            dglDrawBitmapStretchSR( mpAnimationController->getImageTexture(), destinationRegion, sourceRegion );
-            dglClearBitmapModulation();
-
-            // Update control.
-            setUpdate();
-        }
-        else
-        {
-            // No, so render no-image render-proxy.
-            renderNoImage( offset, updateRect );
-        }
-    }
-
-    // Render child controls.
-    renderChildControls(offset, updateRect);
+	// Call parent.
+	SpriteProxyBase::renderGui( *this, offset, updateRect );
 }
 
 //------------------------------------------------------------------------------
 
-void GuiSpriteCtrl::renderNoImage( Point2I &offset, const RectI& updateRect )
+void GuiSpriteCtrl::onAnimationEnd( void )
 {
-    // Fetch the 'cannot render' proxy.
-    RenderProxy* pNoImageRenderProxy = Sim::findObject<RenderProxy>( CANNOT_RENDER_PROXY_NAME );
-
-    // Finish if no render proxy available or it can't render.
-    if ( pNoImageRenderProxy == NULL || !pNoImageRenderProxy->validRender() )
-        return;
-
-    // Render using render-proxy.
-    pNoImageRenderProxy->renderGui( *this, offset, updateRect );
-
-    // Update control.
-    setUpdate();
+    // Clear assets.
+	SpriteProxyBase::clearAsset();
 }
-
-

+ 12 - 43
engine/source/2d/gui/guiSpriteCtrl.h

@@ -27,25 +27,13 @@
 #include "gui/guiControl.h"
 #endif
 
-#ifndef _IMAGE_ASSET_H_
-#include "2d/assets/ImageAsset.h"
-#endif
-
-#ifndef _ANIMATION_CONTROLLER_H_
-#include "2d/assets/AnimationController.h"
-#endif
-
-#ifndef _ASSET_PTR_H_
-#include "assets/assetPtr.h"
-#endif
-
-#ifndef _TICKABLE_H_
-#include "platform/Tickable.h"
+#ifndef _SPRITE_PROXY_BASE_H_
+#include "2d/core/SpriteProxyBase.h"
 #endif
 
 //-----------------------------------------------------------------------------
 
-class GuiSpriteCtrl : public GuiControl, public virtual Tickable
+class GuiSpriteCtrl : public GuiControl, public SpriteProxyBase
 {
 private:
     typedef GuiControl Parent;
@@ -53,13 +41,6 @@ private:
 protected:
     StringTableEntry                mImageAssetId;
     StringTableEntry                mAnimationAssetId;
-    U32                             mImageFrame;
-    bool                            mAnimationPaused;
-
-    AssetPtr<ImageAsset>            mImageAsset;
-
-    bool                            mStaticMode;
-    AnimationController*            mpAnimationController;
 
 public:
     GuiSpriteCtrl();
@@ -67,39 +48,27 @@ public:
     bool onWake();
     void onSleep();
     void onRender(Point2I offset, const RectI &updateRect);
-    void renderNoImage( Point2I &offset, const RectI& updateRect );
     static void initPersistFields();
 
-    /// Integration.
-    virtual void processTick();
-    virtual void interpolateTick( F32 delta ) {};
-    virtual void advanceTime( F32 timeDelta ) {};
-
-    /// Static.
-    void setImage( const char* pImageAssetId );
-    inline StringTableEntry getImage( void ) const { if ( isStaticMode() ) return mImageAssetId; else return StringTable->EmptyString; };
-    void setImageFrame( const U32 imageFrame );
-    inline U32 getImageFrame( void ) const { return mImageFrame; };
-
-    /// Animation.
-    void setAnimation( const char* pAnimationAssetId );
-    inline StringTableEntry getAnimation( void ) const { if ( isStaticMode() ) return StringTable->EmptyString; else return mAnimationAssetId; };
-    inline bool isStaticMode( void ) const { return mStaticMode; }
-    void play(void);
-    void pause(bool);
-    void stop(void);
+	/// Static and Animated Assets.
+    virtual bool setImage( const char* pImageAssetId );
+    virtual bool setImageFrame( const U32 frame );
+    virtual bool setAnimation( const char* pAnimationAssetId );
 
     // Declare type.
     DECLARE_CONOBJECT(GuiSpriteCtrl);
 
+protected:
+    virtual void onAnimationEnd( void );
+
 protected:
     static bool setImage(void* obj, const char* data) { static_cast<GuiSpriteCtrl*>(obj)->setImage( data ); return false; }
-    static const char* getImage(void* obj, const char* data) { return static_cast<GuiSpriteCtrl*>(obj)->getImage(); }
+    static const char* getImage(void* obj, const char* data) { return DYNAMIC_VOID_CAST_TO(GuiSpriteCtrl, SpriteProxyBase, obj)->getImage(); }
     static bool writeImage( void* obj, StringTableEntry pFieldName ) { GuiSpriteCtrl* pCastObject = static_cast<GuiSpriteCtrl*>(obj); if ( !pCastObject->isStaticMode() ) return false; return pCastObject->mImageAssetId != StringTable->EmptyString; }
     static bool setImageFrame(void* obj, const char* data) { static_cast<GuiSpriteCtrl*>(obj)->setImageFrame( dAtoi(data) ); return false; }
     static bool writeImageFrame( void* obj, StringTableEntry pFieldName ) { GuiSpriteCtrl* pCastObject = static_cast<GuiSpriteCtrl*>(obj); return pCastObject->isStaticMode() && pCastObject->getImageFrame() > 0; }
     static bool setAnimation(void* obj, const char* data) { static_cast<GuiSpriteCtrl*>(obj)->setAnimation(data); return false; };
-    static const char* getAnimation(void* obj, const char* data) { return static_cast<GuiSpriteCtrl*>(obj)->getAnimation(); }
+    static const char* getAnimation(void* obj, const char* data) { return DYNAMIC_VOID_CAST_TO(GuiSpriteCtrl, SpriteProxyBase, obj)->getAnimation(); }
     static bool writeAnimation( void* obj, StringTableEntry pFieldName ) { GuiSpriteCtrl* pCastObject = static_cast<GuiSpriteCtrl*>(obj); if ( pCastObject->isStaticMode() ) return false; return pCastObject->mAnimationAssetId != StringTable->EmptyString; }
 };
 

+ 2 - 51
engine/source/2d/gui/guiSpriteCtrl_ScriptBindings.h

@@ -49,7 +49,7 @@ ConsoleMethod( GuiSpriteCtrl, getImage, const char*, 2, 2,  "() - Gets current i
     }
 
     // Get image.
-    return object->getImage();
+    return DYNAMIC_VOID_CAST_TO(GuiSpriteCtrl, SpriteProxyBase, object)->getImage();
 }
 
 //-----------------------------------------------------------------------------
@@ -102,54 +102,5 @@ ConsoleMethod( GuiSpriteCtrl, getAnimation, const char*, 2, 2,  "() - Gets the c
     }
 
     // Get animation.
-    return object->getAnimation();
-}
-
-//------------------------------------------------------------------------------
-
-ConsoleMethod( GuiSpriteCtrl, play, void, 2, 2,  "() - plays the control's current animation.  Resumes playback if paused.\n")
-{
-    // Are we in static mode?
-    if ( object->isStaticMode() )
-    {
-        // Yes, so warn.
-        Con::warnf( "GuiSpriteCtrl::play() - Method invalid, in static mode." );
-        return;
-    }
-
-    // play animation.
-    object->play();
-}
-
-//------------------------------------------------------------------------------
-
-ConsoleMethod( GuiSpriteCtrl, pause, void, 3, 3,  "(bool flag) - pauses/unpauses the control's current animation.\n"
-                                                    "@param flag true to pause, false to resume.")
-{
-    // Are we in static mode?
-    if ( object->isStaticMode() )
-    {
-        // Yes, so warn.
-        Con::warnf( "GuiSpriteCtrl::pause() - Method invalid, in static mode." );
-        return;
-    }
-
-    // pause animation.
-    object->pause( dAtob(argv[2]) );
-}
-
-//------------------------------------------------------------------------------
-
-ConsoleMethod( GuiSpriteCtrl, stop, void, 2, 2,  "() - stops the control's current animation.\n")
-{
-    // Are we in static mode?
-    if ( object->isStaticMode() )
-    {
-        // Yes, so warn.
-        Con::warnf( "GuiSpriteCtrl::stop() - Method invalid, in static mode." );
-        return;
-    }
-
-    // stop animation.
-    object->stop();
+    return DYNAMIC_VOID_CAST_TO(GuiSpriteCtrl, SpriteProxyBase, object)->getAnimation();
 }

+ 8 - 2
engine/source/2d/scene/Scene.cc

@@ -562,10 +562,10 @@ void Scene::dispatchBeginContactCallbacks( void )
             continue;
 
         // Fetch normal and contact points.
+        const U32& pointCount = tickContact.mPointCount;
         const b2Vec2& normal = tickContact.mWorldManifold.normal;
         const b2Vec2& point1 = tickContact.mWorldManifold.points[0];
         const b2Vec2& point2 = tickContact.mWorldManifold.points[1];
-        const U32& pointCount = tickContact.mPointCount;
         const S32 shapeIndexA = pSceneObjectA->getCollisionShapeIndex( tickContact.mpFixtureA );
         const S32 shapeIndexB = pSceneObjectB->getCollisionShapeIndex( tickContact.mpFixtureB );
 
@@ -600,7 +600,7 @@ void Scene::dispatchBeginContactCallbacks( void )
                 normalImpulse2,
                 tangentImpulse2 );
         }
-        else
+        else if ( pointCount == 1 )
         {
             dSprintf(pMiscInfoBuffer, 128,
                 "%d %d %0.4f %0.4f %0.4f %0.4f %0.4f %0.4f",
@@ -610,6 +610,12 @@ void Scene::dispatchBeginContactCallbacks( void )
                 normalImpulse1,
                 tangentImpulse1 );
         }
+		else
+		{
+            dSprintf(pMiscInfoBuffer, 64,
+                "%d %d",
+                shapeIndexA, shapeIndexB );
+		}
 
         // Script callback.
         Con::executef( this, 4, "onCollision",

+ 84 - 86
engine/source/2d/scene/Scene_ScriptBinding.h

@@ -467,8 +467,8 @@ ConsoleMethod(Scene, deleteJoint, bool, 3, 3,           "(int jointId) Deletes t
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createDistanceJoint, S32, 4, 12,   "(sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [distance], [frequency], [dampingRatio], [collideConnected]) Creates a distance joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param distance The distance the joint should maintain between scene objects.  The default is the distance currently between the scene objects.\n"
@@ -477,26 +477,26 @@ ConsoleMethod(Scene, createDistanceJoint, S32, 4, 12,   "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createDistanceJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if (*sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createDistanceJoint() - Could not find scene object %d.", sceneObjectB);
@@ -683,34 +683,34 @@ ConsoleMethod(Scene, getDistanceJointDampingRatio, F32, 3, 3,   "(jointId) Gets
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createRopeJoint, S32, 4, 10,       "(sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [maxLength], [collideConnected]) Creates a rope joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param maxLength The maximum rigid length of the rope.\n"
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createRopeJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if (*sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createRopeJoint() - Could not find scene object %d.", sceneObjectB);
@@ -821,33 +821,33 @@ ConsoleMethod(Scene, getRopeJointMaxLength, F32, 3, 3,     "(jointId) Gets the m
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createRevoluteJoint, S32, 4, 9,    "(sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [collideConnected]) Creates a revolute joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createRevoluteJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if ( *sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createRevoluteJoint() - Could not find scene object %d.", sceneObjectB);
@@ -1014,8 +1014,8 @@ ConsoleMethod(Scene, getRevoluteJointMotor, const char*, 3, 3,  "(jointId) Gets
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createWeldJoint, S32, 4, 11,       "(sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [frequency], [dampingRatio], [collideConnected]) Creates a weld joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param frequency The mass-spring-damper frequency in Hertz. A value of 0 disables softness (default).\n"
@@ -1023,26 +1023,26 @@ ConsoleMethod(Scene, createWeldJoint, S32, 4, 11,       "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createWeldJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if ( *sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createWeldJoint() - Could not find scene object %d.", sceneObjectB);
@@ -1191,34 +1191,34 @@ ConsoleMethod(Scene, getWeldJointDampingRatio, F32, 3, 3,       "(jointId) Gets
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createWheelJoint, S32, 7, 11,      "(sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y, [collideConnected]) Creates a wheel joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param worldAxis The world axis of the wheel suspension spring.\n"
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createWheelJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if ( *sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createWheelJoint() - Could not find scene object %d.", sceneObjectB);
@@ -1409,8 +1409,8 @@ ConsoleMethod(Scene, getWheelJointDampingRatio, F32, 3, 3,      "(jointId) Gets
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createFrictionJoint, S32, 4, 11,   "(sceneObjectA, sceneObjectB, [localAnchorA X/Y], [localAnchorB X/Y], [maxForce], [maxTorque], [collideConnected]) Creates a friction joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param maxForce The maximum friction force (N).\n"
@@ -1418,26 +1418,26 @@ ConsoleMethod(Scene, createFrictionJoint, S32, 4, 11,   "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createFrictionJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if ( *sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createFrictionJoint() - Could not find scene object %d.", sceneObjectB);
@@ -1581,34 +1581,34 @@ ConsoleMethod(Scene, getFrictionJointMaxTorque, F32, 3, 3,  "(jointId) Gets the
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createPrismaticJoint, S32, 7, 11,  "(sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y, [collideConnected]) Creates a prismatic joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param worldAxis The world axis defining the translational degree of freedom.\n"
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createPrismaticJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if ( *sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createPrismaticJoint() - Could not find scene object %d.", sceneObjectB);
@@ -1784,8 +1784,8 @@ ConsoleMethod(Scene, getPrismaticJointMotor, const char*, 3, 3,    "(jointId) Ge
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createPulleyJoint, S32, 9, 16,     "(sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldGroundAnchorA X/Y, worldGroundAnchorB X/Y, ratio, [lengthA], [lengthB], [collideConnected]) Creates a prismatic joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param localAnchorA The local point of the first scene object where the joint connects.\n"
                                                                 "@param localAnchorB The local point of the second scene object where the joint connects.\n"
                                                                 "@param worldGroundAnchorA The world point of the first ground anchor.  This point never moves.\n"
@@ -1796,26 +1796,26 @@ ConsoleMethod(Scene, createPulleyJoint, S32, 9, 16,     "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createPulleyJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if ( *sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createPulleyJoint() - Could not find scene object %d.", sceneObjectB);
@@ -1932,15 +1932,13 @@ ConsoleMethod(Scene, createTargetJoint, S32, 5, 10,     "(sceneObject, worldTarg
                                                         "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                         "@return The joint Id (-1 if error).")
 {
-    // Fetch scene object.
-    const SimObjectId sceneObject = dAtoi(argv[2]);
-
-    SceneObject* pSceneObject = dynamic_cast<SceneObject*>( Sim::findObject(sceneObject) );
+	// Fetch scene object.
+    SceneObject* pSceneObject = Sim::findObject<SceneObject>(argv[2]);
 
     // Check scene object.
     if ( !pSceneObject )
     {
-        Con::warnf("Scene::createTargetJoint() - Could not find scene object %d.", sceneObject);
+        Con::warnf("Scene::createTargetJoint() - Could not find scene object %d.", argv[2]);
         return -1;
     }
 
@@ -2115,8 +2113,8 @@ ConsoleMethod(Scene, getTargetJointDampingRatio, F32, 3, 3,    "(jointId) Sets t
 //-----------------------------------------------------------------------------
 
 ConsoleMethod(Scene, createMotorJoint, S32, 4, 11,      "(sceneObjectA, sceneObjectB, [linearOffset X/Y], [angularOffset], [maxForce], [maxTorque], [correctionFactor], [collideConnected]) Creates a motor joint.\n"
-                                                                "@param sceneObjectA The first scene object to connect to the joint.\n"
-                                                                "@param sceneObjectB The second scene object to connect to the joint.\n"
+                                                                "@param sceneObjectA The first scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
+                                                                "@param sceneObjectB The second scene object to connect to the joint.  Use an empty string to indicate the Scene ground body.\n"
                                                                 "@param linearOffsetX/Y The linear offset in sceneObjectA space.\n"
                                                                 "@param angularOffset The angularOffset between the bodies.\n"
                                                                 "@param maxForce The maximum friction force (N).\n"
@@ -2125,26 +2123,26 @@ ConsoleMethod(Scene, createMotorJoint, S32, 4, 11,      "(sceneObjectA, sceneObj
                                                                 "@param collideConnected Whether the scene objects can collide with each other while connected with this joint.\n"
                                                                 "@return The joint Id (-1 if error).")
 {
-    // Fetch scene objects.
-    const SimObjectId sceneObjectA = dAtoi(argv[2]);
-    const SimObjectId sceneObjectB = dAtoi(argv[3]);
+	// Fetch scene object references.
+	const char* sceneObjectA = argv[2];
+	const char* sceneObjectB = argv[3];
 
     SceneObject* pSceneObjectA = NULL;
     SceneObject* pSceneObjectB = NULL;
 
     // Fetch scene object.
-    if ( sceneObjectA != 0 )
+    if ( *sceneObjectA != 0 )
     {
-        pSceneObjectA = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectA) );
+        pSceneObjectA = Sim::findObject<SceneObject>(sceneObjectA);
 
         if ( !pSceneObjectA )
             Con::warnf("Scene::createMotorJoint() - Could not find scene object %d.", sceneObjectA);
     }
 
     // Fetch scene object.
-    if ( sceneObjectB != 0 )
+    if ( *sceneObjectB != 0 )
     {
-        pSceneObjectB = dynamic_cast<SceneObject*>( Sim::findObject(sceneObjectB) );
+        pSceneObjectB = Sim::findObject<SceneObject>(sceneObjectB);
 
         if ( !pSceneObjectB )
             Con::warnf("Scene::createMotorJoint() - Could not find scene object %d.", sceneObjectB);

+ 29 - 19
engine/source/2d/sceneobject/SceneObject.cc

@@ -52,10 +52,6 @@
 #include "component/behaviors/behaviorTemplate.h"
 #endif
 
-#ifndef _SCENE_OBJECT_TIMER_EVENT_H_
-#include "2d/sceneobject/SceneObjectTimerEvent.h"
-#endif
-
 #ifndef _SCENE_OBJECT_MOVE_TO_EVENT_H_
 #include "2d/sceneobject/SceneObjectMoveToEvent.h"
 #endif
@@ -204,7 +200,6 @@ SceneObject::SceneObject() :
     mEditorTickAllowed(true),
     mPickingAllowed(true),
     mAlwaysInScope(false),
-    mPeriodicTimerID(0),
     mMoveToEventId(0),
     mRotateToEventId(0),
     mSerialId(0),
@@ -1639,19 +1634,26 @@ void SceneObject::onEndCollision( const TickContact& tickContact )
 
 //-----------------------------------------------------------------------------
 
-bool SceneObject::moveTo( const Vector2& targetWorldPoint, const U32 time, const bool autoStop, const bool warpToTarget )
+bool SceneObject::moveTo( const Vector2& targetWorldPoint, const F32 speed, const bool autoStop, const bool warpToTarget )
 {
     // Check in a scene.
     if ( !getScene() )
     {
-        Con::warnf("Cannot move object (%d) to a point as it is not in a scene.", getId() );
+        Con::warnf("SceneObject::moveTo() - Cannot move object (%d) to a point as it is not in a scene.", getId() );
         return false;
     }
 
     // Check not a static body.
     if ( getBodyType() == b2_staticBody )
     {
-        Con::warnf("Cannot move object (%d) to a point as it is a static body.", getId() );
+        Con::warnf("SceneObject::moveTo() - Cannot move object (%d) to a point as it is a static body.", getId() );
+        return false;
+    }
+
+    // Check speed.
+    if ( speed <= 0.0f )
+    {
+        Con::warnf("SceneObject::moveTo() - Speed '%f' is invalid.", speed );
         return false;
     }
 
@@ -1662,11 +1664,12 @@ bool SceneObject::moveTo( const Vector2& targetWorldPoint, const U32 time, const
         mMoveToEventId = 0;
     }
 
-    // Calculate relative position.
-    const Vector2 relativePosition = targetWorldPoint - getPosition();
+    // Calculate the linear velocity for the specified speed.
+    Vector2 linearVelocity = targetWorldPoint - getPosition();
+    const F32 distance = linearVelocity.Normalize( speed );
 
-    // Calculate linear velocity to use over time.
-    const Vector2 linearVelocity = relativePosition / (time * 0.001f);
+    // Calculate the time it will take to reach the target.
+    const U32 time = (U32)((distance / speed) * 1000.0f);
 
     // Set the linear velocity.
     setLinearVelocity( linearVelocity );
@@ -1680,19 +1683,26 @@ bool SceneObject::moveTo( const Vector2& targetWorldPoint, const U32 time, const
 
 //-----------------------------------------------------------------------------
 
-bool SceneObject::rotateTo( const F32 targetAngle, const U32 time, const bool autoStop, const bool warpToTarget )
+bool SceneObject::rotateTo( const F32 targetAngle, const F32 speed, const bool autoStop, const bool warpToTarget )
 {
     // Check in a scene.
     if ( !getScene() )
     {
-        Con::warnf("Cannot rotate object (%d) to an angle as it is not in a scene.", getId() );
+        Con::warnf("SceneObject::rotateTo() - Cannot rotate object (%d) to an angle as it is not in a scene.", getId() );
         return false;
     }
 
     // Check not a static body.
     if ( getBodyType() == b2_staticBody )
     {
-        Con::warnf("Cannot move object (%d) to an angle as it is a static body.", getId() );
+        Con::warnf("SceneObject::rotateTo() - Cannot move object (%d) to an angle as it is a static body.", getId() );
+        return false;
+    }
+
+    // Check speed.
+    if ( speed <= 0.0f )
+    {
+        Con::warnf("SceneObject::rotateTo() - Speed '%f' is invalid.", speed );
         return false;
     }
 
@@ -1709,11 +1719,11 @@ bool SceneObject::rotateTo( const F32 targetAngle, const U32 time, const bool au
     // Calculate delta angle.
     const F32 deltaAngle = mAtan( mSin( relativeAngle ), mCos( relativeAngle ) );
 
-    // Calculate angular velocity over time.
-    const F32 angularVelocity = deltaAngle / (time * 0.001f);
-
     // Set angular velocity.
-    setAngularVelocity( angularVelocity );
+    setAngularVelocity( deltaAngle > 0.0f ? speed : -speed );
+
+    // Calculate the time it will take to reach the angle.
+    const U32 time = (U32)(mFabs(deltaAngle / speed) * 1000.0f);
 
     // Create and post event.
     SceneObjectRotateToEvent* pEvent = new SceneObjectRotateToEvent( targetAngle, autoStop, warpToTarget );

+ 2 - 5
engine/source/2d/sceneobject/SceneObject.h

@@ -220,7 +220,6 @@ protected:
     bool                    mEditorTickAllowed;
     bool                    mPickingAllowed;
     bool                    mAlwaysInScope;
-    S32                     mPeriodicTimerID;
     U32                     mMoveToEventId;
     U32                     mRotateToEventId;
     U32                     mSerialId;
@@ -395,8 +394,8 @@ public:
     inline F32              getAngularDamping(void) const               { if ( mpScene ) return mpBody->GetAngularDamping(); else return mBodyDefinition.angularDamping; }
 
     /// Move/Rotate to.
-    bool                    moveTo( const Vector2& targetWorldPoint, const U32 time = 1000, const bool autoStop = true, const bool warpToTarget = true );
-    bool                    rotateTo( const F32 targetAngle, const U32 time = 1000, const bool autoStop = true, const bool warpToTarget = true );
+    bool                    moveTo( const Vector2& targetWorldPoint, const F32 speed, const bool autoStop = true, const bool warpToTarget = true );
+    bool                    rotateTo( const F32 targetAngle, const F32 speed, const bool autoStop = true, const bool warpToTarget = true );
     void                    cancelMoveTo( const bool autoStop = true );
     void                    cancelRotateTo( const bool autoStop = true );
     inline bool             isMoveToComplete( void ) const              { return mMoveToEventId == 0; }
@@ -564,8 +563,6 @@ public:
     inline const char*      scriptThis(void) const                      { return Con::getIntArg(getId()); }
     inline bool             getIsPickingAllowed(void) const             { return mPickingAllowed; }
     inline bool             getIsAlwaysInScope(void) const              { return mAlwaysInScope; }
-    inline void             setPeriodicTimerID( S32 timerID )           { mPeriodicTimerID = timerID; }
-    inline S32              getPeriodicTimerID( void ) const            { return mPeriodicTimerID; }
     inline void             setWorldQueryKey( const U32 key )           { mWorldQueryKey = key; }
     inline U32              getWorldQueryKey( void ) const              { return mWorldQueryKey; }
     BehaviorInstance*       behavior(const char *name);

+ 29 - 76
engine/source/2d/sceneobject/SceneObject_ScriptBinding.h

@@ -1017,10 +1017,10 @@ ConsoleMethod(SceneObject, getContact, const char*, 3, 3,    "(contactIndex) Get
     AssertFatal( shapeIndexCollider >= 0, "SceneObject::getContact() - Cannot find shape index reported on physics proxy of a fixture." );
 
     // Fetch normal and contact points.
+    const U32& pointCount = tickContact.mPointCount;
     const b2Vec2& normal = tickContact.mWorldManifold.normal;
     const b2Vec2& point1 = tickContact.mWorldManifold.points[0];
     const b2Vec2& point2 = tickContact.mWorldManifold.points[1];
-    const U32& pointCount = tickContact.mPointCount;
 
     // Fetch collision impulse information
     const F32 normalImpulse1 = tickContact.mNormalImpulses[0];
@@ -1044,7 +1044,7 @@ ConsoleMethod(SceneObject, getContact, const char*, 3, 3,    "(contactIndex) Get
             normalImpulse2,
             tangentImpulse2 );
     }
-    else
+    else if ( pointCount == 1 )
     {
         dSprintf(pReturnBuffer, 128,
             "%d %d %d %0.4f %0.4f %0.4f %0.4f %0.4f %0.4f",
@@ -1055,6 +1055,13 @@ ConsoleMethod(SceneObject, getContact, const char*, 3, 3,    "(contactIndex) Get
             normalImpulse1,
             tangentImpulse1 );
     }
+	else
+	{
+        dSprintf(pReturnBuffer, 64,
+            "%d %d %d",
+            pSceneObjectCollider,
+            shapeIndexThis, shapeIndexCollider );
+	}
 
     return pReturnBuffer;
 }
@@ -1610,13 +1617,13 @@ ConsoleMethod(SceneObject, getAngularDamping, F32, 2, 2, "() - Gets the angular
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod(SceneObject, moveTo, bool, 3, 7,  "(worldPoint X/Y, [time = 1000], [autoStop = true], [warpToTarget = true]) - Moves the object to the specified world point.\n"
+ConsoleMethod(SceneObject, moveTo, bool, 4, 7,  "(worldPoint X/Y, time, [autoStop = true], [warpToTarget = true]) - Moves the object to the specified world point.\n"
                                                 "The point is moved by calculating the initial linear velocity required and applies it.\n"
                                                 "The object may never reach the point if it has linear damping applied or collides with another object.\n"
-                                                "@param worldPoint/Y - The world point to move the object to.\n"
-                                                "@param time - The time (milliseconds) taken to move the object to the specified point."
-                                                "@param autoStop? - Whether to automatically set the linear velocity to zero when time has elapsed or not\n"
-                                                "@param warpToTarget? - Whether to move instantly to the target point after the specified time or not in-case the target was not quite reached.\n"
+                                                "@param worldPoint/Y The world point to move the object to.\n"
+                                                "@param speed The speed (in m/s) to use to move to the specified point."
+                                                "@param autoStop? Whether to automatically set the linear velocity to zero when time has elapsed or not\n"
+                                                "@param warpToTarget? Whether to move instantly to the target point after the specified time or not in-case the target was not quite reached.\n"
                                                 "@return Whether the move could be started or not.")
 {
     // World point.
@@ -1641,17 +1648,12 @@ ConsoleMethod(SceneObject, moveTo, bool, 3, 7,  "(worldPoint X/Y, [time = 1000],
         return false;
     }
 
-    if ( argc <= nextArg )
-    {
-        return object->moveTo( worldPoint );
-    }
-
-    // Time.
-    const U32 time = dAtoi(argv[nextArg++]);
+    // Speed.
+    const F32 speed = dAtof(argv[nextArg++]);
 
     if ( argc <= nextArg )
     {
-        return object->moveTo( worldPoint, time );
+        return object->moveTo( worldPoint, speed );
     }
 
     // Auto stop?
@@ -1659,40 +1661,35 @@ ConsoleMethod(SceneObject, moveTo, bool, 3, 7,  "(worldPoint X/Y, [time = 1000],
 
     if ( argc <= nextArg )
     {
-        return object->moveTo( worldPoint, time, autoStop );
+        return object->moveTo( worldPoint, speed, autoStop );
     }
 
     // Warp to target?
     const bool warpToTarget = dAtob(argv[nextArg++]);
 
-    return object->moveTo( worldPoint, time, autoStop, warpToTarget );
+    return object->moveTo( worldPoint, speed, autoStop, warpToTarget );
 }
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod(SceneObject, rotateTo, bool, 3, 6,    "(angle, [time = 1000], [autoStop = true], [warpToTarget = true]) - Rotates the object to the specified angle.\n"
+ConsoleMethod(SceneObject, rotateTo, bool, 4, 6,    "(angle, speed, [autoStop = true], [warpToTarget = true]) - Rotates the object to the specified angle.\n"
                                                     "The angle is rotated to by calculating the initial angular velocity required and applies it.\n"
                                                     "The object may never reach the point if it has angular damping applied or collides with another object.\n"
-                                                    "@param angle- The angle to rotate the object to.\n"
-                                                    "@param time - The time (milliseconds) taken to rotate the object to the specified angle."
-                                                    "@param autoStop? - Whether to automatically set the angular velocity to zero when time has elapsed or not\n"
-                                                    "@param warpToTarget? - Whether to rotate instantly to the target angle after the specified time or not in-case the target was not quite reached.\n"
+                                                    "@param angle The angle to rotate the object to.\n"
+                                                    "@param speed The speed (in degree/s) to use to rotate to the specified angle."
+                                                    "@param autoStop? Whether to automatically set the angular velocity to zero when time has elapsed or not\n"
+                                                    "@param warpToTarget? Whether to rotate instantly to the target angle after the specified time or not in-case the target was not quite reached.\n"
                                                     "@return Whether the rotation could be started or not.")
 {
     // Fetch angle.
     const F32 angle = mDegToRad(dAtof(argv[2]));
 
-    if ( argc == 3 )
-    {
-        return object->rotateTo( angle );
-    }
-
-    // Time.
-    const U32 time = dAtoi(argv[3]);
+    // Speed.
+    const F32 speed = mDegToRad(dAtof(argv[3]));
 
     if ( argc == 4 )
     {
-        return object->rotateTo( angle, time );
+        return object->rotateTo( angle, speed );
     }
 
     // Auto stop?
@@ -1700,13 +1697,13 @@ ConsoleMethod(SceneObject, rotateTo, bool, 3, 6,    "(angle, [time = 1000], [aut
 
     if ( argc == 5 )
     {
-        return object->rotateTo( angle, time, autoStop );
+        return object->rotateTo( angle, speed, autoStop );
     }
 
     // Warp to target.
     const bool warpToTarget = dAtob(argv[5]);
 
-    return object->rotateTo( angle, time, autoStop, warpToTarget );
+    return object->rotateTo( angle, speed, autoStop, warpToTarget );
 
 }
 
@@ -3730,50 +3727,6 @@ ConsoleMethod(SceneObject, safeDelete, void, 2, 2, "() - Safely deletes object.\
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod(SceneObject, setTimerOn, void, 3, 3, "(float timePeriod) - Starts a periodic timer for this object.\n"
-                                                      "Sets a timer on the object that, when it expires, will cause the object to execute the onTimer() callback.\n"
-                                                      "The timer event will continue to occur at regular intervals until setTimerOff() is called.\n"
-                                                      "@param timePeriod The period of time, in milliseconds, between each callback.\n"
-                                                    "@return No return Value.")
-{
-    // Is the periodic timer running?
-    if ( object->getPeriodicTimerID() != 0 )
-    {
-        // Yes, so cancel it.
-        Sim::cancelEvent( object->getPeriodicTimerID() );
-
-        // Reset Timer ID.
-        object->setPeriodicTimerID( 0 );
-    }
-
-    // Fetch Time-Delta.
-    U32 timeDelta = U32(dAtof(argv[2]));
-
-    // Create Timer Event.
-    SceneObjectTimerEvent* pEvent = new SceneObjectTimerEvent( timeDelta );
-
-    // Post Event.
-    object->setPeriodicTimerID( Sim::postEvent( object, pEvent, Sim::getCurrentTime() + timeDelta ) );
-}
-
-//-----------------------------------------------------------------------------
-
-ConsoleMethod(SceneObject, setTimerOff, void, 2, 2, "() - Stops the periodic timer for this object.\n"
-                                                                 "@return No return Value.")
-{
-    // Finish if the periodic timer isn't running.
-    if ( object->getPeriodicTimerID() == 0 )
-        return;
-
-    // Cancel It.
-    Sim::cancelEvent( object->getPeriodicTimerID() );
-
-    // Reset Timer ID.
-    object->setPeriodicTimerID( 0 );
-}
-
-//-----------------------------------------------------------------------------
-
 ConsoleMethod(SceneObject, behavior, S32, 3, 3, "(string behaviorName) - Gets the behavior instance ID off of the object based on the behavior name passed.\n"
                                                    "@param behaviorName The name of the behavior you want to get the instance ID of.\n"
                                                    "@return (integer behaviorID) The id of the behavior instance.")

+ 783 - 785
engine/source/2d/sceneobject/ShapeVector.cc

@@ -1,785 +1,783 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-#include "graphics/dgl.h"
-#include "console/consoleTypes.h"
-#include "2d/core/Utility.h"
-#include "ShapeVector.h"
-
-// Script bindings.
-#include "ShapeVector_ScriptBinding.h"
-
-//----------------------------------------------------------------------------
-
-IMPLEMENT_CONOBJECT(ShapeVector);
-
-//----------------------------------------------------------------------------
-
-ShapeVector::ShapeVector() :
-    mLineColor(ColorF(1.0f,1.0f,1.0f,1.0f)),
-    mFillColor(ColorF(0.5f,0.5f,0.5f,1.0f)),
-    mFillMode(false),
-    mPolygonScale( 1.0f, 1.0f ),
-    mIsCircle(false),
-    mCircleRadius(1.0f),
-    mFlipX(false),
-    mFlipY(false)
-{
-    // Set Vector Associations.
-    VECTOR_SET_ASSOCIATION( mPolygonBasisList );
-    VECTOR_SET_ASSOCIATION( mPolygonLocalList );
-
-   // Use a static body by default.
-   mBodyDefinition.type = b2_staticBody;
-}
-
-//----------------------------------------------------------------------------
-
-ShapeVector::~ShapeVector()
-{
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::initPersistFields()
-{
-   addProtectedField("PolyList", TypePoint2FVector, Offset(mPolygonBasisList, ShapeVector), &setPolyList, &defaultProtectedGetFn, &writePolyList, "");
-   addProtectedField("LineColor", TypeColorF, Offset(mLineColor, ShapeVector), &setLineColor, &defaultProtectedGetFn, &writeLineColor, "");
-   addProtectedField("FillColor", TypeColorF, Offset(mFillColor, ShapeVector), &setFillColor, &defaultProtectedGetFn, &writeFillColor, "");
-   addProtectedField("FillMode", TypeBool, Offset(mFillMode, ShapeVector), &setFillMode, &defaultProtectedGetFn, &writeFillMode, "");
-   addProtectedField("IsCircle", TypeBool, Offset(mIsCircle, ShapeVector), &setIsCircle, &defaultProtectedGetFn, &writeIsCircle, "");
-   addProtectedField("CircleRadius", TypeF32, Offset(mCircleRadius, ShapeVector), &setCircleRadius, &defaultProtectedGetFn, &writeCircleRadius, "");
-
-   Parent::initPersistFields();
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::copyTo(SimObject* obj)
-{
-   Parent::copyTo(obj);
-
-   AssertFatal(dynamic_cast<ShapeVector*>(obj), "ShapeVector::copyTo() - Object is not the correct type.");
-   ShapeVector* object = static_cast<ShapeVector*>(obj);
-
-   // Copy fields
-   object->mFillMode = mFillMode;
-   object->mFillColor = mFillColor;
-   object->mLineColor = mLineColor;
-   object->mIsCircle = mIsCircle;
-   object->mCircleRadius = mCircleRadius;
-   object->mFlipX = mFlipX;
-   object->mFlipY = mFlipY;
-
-   if (getPolyVertexCount() > 0)
-       object->setPolyCustom(mPolygonBasisList.size(), getPoly());
-}
-
-//----------------------------------------------------------------------------
-
-bool ShapeVector::onAdd()
-{
-   // Call Parent.
-   if(!Parent::onAdd())
-      return false;
-
-   // Return Okay.
-   return true;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::onRemove()
-{
-   // Call Parent.
-   Parent::onRemove();
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::sceneRender( const SceneRenderState* pSceneRenderState, const SceneRenderRequest* pSceneRenderRequest, BatchRender* pBatchRenderer )
-{
-    // Fetch Vertex Count.
-    const U32 vertexCount = mPolygonLocalList.size();
-
-    // Finish if not vertices.
-    if ( vertexCount == 0  && !mIsCircle)
-        return;
-
-    // Disable Texturing.
-    glDisable       ( GL_TEXTURE_2D );
-
-    // Save Model-view.
-    glMatrixMode(GL_MODELVIEW);
-    glPushMatrix();
-
-    // Fetch Position/Rotation.
-    const Vector2 position = getRenderPosition();
-
-    // Set Blend Options.
-    setBlendOptions();
-    
-    if (mIsCircle)
-    {
-        glRotatef( mRadToDeg(getRenderAngle()), 0.0f, 0.0f, 1.0f );
-        renderCircleShape(position, mCircleRadius);
-    }
-    else
-    {
-        // Move into Vector-Space.
-        glTranslatef( position.x, position.y, 0.0f );
-        glRotatef( mRadToDeg(getRenderAngle()), 0.0f, 0.0f, 1.0f );
-        renderPolygonShape(vertexCount);
-    }
-
-    // Restore Colour.
-    glColor4f( 1,1,1,1 );
-
-    // Restore Matrix.
-    glPopMatrix();
-}
-
-void ShapeVector::renderCircleShape(Vector2 position, F32 radius)
-{
-    if (mFillMode)
-    {
-        const float32 k_segments = 32.0f;
-        const float32 k_increment = 2.0f * b2_pi / k_segments;
-        float32 theta = 0.0f;
-
-        glEnable(GL_BLEND);
-        glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-        glColor4f(mFillColor.red, mFillColor.green, mFillColor.blue, mFillColor.alpha);
-
-        glBegin(GL_TRIANGLE_FAN);
-        for (int32 i = 0; i < k_segments; ++i)
-        {
-            Vector2 v = position + radius * Vector2(cosf(theta), sinf(theta));
-            glVertex2f(v.x, v.y);
-            theta += k_increment;
-        }
-        glEnd();
-
-        glDisable(GL_BLEND);
-
-        theta = 0.0f;
-        glColor4f(mLineColor.red, mLineColor.green, mLineColor.blue, 1.0f);
-        glBegin(GL_LINE_LOOP);
-        for (int32 i = 0; i < k_segments; ++i)
-        {
-            Vector2 v = position + radius * Vector2(cosf(theta), sinf(theta));
-            glVertex2f(v.x, v.y);
-            theta += k_increment;
-        }
-        glEnd();
-    }
-    else
-    {
-        const float32 k_segments = 36.0f;
-        const float32 k_increment = 2.0f * b2_pi / k_segments;
-        float32 theta = 0.0f;
-
-        glColor4f(mLineColor.red, mLineColor.green, mLineColor.blue, mLineColor.alpha);
-        
-        glBegin(GL_LINE_LOOP);
-        for (int32 i = 0; i < k_segments; ++i)
-        {
-            Vector2 v = position + radius * Vector2(cosf(theta), sinf(theta));
-            glVertex2f(v.x, v.y);
-            theta += k_increment;
-        }
-        glEnd();
-    }
-}
-
-void ShapeVector::renderPolygonShape(U32 vertexCount)
-{
-#ifdef TORQUE_OS_IOS
-    // Fill Mode?
-    if ( mFillMode )
-    {
-        // Yes, so set polygon mode to FILL.
-        //glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-
-        // Set Fill Colour.
-        glColor4f( (GLfloat)mFillColor.red, (GLfloat)mFillColor.green, (GLfloat)mFillColor.blue, (GLfloat)mFillColor.alpha );
-
-        GLfloat vert1[] = {//get first vert and make triangles based off of this one
-            (GLfloat)(mPolygonLocalList[0].x),
-            (GLfloat)(mPolygonLocalList[0].y),
-        };
-        GLfloat prevVert[] = {
-            (GLfloat)(mPolygonLocalList[1].x),
-            (GLfloat)(mPolygonLocalList[1].y),
-        };
-        
-        
-        // Draw Object.
-            for ( U32 n = 2; n < vertexCount; n++ )
-            {
-                //glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n]) );
-                GLfloat vertex[] = {
-                                    vert1[0], vert1[1],
-                                    (GLfloat)(mPolygonLocalList[n].x), (GLfloat)(mPolygonLocalList[n].y),
-                                    prevVert[0], prevVert[1],
-                };
-                
-                glVertexPointer(2, GL_FLOAT, 0, vertex );
-                glDrawArrays(GL_TRIANGLES, 0, 3 );
-                prevVert[0] = (GLfloat)(mPolygonLocalList[n].x);//save the current one's for nxt time
-                prevVert[1] = (GLfloat)(mPolygonLocalList[n].y);
-            }
-        //glDrawArrays(GL_TRIANGLES, 0, vertexCount);
-        //glEnd();
- 
-    }
-
-    // Set Line Colour.
-    glColor4f(mLineColor.red, mLineColor.green, mLineColor.blue, mLineColor.alpha );
-    
-        for ( U32 n = 1; n <= vertexCount; n++ )
-        {
-            GLfloat verts[] = {
-                (GLfloat)(mPolygonLocalList[n - 1].x),
-                (GLfloat)(mPolygonLocalList[n - 1].y),
-                (GLfloat)(mPolygonLocalList[n == vertexCount ? 0 : n].x),
-                (GLfloat)(mPolygonLocalList[n == vertexCount ? 0 : n].y),
-            };
-
-            glVertexPointer(2, GL_FLOAT, 0, verts );			
-            glDrawArrays(GL_LINE_LOOP, 0, 2);//draw last two
-        }
-
-#else
-    // Fill Mode?
-    if ( mFillMode )
-    {
-        // Yes, so set polygon mode to FILL.
-        glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
-
-        // Set Fill Colour.
-        glColor4fv( (GLfloat*)&mFillColor );
-
-        // Draw Object.
-        glBegin( GL_POLYGON );
-            for ( U32 n = 0; n < vertexCount; n++ )
-            {
-                glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n]) );
-            }
-        glEnd();
-    }
-
-    // Set Line Colour.
-    glColor4fv( (GLfloat*)&mLineColor );
-
-    // Draw Object.
-    glBegin(GL_LINES);
-        for ( U32 n = 1; n <= vertexCount; n++ )
-        {
-            glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n - 1]) );
-            glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n == vertexCount ? 0 : n]) );
-        }
-    glEnd();
-
-#endif
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setSize( const Vector2& size )
-{
-    Vector2 difference = size - mSize;
-
-    // Call Parent.
-    Parent::setSize( size );
-
-    if (mIsCircle)
-    {
-        F32 total = difference.x + difference.y;
-
-        mCircleRadius += total;
-    }
-    else
-    {
-        // Generate Local Polygon.
-        generateLocalPoly();
-    }
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setPolyScale( const Vector2& scale )
-{
-    // Check Scales.
-    if ( scale.x <= 0.0f || scale.y <= 0.0f )
-    {
-        Con::warnf("ShapeVector::setPolyScale() - Polygon Scales must be greater than zero! '%g,%g'.", scale.x, scale.y);
-        return;
-    }
-    // Check Scales.
-    if ( scale.x > 1.0f || scale.y > 1.0f )
-    {
-        Con::warnf("ShapeVector::setPolyScale() - Polygon Scales cannot be greater than one! '%g,%g'.", scale.x, scale.y);
-        return;
-    }
-
-    // Set Polygon Scale.
-    mPolygonScale = scale;
-
-    // Generation Local Poly.
-    generateLocalPoly();
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setPolyPrimitive( const U32 polyVertexCount )
-{
-    // Check it's not zero!
-    if ( polyVertexCount == 0 )
-    {
-        // Warn.
-        Con::warnf("ShapeVector::setPolyPrimitive() - Vertex count must be greater than zero!");
-        // Finish Here.
-        return;
-    }
-
-    // Clear Polygon List.
-    mPolygonBasisList.clear();
-    mPolygonBasisList.setSize( polyVertexCount );
-
-    // Point?
-    if ( polyVertexCount == 1 )
-    {
-        // Set Polygon Point.
-        mPolygonBasisList[0].Set(0.0f, 0.0f);
-    }
-    // Special-Case Quad?
-    else if ( polyVertexCount == 4 )
-    {
-        // Yes, so set Quad.
-        mPolygonBasisList[0].Set(-1.0f, -1.0f);
-        mPolygonBasisList[1].Set(+1.0f, -1.0f);
-        mPolygonBasisList[2].Set(+1.0f, +1.0f);
-        mPolygonBasisList[3].Set(-1.0f, +1.0f);
-    }
-    else
-    {
-        // No, so calculate Regular (Primitive) Polygon Stepping.
-        //
-        // NOTE:-   The polygon sits on an circle that subscribes the interior
-        //          of the collision box.
-        F32 angle = M_PI_F / polyVertexCount;
-        const F32 angleStep = M_2PI_F / polyVertexCount;
-
-        // Calculate Polygon.
-        for ( U32 n = 0; n < polyVertexCount; n++ )
-        {
-            // Calculate Angle.
-            angle += angleStep;
-            // Store Polygon Vertex.
-            mPolygonBasisList[n].Set(mCos(angle), mSin(angle));
-        }
-    }
-
-    // Generation Local Poly.
-    generateLocalPoly();
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setPolyCustom( const U32 polyVertexCount, const char* pCustomPolygon )
-{
-    // Validate Polygon.
-    if ( polyVertexCount < 1 )
-    {
-        // Warn.
-        Con::warnf("ShapeVector::setPolyCustom() - Vertex count must be greater than zero!");
-        return;
-    }
-
-    // Fetch Custom Polygon Value Count.
-    const U32 customCount = Utility::mGetStringElementCount(pCustomPolygon);
-
-    // Validate Polygon Custom Length.
-    if ( customCount != polyVertexCount*2 )
-    {
-        // Warn.
-        Con::warnf("ShapeVector::setPolyCustom() - Invalid Custom Polygon Items '%d'; expected '%d'!", customCount, polyVertexCount*2 );
-        return;
-    }
-    
-    //// Validate Polygon Vertices.
-    //for ( U32 n = 0; n < customCount; n+=2 )
-    //{
-    //    // Fetch Coordinate.
-    //    const Vector2 coord = Utility::mGetStringElementVector(pCustomPolygon, n);
-    //    // Check Range.
-    //    if ( coord.x < -1.0f || coord.x > 1.0f || coord.y < -1.0f || coord.y > 1.0f )
-    //    {
-    //        // Warn.
-    //        Con::warnf("ShapeVector::setPolyCustom() - Invalid Polygon Coordinate range; Must be -1 to +1! '(%g,%g)'", coord.x, coord.y );
-    //        return;
-    //    }
-    //}
-
-    // Clear Polygon Basis List.
-    mPolygonBasisList.clear();
-    mPolygonBasisList.setSize( polyVertexCount );
-
-    // Validate Polygon Vertices.
-    for ( U32 n = 0; n < polyVertexCount; n++ )
-    {
-        // Fetch Coordinate.
-        const F32 x = dAtof(Utility::mGetStringElement(pCustomPolygon, n*2));
-        const F32 y = dAtof(Utility::mGetStringElement(pCustomPolygon, n*2+1));
-
-        // Store Polygon Vertex.
-        mPolygonBasisList[n].Set(x, y);
-    }
-
-    // Generation Local Poly.
-    generateLocalPoly();
-}
-
-//----------------------------------------------------------------------------
-
-const char* ShapeVector::getPoly( void )
-{
-    // Get Collision Polygon.
-    const Vector2* pPoly = (getPolyVertexCount() > 0) ? getPolyBasis() : NULL;
-
-    // Set Max Buffer Size.
-    const U32 maxBufferSize = getPolyVertexCount() * 18 + 1;
-
-    // Get Return Buffer.
-    char* pReturnBuffer = Con::getReturnBuffer( maxBufferSize );
-
-    // Check Buffer.
-    if( !pReturnBuffer )
-    {
-        // Warn.
-        Con::printf("ShapeVector::getPoly() - Unable to allocate buffer!");
-        // Exit.
-        return NULL;
-    }
-
-    // Set Buffer Counter.
-    U32 bufferCount = 0;
-
-    // Add Polygon Edges.
-    for ( U32 n = 0; n < getPolyVertexCount(); n++ )
-    {
-        // Output Object ID.
-        bufferCount += dSprintf( pReturnBuffer + bufferCount, maxBufferSize-bufferCount, "%0.5f %0.5f ", pPoly[n].x, pPoly[n].y );
-
-        // Finish early if we run out of buffer space.
-        if ( bufferCount >= maxBufferSize )
-        {
-            // Warn.
-            Con::warnf("ShapeVector::getPoly() - Error writing to buffer!");
-            break;
-        }
-    }
-
-    // Return Buffer.
-    return pReturnBuffer;
-}
-
-//----------------------------------------------------------------------------
-
-const char* ShapeVector::getWorldPoly( void )
-{
-    // Get the object space polygon
-    //const Vector2* pPoly = (getPolyVertexCount() > 0) ? getPolyBasis() : NULL;
-
-    // Set the max buffer size
-    const U32 maxBufferSize = getPolyVertexCount() * 18 + 1;
-
-    // Get the return buffer.
-    char* pReturnBuffer = Con::getReturnBuffer( maxBufferSize );
-
-    // Check the buffer.
-    if( !pReturnBuffer )
-    {
-        // Warn.
-        Con::printf("ShapeVector::getWorldPoly() - Unable to allocate buffer!");
-
-        // Exit.
-        return NULL;
-    }
-
-    // Set Buffer Counter.
-    U32 bufferCount = 0;
-
-    // Add Polygon Edges.
-    for ( U32 n = 0; n < getPolyVertexCount(); n++ )
-    {
-        // Convert the poly point to a world coordinate
-        Vector2 worldPoint = getWorldPoint(mPolygonLocalList[n]);
-
-        // Output the point
-        bufferCount += dSprintf( pReturnBuffer + bufferCount, maxBufferSize-bufferCount, "%0.5f %0.5f ", worldPoint.x, worldPoint.y );
-
-        // Finish early if we run out of buffer space.
-        if ( bufferCount >= maxBufferSize )
-        {
-            // Warn.
-            Con::warnf("ShapeVector::getWorldPoly() - Error writing to buffer!");
-            break;
-        }
-    }
-
-    // Return Buffer.
-    return pReturnBuffer;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::generateLocalPoly( void )
-{
-    // Fetch Polygon Vertex Count.
-    const U32 polyVertexCount = mPolygonBasisList.size();
-
-    // Process Collision Polygon (if we've got one).
-    if ( polyVertexCount > 0 )
-    {
-        // Clear Polygon List.
-        mPolygonLocalList.clear();
-        mPolygonLocalList.setSize( polyVertexCount );
-
-        // Fetch Half Size.
-        const Vector2 halfSize = getHalfSize();
-
-        // Calculate Polygon Half-Size.
-        const Vector2 polyHalfSize( halfSize.x * mPolygonScale.x, halfSize.y * mPolygonScale.y );
-
-        // Scale/Orientate Polygon.
-        for ( U32 n = 0; n < polyVertexCount; n++ )
-        {
-            // Fetch Polygon Basis.
-            Vector2 polyVertex = mPolygonBasisList[n];
-            // Scale.
-            polyVertex.Set( polyVertex.x * mSize.x * (mFlipX ? -1.0f : 1.0f), 
-                            polyVertex.y * mSize.y * (mFlipY ? -1.0f : 1.0f));
-            // Set Vertex.
-            mPolygonLocalList[n] = polyVertex;
-        }
-    }
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setLineColorString( const char* lineColour )
-{
-    // Calculate Element Count.
-    const U32 elementCount = Utility::mGetStringElementCount( lineColour );
-
-    // Check we've got enough arguments.
-    if ( elementCount < 3 )
-    {
-        Con::warnf("ShapeVector::setLineColourString() - Invalid Number of Elements! (%s)", lineColour);
-        return;
-    }
-
-    // Calculate Red, Green and Blue.
-    const F32 red   = dAtof(Utility::mGetStringElement( lineColour, 0 ));
-    const F32 green = dAtof(Utility::mGetStringElement( lineColour, 1 ));
-    const F32 blue  = dAtof(Utility::mGetStringElement( lineColour, 2 ));
-
-    // Set Alpha (if specified).
-    F32 alpha;
-    if ( elementCount >= 4 )
-        alpha = dAtof(Utility::mGetStringElement( lineColour, 3 ));
-    else alpha = 1.0f;
-
-    // Set Line Colour.
-    setLineColor( ColorF(red, green, blue, alpha) );
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setLineColor( const ColorF& lineColour )
-{
-    // Set Line Colour.
-    mLineColor = lineColour;
-}
-
-//----------------------------------------------------------------------------
-
-const char* ShapeVector::getLineColor()
-{
-    // Get Return Buffer.
-    char* pReturnBuffer = Con::getReturnBuffer( 64 );
-    dSprintf( pReturnBuffer, 64, "%0.5f %0.5f %0.5f %0.5f", mLineColor.red, mLineColor.green,
-                                                            mLineColor.blue, mLineColor.alpha);
-    return pReturnBuffer;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setLineAlpha( const F32 alpha )
-{
-    // Set Line Alpha.
-    mLineColor.alpha = alpha;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setFillColorString( const char* fillColour )
-{
-    // Calculate Element Count.
-    const U32 elementCount = Utility::mGetStringElementCount( fillColour );
-
-    // Check we've got enough arguments.
-    if ( elementCount < 3 )
-    {
-        Con::warnf("ShapeVector::setFillColourString() - Invalid Number of Elements! (%s)", fillColour);
-        return;
-    }
-
-    // Calculate Red, Green and Blue.
-    const F32 red   = dAtof(Utility::mGetStringElement( fillColour, 0 ));
-    const F32 green = dAtof(Utility::mGetStringElement( fillColour, 1 ));
-    const F32 blue  = dAtof(Utility::mGetStringElement( fillColour, 2 ));
-
-    // Set Alpha (if specified).
-    F32 alpha;
-    if ( elementCount >= 4 )
-        alpha = dAtof(Utility::mGetStringElement( fillColour, 3 ));
-    else alpha = 1.0f;
-
-    // Set Fill Colour.
-    setFillColor( ColorF(red, green, blue, alpha) );
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setFillColor( const ColorF& fillColour )
-{
-    // Set Fill Colour.
-    mFillColor = fillColour;
-}
-
-//----------------------------------------------------------------------------
-
-const char* ShapeVector::getFillColor()
-{
-    // Get Return Buffer.
-    char* pReturnBuffer = Con::getReturnBuffer( 64 );
-    dSprintf( pReturnBuffer, 64, "%0.5f %0.5f %0.5f %0.5f", mFillColor.red, mFillColor.green,
-                                                            mFillColor.blue, mFillColor.alpha);
-    return pReturnBuffer;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setFillAlpha( const F32 alpha )
-{
-    // Set Fill Alpha.
-    mFillColor.alpha = alpha;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setFillMode( const bool fillMode )
-{
-    // Set Fill Mode.
-    mFillMode = fillMode;
-}
-
-//----------------------------------------------------------------------------
-
-bool ShapeVector::getFillMode()
-{
-    return mFillMode;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setIsCircle( const bool isCircle )
-{
-    // Set Fill Mode.
-    mIsCircle = isCircle;
-}
-
-//----------------------------------------------------------------------------
-
-bool ShapeVector::getIsCircle()
-{
-    return mIsCircle;
-}
-
-//----------------------------------------------------------------------------
-
-void ShapeVector::setCircleRadius( const F32 circleRadius )
-{
-    // Set Fill Mode.
-    mCircleRadius = circleRadius;
-}
-
-//----------------------------------------------------------------------------
-
-F32 ShapeVector::getCircleRadius()
-{
-    return mCircleRadius;
-}
-
-//----------------------------------------------------------------------------
-
-Vector2 ShapeVector::getBoxFromPoints()
-{
-    Vector2 box(1.0f, 1.0f);
-
-     // Fetch Polygon Vertex Count.
-    const U32 polyVertexCount = mPolygonBasisList.size();
-
-    F32 minX = 0;
-    F32 minY = 0;
-    F32 maxX = 0;
-    F32 maxY = 0;
-
-    // Process Collision Polygon (if we've got one).
-    if ( polyVertexCount > 0 )
-    {
-        // Scale/Orientate Polygon.
-        for ( U32 n = 0; n < polyVertexCount; n++ )
-        {
-            // Fetch Polygon Basis.
-            Vector2 polyVertex = mPolygonBasisList[n];
-            
-            if (polyVertex.x > maxX)
-                maxX = polyVertex.x;
-            else if (polyVertex.x < minX)
-                minX = polyVertex.x;
-
-            if (polyVertex.y > maxY)
-                maxY = polyVertex.y;
-            else if (polyVertex.y < minY)
-                minY = polyVertex.y;
-        }
-    }
-
-    box.x = maxX - minX;
-    box.y = maxY - minY;
-
-    return box;
-}
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+#include "graphics/dgl.h"
+#include "console/consoleTypes.h"
+#include "2d/core/Utility.h"
+#include "ShapeVector.h"
+
+// Script bindings.
+#include "ShapeVector_ScriptBinding.h"
+
+//----------------------------------------------------------------------------
+
+IMPLEMENT_CONOBJECT(ShapeVector);
+
+//----------------------------------------------------------------------------
+
+ShapeVector::ShapeVector() :
+    mLineColor(ColorF(1.0f,1.0f,1.0f,1.0f)),
+    mFillColor(ColorF(0.5f,0.5f,0.5f,1.0f)),
+    mFillMode(false),
+    mPolygonScale( 1.0f, 1.0f ),
+    mIsCircle(false),
+    mCircleRadius(1.0f),
+    mFlipX(false),
+    mFlipY(false)
+{
+    // Set Vector Associations.
+    VECTOR_SET_ASSOCIATION( mPolygonBasisList );
+    VECTOR_SET_ASSOCIATION( mPolygonLocalList );
+
+   // Use a static body by default.
+   mBodyDefinition.type = b2_staticBody;
+}
+
+//----------------------------------------------------------------------------
+
+ShapeVector::~ShapeVector()
+{
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::initPersistFields()
+{
+   addProtectedField("PolyList", TypePoint2FVector, Offset(mPolygonBasisList, ShapeVector), &setPolyList, &defaultProtectedGetFn, &writePolyList, "");
+   addProtectedField("LineColor", TypeColorF, Offset(mLineColor, ShapeVector), &setLineColor, &defaultProtectedGetFn, &writeLineColor, "");
+   addProtectedField("FillColor", TypeColorF, Offset(mFillColor, ShapeVector), &setFillColor, &defaultProtectedGetFn, &writeFillColor, "");
+   addProtectedField("FillMode", TypeBool, Offset(mFillMode, ShapeVector), &setFillMode, &defaultProtectedGetFn, &writeFillMode, "");
+   addProtectedField("IsCircle", TypeBool, Offset(mIsCircle, ShapeVector), &setIsCircle, &defaultProtectedGetFn, &writeIsCircle, "");
+   addProtectedField("CircleRadius", TypeF32, Offset(mCircleRadius, ShapeVector), &setCircleRadius, &defaultProtectedGetFn, &writeCircleRadius, "");
+
+   Parent::initPersistFields();
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::copyTo(SimObject* obj)
+{
+   Parent::copyTo(obj);
+
+   AssertFatal(dynamic_cast<ShapeVector*>(obj), "ShapeVector::copyTo() - Object is not the correct type.");
+   ShapeVector* object = static_cast<ShapeVector*>(obj);
+
+   // Copy fields
+   object->mFillMode = mFillMode;
+   object->mFillColor = mFillColor;
+   object->mLineColor = mLineColor;
+   object->mIsCircle = mIsCircle;
+   object->mCircleRadius = mCircleRadius;
+   object->mFlipX = mFlipX;
+   object->mFlipY = mFlipY;
+
+   if (getPolyVertexCount() > 0)
+       object->setPolyCustom(mPolygonBasisList.size(), getPoly());
+}
+
+//----------------------------------------------------------------------------
+
+bool ShapeVector::onAdd()
+{
+   // Call Parent.
+   if(!Parent::onAdd())
+      return false;
+
+   // Return Okay.
+   return true;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::onRemove()
+{
+   // Call Parent.
+   Parent::onRemove();
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::sceneRender( const SceneRenderState* pSceneRenderState, const SceneRenderRequest* pSceneRenderRequest, BatchRender* pBatchRenderer )
+{
+    // Fetch Vertex Count.
+    const U32 vertexCount = mPolygonLocalList.size();
+
+    // Finish if not vertices.
+    if ( vertexCount == 0  && !mIsCircle)
+        return;
+
+    // Disable Texturing.
+    glDisable       ( GL_TEXTURE_2D );
+
+    // Save Model-view.
+    glMatrixMode(GL_MODELVIEW);
+    glPushMatrix();
+
+    // Fetch Position/Rotation.
+    const Vector2 position = getRenderPosition();
+
+    // Set Blend Options.
+    setBlendOptions();
+    
+    if (mIsCircle)
+    {
+        glRotatef( mRadToDeg(getRenderAngle()), 0.0f, 0.0f, 1.0f );
+        renderCircleShape(position, mCircleRadius);
+    }
+    else
+    {
+        // Move into Vector-Space.
+        glTranslatef( position.x, position.y, 0.0f );
+        glRotatef( mRadToDeg(getRenderAngle()), 0.0f, 0.0f, 1.0f );
+        renderPolygonShape(vertexCount);
+    }
+
+    // Restore Colour.
+    glColor4f( 1,1,1,1 );
+
+    // Restore Matrix.
+    glPopMatrix();
+}
+
+void ShapeVector::renderCircleShape(Vector2 position, F32 radius)
+{
+    if (mFillMode)
+    {
+        const float32 k_segments = 32.0f;
+        const float32 k_increment = 2.0f * b2_pi / k_segments;
+        float32 theta = 0.0f;
+
+        glEnable(GL_BLEND);
+        glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+        glColor4f(mFillColor.red, mFillColor.green, mFillColor.blue, mFillColor.alpha);
+
+        glBegin(GL_TRIANGLE_FAN);
+        for (int32 i = 0; i < k_segments; ++i)
+        {
+            Vector2 v = position + radius * Vector2(cosf(theta), sinf(theta));
+            glVertex2f(v.x, v.y);
+            theta += k_increment;
+        }
+        glEnd();
+
+        glDisable(GL_BLEND);
+
+        theta = 0.0f;
+        glColor4f(mLineColor.red, mLineColor.green, mLineColor.blue, 1.0f);
+        glBegin(GL_LINE_LOOP);
+        for (int32 i = 0; i < k_segments; ++i)
+        {
+            Vector2 v = position + radius * Vector2(cosf(theta), sinf(theta));
+            glVertex2f(v.x, v.y);
+            theta += k_increment;
+        }
+        glEnd();
+    }
+    else
+    {
+        const float32 k_segments = 36.0f;
+        const float32 k_increment = 2.0f * b2_pi / k_segments;
+        float32 theta = 0.0f;
+
+        glColor4f(mLineColor.red, mLineColor.green, mLineColor.blue, mLineColor.alpha);
+        
+        glBegin(GL_LINE_LOOP);
+        for (int32 i = 0; i < k_segments; ++i)
+        {
+            Vector2 v = position + radius * Vector2(cosf(theta), sinf(theta));
+            glVertex2f(v.x, v.y);
+            theta += k_increment;
+        }
+        glEnd();
+    }
+}
+
+void ShapeVector::renderPolygonShape(U32 vertexCount)
+{
+#ifdef TORQUE_OS_IOS
+    // Fill Mode?
+    if ( mFillMode )
+    {
+        // Yes, so set polygon mode to FILL.
+        //glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+
+        // Set Fill Colour.
+        glColor4f( (GLfloat)mFillColor.red, (GLfloat)mFillColor.green, (GLfloat)mFillColor.blue, (GLfloat)mFillColor.alpha );
+
+        GLfloat vert1[] = {//get first vert and make triangles based off of this one
+            (GLfloat)(mPolygonLocalList[0].x),
+            (GLfloat)(mPolygonLocalList[0].y),
+        };
+        GLfloat prevVert[] = {
+            (GLfloat)(mPolygonLocalList[1].x),
+            (GLfloat)(mPolygonLocalList[1].y),
+        };
+        
+        
+        // Draw Object.
+            for ( U32 n = 2; n < vertexCount; n++ )
+            {
+                //glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n]) );
+                GLfloat vertex[] = {
+                                    vert1[0], vert1[1],
+                                    (GLfloat)(mPolygonLocalList[n].x), (GLfloat)(mPolygonLocalList[n].y),
+                                    prevVert[0], prevVert[1],
+                };
+                
+                glVertexPointer(2, GL_FLOAT, 0, vertex );
+                glDrawArrays(GL_TRIANGLES, 0, 3 );
+                prevVert[0] = (GLfloat)(mPolygonLocalList[n].x);//save the current one's for nxt time
+                prevVert[1] = (GLfloat)(mPolygonLocalList[n].y);
+            }
+        //glDrawArrays(GL_TRIANGLES, 0, vertexCount);
+        //glEnd();
+ 
+    }
+
+    // Set Line Colour.
+    glColor4f(mLineColor.red, mLineColor.green, mLineColor.blue, mLineColor.alpha );
+    
+        for ( U32 n = 1; n <= vertexCount; n++ )
+        {
+            GLfloat verts[] = {
+                (GLfloat)(mPolygonLocalList[n - 1].x),
+                (GLfloat)(mPolygonLocalList[n - 1].y),
+                (GLfloat)(mPolygonLocalList[n == vertexCount ? 0 : n].x),
+                (GLfloat)(mPolygonLocalList[n == vertexCount ? 0 : n].y),
+            };
+
+            glVertexPointer(2, GL_FLOAT, 0, verts );			
+            glDrawArrays(GL_LINE_LOOP, 0, 2);//draw last two
+        }
+
+#else
+    // Fill Mode?
+    if ( mFillMode )
+    {
+        // Yes, so set polygon mode to FILL.
+        glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+
+        // Set Fill Colour.
+        glColor4fv( (GLfloat*)&mFillColor );
+
+        // Draw Object.
+        glBegin( GL_POLYGON );
+            for ( U32 n = 0; n < vertexCount; n++ )
+            {
+                glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n]) );
+            }
+        glEnd();
+    }
+
+    // Set Line Colour.
+    glColor4fv( (GLfloat*)&mLineColor );
+
+    // Draw Object.
+    glBegin(GL_LINES);
+        for ( U32 n = 1; n <= vertexCount; n++ )
+        {
+            glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n - 1]) );
+            glVertex2fv ( (GLfloat*)&(mPolygonLocalList[n == vertexCount ? 0 : n]) );
+        }
+    glEnd();
+
+#endif
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setSize( const Vector2& size )
+{
+    F32 xDifference = mSize.x / size.x;
+    
+    // Call Parent.
+    Parent::setSize( size );
+    
+    if (mIsCircle)
+    {
+        mCircleRadius /= xDifference;
+    }
+    else
+    {
+        // Generate Local Polygon.
+        generateLocalPoly();
+    }
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setPolyScale( const Vector2& scale )
+{
+    // Check Scales.
+    if ( scale.x <= 0.0f || scale.y <= 0.0f )
+    {
+        Con::warnf("ShapeVector::setPolyScale() - Polygon Scales must be greater than zero! '%g,%g'.", scale.x, scale.y);
+        return;
+    }
+    // Check Scales.
+    if ( scale.x > 1.0f || scale.y > 1.0f )
+    {
+        Con::warnf("ShapeVector::setPolyScale() - Polygon Scales cannot be greater than one! '%g,%g'.", scale.x, scale.y);
+        return;
+    }
+
+    // Set Polygon Scale.
+    mPolygonScale = scale;
+
+    // Generation Local Poly.
+    generateLocalPoly();
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setPolyPrimitive( const U32 polyVertexCount )
+{
+    // Check it's not zero!
+    if ( polyVertexCount == 0 )
+    {
+        // Warn.
+        Con::warnf("ShapeVector::setPolyPrimitive() - Vertex count must be greater than zero!");
+        // Finish Here.
+        return;
+    }
+
+    // Clear Polygon List.
+    mPolygonBasisList.clear();
+    mPolygonBasisList.setSize( polyVertexCount );
+
+    // Point?
+    if ( polyVertexCount == 1 )
+    {
+        // Set Polygon Point.
+        mPolygonBasisList[0].Set(0.0f, 0.0f);
+    }
+    // Special-Case Quad?
+    else if ( polyVertexCount == 4 )
+    {
+        // Yes, so set Quad.
+        mPolygonBasisList[0].Set(-1.0f, -1.0f);
+        mPolygonBasisList[1].Set(+1.0f, -1.0f);
+        mPolygonBasisList[2].Set(+1.0f, +1.0f);
+        mPolygonBasisList[3].Set(-1.0f, +1.0f);
+    }
+    else
+    {
+        // No, so calculate Regular (Primitive) Polygon Stepping.
+        //
+        // NOTE:-   The polygon sits on an circle that subscribes the interior
+        //          of the collision box.
+        F32 angle = M_PI_F / polyVertexCount;
+        const F32 angleStep = M_2PI_F / polyVertexCount;
+
+        // Calculate Polygon.
+        for ( U32 n = 0; n < polyVertexCount; n++ )
+        {
+            // Calculate Angle.
+            angle += angleStep;
+            // Store Polygon Vertex.
+            mPolygonBasisList[n].Set(mCos(angle), mSin(angle));
+        }
+    }
+
+    // Generation Local Poly.
+    generateLocalPoly();
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setPolyCustom( const U32 polyVertexCount, const char* pCustomPolygon )
+{
+    // Validate Polygon.
+    if ( polyVertexCount < 1 )
+    {
+        // Warn.
+        Con::warnf("ShapeVector::setPolyCustom() - Vertex count must be greater than zero!");
+        return;
+    }
+
+    // Fetch Custom Polygon Value Count.
+    const U32 customCount = Utility::mGetStringElementCount(pCustomPolygon);
+
+    // Validate Polygon Custom Length.
+    if ( customCount != polyVertexCount*2 )
+    {
+        // Warn.
+        Con::warnf("ShapeVector::setPolyCustom() - Invalid Custom Polygon Items '%d'; expected '%d'!", customCount, polyVertexCount*2 );
+        return;
+    }
+    
+    //// Validate Polygon Vertices.
+    //for ( U32 n = 0; n < customCount; n+=2 )
+    //{
+    //    // Fetch Coordinate.
+    //    const Vector2 coord = Utility::mGetStringElementVector(pCustomPolygon, n);
+    //    // Check Range.
+    //    if ( coord.x < -1.0f || coord.x > 1.0f || coord.y < -1.0f || coord.y > 1.0f )
+    //    {
+    //        // Warn.
+    //        Con::warnf("ShapeVector::setPolyCustom() - Invalid Polygon Coordinate range; Must be -1 to +1! '(%g,%g)'", coord.x, coord.y );
+    //        return;
+    //    }
+    //}
+
+    // Clear Polygon Basis List.
+    mPolygonBasisList.clear();
+    mPolygonBasisList.setSize( polyVertexCount );
+
+    // Validate Polygon Vertices.
+    for ( U32 n = 0; n < polyVertexCount; n++ )
+    {
+        // Fetch Coordinate.
+        const F32 x = dAtof(Utility::mGetStringElement(pCustomPolygon, n*2));
+        const F32 y = dAtof(Utility::mGetStringElement(pCustomPolygon, n*2+1));
+
+        // Store Polygon Vertex.
+        mPolygonBasisList[n].Set(x, y);
+    }
+
+    // Generation Local Poly.
+    generateLocalPoly();
+}
+
+//----------------------------------------------------------------------------
+
+const char* ShapeVector::getPoly( void )
+{
+    // Get Collision Polygon.
+    const Vector2* pPoly = (getPolyVertexCount() > 0) ? getPolyBasis() : NULL;
+
+    // Set Max Buffer Size.
+    const U32 maxBufferSize = getPolyVertexCount() * 18 + 1;
+
+    // Get Return Buffer.
+    char* pReturnBuffer = Con::getReturnBuffer( maxBufferSize );
+
+    // Check Buffer.
+    if( !pReturnBuffer )
+    {
+        // Warn.
+        Con::printf("ShapeVector::getPoly() - Unable to allocate buffer!");
+        // Exit.
+        return NULL;
+    }
+
+    // Set Buffer Counter.
+    U32 bufferCount = 0;
+
+    // Add Polygon Edges.
+    for ( U32 n = 0; n < getPolyVertexCount(); n++ )
+    {
+        // Output Object ID.
+        bufferCount += dSprintf( pReturnBuffer + bufferCount, maxBufferSize-bufferCount, "%0.5f %0.5f ", pPoly[n].x, pPoly[n].y );
+
+        // Finish early if we run out of buffer space.
+        if ( bufferCount >= maxBufferSize )
+        {
+            // Warn.
+            Con::warnf("ShapeVector::getPoly() - Error writing to buffer!");
+            break;
+        }
+    }
+
+    // Return Buffer.
+    return pReturnBuffer;
+}
+
+//----------------------------------------------------------------------------
+
+const char* ShapeVector::getWorldPoly( void )
+{
+    // Get the object space polygon
+    //const Vector2* pPoly = (getPolyVertexCount() > 0) ? getPolyBasis() : NULL;
+
+    // Set the max buffer size
+    const U32 maxBufferSize = getPolyVertexCount() * 18 + 1;
+
+    // Get the return buffer.
+    char* pReturnBuffer = Con::getReturnBuffer( maxBufferSize );
+
+    // Check the buffer.
+    if( !pReturnBuffer )
+    {
+        // Warn.
+        Con::printf("ShapeVector::getWorldPoly() - Unable to allocate buffer!");
+
+        // Exit.
+        return NULL;
+    }
+
+    // Set Buffer Counter.
+    U32 bufferCount = 0;
+
+    // Add Polygon Edges.
+    for ( U32 n = 0; n < getPolyVertexCount(); n++ )
+    {
+        // Convert the poly point to a world coordinate
+        Vector2 worldPoint = getWorldPoint(mPolygonLocalList[n]);
+
+        // Output the point
+        bufferCount += dSprintf( pReturnBuffer + bufferCount, maxBufferSize-bufferCount, "%0.5f %0.5f ", worldPoint.x, worldPoint.y );
+
+        // Finish early if we run out of buffer space.
+        if ( bufferCount >= maxBufferSize )
+        {
+            // Warn.
+            Con::warnf("ShapeVector::getWorldPoly() - Error writing to buffer!");
+            break;
+        }
+    }
+
+    // Return Buffer.
+    return pReturnBuffer;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::generateLocalPoly( void )
+{
+    // Fetch Polygon Vertex Count.
+    const U32 polyVertexCount = mPolygonBasisList.size();
+
+    // Process Collision Polygon (if we've got one).
+    if ( polyVertexCount > 0 )
+    {
+        // Clear Polygon List.
+        mPolygonLocalList.clear();
+        mPolygonLocalList.setSize( polyVertexCount );
+
+        // Fetch Half Size.
+        const Vector2 halfSize = getHalfSize();
+
+        // Calculate Polygon Half-Size.
+        const Vector2 polyHalfSize( halfSize.x * mPolygonScale.x, halfSize.y * mPolygonScale.y );
+
+        // Scale/Orientate Polygon.
+        for ( U32 n = 0; n < polyVertexCount; n++ )
+        {
+            // Fetch Polygon Basis.
+            Vector2 polyVertex = mPolygonBasisList[n];
+            // Scale.
+            polyVertex.Set( polyVertex.x * mSize.x * (mFlipX ? -1.0f : 1.0f), 
+                            polyVertex.y * mSize.y * (mFlipY ? -1.0f : 1.0f));
+            // Set Vertex.
+            mPolygonLocalList[n] = polyVertex;
+        }
+    }
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setLineColorString( const char* lineColour )
+{
+    // Calculate Element Count.
+    const U32 elementCount = Utility::mGetStringElementCount( lineColour );
+
+    // Check we've got enough arguments.
+    if ( elementCount < 3 )
+    {
+        Con::warnf("ShapeVector::setLineColourString() - Invalid Number of Elements! (%s)", lineColour);
+        return;
+    }
+
+    // Calculate Red, Green and Blue.
+    const F32 red   = dAtof(Utility::mGetStringElement( lineColour, 0 ));
+    const F32 green = dAtof(Utility::mGetStringElement( lineColour, 1 ));
+    const F32 blue  = dAtof(Utility::mGetStringElement( lineColour, 2 ));
+
+    // Set Alpha (if specified).
+    F32 alpha;
+    if ( elementCount >= 4 )
+        alpha = dAtof(Utility::mGetStringElement( lineColour, 3 ));
+    else alpha = 1.0f;
+
+    // Set Line Colour.
+    setLineColor( ColorF(red, green, blue, alpha) );
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setLineColor( const ColorF& lineColour )
+{
+    // Set Line Colour.
+    mLineColor = lineColour;
+}
+
+//----------------------------------------------------------------------------
+
+const char* ShapeVector::getLineColor()
+{
+    // Get Return Buffer.
+    char* pReturnBuffer = Con::getReturnBuffer( 64 );
+    dSprintf( pReturnBuffer, 64, "%0.5f %0.5f %0.5f %0.5f", mLineColor.red, mLineColor.green,
+                                                            mLineColor.blue, mLineColor.alpha);
+    return pReturnBuffer;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setLineAlpha( const F32 alpha )
+{
+    // Set Line Alpha.
+    mLineColor.alpha = alpha;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setFillColorString( const char* fillColour )
+{
+    // Calculate Element Count.
+    const U32 elementCount = Utility::mGetStringElementCount( fillColour );
+
+    // Check we've got enough arguments.
+    if ( elementCount < 3 )
+    {
+        Con::warnf("ShapeVector::setFillColourString() - Invalid Number of Elements! (%s)", fillColour);
+        return;
+    }
+
+    // Calculate Red, Green and Blue.
+    const F32 red   = dAtof(Utility::mGetStringElement( fillColour, 0 ));
+    const F32 green = dAtof(Utility::mGetStringElement( fillColour, 1 ));
+    const F32 blue  = dAtof(Utility::mGetStringElement( fillColour, 2 ));
+
+    // Set Alpha (if specified).
+    F32 alpha;
+    if ( elementCount >= 4 )
+        alpha = dAtof(Utility::mGetStringElement( fillColour, 3 ));
+    else alpha = 1.0f;
+
+    // Set Fill Colour.
+    setFillColor( ColorF(red, green, blue, alpha) );
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setFillColor( const ColorF& fillColour )
+{
+    // Set Fill Colour.
+    mFillColor = fillColour;
+}
+
+//----------------------------------------------------------------------------
+
+const char* ShapeVector::getFillColor()
+{
+    // Get Return Buffer.
+    char* pReturnBuffer = Con::getReturnBuffer( 64 );
+    dSprintf( pReturnBuffer, 64, "%0.5f %0.5f %0.5f %0.5f", mFillColor.red, mFillColor.green,
+                                                            mFillColor.blue, mFillColor.alpha);
+    return pReturnBuffer;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setFillAlpha( const F32 alpha )
+{
+    // Set Fill Alpha.
+    mFillColor.alpha = alpha;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setFillMode( const bool fillMode )
+{
+    // Set Fill Mode.
+    mFillMode = fillMode;
+}
+
+//----------------------------------------------------------------------------
+
+bool ShapeVector::getFillMode()
+{
+    return mFillMode;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setIsCircle( const bool isCircle )
+{
+    // Set Fill Mode.
+    mIsCircle = isCircle;
+}
+
+//----------------------------------------------------------------------------
+
+bool ShapeVector::getIsCircle()
+{
+    return mIsCircle;
+}
+
+//----------------------------------------------------------------------------
+
+void ShapeVector::setCircleRadius( const F32 circleRadius )
+{
+    // Set Fill Mode.
+    mCircleRadius = circleRadius;
+}
+
+//----------------------------------------------------------------------------
+
+F32 ShapeVector::getCircleRadius()
+{
+    return mCircleRadius;
+}
+
+//----------------------------------------------------------------------------
+
+Vector2 ShapeVector::getBoxFromPoints()
+{
+    Vector2 box(1.0f, 1.0f);
+
+     // Fetch Polygon Vertex Count.
+    const U32 polyVertexCount = mPolygonBasisList.size();
+
+    F32 minX = 0;
+    F32 minY = 0;
+    F32 maxX = 0;
+    F32 maxY = 0;
+
+    // Process Collision Polygon (if we've got one).
+    if ( polyVertexCount > 0 )
+    {
+        // Scale/Orientate Polygon.
+        for ( U32 n = 0; n < polyVertexCount; n++ )
+        {
+            // Fetch Polygon Basis.
+            Vector2 polyVertex = mPolygonBasisList[n];
+            
+            if (polyVertex.x > maxX)
+                maxX = polyVertex.x;
+            else if (polyVertex.x < minX)
+                minX = polyVertex.x;
+
+            if (polyVertex.y > maxY)
+                maxY = polyVertex.y;
+            else if (polyVertex.y < minY)
+                minY = polyVertex.y;
+        }
+    }
+
+    box.x = maxX - minX;
+    box.y = maxY - minY;
+
+    return box;
+}

+ 5 - 2
engine/source/assets/assetFieldTypes.h

@@ -34,8 +34,11 @@ DefineConsoleType( TypeAssetLooseFilePath )
 
 //-----------------------------------------------------------------------------
 
-#define ASSET_ASSIGNMENT_SEPARATOR      "="
-#define ASSET_SCOPE_SEPARATOR           ":"
+/// Asset scope.
+#define ASSET_SCOPE_TOKEN				":"
+
+/// Asset assignment.
+#define ASSET_ASSIGNMENT_TOKEN			"="
 
 /// Asset Id.
 #define ASSET_ID_SIGNATURE              "@asset"

+ 9 - 9
engine/source/assets/assetManager.cc

@@ -703,7 +703,7 @@ bool AssetManager::isReferencedAsset( const char* pAssetId )
     StringTableEntry assetId = StringTable->insert( pAssetId );
 
     // Is asset Id the correct format?
-    if ( StringUnit::getUnitCount( assetId, ASSET_SCOPE_SEPARATOR ) != 2 )
+    if ( StringUnit::getUnitCount( assetId, ASSET_SCOPE_TOKEN ) != 2 )
     {
         // No, so warn.
         Con::warnf( "Asset Manager: Cannot check if asset Id '%s' is referenced as it is not the correct format.", assetId );
@@ -729,7 +729,7 @@ bool AssetManager::renameDeclaredAsset( const char* pAssetIdFrom, const char* pA
     StringTableEntry assetIdTo   = StringTable->insert( pAssetIdTo );
 
     // Is asset Id from the correct format?
-    if ( StringUnit::getUnitCount( assetIdFrom, ASSET_SCOPE_SEPARATOR ) != 2 )
+    if ( StringUnit::getUnitCount( assetIdFrom, ASSET_SCOPE_TOKEN ) != 2 )
     {
         // No, so warn.
         Con::warnf("Asset Manager: Cannot rename declared asset Id '%s' to asset Id '%s' as source asset Id is not the correct format.", assetIdFrom, assetIdTo );
@@ -737,7 +737,7 @@ bool AssetManager::renameDeclaredAsset( const char* pAssetIdFrom, const char* pA
     }
 
     // Is asset Id to the correct format?
-    if ( StringUnit::getUnitCount( assetIdTo, ASSET_SCOPE_SEPARATOR ) != 2 )
+    if ( StringUnit::getUnitCount( assetIdTo, ASSET_SCOPE_TOKEN ) != 2 )
     {
         // No, so warn.
         Con::warnf("Asset Manager: Cannot rename declared asset Id '%s' to asset Id '%s' as target asset Id is not the correct format.", assetIdFrom, assetIdTo );
@@ -761,8 +761,8 @@ bool AssetManager::renameDeclaredAsset( const char* pAssetIdFrom, const char* pA
     }
 
     // Split module Ids from asset Ids.
-    StringTableEntry moduleIdFrom = StringTable->insert( StringUnit::getUnit( assetIdFrom, 0, ASSET_SCOPE_SEPARATOR ) );
-    StringTableEntry moduleIdTo   = StringTable->insert( StringUnit::getUnit( assetIdTo, 0, ASSET_SCOPE_SEPARATOR ) );
+    StringTableEntry moduleIdFrom = StringTable->insert( StringUnit::getUnit( assetIdFrom, 0, ASSET_SCOPE_TOKEN ) );
+    StringTableEntry moduleIdTo   = StringTable->insert( StringUnit::getUnit( assetIdTo, 0, ASSET_SCOPE_TOKEN ) );
 
     // Are the module Ids the same?
     if ( moduleIdFrom != moduleIdTo )
@@ -805,7 +805,7 @@ bool AssetManager::renameDeclaredAsset( const char* pAssetIdFrom, const char* pA
 
     // Update asset definition.
     pAssetDefinition->mAssetId = assetIdTo;
-    pAssetDefinition->mAssetName = StringTable->insert( StringUnit::getUnit( assetIdTo, 1, ASSET_SCOPE_SEPARATOR ) );
+    pAssetDefinition->mAssetName = StringTable->insert( StringUnit::getUnit( assetIdTo, 1, ASSET_SCOPE_TOKEN ) );
 
     // Reinsert declared asset.
     mDeclaredAssets.erase( assetIdFrom );
@@ -850,7 +850,7 @@ bool AssetManager::renameReferencedAsset( const char* pAssetIdFrom, const char*
     StringTableEntry assetIdTo   = StringTable->insert( pAssetIdTo );
 
     // Is asset Id from the correct format?
-    if ( StringUnit::getUnitCount( assetIdFrom, ASSET_SCOPE_SEPARATOR ) != 2 )
+    if ( StringUnit::getUnitCount( assetIdFrom, ASSET_SCOPE_TOKEN ) != 2 )
     {
         // No, so warn.
         Con::warnf("Asset Manager: Cannot rename referenced asset Id '%s' to asset Id '%s' as source asset Id is not the correct format.", assetIdFrom, assetIdTo );
@@ -858,7 +858,7 @@ bool AssetManager::renameReferencedAsset( const char* pAssetIdFrom, const char*
     }
 
     // Is asset Id to the correct format?
-    if ( StringUnit::getUnitCount( assetIdTo, ASSET_SCOPE_SEPARATOR ) != 2 )
+    if ( StringUnit::getUnitCount( assetIdTo, ASSET_SCOPE_TOKEN ) != 2 )
     {
         // No, so warn.
         Con::warnf("Asset Manager: Cannot rename referenced asset Id '%s' to asset Id '%s' as target asset Id is not the correct format.", assetIdFrom, assetIdTo );
@@ -2556,7 +2556,7 @@ bool AssetManager::scanDeclaredAssets( const char* pPath, const char* pExtension
         char assetIdBuffer[1024];
         dSprintf(assetIdBuffer, sizeof(assetIdBuffer), "%s%s%s",
             pModuleDefinition->getModuleId(),
-            ASSET_SCOPE_SEPARATOR,
+            ASSET_SCOPE_TOKEN,
             foundAssetDefinition.mAssetName );
 
         // Set asset Id.

+ 4 - 4
engine/source/assets/tamlAssetDeclaredUpdateVisitor.h

@@ -112,7 +112,7 @@ public:
         mAssetNameFrom = StringTable->EmptyString;
 
         // Is asset Id the correct format?
-        if ( StringUnit::getUnitCount( pAssetIdFrom, ASSET_SCOPE_SEPARATOR ) != 2 )
+        if ( StringUnit::getUnitCount( pAssetIdFrom, ASSET_SCOPE_TOKEN ) != 2 )
         {
             // No, so warn.
             Con::warnf( "TamlAssetDeclaredUpdateVisitor::setAssetIdFrom() - Cannot use asset Id '%s' as it is not the correct format.", pAssetIdFrom );
@@ -121,7 +121,7 @@ public:
 
         // Set asset Id.
         mAssetIdFrom = StringTable->insert( pAssetIdFrom );
-        mAssetNameFrom = StringTable->insert( StringUnit::getUnit( pAssetIdFrom, 1, ASSET_SCOPE_SEPARATOR ) );
+        mAssetNameFrom = StringTable->insert( StringUnit::getUnit( pAssetIdFrom, 1, ASSET_SCOPE_TOKEN ) );
     }
     StringTableEntry getAssetIdFrom( void ) const { return mAssetIdFrom; }
 
@@ -135,7 +135,7 @@ public:
         mAssetNameTo = StringTable->EmptyString;
 
         // Is asset Id the correct format?
-        if ( StringUnit::getUnitCount( pAssetIdTo, ASSET_SCOPE_SEPARATOR ) != 2 )
+        if ( StringUnit::getUnitCount( pAssetIdTo, ASSET_SCOPE_TOKEN ) != 2 )
         {
             // No, so warn.
             Con::warnf( "TamlAssetDeclaredUpdateVisitor::setAssetIdTo() - Cannot use asset Id '%s' as it is not the correct format.", pAssetIdTo );
@@ -144,7 +144,7 @@ public:
 
         // Set asset Id.
         mAssetIdTo = StringTable->insert( pAssetIdTo );
-        mAssetNameTo = StringTable->insert( StringUnit::getUnit( pAssetIdTo, 1, ASSET_SCOPE_SEPARATOR ) );
+        mAssetNameTo = StringTable->insert( StringUnit::getUnit( pAssetIdTo, 1, ASSET_SCOPE_TOKEN ) );
     }
     const char* getAssetIdTo( void ) const { return mAssetIdTo; }
 

+ 4 - 4
engine/source/assets/tamlAssetDeclaredVisitor.h

@@ -137,20 +137,20 @@ protected:
         const char* pAssetReference = pAttribute->Value();
 
         // Fetch field word count.
-        const U32 fieldWordCount = StringUnit::getUnitCount( pAssetReference, ASSET_ASSIGNMENT_SEPARATOR );
+        const U32 fieldWordCount = StringUnit::getUnitCount( pAssetReference, ASSET_ASSIGNMENT_TOKEN );
 
         // Finish if there are not two words.
         if ( fieldWordCount != 2 )
             return true;
 
         // Fetch the asset signature.
-        StringTableEntry assetSignature = StringTable->insert( StringUnit::getUnit( pAssetReference, 0, ASSET_ASSIGNMENT_SEPARATOR ) );
+        StringTableEntry assetSignature = StringTable->insert( StringUnit::getUnit( pAssetReference, 0, ASSET_ASSIGNMENT_TOKEN ) );
 
         // Is this an asset Id signature?
         if ( assetSignature == StringTable->insert(ASSET_ID_SIGNATURE) )
         {
             // Yes, so get asset Id.
-            typeAssetId assetId = StringTable->insert( StringUnit::getUnit( pAssetReference, 1, ASSET_ASSIGNMENT_SEPARATOR ) );
+            typeAssetId assetId = StringTable->insert( StringUnit::getUnit( pAssetReference, 1, ASSET_ASSIGNMENT_TOKEN ) );
 
             // Finish if the dependency is itself!
             if ( mAssetDefinition.mAssetId == assetId )
@@ -171,7 +171,7 @@ protected:
         else if ( assetSignature == StringTable->insert(ASSET_LOOSEFILE_SIGNATURE) )
         {
             // Yes, so get loose-file reference.
-            const char* pAssetLooseFile = StringUnit::getUnit( pAssetReference, 1, ASSET_ASSIGNMENT_SEPARATOR );
+            const char* pAssetLooseFile = StringUnit::getUnit( pAssetReference, 1, ASSET_ASSIGNMENT_TOKEN );
 
             char assetFilePathBuffer[1024];
 

+ 4 - 4
engine/source/assets/tamlAssetReferencedUpdateVisitor.h

@@ -58,18 +58,18 @@ protected:
         const char* pAttributeValue = pAttribute->Value();
 
         // Fetch attribute value word count.
-        const U32 valueWordCount = StringUnit::getUnitCount( pAttributeValue, ASSET_ASSIGNMENT_SEPARATOR );
+        const U32 valueWordCount = StringUnit::getUnitCount( pAttributeValue, ASSET_ASSIGNMENT_TOKEN );
 
         // Finish if not two words.
         if ( valueWordCount != 2 )
             return true;
 
         // Skip if this is not an asset signature.
-        if ( dStricmp( StringUnit::getUnit( pAttributeValue, 0, ASSET_ASSIGNMENT_SEPARATOR), ASSET_ID_SIGNATURE ) != 0 )
+        if ( dStricmp( StringUnit::getUnit( pAttributeValue, 0, ASSET_ASSIGNMENT_TOKEN), ASSET_ID_SIGNATURE ) != 0 )
             return true;
 
         // Get the asset value.
-        const char* pAssetValue = StringUnit::getUnit( pAttributeValue, 1, ASSET_ASSIGNMENT_SEPARATOR );
+        const char* pAssetValue = StringUnit::getUnit( pAttributeValue, 1, ASSET_ASSIGNMENT_TOKEN );
 
         // Finish if not the asset Id we're looking for.
         if ( dStricmp( pAssetValue, mAssetIdFrom ) != 0 )
@@ -85,7 +85,7 @@ protected:
 
         // Format asset.
         char assetBuffer[1024];
-        dSprintf( assetBuffer, sizeof(assetBuffer), "%s%s%s", ASSET_ID_SIGNATURE, ASSET_ASSIGNMENT_SEPARATOR, mAssetIdTo );
+        dSprintf( assetBuffer, sizeof(assetBuffer), "%s%s%s", ASSET_ID_SIGNATURE, ASSET_ASSIGNMENT_TOKEN, mAssetIdTo );
 
         // Assign new value.
         pAttribute->SetValue( assetBuffer );

+ 3 - 3
engine/source/assets/tamlAssetReferencedVisitor.h

@@ -50,18 +50,18 @@ protected:
         const char* pAssetReference = pAttribute->Value();
 
         // Fetch field word count.
-        const U32 fieldWordCount = StringUnit::getUnitCount( pAssetReference, ASSET_ASSIGNMENT_SEPARATOR );
+        const U32 fieldWordCount = StringUnit::getUnitCount( pAssetReference, ASSET_ASSIGNMENT_TOKEN );
 
         // Finish if there are not two words.
         if ( fieldWordCount != 2 )
             return true;
 
         // Finish if the first word is not an asset signature.
-        if ( StringTable->insert( StringUnit::getUnit( pAssetReference, 0, ASSET_ASSIGNMENT_SEPARATOR ) ) != StringTable->insert(ASSET_ID_SIGNATURE) )
+        if ( StringTable->insert( StringUnit::getUnit( pAssetReference, 0, ASSET_ASSIGNMENT_TOKEN ) ) != StringTable->insert(ASSET_ID_SIGNATURE) )
             return true;
 
         // Get asset Id.
-        typeAssetId assetId = StringTable->insert( StringUnit::getUnit( pAssetReference, 1, ASSET_ASSIGNMENT_SEPARATOR ) );
+        typeAssetId assetId = StringTable->insert( StringUnit::getUnit( pAssetReference, 1, ASSET_ASSIGNMENT_TOKEN ) );
 
         // Finish if we already have this asset Id.
         if ( mAssetReferenced.contains( assetId ) )

+ 3 - 3
engine/source/game/defaultGame.cc

@@ -111,7 +111,6 @@ static U32 frameTotalCount = 0;
 bool initializeLibraries()
 {
     PlatformAssert::create();
-    _StringTable::create();
     Con::init();
     Sim::init();
 
@@ -327,8 +326,9 @@ void shutdownGame()
     if( Con::isFunction("onPreExit") )
         Con::executef(1, "onPreExit");
 
-    //exec the script onExit() function
-    Con::executef(1, "onExit");
+    // Perform the exit callback.
+    if( Con::isFunction("onExit") )
+        Con::executef(1, "onExit");
 
     // Unregister the module database.
     ModuleDatabase.unregisterObject();

+ 13 - 1
engine/source/persistence/taml/taml_ScriptBinding.h

@@ -246,6 +246,9 @@ ConsoleFunction(TamlWrite, bool, 3, 5,  "(object, filename, [format], [compresse
                 Con::warnf( "TamlWrite() - Setting binary compression is only valid for XML formatting." );
             }
         }
+
+		// Turn-off auto-formatting.
+		taml.setAutoFormat( false );
     }
 
     // Write.
@@ -264,7 +267,16 @@ ConsoleFunction(TamlRead, const char*, 2, 4,    "(filename, [format]) - Read an
 
     // Set the format mode.
     Taml taml;
-    taml.setFormatMode( argc > 2 ? Taml::getFormatModeEnum( argv[2] ) : Taml::XmlFormat );  
+
+	// Was a format mode specified?
+	if ( argc > 2 )
+	{
+		// Yes, so set it.
+		taml.setFormatMode( Taml::getFormatModeEnum( argv[2] ) );  
+
+		// Turn-off auto-formatting.
+		taml.setAutoFormat( false );
+	}
 
     // Read object.
     SimObject* pSimObject = taml.read( pFilename );

+ 8 - 4
engine/source/platformOSX/platformOSX.mm

@@ -131,7 +131,7 @@ static osxPlatState * tempSharedPlatState = nil;
     
     // Get the window's current frame
     NSRect frame = NSMakeRect([_window frame].origin.x, [_window frame].origin.y, width, height);
-
+    
     // Get the starting position of the bar height
     F32 barOffset = frame.size.height;
     
@@ -140,7 +140,7 @@ static osxPlatState * tempSharedPlatState = nil;
     if (!_fullscreen)
     {
         frame = [NSWindow frameRectForContentRect:frame styleMask:NSTitledWindowMask];
-
+        
         // Set the new window frame
         [_window setFrame:frame display:YES];
         
@@ -154,12 +154,16 @@ static osxPlatState * tempSharedPlatState = nil;
     }
     
     // Update the frame of the torqueView to match the window
-    frame = NSMakeRect([_window frame].origin.x, [_window frame].origin.y, width, height); 
+    frame = NSMakeRect([_window frame].origin.x, [_window frame].origin.y, width, height);
     NSRect viewFrame = NSMakeRect(0, 0, frame.size.width, frame.size.height);
-     
+    
     [_torqueView setFrame:viewFrame];
     
     [_torqueView updateContext];
+    
+    [_window makeKeyAndOrderFront:NSApp];
+    [_window makeFirstResponder:_torqueView];
+    
 }
 
 //-----------------------------------------------------------------------------

+ 1 - 1
engine/source/platformiOS/T2DAppDelegate.h

@@ -27,6 +27,6 @@
 	IBOutlet UIWindow *window;
 }
 
-@property (nonatomic, retain) UIWindow *window;
+@property (nonatomic, strong) UIWindow *window;
 
 @end

+ 0 - 6
engine/source/platformiOS/T2DAppDelegate.mm

@@ -41,12 +41,6 @@ bool _iOSTorqueFatalError = false;
 
 @synthesize window = _window;
 
-- (void)dealloc 
-{
-    [_window release];
-
-    [super dealloc];
-}
 
 - (void)applicationDidFinishLaunching:(UIApplication *)application {
     

+ 20 - 27
engine/source/platformiOS/iOSAlerts.mm

@@ -52,40 +52,39 @@
 
 
 
-bool iOSButtonBox(const char *windowTitle, const char *message, int numButtons = 0, NSString *buttons[] = nil, iOSAlertDelegate *delegate = nil) 
+bool iOSButtonBox(const char *windowTitle, const char *message, int numButtons = 0, NSArray *buttons = nil, iOSAlertDelegate *delegate = nil)
 {
-
-	UIAlertView *Alert =  [[UIAlertView alloc] initWithTitle: [NSString stringWithUTF8String: windowTitle]
-													 message: [NSString stringWithUTF8String: message] 
-													delegate: delegate 
+    
+	UIAlertView *Alert =  [[UIAlertView alloc] initWithTitle: @(windowTitle)
+													 message: @(message)
+													delegate: delegate
 										   cancelButtonTitle: nil
 										   otherButtonTitles: nil ];
 	
 	if(numButtons > 0)
 	{
 		NSString *current = nil;
-		for( int i = 1;  i < numButtons ; i++ ) 
+		for( int i = 1;  i < numButtons ; i++ )
 		{
 			current = buttons[i];
 			[Alert addButtonWithTitle: current ];
 		}
 	}
-	else 
+	else
 	{
 		[Alert addButtonWithTitle: @"OK" ];
 	}
-
+    
 	
 	[Alert show];
 	
 	// PUAP -Mat NOTE: NSRunLoop is not Thread-Safe, see documentation
-
-	while (Alert.visible) 
+    
+	while (Alert.visible)
 	{
 		[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode beforeDate: [NSDate dateWithTimeIntervalSinceNow: 0.100]];
 	}
 	
-	[Alert release];
 	
 	return true;
 }
@@ -99,22 +98,20 @@ void Platform::AlertOK(const char *windowTitle, const char *message)
 	
 	iOSButtonBox( windowTitle, message, 0, nil, delegate );
 	
-	[delegate release];
 }
 //-----------------------------------------------------------------------------
 bool Platform::AlertOKCancel(const char *windowTitle, const char *message)
-{	
+{
 	iOSAlertDelegate *delegate = [[iOSAlertDelegate alloc] init];
 	
-
-	NSString *buttons[] = { @"OK", @"Cancel" };
+    
+	NSArray *buttons = @[ @"OK", @"Cancel" ];
 	
 	//Luma:	Need to pass the delegate in as well
-	iOSButtonBox( windowTitle, message, 2, buttons, delegate );	
+	iOSButtonBox( windowTitle, message, 2, buttons, delegate );
 	
 	//Luma: Zero is NOT the cancel button index... it is based on the order of the buttons in the above array
 	bool returnValue = (delegate->buttonNumber != 1 );
-	[delegate release];
 	return returnValue;
 }
 
@@ -124,29 +121,25 @@ bool Platform::AlertRetry(const char *windowTitle, const char *message)
 	iOSAlertDelegate *delegate = [[iOSAlertDelegate alloc] init];
 	
 	//Luma:	Should be Retry / Cancel, not Cancel / Retry
-	NSString *buttons[] = { @"Retry",
-							@"Cancel",
-						  };
-
+    NSArray  *buttons = @[@"Retry", @"Cancel"];
+    
 	//Luma:	Need to pass the delegate in as well
-	iOSButtonBox( windowTitle, message, 2, buttons, delegate );	
+	iOSButtonBox( windowTitle, message, 2, buttons, delegate );
 	
 	//Luma: Zero is NOT the cancel button index... it is based on the order of the buttons in the above array
 	bool returnValue = (delegate->buttonNumber != 1 );
-	[delegate release];
 	return returnValue;
 }
 
 
 bool Platform::AlertYesNo(const char *windowTitle, const char *message)
-{	
+{
 	iOSAlertDelegate *delegate = [[iOSAlertDelegate alloc] init];
 	
-	NSString *buttons[] = { @"Yes", @"No" };
+    NSArray  *buttons = @[@"Yes", @"No"];
 	
-	iOSButtonBox( windowTitle, message, 2, buttons, delegate );	
+	iOSButtonBox( windowTitle, message, 2, buttons, delegate );
 	bool returnValue = (delegate->buttonNumber != 1 );
-	[delegate release];
 	
 	return returnValue;
 }

+ 1 - 1
engine/source/platformiOS/iOSMotionManager.h

@@ -43,7 +43,7 @@
 @property (readwrite, assign) bool accelerometerEnabled;
 @property (readwrite, assign) bool gyroscopeEnabled;
 
-@property (retain) CMAttitude* referenceAttitude;
+@property (strong) CMAttitude* referenceAttitude;
 
 // Accelerometer related functions
 - (void) enableAccelerometer;

+ 3 - 10
engine/source/platformiOS/iOSMotionManager.mm

@@ -42,7 +42,7 @@ static const double kUpdateInterval = 0.2;
 
 - (id)init
 {
-    [super init];
+    if (!(self = [super init])) return nil;
     
     if(self != NULL)
     {
@@ -70,13 +70,6 @@ static const double kUpdateInterval = 0.2;
 }
 
 
-- (void)dealloc
-{
-    if( motionManager != NULL )
-        [motionManager release];
-    
-    [super dealloc];
-}
 
 double accelAxes[6];
 
@@ -274,7 +267,7 @@ void (^motionHandler)(CMDeviceMotion*, NSError*) = ^(CMDeviceMotion *motionData,
     if(motionManager.deviceMotionAvailable)
     {
         if(referenceAttitude == NULL)
-            referenceAttitude = [motionManager.deviceMotion.attitude retain];
+            referenceAttitude = motionManager.deviceMotion.attitude;
         
         [motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue] withHandler:motionHandler];
     }
@@ -301,7 +294,7 @@ void (^motionHandler)(CMDeviceMotion*, NSError*) = ^(CMDeviceMotion *motionData,
 {
     if(motionManager.deviceMotionAvailable)
     {
-        referenceAttitude = [motionManager.deviceMotion.attitude retain];
+        referenceAttitude = motionManager.deviceMotion.attitude;
         return true;
     }
     

+ 0 - 1
engine/source/platformiOS/iOSOGLVideo.mm

@@ -156,7 +156,6 @@ bool OpenGLDevice::cleanupContextAndWindow()
 void OpenGLDevice::shutdown()
 {
     Con::printf("Shutting down the OpenGL display device...");
-    [platState.ctx release];
 }
 
 

+ 36 - 36
engine/source/platformiOS/iOSPlatform.mm

@@ -109,49 +109,49 @@ S32 Platform::messageBox(const UTF8 *title, const UTF8 *message, MBButtons butto
 bool Platform::pathCopy(const char* source, const char* dest, bool nooverwrite)
 {
    NSFileManager *manager = [NSFileManager defaultManager];
-   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+   @autoreleasepool {
    
-   NSString *nsource = [[NSString stringWithUTF8String:source] stringByStandardizingPath];
-   NSString *ndest   = [[NSString stringWithUTF8String:dest] stringByStandardizingPath];
-   NSString *ndestFolder = [ndest stringByDeletingLastPathComponent];
-   
-   if(! [manager fileExistsAtPath:nsource])
-   {
-      Con::errorf("Platform::pathCopy: no file exists at %s",source);
-      return false;
-   }
-    
-    //Catcher for the errors.
-    NSError** returnValue = nil;
-   
-   if( [manager fileExistsAtPath:ndest] )
-   {
-      if(nooverwrite)
+      NSString *nsource = [@(source) stringByStandardizingPath];
+      NSString *ndest   = [@(dest) stringByStandardizingPath];
+      NSString *ndestFolder = [ndest stringByDeletingLastPathComponent];
+      
+      if(! [manager fileExistsAtPath:nsource])
       {
-         Con::errorf("Platform::pathCopy file already exists at %s",dest);
+         Con::errorf("Platform::pathCopy: no file exists at %s",source);
          return false;
       }
        
-      Con::warnf("Deleting files at path: %s", dest);
-      bool deleted = [manager removeItemAtPath:ndest error:returnValue];
-      if(!deleted)
+       //Catcher for the errors.
+       NSError* returnValue = nil;
+      
+      if( [manager fileExistsAtPath:ndest] )
       {
-         Con::errorf("Copy failed! Could not delete files at path: %s", dest);
-         return false;
+         if(nooverwrite)
+         {
+            Con::errorf("Platform::pathCopy file already exists at %s",dest);
+            return false;
+         }
+          
+         Con::warnf("Deleting files at path: %s", dest);
+         bool deleted = [manager removeItemAtPath:ndest error:&returnValue];
+         if(!deleted)
+         {
+            Con::errorf("Copy failed! Could not delete files at path: %s", dest);
+            return false;
+         }
       }
+      
+      if([manager fileExistsAtPath:ndestFolder] == NO)
+      {
+         ndestFolder = [ndestFolder stringByAppendingString:@"/"]; // createpath requires a trailing slash
+         Platform::createPath([ndestFolder UTF8String]);
+      }
+      
+      bool ret = [manager copyItemAtPath:nsource toPath:ndest error:&returnValue];
+      
+      return ret;
    }
    
-   if([manager fileExistsAtPath:ndestFolder] == NO)
-   {
-      ndestFolder = [ndestFolder stringByAppendingString:@"/"]; // createpath requires a trailing slash
-      Platform::createPath([ndestFolder UTF8String]);
-   }
-   
-   bool ret = [manager copyItemAtPath:nsource toPath:ndest error:returnValue];
-   
-   [pool release];
-   return ret;
-   
 }
 
 //-----------------------------------------------------------------------------
@@ -176,9 +176,9 @@ bool Platform::fileRename(const char *source, const char *dest)
       Con::warnf("Platform::fileRename: Deleting files at path: %s", dest);
    }
     
-    NSError** returnValue = NULL;
+    NSError* returnValue = NULL;
    
-   bool ret = [manager moveItemAtPath:nsource toPath:ndest error:returnValue];
+   bool ret = [manager moveItemAtPath:nsource toPath:ndest error:&returnValue];
   
    return ret;
 }

+ 1 - 2
engine/source/platformiOS/iOSStrings.mm

@@ -409,10 +409,9 @@ void dQsort(void *base, U32 nelem, U32 width, int (QSORT_CALLBACK *fcmp)(const v
 StringTableEntry Platform::createUUID( void )
 {
     CFUUIDRef ref = CFUUIDCreate(nil);
-    NSString* uuid = (NSString *)CFUUIDCreateString(nil,ref);
+    NSString* uuid = (__bridge_transfer NSString *)CFUUIDCreateString(nil,ref);
     CFRelease(ref);
 
     StringTableEntry uuidString = StringTable->insert([uuid UTF8String]);
-    [uuid release];
     return uuidString;
 }

+ 5 - 5
engine/source/platformiOS/iOSThread.mm

@@ -47,11 +47,11 @@ static void *ThreadRunHandler(void * arg)
 {
    PlatformThreadData *mData = reinterpret_cast<PlatformThreadData*>(arg);
    Thread *thread = mData->mThread;
-	NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-   mData->mThreadID = ThreadManager::getCurrentThreadId();
-   ThreadManager::addThread(thread);
-   thread->run(mData->mRunArg);
-   	[pool release];
+	@autoreleasepool {
+      mData->mThreadID = ThreadManager::getCurrentThreadId();
+      ThreadManager::addThread(thread);
+      thread->run(mData->mRunArg);
+   	}
 	mData->mGateway.release();
    // we could delete the Thread here, if it wants to be auto-deleted...
    if(thread->autoDelete)

+ 1 - 1
engine/source/platformiOS/iOSUtil.mm

@@ -214,7 +214,7 @@ CFSocketRef CreateCFSocketToURLAndPort(const char *ipAddress, U16 port)
     inet_aton(ipAddress, &addr4.sin_addr);
 
     NSData *address = [NSData dataWithBytes:&addr4 length:sizeof(addr4)];
-    CFSocketConnectToAddress(socket, (CFDataRef)address, -1);
+    CFSocketConnectToAddress(socket, (__bridge CFDataRef)address, -1);
 
     CFRunLoopSourceRef source;
     source = CFSocketCreateRunLoopSource(NULL, socket, 1);

+ 0 - 2
engine/source/platformiOS/iOSWindow.mm

@@ -319,8 +319,6 @@ bool Platform::openWebBrowser(const char *webAddress)
     NSString *string = [[NSString alloc] initWithUTF8String:webAddress];
     NSURL *url = [[NSURL alloc] initWithString:string];
     bool ret = [platState.application openURL:url];
-    [string release];
-    [url release];
 
     return ret;// this bails on the application, switching to Safari
 }

+ 3 - 0
engine/source/platformiOS/platformiOS.h

@@ -35,6 +35,9 @@
 #include "platformiOS/T2DView.h"
 #include "platformiOS/T2DViewController.h"
 
+// Mich Note: Do not try to spend too much time analyzing this class.
+// It is planned to refactor the iOS platform layer and replace this
+// with a platform state similar to what OS X uses.
 class iOSPlatState
 {
 public:

+ 81 - 1
engine/source/sim/simObject.cc

@@ -21,6 +21,7 @@
 //-----------------------------------------------------------------------------
 
 #include "sim/simObject.h"
+#include "sim/simObjectTimerEvent.h"
 #include "console/consoleInternal.h"
 #include "console/codeBlock.h"
 #include "console/consoleInternal.h"
@@ -59,10 +60,11 @@ SimObject::SimObject( const U8 namespaceLinkMask ) : mNSLinkMask( namespaceLinkM
     mTypeMask                = 0;
     mScriptCallbackGuard     = 0;
     mFieldDictionary         = NULL;
-    mCanSaveFieldDictionary	=	true;
+    mCanSaveFieldDictionary	 = true;
     mClassName               = NULL;
     mSuperClassName          = NULL;
     mProgenitorFile          = CodeBlock::getCurrentCodeBlockFullPath();
+    mPeriodicTimerID         = 0;
 }
 
 //---------------------------------------------------------------------------
@@ -1696,3 +1698,81 @@ ConsoleMethod(SimObject, getProgenitorFile, const char*, 2, 2,  "() Gets the pro
     return object->getProgenitorFile();
 }
 
+
+//-----------------------------------------------------------------------------
+
+ConsoleMethod(SimObject, startTimer, bool, 4, 5,    "(callbackFunction, float timePeriod, [repeat]) - Starts a periodic timer for this object.\n"
+                                                    "Sets a timer on the object that, when it expires, will cause the object to execute the onTimer() callback.\n"
+                                                    "The timer event will continue to occur at regular intervals until setTimerOff() is called.\n"
+                                                    "@param callbackFunction The name of the callback function to call for each timer repetition.\n"
+                                                    "@param timePeriod The period of time (in milliseconds) between each callback.\n"
+                                                    "@param repeat The number of times the timer should repeat.  If not specified or zero then it will run infinitely\n"
+                                                    "@return No return Value.")
+{
+    // Is the periodic timer running?
+    if ( object->getPeriodicTimerID() != 0 )
+    {
+        // Yes, so cancel it.
+        Sim::cancelEvent( object->getPeriodicTimerID() );
+
+        // Reset Timer ID.
+        object->setPeriodicTimerID( 0 );
+    }
+
+    // Fetch the callback function.
+    StringTableEntry callbackFunction = StringTable->insert( argv[2] );
+
+    // Does the function exist?
+    if ( !object->isMethod( callbackFunction ) )
+    {
+        // No, so warn.
+        Con::warnf("SimObject::startTimer() - The callback function of '%s' does not exist.", callbackFunction );
+        return false;
+    }
+
+    // Fetch the time period.
+    const S32 timePeriod = dAtoi(argv[3]);
+
+    // Is the time period valid?
+    if ( timePeriod < 1 )
+    {
+        // No, so warn.
+        Con::warnf("SimObject::startTimer() - The time period of '%d' is invalid.", timePeriod );
+        return false;
+    }        
+
+    // Fetch the repeat count.
+    const S32 repeat = argc >= 5 ? dAtoi(argv[4]) : 0;
+
+    // Create Timer Event.
+    SimObjectTimerEvent* pEvent = new SimObjectTimerEvent( callbackFunction, (U32)timePeriod, (U32)repeat );
+
+    // Post Event.
+    object->setPeriodicTimerID( Sim::postEvent( object, pEvent, Sim::getCurrentTime() + timePeriod ) );
+
+    return true;
+}
+
+//-----------------------------------------------------------------------------
+
+ConsoleMethod(SimObject, stopTimer, void, 2, 2, "() - Stops the periodic timer for this object.\n"
+                                                "@return No return Value.")
+{
+    // Finish if the periodic timer isn't running.
+    if ( object->getPeriodicTimerID() == 0 )
+        return;
+
+    // Cancel It.
+    Sim::cancelEvent( object->getPeriodicTimerID() );
+
+    // Reset Timer ID.
+    object->setPeriodicTimerID( 0 );
+}
+
+//-----------------------------------------------------------------------------
+
+ConsoleMethod(SimObject, isTimerActive, bool, 2, 2, "() - Checks whether the periodic timer is active for this object or not.\n"
+                                                    "@return Whether the periodic timer is active for this object or not.")
+{
+    return object->isPeriodicTimerActive();
+}

+ 7 - 0
engine/source/sim/simObject.h

@@ -284,6 +284,9 @@ private:
 
     StringTableEntry    mProgenitorFile;
 
+    S32 mPeriodicTimerID;
+
+
     /// @name Notification
     /// @{
     Notify*     mNotifyList;
@@ -621,6 +624,10 @@ public:
     inline void setProgenitorFile( const char* pFile ) { mProgenitorFile = StringTable->insert( pFile ); }
     inline StringTableEntry getProgenitorFile( void ) const { return mProgenitorFile; }
 
+    inline void setPeriodicTimerID( const S32 timerID )     { mPeriodicTimerID = timerID; }
+    inline S32 getPeriodicTimerID( void ) const             { return mPeriodicTimerID; }
+    inline bool isPeriodicTimerActive( void ) const         { return mPeriodicTimerID != 0; }
+
     /// @}
 
     /// @name Sets

+ 68 - 55
engine/source/2d/sceneobject/SceneObjectTimerEvent.h → engine/source/sim/simObjectTimerEvent.h

@@ -1,55 +1,68 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to
-// deal in the Software without restriction, including without limitation the
-// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-// sell copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-// IN THE SOFTWARE.
-//-----------------------------------------------------------------------------
-
-#ifndef _SCENE_OBJECT_TIMER_EVENT_H_
-#define _SCENE_OBJECT_TIMER_EVENT_H_
-
-#ifndef _SCENE_OBJECT_H_
-#include "2d/sceneobject/SceneObject.h"
-#endif
-
-//-----------------------------------------------------------------------------
-
-class SceneObjectTimerEvent : public SimEvent
-{
-public:
-    SceneObjectTimerEvent( U32 timerPeriod ) : mTimerPeriod(timerPeriod) {}
-    virtual  ~SceneObjectTimerEvent() {}
-
-    virtual void process(SimObject *object)
-    {
-        /// Create new Timer Event.
-        SceneObjectTimerEvent* pEvent = new SceneObjectTimerEvent( mTimerPeriod );
-
-        /// Post Event.
-        (dynamic_cast<SceneObject*>(object))->setPeriodicTimerID( Sim::postEvent( object, pEvent, Sim::getCurrentTime() + mTimerPeriod ) );
-
-        // Script callback.
-        /// This *must* be done here in-case the user turns off the timer which would be the one above!
-        Con::executef( object, 1, "onTimer" );
-    }
-
-private:
-    U32 mTimerPeriod;
-};
-
-#endif // _SCENE_OBJECT_TIMER_EVENT_H_
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+#ifndef _SIM_OBJECT_TIMER_EVENT_H_
+#define _SIM_OBJECT_TIMER_EVENT_H_
+
+#ifndef _SIMBASE_H_
+#include "sim/simBase.h"
+#endif
+
+//-----------------------------------------------------------------------------
+
+class SimObjectTimerEvent : public SimEvent
+{
+public:
+    SimObjectTimerEvent( StringTableEntry callbackFunction, const U32 period, const U32 repeat = 0 ) :
+        mCallbackFunction( callbackFunction ),
+        mPeriod( period ),
+        mRepeat( repeat )
+    {}
+    virtual ~SimObjectTimerEvent() {}
+
+    virtual void process(SimObject *object)
+    {
+        // Do we have a repeat count?
+        if ( mRepeat == 0 || mRepeat > 1 )
+        {
+            // Calculate the remaining repeats.
+            const U32 repeat = mRepeat == 0 ? 0 : mRepeat-1;
+
+            // Create new timer event.
+            SimObjectTimerEvent* pEvent = new SimObjectTimerEvent( mCallbackFunction, mPeriod, repeat );
+
+            // Post the event.
+            object->setPeriodicTimerID( Sim::postEvent( object, pEvent, Sim::getCurrentTime() + mPeriod ) );
+        }
+
+        // Script callback.
+        // This *must* be done here in-case the user turns off the timer which would be the one above!
+        Con::executef( object, 1, mCallbackFunction );
+    }
+
+private:
+    StringTableEntry mCallbackFunction;
+    U32 mPeriod;
+    U32 mRepeat;
+};
+
+#endif // _SIM_OBJECT_TIMER_EVENT_H_

+ 6 - 4
engine/source/string/stringTable.cc

@@ -23,7 +23,7 @@
 #include "platform/platform.h"
 #include "stringTable.h"
 
-_StringTable *StringTable = NULL;
+_StringTable *_gStringTable = NULL;
 const U32 _StringTable::csm_stInitSize = 29;
 StringTableEntry _StringTable::EmptyString;
 
@@ -102,8 +102,10 @@ _StringTable::~_StringTable()
 //--------------------------------------
 void _StringTable::create()
 {
-   AssertFatal(StringTable == NULL, "StringTable::create: StringTable already exists.");
-   StringTable = new _StringTable;
+    if(!_gStringTable)
+    {
+        _gStringTable = new _StringTable;
+    }
 }
 
 
@@ -112,7 +114,7 @@ void _StringTable::destroy()
 {
    AssertFatal(StringTable != NULL, "StringTable::destroy: StringTable does not exist.");
    delete StringTable;
-   StringTable = NULL;
+   _gStringTable = NULL;
 }
 
 //--------------------------------------

+ 8 - 1
engine/source/string/stringTable.h

@@ -162,9 +162,16 @@ private:
    static StringTableEntry EmptyString;
 };
 
+extern _StringTable *_gStringTable;
 
-extern _StringTable *StringTable;
+inline _StringTable* _getStringTable()
+{
+    if(_gStringTable == NULL)
+        _StringTable::create();
+    return _gStringTable;
+}
 
+#define StringTable _getStringTable()
 
 #endif //_STRINGTABLE_H_
 

+ 16 - 28
modules/AlphaBlendToy/1/main.cs

@@ -37,17 +37,12 @@ function AlphaBlendToy::create( %this )
 
 function AlphaBlendToy::destroy( %this )
 {
-    // Cancel any pending events.
-    AlphaBlendToy.cancelPendingEvents();
 }
 
 //-----------------------------------------------------------------------------
 
 function AlphaBlendToy::reset( %this )
 {
-    // Cancel any pending events.
-    AlphaBlendToy.cancelPendingEvents();
-    
     // Reset the sprite count.
     AlphaBlendToy.SpriteCount = 0;
     
@@ -66,24 +61,10 @@ function AlphaBlendToy::reset( %this )
     // Create background.
     %this.createBackground();
 
-    // Schedule to create a sprite.
-    %this.createSpriteScheduleId = %this.schedule( 50, "createBlendedSprites" );
+    // Start the timer.
+    AlphaBlendToy.startTimer( "createBlendedSprites", 50 );
 }
 
-//-----------------------------------------------------------------------------
-
-function AlphaBlendToy::cancelPendingEvents(%this)
-{
-    // Finish if there are not pending events.
-    if ( !isEventPending(%this.createSpriteScheduleId) )
-        return;
-        
-    // Cancel it.
-    cancel(%this.createSpriteScheduleId);
-    %this.createSpriteScheduleId = "";
-}
-
-
 //-----------------------------------------------------------------------------
 
 function AlphaBlendToy::createBackground( %this )
@@ -127,12 +108,14 @@ function AlphaBlendToy::createBackground( %this )
 
 function AlphaBlendToy::createBlendedSprites( %this )
 {
-    // Reset the event schedule.
-    %this.createSpriteScheduleId = "";
-    
     // Finish if count reached.
     if ( AlphaBlendToy.SpriteCount >= AlphaBlendToy.SpriteCountTotal )
+    {
+        // Stop the timer.
+        AlphaBlendToy.stopTimer();
+        
         return;
+    }
         
     // Create the sprite.
     %object = new Sprite();
@@ -164,7 +147,12 @@ function AlphaBlendToy::createBlendedSprites( %this )
         AlphaBlendToy.CursorX = 0;
         AlphaBlendToy.CursorY++;
         if ( AlphaBlendToy.CursorY == AlphaBlendToy.SpriteCountY )
+        {
+            // Stop the timer.
+            AlphaBlendToy.stopTimer();
+            
             return;
+        }
     }
     
     // Update the sprite cursor alpha.
@@ -175,10 +163,10 @@ function AlphaBlendToy::createBlendedSprites( %this )
     
     // Finish if count reached.
     if ( AlphaBlendToy.SpriteCount == AlphaBlendToy.SpriteCountTotal )
-        return;
-    
-    // Schedule to create a sprite.
-    %this.createSpriteScheduleId = %this.schedule( 50, "createBlendedSprites" );    
+    {
+        // Stop the timer.
+        AlphaBlendToy.stopTimer();       
+    }
 }
 
 //-----------------------------------------------------------------------------

+ 8 - 27
modules/AquariumToy/1/main.cs

@@ -25,7 +25,6 @@ function AquariumToy::create( %this )
     exec("./scripts/aquarium.cs");
 
     // Configure settings.
-    AquariumToy.createFishScheduleId = "";
     AquariumToy.maxFish = 10;
     AquariumToy.currentFish = 0;
     AquariumToy.selectedAnimation = "AquariumToy:angelfish1Anim";
@@ -51,8 +50,6 @@ function AquariumToy::create( %this )
 
 function AquariumToy::destroy( %this )
 {
-    // Cancel any pending events.
-    AquariumToy::cancelPendingEvents();
 }
 
 //-----------------------------------------------------------------------------
@@ -71,33 +68,14 @@ function AquariumToy::reset(%this)
     // Reset the ball count.
     %this.currentFish = 0;
 
-    // Cancel any pending events.
-    AquariumToy::cancelPendingEvents();
-
-    // Schedule to create a ball.
-    %this.createFishScheduleId = %this.schedule( 100, "spawnFish" );
-}
-
-//-----------------------------------------------------------------------------
-
-function AquariumToy::cancelPendingEvents(%this)
-{
-    // Finish if there are not pending events.
-    if ( !isEventPending(%this.createFishScheduleId) )
-        return;
-
-    // Cancel it.
-    cancel(%this.createFishScheduleId);
-    %this.createFishScheduleId = "";
+    // Start the timer.
+    AquariumToy.startTimer( "spawnFish", 100 );
 }
 
 //-----------------------------------------------------------------------------
 
 function AquariumToy::spawnFish(%this)
 {
-    // Reset the event schedule.
-    %this.createFishScheduleId = "";
-
     %position = getRandom(-55, 55) SPC getRandom(-20, 20);
     %index = getRandom(0, 5);
     %anim = getUnit(getFishAnimationList(), %index, ",");
@@ -125,9 +103,12 @@ function AquariumToy::spawnFish(%this)
 
     %this.currentFish++;
 
-    // Schedule to spawn a fish.
-    if ( %this.currentFish < %this.maxFish)
-        %this.createFishScheduleId = %this.schedule( 100, "spawnFish" );
+    // Have we reached the maximum number of fish?
+    if ( %this.currentFish >= %this.maxFish)
+    {
+        // Yes, so stop the timer.
+        AquariumToy.stopTimer();
+    }
 }
 
 //-----------------------------------------------------------------------------

+ 7 - 10
modules/DeathBallToy/1/main.cs

@@ -38,7 +38,7 @@ function DeathBallToy::create( %this )
     DeathBallToy.WorldLeft = -50;
     DeathBallToy.WorldRight = 140;
 
-    DeathBallToy.rotateTime = 0;
+    DeathBallToy.rotateSpeed = 360;
     DeathBallToy.maxBallSpeed = 10;
     DeathBallToy.ballSpeed = 5;
     DeathBallToy.soldierSpeed = 1;
@@ -210,7 +210,7 @@ function DeathBallToy::spawnDeathball(%this, %position)
     
     //%db.pauseAnimation(1);
 
-    //Deathball.rollSchedule = Deathball.schedule(100, "updateRollAnimation");
+    Deathball.rollSchedule = Deathball.schedule(100, "updateRollAnimation");
 
     SandboxScene.add(%db);
 
@@ -224,13 +224,10 @@ function Deathball::updateRollAnimation(%this)
     %this.rollSchedule = "";
 
     %velocity = %this.getLinearVelocity();
-
-    %currentAnimTime = %this.getAnimationTime();
     %scaledVelocity = (mAbs(getWord(%velocity, 0))) + mAbs(getWord(%velocity, 1)) / 50;
     %flooredVelocity = mFloatLength(%scaledVelocity, 1);
-    %scaledAnimTime = %currentAnimTime * %flooredVelocity;
 
-    %this.setAnimationTimeScale(%scaledAnimTime);
+    %this.setAnimationTimeScale(%flooredVelocity / 15);
 
     %this.rollSchedule = %this.schedule(100, updateRollAnimation);
 }
@@ -464,7 +461,7 @@ function SandboxWindow::onTouchDown(%this, %touchID, %worldPosition)
     %origin = Deathball.getPosition();
     %angle = -mRadToDeg( mAtan( getWord(%worldPosition,0)-getWord(%origin,0), getWord(%worldPosition,1)-getWord(%origin,1) ) );
 
-    Deathball.RotateTo( %angle, DeathBallToy.rotateTime );
+    Deathball.RotateTo( %angle, DeathBallToy.rotateSpeed );
 
     %adjustedSpeed = DeathBallToy.ballSpeed / DeathBallToy.maxBallSpeed;
 
@@ -482,7 +479,7 @@ function SandboxWindow::onTouchUp(%this, %touchID, %worldPosition)
     %origin = Deathball.getPosition();
     %angle = -mRadToDeg( mAtan( getWord(%worldPosition,0)-getWord(%origin,0), getWord(%worldPosition,1)-getWord(%origin,1) ) );
 
-    Deathball.RotateTo( %angle, DeathBallToy.rotateTime );
+    Deathball.RotateTo( %angle, DeathBallToy.rotateSpeed );
 
     %adjustedSpeed = (DeathBallToy.ballSpeed / DeathBallToy.maxBallSpeed) * 3000;
 
@@ -496,7 +493,7 @@ function SandboxWindow::onTouchDragged(%this, %touchID, %worldPosition)
     %origin = Deathball.getPosition();
     %angle = -mRadToDeg( mAtan( getWord(%worldPosition,0)-getWord(%origin,0), getWord(%worldPosition,1)-getWord(%origin,1) ) );
 
-    Deathball.RotateTo( %angle, DeathBallToy.rotateTime );
+    Deathball.RotateTo( %angle, DeathBallToy.rotateSpeed );
 
     %adjustedSpeed = DeathBallToy.ballSpeed / DeathBallToy.maxBallSpeed;
 
@@ -522,4 +519,4 @@ function SandboxWindow::onMouseWheelDown(%this, %modifier, %mousePoint, %mouseCl
     // Don't allow zooming
 }         */
 
-};
+};

+ 9 - 1
modules/DeathBallToy/1/scripts/faceObjectBehavior.cs

@@ -44,7 +44,15 @@ function FaceObjectBehavior::updateFace(%this)
     %origin = %this.owner.getPosition();
     %angle = -mRadToDeg( mAtan( getWord(%this.target.getPosition(),0)-getWord(%origin,0), getWord(%this.target.getPosition(),1)-getWord(%origin,1) ) );
     
-    %this.owner.rotateTo(%angle, %this.turnSpeed);
+    if ( %this.turnSpeed > 0.0 )
+    {
+        %this.owner.rotateTo(%angle, %this.turnSpeed);
+    }
+    else
+    {
+        %this.owner.setAngle(%angle);
+    }
+    
       
     %this.schedule(200, updateFace);
 }

+ 29 - 5
modules/MoveToToy/1/main.cs

@@ -26,10 +26,12 @@ function MoveToToy::create( %this )
     activatePackage( MoveToToyPackage );    
 
     // Initialize the toys settings.
-    MoveToToy.moveTime = 1000;
+    MoveToToy.moveSpeed = 50;
+    MoveToToy.trackMouse = true;
 
     // Add the custom controls.
-    addNumericOption("Move time", 1000, 10000, 100, "setMoveTime", MoveToToy.moveTime, true, "Sets the time it takes to move to the target position.");
+    addNumericOption("Move Speed", 1, 150, 1, "setMoveSpeed", MoveToToy.moveSpeed, true, "Sets the linear speed to use when moving to the target position.");
+    addFlagOption("Track Mouse", "setTrackMouse", MoveToToy.trackMouse, false, "Whether to track the position of the mouse or not." );
 
     // Reset the toy initially.
     MoveToToy.reset();        
@@ -148,9 +150,16 @@ function MoveToToy::createTarget( %this )
 
 //-----------------------------------------------------------------------------
 
-function MoveToToy::setMoveTime( %this, %value )
+function MoveToToy::setMoveSpeed( %this, %value )
 {
-    %this.moveTime = %value;
+    %this.moveSpeed = %value;
+}
+
+//-----------------------------------------------------------------------------
+
+function MoveToToy::setTrackMouse( %this, %value )
+{
+    %this.trackMouse = %value;
 }
 
 //-----------------------------------------------------------------------------
@@ -164,7 +173,22 @@ function SandboxWindow::onTouchDown(%this, %touchID, %worldPosition)
     MoveToToy.TargetObject.Position = %worldPosition;
     
     // Move the sight to the touched position.
-    MoveToToy.SightObject.MoveTo( %worldPosition, MoveToToy.moveTime );
+    MoveToToy.SightObject.MoveTo( %worldPosition, MoveToToy.moveSpeed );
+}
+
+//-----------------------------------------------------------------------------
+
+function SandboxWindow::onTouchMoved(%this, %touchID, %worldPosition)
+{
+    // Finish if not tracking the mouse.
+    if ( !MoveToToy.trackMouse )
+        return;
+        
+    // Set the target to the touched position.
+    MoveToToy.TargetObject.Position = %worldPosition;
+    
+    // Move the sight to the touched position.
+    MoveToToy.SightObject.MoveTo( %worldPosition, MoveToToy.moveSpeed );     
 }
     
 };

+ 30 - 5
modules/RotateToToy/1/main.cs

@@ -26,10 +26,12 @@ function RotateToToy::create( %this )
     activatePackage( RotateToToyPackage );    
     
     // Initialize the toys settings.
-    RotateToToy.rotateTime = 500;
+    RotateToToy.rotateSpeed = 360;
+    RotateToToy.trackMouse = true;
 
     // Add the custom controls.
-    addNumericOption("Rotate time", 10, 10000, 10, "setRotateTime", RotateToToy.rotateTime, true, "Sets the time it takes to move to the target angle.");
+    addNumericOption("Rotate Speed", 1, 720, 1, "setRotateSpeed", RotateToToy.rotateSpeed, false, "Sets the angular speed to use to rotate to the target angle.");
+    addFlagOption("Track Mouse", "setTrackMouse", RotateToToy.trackMouse, false, "Whether to track the angle to the mouse or not." );
     
     // Reset the toy initially.
     RotateToToy.reset();      
@@ -112,9 +114,16 @@ function RotateToToy::createTarget( %this )
 
 //-----------------------------------------------------------------------------
 
-function RotateToToy::setRotateTime( %this, %value )
+function RotateToToy::setRotateSpeed( %this, %value )
 {
-    %this.rotateTime = %value;
+    %this.rotateSpeed = %value;
+}
+
+//-----------------------------------------------------------------------------
+
+function RotateToToy::setTrackMouse( %this, %value )
+{
+    %this.trackMouse = %value;
 }
 
 //-----------------------------------------------------------------------------
@@ -129,7 +138,23 @@ function SandboxWindow::onTouchDown(%this, %touchID, %worldPosition)
     %angle = -mRadToDeg( mAtan( getWord(%worldPosition,0)-getWord(%origin,0), getWord(%worldPosition,1)-getWord(%origin,1) ) );
     
     //Rotate to the touched angle.
-    RotateToToy.TargetObject.RotateTo( %angle, RotateToToy.rotateTime );
+    RotateToToy.TargetObject.RotateTo( %angle, RotateToToy.rotateSpeed );
+}
+
+//-----------------------------------------------------------------------------
+
+function SandboxWindow::onTouchMoved(%this, %touchID, %worldPosition)
+{
+    // Finish if not tracking the mouse.
+    if ( !RotateToToy.trackMouse )
+        return;
+        
+    // Calculate the angle to the mouse.
+    %origin = RotateToToy.TargetObject.getPosition();
+    %angle = -mRadToDeg( mAtan( getWord(%worldPosition,0)-getWord(%origin,0), getWord(%worldPosition,1)-getWord(%origin,1) ) );
+    
+    //Rotate to the touched angle.
+    RotateToToy.TargetObject.RotateTo( %angle, RotateToToy.rotateSpeed );        
 }
     
 };

+ 141 - 0
modules/ShapeVectorToy/1/main.cs

@@ -0,0 +1,141 @@
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+function ShapeVectorToy::create( %this )
+{
+    // Set the sandbox drag mode availability.
+    Sandbox.allowManipulation(pan);
+    
+    // Set the manipulation mode.
+    Sandbox.useManipulation(pan);
+
+    // Set the toy properties
+
+    // Shape determines the poly points for the ShapeVector
+    // "Square": Simple box
+    // "Triangle": Equilateral triangle
+    // "Circle": Simple circle
+    // "Complex": Shape with enough vertices to make an uncommon shape
+    ShapeVectorToy.shape = "Square";
+
+    // Toggles filling the shape with color or leaving as an outline
+    ShapeVectorToy.fillMode = true;
+
+    // Color of the filling
+    ShapeVectorToy.fillColor = "0.5 1 1 0.5";
+
+    // Color of the border lines
+    ShapeVectorToy.lineColor = "0.5 1 1 1";
+
+    // Add custom controls for toy
+    addSelectionOption("Square,Triangle,Circle,Complex", "Shape", 4, "setShape", true, "Selects the shape to add to the scene");
+    addFlagOption("Fill mode", "setFillMode", ShapeVectorToy.fillMode, true, "Whether new shapes are filled in or not");
+
+    // Reset the toy.
+    ShapeVectorToy.reset();
+}
+
+//-----------------------------------------------------------------------------
+
+function ShapeVectorToy::destroy( %this )
+{
+}
+
+//-----------------------------------------------------------------------------
+
+function ShapeVectorToy::reset( %this )
+{
+    // Clear the scene.
+    SandboxScene.clear();
+
+    // Add a single shape
+    %this.addShape();
+}
+
+//-----------------------------------------------------------------------------
+
+function ShapeVectorToy::setShape( %this, %value )
+{
+    %this.shape = %value;
+}
+
+//-----------------------------------------------------------------------------
+
+function ShapeVectorToy::setFillMode( %this, %value)
+{
+    %this.fillMode = %value;
+}
+
+//-----------------------------------------------------------------------------
+
+function ShapeVectorToy::generateShape( %this )
+{
+    // Start with default values
+    %points = "0 0 0 0 0 0";
+    %isCircle = false;
+    %radius = 0;
+    %size = "40";
+
+    // Create the poly point list based on the selected shape
+    switch$(%this.shape)
+    {
+        case "Square":
+            %points = "-0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 0.5";
+
+        case "Triangle":
+            %points = "-0.0025 0.5 0.5 -0.5 -0.5 -0.5";
+
+        case "Circle":
+            %radius = %size / 2;
+            %isCircle = true;
+
+        case "Complex":
+            %points = "-0.997 0.005 -0.737 -0.750 -0.010 -0.993 0.746 -0.750 0.997 0.005 0.742 0.740 0.005 0.998 -0.761 0.740";
+    }
+
+    // Create the shape vector
+    %shape = new ShapeVector()
+    {
+        position = "0 0";
+        size = %size;
+        LineColor = %this.lineColor;
+        FillColor = %this.fillColor;
+        FillMode = %this.fillMode;
+        PolyList = %points;
+        isCircle = %isCircle;
+        circleRadius = %radius;
+    };
+
+    // Return the shape to be added to the scene
+    return %shape;
+}
+
+//-----------------------------------------------------------------------------
+
+function ShapeVectorToy::addShape( %this )
+{
+    // Create the shape.
+    %object = %this.generateShape();
+
+    // Add the sprite to the scene.
+    SandboxScene.add( %object );    
+}

+ 10 - 0
modules/ShapeVectorToy/1/module.taml

@@ -0,0 +1,10 @@
+<ModuleDefinition
+	ModuleId="ShapeVectorToy"
+	VersionId="1"
+	Description="Demonstrates creating a shape vector."
+	Dependencies="ToyAssets=1"
+	Type="toy"
+	ToyCategoryIndex="3"
+	ScriptFile="main.cs"
+	CreateFunction="create"
+	DestroyFunction="destroy"/>

+ 11 - 27
modules/SphereStackToy/1/main.cs

@@ -46,17 +46,12 @@ function SphereStackToy::create( %this )
 
 function SphereStackToy::destroy( %this )
 {   
-    // Cancel any pending events.
-    SphereStackToy::cancelPendingEvents();
 }
 
 //-----------------------------------------------------------------------------
 
 function SphereStackToy::reset(%this)
 {
-    // Cancel any pending events.
-    SphereStackToy::cancelPendingEvents();
-    
     // Clear the scene.
     SandboxScene.clear();
     
@@ -78,21 +73,8 @@ function SphereStackToy::reset(%this)
     // Create the ground.
     %this.createGround();
         
-    // Schedule to create a ball.
-    %this.createBallScheduleId = %this.schedule( 100, "createBall" );
-}
-
-//-----------------------------------------------------------------------------
-
-function SphereStackToy::cancelPendingEvents(%this)
-{
-    // Finish if there are not pending events.
-    if ( !isEventPending(%this.createBallScheduleId) )
-        return;
-        
-    // Cancel it.
-    cancel(%this.createBallScheduleId);
-    %this.createBallScheduleId = "";
+    // Start the timer.
+    SphereStackToy.startTimer( "createball", 100 );
 }
 
 //-----------------------------------------------------------------------------
@@ -150,12 +132,14 @@ function SphereStackToy::createGround( %this )
 
 function SphereStackToy::createBall(%this)
 {
-    // Reset the event schedule.
-    %this.createBallScheduleId = "";
-
     // Finish if exceeded the required number of balls.
     if ( %this.currentBalls >= %this.maxBalls)
+    {
+        // Stop the timer.
+        SphereStackToy.stopTimer();
+        
         return;
+    }
 
     // Set the ball size.
     %ballSize = 2;
@@ -188,10 +172,10 @@ function SphereStackToy::createBall(%this)
     
     // Finish if exceeded the required number of balls.
     if ( %this.currentBalls == %this.maxBalls)
-        return;
-
-    // Schedule to create a ball.
-    %this.createBallScheduleId = %this.schedule( 150, "createBall" );
+    {
+        // Stop the timer.
+        SphereStackToy.stopTimer();
+    }
 }
 
 //-----------------------------------------------------------------------------

+ 37 - 48
modules/SpriteStressToy/1/main.cs

@@ -60,17 +60,12 @@ function SpriteStressToy::create( %this )
 
 function SpriteStressToy::destroy( %this )
 {
-    // Cancel any pending events.
-    SpriteStressToy::cancelPendingEvents();    
 }
 
 //-----------------------------------------------------------------------------
 
 function SpriteStressToy::reset( %this )
 {
-    // Cancel any pending events.
-    SpriteStressToy::cancelPendingEvents();
-    
     // Reset sprite count.
     SpriteStressToy.SpriteCount = 0;
 
@@ -97,7 +92,7 @@ function SpriteStressToy::reset( %this )
     if ( SpriteStressToy.RenderMode $= "Static" )
     {
         // Create the static sprites.
-        %this.createStaticSprites();
+        SpriteStressToy.startTimer( "createStaticSprites", SpriteStressToy.SpriteCreatePeriod );
         
         return;
     }
@@ -106,7 +101,7 @@ function SpriteStressToy::reset( %this )
     if ( SpriteStressToy.RenderMode $= "Static (Composite)" )
     {
         // Create the static composite sprites.
-        %this.createStaticCompositeSprites();    
+        SpriteStressToy.startTimer( "createStaticCompositeSprites", SpriteStressToy.SpriteCreatePeriod );
     
         return;
     }
@@ -115,7 +110,7 @@ function SpriteStressToy::reset( %this )
     if ( SpriteStressToy.RenderMode $= "Animated" )
     {
         // Create the animated sprites.
-        %this.createAnimatedSprites();    
+        SpriteStressToy.startTimer( "createAnimatedSprites", SpriteStressToy.SpriteCreatePeriod );
     
         return;
     }    
@@ -124,7 +119,7 @@ function SpriteStressToy::reset( %this )
     if ( SpriteStressToy.RenderMode $= "Animated (Composite)" )
     {
         // Create the animated composite sprites.
-        %this.createAnimatedCompositeSprites();    
+        SpriteStressToy.startTimer( "createAnimatedCompositeSprites", SpriteStressToy.SpriteCreatePeriod );
     
         return;
     }    
@@ -133,20 +128,6 @@ function SpriteStressToy::reset( %this )
     error( "SpriteStressToy::reset() - Unknown render mode." );
 }
 
-
-//-----------------------------------------------------------------------------
-
-function SpriteStressToy::cancelPendingEvents(%this)
-{
-    // Finish if there are not pending events.
-    if ( !isEventPending(%this.createSpriteScheduleId) )
-        return;
-        
-    // Cancel it.
-    cancel(%this.createSpriteScheduleId);
-    %this.createSpriteScheduleId = "";
-}
-
 //-----------------------------------------------------------------------------
 
 function SpriteStressToy::createBackground( %this )
@@ -249,12 +230,14 @@ function SpriteStressToy::updateRenderSortMode( %this )
 
 function SpriteStressToy::createStaticSprites( %this )
 {
-    // Reset the event schedule.
-    %this.createSpriteScheduleId = "";
-    
     // Finish if max sprites reached.
     if ( SpriteStressToy.SpriteCount >= SpriteStressToy.MaxSprite )
+    {
+        // Stop the timer.
+        SpriteStressToy.stopTimer();
+        
         return;
+    }
         
     // Create the sprites at the specified rate.
     for( %n = 0; %n < SpriteStressToy.SpriteCreateRate; %n++ )
@@ -299,7 +282,10 @@ function SpriteStressToy::createStaticSprites( %this )
         if ( SpriteStressToy.SpriteCount == SpriteStressToy.MaxSprite )
         {
             // Update the overlay.
-            %this.updateSpriteCountOverlay();              
+            %this.updateSpriteCountOverlay();
+            
+            // Stop the timer.
+            SpriteStressToy.stopTimer();         
             
             return;
         }
@@ -307,21 +293,20 @@ function SpriteStressToy::createStaticSprites( %this )
     
     // Update the overlay.
     %this.updateSpriteCountOverlay();  
-        
-    // Schedule to create more sprites.
-    %this.createSpriteScheduleId = %this.schedule( SpriteStressToy.SpriteCreatePeriod, "createStaticSprites" );        
 }
 
 //-----------------------------------------------------------------------------
 
 function SpriteStressToy::createAnimatedSprites( %this )
 {
-    // Reset the event schedule.
-    %this.createSpriteScheduleId = "";
-    
     // Finish if max sprites reached.
     if ( SpriteStressToy.SpriteCount >= SpriteStressToy.MaxSprite )
+    {
+        // Stop the timer.
+        SpriteStressToy.stopTimer();
+        
         return;
+    }
 
     // Create the sprites at the specified rate.
     for( %n = 0; %n < SpriteStressToy.SpriteCreateRate; %n++ )
@@ -365,27 +350,29 @@ function SpriteStressToy::createAnimatedSprites( %this )
             // Update the overlay.
             %this.updateSpriteCountOverlay();              
             
+            // Stop the timer.
+            SpriteStressToy.stopTimer();         
+            
             return;
         }
     }
     
     // Update the overlay.
     %this.updateSpriteCountOverlay();  
-    
-    // Schedule to create more sprites.
-    %this.createSpriteScheduleId = %this.schedule( SpriteStressToy.SpriteCreatePeriod, "createAnimatedSprites" );        
 }
 
 //-----------------------------------------------------------------------------
 
 function SpriteStressToy::createStaticCompositeSprites( %this )
 {
-    // Reset the event schedule.
-    %this.createSpriteScheduleId = "";
-    
     // Finish if max sprites reached.
     if ( SpriteStressToy.SpriteCount >= SpriteStressToy.MaxSprite )
+    {
+        // Stop the timer.
+        SpriteStressToy.stopTimer();
+        
         return;
+    }
 
     // Do we have a composite sprite yet?
     if ( !isObject(SpriteStressToy.CompositeSpriteObject) )
@@ -450,27 +437,29 @@ function SpriteStressToy::createStaticCompositeSprites( %this )
             // Update the overlay.
             %this.updateSpriteCountOverlay();              
             
+            // Stop the timer.
+            SpriteStressToy.stopTimer();         
+            
             return;
         }
     }
     
     // Update the overlay.
     %this.updateSpriteCountOverlay();  
-        
-    // Schedule to create more sprites.
-    %this.createSpriteScheduleId = %this.schedule( SpriteStressToy.SpriteCreatePeriod, "createStaticCompositeSprites" );        
 }
 
 //-----------------------------------------------------------------------------
 
 function SpriteStressToy::createAnimatedCompositeSprites( %this )
 {
-    // Reset the event schedule.
-    %this.createSpriteScheduleId = "";
-    
     // Finish if max sprites reached.
     if ( SpriteStressToy.SpriteCount >= SpriteStressToy.MaxSprite )
+    {
+        // Stop the timer.
+        SpriteStressToy.stopTimer();
+        
         return;
+    }
 
     // Do we have a composite sprite yet?
     if ( !isObject(SpriteStressToy.CompositeSpriteObject) )
@@ -534,6 +523,9 @@ function SpriteStressToy::createAnimatedCompositeSprites( %this )
         {
             // Update the overlay.
             %this.updateSpriteCountOverlay();              
+
+            // Stop the timer.
+            SpriteStressToy.stopTimer();         
             
             return;
         }
@@ -541,9 +533,6 @@ function SpriteStressToy::createAnimatedCompositeSprites( %this )
     
     // Update the overlay.
     %this.updateSpriteCountOverlay();  
-        
-    // Schedule to create more sprites.
-    %this.createSpriteScheduleId = %this.schedule( SpriteStressToy.SpriteCreatePeriod, "createAnimatedCompositeSprites" );        
 }
 
 //-----------------------------------------------------------------------------

+ 4 - 35
modules/TruckToy/1/main.cs

@@ -25,8 +25,6 @@ function TruckToy::create( %this )
     // Activate the package.
     activatePackage( TruckToyPackage );
 
-    TruckToy.createProjectileScheduleId = "";
-    
     TruckToy.ObstacleFriction = 1.5;
     TruckToy.CameraWidth = 20;
     TruckToy.CameraHeight = 15;
@@ -68,33 +66,14 @@ function TruckToy::create( %this )
 
 function TruckToy::destroy( %this )
 {
-    // Cancel any pending events.
-    TruckToy.cancelPendingEvents();
-        
     // Deactivate the package.
     deactivatePackage( TruckToyPackage );
 }
 
 //-----------------------------------------------------------------------------
 
-function TruckToy::cancelPendingEvents(%this)
-{
-    // Finish if there are not pending events.
-    if ( !isEventPending(%this.createProjectileScheduleId) )
-        return;
-        
-    // Cancel it.
-    cancel(%this.createProjectileScheduleId);
-    %this.createProjectileScheduleId = "";
-}
-
-//-----------------------------------------------------------------------------
-
 function TruckToy::reset( %this )
 {   
-    // Cancel any pending events.
-    %this.cancelPendingEvents();
-    
     // Clear the scene.
     SandboxScene.clear();    
     
@@ -194,8 +173,8 @@ function TruckToy::reset( %this )
     %truckStartY = 3;   
     %this.createTruck( %truckStartX, %truckStartY );    
     
-    // Schedule to create a projectile.
-    TruckToy.createProjectileScheduleId = %this.schedule( TruckToy.ProjectileRate, "createProjectile" );    
+    // Start the timer.
+    TruckToy.startTimer( "createProjectile", TruckToy.ProjectileRate );
 }
 
 // -----------------------------------------------------------------------------
@@ -665,15 +644,11 @@ function TruckToy::createBonfire(%this, %x, %y, %scale, %layer)
 
 function TruckToy::createProjectile(%this)
 {
-    // Reset the event schedule.
-    %this.createProjectileScheduleId = "";
-    
     // Fetch the truck position.
     %truckPositionX = TruckToy.TruckBody.getPositionX();
     
     %projectile = new Sprite() { class = "TruckProjectile"; };
     %projectile.Animation = "ToyAssets:Projectile_FireballAnim";
-    //%projectile.Image = "ToyAssets:Cannonball_projectile_1Sprite";
     %projectile.setPosition( getRandom( %truckPositionX - (TruckToy.CameraWidth * 0.2), %truckPositionX + (TruckToy.CameraWidth * 0.5) ), 12 );
     %projectile.setSceneLayer( TruckToy.BackgroundDomain-2 );
     %projectile.setSceneGroup( TruckToy.ProjectileDomain );
@@ -684,9 +659,6 @@ function TruckToy::createProjectile(%this)
     %projectile.setCollisionGroups( TruckToy.ObstacleDomain );
     %projectile.CollisionCallback = true;
     SandboxScene.add( %projectile ); 
-    
-    // Schedule to create a projectile.
-    %this.createProjectileScheduleId = %this.schedule( %this.ProjectileRate, "createProjectile" );         
 }
 
 // -----------------------------------------------------------------------------
@@ -938,11 +910,8 @@ function TruckToy::setProjectileRate( %this, %value )
 {
     %this.ProjectileRate = %value;
     
-    // Cancel any pending events.
-    %this.cancelPendingEvents();
-    
-    // Schedule to create a projectile.
-    %this.createProjectileScheduleId = %this.schedule( 1000, "createProjectile" );    
+    // Start the timer.
+    TruckToy.startTimer( "createProjectile", TruckToy.ProjectileRate );
 }
 
 //-----------------------------------------------------------------------------

+ 10 - 30
modules/TumblerToy/1/main.cs

@@ -30,7 +30,6 @@ function TumblerToy::create( %this )
     Sandbox.useManipulation( pull );
     
     // Initialize the toys settings.
-    TumblerToy.createBallScheduleId = "";
     TumblerToy.maxBalls = 100;
     TumblerToy.currentBalls = 0;
     TumblerToy.MotorSpeed = 10;
@@ -48,30 +47,12 @@ function TumblerToy::create( %this )
 
 function TumblerToy::destroy( %this )
 {
-    // Cancel any pending events.
-    TumblerToy.cancelPendingEvents();
-}
-
-//-----------------------------------------------------------------------------
-
-function TumblerToy::cancelPendingEvents(%this)
-{
-    // Finish if there are not pending events.
-    if ( !isEventPending(%this.createBallScheduleId) )
-        return;
-        
-    // Cancel it.
-    cancel(%this.createBallScheduleId);
-    %this.createBallScheduleId = "";
 }
 
 //-----------------------------------------------------------------------------
 
 function TumblerToy::reset(%this)
-{
-    // Cancel any pending events.
-    TumblerToy::cancelPendingEvents();
-    
+{   
     // Clear the scene.
     SandboxScene.clear();
     
@@ -87,8 +68,8 @@ function TumblerToy::reset(%this)
     // Reset the ball count.    
     %this.currentBalls = 0;
             
-    // Schedule to create a ball.
-    %this.createBallScheduleId = %this.schedule( 100, "createBall" );
+    // Start the timer.
+    TumblerToy.startTimer( "createBall", 100 );
 }
 
 //-----------------------------------------------------------------------------
@@ -124,7 +105,7 @@ function TumblerToy::createTumbler(%this)
     SandboxScene.add( %tumbler );
 
     // Create the motor joint.    
-    TumblerToy.MotorJoint = SandboxScene.createRevoluteJoint( %tumbler, 0, "0 0" );
+    TumblerToy.MotorJoint = SandboxScene.createRevoluteJoint( %tumbler, "", "0 0" );
     SandboxScene.setRevoluteJointMotor( TumblerToy.MotorJoint, true, TumblerToy.MotorSpeed, 1000000 );    
 }
 
@@ -132,9 +113,6 @@ function TumblerToy::createTumbler(%this)
 
 function TumblerToy::createBall(%this)
 {
-    // Reset the event schedule.
-    %this.createBallScheduleId = "";
-
     // Fetch the stock color count.
     %stockColorCount = getStockColorCount();
     
@@ -153,13 +131,15 @@ function TumblerToy::createBall(%this)
         // Increase ball count.
         %this.currentBalls++;
         
-        // Finish if exceeded the required number of balls.
+        // Stop the timer if exceeded the required number of balls.
         if ( %this.currentBalls >= %this.maxBalls)
+        {
+            // Cancel the timer.
+            TumblerToy.stopTimer();
+
             return;
+        }
     }
-
-    // Schedule to create a ball.
-    %this.createBallScheduleId = %this.schedule( 100, "createBall" );
 }
 
 

+ 2 - 0
tools/documentation/.gitignore

@@ -0,0 +1,2 @@
+*.log
+

+ 18 - 0
tools/documentation/ReadMe.txt

@@ -0,0 +1,18 @@
+Generates TorqueScript reference documentation.
+
+***********
+* Windows *
+***********
+Execute the "generateDocs.bat"
+
+This should produce an output file in the sub-folder "input" followed by executing the Win32 Doxygen to generate the documentation in the output sub-folder.  The default configuration only outputs HTML however if you change the "scriptReference.Windows.cfg" and change the line "GENERATE_HTMLHELP" to "= YES" you will also get a compiled CHM file.
+
+********
+* OS X *
+********
+
+Execute the "generateDocs.command"
+
+This should produce an output file in the sub-folder "input" followed by executing the Win32 Doxygen to generate the documentation in the output sub-folder.  The default configuration only outputs HTML.
+
+The latest Doxygen for OSX can be found here: http://www.stack.nl/~dimitri/doxygen/download.html  Shortly the OSX version will be placed into the repository alongside the DMG version.

BIN
tools/documentation/doxygen.exe


BIN
tools/documentation/doxyindexer.exe


BIN
tools/documentation/doxysearch.cgi


+ 36 - 0
tools/documentation/generateDocs.bat

@@ -0,0 +1,36 @@
+@echo off
+setlocal
+
+REM --- Dump the engine docs ---
+if not exist "..\..\Torque2D.exe" (
+	echo.
+	echo The Torque 2D executable was not found.
+	echo.
+
+	endlocal
+	exit /b 1
+)
+if exist "input\docDump.txt" del /Q "input\docDump.txt"
+"../../Torque2D.exe" generateDocs.cs
+if not exist "input\docDump.txt" (
+    echo.
+    echo The Torque 2D documentation was not dumped.
+    echo.
+
+    endlocal
+    exit /b 1
+)
+
+REM --- Build the doxygen docs ---
+del /Q "output\html"
+svn checkout "https://github.com/GarageGames/Torque2D.git/branches/gh-pages" "output\html"
+doxygen.exe scriptReference.Windows.cfg
+
+REM --- Add the newly generated docs to the gh-pages branch
+cd "output\html"
+svn add *.*
+svn commit -m "- Updated reference"
+
+REM --- Build the CHM ---
+REM hhc.exe "output\html\index.hhp"
+endlocal

+ 28 - 0
tools/documentation/generateDocs.cs

@@ -0,0 +1,28 @@
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+new ConsoleLogger(logger, "input/docDump.txt", false);
+dumpConsoleFunctions();
+dumpConsoleClasses();
+logger.delete();
+quit();
+

BIN
tools/documentation/hhc.exe


+ 2 - 0
tools/documentation/input/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 27 - 0
tools/documentation/main.generateDocs.cs

@@ -0,0 +1,27 @@
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+new ConsoleLogger(logger, "documentation/input/docs.txt", false);
+dumpConsoleFunctions();
+dumpConsoleClasses();
+logger.delete();
+quit();

+ 2 - 0
tools/documentation/output/.gitignore

@@ -0,0 +1,2 @@
+*
+!.gitignore

+ 172 - 0
tools/documentation/scriptRefLayout.xml

@@ -0,0 +1,172 @@
+<doxygenlayout version="1.0">
+  <!-- Navigation index tabs for HTML output -->
+  <navindex>
+    <tab type="namespaces" visible="yes" title="Global Script">
+      <tab type="namespaces" visible="yes" title="Functions"/>
+    </tab>  
+	<tab type="classes" visible="yes" title="Types">
+      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title="A-Z"/>
+      <tab type="hierarchy" visible="$CLASS_HIERARCHY_INDEX" title="Hierarchy"/>
+	</tab>
+  </navindex>  
+
+  <!-- Layout definition for a class page -->
+  <class>
+    <briefdescription visible="yes"/>
+    <includes visible="$SHOW_INCLUDE_FILES"/>
+    <inheritancegraph visible="$CLASS_GRAPH"/>
+    <collaborationgraph visible="$COLLABORATION_GRAPH"/>
+    <allmemberslink visible="yes"/>
+    <memberdecl>
+      <nestedclasses visible="yes" title=""/>
+      <publictypes title=""/>
+      <publicslots title=""/>
+      <signals title=""/>
+      <publicmethods title=""/>
+      <publicstaticmethods title=""/>
+      <publicattributes title=""/>
+      <publicstaticattributes title=""/>
+      <protectedtypes title=""/>
+      <protectedslots title=""/>
+      <protectedmethods title=""/>
+      <protectedstaticmethods title=""/>
+      <protectedattributes title=""/>
+      <protectedstaticattributes title=""/>
+      <packagetypes title=""/>
+      <packagemethods title=""/>
+      <packagestaticmethods title=""/>
+      <packageattributes title=""/>
+      <packagestaticattributes title=""/>
+      <properties title=""/>
+      <events title=""/>
+      <privatetypes title=""/>
+      <privateslots title=""/>
+      <privatemethods title=""/>
+      <privatestaticmethods title=""/>
+      <privateattributes title=""/>
+      <privatestaticattributes title=""/>
+      <friends title=""/>
+      <related title="" subtitle=""/>
+      <membergroups visible="yes"/>
+    </memberdecl>
+    <detaileddescription title=""/>
+    <memberdef>
+      <typedefs title=""/>
+      <enums title=""/>
+      <constructors title=""/>
+      <functions title=""/>
+      <related title=""/>
+      <variables title=""/>
+      <properties title=""/>
+      <events title=""/>
+    </memberdef>
+    <usedfiles visible="$SHOW_USED_FILES"/>
+    <authorsection visible="yes"/>
+  </class>
+
+  <!-- Layout definition for a namespace page -->
+  <namespace>
+    <briefdescription visible="yes"/>
+    <memberdecl>
+      <nestednamespaces visible="yes" title=""/>
+      <classes visible="yes" title=""/>
+      <typedefs title=""/>
+      <enums title=""/>
+      <functions title=""/>
+      <variables title=""/>
+      <membergroups visible="yes"/>
+    </memberdecl>
+    <detaileddescription title=""/>
+    <memberdef>
+      <typedefs title=""/>
+      <enums title=""/>
+      <functions title=""/>
+      <variables title=""/>
+    </memberdef>
+    <authorsection visible="yes"/>
+  </namespace>
+
+  <!-- Layout definition for a file page -->
+  <file>
+    <briefdescription visible="yes"/>
+    <includes visible="$SHOW_INCLUDE_FILES"/>
+    <includegraph visible="$INCLUDE_GRAPH"/>
+    <includedbygraph visible="$INCLUDED_BY_GRAPH"/>
+    <sourcelink visible="yes"/>
+    <memberdecl>
+      <classes visible="yes" title=""/>
+      <namespaces visible="yes" title=""/>
+      <defines title=""/>
+      <typedefs title=""/>
+      <enums title=""/>
+      <functions title=""/>
+      <variables title=""/>
+      <membergroups visible="yes"/>
+    </memberdecl>
+    <detaileddescription title=""/>
+    <memberdef>
+      <defines title=""/>
+      <typedefs title=""/>
+      <enums title=""/>
+      <functions title=""/>
+      <variables title=""/>
+    </memberdef>
+    <authorsection/>
+  </file>
+
+  <!-- Layout definition for a group page -->
+  <group>
+    <briefdescription visible="yes"/>
+    <groupgraph visible="$GROUP_GRAPHS"/>
+    <memberdecl>
+      <classes visible="yes" title=""/>
+      <namespaces visible="yes" title=""/>
+      <dirs visible="yes" title=""/>
+      <nestedgroups visible="yes" title=""/>
+      <files visible="yes" title=""/>
+      <defines title=""/>
+      <typedefs title=""/>
+      <enums title=""/>
+      <enumvalues title=""/>
+      <functions title=""/>
+      <variables title=""/>
+      <signals title=""/>
+      <publicslots title=""/>
+      <protectedslots title=""/>
+      <privateslots title=""/>
+      <events title=""/>
+      <properties title=""/>
+      <friends title=""/>
+      <membergroups visible="yes"/>
+    </memberdecl>
+    <detaileddescription title=""/>
+    <memberdef>
+      <pagedocs/>
+      <defines title=""/>
+      <typedefs title=""/>
+      <enums title=""/>
+      <enumvalues title=""/>
+      <functions title=""/>
+      <variables title=""/>
+      <signals title=""/>
+      <publicslots title=""/>
+      <protectedslots title=""/>
+      <privateslots title=""/>
+      <events title=""/>
+      <properties title=""/>
+      <friends title=""/>
+    </memberdef>
+    <authorsection visible="yes"/>
+  </group>
+
+  <!-- Layout definition for a directory page -->
+  <directory>
+    <briefdescription visible="yes"/>
+    <directorygraph visible="yes"/>
+    <memberdecl>
+      <dirs visible="yes"/>
+      <files visible="yes"/>
+    </memberdecl>
+    <detaileddescription title=""/>
+  </directory>
+</doxygenlayout>

+ 1514 - 0
tools/documentation/scriptReference.OSX.cfg

@@ -0,0 +1,1514 @@
+# Doxyfile 1.6.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = 
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = output
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = YES
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses. 
+# With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this tag. 
+# The format is ext=language, where ext is a file extension, and language is one of 
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, 
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat 
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), 
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set
+# FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = YES
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = NO
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = YES
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = YES
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = NO
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = YES
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = YES
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = YES
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = YES
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST = NO
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 27
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = NO
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by 
+# doxygen. The layout file controls the global structure of the generated output files 
+# in an output format independent way. The create the layout file that represents 
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a 
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name 
+# of the layout file.
+
+LAYOUT_FILE            = scriptRefLayout.xml
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = NO
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = "doxygen.log"
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  =  input                          
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.txt
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = */cvs/* \
+                         */.svn/* \
+						 */.git
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = bool
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = images
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = NO
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = scriptref_header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = scriptref_footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = torquedoc.css
+
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = YES
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Torque 2D - Script Reference"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = com.garagegames.TorqueScript
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = "Torque 2D - Script Reference.chm"
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER 
+# are set, an additional index file will be generated that can be used as input for 
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated 
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = 
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. 
+# For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = YES
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 1
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enable doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) 
+# there is already a search function so this one should typically 
+# be disabled.
+
+SEARCHENGINE           = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = c:\wtools\texmf\miktex\bin\latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = c:\wtools\texmf\miktex\bin\makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = YES
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = YES
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = DOXYGENIZING \
+                         TORQUE_DEBUG
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = NO
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = NO
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = NO
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = NO
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = ../graphviz/bin
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES

+ 1513 - 0
tools/documentation/scriptReference.Windows.cfg

@@ -0,0 +1,1513 @@
+# Doxyfile 1.6.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = 
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = output
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = YES
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses. 
+# With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this tag. 
+# The format is ext=language, where ext is a file extension, and language is one of 
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, 
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat 
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), 
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set
+# FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen to replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = YES
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penality. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will rougly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = NO
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = YES
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = YES
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = NO
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = YES
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = YES
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = YES
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = YES
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = NO
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = NO
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST = NO
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 27
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = NO
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by 
+# doxygen. The layout file controls the global structure of the generated output files 
+# in an output format independent way. The create the layout file that represents 
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a 
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name 
+# of the layout file.
+
+LAYOUT_FILE            = scriptRefLayout.xml
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = NO
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = "doxygen.log"
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  =  input                          
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.txt
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = */cvs/* \
+                         */.svn/* \
+						 */.git
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = bool
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = images
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = NO
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = scriptref_header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = scriptref_footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = torquedoc.css
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded. For this to work a browser that supports 
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = YES
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Torque 2D - Script Reference"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = com.garagegames.TorqueScript
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = "Torque 2D - Script Reference.chm"
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER 
+# are set, an additional index file will be generated that can be used as input for 
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated 
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = 
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. 
+# For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = YES
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 1
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enable doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) 
+# there is already a search function so this one should typically 
+# be disabled.
+
+SEARCHENGINE           = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = c:\wtools\texmf\miktex\bin\latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = c:\wtools\texmf\miktex\bin\makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = YES
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = YES
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = DOXYGENIZING \
+                         TORQUE_DEBUG
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links. 
+# Note that each tag file must have a unique name 
+# (where the name does NOT include the path) 
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output 
+# directory and reference it in all dot files that doxygen generates. This 
+# font does not include all possible unicode characters however, so when you need 
+# these (or just want a differently looking font) you can specify the font name 
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
+# which can be done by putting it in a standard location or by setting the 
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the 
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
+# different font using DOT_FONTNAME you can set the path where dot 
+# can find it using this tag.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = NO
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = NO
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = NO
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = NO
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif 
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = ../graphviz/bin
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES

+ 10 - 0
tools/documentation/scriptref_footer.html

@@ -0,0 +1,10 @@
+<!-- START FOOTER -->
+<br>
+<br>
+<center>
+	<div style="color: #777777;">
+	Copyright &copy; 2013 <a style="color: #777777;" target="_blank" href="http://www.garagegames.com">GarageGames, LLC</a>. All Rights Reserved.
+	</div>
+</center>
+</body>
+</html>

+ 20 - 0
tools/documentation/scriptref_header.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>$title</title>
+<link href="torquedoc.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<table width="100%" class="header">
+<tr>
+</tr>
+<tr><td class="headermenu">
+	<center>
+	<a class="qindex" href="index.html">Main</a> &nbsp; 
+	<a class="qindex" target="_blank" href="https://github.com/GarageGames/Torque2D">GitHub</a>
+	</center>
+</td></tr>
+</table>
+<br>
+<!-- END HEADER -->

+ 540 - 0
tools/documentation/torquedoc.css

@@ -0,0 +1,540 @@
+/*The standard CSS for doxygen*/
+BODY, TABLE, DIV, P, DL
+{
+	font-family: Verdana, "Helvetica Neue", Arial, Helvetica, sans-serif;
+	font-size: 9pt;
+	/*[empty]background-color:;*/
+}
+
+TABLE.header
+{
+	background-color: #251F3D;
+	padding: 0;
+	border: 0;
+	margin: 0;
+	border-spacing: 0;
+}
+TD.headermenu
+{
+	background-color: #3D3755;
+	border-width: 0;
+	padding: 4px;
+	margin: 0 0 0 0;
+}
+
+DIV.contents
+{
+	padding-left: 20px;
+	padding-right: 20px;
+}
+
+.contents TABLE
+{
+/*A little spacing at the top of tables.*/
+	margin-top: 6px;
+	border-spacing: 0;
+}
+/*@group Heading Levels*/
+H1
+{
+	text-align: center;
+	font-size: 150%;
+}
+H2
+{
+	margin-top: 8px;
+	font-size: 120%;
+}
+H3
+{
+	font-size: 100%;
+}
+DT
+{
+	font-weight: bold;
+	margin-bottom: 7px;
+}
+DIV.multicol
+{
+/*-moz-column-gap: 1em*/
+	-webkit-column-gap: 1em;
+/*-moz-column-count: 3*/
+	-webkit-column-count: 3;
+}
+P.startli, P.startdd
+{
+	margin-top: 2px;
+}
+P.endli
+{
+	margin-bottom: 0px;
+}
+P.enddd
+{
+	margin-bottom: 4px;
+}
+/*@end*/
+CAPTION
+{
+	font-weight: bold;
+}
+SPAN.legend
+{
+	font-size: 70%;
+	text-align: center;
+}
+DIV.qindex, DIV.navtab
+{
+	background-color: #E8EEF2;
+	border: 1px solid #84B0C7;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+}
+DIV.qindex, DIV.navpath
+{
+	width: 100%;
+	line-height: 140%;
+}
+DIV.navtab
+{
+	margin-right: 15px;
+}
+/*@group Link Styling*/
+A
+{
+	color: #0063B5;
+	font-weight: normal;
+	text-decoration: none;
+}
+.contents A:visited
+{
+	color: #1B77C5;
+}
+A:hover
+{
+	color: #3399CC;
+	text-decoration: underline;
+}
+
+A.qindex
+{
+	color: #CBCBCB;
+	font-weight: normal;
+	text-decoration: none;
+}
+A:hover.qindex
+{
+	color: #FFFFFF;
+}
+
+A.qindexHL
+{
+	font-weight: bold;
+	background-color: #6666CC;
+	color: #FFFFFF;
+	border: 1px double #9295C2;
+}
+.contents A.qindexHL:visited
+{
+	color: #FFFFFF;
+}
+A.el
+{
+	font-weight: normal;
+}
+A.elRef
+{
+}
+A.code
+{
+}
+A.codeRef
+{
+}
+
+/* Disable links within headers... these are usually just anchors */
+H1 A
+{
+	font-weight: bold;
+	color: #000000;
+}
+H1 A:hover
+{
+	color: #000000;
+	text-decoration: none;
+}
+H2 A
+{
+	font-weight: bold;
+	color: #000000;
+}
+H2 A:hover
+{
+	color: #000000;
+	text-decoration: none;
+}
+H3 A
+{
+	font-weight: bold;
+	color: #000000;
+}
+H3 A:hover
+{
+	color: #000000;
+	text-decoration: none;
+}
+
+/*@end*/
+DL.el
+{
+	margin-left: -1cm;
+}
+.fragment
+{
+	font-family: monospace, fixed;
+	font-size: 105%;
+}
+PRE.fragment
+{
+	border: 1px solid #CCCCCC;
+	background-color: #F5F5F5;
+	padding: 4px 6px;
+	margin: 4px 8px 4px 2px;
+}
+DIV.ah
+{
+	background-color: #000000;
+	font-weight: bold;
+	color: #FFFFFF;
+	margin-bottom: 3px;
+	margin-top: 3px;
+}
+DIV.groupHeader
+{
+	margin-left: 16px;
+	margin-top: 12px;
+	margin-bottom: 6px;
+	font-weight: bold;
+}
+DIV.groupText
+{
+	margin-left: 16px;
+	font-style: italic;
+}
+BODY
+{
+	background: #FFFFFF;
+	color: #000000;
+	margin-right: 0;
+	margin-left: 0;
+	margin-top: 0;
+}
+TD.indexkey
+{
+	background-color: #F2F1F0;
+	border-top: 1px solid #CCCCCC;
+	margin: 2px 2px 0px 0;
+	padding: 2px 10px;
+}
+TD.indexvalue
+{
+	background-color: #F2F1F0;
+	border-top: 1px solid #CCCCCC;
+	padding: 2px 10px;
+	margin: 2px 2px 2px 0;
+}
+.memlist TD
+{
+	background-color: #F2F1F0;
+	border-top: 1px solid #CCC;
+	padding: 4px 2px 4px 8px;
+}
+P.formulaDsp
+{
+	text-align: center;
+}
+IMG.formulaDsp
+{
+}
+IMG.formulaInl
+{
+	vertical-align: middle;
+}
+DIV.center
+{
+	text-align: center;
+	margin-top: 0px;
+	margin-bottom: 0px;
+	padding: 0px;
+}
+DIV.center IMG
+{
+	border: 0px solid #000000;
+}
+IMG.footer
+{
+	border: 0px solid #000000;
+	vertical-align: middle;
+}
+/*@group Code Colorization*/
+SPAN.keyword
+{
+	color: #008000;
+}
+SPAN.keywordtype
+{
+	color: #604020;
+}
+SPAN.keywordflow
+{
+	color: #E08000;
+}
+SPAN.comment
+{
+	color: #800000;
+}
+SPAN.preprocessor
+{
+	color: #806020;
+}
+SPAN.stringliteral
+{
+	color: #002080;
+}
+SPAN.charliteral
+{
+	color: #008080;
+}
+SPAN.vhdldigit
+{
+	color: #FF00FF;
+}
+SPAN.vhdlchar
+{
+	color: #000000;
+}
+SPAN.vhdlkeyword
+{
+	color: #700070;
+}
+SPAN.vhdllogic
+{
+	color: #FF0000;
+}
+/*@end*/
+.search
+{
+	color: #003399;
+	font-weight: bold;
+}
+FORM.search
+{
+	margin-bottom: 0px;
+	margin-top: 0px;
+}
+INPUT.search
+{
+	font-size: 75%;
+	color: #000080;
+	font-weight: normal;
+	background-color: #E8EEF2;
+}
+TD.tiny
+{
+	font-size: 75%;
+}
+.dirtab
+{
+	padding: 4px;
+	border-collapse: collapse;
+	border: 1px solid #84B0C7;
+}
+TH.dirtab
+{
+	background: #E8EEF2;
+	font-weight: bold;
+}
+HR
+{
+	height: 1px;
+	border: 0;
+	background: #666666;
+}
+/*@group Member Descriptions*/
+.mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams
+{
+	background-color: #F2F1F0;
+	border: none;
+	margin: 4px;
+	padding: 1px 2px 2px 8px;
+}
+.mdescLeft, .mdescRight
+{
+	padding: 0px 8px 4px;
+	color: #555;
+}
+.memItemLeft, .memItemRight, .memTemplParams
+{
+	border-top: 1px solid #CCC;
+	padding: 4px;
+}
+.memItemLeft, .memTemplItemLeft
+{
+	white-space: nowrap;
+}
+.memTemplParams
+{
+	color: #606060;
+	white-space: nowrap;
+}
+/*@end
+@group Member Details
+Styles for detailed member documentation*/
+.memtemplate
+{
+	font-size: 80%;
+	color: #606060;
+	font-weight: normal;
+	margin-left: 3px;
+}
+.memnav
+{
+	background-color: #E8EEF2;
+	border: 1px solid #84B0C7;
+	text-align: center;
+	margin: 2px;
+	margin-right: 15px;
+	padding: 2px;
+}
+.memitem
+{
+	padding: 0;
+	margin-bottom: 10px;
+}
+.memname
+{
+	color: #000066;
+	white-space: nowrap;
+	font-weight: normal;
+}
+.memproto
+{
+	border-top: 1px solid #CCCCCC;
+}
+.memproto
+{
+	padding: 5px;
+	background-color: #F2F1F0;
+	font-weight: normal;
+}
+.memdoc
+{
+	padding: 5px 10px;
+}
+.paramkey
+{
+	text-align: right;
+}
+.paramtype
+{
+	white-space: nowrap;
+}
+.paramname
+{
+	white-space: nowrap;
+}
+.paramname EM
+{
+	font-style: normal;
+}
+/*@end
+@group Directory (tree)
+for the tree view*/
+.ftvtree
+{
+	font-family: sans-serif;
+	margin: 0.5em;
+}
+/*these are for tree view when used as main index*/
+.directory
+{
+	font-size: 9pt;
+	font-weight: bold;
+}
+.directory H3
+{
+	margin: 0px;
+	margin-top: 1em;
+	font-size: 11pt;
+}
+/*
+The following two styles can be used to replace the root node title
+with an image of your choice.  Simply uncomment the next two styles,
+specify the name of your image and be sure to set 'height' to the
+proper pixel height of your image.
+
+
+.directory h3.swap {
+height: 61px;
+background-repeat: no-repeat;
+background-image: url("yourimage.gif");
+}
+.directory h3.swap span {
+display: none;
+}
+*/
+.directory>H3
+{
+	margin-top: 0;
+}
+.directory P
+{
+	margin: 0px;
+	white-space: nowrap;
+}
+.directory DIV
+{
+	display: none;
+	margin: 0px;
+}
+.directory IMG
+{
+	vertical-align: -30%;
+}
+/*these are for tree view when not used as main index*/
+.directory-alt
+{
+	font-size: 100%;
+	font-weight: bold;
+}
+.directory-alt H3
+{
+	margin: 0px;
+	margin-top: 1em;
+	font-size: 11pt;
+}
+.directory-alt>H3
+{
+	margin-top: 0;
+}
+.directory-alt P
+{
+	margin: 0px;
+	white-space: nowrap;
+}
+.directory-alt DIV
+{
+	display: none;
+	margin: 0px;
+}
+.directory-alt IMG
+{
+	vertical-align: -30%;
+}
+/*@end*/
+ADDRESS
+{
+	font-style: normal;
+	color: #333;
+}