Просмотр исходного кода

Code cleanup and documentation.

Ivan Safrin 14 лет назад
Родитель
Сommit
c9406f5051
100 измененных файлов с 4106 добавлено и 1732 удалено
  1. 2 24
      Core/Build/Mac OS X/PolyCore.xcodeproj/project.pbxproj
  2. 493 455
      Core/Build/Mac OS X/PolyCore.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  3. 19 9
      Core/Contents/Include/PolyConfig.h
  4. 19 8
      Core/Contents/Include/PolyCore.h
  5. 20 8
      Core/Contents/Include/PolyCoreInput.h
  6. 19 8
      Core/Contents/Include/PolyCoreServices.h
  7. 19 8
      Core/Contents/Include/PolyCubemap.h
  8. 43 9
      Core/Contents/Include/PolyEvent.h
  9. 20 8
      Core/Contents/Include/PolyEventDispatcher.h
  10. 19 12
      Core/Contents/Include/PolyEventHandler.h
  11. 20 8
      Core/Contents/Include/PolyFixedShader.h
  12. 20 8
      Core/Contents/Include/PolyFont.h
  13. 21 9
      Core/Contents/Include/PolyFontManager.h
  14. 19 7
      Core/Contents/Include/PolyGLCubemap.h
  15. 20 8
      Core/Contents/Include/PolyGLES1Renderer.h
  16. 20 8
      Core/Contents/Include/PolyGLES1Texture.h
  17. 21 8
      Core/Contents/Include/PolyGLRenderer.h
  18. 21 9
      Core/Contents/Include/PolyGLTexture.h
  19. 21 7
      Core/Contents/Include/PolyGLVertexBuffer.h
  20. 22 1
      Core/Contents/Include/PolyGlobals.h
  21. 159 13
      Core/Contents/Include/PolyImage.h
  22. 22 8
      Core/Contents/Include/PolyInputEvent.h
  23. 254 242
      Core/Contents/Include/PolyInputKeys.h
  24. 20 9
      Core/Contents/Include/PolyLabel.h
  25. 21 1
      Core/Contents/Include/PolyLogger.h
  26. 0 29
      Core/Contents/Include/PolyLuaEventStuff.h
  27. 20 8
      Core/Contents/Include/PolyMaterial.h
  28. 26 9
      Core/Contents/Include/PolyMaterialManager.h
  29. 127 67
      Core/Contents/Include/PolyMatrix4.h
  30. 171 29
      Core/Contents/Include/PolyMesh.h
  31. 20 8
      Core/Contents/Include/PolyParticle.h
  32. 19 8
      Core/Contents/Include/PolyParticleEmitter.h
  33. 41 16
      Core/Contents/Include/PolyPerlin.h
  34. 84 24
      Core/Contents/Include/PolyPolygon.h
  35. 59 27
      Core/Contents/Include/PolyQuaternion.h
  36. 20 8
      Core/Contents/Include/PolyQuaternionCurve.h
  37. 50 9
      Core/Contents/Include/PolyRectangle.h
  38. 22 8
      Core/Contents/Include/PolyRenderer.h
  39. 34 8
      Core/Contents/Include/PolyResource.h
  40. 42 8
      Core/Contents/Include/PolyResourceManager.h
  41. 0 54
      Core/Contents/Include/PolySDLCore.h
  42. 96 18
      Core/Contents/Include/PolyScene.h
  43. 30 8
      Core/Contents/Include/PolySceneEntity.h
  44. 35 8
      Core/Contents/Include/PolySceneLabel.h
  45. 71 8
      Core/Contents/Include/PolySceneLight.h
  46. 28 8
      Core/Contents/Include/PolySceneLine.h
  47. 20 9
      Core/Contents/Include/PolySceneManager.h
  48. 90 9
      Core/Contents/Include/PolySceneMesh.h
  49. 36 9
      Core/Contents/Include/PolyScenePrimitive.h
  50. 40 8
      Core/Contents/Include/PolySceneRenderTexture.h
  51. 78 11
      Core/Contents/Include/PolyScreen.h
  52. 19 8
      Core/Contents/Include/PolyScreenCurve.h
  53. 75 10
      Core/Contents/Include/PolyScreenEntity.h
  54. 20 8
      Core/Contents/Include/PolyScreenEvent.h
  55. 46 8
      Core/Contents/Include/PolyScreenImage.h
  56. 46 8
      Core/Contents/Include/PolyScreenLabel.h
  57. 38 9
      Core/Contents/Include/PolyScreenLine.h
  58. 27 13
      Core/Contents/Include/PolyScreenManager.h
  59. 53 8
      Core/Contents/Include/PolyScreenMesh.h
  60. 82 13
      Core/Contents/Include/PolyScreenShape.h
  61. 43 7
      Core/Contents/Include/PolyScreenSprite.h
  62. 20 8
      Core/Contents/Include/PolyShader.h
  63. 106 11
      Core/Contents/Include/PolySkeleton.h
  64. 0 1
      Core/Contents/Include/PolySound.h
  65. 19 7
      Core/Contents/Include/PolySoundManager.h
  66. 19 8
      Core/Contents/Include/PolyTexture.h
  67. 34 8
      Core/Contents/Include/PolyThreaded.h
  68. 46 8
      Core/Contents/Include/PolyTimer.h
  69. 20 8
      Core/Contents/Include/PolyTimerManager.h
  70. 19 8
      Core/Contents/Include/PolyTween.h
  71. 20 8
      Core/Contents/Include/PolyTweenManager.h
  72. 0 27
      Core/Contents/Include/PolyUtil.h
  73. 35 22
      Core/Contents/Include/PolyVector2.h
  74. 96 14
      Core/Contents/Include/PolyVector3.h
  75. 129 21
      Core/Contents/Include/PolyVertex.h
  76. 0 1
      Core/Contents/Include/Polycode.h
  77. 19 8
      Core/Contents/Include/PolyiPhoneCore.h
  78. 20 7
      Core/Contents/Source/OSBasics.cpp
  79. 20 7
      Core/Contents/Source/PolyAGLCore.cpp
  80. 20 8
      Core/Contents/Source/PolyBezierCurve.cpp
  81. 21 8
      Core/Contents/Source/PolyBone.cpp
  82. 20 7
      Core/Contents/Source/PolyCamera.cpp
  83. 20 8
      Core/Contents/Source/PolyCocoaCore.cpp
  84. 20 7
      Core/Contents/Source/PolyColor.cpp
  85. 20 8
      Core/Contents/Source/PolyConfig.cpp
  86. 20 7
      Core/Contents/Source/PolyCore.cpp
  87. 20 7
      Core/Contents/Source/PolyCoreInput.cpp
  88. 20 7
      Core/Contents/Source/PolyCoreServices.cpp
  89. 20 7
      Core/Contents/Source/PolyCubemap.cpp
  90. 21 0
      Core/Contents/Source/PolyData.cpp
  91. 20 8
      Core/Contents/Source/PolyEntity.cpp
  92. 20 7
      Core/Contents/Source/PolyEvent.cpp
  93. 20 7
      Core/Contents/Source/PolyEventDispatcher.cpp
  94. 20 7
      Core/Contents/Source/PolyEventHandler.cpp
  95. 20 8
      Core/Contents/Source/PolyFixedShader.cpp
  96. 20 7
      Core/Contents/Source/PolyFont.cpp
  97. 20 7
      Core/Contents/Source/PolyFontManager.cpp
  98. 20 7
      Core/Contents/Source/PolyGLCubemap.cpp
  99. 20 8
      Core/Contents/Source/PolyGLES1Renderer.cpp
  100. 20 7
      Core/Contents/Source/PolyGLES1Texture.cpp

+ 2 - 24
Core/Build/Mac OS X/PolyCore.xcodeproj/project.pbxproj

@@ -50,7 +50,6 @@
 		6DFBF3DE12A3184E00C43A7D /* PolyiPhoneCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF32E12A3184E00C43A7D /* PolyiPhoneCore.h */; };
 		6DFBF3DF12A3184E00C43A7D /* PolyLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF32F12A3184E00C43A7D /* PolyLabel.h */; };
 		6DFBF3E012A3184E00C43A7D /* PolyLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF33012A3184E00C43A7D /* PolyLogger.h */; };
-		6DFBF3E112A3184E00C43A7D /* PolyLuaEventStuff.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF33112A3184E00C43A7D /* PolyLuaEventStuff.h */; };
 		6DFBF3E212A3184E00C43A7D /* PolyMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF33212A3184E00C43A7D /* PolyMaterial.h */; };
 		6DFBF3E312A3184E00C43A7D /* PolyMaterialManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF33312A3184E00C43A7D /* PolyMaterialManager.h */; };
 		6DFBF3E412A3184E00C43A7D /* PolyMatrix4.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF33412A3184E00C43A7D /* PolyMatrix4.h */; };
@@ -85,7 +84,6 @@
 		6DFBF40112A3184E00C43A7D /* PolyScreenMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35112A3184E00C43A7D /* PolyScreenMesh.h */; };
 		6DFBF40212A3184E00C43A7D /* PolyScreenShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35212A3184E00C43A7D /* PolyScreenShape.h */; };
 		6DFBF40312A3184E00C43A7D /* PolyScreenSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35312A3184E00C43A7D /* PolyScreenSprite.h */; };
-		6DFBF40412A3184E00C43A7D /* PolySDLCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35412A3184E00C43A7D /* PolySDLCore.h */; };
 		6DFBF40512A3184E00C43A7D /* PolyShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35512A3184E00C43A7D /* PolyShader.h */; };
 		6DFBF40612A3184E00C43A7D /* PolySkeleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35612A3184E00C43A7D /* PolySkeleton.h */; };
 		6DFBF40712A3184E00C43A7D /* PolySound.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35712A3184E00C43A7D /* PolySound.h */; };
@@ -96,7 +94,6 @@
 		6DFBF40D12A3184E00C43A7D /* PolyTimerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35D12A3184E00C43A7D /* PolyTimerManager.h */; };
 		6DFBF40E12A3184E00C43A7D /* PolyTween.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35E12A3184E00C43A7D /* PolyTween.h */; };
 		6DFBF40F12A3184E00C43A7D /* PolyTweenManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF35F12A3184E00C43A7D /* PolyTweenManager.h */; };
-		6DFBF41012A3184E00C43A7D /* PolyUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF36012A3184E00C43A7D /* PolyUtil.h */; };
 		6DFBF41112A3184E00C43A7D /* PolyVector2.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF36112A3184E00C43A7D /* PolyVector2.h */; };
 		6DFBF41212A3184E00C43A7D /* PolyVector3.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF36212A3184E00C43A7D /* PolyVector3.h */; };
 		6DFBF41312A3184E00C43A7D /* PolyVertex.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF36312A3184E00C43A7D /* PolyVertex.h */; };
@@ -129,7 +126,6 @@
 		6DFBF43212A3184E00C43A7D /* PolyiPhoneCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF38312A3184E00C43A7D /* PolyiPhoneCore.cpp */; };
 		6DFBF43312A3184E00C43A7D /* PolyLabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF38412A3184E00C43A7D /* PolyLabel.cpp */; };
 		6DFBF43412A3184E00C43A7D /* PolyLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF38512A3184E00C43A7D /* PolyLogger.cpp */; };
-		6DFBF43512A3184E00C43A7D /* PolyLuaEventStuff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF38612A3184E00C43A7D /* PolyLuaEventStuff.cpp */; };
 		6DFBF43612A3184E00C43A7D /* PolyMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF38712A3184E00C43A7D /* PolyMaterial.cpp */; };
 		6DFBF43712A3184E00C43A7D /* PolyMaterialManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF38812A3184E00C43A7D /* PolyMaterialManager.cpp */; };
 		6DFBF43812A3184E00C43A7D /* PolyMatrix4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF38912A3184E00C43A7D /* PolyMatrix4.cpp */; };
@@ -173,7 +169,6 @@
 		6DFBF45F12A3184E00C43A7D /* PolyTimerManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF3B012A3184E00C43A7D /* PolyTimerManager.cpp */; };
 		6DFBF46012A3184E00C43A7D /* PolyTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF3B112A3184E00C43A7D /* PolyTween.cpp */; };
 		6DFBF46112A3184E00C43A7D /* PolyTweenManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF3B212A3184E00C43A7D /* PolyTweenManager.cpp */; };
-		6DFBF46212A3184E00C43A7D /* PolyUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF3B312A3184E00C43A7D /* PolyUtil.cpp */; };
 		6DFBF46312A3184E00C43A7D /* PolyVector2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF3B412A3184E00C43A7D /* PolyVector2.cpp */; };
 		6DFBF46412A3184E00C43A7D /* PolyVector3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF3B512A3184E00C43A7D /* PolyVector3.cpp */; };
 		6DFBF46512A3184E00C43A7D /* PolyVertex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF3B612A3184E00C43A7D /* PolyVertex.cpp */; };
@@ -191,7 +186,7 @@
 		6D865AC112B07363008A486E /* PolyData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyData.h; sourceTree = "<group>"; };
 		6D865AC312B0736C008A486E /* PolyData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyData.cpp; sourceTree = "<group>"; };
 		6DD40E2A136C68B700D602D3 /* PolycodeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolycodeView.h; sourceTree = "<group>"; };
-		6DD40E2C136C68C400D602D3 /* PolycodeView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PolycodeView.mm; sourceTree = "<group>"; };
+		6DD40E2C136C68C400D602D3 /* PolycodeView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = PolycodeView.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		6DFB016E12A73BC200C43A7D /* PolyModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyModule.h; sourceTree = "<group>"; };
 		6DFB017012A73BCF00C43A7D /* PolyModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyModule.cpp; sourceTree = "<group>"; };
 		6DFBF30D12A3184E00C43A7D /* OSBasics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSBasics.h; sourceTree = "<group>"; };
@@ -225,11 +220,10 @@
 		6DFBF32A12A3184E00C43A7D /* PolyGLVertexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyGLVertexBuffer.h; sourceTree = "<group>"; };
 		6DFBF32B12A3184E00C43A7D /* PolyImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyImage.h; sourceTree = "<group>"; };
 		6DFBF32C12A3184E00C43A7D /* PolyInputEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyInputEvent.h; sourceTree = "<group>"; };
-		6DFBF32D12A3184E00C43A7D /* PolyInputKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyInputKeys.h; sourceTree = "<group>"; };
+		6DFBF32D12A3184E00C43A7D /* PolyInputKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PolyInputKeys.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		6DFBF32E12A3184E00C43A7D /* PolyiPhoneCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyiPhoneCore.h; sourceTree = "<group>"; };
 		6DFBF32F12A3184E00C43A7D /* PolyLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyLabel.h; sourceTree = "<group>"; };
 		6DFBF33012A3184E00C43A7D /* PolyLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyLogger.h; sourceTree = "<group>"; };
-		6DFBF33112A3184E00C43A7D /* PolyLuaEventStuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyLuaEventStuff.h; sourceTree = "<group>"; };
 		6DFBF33212A3184E00C43A7D /* PolyMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyMaterial.h; sourceTree = "<group>"; };
 		6DFBF33312A3184E00C43A7D /* PolyMaterialManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyMaterialManager.h; sourceTree = "<group>"; };
 		6DFBF33412A3184E00C43A7D /* PolyMatrix4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyMatrix4.h; sourceTree = "<group>"; };
@@ -264,7 +258,6 @@
 		6DFBF35112A3184E00C43A7D /* PolyScreenMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyScreenMesh.h; sourceTree = "<group>"; };
 		6DFBF35212A3184E00C43A7D /* PolyScreenShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyScreenShape.h; sourceTree = "<group>"; };
 		6DFBF35312A3184E00C43A7D /* PolyScreenSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyScreenSprite.h; sourceTree = "<group>"; };
-		6DFBF35412A3184E00C43A7D /* PolySDLCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolySDLCore.h; sourceTree = "<group>"; };
 		6DFBF35512A3184E00C43A7D /* PolyShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyShader.h; sourceTree = "<group>"; };
 		6DFBF35612A3184E00C43A7D /* PolySkeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolySkeleton.h; sourceTree = "<group>"; };
 		6DFBF35712A3184E00C43A7D /* PolySound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolySound.h; sourceTree = "<group>"; };
@@ -275,7 +268,6 @@
 		6DFBF35D12A3184E00C43A7D /* PolyTimerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyTimerManager.h; sourceTree = "<group>"; };
 		6DFBF35E12A3184E00C43A7D /* PolyTween.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyTween.h; sourceTree = "<group>"; };
 		6DFBF35F12A3184E00C43A7D /* PolyTweenManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyTweenManager.h; sourceTree = "<group>"; };
-		6DFBF36012A3184E00C43A7D /* PolyUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyUtil.h; sourceTree = "<group>"; };
 		6DFBF36112A3184E00C43A7D /* PolyVector2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyVector2.h; sourceTree = "<group>"; };
 		6DFBF36212A3184E00C43A7D /* PolyVector3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyVector3.h; sourceTree = "<group>"; };
 		6DFBF36312A3184E00C43A7D /* PolyVertex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyVertex.h; sourceTree = "<group>"; };
@@ -311,7 +303,6 @@
 		6DFBF38312A3184E00C43A7D /* PolyiPhoneCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyiPhoneCore.cpp; sourceTree = "<group>"; };
 		6DFBF38412A3184E00C43A7D /* PolyLabel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyLabel.cpp; sourceTree = "<group>"; };
 		6DFBF38512A3184E00C43A7D /* PolyLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyLogger.cpp; sourceTree = "<group>"; };
-		6DFBF38612A3184E00C43A7D /* PolyLuaEventStuff.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyLuaEventStuff.cpp; sourceTree = "<group>"; };
 		6DFBF38712A3184E00C43A7D /* PolyMaterial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyMaterial.cpp; sourceTree = "<group>"; };
 		6DFBF38812A3184E00C43A7D /* PolyMaterialManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyMaterialManager.cpp; sourceTree = "<group>"; };
 		6DFBF38912A3184E00C43A7D /* PolyMatrix4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyMatrix4.cpp; sourceTree = "<group>"; };
@@ -346,7 +337,6 @@
 		6DFBF3A612A3184E00C43A7D /* PolyScreenMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyScreenMesh.cpp; sourceTree = "<group>"; };
 		6DFBF3A712A3184E00C43A7D /* PolyScreenShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyScreenShape.cpp; sourceTree = "<group>"; };
 		6DFBF3A812A3184E00C43A7D /* PolyScreenSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyScreenSprite.cpp; sourceTree = "<group>"; };
-		6DFBF3A912A3184E00C43A7D /* PolySDLCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolySDLCore.cpp; sourceTree = "<group>"; };
 		6DFBF3AA12A3184E00C43A7D /* PolyShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyShader.cpp; sourceTree = "<group>"; };
 		6DFBF3AB12A3184E00C43A7D /* PolySkeleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolySkeleton.cpp; sourceTree = "<group>"; };
 		6DFBF3AC12A3184E00C43A7D /* PolySound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolySound.cpp; sourceTree = "<group>"; };
@@ -356,7 +346,6 @@
 		6DFBF3B012A3184E00C43A7D /* PolyTimerManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyTimerManager.cpp; sourceTree = "<group>"; };
 		6DFBF3B112A3184E00C43A7D /* PolyTween.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyTween.cpp; sourceTree = "<group>"; };
 		6DFBF3B212A3184E00C43A7D /* PolyTweenManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyTweenManager.cpp; sourceTree = "<group>"; };
-		6DFBF3B312A3184E00C43A7D /* PolyUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyUtil.cpp; sourceTree = "<group>"; };
 		6DFBF3B412A3184E00C43A7D /* PolyVector2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyVector2.cpp; sourceTree = "<group>"; };
 		6DFBF3B512A3184E00C43A7D /* PolyVector3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyVector3.cpp; sourceTree = "<group>"; };
 		6DFBF3B612A3184E00C43A7D /* PolyVertex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyVertex.cpp; sourceTree = "<group>"; };
@@ -458,7 +447,6 @@
 				6DFBF32E12A3184E00C43A7D /* PolyiPhoneCore.h */,
 				6DFBF32F12A3184E00C43A7D /* PolyLabel.h */,
 				6DFBF33012A3184E00C43A7D /* PolyLogger.h */,
-				6DFBF33112A3184E00C43A7D /* PolyLuaEventStuff.h */,
 				6DFBF33212A3184E00C43A7D /* PolyMaterial.h */,
 				6DFBF33312A3184E00C43A7D /* PolyMaterialManager.h */,
 				6DFBF33412A3184E00C43A7D /* PolyMatrix4.h */,
@@ -493,7 +481,6 @@
 				6DFBF35112A3184E00C43A7D /* PolyScreenMesh.h */,
 				6DFBF35212A3184E00C43A7D /* PolyScreenShape.h */,
 				6DFBF35312A3184E00C43A7D /* PolyScreenSprite.h */,
-				6DFBF35412A3184E00C43A7D /* PolySDLCore.h */,
 				6DFBF35512A3184E00C43A7D /* PolyShader.h */,
 				6DFBF35612A3184E00C43A7D /* PolySkeleton.h */,
 				6DFBF35712A3184E00C43A7D /* PolySound.h */,
@@ -504,7 +491,6 @@
 				6DFBF35D12A3184E00C43A7D /* PolyTimerManager.h */,
 				6DFBF35E12A3184E00C43A7D /* PolyTween.h */,
 				6DFBF35F12A3184E00C43A7D /* PolyTweenManager.h */,
-				6DFBF36012A3184E00C43A7D /* PolyUtil.h */,
 				6DFBF36112A3184E00C43A7D /* PolyVector2.h */,
 				6DFBF36212A3184E00C43A7D /* PolyVector3.h */,
 				6DFBF36312A3184E00C43A7D /* PolyVertex.h */,
@@ -552,7 +538,6 @@
 				6DFBF38312A3184E00C43A7D /* PolyiPhoneCore.cpp */,
 				6DFBF38412A3184E00C43A7D /* PolyLabel.cpp */,
 				6DFBF38512A3184E00C43A7D /* PolyLogger.cpp */,
-				6DFBF38612A3184E00C43A7D /* PolyLuaEventStuff.cpp */,
 				6DFBF38712A3184E00C43A7D /* PolyMaterial.cpp */,
 				6DFBF38812A3184E00C43A7D /* PolyMaterialManager.cpp */,
 				6DFBF38912A3184E00C43A7D /* PolyMatrix4.cpp */,
@@ -587,7 +572,6 @@
 				6DFBF3A612A3184E00C43A7D /* PolyScreenMesh.cpp */,
 				6DFBF3A712A3184E00C43A7D /* PolyScreenShape.cpp */,
 				6DFBF3A812A3184E00C43A7D /* PolyScreenSprite.cpp */,
-				6DFBF3A912A3184E00C43A7D /* PolySDLCore.cpp */,
 				6DFBF3AA12A3184E00C43A7D /* PolyShader.cpp */,
 				6DFBF3AB12A3184E00C43A7D /* PolySkeleton.cpp */,
 				6DFBF3AC12A3184E00C43A7D /* PolySound.cpp */,
@@ -597,7 +581,6 @@
 				6DFBF3B012A3184E00C43A7D /* PolyTimerManager.cpp */,
 				6DFBF3B112A3184E00C43A7D /* PolyTween.cpp */,
 				6DFBF3B212A3184E00C43A7D /* PolyTweenManager.cpp */,
-				6DFBF3B312A3184E00C43A7D /* PolyUtil.cpp */,
 				6DFBF3B412A3184E00C43A7D /* PolyVector2.cpp */,
 				6DFBF3B512A3184E00C43A7D /* PolyVector3.cpp */,
 				6DFBF3B612A3184E00C43A7D /* PolyVertex.cpp */,
@@ -659,7 +642,6 @@
 				6DFBF3DE12A3184E00C43A7D /* PolyiPhoneCore.h in Headers */,
 				6DFBF3DF12A3184E00C43A7D /* PolyLabel.h in Headers */,
 				6DFBF3E012A3184E00C43A7D /* PolyLogger.h in Headers */,
-				6DFBF3E112A3184E00C43A7D /* PolyLuaEventStuff.h in Headers */,
 				6DFBF3E212A3184E00C43A7D /* PolyMaterial.h in Headers */,
 				6DFBF3E312A3184E00C43A7D /* PolyMaterialManager.h in Headers */,
 				6DFBF3E412A3184E00C43A7D /* PolyMatrix4.h in Headers */,
@@ -694,7 +676,6 @@
 				6DFBF40112A3184E00C43A7D /* PolyScreenMesh.h in Headers */,
 				6DFBF40212A3184E00C43A7D /* PolyScreenShape.h in Headers */,
 				6DFBF40312A3184E00C43A7D /* PolyScreenSprite.h in Headers */,
-				6DFBF40412A3184E00C43A7D /* PolySDLCore.h in Headers */,
 				6DFBF40512A3184E00C43A7D /* PolyShader.h in Headers */,
 				6DFBF40612A3184E00C43A7D /* PolySkeleton.h in Headers */,
 				6DFBF40712A3184E00C43A7D /* PolySound.h in Headers */,
@@ -705,7 +686,6 @@
 				6DFBF40D12A3184E00C43A7D /* PolyTimerManager.h in Headers */,
 				6DFBF40E12A3184E00C43A7D /* PolyTween.h in Headers */,
 				6DFBF40F12A3184E00C43A7D /* PolyTweenManager.h in Headers */,
-				6DFBF41012A3184E00C43A7D /* PolyUtil.h in Headers */,
 				6DFBF41112A3184E00C43A7D /* PolyVector2.h in Headers */,
 				6DFBF41212A3184E00C43A7D /* PolyVector3.h in Headers */,
 				6DFBF41312A3184E00C43A7D /* PolyVertex.h in Headers */,
@@ -795,7 +775,6 @@
 				6DFBF43212A3184E00C43A7D /* PolyiPhoneCore.cpp in Sources */,
 				6DFBF43312A3184E00C43A7D /* PolyLabel.cpp in Sources */,
 				6DFBF43412A3184E00C43A7D /* PolyLogger.cpp in Sources */,
-				6DFBF43512A3184E00C43A7D /* PolyLuaEventStuff.cpp in Sources */,
 				6DFBF43612A3184E00C43A7D /* PolyMaterial.cpp in Sources */,
 				6DFBF43712A3184E00C43A7D /* PolyMaterialManager.cpp in Sources */,
 				6DFBF43812A3184E00C43A7D /* PolyMatrix4.cpp in Sources */,
@@ -839,7 +818,6 @@
 				6DFBF45F12A3184E00C43A7D /* PolyTimerManager.cpp in Sources */,
 				6DFBF46012A3184E00C43A7D /* PolyTween.cpp in Sources */,
 				6DFBF46112A3184E00C43A7D /* PolyTweenManager.cpp in Sources */,
-				6DFBF46212A3184E00C43A7D /* PolyUtil.cpp in Sources */,
 				6DFBF46312A3184E00C43A7D /* PolyVector2.cpp in Sources */,
 				6DFBF46412A3184E00C43A7D /* PolyVector3.cpp in Sources */,
 				6DFBF46512A3184E00C43A7D /* PolyVertex.cpp in Sources */,

Разница между файлами не показана из-за своего большого размера
+ 493 - 455
Core/Build/Mac OS X/PolyCore.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate


+ 19 - 9
Core/Contents/Include/PolyConfig.h

@@ -1,13 +1,24 @@
 /*
- *  PolyConfig.h
- *  Poly
- *
- *  Created by Ivan Safrin on 4/15/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Services
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -15,7 +26,6 @@
 #include <string>
 #include <vector>
 #include "tinyxml.h"
-#include "PolyUtil.h"
 
 using std::string;
 using std::vector;

+ 19 - 8
Core/Contents/Include/PolyCore.h

@@ -1,13 +1,24 @@
 /*
- *  PolyCore.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/12/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Core
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 20 - 8
Core/Contents/Include/PolyCoreInput.h

@@ -1,12 +1,24 @@
 /*
- *  PolyCoreInput.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/27/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Core
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 19 - 8
Core/Contents/Include/PolyCoreServices.h

@@ -1,13 +1,24 @@
 /*
- *  CoreServices.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Services
+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.
+*/
  
 #pragma once
 #include "PolyString.h"

+ 19 - 8
Core/Contents/Include/PolyCubemap.h

@@ -1,13 +1,24 @@
 /*
- *  PolyCubemap.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/9/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Materials
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 43 - 9
Core/Contents/Include/PolyEvent.h

@@ -1,12 +1,24 @@
 /*
- *  PolyEvent.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Events
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -19,15 +31,37 @@ using std::string;
 namespace Polycode {
 
 	class EventDispatcher;
+	
+	/**
+	* Event base class. Subclass this class to pass complex data through events.
+	*/
 	class _PolyExport Event {
 		public:
+			/**
+			* Default constructor.
+			*/ 
 			Event();
+			
+			/**
+			* Initializes the event with an eventCode
+			* @param eventCode Event code to initalize with.
+			*/ 			
 			Event(int eventCode);
 			~Event();
 			
+			/**
+			* Returns the event code for this event.
+			* @return Event code for the event.
+			*/ 						
 			int getEventCode();
-			void setEventCode(int eventCode);
+			
+			/**
+			* Returns the event dispatcher which originated the event.
+			* @return Event dispatcher which originated the event.
+			*/ 									
 			EventDispatcher *getDispatcher();
+			
+			void setEventCode(int eventCode);			
 			void setDispatcher(EventDispatcher *dispatcher);
 			String getEventType();
 			

+ 20 - 8
Core/Contents/Include/PolyEventDispatcher.h

@@ -1,12 +1,24 @@
 /*
- *  PolyEventDispatcher.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Events
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 19 - 12
Core/Contents/Include/PolyEventHandler.h

@@ -1,13 +1,24 @@
 /*
- *  PolyEventHandler.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Events
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -15,10 +26,6 @@
 #include "PolyGlobals.h"
 #include "PolyEvent.h"
 
-//#ifdef _COMPILE_LUA
-#include "PolyLuaEventStuff.h"
-//#endif
-
 namespace Polycode {
 
 	/**

+ 20 - 8
Core/Contents/Include/PolyFixedShader.h

@@ -1,12 +1,24 @@
 /*
- *  PolyFixedShader.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/20/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Materials
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 20 - 8
Core/Contents/Include/PolyFont.h

@@ -1,12 +1,24 @@
 /*
- *  PolyFont.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package BasicTypes
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 21 - 9
Core/Contents/Include/PolyFontManager.h

@@ -1,13 +1,25 @@
 /*
- *  PolyFontManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/3/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
-
-// @package Services
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 
 #pragma once
 #include "PolyString.h"

+ 19 - 7
Core/Contents/Include/PolyGLCubemap.h

@@ -1,12 +1,24 @@
 /*
- *  PolyGLCubemap.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/9/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
+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.
+*/
 
 #pragma once
 

+ 20 - 8
Core/Contents/Include/PolyGLES1Renderer.h

@@ -1,13 +1,25 @@
 /*
- *  PolyGLES1Renderer.h
- *  Poly
- *
- *  Created by Ivan Safrin on 2/1/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
-// @package Renderer
 
 #pragma once
 #include "PolyString.h"

+ 20 - 8
Core/Contents/Include/PolyGLES1Texture.h

@@ -1,13 +1,25 @@
 /*
- *  PolyGLES1Texture.h
- *  Poly
- *
- *  Created by Ivan Safrin on 2/1/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
-// @package Renderer
 
 #pragma once
 #include "PolyString.h"

+ 21 - 8
Core/Contents/Include/PolyGLRenderer.h

@@ -1,12 +1,25 @@
 /*
- *  PolyGLRenderer.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/12/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Renderer
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 
 #pragma once
 #include "PolyString.h"

+ 21 - 9
Core/Contents/Include/PolyGLTexture.h

@@ -1,13 +1,25 @@
 /*
- *  PolyGLTexture.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-
-// @package Renderer
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
  
 #pragma once
 

+ 21 - 7
Core/Contents/Include/PolyGLVertexBuffer.h

@@ -1,11 +1,25 @@
 /*
- *  GLVertexBuffer.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/13/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 
 #pragma once
 

+ 22 - 1
Core/Contents/Include/PolyGlobals.h

@@ -1,4 +1,25 @@
- 
+ /*
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 #pragma once
 
 // Polycode CORE LIBRARY CONFIGURATION SECTION

+ 159 - 13
Core/Contents/Include/PolyImage.h

@@ -1,12 +1,24 @@
 /*
- *  PolyImage.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package BasicTypes
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -21,45 +33,167 @@
 using std::string;
 
 namespace Polycode {
+
+	/**
+	* An image in memory. Basic RGB or RGBA images stored in memory. Can be loaded from PNG files, created into textures and written to file.
+	*/
 	class _PolyExport Image {
 		public:
+		
+			/**
+			* Create image from file name.
+			* @param fileName Path to image file to load.
+			*/ 
 			Image(String fileName);
+			
+			/**
+			* Create a blank image of specified size and type.
+			* @param width Width of the image to create.
+			* @param height Height of the image to create.			
+			* @param type Type of image to create. Can be IMAGE_RGBA or IMAGE_RGB.
+			*/ 			
 			Image(int width, int height, int type = IMAGE_RGBA);
+			
+			/**
+			* Create an image of specified size and type and set its contents from the specified buffer.
+			* @param data Data buffer to set contents from.
+			* @param width Width of the image to create.
+			* @param height Height of the image to create.			
+			* @param type Type of image to create. Can be IMAGE_RGBA or IMAGE_RGB.
+			*/ 						
 			Image(char *data, int width, int height, int type = IMAGE_RGBA);
+			
+			/**
+			* Create an image from another image.
+			* @param copyImage The image to copy.
+			*/ 						
 			Image(Image *copyImage);		
 			Image();			
 			~Image();
 
+			/**
+			* Load an image from a file
+			* @param fileName Path to image file to load.
+			* @return True if successfully loaded, false otherwise.
+			*/ 			
 			bool loadImage(String fileName);
-			bool loadPNG(String fileName);
-		
+			bool loadPNG(String fileName);		
 			
+			/**
+			* Recreate the image as an empty image of specified size. The image type stays the same.
+			* @param width Width of the image to create.
+			* @param height Height of the image to create.			
+			*/ 						
 			void createEmpty(unsigned int width, unsigned int height);
+			
+			/**
+			* Fills the image with the specified color values.
+			* @param r Red value 0-1.
+			* @param g Green value 0-1
+			* @param b Blue value 0-1
+			* @param a Alpha value 0-1									
+			*/ 									
 			void fill(Number r, Number g, Number b, Number a);
 			
-			// drawing
+			/**
+			* Sets a pixel at specified coordinates to specified color.
+			* @param x X position of pixel.
+			* @param y Y position of pixel.			
+			* @param r Red value 0-1.
+			* @param g Green value 0-1
+			* @param b Blue value 0-1
+			* @param a Alpha value 0-1												
+			*/
 			void setPixel(int x, int y, Number r, Number g, Number b, Number a);
+			
+			/**
+			* Sets a pixel at specified coordinates to specified color.
+			* @param x X position of pixel.
+			* @param y Y position of pixel.			
+			* @param col Color to set.
+			*/			
 			void setPixel(int x, int y, Color col);
+			
+			/**
+			* Returns the pixel color at specified position.
+			* @param x X position of pixel.
+			* @param y Y position of pixel.						
+			* @return Pixel color at specified position.
+			*/			
 			Color getPixel(int x, int y);
 						   
-			void setAAPixel(int x, int y, Color col);
 			void swap(int *v1, int *v2);
+			
+			/**
+			* Draws a line with specified color.
+			* @param x0 Starting x position.
+			* @param y0 Starting y position.
+			* @param x1 Ending x position.
+			* @param y1 Ending y position.
+			* @param col Color to use.						
+			*/						
 			void line(int x0, int y0, int x1, int y1, Color col);
+
+			/**
+			* Moves brush to specified position
+			* @param x New brush position X
+			* @param y New brush position Y
+			*/									
 			void moveTo(int x, int y);
+			
+			/**
+			* Translates brush a specified amount relative to its current position.
+			* @param x Amount to translate on X axis
+			* @param y Amount to translate on Y axis
+			*/												
 			void move(int x, int y);
+			
+			/**
+			* Draws a line to specified position.
+			* @param x Ending x position.
+			* @param y Ending y position.
+			* @param col Color to use.						
+			*/												
 			void lineTo(int x, int y, Color col);
+			
+			/**
+			* Draws a rectangle with specified color.
+			* @param x Rectangle x position.
+			* @param y Rectangle y position.
+			* @param w Rectangle width.
+			* @param h Rectangle height.
+			* @param col Color to use.						
+			*/									
 			void drawRect(int x, int y, int w, int h, Color col);
 			
-			// effex
+			/**
+			* Draws perlin noise in the image
+			* @param seed Seed for the noise
+			* @param alpha If true, affects alpha, if false only affects the color.
+			*/									
 			void perlinNoise(int seed, bool alpha);
+			
+			/**
+			* Blurs the image using box blur.
+			* @param blurSize Size of the blur in pixels.
+			*/												
 			void fastBlur(int blurSize);
 			void fastBlurVert(int blurSize);
 			void fastBlurHor(int blurSize);
+			
+			// What are these??? I wrote them way too long ago.
 			void darken(Number amt, bool color, bool alpha);
 			void lighten(Number amt, bool color, bool alpha);
 			void multiply(Number amt, bool color, bool alpha);
 			
+			/**
+			* Returns the x position of the brush.
+			*/
 			int getBrushX();
+			
+			/**
+			* Returns the y position of the brush.
+			*/			
 			int getBrushY();
 		
 			bool isLoaded();
@@ -68,8 +202,20 @@ namespace Polycode {
 			
 			void writeBMP(String fileName);
 			
+			/**
+			* Returns the width of the image.
+			*/			
 			unsigned int getWidth();
+			
+			/**
+			* Returns the height of the image.
+			*/						
 			unsigned int getHeight();
+			
+			/**
+			* Returns the raw image data
+			* @return Pointer to raw image data.
+			*/						
 			char *getPixels();
 		
 			static const int IMAGE_RGB = 0;

+ 22 - 8
Core/Contents/Include/PolyInputEvent.h

@@ -1,13 +1,24 @@
 /*
- *  PolyInputEvent.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Core
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -18,6 +29,9 @@
 
 namespace Polycode {
 
+	/**
+	* Event dispatched by CoreInput. This event is dispatched by CoreInput when input happens.
+	*/
 	class _PolyExport InputEvent : public Event {
 		public:
 			InputEvent(Vector2 mousePosition,int timestamp);

+ 254 - 242
Core/Contents/Include/PolyInputKeys.h

@@ -1,12 +1,24 @@
 /*
- *  PolyInputKeys.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Core
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 
@@ -18,259 +30,259 @@ namespace Polycode {
 	* Keys values.
 	*/
 	typedef enum {
-		TAUK_UNKNOWN		= 0,
-		TAUK_FIRST		= 0,
-		TAUK_BACKSPACE		= 8,
-		TAUK_TAB		= 9,
-		TAUK_CLEAR		= 12,
-		TAUK_RETURN		= 13,
-		TAUK_PAUSE		= 19,
-		TAUK_ESCAPE		= 27,
-		TAUK_SPACE		= 32,
-		TAUK_EXCLAIM		= 33,
-		TAUK_QUOTEDBL		= 34,
-		TAUK_HASH		= 35,
-		TAUK_DOLLAR		= 36,
-		TAUK_AMPERSAND		= 38,
-		TAUK_QUOTE		= 39,
-		TAUK_LEFTPAREN		= 40,
-		TAUK_RIGHTPAREN		= 41,
-		TAUK_ASTERISK		= 42,
-		TAUK_PLUS		= 43,
-		TAUK_COMMA		= 44,
-		TAUK_MINUS		= 45,
-		TAUK_PERIOD		= 46,
-		TAUK_SLASH		= 47,
-		TAUK_0			= 48,
-		TAUK_1			= 49,
-		TAUK_2			= 50,
-		TAUK_3			= 51,
-		TAUK_4			= 52,
-		TAUK_5			= 53,
-		TAUK_6			= 54,
-		TAUK_7			= 55,
-		TAUK_8			= 56,
-		TAUK_9			= 57,
-		TAUK_COLON		= 58,
-		TAUK_SEMICOLON		= 59,
-		TAUK_LESS		= 60,
-		TAUK_EQUALS		= 61,
-		TAUK_GREATER		= 62,
-		TAUK_QUESTION		= 63,
-		TAUK_AT			= 64,
+		KEY_UNKNOWN		= 0,
+		KEY_FIRST		= 0,
+		KEY_BACKSPACE		= 8,
+		KEY_TAB		= 9,
+		KEY_CLEAR		= 12,
+		KEY_RETURN		= 13,
+		KEY_PAUSE		= 19,
+		KEY_ESCAPE		= 27,
+		KEY_SPACE		= 32,
+		KEY_EXCLAIM		= 33,
+		KEY_QUOTEDBL		= 34,
+		KEY_HASH		= 35,
+		KEY_DOLLAR		= 36,
+		KEY_AMPERSAND		= 38,
+		KEY_QUOTE		= 39,
+		KEY_LEFTPAREN		= 40,
+		KEY_RIGHTPAREN		= 41,
+		KEY_ASTERISK		= 42,
+		KEY_PLUS		= 43,
+		KEY_COMMA		= 44,
+		KEY_MINUS		= 45,
+		KEY_PERIOD		= 46,
+		KEY_SLASH		= 47,
+		KEY_0			= 48,
+		KEY_1			= 49,
+		KEY_2			= 50,
+		KEY_3			= 51,
+		KEY_4			= 52,
+		KEY_5			= 53,
+		KEY_6			= 54,
+		KEY_7			= 55,
+		KEY_8			= 56,
+		KEY_9			= 57,
+		KEY_COLON		= 58,
+		KEY_SEMICOLON		= 59,
+		KEY_LESS		= 60,
+		KEY_EQUALS		= 61,
+		KEY_GREATER		= 62,
+		KEY_QUESTION		= 63,
+		KEY_AT			= 64,
 		/* 
 		 Skip uppercase letters
 		 */
-		TAUK_LEFTBRACKET	= 91,
-		TAUK_BACKSLASH		= 92,
-		TAUK_RIGHTBRACKET	= 93,
-		TAUK_CARET		= 94,
-		TAUK_UNDERSCORE		= 95,
-		TAUK_BACKQUOTE		= 96,
-		TAUK_a			= 97,
-		TAUK_b			= 98,
-		TAUK_c			= 99,
-		TAUK_d			= 100,
-		TAUK_e			= 101,
-		TAUK_f			= 102,
-		TAUK_g			= 103,
-		TAUK_h			= 104,
-		TAUK_i			= 105,
-		TAUK_j			= 106,
-		TAUK_k			= 107,
-		TAUK_l			= 108,
-		TAUK_m			= 109,
-		TAUK_n			= 110,
-		TAUK_o			= 111,
-		TAUK_p			= 112,
-		TAUK_q			= 113,
-		TAUK_r			= 114,
-		TAUK_s			= 115,
-		TAUK_t			= 116,
-		TAUK_u			= 117,
-		TAUK_v			= 118,
-		TAUK_w			= 119,
-		TAUK_x			= 120,
-		TAUK_y			= 121,
-		TAUK_z			= 122,
-		TAUK_DELETE		= 127,
+		KEY_LEFTBRACKET	= 91,
+		KEY_BACKSLASH		= 92,
+		KEY_RIGHTBRACKET	= 93,
+		KEY_CARET		= 94,
+		KEY_UNDERSCORE		= 95,
+		KEY_BACKQUOTE		= 96,
+		KEY_a			= 97,
+		KEY_b			= 98,
+		KEY_c			= 99,
+		KEY_d			= 100,
+		KEY_e			= 101,
+		KEY_f			= 102,
+		KEY_g			= 103,
+		KEY_h			= 104,
+		KEY_i			= 105,
+		KEY_j			= 106,
+		KEY_k			= 107,
+		KEY_l			= 108,
+		KEY_m			= 109,
+		KEY_n			= 110,
+		KEY_o			= 111,
+		KEY_p			= 112,
+		KEY_q			= 113,
+		KEY_r			= 114,
+		KEY_s			= 115,
+		KEY_t			= 116,
+		KEY_u			= 117,
+		KEY_v			= 118,
+		KEY_w			= 119,
+		KEY_x			= 120,
+		KEY_y			= 121,
+		KEY_z			= 122,
+		KEY_DELETE		= 127,
 		/* End of ASCII mapped keysyms */
 		
 		/* International keyboard syms */
-		TAUK_WORLD_0		= 160,		/* 0xA0 */
-		TAUK_WORLD_1		= 161,
-		TAUK_WORLD_2		= 162,
-		TAUK_WORLD_3		= 163,
-		TAUK_WORLD_4		= 164,
-		TAUK_WORLD_5		= 165,
-		TAUK_WORLD_6		= 166,
-		TAUK_WORLD_7		= 167,
-		TAUK_WORLD_8		= 168,
-		TAUK_WORLD_9		= 169,
-		TAUK_WORLD_10		= 170,
-		TAUK_WORLD_11		= 171,
-		TAUK_WORLD_12		= 172,
-		TAUK_WORLD_13		= 173,
-		TAUK_WORLD_14		= 174,
-		TAUK_WORLD_15		= 175,
-		TAUK_WORLD_16		= 176,
-		TAUK_WORLD_17		= 177,
-		TAUK_WORLD_18		= 178,
-		TAUK_WORLD_19		= 179,
-		TAUK_WORLD_20		= 180,
-		TAUK_WORLD_21		= 181,
-		TAUK_WORLD_22		= 182,
-		TAUK_WORLD_23		= 183,
-		TAUK_WORLD_24		= 184,
-		TAUK_WORLD_25		= 185,
-		TAUK_WORLD_26		= 186,
-		TAUK_WORLD_27		= 187,
-		TAUK_WORLD_28		= 188,
-		TAUK_WORLD_29		= 189,
-		TAUK_WORLD_30		= 190,
-		TAUK_WORLD_31		= 191,
-		TAUK_WORLD_32		= 192,
-		TAUK_WORLD_33		= 193,
-		TAUK_WORLD_34		= 194,
-		TAUK_WORLD_35		= 195,
-		TAUK_WORLD_36		= 196,
-		TAUK_WORLD_37		= 197,
-		TAUK_WORLD_38		= 198,
-		TAUK_WORLD_39		= 199,
-		TAUK_WORLD_40		= 200,
-		TAUK_WORLD_41		= 201,
-		TAUK_WORLD_42		= 202,
-		TAUK_WORLD_43		= 203,
-		TAUK_WORLD_44		= 204,
-		TAUK_WORLD_45		= 205,
-		TAUK_WORLD_46		= 206,
-		TAUK_WORLD_47		= 207,
-		TAUK_WORLD_48		= 208,
-		TAUK_WORLD_49		= 209,
-		TAUK_WORLD_50		= 210,
-		TAUK_WORLD_51		= 211,
-		TAUK_WORLD_52		= 212,
-		TAUK_WORLD_53		= 213,
-		TAUK_WORLD_54		= 214,
-		TAUK_WORLD_55		= 215,
-		TAUK_WORLD_56		= 216,
-		TAUK_WORLD_57		= 217,
-		TAUK_WORLD_58		= 218,
-		TAUK_WORLD_59		= 219,
-		TAUK_WORLD_60		= 220,
-		TAUK_WORLD_61		= 221,
-		TAUK_WORLD_62		= 222,
-		TAUK_WORLD_63		= 223,
-		TAUK_WORLD_64		= 224,
-		TAUK_WORLD_65		= 225,
-		TAUK_WORLD_66		= 226,
-		TAUK_WORLD_67		= 227,
-		TAUK_WORLD_68		= 228,
-		TAUK_WORLD_69		= 229,
-		TAUK_WORLD_70		= 230,
-		TAUK_WORLD_71		= 231,
-		TAUK_WORLD_72		= 232,
-		TAUK_WORLD_73		= 233,
-		TAUK_WORLD_74		= 234,
-		TAUK_WORLD_75		= 235,
-		TAUK_WORLD_76		= 236,
-		TAUK_WORLD_77		= 237,
-		TAUK_WORLD_78		= 238,
-		TAUK_WORLD_79		= 239,
-		TAUK_WORLD_80		= 240,
-		TAUK_WORLD_81		= 241,
-		TAUK_WORLD_82		= 242,
-		TAUK_WORLD_83		= 243,
-		TAUK_WORLD_84		= 244,
-		TAUK_WORLD_85		= 245,
-		TAUK_WORLD_86		= 246,
-		TAUK_WORLD_87		= 247,
-		TAUK_WORLD_88		= 248,
-		TAUK_WORLD_89		= 249,
-		TAUK_WORLD_90		= 250,
-		TAUK_WORLD_91		= 251,
-		TAUK_WORLD_92		= 252,
-		TAUK_WORLD_93		= 253,
-		TAUK_WORLD_94		= 254,
-		TAUK_WORLD_95		= 255,		/* 0xFF */
+		KEY_WORLD_0		= 160,		/* 0xA0 */
+		KEY_WORLD_1		= 161,
+		KEY_WORLD_2		= 162,
+		KEY_WORLD_3		= 163,
+		KEY_WORLD_4		= 164,
+		KEY_WORLD_5		= 165,
+		KEY_WORLD_6		= 166,
+		KEY_WORLD_7		= 167,
+		KEY_WORLD_8		= 168,
+		KEY_WORLD_9		= 169,
+		KEY_WORLD_10		= 170,
+		KEY_WORLD_11		= 171,
+		KEY_WORLD_12		= 172,
+		KEY_WORLD_13		= 173,
+		KEY_WORLD_14		= 174,
+		KEY_WORLD_15		= 175,
+		KEY_WORLD_16		= 176,
+		KEY_WORLD_17		= 177,
+		KEY_WORLD_18		= 178,
+		KEY_WORLD_19		= 179,
+		KEY_WORLD_20		= 180,
+		KEY_WORLD_21		= 181,
+		KEY_WORLD_22		= 182,
+		KEY_WORLD_23		= 183,
+		KEY_WORLD_24		= 184,
+		KEY_WORLD_25		= 185,
+		KEY_WORLD_26		= 186,
+		KEY_WORLD_27		= 187,
+		KEY_WORLD_28		= 188,
+		KEY_WORLD_29		= 189,
+		KEY_WORLD_30		= 190,
+		KEY_WORLD_31		= 191,
+		KEY_WORLD_32		= 192,
+		KEY_WORLD_33		= 193,
+		KEY_WORLD_34		= 194,
+		KEY_WORLD_35		= 195,
+		KEY_WORLD_36		= 196,
+		KEY_WORLD_37		= 197,
+		KEY_WORLD_38		= 198,
+		KEY_WORLD_39		= 199,
+		KEY_WORLD_40		= 200,
+		KEY_WORLD_41		= 201,
+		KEY_WORLD_42		= 202,
+		KEY_WORLD_43		= 203,
+		KEY_WORLD_44		= 204,
+		KEY_WORLD_45		= 205,
+		KEY_WORLD_46		= 206,
+		KEY_WORLD_47		= 207,
+		KEY_WORLD_48		= 208,
+		KEY_WORLD_49		= 209,
+		KEY_WORLD_50		= 210,
+		KEY_WORLD_51		= 211,
+		KEY_WORLD_52		= 212,
+		KEY_WORLD_53		= 213,
+		KEY_WORLD_54		= 214,
+		KEY_WORLD_55		= 215,
+		KEY_WORLD_56		= 216,
+		KEY_WORLD_57		= 217,
+		KEY_WORLD_58		= 218,
+		KEY_WORLD_59		= 219,
+		KEY_WORLD_60		= 220,
+		KEY_WORLD_61		= 221,
+		KEY_WORLD_62		= 222,
+		KEY_WORLD_63		= 223,
+		KEY_WORLD_64		= 224,
+		KEY_WORLD_65		= 225,
+		KEY_WORLD_66		= 226,
+		KEY_WORLD_67		= 227,
+		KEY_WORLD_68		= 228,
+		KEY_WORLD_69		= 229,
+		KEY_WORLD_70		= 230,
+		KEY_WORLD_71		= 231,
+		KEY_WORLD_72		= 232,
+		KEY_WORLD_73		= 233,
+		KEY_WORLD_74		= 234,
+		KEY_WORLD_75		= 235,
+		KEY_WORLD_76		= 236,
+		KEY_WORLD_77		= 237,
+		KEY_WORLD_78		= 238,
+		KEY_WORLD_79		= 239,
+		KEY_WORLD_80		= 240,
+		KEY_WORLD_81		= 241,
+		KEY_WORLD_82		= 242,
+		KEY_WORLD_83		= 243,
+		KEY_WORLD_84		= 244,
+		KEY_WORLD_85		= 245,
+		KEY_WORLD_86		= 246,
+		KEY_WORLD_87		= 247,
+		KEY_WORLD_88		= 248,
+		KEY_WORLD_89		= 249,
+		KEY_WORLD_90		= 250,
+		KEY_WORLD_91		= 251,
+		KEY_WORLD_92		= 252,
+		KEY_WORLD_93		= 253,
+		KEY_WORLD_94		= 254,
+		KEY_WORLD_95		= 255,		/* 0xFF */
 		
 		/* Numeric keypad */
-		TAUK_KP0		= 256,
-		TAUK_KP1		= 257,
-		TAUK_KP2		= 258,
-		TAUK_KP3		= 259,
-		TAUK_KP4		= 260,
-		TAUK_KP5		= 261,
-		TAUK_KP6		= 262,
-		TAUK_KP7		= 263,
-		TAUK_KP8		= 264,
-		TAUK_KP9		= 265,
-		TAUK_KP_PERIOD		= 266,
-		TAUK_KP_DIVIDE		= 267,
-		TAUK_KP_MULTIPLY	= 268,
-		TAUK_KP_MINUS		= 269,
-		TAUK_KP_PLUS		= 270,
-		TAUK_KP_ENTER		= 271,
-		TAUK_KP_EQUALS		= 272,
+		KEY_KP0		= 256,
+		KEY_KP1		= 257,
+		KEY_KP2		= 258,
+		KEY_KP3		= 259,
+		KEY_KP4		= 260,
+		KEY_KP5		= 261,
+		KEY_KP6		= 262,
+		KEY_KP7		= 263,
+		KEY_KP8		= 264,
+		KEY_KP9		= 265,
+		KEY_KP_PERIOD		= 266,
+		KEY_KP_DIVIDE		= 267,
+		KEY_KP_MULTIPLY	= 268,
+		KEY_KP_MINUS		= 269,
+		KEY_KP_PLUS		= 270,
+		KEY_KP_ENTER		= 271,
+		KEY_KP_EQUALS		= 272,
 		
 		/* Arrows + Home/End pad */
-		TAUK_UP			= 273,
-		TAUK_DOWN		= 274,
-		TAUK_RIGHT		= 275,
-		TAUK_LEFT		= 276,
-		TAUK_INSERT		= 277,
-		TAUK_HOME		= 278,
-		TAUK_END		= 279,
-		TAUK_PAGEUP		= 280,
-		TAUK_PAGEDOWN		= 281,
+		KEY_UP			= 273,
+		KEY_DOWN		= 274,
+		KEY_RIGHT		= 275,
+		KEY_LEFT		= 276,
+		KEY_INSERT		= 277,
+		KEY_HOME		= 278,
+		KEY_END		= 279,
+		KEY_PAGEUP		= 280,
+		KEY_PAGEDOWN		= 281,
 		
 		/* Function keys */
-		TAUK_F1			= 282,
-		TAUK_F2			= 283,
-		TAUK_F3			= 284,
-		TAUK_F4			= 285,
-		TAUK_F5			= 286,
-		TAUK_F6			= 287,
-		TAUK_F7			= 288,
-		TAUK_F8			= 289,
-		TAUK_F9			= 290,
-		TAUK_F10		= 291,
-		TAUK_F11		= 292,
-		TAUK_F12		= 293,
-		TAUK_F13		= 294,
-		TAUK_F14		= 295,
-		TAUK_F15		= 296,
+		KEY_F1			= 282,
+		KEY_F2			= 283,
+		KEY_F3			= 284,
+		KEY_F4			= 285,
+		KEY_F5			= 286,
+		KEY_F6			= 287,
+		KEY_F7			= 288,
+		KEY_F8			= 289,
+		KEY_F9			= 290,
+		KEY_F10		= 291,
+		KEY_F11		= 292,
+		KEY_F12		= 293,
+		KEY_F13		= 294,
+		KEY_F14		= 295,
+		KEY_F15		= 296,
 		
 		/* Key state modifier keys */
-		TAUK_NUMLOCK		= 300,
-		TAUK_CAPSLOCK		= 301,
-		TAUK_SCROLLOCK		= 302,
-		TAUK_RSHIFT		= 303,
-		TAUK_LSHIFT		= 304,
-		TAUK_RCTRL		= 305,
-		TAUK_LCTRL		= 306,
-		TAUK_RALT		= 307,
-		TAUK_LALT		= 308,
-		TAUK_RMETA		= 309,
-		TAUK_LMETA		= 310,
-		TAUK_LSUPER		= 311,		/* Left "Windows" key */
-		TAUK_RSUPER		= 312,		/* Right "Windows" key */
-		TAUK_MODE		= 313,		/* "Alt Gr" key */
-		TAUK_COMPOSE		= 314,		/* Multi-key compose key */
+		KEY_NUMLOCK		= 300,
+		KEY_CAPSLOCK		= 301,
+		KEY_SCROLLOCK		= 302,
+		KEY_RSHIFT		= 303,
+		KEY_LSHIFT		= 304,
+		KEY_RCTRL		= 305,
+		KEY_LCTRL		= 306,
+		KEY_RALT		= 307,
+		KEY_LALT		= 308,
+		KEY_RMETA		= 309,
+		KEY_LMETA		= 310,
+		KEY_LSUPER		= 311,		/* Left "Windows" key */
+		KEY_RSUPER		= 312,		/* Right "Windows" key */
+		KEY_MODE		= 313,		/* "Alt Gr" key */
+		KEY_COMPOSE		= 314,		/* Multi-key compose key */
 		
 		/* Miscellaneous function keys */
-		TAUK_HELP		= 315,
-		TAUK_PRINT		= 316,
-		TAUK_SYSREQ		= 317,
-		TAUK_BREAK		= 318,
-		TAUK_MENU		= 319,
-		TAUK_POWER		= 320,		/* Power Macintosh power key */
-		TAUK_EURO		= 321,		/* Some european keyboards */
-		TAUK_UNDO		= 322,		/* Atari keyboard has Undo */
+		KEY_HELP		= 315,
+		KEY_PRINT		= 316,
+		KEY_SYSREQ		= 317,
+		KEY_BREAK		= 318,
+		KEY_MENU		= 319,
+		KEY_POWER		= 320,		/* Power Macintosh power key */
+		KEY_EURO		= 321,		/* Some european keyboards */
+		KEY_UNDO		= 322,		/* Atari keyboard has Undo */
 		
 		/* Add any other keys here */
 		
-		TAUK_LAST
+		KEY_LAST
 	} PolyKEY;
 
 };

+ 20 - 9
Core/Contents/Include/PolyLabel.h

@@ -1,19 +1,30 @@
 /*
- *  PolyLabel.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package BasicTypes
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
  
 #pragma once
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyFont.h"
 #include "PolyImage.h"
-#include "PolyUtil.h"
 
 #include <string>
 using namespace std;

+ 21 - 1
Core/Contents/Include/PolyLogger.h

@@ -1,4 +1,24 @@
-// @package Services
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyGlobals.h"

+ 0 - 29
Core/Contents/Include/PolyLuaEventStuff.h

@@ -1,29 +0,0 @@
-/*
- *  PolyLuaEventStuff.h
- *  Poly
- *
- *  Created by Ivan Safrin on 1/27/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
-
-#pragma once
-#ifdef _COMPILE_LUA
-
-// Poly compilation config
-
-extern "C"
-{
-#include "lua.h"
-#include "lualib.h"
-
-}
-
-typedef struct{
-	lua_State* L;
-	int ref;
-} SWIGLUA_REF;
-
-extern void handlePolyLuaEvent(SWIGLUA_REF *onEvent, void *event);
-
-#endif

+ 20 - 8
Core/Contents/Include/PolyMaterial.h

@@ -1,12 +1,24 @@
 /*
- *  PolyMaterial.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/19/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Materials
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 26 - 9
Core/Contents/Include/PolyMaterialManager.h

@@ -1,13 +1,24 @@
 /*
- *  PolyMaterialManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Services
+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.
+*/
  
 #pragma once
 #include "PolyString.h"
@@ -21,7 +32,6 @@
 #include "PolyModule.h"
 #include "PolyImage.h"
 #include "tinyxml.h"
-#include "PolyUtil.h"
 #include <vector>
 
 using namespace std;
@@ -30,6 +40,10 @@ namespace Polycode {
 	
 	class Texture;
 	class SceneRenderTexture;
+	
+	/**
+	* Manages loading and reloading of materials, textures and shaders. This class should be only accessed from the CoreServices singleton.
+	*/
 	class _PolyExport MaterialManager {
 		public:
 			MaterialManager();
@@ -37,6 +51,9 @@ namespace Polycode {
 			
 			void Update(int elapsed);
 
+			/**
+			* Creates a new framebuffer texture.
+			*/ 
 			Texture *createFramebufferTexture(int width, int height, int type);
 			Texture *createTexture(int width, int height, char *imageData, bool clamp=true, int type=Image::IMAGE_RGBA);
 			Texture *createNewTexture(int width, int height, bool clamp=true, int type=Image::IMAGE_RGBA);

+ 127 - 67
Core/Contents/Include/PolyMatrix4.h

@@ -1,12 +1,24 @@
 /*
- *  PolyMatrix4.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/26/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Math
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
  
 #pragma once
 #include "PolyString.h"
@@ -18,12 +30,17 @@ namespace Polycode {
 
 	class Vector3;
 	
+	/**
+	* 4x4 Matrix.
+	*/
 	class _PolyExport Matrix4 {
 	
 		public:
 			Matrix4();
 
-
+		/**
+		* Construct with 16 matrix values.
+		*/ 
         inline Matrix4(
             Number m00, Number m01, Number m02, Number m03,
             Number m10, Number m11, Number m12, Number m13,
@@ -48,17 +65,20 @@ namespace Polycode {
             m[3][3] = m33;
         }
 
-			
+			/**
+			* Construct with pointer to 16 Number values.
+			*/ 			
 			Matrix4(Number *m);
-			~Matrix4();
-			
-			void init();
+			~Matrix4();			
 			
 			union {
 				Number m[4][4];
 				Number ml[16];
 			};
 			
+			/**
+			* Resets the matrix to identity.
+			*/
 			inline void identity() {
 				memset(ml, 0, sizeof(Number)*16);
 				ml[0] = 1;
@@ -67,13 +87,20 @@ namespace Polycode {
 				ml[15] = 1;		
 			}
 		
-			
+			/**
+			* Rotates a vector by the matrix values.
+			* @param v2 Vector to rotate.
+			*/			
 			inline Vector3 rotateVector(const Vector3 &v2) {
 				return Vector3(v2.x*m[0][0] + v2.y*m[1][0] + v2.z*m[2][0],
 								v2.x*m[0][1] + v2.y*m[1][1] + v2.z*m[2][1],
 								v2.x*m[0][2] + v2.y*m[1][2] + v2.z*m[2][2]);
 			}
 			
+			/**
+			* Returns the position from the matrix.
+			* @return Position.
+			*/						
 			inline Vector3 getPosition() {
 				Vector3 pos;
 				pos.x = m[3][0];
@@ -81,11 +108,14 @@ namespace Polycode {
 				pos.z = m[3][2];
 				return pos;
 			}
-			/*
-			void setTransform(Vector3 pos, Vector3 scale, Quaternion rot) {
-			
-			}
-	*/
+
+			// ----------------------------------------------------------------------------------------------------------------
+			/** @name Operators
+			*  Available vector operators.
+			*/
+			//@{
+
+
 			inline Vector3 operator * ( const Vector3 &v2 ) const
 			{
 				return Vector3(v2.x*m[0][0] + v2.y*m[1][0] + v2.z*m[2][0] + m[3][0],
@@ -94,51 +124,7 @@ namespace Polycode {
 			}			
 			
 			inline Number* operator [] ( int row ) { return m[row];}
-
-			inline void setPosition(Number x, Number y, Number z) {
-				m[3][0] = x;
-				m[3][1] = y;
-				m[3][2] = z;
-			}
-		
-			inline void setScale(Vector3 scale) {
-				m[0][0] = scale.x;
-				m[1][1] = scale.y;
-				m[2][2] = scale.z;
-			}
-
-			inline void getEulerAngles(Number *ax, Number *ay, Number *az) {
-				Number angle_x, angle_y, angle_z,tr_x,tr_y,C;
-				
-				angle_y = asin(m[0][2]);
-				
-				C = cosf(angle_y);
-				angle_y *= TODEGREES;
-				
-				if(fabsf(C) > 0.005) {
-					tr_x      =  m[2][2] / C; // 10 
-					tr_y      = -m[1][2]  / C; // 6
-					angle_x  = atan2f( tr_y, tr_x ) * TODEGREES;
-					tr_x      =  m[0][0] / C; // 0
-					tr_y      = -m[0][1] / C; // 1
-					angle_z  = atan2f( tr_y, tr_x ) * TODEGREES;
-				} else {
-					angle_x  = 0;
-					tr_x      =  m[1][1];
-					tr_y      =  m[1][0];
-					angle_z  = atan2f( tr_y, tr_x ) * TODEGREES;
-				}					
-				
-				if (angle_x < 0) angle_x += 360;
-				if (angle_y < 0) angle_y += 360;
-				if (angle_z < 0) angle_z += 360;
-				
-				*ax = -fabs(angle_x);
-				*ay = fabs(angle_y);
-				*az = fabs(angle_z);
-
-			}
-
+			
 			inline Matrix4 operator + ( const Matrix4 &m2 ) const {
 				Matrix4 r;
 				
@@ -165,9 +151,6 @@ namespace Polycode {
 				return r;
 			}
 			
-			Matrix4 inverse();
-			Matrix4 inverseAffine();
-	
 			inline Matrix4 operator * (const Matrix4 &m2) const {
            Matrix4 r;
             r.m[0][0] = m[0][0] * m2.m[0][0] + m[0][1] * m2.m[1][0] + m[0][2] * m2.m[2][0] + m[0][3] * m2.m[3][0];
@@ -193,6 +176,83 @@ namespace Polycode {
             return r;
 
 					}
+			
+
+			//@}
+			// ----------------------------------------------------------------------------------------------------------------
+
+			/**
+			* Sets the position in the matrix.
+			* @param x X coordinate.
+			* @param y Y coordinate.			
+			* @param z Z coordinate.												
+			*/
+			inline void setPosition(Number x, Number y, Number z) {
+				m[3][0] = x;
+				m[3][1] = y;
+				m[3][2] = z;
+			}
+		
+			/**
+			* Sets the scale in the matrix.
+			* @param x X scale.
+			* @param y Y scale.			
+			* @param z Z scale.												
+			*/		
+			inline void setScale(Vector3 scale) {
+				m[0][0] = scale.x;
+				m[1][1] = scale.y;
+				m[2][2] = scale.z;
+			}
+			
+			/**
+			* Returns the matrix rotation as euler angles. (This might be kind of buggy).
+			* @param ax Pointer to roll angle to set.
+			* @param ay Pointer to pitch angle to set.
+			* @param az Pointer to yaw angle to set.
+			*/					
+			inline void getEulerAngles(Number *ax, Number *ay, Number *az) {
+				Number angle_x, angle_y, angle_z,tr_x,tr_y,C;
+				
+				angle_y = asin(m[0][2]);
+				
+				C = cosf(angle_y);
+				angle_y *= TODEGREES;
+				
+				if(fabsf(C) > 0.005) {
+					tr_x      =  m[2][2] / C; // 10 
+					tr_y      = -m[1][2]  / C; // 6
+					angle_x  = atan2f( tr_y, tr_x ) * TODEGREES;
+					tr_x      =  m[0][0] / C; // 0
+					tr_y      = -m[0][1] / C; // 1
+					angle_z  = atan2f( tr_y, tr_x ) * TODEGREES;
+				} else {
+					angle_x  = 0;
+					tr_x      =  m[1][1];
+					tr_y      =  m[1][0];
+					angle_z  = atan2f( tr_y, tr_x ) * TODEGREES;
+				}					
+				
+				if (angle_x < 0) angle_x += 360;
+				if (angle_y < 0) angle_y += 360;
+				if (angle_z < 0) angle_z += 360;
+				
+				*ax = -fabs(angle_x);
+				*ay = fabs(angle_y);
+				*az = fabs(angle_z);
+
+			}
+
+			/**
+			* Returns the inverse of the matrix.
+			*/
+			Matrix4 inverse();
+			
+			/**
+			* Returns the affine inverse of the matrix.
+			*/			
+			Matrix4 inverseAffine();
+	
 		protected:
 		
 	};

+ 171 - 29
Core/Contents/Include/PolyMesh.h

@@ -1,13 +1,24 @@
 /*
- *  PolyMesh.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package BasicTypes
+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.
+*/
  
 #pragma once
 #include "PolyString.h"
@@ -37,8 +48,11 @@ namespace Polycode {
 			
 	};
 	
+	/**
+	* Render data array.
+	*/
 	class _PolyExport RenderDataArray {
-	public:
+	public:		
 		int arrayType;
 		int stride;
 		int size;
@@ -46,9 +60,24 @@ namespace Polycode {
 		void *rendererData;
 		int count;
 		
+		/**
+		* Vertex position array.
+		*/
 		static const int VERTEX_DATA_ARRAY = 0;
+		
+		/**
+		* Vertex color array.
+		*/		
 		static const int COLOR_DATA_ARRAY = 1;		
+		
+		/**
+		* Vertex normal array.
+		*/				
 		static const int NORMAL_DATA_ARRAY = 2;				
+		
+		/**
+		* Vertex texture coordinate array.
+		*/						
 		static const int TEXCOORD_DATA_ARRAY = 3;
 	};
 		
@@ -71,76 +100,189 @@ namespace Polycode {
 		float y;
 	} Vector2_struct;
 	
+	/**
+	* A polygonal mesh. The mesh is assembled from Polygon instances, which in turn contain Vertex instances. This structure is provided for convenience and when the mesh is rendered, it is cached into vertex arrays with no notions of separate polygons. When data in the mesh changes, arrayDirtyMap must be set to true for the appropriate array types (color, position, normal, etc). Available types are defined in RenderDataArray.
+	*/
 	class _PolyExport Mesh {
 		public:
+			/**
+			* Construct from a mesh loaded from a file.
+			* @param fileName Path to mesh file.
+			*/
 			Mesh(String fileName);
+			
+			/**
+			* Construct with an empty mesh of specified type.
+			* @param meshType Type of mesh. Possible values are: Mesh::QUAD_MESH, Mesh::TRI_MESH, Mesh::TRIFAN_MESH, Mesh::TRISTRIP_MESH, Mesh::LINE_MESH, Mesh::POINT_MESH.
+			*/			
 			Mesh(int meshType);
 			~Mesh();
 			
+			/**
+			* Adds a polygon to the mesh.
+			* @param newPolygon Polygon to add.
+			*/
 			void addPolygon(Polygon *newPolygon);
-			
+
+			/**
+			* Loads a mesh from a file.
+			* @param fileName Path to mesh file.
+			*/			
 			void loadMesh(String fileName);
 
+			/**
+			* Saves mesh to a file.
+			* @param fileName Path to file to save to.
+			*/			
+			void saveToFile(String fileName);
+
 			void loadFromFile(OSFILE *inFile);
 			void saveToFile(OSFILE *outFile);
 			
+			/**
+			* Returns the number of polygons in the mesh.
+			* @return Number of polygons in the mesh.
+			*/						
 			unsigned int getPolygonCount();
+			
+			/**
+			* Returns a polygon at specified index.
+			* @param index Index of polygon.
+			* @return Polygon at index.
+			*/									
 			Polygon *getPolygon(unsigned int index);
 					
+			/**
+			* Creates a plane mesh of specified size.
+			* @param w Width of plane.
+			* @param h Depth of plane.			
+			*/ 
 			void createPlane(Number w, Number h);
+			
+			/**
+			* Creates a cube mesh of specified size.
+			* @param w Width of cube.
+			* @param d Depth of cube.			
+			* @param h Height of cube.
+			*/ 			
 			void createBox(Number w, Number d, Number h);
+			
+			/**
+			* Creates a sphere mesh of specified size. (Not fully implemented!).
+			* @param radius Radius of sphere.
+			* @param numRings Number of rings.	
+			* @param numSegments Number of segments.
+			*/ 						
 			void createSphere(Number radius, Number numRings, Number numSegments);
 		
-			void addVertex(Vertex* vertex);
-			Vertex *getVertex(unsigned int index);
-			unsigned int getNumVertices();
-				
+			/**
+			* Recenters the mesh with all vertices being as equidistant from origin as possible.
+			*/
 			Vector3 recenterMesh();
 		
+			/**
+			* Toggles the mesh between using vertex or polygon normals. 
+			* @param val If true, the mesh will use vertex normals, otherwise it will use the polygon normals.
+			*/
 			void useVertexNormals(bool val);
-			int getVertexIndex(Vertex *vertex);
 			
+			/**
+			* Sets the vertex buffer for the mesh.
+			* @param buffer New vertex buffer for mesh.
+			*/			
 			void setVertexBuffer(VertexBuffer *buffer);
-			VertexBuffer *getVertexBuffer();
-		
-			bool usesFaceUV() { return useFaceUV; }
+			
+			/**
+			* Returns the vertex buffer for the mesh.
+			* @return The vertex buffer for this mesh.
+			*/
+			VertexBuffer *getVertexBuffer();		
+			
+			/**
+			* Returns the radius of the mesh (furthest vertex away from origin).
+			* @return Mesh radius.
+			*/			
 			Number getRadius();
 			
+			/**
+			* Recalculates the mesh normals (flat normals only).
+			*/
 			void calculateNormals();	
 			
+			/**
+			* Returns the mesh type.
+			*/ 
 			int getMeshType();
+			
+			/**
+			* Sets a new mesh type.
+			* @param newType New mesh type. Possible values are: Mesh::QUAD_MESH, Mesh::TRI_MESH, Mesh::TRIFAN_MESH, Mesh::TRISTRIP_MESH, Mesh::LINE_MESH, Mesh::POINT_MESH.
+			*/ 
 			void setMeshType(int newType);
 
+			/**
+			* Calculates the mesh bounding box.
+			*/
 			Vector3 calculateBBox();
-		
+
+			/**
+			* Checks if the mesh has a vertex buffer.
+			* @param True if the mesh has a vertex buffer, false if not.
+			*/		
 			bool hasVertexBuffer() { return meshHasVertexBuffer; }
 	
+			/**
+			* Quad based mesh.
+			*/
 			static const int QUAD_MESH = 0;			
+			
+			/**
+			* Triangle based mesh.
+			*/			
 			static const int TRI_MESH = 1;				
+			
+			/**
+			* Triangle fan based mesh.
+			*/						
 			static const int TRIFAN_MESH = 2;
+
+			/**
+			* Triangle strip based mesh.
+			*/									
 			static const int TRISTRIP_MESH = 3;
+			
+			/**
+			* Line based mesh.
+			*/									
 			static const int LINE_MESH = 4;
+			
+			/**
+			* Point based mesh.
+			*/									
 			static const int POINT_MESH = 5;
 		
-			unsigned int numUVs;			
-					
+			/**
+			* Render array dirty map. If any of these are flagged as dirty, the renderer will rebuild them from the mesh data. See RenderDataArray for types of render arrays.
+			* @see RenderDataArray
+			*/
 			bool arrayDirtyMap[16];
+			
+			/**
+			* Render arrays. See RenderDataArray for types of render arrays.
+			* @see RenderDataArray			
+			*/			
 			RenderDataArray *renderDataArrays[16];
 		
+			/**
+			* If set to true, the renderer will use the vertex colors instead of entity color transform to render this mesh.
+			*/
 			bool useVertexColors;
 		
 		private:
-		
-				
+					
 		VertexBuffer *vertexBuffer;
 		bool meshHasVertexBuffer;
-		
-		
 		int meshType;
-		bool useFaceUV;
-
-		
 		vector <Polygon*> polygons;
-		vector <Vertex*> vertices;
 	};
 }

+ 20 - 8
Core/Contents/Include/PolyParticle.h

@@ -1,12 +1,24 @@
 /*
- *  PolyParticle.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Scene
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 19 - 8
Core/Contents/Include/PolyParticleEmitter.h

@@ -1,13 +1,24 @@
 /*
- *  PolyParticleEmitter.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Scene
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 41 - 16
Core/Contents/Include/PolyPerlin.h

@@ -1,13 +1,24 @@
 /*
- *  PolyPerlin.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/9/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Math
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -17,20 +28,34 @@
 
 namespace Polycode {
 
+/**
+* 2D Perlin noise.
+*/ 
 class _PolyExport Perlin
 {
 public:
 
-  Perlin(int octaves,Number freq,Number amp,int seed);
+	/**
+	* Constructs perlin noise.
+	* @param octaves Number of noise octaves.
+	* @param freq Noise frequency.
+	* @param amp Noise amplitude.
+	* @param seed Noise seed.
+	*/
+	Perlin(int octaves,Number freq,Number amp,int seed);
 
+	/**
+	* Returns noise value at the specified coordinate.
+	* @param x Horizontal coordinate.
+	* @param y Vertical coordinate.	
+	*/ 
 
-  Number Get(Number x,Number y)
-  {
-    Number vec[2];
-    vec[0] = x;
-    vec[1] = y;
-    return perlin_noise_2D(vec);
-  };
+	Number Get(Number x,Number y) {
+		Number vec[2];
+		vec[0] = x;
+		vec[1] = y;
+		return perlin_noise_2D(vec);
+	};
 
 private:
   void init_perlin(int n,Number p);

+ 84 - 24
Core/Contents/Include/PolyPolygon.h

@@ -1,13 +1,24 @@
 /*
- *  PolyPolygon.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/14/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package BasicTypes
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -26,47 +37,96 @@ using std::max;
 
 namespace Polycode {
 
+	/**
+	* A polygon structure.
+	*/ 
 	class _PolyExport Polygon {
 	
 		public:
+			/**
+			* Default constructor.
+			*/
 			Polygon();
 			~Polygon();
 			
+			/**
+			* Returns the number of vertices in the polygon.
+			* @return Number of vertices in the polygon.
+			*/ 
 			unsigned int getVertexCount();
+			
+			/**
+			* Returns the vertex at specified index.
+			* @return Vertex at specified index.
+			*/ 			
 			Vertex *getVertex(unsigned int index);
+			
+			/**
+			* Adds a new vertex with the specified position coordinates.
+			* @param x X coordinate of new vertex.
+			* @param y Y coordinate of new vertex.
+			* @param z Z coordinate of new vertex.						
+			* @return Newly added vertex.
+			*/ 
 			Vertex *addVertex(Number x, Number y, Number z);
 			
-			void removeVertex(int index);
-		
-			void addTexCoord(Number u, Number v);
-			void addTexCoord2(Number u, Number v);
-			Vector2 getTexCoord(int index);
-			Vector2 getTexCoord2(int index);
-			void addVertex(Vertex *vertex);
+			/**
+			* Adds a new vertex with the specified position coordinates and texture coordinates.
+			* @param x X coordinate of new vertex.
+			* @param y Y coordinate of new vertex.
+			* @param z Z coordinate of new vertex.
+			* @param u Horizontal texture coordinate.
+			* @param v Vertical texture coordinate.
+			* @return Newly added vertex.
+			*/ 			
 			Vertex *addVertex(Number x, Number y, Number z, Number u, Number v);
+			
+			
+			/**
+			* Adds a new vertex.
+			* @param vertex New vertex.
+			*/ 			
+			void addVertex(Vertex *vertex);
+
+			/**
+			* Removes and deletes the vertex at specified index. 
+			* @param index to remove vertex at.
+			*/
+			void removeVertex(int index);
+			
+			/**
+			* Calculates the average normal for the vertices.
+			*/
 			void calculateNormal();
 			
+			/**
+			* Returns the face normal.
+			* @return Face normal.
+			*/ 
 			Vector3 getFaceNormal();
+			
 			Rectangle getBounds2D();
 			
+			/**
+			* Sets the polygon normal.
+			* @param normal The new normal.
+			*/
 			void setNormal(Vector3 normal);
-											
+								
+			/**
+			* If true, will use vertex normals, if false will use the polygon normal.
+			*/
 			bool useVertexNormals;
 		
+			/**
+			* Flips the texture coordinate vertically.
+			*/
 			void flipUVY();
-			
-			void setUseFaceUV(bool val);
-			bool usesFaceUV();
-
-			bool hasSecUVs;
 						
 		private:
 		
-			bool useFaceUV;
 			unsigned int vertexCount;
 			vector<Vertex*> vertices;
-			vector<Vector2> texCoords;
-			vector<Vector2> texCoords2;
 			Vector3			normal;
 	};
 

+ 59 - 27
Core/Contents/Include/PolyQuaternion.h

@@ -1,12 +1,25 @@
 /*
- *  PolyQuaternion.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/26/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
- 
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 #pragma once
 #include "PolyString.h"
 #include "PolyGlobals.h"
@@ -14,51 +27,68 @@
 #include "PolyMatrix4.h"
 #include <math.h>
 
-// @package Math
-
 namespace Polycode {
 
+	/**
+	* Rotation quaternion.
+	*/
 	class _PolyExport Quaternion {
 		public:
+		
+			/**
+			* Construct from w,x,y,z values.
+			* @param w W value.
+			* @param x X value.
+			* @param y Y value.
+			* @param z Z value.									
+			*/ 
 			Quaternion(Number w, Number x, Number y, Number z) {
 				set(w,x,y,z);
 			}
+			
+			/**
+			* Default constructor.
+			*/ 			
 			Quaternion();
 			~Quaternion();
+			
+			// ----------------------------------------------------------------------------------------------------------------
+			/** @name Public members
+			*  Available public members
+			*/
+			//@{
+			
 		
-		inline void setFromMatrix(const Matrix4 &kRot) {
-			Number fTrace = kRot.m[0][0]+kRot.m[1][1]+kRot.m[2][2];
+			inline void setFromMatrix(const Matrix4 &_mat) {
+			Number fTrace = _mat.m[0][0]+_mat.m[1][1]+_mat.m[2][2];
 			Number fRoot;
 			
-			if ( fTrace > 0.0 )
-			{
-				// |w| > 1/2, may as well choose w > 1/2
+			if ( fTrace > 0.0 ) {
 				fRoot = sqrtf(fTrace + 1.0);  // 2w
 				w = 0.5*fRoot;
-				fRoot = 0.5/fRoot;  // 1/(4w)
-				x = (kRot.m[2][1]-kRot.m[1][2])*fRoot;
-				y = (kRot.m[0][2]-kRot.m[2][0])*fRoot;
-				z = (kRot.m[1][0]-kRot.m[0][1])*fRoot;
+				fRoot = 0.5/fRoot;
+				x = (_mat.m[2][1]-_mat.m[1][2])*fRoot;
+				y = (_mat.m[0][2]-_mat.m[2][0])*fRoot;
+				z = (_mat.m[1][0]-_mat.m[0][1])*fRoot;
 			}
 			else
 			{
-				// |w| <= 1/2
 				static size_t s_iNext[3] = { 1, 2, 0 };
 				size_t i = 0;
-				if ( kRot.m[1][1] > kRot.m[0][0] )
+				if ( _mat.m[1][1] > _mat.m[0][0] )
 					i = 1;
-				if ( kRot.m[2][2] > kRot.m[i][i] )
+				if ( _mat.m[2][2] > _mat.m[i][i] )
 					i = 2;
 				size_t j = s_iNext[i];
 				size_t k = s_iNext[j];
 				
-				fRoot = sqrtf(kRot.m[i][i]-kRot.m[j][j]-kRot.m[k][k] + 1.0);
+				fRoot = sqrtf(_mat.m[i][i]-_mat.m[j][j]-_mat.m[k][k] + 1.0);
 				Number* apkQuat[3] = { &x, &y, &z };
 				*apkQuat[i] = 0.5*fRoot;
 				fRoot = 0.5/fRoot;
-				w = (kRot.m[k][j]-kRot.m[j][k])*fRoot;
-				*apkQuat[j] = (kRot.m[j][i]+kRot.m[i][j])*fRoot;
-				*apkQuat[k] = (kRot.m[k][i]+kRot.m[i][k])*fRoot;
+				w = (_mat.m[k][j]-_mat.m[j][k])*fRoot;
+				*apkQuat[j] = (_mat.m[j][i]+_mat.m[i][j])*fRoot;
+				*apkQuat[k] = (_mat.m[k][i]+_mat.m[i][k])*fRoot;
 			}			
 		}
 			
@@ -67,7 +97,7 @@ namespace Polycode {
 	Quaternion Log () const;
     Quaternion Exp () const;	
     Number Norm () const;
-    Number normalise(void);	
+    Number normalize(void);	
     Quaternion operator+ (const Quaternion& rkQ) const;
     Quaternion operator* (const Quaternion& rkQ) const;
     Quaternion operator* (Number fScalar) const;
@@ -246,6 +276,8 @@ namespace Polycode {
 			Number z;
 			Number w;
 			
+			//@}			
+			
 		protected:
 	};
 }

+ 20 - 8
Core/Contents/Include/PolyQuaternionCurve.h

@@ -1,12 +1,24 @@
 /*
- *  PolyQuaternionCurve.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/15/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Math
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 50 - 9
Core/Contents/Include/PolyRectangle.h

@@ -1,27 +1,68 @@
 /*
- *  PolyRectangle.h
- *  Poly
- *
- *  Created by Ivan Safrin on 8/7/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Math
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
 #include "PolyGlobals.h"
 
 namespace Polycode {
+
+	/**
+	* Basic rectangle.
+	*/
 	class _PolyExport Rectangle {
 		public:
+			/**
+			* Default constructor.
+			*/
 			Rectangle(){x=0;y=0;w=0;h=0;}
+			
+			/**
+			* Constructor with values.
+			*/			
 			Rectangle(Number px, Number py, Number pw, Number ph){x=px;y=py;w=pw;h=ph;}
-			void setRect(Number x, Number y, Number w, Number h);
 			
+			/**
+			* Set rectangle values.
+			*/						
+			void setRect(Number x, Number y, Number w, Number h);
+
+			/**
+			* X position
+			*/									
 			Number x;
+			/**
+			* Y position
+			*/												
 			Number y;
+		
+			/**
+			* Width
+			*/													
 			Number w;
+			
+			/**
+			* Height
+			*/																
 			Number h;
 	};
 }

+ 22 - 8
Core/Contents/Include/PolyRenderer.h

@@ -1,13 +1,24 @@
 /*
- *  PolyRenderer.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/12/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Renderer
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -38,6 +49,9 @@ namespace Polycode {
 			Matrix4 textureMatrix;
 	};
 
+	/**
+	* Main renderer. The renderer should only be accessed from the CoreServices singleton. Renderer operations should only be called from within Render methods of entities so that they can be properly managed.
+	*/
 	class _PolyExport Renderer {
 	public:
 		Renderer();

+ 34 - 8
Core/Contents/Include/PolyResource.h

@@ -1,13 +1,25 @@
 /*
- *  PolyResource.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/19/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package BasicTypes
+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.
+*/
+ 
 
 #pragma once
 #include "PolyString.h"
@@ -19,11 +31,23 @@ using std::vector;
 using std::string;
 
 namespace Polycode {
+
+	/**
+	* Base class for resources. All resources that are managed by the ResourceManager subclass this.
+	*/
 	class _PolyExport Resource {
 		public:
+					
+			// ----------------------------------------------------------------------------------------------------------------
+			/** @name Public members
+			*  Available public members
+			*/
+			//@{
+		
 			Resource(int type);
 			virtual ~Resource();
 			
+			
 			String getResourceName();
 			int getResourceType();
 			void setResourceName(String newName);
@@ -37,6 +61,8 @@ namespace Polycode {
 			static const int RESOURCE_MESH = 5;
 			static const int RESOURCE_CUBEMAP = 6;				
 			
+			//@}
+			
 		protected:
 			
 			int type;

+ 42 - 8
Core/Contents/Include/PolyResourceManager.h

@@ -1,12 +1,25 @@
 /*
- *  PolyResourceManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 8/30/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Services
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+ 
 
 #pragma once
 #include "PolyString.h"
@@ -27,14 +40,30 @@ using std::string;
 
 namespace Polycode {
 
+	/**
+	* Manages loading and unloading of resources from directories and archives. Should only be accessed via the CoreServices singleton. 
+	*/ 
 	class _PolyExport ResourceManager {
 		public:
 			ResourceManager();
 			~ResourceManager();
 			
+			/** 
+			* Adds a new resource.
+			* @param resource Resource to add.
+			*/ 
 			void addResource(Resource *resource);
 			
+			/**
+			* Loads resources from a directory.
+			* @param dirPath Path to directory to load resources from.
+			* @param recursive If true, will recurse into subdirectories.
+			*/
 			void addDirResource(String dirPath, bool recursive);
+			
+			/**
+			* Adds a zip as a readable source. This doesn't actually load resources from it, just mounts it as a readable source, so you can call addDirResource on the folders inside of it like you would on regular folders. Most other disk IO in the engine (loading images, etc.) will actually check mounted archive files as well.
+			*/
 			void addArchive(String zipPath);
 		
 			bool readFile(String fileName){ return false;}
@@ -45,6 +74,11 @@ namespace Polycode {
 			void parsePrograms(String dirPath, bool recursive);
 			void parseCubemaps(String dirPath, bool recursive);
 		
+			/**
+			* Request a loaded resource. You need to manually cast it to its subclass based on its type.
+			* @param resourceType Type of resource. See Resource for available resource types.
+			* @param resourceName Name of the resource to request.
+			*/
 			Resource *getResource(int resourceType, String resourceName);
 		
 			void addShaderModule(PolycodeShaderModule *module);

+ 0 - 54
Core/Contents/Include/PolySDLCore.h

@@ -1,54 +0,0 @@
-/*
- *  PolySDLCore.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/12/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Core
-/*
-
-#pragma once
-#include "PolyGlobals.h"
-#include "PolyCore.h"
-#include "PolyRectangle.h"
-#include <vector>
-
-using std::vector;
-
-#if PLATFORM == PLATFORM_WINDOWS
-	#include <winsock2.h>
-#endif
-
-#ifdef COMPILE_SDL_CORE
-
-namespace Polycode {
-	class _PolyExport SDLCore : public Core {
-		
-	public:
-		
-		SDLCore(int xRes, int yRes, bool fullScreen, int aaLevel);
-		~SDLCore();
-
-		void enableMouse(bool newval);
-		unsigned int getTicks();
-		
-		bool Update();
-		
-		void setVideoMode(int xRes, int yRes, bool fullScreen, int aaLevel);
-		
-		void createThread(Threaded *target);
-		
-		vector<Rectangle> getVideoModes();
-		
-	private:
-		
-		
-		
-	};
-}
-
-#endif
-
-*/

+ 96 - 18
Core/Contents/Include/PolyScene.h

@@ -1,12 +1,24 @@
 /*
- *  PolyScene.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Scene
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -26,42 +38,92 @@ namespace Polycode {
 	class SceneLight;
 	class SceneMesh;
 	
+	/**
+	* 3D rendering container. The Scene class is the main container for all 3D rendering in Polycode. Scenes are automatically rendered and need only be instantiated to immediately add themselves to the rendering pipeline. A Scene is created with a camera automatically.
+	*/ 
 	class _PolyExport Scene : public EventDispatcher {
 	public:
 		
+		/**
+		* Default constructor.
+		*/
 		Scene();
+		/**
+		* Default constructor with options. 
+		* @param virtualScene If this flag is set to true, the scene is not rendered to the screen. Use this if you want to render the scene only to a texture.
+		*/		
 		Scene(bool virtualScene);
 		virtual ~Scene();
 		
-		
+		/**
+		* Adds a new SceneEntity to the scene
+		* @param entity New entity to add.
+		*/
 		void addEntity(SceneEntity *entity);
+		
+		/**
+		* Removes a SceneEntity from the scene
+		* @param entity New entity to remove.
+		*/		
 		void removeEntity(SceneEntity *entity);
+		
+		/**
+		* Returns the scene's default camera.
+		* @return The scene's default camera.
+		*/				
 		Camera *getDefaultCamera();
 		
-		void enableLighting(bool enable);
+		/**
+		* Enables and disables lighting in the scene.
+		* @param enable If false, disables lighting in the scene, if true, enables it.		
+		*/
+		void enableLighting(bool enable);				
+		
+		/**
+		* Enables and disables fog in the scene.
+		* @param enable If false, disables lighting in the scene, if true, enables it.		
+		*/		
 		void enableFog(bool enable);
+		
+		/**
+		* Sets the fog properties for the scene.
+		* @param fogMode Fog falloff mode. (Renderer::FOG_LINEAR, Renderer::FOG_EXP, Renderer::FOG_EXP2).
+		* @param color Fog color.
+		* @param density Fog density.
+		* @param startDepth Starting depth of the fog.
+		* @param endDepth Ending depth of the fog.							
+		*/				
 		void setFogProperties(int fogMode, Color color, Number density, Number startDepth, Number endDepth);
-
+	
 		virtual void Update();
 		void setVirtual(bool val);
 		bool isVirtual();
 	
-		bool isEnabled();
+		bool isEnabled();		
 		void setEnabled(bool enabled);
 		
 		int getNumEntities() { return entities.size(); }
 		SceneEntity *getEntity(int index) { return entities[index]; }
 		
-		SceneEntity *getEntityAtCursor(Number x, Number y);
+		/**
+		* Returns the entity at the specified screen position. This is currently very slow and not super reliable.
+		* @param x X position.
+		* @param y Y position.
+		* @return Entity at specified screen position.		
+		*/
+		SceneEntity *getEntityAtScreenPosition(Number x, Number y);
 		
 		void Render();
 		void RenderDepthOnly(Camera *targetCamera);
-//		void addGrid(String gridTexture);
 		
 		static String readString(OSFILE *inFile);
 		void loadScene(String fileName);
 		void generateLightmaps(Number lightMapRes, Number lightMapQuality, int numRadPasses);
 		
+		/**
+		* Adds a light to the scene.
+		* @param light Light to add to the scene.
+		*/
 		void addLight(SceneLight *light);
 		SceneLight *getNearestLight(Vector3 pos);
 		
@@ -86,17 +148,34 @@ namespace Polycode {
 		static const unsigned int ENTITY_ENTITY = 3;
 		static const unsigned int ENTITY_COLLMESH = 4;
 		
+		/**
+		* Scene clear color
+		*/ 
 		Color clearColor;
+		
+		/**
+		* If set to true, the renderer will use the scene's clear color when rendering the scene.
+		*/
+		bool useClearColor;
+
+		/**
+		* Ambient color, passed to lighting shaders
+		*/				
 		Color ambientColor;		
+		
+		/**
+		* Fog color, passed to lighting shaders.
+		*/						
 		Color fogColor;				
 		
+		/**
+		* If this is set to false, the scene is not rendered or updated during the render loop.
+		*/
+		bool enabled;		
 		
 	protected:
 		
-		bool useClearColor;
-		bool virtualScene;
 		bool hasLightmaps;
-		//			LightmapPacker *packer;
 		
 		vector <SceneLight*> lights;				
 		vector <SceneMesh*> staticGeometry;
@@ -105,7 +184,6 @@ namespace Polycode {
 		
 		
 		bool isSceneVirtual;
-		bool enabled;
 		
 		Camera *defaultCamera;
 		vector <SceneEntity*> entities;

+ 30 - 8
Core/Contents/Include/PolySceneEntity.h

@@ -1,12 +1,24 @@
 /*
- *  PolySceneEntity.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Scene
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -24,11 +36,21 @@ using std::vector;
 
 namespace Polycode {
 
+	/**
+	* 3D base entity. SceneEntities are the base class for all 3D entities in Polycode. A thin wrapper around Entity, it inherits most of its functionality.
+	@see Entity
+	*/
 	class _PolyExport SceneEntity : public Entity, public EventHandler {
 		public:
 			SceneEntity();
 			virtual ~SceneEntity();
 		
+			/**
+			* Test mouse collision on the scene entity at a specified screen point. Each SceneEntity subclass must implement this if it wants to support this feature.
+			* @param x X position on screen.
+			* @param y Y position on screen.			
+			* @return True if the entity is at the specified screen coordinate.
+			*/
 			virtual bool testMouseCollision(Number x, Number y) { return false;}
 			
 		protected:

+ 35 - 8
Core/Contents/Include/PolySceneLabel.h

@@ -1,13 +1,24 @@
 /*
- *  PolySceneLabel.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/31/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Scene
+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.
+*/
  
 #pragma once
 #include "PolyString.h"
@@ -25,15 +36,31 @@ using std::string;
 
 namespace Polycode {
 	
+	/**
+	* 3D text label. Creates a 3D text label.
+	*/
 	class _PolyExport SceneLabel : public SceneEntity {
 		public:
 			
+			/**
+			* Constructor.
+			* @param fontName Name of a registered font to use. @see FontManager for info on how to register fonts.
+			* @param text Text to display.
+			* @param size Size in pixels.
+			* @param scale Scale to multiply pixel size by for the actual world size of the label.
+			* @param Anti-aliasing mode. Can be Label::ANTIALIAS_FULL or Label::ANTIALIAS_NONE.
+			*/			
 			SceneLabel(String fontName, String text, int size, Number scale, int amode);
 			~SceneLabel();			
 		
 			bool testMouseCollision(Number x, Number y);
 		
+			/**
+			* Sets new text for the labe.
+			* @param newText New text to display.
+			*/ 
 			void setText(String newText);
+			
 			Label *getLabel();
 			void Render();
 			

+ 71 - 8
Core/Contents/Include/PolySceneLight.h

@@ -1,13 +1,25 @@
 /*
- *  PolySceneLight.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/21/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Scene
+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.
+*/
+ 
 
 #pragma once
 #include "PolyString.h"
@@ -22,13 +34,36 @@ namespace Polycode {
 
 	class Scene;
 	class Camera;
+	
+	/**
+	* 3D light source. Lights can be area or spot lights and can be set to different colors. 
+	*/
 	class _PolyExport SceneLight : public SceneEntity {
 		public:
+		
+			/**
+			* Constructs a light with parameters.
+			* @param type Type of light to create. Can be SceneLight::AREA_LIGHT or SceneLight::SPOT_LIGHT
+			* @param intensity Light intensity.
+			* @param distance Light falloff disatance.
+			* @param parentScene Scene to light. The reason this parameter is required is for shadow buffer generation.
+			*/ 
 			SceneLight(int type, Number intensity, Number distance, Scene *parentScene);
 			virtual ~SceneLight();
 		
+			/*
+			* Returns the light's intensity.
+			*/
 			Number getIntensity();
+			
+			/*
+			* Returns the light's falloff distance.
+			*/			
 			Number getDistance();
+			
+			/*
+			* Returns the light's type.
+			*/			
 			int getType();
 			
 			void renderDepthMap(Scene *scene);
@@ -41,14 +76,42 @@ namespace Polycode {
 			static const int SPOT_LIGHT = 1;
 			
 			Texture *getZBufferTexture();
+			
+			/**
+			* Color of the light.
+			*/ 
 			Color lightColor;
 		
+			/**
+			* Sets the light color.
+			* @param r Red value 0-1.
+			* @param g Green value 0-1
+			* @param b Blue value 0-1
+			* @param a Alpha value 0-1									
+			*/	
 			void setLightColor(Number r, Number g, Number b) { lightColor.r = r; lightColor.g = g; lightColor.b = b; }
+			
+			/**
+			* If this is called with 'true', the light will generate a shadow map.
+			* @param val If set to true, enables this light to cast shadows.
+			* @param resolution Resolution of the shadow map. (defaults to 256x256).
+			*/
 			void enableShadows(bool val, Number resolution=256);
+			
+			/**
+			* This sets the shadow map field of view. The larger the field of view, the more of the scene it encompasses, but the more quality it loses.
+			* @param fov New field of view value.
+			*/
 			void setShadowMapFOV(Number fov);
 		
+			/**
+			* Returns true if shadows are enabled.
+			*/
 			bool areShadowsEnabled();
 		
+			/**
+			* Returns the light type.
+			*/
 			int getLightType() { return type; }
 		
 		private:

+ 28 - 8
Core/Contents/Include/PolySceneLine.h

@@ -1,13 +1,24 @@
 /*
- *  PolySceneLine.h
- *  Poly
- *
- *  Created by Ivan Safrin on 10/8/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Scene
+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.
+*/
  
 #pragma once
 #include "PolyString.h"
@@ -17,8 +28,17 @@
 #include "PolyMesh.h"
 
 namespace Polycode {
+
+	/**
+	* 3D line class. Can connect two SceneEntity classes with a line.
+	*/ 
 	class _PolyExport SceneLine : public SceneEntity {
 		public:
+			/**
+			* Constructs the line with two taraget entities.
+			* @param ent1 Starting entity.
+			* @param ent2 Ending entity.
+			*/
 			SceneLine(SceneEntity *ent1, SceneEntity *ent2);
 			~SceneLine();
 			

+ 20 - 9
Core/Contents/Include/PolySceneManager.h

@@ -1,13 +1,24 @@
 /*
- *  PolySceneManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-
-// @package Services
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 90 - 9
Core/Contents/Include/PolySceneMesh.h

@@ -1,13 +1,24 @@
 /*
- *  PolySceneMesh.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Scene
+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.
+*/
  
 #pragma once
 #include "PolyString.h"
@@ -27,10 +38,27 @@ namespace Polycode {
 	class Texture;
 	class Skeleton;
 	
+	/**
+	* 3D polygonal mesh instance. The SceneMesh is the base for all polygonal 3d geometry. It can have simple textures or complex materials applied to it.
+	*/
 	class _PolyExport SceneMesh : public SceneEntity {
 		public:
+		
+			/**
+			* Construct a scene mesh from a mesh file.
+			* @param fileName Path to mesh file to load.
+			*/
 			SceneMesh(String fileName);
+			
+			/**
+			* Construct an empty scene mesh with the specified type.
+			* @param meshType Mesh type to create. Possible values are: Mesh::QUAD_MESH, Mesh::TRI_MESH, Mesh::TRIFAN_MESH, Mesh::TRISTRIP_MESH, Mesh::LINE_MESH, Mesh::POINT_MESH.
+			*/			
 			SceneMesh(int meshType);
+			
+			/**
+			* Construct scene mesh from an existing Mesh instance.
+			*/
 			SceneMesh(Mesh *mesh);
 			virtual ~SceneMesh();
 			
@@ -38,23 +66,76 @@ namespace Polycode {
 			
 			ShaderBinding *getLocalShaderOptions();
 			
+			/**
+			* Returns the Mesh instance of the actual mesh.
+			*/
 			Mesh *getMesh();
+		
+			/**
+			* Returns the texture applied.
+			*/				
 			Texture *getTexture();
+			
+			/**
+			* Returns the material applied.
+			*/							
 			Material *getMaterial();
+			
+			/**
+			* Loads a simple texture from a file name and applies it to the mesh.
+			* @param fileName Filename to load the mesh from.
+			* @param clamp If true, clamps the texture to edges. See Texture for details on that.
+			*/
 			void loadTexture(String fileName, bool clamp=true);
+			
+			/**
+			* Loads a skeleton from a file and applies it to the scene mesh.
+			* @param fileName Filename to load the skeleton from.
+			*/
 			void loadSkeleton(String fileName);
+			
+			/**
+			* Sets the texture from an existing Texture instance.
+			* @param texture Texture to set.
+			*/			
 			void setTexture(Texture *texture);
+
+			/**
+			* Set material from existing Material instance.
+			* @param material Material to apply.
+			*/												
 			void setMaterial(Material *material);
+			
+			/**
+			* Set material by name. You can create materials in material files and name them there, then use this to set a material by name to a scene mesh.
+			* @param materialName Name of material to apply.
+			*/									
 			void setMaterialByName(String materialName);
+			
+			/**
+			* Set the mesh this scene mesh renders.
+			* @param mesh Set a new mesh to render.
+			*/															
 			void setMesh(Mesh *mesh);
 		
+			/**
+			* Sets a skeleton from an existing skeleton instance.
+			* @param skeleton Skeleton to set to this mesh.
+			*/
 			void setSkeleton(Skeleton *skeleton);
+			
+			/**
+			* Returns the skeleton applied to this scene mesh.
+			*/
 			Skeleton *getSkeleton();
 		
 			void renderMeshLocally();
+			
+			/**
+			* If this is set to true, the mesh will be cached to a hardware vertex buffer if those are available. This can dramatically speed up rendering.
+			*/
 			void cacheToVertexBuffer(bool cache);
 	
-			// for static lightmaps
 			unsigned int lightmapIndex;
 			
 			bool showVertexNormals;

+ 36 - 9
Core/Contents/Include/PolyScenePrimitive.h

@@ -1,13 +1,24 @@
 /*
- *  PolyScenePrimitive.h
- *  Poly
- *
- *  Created by Ivan Safrin on 6/15/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Scene
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -20,14 +31,30 @@ using std::string;
 
 namespace Polycode {
 
+	/**
+	* 3D primitive mesh. 
+	*/
 	class _PolyExport ScenePrimitive : public SceneMesh {
 		public:
 		
+			/**
+			* Create a primitive mesh of specified type and size.
+			* @param type Type of primitive to create. Current types are ScenePrimitive::TYPE_BOX, ScenePrimitive::TYPE_PLANE and ScenePrimitive::TYPE_SPHERE
+			*/
 			ScenePrimitive(int type, Number v1=1.0f, Number v2=1.0f, Number v3=1.0f);
 			virtual ~ScenePrimitive();
 
+			/**
+			* A cube.
+			*/
 			static const int TYPE_BOX = 0;		
-			static const int TYPE_PLANE = 1;
+			/**
+			* A plane.
+			*/			
+			static const int TYPE_PLANE = 1;			
+			/**
+			* A sphere.
+			*/			
 			static const int TYPE_SPHERE = 2;
 		
 		private:

+ 40 - 8
Core/Contents/Include/PolySceneRenderTexture.h

@@ -1,13 +1,24 @@
 /*
- *  PolySceneRenderTexture.h
- *  Poly
- *
- *  Created by Ivan Safrin on 8/6/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Scene
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -19,15 +30,36 @@ namespace Polycode {
 	class Scene;
 	class Camera;
 	
+	/**
+	* Renders scenes to texture. This class automatically renders a scene to a texture every frame that you can use to texture anything else. You can set a scene to virtual (see Scene for details) to only render a scene to a texture if you need to. This class automatically adds itself to the render cycle, so you do not need to do anything manual every frame.
+	*/
 	class _PolyExport SceneRenderTexture {
 		public:
+			/**
+			* Construct a new render texture with parameters.
+			* @param targetScene Target scene to render.
+			* @param Camera to render from.
+			* @param renderWidth Horizontal size of the render texture.
+			* @param renderHeight Vertical size of the render texture.			
+			*/
 			SceneRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight);
 			~SceneRenderTexture();
 			
 			void drawScreen();
 			
+			/**
+			* Returns the actual render texture.
+			*/
 			Texture *getTargetTexture();
+			
+			/**
+			* Returns the target scene.
+			*/			
 			Scene *getTargetScene();
+			
+			/**
+			* Returns the target camera.
+			*/						
 			Camera *getTargetCamera();	
 				
 		protected:

+ 78 - 11
Core/Contents/Include/PolyScreen.h

@@ -1,13 +1,25 @@
 /*
- *  PolyScreen.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
-// @package Screen
 
 #pragma once
 #include "PolyString.h"
@@ -25,43 +37,98 @@ using namespace std;
 namespace Polycode {
 
 	/**
-	* 2D rendering base. The Screen is the base class for all 2D rendering in Polycode. Screens are
+	* 2D rendering base. The Screen is the container for all 2D rendering in Polycode. Screens are automatically rendered and need only be instantiated to immediately add themselves to the rendering pipeline. Each screen has a root entity.
 	*/	
 	class _PolyExport Screen : public EventDispatcher {
 	public:
 		
+		/**
+		* Default constructor.
+		*/
 		Screen();
 		~Screen();
+		
+		/**
+		* Adds a ScreenEntity to the 2d rendering pipeline.
+		* @param newEntity Entity to add.
+		* @return Returns the same entity for convenience.
+		*/		
 		ScreenEntity* addChild(ScreenEntity *newEntity);
+		
+		/**
+		* Removes a ScreenEntity from the screen's render list.
+		* @param entityToRemove Entity to remove.
+		* @return Returns the same entity for convenience.
+		*/				
 		ScreenEntity* removeChild(ScreenEntity *entityToRemove);
 		
+		/**
+		* Sets the screen's offset. You can also translate the root entity to do the same thing.
+		* @param x New x offset.
+		* @param y New y offset.		
+		*/						
 		void setScreenOffset(Number x, Number y);
-		Vector2 getScreenOffset();
 		
+		/** 
+		* Returns the screen's offset.
+		* @return The screen's offset as 2d vector.
+		*/		
+		Vector2 getScreenOffset();
+				
 		virtual void Shutdown();
 		virtual void Update();
+		
+		/**
+		* Returns the entity at specified point. This is a deprecated method which does not take rotation or scale into account. Please use the 2d physics and collision module for proper collision detection.
+		*/
 		ScreenEntity *getEntityAt(Number x, Number y);
+
 		void Render();
 		void setRenderer(Renderer *renderer);
-		
+
+		/**
+		* Changes the screen's coordinate system. By default, screens' dimensions are in pixels. To accommodate changing resolutions without changing the dimensions of a screen's content, you can call this method to make it use normalized coordinates.
+		* @param newVal If true, the screen will use normalized coordinates, if false, it will use pixel coordinates.
+		* @param yCoordinateSize The normalized size of the screen vertically. The horizontal size will be calculated based on the resolution.
+		*/		
 		void setNormalizedCoordinates(bool newVal, Number yCoordinateSize = 1.0f);
+		
+		/**
+		* Sets the shader material to use for post processing on this screen.
+		* @param shaderName Name of the shader material to use.
+		*/				
 		void setScreenShader(String shaderName);
 		
 		void handleEvent(Event *event);
 		int getHighestZIndex();
+		
+		/**
+		* Sorts the screen's children based on their z index.
+		*/ 
 		void sortChildren();
 		
 		static bool cmpZindex(const ScreenEntity *left, const ScreenEntity *right);
 		
 		void handleInputEvent(InputEvent *inputEvent);
+		
+		/**
+		* Returns true if the screen has a shader applied to it.
+		*/				
 		bool hasFilterShader();
 		void drawFilter();
 		
 		bool usesNormalizedCoordinates() { return useNormalizedCoordinates; }
 		Number getYCoordinateSize() { return yCoordinateSize; }	
 		
+		/**
+		* Returns the root entity. The root entity can be used to transform the entire screen and change its color.
+		* @return The root entity.
+		*/		
 		ScreenEntity *getRootEntity() { return rootEntity; }
 		
+		/**
+		* If set to false, the screen will not be rendered or updated.
+		*/
 		bool enabled;
 		
 	protected:

+ 19 - 8
Core/Contents/Include/PolyScreenCurve.h

@@ -1,13 +1,24 @@
 /*
- *  PolyScreenCurve.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/5/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Screen
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 75 - 10
Core/Contents/Include/PolyScreenEntity.h

@@ -1,13 +1,25 @@
 /*
- *  PolyScreenEntity.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
-// @package Screen
 
 #pragma once
 #include "PolyString.h"
@@ -21,7 +33,9 @@
 
 namespace Polycode {
 
-	
+/**
+* 2D Entity base. The ScreenEntity is the base class for all 2D elements in Polycode. They can be added to a screen or to other ScreenEntities and are rendered automatically. If you want to create custom screen objects, subclass this. ScreenEntity subclasses Entity, which use 3d positioning and tranformation, but provides some 2d-only versions of the transformation functions for convenience.
+*/
 class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		
 	public:
@@ -31,9 +45,30 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		ScreenEntity();
 		~ScreenEntity();
 		
+		/**
+		* Set 2d position.
+		* @param x Horizontal position.
+		* @param y Vertical position.
+		*/
 		void setPosition(Number x, Number y);
+		
+		/**
+		* Set 2d scale.
+		* @param x Horizontal scale.
+		* @param y Vertical scale.
+		*/		
 		void setScale(Number x, Number y);
+		
+		/**
+		* Set 2d rotation.
+		* @param rotation New rotation value in degrees.
+		*/				
 		void setRotation(Number roatation);
+		
+		/**
+		* Returns current rotation.
+		* @return Current rotation value.
+		*/						
 		Number getRotation();
 			
 		bool _onMouseDown(Number x, Number y, int mouseButton, int timestamp);
@@ -58,11 +93,29 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 	
 		Matrix4 buildPositionMatrix();
 		void adjustMatrixForChildren();
-
+		
+		/**
+		* Returns the width of the screen entity.
+		* @return Height of the screen entity.
+		*/									
 		Number getWidth();
+		
+		/**
+		* Returns the height of the screen entity.
+		* @param w New height value.
+		*/											
 		Number getHeight();
 	
+		/**
+		* Sets the width of the screen entity.
+		* @param w New height value.
+		*/									
 		void setWidth(Number w) { width = w; hitwidth = w; }
+		
+		/**
+		* Sets the height of the screen entity.
+		* @param h New height value.
+		*/									
 		void setHeight(Number h) { height = h; hitheight = h; }
 	
 		virtual void onGainFocus(){}
@@ -72,6 +125,15 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		void stopDrag();
 				
 		void setBlendingMode(int newBlendingMode);
+		
+		/** 
+		* Changes the positioning mode of the screen entity.		
+		
+		If the positioning mode is ScreenEntity::POSITION_TOPLEFT, the entity is translated by half its width and half its height when it's rendered, making all other transformations relative to its top-left cornder.instead of the center.		
+		If the mode is ScreenEntity::POSITION_CENTER, the entity is rendered as is.
+		Set to POSITION_CENTER by default.
+		@param newPositionMode The new positioning mode.
+		*/
 		void setPositionMode(int newPositionMode);
 		
 		void setDragLimits(Rectangle rect);
@@ -91,6 +153,9 @@ class _PolyExport ScreenEntity : public Entity, public EventDispatcher {
 		bool blockMouseInput;
 		int zindex;	
 	
+		/**
+		* If this option is true, the screen entity's positions will be roudnded to whole pixels. This only works if the screen is using pixel coordinates.
+		*/
 		bool snapToPixels;
 
 

+ 20 - 8
Core/Contents/Include/PolyScreenEvent.h

@@ -1,13 +1,25 @@
 /*
- *  PolyScreenEvent.h
- *  Poly
- *
- *  Created by Ivan Safrin on 8/27/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
-// @package Screen
 
 #pragma once
 #include "PolyString.h"

+ 46 - 8
Core/Contents/Include/PolyScreenImage.h

@@ -1,13 +1,24 @@
 /*
- *  PolyScreenImage.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Screen
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -25,14 +36,41 @@ using std::string;
 
 namespace Polycode {
 
+	/**
+	* 2D screen image display. This ScreenEntity can load and display and image.
+	*/
 	class _PolyExport ScreenImage : public ScreenShape {
 		public:
+		/**
+		* Create screen image from file.
+		* @param fileName 
+		*/
 		ScreenImage(String fileName);
+		
+		/**
+		* Create screen image from Image.
+		* @param image Image to create from.
+		*/		
 		ScreenImage(Image *image);		
 		~ScreenImage();
 		
+		/**
+		* Changes which part of the image is displayed.
+		* @param x X position of the display rectangle.
+		* @param y Y position of the display rectangle.
+		* @param width Width of the display rectangle.
+		* @param height Height of the display rectangle.
+		*/				
 		void setImageCoordinates(Number x, Number y, Number width, Number height);
+		
+		/**
+		* Returns the image width.
+		*/ 
 		Number getImageWidth();
+		
+		/**
+		* Returns the image height.
+		*/ 		
 		Number getImageHeight();
 		
 		private:

+ 46 - 8
Core/Contents/Include/PolyScreenLabel.h

@@ -1,13 +1,24 @@
 /*
- *  PolyScreenLabel.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Screen
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -27,14 +38,41 @@ using std::wstring;
 
 namespace Polycode {
 
+	/**
+	* 2D screen label display. Displays 2d text in a specified font.
+	*/ 
 	class _PolyExport ScreenLabel : public ScreenShape {
 		public:
 			
+			/**
+			* Constructor.
+			* @param fontName Name of a registered font to use. @see FontManager for info on how to register fonts.
+			* @param text Text to display.
+			* @param size Size in pixels.
+			* @param Anti-aliasing mode.
+			*/
 			ScreenLabel(String fontName, String text, int size, int amode);
 			~ScreenLabel();		
 		
+			/**
+			* Adds a drop shadow to the label.
+			* @param color Color of the drop shadow.
+			* @param size Size of the drop shadow in pixels.
+			* @param offsetX Horizontal offset of the drop shadow.
+			* @param offsetY Vertical offset of the drop shadow.			
+			*/
 			void addDropShadow(Color color, Number size, Number offsetX, Number offsetY);
+			
+			/**
+			* Sets a new text to the screen label.
+			* @param newText Text to set.
+			*/
 			void setText(String newText);
+			
+			/**
+			* Returns the label's text as a string.
+			* @return The label's text.
+			*/
 			String getText();
 		
 			Label *getLabel();

+ 38 - 9
Core/Contents/Include/PolyScreenLine.h

@@ -1,13 +1,24 @@
 /*
- *  PolyScreenLine.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/8/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Screen
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -21,15 +32,33 @@ using std::string;
 
 namespace Polycode {
 
+	/**
+	* A 2D line between two points or two ScreenEntity instances.
+	*/ 
 	class _PolyExport ScreenLine : public ScreenEntity {
 		public:
-			
+			/**
+			* Create a line between two points.
+			* @start Starting point.
+			* @end Enfing point.	
+			*/
 			ScreenLine(Vector2* start, Vector2* end);
+			
+			/**
+			* Create a line between two entities. It's automatically updated every frame to follow the entities.
+			* @target1 Starting target.
+			* @target2 Ending target.
+			*/			
 			ScreenLine(ScreenEntity* target1, ScreenEntity* target2);
 			~ScreenLine();
 
 			void Update();
 			void Render();
+			
+			/**
+			* Sets the line width.
+			* @param width New line width.
+			*/
 			void setLineWidth(Number width);
 			
 		protected:

+ 27 - 13
Core/Contents/Include/PolyScreenManager.h

@@ -1,13 +1,24 @@
 /*
- *  ScreenManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/15/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Services
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -23,21 +34,24 @@ namespace Polycode {
 
 	class Screen;
 
+	/**
+	* 2D Screen manager. Must be accessed via CoreServices. Screens are automatically added to the manager when they are created, so there is no need to manually add them.
+	*/ 
 	class _PolyExport ScreenManager : public EventDispatcher {
-		public:
+		public:		
 		ScreenManager();
 		~ScreenManager();
 		
-//		Screen *createScreen(int screenType);
+		/**
+		* Removes a screen from the manager, taking it out of the render loop.
+		* @param screen Screen to remove. 
+		*/
 		void removeScreen(Screen *screen);
 		void addScreen(Screen* screen);
 		void Update();
 		
 		void handleEvent(Event *event);
 		
-		static const int REGULAR_SCREEN = 1;
-		static const int PHYSICS_SCREEN = 2;
-		
 		private:
 		
 		vector <Screen*> screens;

+ 53 - 8
Core/Contents/Include/PolyScreenMesh.h

@@ -1,13 +1,24 @@
 /*
- *  PolyScreenMesh.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/6/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Screen
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -23,18 +34,52 @@ using std::string;
 
 namespace Polycode {
 
+	/**
+	* 2D Mesh. ScreenMesh is the base for most geometry-based screen entities. It's based aroudn a Mesh instance, like its 3D counterpart (SceneMesh), but currently has fewer options.
+	* @see Mesh
+	*/
 	class _PolyExport ScreenMesh : public ScreenEntity {
 		public:
+			/**
+			* Creates the screen mesh and loads a mesh from a file name.
+			*/
 			ScreenMesh(String fileName);
+			
+			/**
+			* Create an empty screen mesh of specified type. See Mesh for available mesh types.
+			*/
 			ScreenMesh(int meshType);
 			~ScreenMesh();
 			
 			void Render();
 			
+			/**
+			* Returns the mesh for this screen mesh.
+			* @return The mesh.
+			*/
 			Mesh *getMesh();
+			
+			/**
+			* Returns the texture associated with the mesh.
+			*/
 			Texture *getTexture();
+			
+			/**
+			* Loads a texture from an image file.
+			* @param fileName Path to the image file.
+			*/
 			void loadTexture(String fileName);
+			
+			/**
+			* Loads a texture from an image instance.
+			* @param image Image instance.
+			*/			
 			void loadTexture(Image *image);	
+			
+			/**
+			* Applies a texture
+			* @param Texture to apply.
+			*/						
 			void setTexture(Texture *texture);
 			
 		protected:

+ 82 - 13
Core/Contents/Include/PolyScreenShape.h

@@ -1,13 +1,24 @@
 /*
- *  PolyScreenShape.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/6/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Screen
+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.
+*/
 
 #pragma once
 #include "PolyString.h"
@@ -23,30 +34,88 @@ using std::string;
 
 namespace Polycode {
 
+	/**
+	* 2D primitive. Screen shape can create 2d shapes (Currently only rectangles and circles). 
+	*/ 
 	class _PolyExport ScreenShape : public ScreenMesh {
 		public:
 			
+			/**
+			* Create a new shape of specified type and size/options.
+			* @param shapeType Type of shape to create. Currently the only options are ScreenShape::SHAPE_RECT and ScreenShape::SHAPE_CIRCLE. Pass ScreenShape::SHAPE_CUSTOM if you want to create a custom shape (@see addShapePoint())
+			* @param option1 Width option.
+			* @param option2 Height option.
+			* @param option3 Number of vertices for the the circle (defaults to 360). Unused for rectangle.
+			* @param option4 Reserved.
+			*/
 			ScreenShape(int shapeType, Number option1=0, Number option2=0, Number option3=0, Number option4=0);
-			~ScreenShape();
+			virtual ~ScreenShape();
 			void Render();
-					
+
+			/**
+			* Sets the color of the shape stroke if it's enabled.
+			* @param r Red value 0-1.
+			* @param g Green value 0-1
+			* @param b Blue value 0-1
+			* @param a Alpha value 0-1									
+			* @see strokeEnabled
+			*/
 			void setStrokeColor(Number r, Number g, Number b, Number a);
-			void setStrokeWidth(Number width);
 			
+			/**
+			* Sets the width of the shape stroke if it's enabled.
+			* @param width New stroke width.
+			* @see strokeEnabled
+			*/
+			void setStrokeWidth(Number width);
+
+			/**
+			* Colors the shape with a gradient. Radial for circles, linear for rectangles.
+			* @param width New stroke width.
+			* @param r1 Red value of the first gradient color 0-1.
+			* @param g1 Green value of the first gradient color 0-1
+			* @param b1 Blue value of the first gradient color 0-1
+			* @param a1 Alpha value of the first gradient color 0-1									
+			* @param r2 Red value of the second gradient color 0-1.
+			* @param g2 Green value of the second gradient color 0-1
+			* @param b2 Blue value of the second gradient color 0-1
+			* @param a2 Alpha value of the second gradient color 0-1												
+			* @see strokeEnabled
+			*/			
 			void setGradient(Number r1, Number g1, Number b1, Number a1, Number r2, Number g2, Number b2, Number a2);
+			
+			/**
+			* Removes the gradient from the shape.
+			*/
 			void clearGradient();
-		
+				
+
 			void setShapeSize(Number newWidth, Number newHeight);
 		
+			/** 
+			* Adds a point to the mesh.
+			* @param x Horizontal position of the point.
+			* @param y Vertical position of the point.
+			*/ 
 			void addShapePoint(Number x, Number y);
 			
 			static const int SHAPE_RECT = 1;
 			static const int SHAPE_CIRCLE = 2;
-			static const int SHAPE_CIRCLE_OUTLINE = 3;
 			static const int SHAPE_CUSTOM = 4;
 			
+			/**
+			* If set to true, the shape will be drawn over with a stroke.
+			*/			
 			bool strokeEnabled;
+			
+			/**
+			* Color of the shape stroke.
+			*/
 			Color strokeColor;
+			
+			/**
+			* If this is set to true, the line will be anti-aliased if the support is available in the renderer.
+			*/			
 			bool lineSmooth;
 			
 		protected:

+ 43 - 7
Core/Contents/Include/PolyScreenSprite.h

@@ -1,11 +1,25 @@
 /*
- *  PolyScreenSprite.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 9/13/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 #pragma once
 #include "PolyString.h"
 #include "PolyGlobals.h"
@@ -25,13 +39,35 @@ class SpriteAnimation {
 		vector<Vector2> framesOffsets;
 };
 
+/**
+* Animated 2D image sprite. This screen entity can load spritesheet images and play back animations.
+*/
 class ScreenSprite : public ScreenShape 
 {
 	public:
+		/**
+		* Create a sprite from a spritesheet image of specified size.
+		* @param fileName Image file to load spritesheet from.
+		* @param spriteWidth Pixel width of each sprite cell.
+		* @param spriteWidth Pixel height of each sprite cell.		
+		*/
 		ScreenSprite(String fileName, Number spriteWidth, Number spriteHeight);
 		~ScreenSprite();
 		
+		/**
+		* Adds a new animation to the sprite. Animations are added by specifying a list of frame indexes and then can be played back by the specified name.
+		* @param name Name of the new animation.
+		* @param frames A comma separated list of frames indexes to include in the animation.
+		* @speed Speed at which to play back the animation.
+		*/
 		void addAnimation(String name, String frames, Number speed);
+		
+		/**
+		* Play back a previously created animation by name.
+		* @param name Name of the animation to play.
+		* @param startFrame Starting frame for playback.
+		* @param once If true, only plays once, otherwise loops.
+		*/
 		void playAnimation(String name, int startFrame, bool once);
 		void Update();
 		

+ 20 - 8
Core/Contents/Include/PolyShader.h

@@ -1,12 +1,24 @@
 /*
- *  PolyShader.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/20/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Materials
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 106 - 11
Core/Contents/Include/PolySkeleton.h

@@ -1,12 +1,25 @@
 /*
- *  PolySkeleton.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/4/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package BasicTypes
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 
 #pragma once
 #include "PolyString.h"
@@ -75,16 +88,40 @@ namespace Polycode {
 		
 	};
 
+	/**
+	* Skeleton animation.
+	*/ 
 	class _PolyExport SkeletonAnimation {
 		public:
+		
 			SkeletonAnimation(String name, Number duration);
-			~SkeletonAnimation();			
+			~SkeletonAnimation();		
+			
+			/**
+			* Adds a new bone track
+			* @param boneTrack New bone track to add.
+			*/
 			void addBoneTrack(BoneTrack *boneTrack);
+			
+			/**
+			* Returns the animation name.
+			*/
 			String getName();
-			void Play();
+			
+			/**
+			* Plays the animation.
+			*/
+			void Play();			
+			/**
+			* Stops the animation.
+			*/			
 			void Stop();
 			void Update();
-		
+
+			/**
+			* Sets the animation multiplier speed.
+			* @param speed Number to multiply the animation speed by.
+			*/					
 			void setSpeed(Number speed);
 			
 		private:
@@ -94,26 +131,84 @@ namespace Polycode {
 			vector<BoneTrack*> boneTracks;
 	};
 
+	/**
+	* 3D skeleton. Skeletons are applied to scene meshes and can be animated with loaded animations.
+	*/
 	class _PolyExport Skeleton : public SceneEntity {
 		public:
+		
+			/**
+			* Construct skeleton from a skeleton file.
+			* @param fileName Skeleton file to load.
+			*/
 			Skeleton(String fileName);
 			Skeleton();
+			
+			/**
+			* Loads a new skeleton from file.
+			* @param fileName Skeleton file to load.
+			*/ 
 			void loadSkeleton(String fileName);
+			
 			~Skeleton();
 		
+			/**
+			* Play back a loaded animation.
+			* @param animName Name of animation to play.
+			*/
 			void playAnimation(String animName);
+						
 			void playAnimationByIndex(int index);		
+			
+			/**
+			* Loads in a new animation from a file and adds it to the skeleton.
+			* @param name Name of the new animation.
+			* @param fileName File to load animation from.
+			*/			
 			void addAnimation(String name, String fileName);
+			
+			/**
+			* Returns a SkeletonAnimation by its name.
+			* @param Name of animation to return.
+			*/
 			SkeletonAnimation *getAnimation(String name);
 			void Update();
 			
+			/**
+			* Get bone instance by its name
+			* @param name Name of the bone.
+			*/
 			Bone *getBoneByName(String name);
+			
+			/**
+			* Toggles bone visibility on and off.
+			* @param val If true, bones will be rendered, if false, they will not.
+			*/
 			void bonesVisible(bool val);
+			
+			/**
+			* Enables labels with bone names to be rendered. See SceneLabel for details on the parameters.
+			* @param labelFont Font to use
+			* @param size Size of font.
+			* @param scale Scale of font.
+			* @param labelColor Color of the label.
+			*/
 			void enableBoneLabels(String labelFont, Number size, Number scale, Color labelColor);
 					
+			/**
+			* Returns the number of bones in the skeleton
+			*/
 			int getNumBones();
+			
+			/**
+			* Returns a bone at the specified index.
+			* @param index Bone index.
+			*/
 			Bone *getBone(int index);
 		
+			/**
+			* Returns the current animation.
+			*/
 			SkeletonAnimation *getCurrentAnimation() { return currentAnimation; }
 		
 		private:

+ 0 - 1
Core/Contents/Include/PolySound.h

@@ -20,7 +20,6 @@
  THE SOFTWARE.
  */
 
-
 #pragma once
 #include <vorbis/vorbisfile.h>
 #include "PolyString.h"

+ 19 - 7
Core/Contents/Include/PolySoundManager.h

@@ -1,12 +1,24 @@
 /*
- *  PolySoundManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 10/12/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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.
  */
-// @package Sound
 
 #pragma once
 #include "PolyString.h"

+ 19 - 8
Core/Contents/Include/PolyTexture.h

@@ -1,14 +1,25 @@
 /*
- *  PolyTexture.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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.
  */
 
-// @package Materials
-
 #pragma once
 #include "PolyString.h"
 #include "PolyGlobals.h"

+ 34 - 8
Core/Contents/Include/PolyThreaded.h

@@ -1,26 +1,52 @@
 /*
- *  PolyThreaded.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/6/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
-// @package Core
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 #pragma once
 #include "PolyString.h"
 #include "PolyGlobals.h"
 
 namespace Polycode{
 	
+	/**
+	* An easy way to create threaded processes. If you subclass this class, you can implement the updateThread method, which will be called in its own thread repeatedly until threadRunning is false once the thread is created. If you only need to run through something once, make sure to set threadRunning to avoid it being called again. 
+	
+		To create the thread, pass your Threaded subclass to createThread method of Core.
+		@see Core
+	*/
 	class _PolyExport Threaded {
 	public:
 		Threaded(){ threadRunning = true; }
 		~Threaded(){}
 		
+		/**
+		* Sets the thread running flag to false.
+		*/ 
 		virtual void killThread() { threadRunning = false; }		
+		
 		virtual void runThread(){while(threadRunning) updateThread(); }
 		
+		/**
+		* Implement this method with your own code.
+		*/
 		virtual void updateThread() = 0;
 		
 		bool threadRunning;

+ 46 - 8
Core/Contents/Include/PolyTimer.h

@@ -1,12 +1,25 @@
 /*
- *  PolyTimer.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package BasicTypes
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
+
 
 #pragma once
 #include "PolyString.h"
@@ -18,17 +31,42 @@ using namespace std;
 
 namespace Polycode {
 	
+	/** 
+	* A timer that dispatches trigger events.
+	*/ 
 	class _PolyExport Timer : public EventDispatcher {
 		public:
+			/**
+			* Creates a new timer. 
+			* @param triggerMode If true, will dispatch an event at the specified frequency, otherwise it will simply count time. You normally want this to be true.
+			* @param msecs Timer frequency in milliseconds.
+			*/
 			Timer(bool triggerMode, int msecs);
 			~Timer();
 
+		/** 
+		* Pauses and resumes the timer.
+		* @param paused If true, pauses the timer, otherwise resumes it.
+		*/ 
 		void Pause(bool paused);
+		
+		/**
+		* Returns true if the timer is paused.
+		*/
 		bool isPaused();
+		
 		unsigned int getTicks();
 		void Update(unsigned int ticks);
+		
+		/**
+		* Resets the timer.
+		*/ 
 		void Reset();
 		bool hasElapsed();
+		
+		/**
+		* Returns the time elapsed in floating point microseconds.
+		*/
 		Number getElapsedf();		
 
 		static const int EVENT_TRIGGER = 0;

+ 20 - 8
Core/Contents/Include/PolyTimerManager.h

@@ -1,12 +1,24 @@
 /*
- *  PolyTimerManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Services
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 19 - 8
Core/Contents/Include/PolyTween.h

@@ -1,13 +1,24 @@
 /*
- *  PolyTween.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/7/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package BasicTypes
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 20 - 8
Core/Contents/Include/PolyTweenManager.h

@@ -1,12 +1,24 @@
 /*
- *  PolyTimerManager.h
- *  Poly
- *
- *  Created by Ivan Safrin on 5/18/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Services
+Copyright (C) 2011 by Ivan Safrin
+
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 0 - 27
Core/Contents/Include/PolyUtil.h

@@ -1,27 +0,0 @@
-/*
- *  PolyUtil.h
- *  Poly
- *
- *  Created by Ivan Safrin on 9/23/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-// @package Services
-
-#pragma once
-#include "PolyString.h"
-#include "PolyGlobals.h"
-#include <string>
-#include <vector>
-#include <algorithm>
-#include <cctype>
-
-using std::string;
-using std::vector;
-
-namespace Polycode {
-
-	class _PolyExport StringUtil {
-		public:
-	};
-}

+ 35 - 22
Core/Contents/Include/PolyVector2.h

@@ -1,38 +1,51 @@
 /*
- *  PolyVector2.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/14/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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.
  */
 
-// @package Math
- 
 #pragma once
 #include "PolyString.h"
 #include "PolyGlobals.h"
+#include "PolyVector3.h"
 
 namespace Polycode {
-
-	class _PolyExport Vector2 {
+	
+	/**
+	* 2D Vector (convenience wrapper around Vector3). 
+	*/
+	class _PolyExport Vector2 : public Vector3 {
 		public:
 		
+			/**
+			* Default constructor.
+			*/
 			Vector2();
+			
+			/**
+			* Create from x,y coordinates.
+			* @param x X coordinate.
+			* @param y Y coordinate.			
+			*/			
 			Vector2(Number x, Number y);
 			virtual ~Vector2();
-		
-			inline bool operator == ( const Vector2& v2)  {
-				return (v2.x == x && v2.y == y);
-			}		
-
-			inline bool operator != ( const Vector2& v2)  {
-				return (v2.x != x || v2.y != y);
-			}				
-		
-			Number x;
-			Number y;			
-			
+					
 		private:
 
 	};

+ 96 - 14
Core/Contents/Include/PolyVector3.h

@@ -1,13 +1,24 @@
 /*
- *  PolyVector3.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/14/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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:
  
-// @package Math
+ 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.
+ */
 
 #pragma once
 #include "PolyString.h"
@@ -20,22 +31,53 @@
 
 namespace Polycode {
 
+	/**
+	* 3D Vector class. 
+	*/
 	class _PolyExport Vector3 {
 		public:
 		
+			/**
+			* Create from x,y,z coordinates.
+			* @param x X coordinate.
+			* @param y Y coordinate.			
+			* @param z Z coordinate.						
+			*/					
 			Vector3(Number x,Number y,Number z);		
+			
+			/**
+			* Default constructor.
+			*/ 
 			Vector3();
 			virtual ~Vector3();
 
+			/**
+			* Sets the vector from x,y,z coordinates.
+			* @param x X coordinate.
+			* @param y Y coordinate.			
+			* @param z Z coordinate.									
+			*/
 			void set(Number x, Number y, Number z);
 
 			inline Vector3 operator - ( const Vector3& v2 ) const {
 				return Vector3(x - v2.x, y - v2.y, z - v2.z);
 			}
 
-			inline Number distance(const Vector3& rhs) const {
-				return (*this - rhs).length();
+			/**
+			* Returns the distance from this vector to another one.
+			* @param vec2 Second vector.
+			* @return Distance to the other vector.
+			*/
+			inline Number distance(const Vector3& vec2) const {
+				return (*this - vec2).length();
 			}
+			
+			// ----------------------------------------------------------------------------------------------------------------
+			/** @name Operators
+			*  Available vector operators.
+			*/
+			//@{
+			
 
 			inline Vector3& operator * (const Number val) {
 				x *= val;
@@ -77,25 +119,65 @@ namespace Polycode {
 				return Vector3(x + v2.x, y + v2.y, z + v2.z);
 			}		
 
+
+			inline bool operator == ( const Vector3& v2)  {
+				return (v2.x == x && v2.y == y && v2.z == z);
+			}		
+
+			inline bool operator != ( const Vector3& v2)  {
+				return (v2.x != x || v2.y != y || v2.z != z);
+			}				
+		
+			//@}
+			// ----------------------------------------------------------------------------------------------------------------
+	
+
+			/**
+			* Returns the vector length.
+			* @return Length of the vector.
+			*/
 			inline Number length () const {
 				return sqrtf( x * x + y * y + z * z );
 			}
 			
+			/**
+			* Returns the dot product with another vector.
+			* @return Dor product with the vector.
+			*/			
 			inline Number dot(Vector3 &u) {
 				return x * u.x + y * u.y + z * u.z;
 			}
 
-			inline Vector3 crossProduct( const Vector3& rkVector ) const {
+			/**
+			* Returns the cross product with another vector.
+			* @param vec2 Second vector.
+			* @return Cross product with the vector.
+			*/
+			inline Vector3 crossProduct( const Vector3& vec2 ) const {
 				return Vector3(
-					y * rkVector.z - z * rkVector.y,
-					z * rkVector.x - x * rkVector.z,
-					x * rkVector.y - y * rkVector.x);
+					y * vec2.z - z * vec2.y,
+					z * vec2.x - x * vec2.z,
+					x * vec2.y - y * vec2.x);
 			}			
 
+			/**
+			* Normalizes the vector.
+			*/
 			void Normalize();
 		
+			/**
+			* X coordinate.
+			*/
 			Number x;
+			
+			/**
+			* Y coordinate.
+			*/			
 			Number y;
+			
+			/**
+			* Z coordinate.
+			*/			
 			Number z;			
 			
 		private:

+ 129 - 21
Core/Contents/Include/PolyVertex.h

@@ -1,23 +1,23 @@
 /*
-Copyright (C) 2011 by Ivan Safrin
-
-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.
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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.
 */
 
 #pragma once
@@ -33,13 +33,28 @@ using std::vector;
 namespace Polycode {
 
 	class Bone;
+	
+	/**
+	* Bone assignment.
+	*/ 
 	class _PolyExport BoneAssignment {
 		public:
 			BoneAssignment(){
 				bone = NULL;
 			}
+			/**
+			* Id of the bone assigned.
+			*/
 			unsigned int boneID;
+			
+			/**
+			* Assignment weight.
+			*/
 			Number weight;
+			
+			/**
+			* Assigned bone.
+			*/			
 			Bone *bone;
 	};
 
@@ -49,28 +64,121 @@ namespace Polycode {
 	class _PolyExport Vertex : public Vector3 {
 		public:
 		
+			/**
+			* Default constructor.
+			*/
 			Vertex();
+			
+			/**
+			* Initialize with position.
+			* @param pos_x Position x.
+			* @param pos_y Position y.
+			* @param pos_z Position z.			
+			*/						
+			Vertex(Number x, Number y, Number z);			
+			
+			/**
+			* Initialize with position and normal.
+			* @param pos_x Position x.
+			* @param pos_y Position y.
+			* @param pos_z Position z.			
+			* @param nor_x Normal x.
+			* @param nor_y Normal y.
+			* @param nor_z Normal z.						
+			*/			
 			Vertex(Number pos_x, Number pos_y, Number pos_z, Number nor_x, Number nor_y, Number nor_z);
+			
+			/**
+			* Initialize with position and normal and texture coordinates.
+			* @param pos_x Position x.
+			* @param pos_y Position y.
+			* @param pos_z Position z.			
+			* @param nor_x Normal x.
+			* @param nor_y Normal y.
+			* @param nor_z Normal z.						
+			* @param u Horizontal texture coordinate.
+			* @param v Vertical texture coordinate.			
+			*/						
 			Vertex(Number pos_x, Number pos_y, Number pos_z, Number nor_x, Number nor_y, Number nor_z, Number u, Number v);		
-			Vertex(Number x, Number y, Number z);
+			
+			/**
+			* Initialize with position and texture coordinates.
+			* @param pos_x Position x.
+			* @param pos_y Position y.
+			* @param pos_z Position z.			
+			* @param u Horizontal texture coordinate.
+			* @param v Vertical texture coordinate.			
+			*/									
 			Vertex(Number x, Number y, Number z, Number u, Number v);
+			
 			virtual ~Vertex();
 			
+			/**
+			* Assign a bone to the vertex by bone id.
+			* @param boneID The bone id.
+			* @param boneWeight Normalized weight of the bone assignment.
+			*/ 
 			void addBoneAssignment(unsigned int boneID, Number boneWeight);
+			
+			/**
+			* Get total number of bone assignments.
+			* @return Number of bone assignments.
+			*/
 			int getNumBoneAssignments();
+			
+			/**
+			* Get bone assignment at index.
+			* @param Index of bone assignment.
+			* @return Bone assignment at index.
+			*/			
 			BoneAssignment *getBoneAssignment(unsigned int index);
 			
+			/**
+			* Normalizes all current weight assignments.
+			*/
 			void normalizeWeights();
 			
+			/**
+			* Returns the texture coordinates.
+			* @return Texture coordinates.
+			*/
 			Vector2 getTexCoord();
+			
+			/**
+			* Sets the texture coordinates.
+			* @param u New horizontal texture coordinate.
+			* @param v New vertical texture coordinate.			
+			*/
 			void setTexCoord(Number u, Number v);
+			
+			/**
+			* Sets the normal
+			* @param x Normal x.
+			* @param y Normal y.
+			* @param z Normal z.			
+			*/			
 			void setNormal(Number x, Number y, Number z);
 
+			/**
+			* Rest normal.
+			*/
 			Vector3 restNormal;
-			Vector3 normal;
+			
+			/**
+			* Rest position.
+			*/			
 			Vector3 restPosition;
 
+			/**
+			* Vertex normal.
+			*/
+			Vector3 normal;
+			
+			/**
+			* Vertex color.
+			*/
 			Color vertexColor;		
+			
 			bool useVertexColor;
 				
 		private:

+ 0 - 1
Core/Contents/Include/Polycode.h

@@ -30,7 +30,6 @@
 #include "PolyConfig.h"
 #include "PolyEntity.h"
 #include "PolyPolygon.h"
-#include "PolyUtil.h"
 #include "PolyEvent.h"
 #include "PolyEventDispatcher.h"
 #include "PolyEventHandler.h"

+ 19 - 8
Core/Contents/Include/PolyiPhoneCore.h

@@ -1,13 +1,24 @@
 /*
- *  PolyiPhoneCore.h
- *  Poly
- *
- *  Created by Ivan Safrin on 2/1/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
+Copyright (C) 2011 by Ivan Safrin
 
-// @package Core
+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.
+*/
 
 #pragma once
 #include "PolyString.h"

+ 20 - 7
Core/Contents/Source/OSBasics.cpp

@@ -1,11 +1,24 @@
 /*
- *  OSBasics.cpp
- *  PolyStudio
- *
- *  Created by Ivan Safrin on 8/4/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "OSBasics.h"
 

+ 20 - 7
Core/Contents/Source/PolyAGLCore.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyAGLCore.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/12/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyAGLCore.h"
 #include <iostream>

+ 20 - 8
Core/Contents/Source/PolyBezierCurve.cpp

@@ -1,12 +1,24 @@
 /*
- *  PolyBezierCurve.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 9/5/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyBezierCurve.h"
 

+ 21 - 8
Core/Contents/Source/PolyBone.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyBone.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 9/5/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyBone.h"
 
@@ -16,7 +29,7 @@ Bone::Bone(String boneName) : SceneEntity() {
 //	boneMesh = new ScenePrimitive(ScenePrimitive::TYPE_BOX, 0.1, 0.1, 0.1);
 	this->depthTest = false;
 	parentBone = NULL;
-	boneMatrix.init();
+	boneMatrix.identity();
 //	addChild(boneMesh);
 	
 	boneMesh = new Mesh(Mesh::QUAD_MESH);

+ 20 - 7
Core/Contents/Source/PolyCamera.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyCamera.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/26/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyCamera.h"
 

+ 20 - 8
Core/Contents/Source/PolyCocoaCore.cpp

@@ -1,12 +1,24 @@
 /*
- *  PolyCocoaCore.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 2/16/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
-
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyCocoaCore.h"
 #include <iostream>

+ 20 - 7
Core/Contents/Source/PolyColor.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyColor.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyColor.h"
 

+ 20 - 8
Core/Contents/Source/PolyConfig.cpp

@@ -1,12 +1,24 @@
 /*
- *  PolyConfig.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 4/15/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
-
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyConfig.h"
 
 using namespace Polycode;

+ 20 - 7
Core/Contents/Source/PolyCore.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyCore.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/12/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyCore.h"
 

+ 20 - 7
Core/Contents/Source/PolyCoreInput.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyCoreInput.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/27/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyCoreInput.h"
 

+ 20 - 7
Core/Contents/Source/PolyCoreServices.cpp

@@ -1,11 +1,24 @@
 /*
- *  CoreServices.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/13/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyCoreServices.h"
 

+ 20 - 7
Core/Contents/Source/PolyCubemap.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyCubemap.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 9/9/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyCubemap.h"
 

+ 21 - 0
Core/Contents/Source/PolyData.cpp

@@ -1,3 +1,24 @@
+/*
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyData.h"
 

+ 20 - 8
Core/Contents/Source/PolyEntity.cpp

@@ -1,12 +1,24 @@
 /*
- *  PolyEntity.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 1/18/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
-
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyEntity.h"
 
 using namespace Polycode;

+ 20 - 7
Core/Contents/Source/PolyEvent.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyEvent.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyEvent.h"
 

+ 20 - 7
Core/Contents/Source/PolyEventDispatcher.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyEventDispatcher.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyEventDispatcher.h"
 

+ 20 - 7
Core/Contents/Source/PolyEventHandler.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyEventHandler.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/28/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyEventHandler.h" 
 

+ 20 - 8
Core/Contents/Source/PolyFixedShader.cpp

@@ -1,12 +1,24 @@
 /*
- *  PolyFixedShader.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 9/20/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
-
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyFixedShader.h"
 

+ 20 - 7
Core/Contents/Source/PolyFont.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyFont.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/08.
- *  Copyright 2008 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyFont.h"
 

+ 20 - 7
Core/Contents/Source/PolyFontManager.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyFontManager.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/3/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyFontManager.h"
 

+ 20 - 7
Core/Contents/Source/PolyGLCubemap.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyGLCubemap.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 9/9/09.
- *  Copyright 2009 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyGLCubemap.h"
 

+ 20 - 8
Core/Contents/Source/PolyGLES1Renderer.cpp

@@ -1,12 +1,24 @@
 /*
- *  PolyGLES1Renderer.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 2/1/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
-
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyGLES1Renderer.h"
 

+ 20 - 7
Core/Contents/Source/PolyGLES1Texture.cpp

@@ -1,11 +1,24 @@
 /*
- *  PolyGLES1Texture.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 2/1/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
- */
+ Copyright (C) 2011 by Ivan Safrin
+ 
+ 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 "PolyGLES1Texture.h"
 

Некоторые файлы не были показаны из-за большого количества измененных файлов