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

Merge pull request #37 from bitshifter/pxljm

Merged in bitshifter's latest.
Ivan Safrin 14 лет назад
Родитель
Сommit
db12933ba4
100 измененных файлов с 2672 добавлено и 2780 удалено
  1. 1 0
      .gitignore
  2. 72 72
      Bindings/Contents/LUA/API/Polycode.lua
  3. 9 2
      Bindings/Contents/LUA/API/Polycode/Bone.lua
  4. 1 1
      Bindings/Contents/LUA/API/Polycode/Camera.lua
  5. 15 8
      Bindings/Contents/LUA/API/Polycode/Config.lua
  6. 5 5
      Bindings/Contents/LUA/API/Polycode/Core.lua
  7. 3 3
      Bindings/Contents/LUA/API/Polycode/Data.lua
  8. 1 1
      Bindings/Contents/LUA/API/Polycode/Entity.lua
  9. 8 1
      Bindings/Contents/LUA/API/Polycode/Event.lua
  10. 3 3
      Bindings/Contents/LUA/API/Polycode/FixedShaderBinding.lua
  11. 2 2
      Bindings/Contents/LUA/API/Polycode/FontManager.lua
  12. 3 3
      Bindings/Contents/LUA/API/Polycode/Image.lua
  13. 11 4
      Bindings/Contents/LUA/API/Polycode/Label.lua
  14. 9 2
      Bindings/Contents/LUA/API/Polycode/Material.lua
  15. 2 2
      Bindings/Contents/LUA/API/Polycode/MaterialManager.lua
  16. 2 2
      Bindings/Contents/LUA/API/Polycode/Mesh.lua
  17. 4 4
      Bindings/Contents/LUA/API/Polycode/OSBasics.lua
  18. 41 21
      Bindings/Contents/LUA/API/Polycode/OSFileEntry.lua
  19. 1 1
      Bindings/Contents/LUA/API/Polycode/ObjectEntry.lua
  20. 18 4
      Bindings/Contents/LUA/API/Polycode/Resource.lua
  21. 10 10
      Bindings/Contents/LUA/API/Polycode/ResourceManager.lua
  22. 4 4
      Bindings/Contents/LUA/API/Polycode/Scene.lua
  23. 1 1
      Bindings/Contents/LUA/API/Polycode/SceneLabel.lua
  24. 3 3
      Bindings/Contents/LUA/API/Polycode/SceneMesh.lua
  25. 1 1
      Bindings/Contents/LUA/API/Polycode/Screen.lua
  26. 9 2
      Bindings/Contents/LUA/API/Polycode/ScreenLabel.lua
  27. 1 1
      Bindings/Contents/LUA/API/Polycode/ScreenMesh.lua
  28. 2 2
      Bindings/Contents/LUA/API/Polycode/ScreenSprite.lua
  29. 9 2
      Bindings/Contents/LUA/API/Polycode/Shader.lua
  30. 6 6
      Bindings/Contents/LUA/API/Polycode/ShaderBinding.lua
  31. 6 6
      Bindings/Contents/LUA/API/Polycode/Skeleton.lua
  32. 8 1
      Bindings/Contents/LUA/API/Polycode/SkeletonAnimation.lua
  33. 5 5
      Bindings/Contents/LUA/API/Polycode/Sound.lua
  34. 1 58
      Bindings/Contents/LUA/API/Polycode/String.lua
  35. 9 2
      Bindings/Contents/LUA/API/Polycode/Texture.lua
  36. 0 1
      Bindings/Contents/LUA/Include/PolycodeLUA.h
  37. 535 476
      Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h
  38. 980 987
      Bindings/Contents/LUA/Source/PolycodeLUA.cpp
  39. 374 366
      Bindings/Scripts/create_lua_library/create_lua_library.py
  40. 3 1
      CMake/ExternalAssimp.cmake
  41. 3 3
      CMake/ExternalBox2D.cmake
  42. 4 4
      CMake/ExternalBullet.cmake
  43. 3 3
      CMake/PolycodeIncludes.cmake
  44. 6 3
      CMakeLists.txt
  45. 11 11
      Core/Contents/CMakeLists.txt
  46. 15 28
      Core/Contents/Include/OSBasics.h
  47. 3 6
      Core/Contents/Include/PolyBezierCurve.h
  48. 18 20
      Core/Contents/Include/PolyBone.h
  49. 9 8
      Core/Contents/Include/PolyCamera.h
  50. 6 6
      Core/Contents/Include/PolyCocoaCore.h
  51. 6 9
      Core/Contents/Include/PolyColor.h
  52. 10 16
      Core/Contents/Include/PolyConfig.h
  53. 15 22
      Core/Contents/Include/PolyCore.h
  54. 5 5
      Core/Contents/Include/PolyCoreInput.h
  55. 7 18
      Core/Contents/Include/PolyCoreServices.h
  56. 4 4
      Core/Contents/Include/PolyCubemap.h
  57. 7 7
      Core/Contents/Include/PolyData.h
  58. 28 30
      Core/Contents/Include/PolyEntity.h
  59. 5 9
      Core/Contents/Include/PolyEvent.h
  60. 3 7
      Core/Contents/Include/PolyEventDispatcher.h
  61. 2 3
      Core/Contents/Include/PolyEventHandler.h
  62. 6 6
      Core/Contents/Include/PolyFixedShader.h
  63. 5 9
      Core/Contents/Include/PolyFont.h
  64. 7 10
      Core/Contents/Include/PolyFontManager.h
  65. 10 11
      Core/Contents/Include/PolyGLCubemap.h
  66. 4 13
      Core/Contents/Include/PolyGLRenderer.h
  67. 4 24
      Core/Contents/Include/PolyGLSLProgram.h
  68. 9 27
      Core/Contents/Include/PolyGLSLShader.h
  69. 10 26
      Core/Contents/Include/PolyGLSLShaderModule.h
  70. 7 9
      Core/Contents/Include/PolyGLTexture.h
  71. 5 9
      Core/Contents/Include/PolyGLVertexBuffer.h
  72. 1 1
      Core/Contents/Include/PolyGlobals.h
  73. 12 17
      Core/Contents/Include/PolyImage.h
  74. 1 2
      Core/Contents/Include/PolyInputEvent.h
  75. 11 15
      Core/Contents/Include/PolyLabel.h
  76. 0 11
      Core/Contents/Include/PolyLogger.h
  77. 16 18
      Core/Contents/Include/PolyMaterial.h
  78. 12 16
      Core/Contents/Include/PolyMaterialManager.h
  79. 9 9
      Core/Contents/Include/PolyMatrix4.h
  80. 12 15
      Core/Contents/Include/PolyMesh.h
  81. 11 8
      Core/Contents/Include/PolyModule.h
  82. 13 12
      Core/Contents/Include/PolyObject.h
  83. 7 7
      Core/Contents/Include/PolyParticle.h
  84. 26 17
      Core/Contents/Include/PolyParticleEmitter.h
  85. 4 11
      Core/Contents/Include/PolyPolygon.h
  86. 4 6
      Core/Contents/Include/PolyQuaternion.h
  87. 6 8
      Core/Contents/Include/PolyQuaternionCurve.h
  88. 1 2
      Core/Contents/Include/PolyRectangle.h
  89. 20 18
      Core/Contents/Include/PolyRenderer.h
  90. 6 11
      Core/Contents/Include/PolyResource.h
  91. 17 26
      Core/Contents/Include/PolyResourceManager.h
  92. 12 15
      Core/Contents/Include/PolySDLCore.h
  93. 18 18
      Core/Contents/Include/PolyScene.h
  94. 1 11
      Core/Contents/Include/PolySceneEntity.h
  95. 7 13
      Core/Contents/Include/PolySceneLabel.h
  96. 15 19
      Core/Contents/Include/PolySceneLight.h
  97. 3 8
      Core/Contents/Include/PolySceneManager.h
  98. 8 14
      Core/Contents/Include/PolySceneMesh.h
  99. 1 6
      Core/Contents/Include/PolyScenePrimitive.h
  100. 3 4
      Core/Contents/Include/PolySceneRenderTexture.h

+ 1 - 0
.gitignore

@@ -34,6 +34,7 @@
 *.xcuserstate
 *.xcuserstate
 *.xcworkspace
 *.xcworkspace
 *.xcuserdata
 *.xcuserdata
+*.orig
 
 
 /Standalone/Build
 /Standalone/Build
 /Dependencies/Build
 /Dependencies/Build

+ 72 - 72
Bindings/Contents/LUA/API/Polycode.lua

@@ -1,87 +1,87 @@
-require "Polycode/OSFILE"
-require "Polycode/OSFileEntry"
-require "Polycode/OSBasics"
-require "Polycode/BezierCurve"
-require "Polycode/Bone"
-require "Polycode/Camera"
-require "Polycode/Color"
-require "Polycode/Config"
-require "Polycode/PolycodeViewBase"
-require "Polycode/Core"
-require "Polycode/CoreInput"
-require "Polycode/CoreServices"
-require "Polycode/Cubemap"
-require "Polycode/Data"
-require "Polycode/Entity"
+require "Polycode/SkeletonAnimation"
+require "Polycode/Skeleton"
+require "Polycode/BoneTrack"
+require "Polycode/TweenManager"
 require "Polycode/Event"
 require "Polycode/Event"
-require "Polycode/EventDispatcher"
 require "Polycode/EventHandler"
 require "Polycode/EventHandler"
-require "Polycode/FixedShader"
-require "Polycode/FixedShaderBinding"
-require "Polycode/Font"
-require "Polycode/FontManager"
-require "Polycode/Image"
-require "Polycode/InputEvent"
-require "Polycode/Label"
-require "Polycode/Logger"
-require "Polycode/Material"
-require "Polycode/MaterialManager"
-require "Polycode/Matrix4"
-require "Polycode/Mesh"
-require "Polycode/VertexBuffer"
-require "Polycode/PolycodeModule"
-require "Polycode/ObjectEntry"
 require "Polycode/Particle"
 require "Polycode/Particle"
-require "Polycode/ScreenParticleEmitter"
-require "Polycode/SceneParticleEmitter"
-require "Polycode/ParticleEmitter"
-require "Polycode/Perlin"
-require "Polycode/Polygon"
-require "Polycode/Quaternion"
-require "Polycode/QuaternionCurve"
-require "Polycode/Rectangle"
+require "Polycode/FontManager"
 require "Polycode/Renderer"
 require "Polycode/Renderer"
-require "Polycode/Resource"
-require "Polycode/ResourceManager"
-require "Polycode/Scene"
 require "Polycode/SceneEntity"
 require "Polycode/SceneEntity"
-require "Polycode/SceneLabel"
-require "Polycode/SceneLight"
-require "Polycode/SceneLine"
-require "Polycode/SceneManager"
-require "Polycode/SceneMesh"
+require "Polycode/Texture"
+require "Polycode/Vector3"
+require "Polycode/Scene"
+require "Polycode/Screen"
+require "Polycode/Vertex"
+require "Polycode/ScreenImage"
+require "Polycode/ResourceManager"
+require "Polycode/ScreenMesh"
 require "Polycode/ScenePrimitive"
 require "Polycode/ScenePrimitive"
-require "Polycode/SceneRenderTexture"
 require "Polycode/SceneSound"
 require "Polycode/SceneSound"
 require "Polycode/SceneSoundListener"
 require "Polycode/SceneSoundListener"
-require "Polycode/Screen"
-require "Polycode/ScreenCurve"
-require "Polycode/ScreenEntity"
+require "Polycode/Config"
+require "Polycode/QuaternionTween"
+require "Polycode/Tween"
+require "Polycode/BezierPathTween"
+require "Polycode/QuaternionCurve"
+require "Polycode/SceneManager"
+require "Polycode/Matrix4"
+require "Polycode/SceneLine"
 require "Polycode/ScreenEvent"
 require "Polycode/ScreenEvent"
-require "Polycode/ScreenImage"
+require "Polycode/Bone"
+require "Polycode/SceneMesh"
+require "Polycode/Sound"
+require "Polycode/Shader"
+require "Polycode/ShaderBinding"
+require "Polycode/ObjectEntry"
+require "Polycode/ScreenManager"
+require "Polycode/Vector2"
+require "Polycode/EventDispatcher"
+require "Polycode/SoundManager"
+require "Polycode/Logger"
+require "Polycode/Image"
+require "Polycode/Perlin"
 require "Polycode/ScreenLabel"
 require "Polycode/ScreenLabel"
+require "Polycode/Cubemap"
+require "Polycode/SceneLabel"
+require "Polycode/TimerManager"
+require "Polycode/Quaternion"
+require "Polycode/Label"
 require "Polycode/ScreenLine"
 require "Polycode/ScreenLine"
-require "Polycode/ScreenManager"
-require "Polycode/ScreenMesh"
-require "Polycode/ScreenShape"
 require "Polycode/ScreenSoundListener"
 require "Polycode/ScreenSoundListener"
 require "Polycode/ScreenSound"
 require "Polycode/ScreenSound"
-require "Polycode/ScreenSprite"
-require "Polycode/Shader"
-require "Polycode/ShaderBinding"
-require "Polycode/SkeletonAnimation"
-require "Polycode/BoneTrack"
-require "Polycode/Skeleton"
-require "Polycode/Sound"
-require "Polycode/SoundManager"
 require "Polycode/String"
 require "Polycode/String"
-require "Polycode/Texture"
+require "Polycode/PolycodeModule"
+require "Polycode/Core"
+require "Polycode/PolycodeViewBase"
+require "Polycode/InputEvent"
+require "Polycode/VertexBuffer"
+require "Polycode/Mesh"
+require "Polycode/MaterialManager"
+require "Polycode/BezierCurve"
+require "Polycode/ScreenShape"
+require "Polycode/ScreenParticleEmitter"
+require "Polycode/SceneParticleEmitter"
+require "Polycode/ParticleEmitter"
+require "Polycode/Data"
+require "Polycode/ScreenEntity"
 require "Polycode/Timer"
 require "Polycode/Timer"
-require "Polycode/TimerManager"
-require "Polycode/Tween"
-require "Polycode/BezierPathTween"
-require "Polycode/QuaternionTween"
-require "Polycode/TweenManager"
-require "Polycode/Vector2"
-require "Polycode/Vector3"
-require "Polycode/Vertex"
+require "Polycode/CoreInput"
+require "Polycode/OSFILE"
+require "Polycode/OSFileEntry"
+require "Polycode/OSBasics"
+require "Polycode/Polygon"
+require "Polycode/Font"
+require "Polycode/Entity"
+require "Polycode/Material"
+require "Polycode/Color"
+require "Polycode/ScreenCurve"
+require "Polycode/Rectangle"
+require "Polycode/CoreServices"
+require "Polycode/Resource"
+require "Polycode/SceneRenderTexture"
+require "Polycode/Camera"
+require "Polycode/ScreenSprite"
+require "Polycode/FixedShader"
+require "Polycode/FixedShaderBinding"
+require "Polycode/SceneLight"

+ 9 - 2
Bindings/Contents/LUA/API/Polycode/Bone.lua

@@ -68,12 +68,19 @@ function Bone:Bone(...)
 end
 end
 
 
 function Bone:enableBoneLabel(labelFont, size, scale, labelColor)
 function Bone:enableBoneLabel(labelFont, size, scale, labelColor)
-	local retVal = Polycore.Bone_enableBoneLabel(self.__ptr, labelFont, size, scale, labelColor.__ptr)
+	local retVal = Polycore.Bone_enableBoneLabel(self.__ptr, labelFont.__ptr, size, scale, labelColor.__ptr)
 end
 end
 
 
 function Bone:getName()
 function Bone:getName()
 	local retVal =  Polycore.Bone_getName(self.__ptr)
 	local retVal =  Polycore.Bone_getName(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function Bone:Render()
 function Bone:Render()

+ 1 - 1
Bindings/Contents/LUA/API/Polycode/Camera.lua

@@ -95,7 +95,7 @@ function Camera:createPostFilter(shaderMaterial)
 end
 end
 
 
 function Camera:setPostFilter(shaderName)
 function Camera:setPostFilter(shaderName)
-	local retVal = Polycore.Camera_setPostFilter(self.__ptr, shaderName)
+	local retVal = Polycore.Camera_setPostFilter(self.__ptr, shaderName.__ptr)
 end
 end
 
 
 function Camera:removePostFilter()
 function Camera:removePostFilter()

+ 15 - 8
Bindings/Contents/LUA/API/Polycode/Config.lua

@@ -21,15 +21,15 @@ function Config:Config(...)
 end
 end
 
 
 function Config:loadConfig(configNamespace, fileName)
 function Config:loadConfig(configNamespace, fileName)
-	local retVal = Polycore.Config_loadConfig(self.__ptr, configNamespace, fileName)
+	local retVal = Polycore.Config_loadConfig(self.__ptr, configNamespace.__ptr, fileName.__ptr)
 end
 end
 
 
 function Config:saveConfig(configNamespace, fileName)
 function Config:saveConfig(configNamespace, fileName)
-	local retVal = Polycore.Config_saveConfig(self.__ptr, configNamespace, fileName)
+	local retVal = Polycore.Config_saveConfig(self.__ptr, configNamespace.__ptr, fileName.__ptr)
 end
 end
 
 
 function Config:getEntry(configNamespace, key)
 function Config:getEntry(configNamespace, key)
-	local retVal = Polycore.Config_getEntry(self.__ptr, configNamespace, key)
+	local retVal = Polycore.Config_getEntry(self.__ptr, configNamespace.__ptr, key.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -41,21 +41,28 @@ function Config:getEntry(configNamespace, key)
 end
 end
 
 
 function Config:setStringValue(configNamespace, key, value)
 function Config:setStringValue(configNamespace, key, value)
-	local retVal = Polycore.Config_setStringValue(self.__ptr, configNamespace, key, value)
+	local retVal = Polycore.Config_setStringValue(self.__ptr, configNamespace.__ptr, key.__ptr, value.__ptr)
 end
 end
 
 
 function Config:setNumericValue(configNamespace, key, value)
 function Config:setNumericValue(configNamespace, key, value)
-	local retVal = Polycore.Config_setNumericValue(self.__ptr, configNamespace, key, value)
+	local retVal = Polycore.Config_setNumericValue(self.__ptr, configNamespace.__ptr, key.__ptr, value)
 end
 end
 
 
 function Config:getNumericValue(configNamespace, key)
 function Config:getNumericValue(configNamespace, key)
-	local retVal = Polycore.Config_getNumericValue(self.__ptr, configNamespace, key)
+	local retVal = Polycore.Config_getNumericValue(self.__ptr, configNamespace.__ptr, key.__ptr)
 	return retVal
 	return retVal
 end
 end
 
 
 function Config:getStringValue(configNamespace, key)
 function Config:getStringValue(configNamespace, key)
-	local retVal = Polycore.Config_getStringValue(self.__ptr, configNamespace, key)
-	return retVal
+	local retVal = Polycore.Config_getStringValue(self.__ptr, configNamespace.__ptr, key.__ptr)
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 
 

+ 5 - 5
Bindings/Contents/LUA/API/Polycode/Core.lua

@@ -47,7 +47,7 @@ function Core:createMutex()
 end
 end
 
 
 function Core:copyStringToClipboard(str)
 function Core:copyStringToClipboard(str)
-	local retVal = Polycore.Core_copyStringToClipboard(self.__ptr, str)
+	local retVal = Polycore.Core_copyStringToClipboard(self.__ptr, str.__ptr)
 end
 end
 
 
 function Core:getClipboardString()
 function Core:getClipboardString()
@@ -121,19 +121,19 @@ function Core:getNumVideoModes()
 end
 end
 
 
 function Core:createFolder(folderPath)
 function Core:createFolder(folderPath)
-	local retVal = Polycore.Core_createFolder(self.__ptr, folderPath)
+	local retVal = Polycore.Core_createFolder(self.__ptr, folderPath.__ptr)
 end
 end
 
 
 function Core:copyDiskItem(itemPath, destItemPath)
 function Core:copyDiskItem(itemPath, destItemPath)
-	local retVal = Polycore.Core_copyDiskItem(self.__ptr, itemPath, destItemPath)
+	local retVal = Polycore.Core_copyDiskItem(self.__ptr, itemPath.__ptr, destItemPath.__ptr)
 end
 end
 
 
 function Core:moveDiskItem(itemPath, destItemPath)
 function Core:moveDiskItem(itemPath, destItemPath)
-	local retVal = Polycore.Core_moveDiskItem(self.__ptr, itemPath, destItemPath)
+	local retVal = Polycore.Core_moveDiskItem(self.__ptr, itemPath.__ptr, destItemPath.__ptr)
 end
 end
 
 
 function Core:removeDiskItem(itemPath)
 function Core:removeDiskItem(itemPath)
-	local retVal = Polycore.Core_removeDiskItem(self.__ptr, itemPath)
+	local retVal = Polycore.Core_removeDiskItem(self.__ptr, itemPath.__ptr)
 end
 end
 
 
 function Core:openFolderPicker()
 function Core:openFolderPicker()

+ 3 - 3
Bindings/Contents/LUA/API/Polycode/Data.lua

@@ -21,7 +21,7 @@ function Data:Data(...)
 end
 end
 
 
 function Data:loadFromFile(fileName)
 function Data:loadFromFile(fileName)
-	local retVal = Polycore.Data_loadFromFile(self.__ptr, fileName)
+	local retVal = Polycore.Data_loadFromFile(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function Data:getAsString(encoding)
 function Data:getAsString(encoding)
@@ -30,11 +30,11 @@ function Data:getAsString(encoding)
 end
 end
 
 
 function Data:setFromString(str, encoding)
 function Data:setFromString(str, encoding)
-	local retVal = Polycore.Data_setFromString(self.__ptr, str, encoding)
+	local retVal = Polycore.Data_setFromString(self.__ptr, str.__ptr, encoding)
 end
 end
 
 
 function Data:saveToFile(fileName)
 function Data:saveToFile(fileName)
-	local retVal = Polycore.Data_saveToFile(self.__ptr, fileName)
+	local retVal = Polycore.Data_saveToFile(self.__ptr, fileName.__ptr)
 	return retVal
 	return retVal
 end
 end
 
 

+ 1 - 1
Bindings/Contents/LUA/API/Polycode/Entity.lua

@@ -470,7 +470,7 @@ function Entity:getChildCenter()
 end
 end
 
 
 function Entity:getEntityProp(propName)
 function Entity:getEntityProp(propName)
-	local retVal = Polycore.Entity_getEntityProp(self.__ptr, propName)
+	local retVal = Polycore.Entity_getEntityProp(self.__ptr, propName.__ptr)
 	return retVal
 	return retVal
 end
 end
 
 

+ 8 - 1
Bindings/Contents/LUA/API/Polycode/Event.lua

@@ -49,7 +49,14 @@ end
 
 
 function Event:getEventType()
 function Event:getEventType()
 	local retVal =  Polycore.Event_getEventType(self.__ptr)
 	local retVal =  Polycore.Event_getEventType(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 
 

+ 3 - 3
Bindings/Contents/LUA/API/Polycode/FixedShaderBinding.lua

@@ -29,15 +29,15 @@ function FixedShaderBinding:FixedShaderBinding(...)
 end
 end
 
 
 function FixedShaderBinding:addTexture(name, texture)
 function FixedShaderBinding:addTexture(name, texture)
-	local retVal = Polycore.FixedShaderBinding_addTexture(self.__ptr, name, texture.__ptr)
+	local retVal = Polycore.FixedShaderBinding_addTexture(self.__ptr, name.__ptr, texture.__ptr)
 end
 end
 
 
 function FixedShaderBinding:addCubemap(name, cubemap)
 function FixedShaderBinding:addCubemap(name, cubemap)
-	local retVal = Polycore.FixedShaderBinding_addCubemap(self.__ptr, name, cubemap.__ptr)
+	local retVal = Polycore.FixedShaderBinding_addCubemap(self.__ptr, name.__ptr, cubemap.__ptr)
 end
 end
 
 
 function FixedShaderBinding:addParam(type, name, value)
 function FixedShaderBinding:addParam(type, name, value)
-	local retVal = Polycore.FixedShaderBinding_addParam(self.__ptr, type, name, value)
+	local retVal = Polycore.FixedShaderBinding_addParam(self.__ptr, type.__ptr, name.__ptr, value.__ptr)
 end
 end
 
 
 function FixedShaderBinding:getDiffuseTexture()
 function FixedShaderBinding:getDiffuseTexture()

+ 2 - 2
Bindings/Contents/LUA/API/Polycode/FontManager.lua

@@ -21,11 +21,11 @@ function FontManager:FontManager(...)
 end
 end
 
 
 function FontManager:registerFont(fontName, fontPath)
 function FontManager:registerFont(fontName, fontPath)
-	local retVal = Polycore.FontManager_registerFont(self.__ptr, fontName, fontPath)
+	local retVal = Polycore.FontManager_registerFont(self.__ptr, fontName.__ptr, fontPath.__ptr)
 end
 end
 
 
 function FontManager:getFontByName(fontName)
 function FontManager:getFontByName(fontName)
-	local retVal = Polycore.FontManager_getFontByName(self.__ptr, fontName)
+	local retVal = Polycore.FontManager_getFontByName(self.__ptr, fontName.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]

+ 3 - 3
Bindings/Contents/LUA/API/Polycode/Image.lua

@@ -23,12 +23,12 @@ function Image:Image(...)
 end
 end
 
 
 function Image:loadImage(fileName)
 function Image:loadImage(fileName)
-	local retVal = Polycore.Image_loadImage(self.__ptr, fileName)
+	local retVal = Polycore.Image_loadImage(self.__ptr, fileName.__ptr)
 	return retVal
 	return retVal
 end
 end
 
 
 function Image:loadPNG(fileName)
 function Image:loadPNG(fileName)
-	local retVal = Polycore.Image_loadPNG(self.__ptr, fileName)
+	local retVal = Polycore.Image_loadPNG(self.__ptr, fileName.__ptr)
 	return retVal
 	return retVal
 end
 end
 
 
@@ -129,7 +129,7 @@ function Image:getType()
 end
 end
 
 
 function Image:writeBMP(fileName)
 function Image:writeBMP(fileName)
-	local retVal = Polycore.Image_writeBMP(self.__ptr, fileName)
+	local retVal = Polycore.Image_writeBMP(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function Image:getWidth()
 function Image:getWidth()

+ 11 - 4
Bindings/Contents/LUA/API/Polycode/Label.lua

@@ -31,21 +31,28 @@ function Label:Label(...)
 end
 end
 
 
 function Label:setText(text)
 function Label:setText(text)
-	local retVal = Polycore.Label_setText(self.__ptr, text)
+	local retVal = Polycore.Label_setText(self.__ptr, text.__ptr)
 end
 end
 
 
 function Label:getText()
 function Label:getText()
 	local retVal =  Polycore.Label_getText(self.__ptr)
 	local retVal =  Polycore.Label_getText(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function Label:getTextWidth(font, text, size)
 function Label:getTextWidth(font, text, size)
-	local retVal = Polycore.Label_getTextWidth(self.__ptr, font.__ptr, text, size)
+	local retVal = Polycore.Label_getTextWidth(self.__ptr, font.__ptr, text.__ptr, size)
 	return retVal
 	return retVal
 end
 end
 
 
 function Label:getTextHeight(font, text, size)
 function Label:getTextHeight(font, text, size)
-	local retVal = Polycore.Label_getTextHeight(self.__ptr, font.__ptr, text, size)
+	local retVal = Polycore.Label_getTextHeight(self.__ptr, font.__ptr, text.__ptr, size)
 	return retVal
 	return retVal
 end
 end
 
 

+ 9 - 2
Bindings/Contents/LUA/API/Polycode/Material.lua

@@ -90,7 +90,14 @@ end
 
 
 function Material:getName()
 function Material:getName()
 	local retVal =  Polycore.Material_getName(self.__ptr)
 	local retVal =  Polycore.Material_getName(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function Material:getShader(index)
 function Material:getShader(index)
@@ -118,7 +125,7 @@ function Material:getShaderBinding(index)
 end
 end
 
 
 function Material:loadMaterial(fileName)
 function Material:loadMaterial(fileName)
-	local retVal = Polycore.Material_loadMaterial(self.__ptr, fileName)
+	local retVal = Polycore.Material_loadMaterial(self.__ptr, fileName.__ptr)
 end
 end
 
 
 
 

+ 2 - 2
Bindings/Contents/LUA/API/Polycode/MaterialManager.lua

@@ -73,7 +73,7 @@ function MaterialManager:createTextureFromImage(image, clamp)
 end
 end
 
 
 function MaterialManager:createTextureFromFile(fileName, clamp)
 function MaterialManager:createTextureFromFile(fileName, clamp)
-	local retVal = Polycore.MaterialManager_createTextureFromFile(self.__ptr, fileName, clamp)
+	local retVal = Polycore.MaterialManager_createTextureFromFile(self.__ptr, fileName.__ptr, clamp)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -105,7 +105,7 @@ function MaterialManager:addShaderModule(module)
 end
 end
 
 
 function MaterialManager:getTextureByResourcePath(resourcePath)
 function MaterialManager:getTextureByResourcePath(resourcePath)
-	local retVal = Polycore.MaterialManager_getTextureByResourcePath(self.__ptr, resourcePath)
+	local retVal = Polycore.MaterialManager_getTextureByResourcePath(self.__ptr, resourcePath.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]

+ 2 - 2
Bindings/Contents/LUA/API/Polycode/Mesh.lua

@@ -43,11 +43,11 @@ function Mesh:addPolygon(newPolygon)
 end
 end
 
 
 function Mesh:loadMesh(fileName)
 function Mesh:loadMesh(fileName)
-	local retVal = Polycore.Mesh_loadMesh(self.__ptr, fileName)
+	local retVal = Polycore.Mesh_loadMesh(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function Mesh:saveToFile(fileName)
 function Mesh:saveToFile(fileName)
-	local retVal = Polycore.Mesh_saveToFile(self.__ptr, fileName)
+	local retVal = Polycore.Mesh_saveToFile(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function Mesh:loadFromFile(inFile)
 function Mesh:loadFromFile(inFile)

+ 4 - 4
Bindings/Contents/LUA/API/Polycode/OSBasics.lua

@@ -7,7 +7,7 @@ class "OSBasics"
 
 
 
 
 function OSBasics:open(filename, opts)
 function OSBasics:open(filename, opts)
-	local retVal = Polycore.OSBasics_open(filename, opts)
+	local retVal = Polycore.OSBasics_open(filename.__ptr, opts.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -44,16 +44,16 @@ function OSBasics:tell(stream)
 end
 end
 
 
 function OSBasics:isFolder(pathString)
 function OSBasics:isFolder(pathString)
-	local retVal = Polycore.OSBasics_isFolder(pathString)
+	local retVal = Polycore.OSBasics_isFolder(pathString.__ptr)
 	return retVal
 	return retVal
 end
 end
 
 
 function OSBasics:createFolder(pathString)
 function OSBasics:createFolder(pathString)
-	local retVal = Polycore.OSBasics_createFolder(pathString)
+	local retVal = Polycore.OSBasics_createFolder(pathString.__ptr)
 end
 end
 
 
 function OSBasics:removeItem(pathString)
 function OSBasics:removeItem(pathString)
-	local retVal = Polycore.OSBasics_removeItem(pathString)
+	local retVal = Polycore.OSBasics_removeItem(pathString.__ptr)
 end
 end
 
 
 
 

+ 41 - 21
Bindings/Contents/LUA/API/Polycode/OSFileEntry.lua

@@ -6,15 +6,50 @@ TYPE_FILE = 0
 TYPE_FOLDER = 1
 TYPE_FOLDER = 1
 function OSFileEntry:__index__(name)
 function OSFileEntry:__index__(name)
 	if name == "name" then
 	if name == "name" then
-		return Polycore.OSFileEntry_get_name(self.__ptr)
+		retVal = Polycore.OSFileEntry_get_name(self.__ptr)
+		if Polycore.__ptr_lookup[retVal] ~= nil then
+			return Polycore.__ptr_lookup[retVal]
+		else
+			Polycore.__ptr_lookup[retVal] = Polycode::String("__skip_ptr__")
+			Polycore.__ptr_lookup[retVal].__ptr = retVal
+			return Polycore.__ptr_lookup[retVal]
+		end
 	elseif name == "extension" then
 	elseif name == "extension" then
-		return Polycore.OSFileEntry_get_extension(self.__ptr)
+		retVal = Polycore.OSFileEntry_get_extension(self.__ptr)
+		if Polycore.__ptr_lookup[retVal] ~= nil then
+			return Polycore.__ptr_lookup[retVal]
+		else
+			Polycore.__ptr_lookup[retVal] = Polycode::String("__skip_ptr__")
+			Polycore.__ptr_lookup[retVal].__ptr = retVal
+			return Polycore.__ptr_lookup[retVal]
+		end
 	elseif name == "nameWithoutExtension" then
 	elseif name == "nameWithoutExtension" then
-		return Polycore.OSFileEntry_get_nameWithoutExtension(self.__ptr)
+		retVal = Polycore.OSFileEntry_get_nameWithoutExtension(self.__ptr)
+		if Polycore.__ptr_lookup[retVal] ~= nil then
+			return Polycore.__ptr_lookup[retVal]
+		else
+			Polycore.__ptr_lookup[retVal] = Polycode::String("__skip_ptr__")
+			Polycore.__ptr_lookup[retVal].__ptr = retVal
+			return Polycore.__ptr_lookup[retVal]
+		end
 	elseif name == "basePath" then
 	elseif name == "basePath" then
-		return Polycore.OSFileEntry_get_basePath(self.__ptr)
+		retVal = Polycore.OSFileEntry_get_basePath(self.__ptr)
+		if Polycore.__ptr_lookup[retVal] ~= nil then
+			return Polycore.__ptr_lookup[retVal]
+		else
+			Polycore.__ptr_lookup[retVal] = Polycode::String("__skip_ptr__")
+			Polycore.__ptr_lookup[retVal].__ptr = retVal
+			return Polycore.__ptr_lookup[retVal]
+		end
 	elseif name == "fullPath" then
 	elseif name == "fullPath" then
-		return Polycore.OSFileEntry_get_fullPath(self.__ptr)
+		retVal = Polycore.OSFileEntry_get_fullPath(self.__ptr)
+		if Polycore.__ptr_lookup[retVal] ~= nil then
+			return Polycore.__ptr_lookup[retVal]
+		else
+			Polycore.__ptr_lookup[retVal] = Polycode::String("__skip_ptr__")
+			Polycore.__ptr_lookup[retVal].__ptr = retVal
+			return Polycore.__ptr_lookup[retVal]
+		end
 	elseif name == "type" then
 	elseif name == "type" then
 		return Polycore.OSFileEntry_get_type(self.__ptr)
 		return Polycore.OSFileEntry_get_type(self.__ptr)
 	end
 	end
@@ -22,22 +57,7 @@ end
 
 
 
 
 function OSFileEntry:__set_callback(name,value)
 function OSFileEntry:__set_callback(name,value)
-	if name == "name" then
-		Polycore.OSFileEntry_set_name(self.__ptr, value)
-		return true
-	elseif name == "extension" then
-		Polycore.OSFileEntry_set_extension(self.__ptr, value)
-		return true
-	elseif name == "nameWithoutExtension" then
-		Polycore.OSFileEntry_set_nameWithoutExtension(self.__ptr, value)
-		return true
-	elseif name == "basePath" then
-		Polycore.OSFileEntry_set_basePath(self.__ptr, value)
-		return true
-	elseif name == "fullPath" then
-		Polycore.OSFileEntry_set_fullPath(self.__ptr, value)
-		return true
-	elseif name == "type" then
+	if name == "type" then
 		Polycore.OSFileEntry_set_type(self.__ptr, value)
 		Polycore.OSFileEntry_set_type(self.__ptr, value)
 		return true
 		return true
 	end
 	end

+ 1 - 1
Bindings/Contents/LUA/API/Polycode/ObjectEntry.lua

@@ -69,7 +69,7 @@ function ObjectEntry:ObjectEntry(...)
 end
 end
 
 
 function ObjectEntry:addChild(name)
 function ObjectEntry:addChild(name)
-	local retVal = Polycore.ObjectEntry_addChild(self.__ptr, name)
+	local retVal = Polycore.ObjectEntry_addChild(self.__ptr, name.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]

+ 18 - 4
Bindings/Contents/LUA/API/Polycode/Resource.lua

@@ -28,7 +28,14 @@ end
 
 
 function Resource:getResourceName()
 function Resource:getResourceName()
 	local retVal =  Polycore.Resource_getResourceName(self.__ptr)
 	local retVal =  Polycore.Resource_getResourceName(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function Resource:getResourceType()
 function Resource:getResourceType()
@@ -37,16 +44,23 @@ function Resource:getResourceType()
 end
 end
 
 
 function Resource:setResourceName(newName)
 function Resource:setResourceName(newName)
-	local retVal = Polycore.Resource_setResourceName(self.__ptr, newName)
+	local retVal = Polycore.Resource_setResourceName(self.__ptr, newName.__ptr)
 end
 end
 
 
 function Resource:setResourcePath(path)
 function Resource:setResourcePath(path)
-	local retVal = Polycore.Resource_setResourcePath(self.__ptr, path)
+	local retVal = Polycore.Resource_setResourcePath(self.__ptr, path.__ptr)
 end
 end
 
 
 function Resource:getResourcePath()
 function Resource:getResourcePath()
 	local retVal =  Polycore.Resource_getResourcePath(self.__ptr)
 	local retVal =  Polycore.Resource_getResourcePath(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 
 

+ 10 - 10
Bindings/Contents/LUA/API/Polycode/ResourceManager.lua

@@ -25,44 +25,44 @@ function ResourceManager:addResource(resource)
 end
 end
 
 
 function ResourceManager:addDirResource(dirPath, recursive)
 function ResourceManager:addDirResource(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_addDirResource(self.__ptr, dirPath, recursive)
+	local retVal = Polycore.ResourceManager_addDirResource(self.__ptr, dirPath.__ptr, recursive)
 end
 end
 
 
 function ResourceManager:addArchive(zipPath)
 function ResourceManager:addArchive(zipPath)
-	local retVal = Polycore.ResourceManager_addArchive(self.__ptr, zipPath)
+	local retVal = Polycore.ResourceManager_addArchive(self.__ptr, zipPath.__ptr)
 end
 end
 
 
 function ResourceManager:readFile(fileName)
 function ResourceManager:readFile(fileName)
-	local retVal = Polycore.ResourceManager_readFile(self.__ptr, fileName)
+	local retVal = Polycore.ResourceManager_readFile(self.__ptr, fileName.__ptr)
 	return retVal
 	return retVal
 end
 end
 
 
 function ResourceManager:parseTextures(dirPath, recursive)
 function ResourceManager:parseTextures(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseTextures(self.__ptr, dirPath, recursive)
+	local retVal = Polycore.ResourceManager_parseTextures(self.__ptr, dirPath.__ptr, recursive)
 end
 end
 
 
 function ResourceManager:parseMaterials(dirPath, recursive)
 function ResourceManager:parseMaterials(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseMaterials(self.__ptr, dirPath, recursive)
+	local retVal = Polycore.ResourceManager_parseMaterials(self.__ptr, dirPath.__ptr, recursive)
 end
 end
 
 
 function ResourceManager:parseShaders(dirPath, recursive)
 function ResourceManager:parseShaders(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseShaders(self.__ptr, dirPath, recursive)
+	local retVal = Polycore.ResourceManager_parseShaders(self.__ptr, dirPath.__ptr, recursive)
 end
 end
 
 
 function ResourceManager:parsePrograms(dirPath, recursive)
 function ResourceManager:parsePrograms(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parsePrograms(self.__ptr, dirPath, recursive)
+	local retVal = Polycore.ResourceManager_parsePrograms(self.__ptr, dirPath.__ptr, recursive)
 end
 end
 
 
 function ResourceManager:parseCubemaps(dirPath, recursive)
 function ResourceManager:parseCubemaps(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseCubemaps(self.__ptr, dirPath, recursive)
+	local retVal = Polycore.ResourceManager_parseCubemaps(self.__ptr, dirPath.__ptr, recursive)
 end
 end
 
 
 function ResourceManager:parseOthers(dirPath, recursive)
 function ResourceManager:parseOthers(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseOthers(self.__ptr, dirPath, recursive)
+	local retVal = Polycore.ResourceManager_parseOthers(self.__ptr, dirPath.__ptr, recursive)
 end
 end
 
 
 function ResourceManager:getResource(resourceType, resourceName)
 function ResourceManager:getResource(resourceType, resourceName)
-	local retVal = Polycore.ResourceManager_getResource(self.__ptr, resourceType, resourceName)
+	local retVal = Polycore.ResourceManager_getResource(self.__ptr, resourceType, resourceName.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]

+ 4 - 4
Bindings/Contents/LUA/API/Polycode/Scene.lua

@@ -174,7 +174,7 @@ function Scene:readString(inFile)
 end
 end
 
 
 function Scene:loadScene(fileName)
 function Scene:loadScene(fileName)
-	local retVal = Polycore.Scene_loadScene(self.__ptr, fileName)
+	local retVal = Polycore.Scene_loadScene(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function Scene:generateLightmaps(lightMapRes, lightMapQuality, numRadPasses)
 function Scene:generateLightmaps(lightMapRes, lightMapQuality, numRadPasses)
@@ -206,11 +206,11 @@ function Scene:writeEntityMatrix(entity, outFile)
 end
 end
 
 
 function Scene:writeString(str, outFile)
 function Scene:writeString(str, outFile)
-	local retVal = Polycore.Scene_writeString(self.__ptr, str, outFile.__ptr)
+	local retVal = Polycore.Scene_writeString(self.__ptr, str.__ptr, outFile.__ptr)
 end
 end
 
 
 function Scene:saveScene(fileName)
 function Scene:saveScene(fileName)
-	local retVal = Polycore.Scene_saveScene(self.__ptr, fileName)
+	local retVal = Polycore.Scene_saveScene(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function Scene:getNumStaticGeometry()
 function Scene:getNumStaticGeometry()
@@ -252,7 +252,7 @@ function Scene:getLight(index)
 end
 end
 
 
 function Scene:getCustomEntityByType(type)
 function Scene:getCustomEntityByType(type)
-	local retVal = Polycore.Scene_getCustomEntityByType(self.__ptr, type)
+	local retVal = Polycore.Scene_getCustomEntityByType(self.__ptr, type.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]

+ 1 - 1
Bindings/Contents/LUA/API/Polycode/SceneLabel.lua

@@ -34,7 +34,7 @@ function SceneLabel:testMouseCollision(x, y)
 end
 end
 
 
 function SceneLabel:setText(newText)
 function SceneLabel:setText(newText)
-	local retVal = Polycore.SceneLabel_setText(self.__ptr, newText)
+	local retVal = Polycore.SceneLabel_setText(self.__ptr, newText.__ptr)
 end
 end
 
 
 function SceneLabel:getLabel()
 function SceneLabel:getLabel()

+ 3 - 3
Bindings/Contents/LUA/API/Polycode/SceneMesh.lua

@@ -102,11 +102,11 @@ function SceneMesh:getMaterial()
 end
 end
 
 
 function SceneMesh:loadTexture(fileName, clamp)
 function SceneMesh:loadTexture(fileName, clamp)
-	local retVal = Polycore.SceneMesh_loadTexture(self.__ptr, fileName, clamp)
+	local retVal = Polycore.SceneMesh_loadTexture(self.__ptr, fileName.__ptr, clamp)
 end
 end
 
 
 function SceneMesh:loadSkeleton(fileName)
 function SceneMesh:loadSkeleton(fileName)
-	local retVal = Polycore.SceneMesh_loadSkeleton(self.__ptr, fileName)
+	local retVal = Polycore.SceneMesh_loadSkeleton(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function SceneMesh:setTexture(texture)
 function SceneMesh:setTexture(texture)
@@ -118,7 +118,7 @@ function SceneMesh:setMaterial(material)
 end
 end
 
 
 function SceneMesh:setMaterialByName(materialName)
 function SceneMesh:setMaterialByName(materialName)
-	local retVal = Polycore.SceneMesh_setMaterialByName(self.__ptr, materialName)
+	local retVal = Polycore.SceneMesh_setMaterialByName(self.__ptr, materialName.__ptr)
 end
 end
 
 
 function SceneMesh:setMesh(mesh)
 function SceneMesh:setMesh(mesh)

+ 1 - 1
Bindings/Contents/LUA/API/Polycode/Screen.lua

@@ -113,7 +113,7 @@ function Screen:setNormalizedCoordinates(newVal, yCoordinateSize)
 end
 end
 
 
 function Screen:setScreenShader(shaderName)
 function Screen:setScreenShader(shaderName)
-	local retVal = Polycore.Screen_setScreenShader(self.__ptr, shaderName)
+	local retVal = Polycore.Screen_setScreenShader(self.__ptr, shaderName.__ptr)
 end
 end
 
 
 function Screen:clearScreenShader()
 function Screen:clearScreenShader()

+ 9 - 2
Bindings/Contents/LUA/API/Polycode/ScreenLabel.lua

@@ -33,12 +33,19 @@ function ScreenLabel:addDropShadow(color, size, offsetX, offsetY)
 end
 end
 
 
 function ScreenLabel:setText(newText)
 function ScreenLabel:setText(newText)
-	local retVal = Polycore.ScreenLabel_setText(self.__ptr, newText)
+	local retVal = Polycore.ScreenLabel_setText(self.__ptr, newText.__ptr)
 end
 end
 
 
 function ScreenLabel:getText()
 function ScreenLabel:getText()
 	local retVal =  Polycore.ScreenLabel_getText(self.__ptr)
 	local retVal =  Polycore.ScreenLabel_getText(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function ScreenLabel:getLabel()
 function ScreenLabel:getLabel()

+ 1 - 1
Bindings/Contents/LUA/API/Polycode/ScreenMesh.lua

@@ -57,7 +57,7 @@ function ScreenMesh:getTexture()
 end
 end
 
 
 function ScreenMesh:loadTexture(fileName)
 function ScreenMesh:loadTexture(fileName)
-	local retVal = Polycore.ScreenMesh_loadTexture(self.__ptr, fileName)
+	local retVal = Polycore.ScreenMesh_loadTexture(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function ScreenMesh:setTexture(texture)
 function ScreenMesh:setTexture(texture)

+ 2 - 2
Bindings/Contents/LUA/API/Polycode/ScreenSprite.lua

@@ -29,11 +29,11 @@ function ScreenSprite:ScreenSprite(...)
 end
 end
 
 
 function ScreenSprite:addAnimation(name, frames, speed)
 function ScreenSprite:addAnimation(name, frames, speed)
-	local retVal = Polycore.ScreenSprite_addAnimation(self.__ptr, name, frames, speed)
+	local retVal = Polycore.ScreenSprite_addAnimation(self.__ptr, name.__ptr, frames.__ptr, speed)
 end
 end
 
 
 function ScreenSprite:playAnimation(name, startFrame, once)
 function ScreenSprite:playAnimation(name, startFrame, once)
-	local retVal = Polycore.ScreenSprite_playAnimation(self.__ptr, name, startFrame, once)
+	local retVal = Polycore.ScreenSprite_playAnimation(self.__ptr, name.__ptr, startFrame, once)
 end
 end
 
 
 function ScreenSprite:Update()
 function ScreenSprite:Update()

+ 9 - 2
Bindings/Contents/LUA/API/Polycode/Shader.lua

@@ -33,12 +33,19 @@ function Shader:getType()
 end
 end
 
 
 function Shader:setName(name)
 function Shader:setName(name)
-	local retVal = Polycore.Shader_setName(self.__ptr, name)
+	local retVal = Polycore.Shader_setName(self.__ptr, name.__ptr)
 end
 end
 
 
 function Shader:getName()
 function Shader:getName()
 	local retVal =  Polycore.Shader_getName(self.__ptr)
 	local retVal =  Polycore.Shader_getName(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function Shader:createBinding()
 function Shader:createBinding()

+ 6 - 6
Bindings/Contents/LUA/API/Polycode/ShaderBinding.lua

@@ -21,19 +21,19 @@ function ShaderBinding:ShaderBinding(...)
 end
 end
 
 
 function ShaderBinding:clearTexture(name)
 function ShaderBinding:clearTexture(name)
-	local retVal = Polycore.ShaderBinding_clearTexture(self.__ptr, name)
+	local retVal = Polycore.ShaderBinding_clearTexture(self.__ptr, name.__ptr)
 end
 end
 
 
 function ShaderBinding:addTexture(name, texture)
 function ShaderBinding:addTexture(name, texture)
-	local retVal = Polycore.ShaderBinding_addTexture(self.__ptr, name, texture.__ptr)
+	local retVal = Polycore.ShaderBinding_addTexture(self.__ptr, name.__ptr, texture.__ptr)
 end
 end
 
 
 function ShaderBinding:addParam(type, name, value)
 function ShaderBinding:addParam(type, name, value)
-	local retVal = Polycore.ShaderBinding_addParam(self.__ptr, type, name, value)
+	local retVal = Polycore.ShaderBinding_addParam(self.__ptr, type.__ptr, name.__ptr, value.__ptr)
 end
 end
 
 
 function ShaderBinding:addCubemap(name, cubemap)
 function ShaderBinding:addCubemap(name, cubemap)
-	local retVal = Polycore.ShaderBinding_addCubemap(self.__ptr, name, cubemap.__ptr)
+	local retVal = Polycore.ShaderBinding_addCubemap(self.__ptr, name.__ptr, cubemap.__ptr)
 end
 end
 
 
 function ShaderBinding:getNumLocalParams()
 function ShaderBinding:getNumLocalParams()
@@ -54,7 +54,7 @@ function ShaderBinding:getLocalParam(index)
 end
 end
 
 
 function ShaderBinding:getLocalParamByName(name)
 function ShaderBinding:getLocalParamByName(name)
-	local retVal = Polycore.ShaderBinding_getLocalParamByName(self.__ptr, name)
+	local retVal = Polycore.ShaderBinding_getLocalParamByName(self.__ptr, name.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -121,7 +121,7 @@ function ShaderBinding:getOutTargetBinding(index)
 end
 end
 
 
 function ShaderBinding:addLocalParam(name, ptr)
 function ShaderBinding:addLocalParam(name, ptr)
-	local retVal = Polycore.ShaderBinding_addLocalParam(self.__ptr, name, ptr.__ptr)
+	local retVal = Polycore.ShaderBinding_addLocalParam(self.__ptr, name.__ptr, ptr.__ptr)
 end
 end
 
 
 
 

+ 6 - 6
Bindings/Contents/LUA/API/Polycode/Skeleton.lua

@@ -29,11 +29,11 @@ function Skeleton:Skeleton(...)
 end
 end
 
 
 function Skeleton:loadSkeleton(fileName)
 function Skeleton:loadSkeleton(fileName)
-	local retVal = Polycore.Skeleton_loadSkeleton(self.__ptr, fileName)
+	local retVal = Polycore.Skeleton_loadSkeleton(self.__ptr, fileName.__ptr)
 end
 end
 
 
 function Skeleton:playAnimation(animName, once)
 function Skeleton:playAnimation(animName, once)
-	local retVal = Polycore.Skeleton_playAnimation(self.__ptr, animName, once)
+	local retVal = Polycore.Skeleton_playAnimation(self.__ptr, animName.__ptr, once)
 end
 end
 
 
 function Skeleton:playAnimationByIndex(index, once)
 function Skeleton:playAnimationByIndex(index, once)
@@ -41,11 +41,11 @@ function Skeleton:playAnimationByIndex(index, once)
 end
 end
 
 
 function Skeleton:addAnimation(name, fileName)
 function Skeleton:addAnimation(name, fileName)
-	local retVal = Polycore.Skeleton_addAnimation(self.__ptr, name, fileName)
+	local retVal = Polycore.Skeleton_addAnimation(self.__ptr, name.__ptr, fileName.__ptr)
 end
 end
 
 
 function Skeleton:getAnimation(name)
 function Skeleton:getAnimation(name)
-	local retVal = Polycore.Skeleton_getAnimation(self.__ptr, name)
+	local retVal = Polycore.Skeleton_getAnimation(self.__ptr, name.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -61,7 +61,7 @@ function Skeleton:Update()
 end
 end
 
 
 function Skeleton:getBoneByName(name)
 function Skeleton:getBoneByName(name)
-	local retVal = Polycore.Skeleton_getBoneByName(self.__ptr, name)
+	local retVal = Polycore.Skeleton_getBoneByName(self.__ptr, name.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -77,7 +77,7 @@ function Skeleton:bonesVisible(val)
 end
 end
 
 
 function Skeleton:enableBoneLabels(labelFont, size, scale, labelColor)
 function Skeleton:enableBoneLabels(labelFont, size, scale, labelColor)
-	local retVal = Polycore.Skeleton_enableBoneLabels(self.__ptr, labelFont, size, scale, labelColor.__ptr)
+	local retVal = Polycore.Skeleton_enableBoneLabels(self.__ptr, labelFont.__ptr, size, scale, labelColor.__ptr)
 end
 end
 
 
 function Skeleton:getNumBones()
 function Skeleton:getNumBones()

+ 8 - 1
Bindings/Contents/LUA/API/Polycode/SkeletonAnimation.lua

@@ -26,7 +26,14 @@ end
 
 
 function SkeletonAnimation:getName()
 function SkeletonAnimation:getName()
 	local retVal =  Polycore.SkeletonAnimation_getName(self.__ptr)
 	local retVal =  Polycore.SkeletonAnimation_getName(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function SkeletonAnimation:Play(once)
 function SkeletonAnimation:Play(once)

+ 5 - 5
Bindings/Contents/LUA/API/Polycode/Sound.lua

@@ -57,7 +57,7 @@ function Sound:setPositionalProperties(referenceDistance, maxDistance)
 end
 end
 
 
 function Sound:loadWAV(fileName)
 function Sound:loadWAV(fileName)
-	local retVal = Polycore.Sound_loadWAV(self.__ptr, fileName)
+	local retVal = Polycore.Sound_loadWAV(self.__ptr, fileName.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -69,7 +69,7 @@ function Sound:loadWAV(fileName)
 end
 end
 
 
 function Sound:loadOGG(fileName)
 function Sound:loadOGG(fileName)
-	local retVal = Polycore.Sound_loadOGG(self.__ptr, fileName)
+	local retVal = Polycore.Sound_loadOGG(self.__ptr, fileName.__ptr)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 	if Polycore.__ptr_lookup[retVal] ~= nil then
 		return Polycore.__ptr_lookup[retVal]
 		return Polycore.__ptr_lookup[retVal]
@@ -93,15 +93,15 @@ function Sound:GenSource(buffer)
 end
 end
 
 
 function Sound:checkALError(operation)
 function Sound:checkALError(operation)
-	local retVal = Polycore.Sound_checkALError(self.__ptr, operation)
+	local retVal = Polycore.Sound_checkALError(self.__ptr, operation.__ptr)
 end
 end
 
 
 function Sound:soundError(err)
 function Sound:soundError(err)
-	local retVal = Polycore.Sound_soundError(self.__ptr, err)
+	local retVal = Polycore.Sound_soundError(self.__ptr, err.__ptr)
 end
 end
 
 
 function Sound:soundCheck(result, err)
 function Sound:soundCheck(result, err)
-	local retVal = Polycore.Sound_soundCheck(self.__ptr, result, err)
+	local retVal = Polycore.Sound_soundCheck(self.__ptr, result, err.__ptr)
 end
 end
 
 
 
 

+ 1 - 58
Bindings/Contents/LUA/API/Polycode/String.lua

@@ -9,16 +9,7 @@ function String:__index__(name)
 		if Polycore.__ptr_lookup[retVal] ~= nil then
 		if Polycore.__ptr_lookup[retVal] ~= nil then
 			return Polycore.__ptr_lookup[retVal]
 			return Polycore.__ptr_lookup[retVal]
 		else
 		else
-			Polycore.__ptr_lookup[retVal] = wstring("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "s_contents" then
-		retVal = Polycore.String_get_s_contents(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = string("__skip_ptr__")
+			Polycore.__ptr_lookup[retVal] = std::string("__skip_ptr__")
 			Polycore.__ptr_lookup[retVal].__ptr = retVal
 			Polycore.__ptr_lookup[retVal].__ptr = retVal
 			return Polycore.__ptr_lookup[retVal]
 			return Polycore.__ptr_lookup[retVal]
 		end
 		end
@@ -55,30 +46,6 @@ function String:length()
 	return retVal
 	return retVal
 end
 end
 
 
-function String:getSTLString()
-	local retVal =  Polycore.String_getSTLString(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = string("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function String:getSTLWString()
-	local retVal =  Polycore.String_getSTLWString(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = wstring("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
 function String:substr(pos, n)
 function String:substr(pos, n)
 	local retVal = Polycore.String_substr(self.__ptr, pos.__ptr, n.__ptr)
 	local retVal = Polycore.String_substr(self.__ptr, pos.__ptr, n.__ptr)
 	return retVal
 	return retVal
@@ -136,30 +103,6 @@ function String:c_str()
 	end
 	end
 end
 end
 
 
-function String:wc_str()
-	local retVal =  Polycore.String_wc_str(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = wchar_t("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function String:data()
-	local retVal =  Polycore.String_data(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = wchar_t("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
 function String:getDataWithEncoding(encoding)
 function String:getDataWithEncoding(encoding)
 	local retVal = Polycore.String_getDataWithEncoding(self.__ptr, encoding)
 	local retVal = Polycore.String_getDataWithEncoding(self.__ptr, encoding)
 	if retVal == nil then return nil end
 	if retVal == nil then return nil end

+ 9 - 2
Bindings/Contents/LUA/API/Polycode/Texture.lua

@@ -57,12 +57,19 @@ function Texture:updateScroll(elapsed)
 end
 end
 
 
 function Texture:setResourcePath(newPath)
 function Texture:setResourcePath(newPath)
-	local retVal = Polycore.Texture_setResourcePath(self.__ptr, newPath)
+	local retVal = Polycore.Texture_setResourcePath(self.__ptr, newPath.__ptr)
 end
 end
 
 
 function Texture:getResourcePath()
 function Texture:getResourcePath()
 	local retVal =  Polycore.Texture_getResourcePath(self.__ptr)
 	local retVal =  Polycore.Texture_getResourcePath(self.__ptr)
-	return retVal
+	if retVal == nil then return nil end
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
 end
 end
 
 
 function Texture:getTextureData()
 function Texture:getTextureData()

+ 0 - 1
Bindings/Contents/LUA/Include/PolycodeLUA.h

@@ -1,6 +1,5 @@
 #pragma once
 #pragma once
 #include <Polycode.h>
 #include <Polycode.h>
-#include "PolycodeLUAWrappers.h"
 extern "C" {
 extern "C" {
 #include <stdio.h>
 #include <stdio.h>
 #include "lua.h"
 #include "lua.h"

Разница между файлами не показана из-за своего большого размера
+ 535 - 476
Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h


+ 980 - 987
Bindings/Contents/LUA/Source/PolycodeLUA.cpp

@@ -1,299 +1,54 @@
 #include "PolycodeLUA.h"
 #include "PolycodeLUA.h"
 #include "PolycodeLUAWrappers.h"
 #include "PolycodeLUAWrappers.h"
+#include "PolyCoreServices.h"
+
+using namespace Polycode;
 
 
 int luaopen_Polycode(lua_State *L) {
 int luaopen_Polycode(lua_State *L) {
-	static const struct luaL_reg polycoreLib [] = {		{"OSFILE_get_fileType", Polycore_OSFILE_get_fileType},
-		{"OSFILE_set_fileType", Polycore_OSFILE_set_fileType},
-		{"OSFILE", Polycore_OSFILE},
-		{"OSFILE_debugDump", Polycore_OSFILE_debugDump},
-		{"delete_OSFILE", Polycore_delete_OSFILE},
-		{"OSFileEntry_get_name", Polycore_OSFileEntry_get_name},
-		{"OSFileEntry_get_extension", Polycore_OSFileEntry_get_extension},
-		{"OSFileEntry_get_nameWithoutExtension", Polycore_OSFileEntry_get_nameWithoutExtension},
-		{"OSFileEntry_get_basePath", Polycore_OSFileEntry_get_basePath},
-		{"OSFileEntry_get_fullPath", Polycore_OSFileEntry_get_fullPath},
-		{"OSFileEntry_get_type", Polycore_OSFileEntry_get_type},
-		{"OSFileEntry_set_name", Polycore_OSFileEntry_set_name},
-		{"OSFileEntry_set_extension", Polycore_OSFileEntry_set_extension},
-		{"OSFileEntry_set_nameWithoutExtension", Polycore_OSFileEntry_set_nameWithoutExtension},
-		{"OSFileEntry_set_basePath", Polycore_OSFileEntry_set_basePath},
-		{"OSFileEntry_set_fullPath", Polycore_OSFileEntry_set_fullPath},
-		{"OSFileEntry_set_type", Polycore_OSFileEntry_set_type},
-		{"OSFileEntry", Polycore_OSFileEntry},
-		{"delete_OSFileEntry", Polycore_delete_OSFileEntry},
-		{"OSBasics_open", Polycore_OSBasics_open},
-		{"OSBasics_close", Polycore_OSBasics_close},
-		{"OSBasics_read", Polycore_OSBasics_read},
-		{"OSBasics_write", Polycore_OSBasics_write},
-		{"OSBasics_seek", Polycore_OSBasics_seek},
-		{"OSBasics_tell", Polycore_OSBasics_tell},
-		{"OSBasics_isFolder", Polycore_OSBasics_isFolder},
-		{"OSBasics_createFolder", Polycore_OSBasics_createFolder},
-		{"OSBasics_removeItem", Polycore_OSBasics_removeItem},
-		{"delete_OSBasics", Polycore_delete_OSBasics},
-		{"BezierCurve", Polycore_BezierCurve},
-		{"BezierCurve_getControlPoint", Polycore_BezierCurve_getControlPoint},
-		{"BezierCurve_getNumControlPoints", Polycore_BezierCurve_getNumControlPoints},
-		{"BezierCurve_addControlPoint", Polycore_BezierCurve_addControlPoint},
-		{"BezierCurve_addControlPoint3dWithHandles", Polycore_BezierCurve_addControlPoint3dWithHandles},
-		{"BezierCurve_addControlPoint3d", Polycore_BezierCurve_addControlPoint3d},
-		{"BezierCurve_addControlPoint2dWithHandles", Polycore_BezierCurve_addControlPoint2dWithHandles},
-		{"BezierCurve_addControlPoint2d", Polycore_BezierCurve_addControlPoint2d},
-		{"BezierCurve_getHeightAt", Polycore_BezierCurve_getHeightAt},
-		{"BezierCurve_getPointAt", Polycore_BezierCurve_getPointAt},
-		{"BezierCurve_getPointBetween", Polycore_BezierCurve_getPointBetween},
-		{"BezierCurve_rebuildBuffers", Polycore_BezierCurve_rebuildBuffers},
-		{"delete_BezierCurve", Polycore_delete_BezierCurve},
-		{"Bone_get_parentBoneId", Polycore_Bone_get_parentBoneId},
-		{"Bone_get_boneMatrix", Polycore_Bone_get_boneMatrix},
-		{"Bone_get_restMatrix", Polycore_Bone_get_restMatrix},
-		{"Bone_get_baseMatrix", Polycore_Bone_get_baseMatrix},
-		{"Bone_set_parentBoneId", Polycore_Bone_set_parentBoneId},
-		{"Bone", Polycore_Bone},
-		{"Bone_enableBoneLabel", Polycore_Bone_enableBoneLabel},
-		{"Bone_getName", Polycore_Bone_getName},
-		{"Bone_Render", Polycore_Bone_Render},
-		{"Bone_setParentBone", Polycore_Bone_setParentBone},
-		{"Bone_addChildBone", Polycore_Bone_addChildBone},
-		{"Bone_getParentBone", Polycore_Bone_getParentBone},
-		{"Bone_getNumChildBones", Polycore_Bone_getNumChildBones},
-		{"Bone_getChildBone", Polycore_Bone_getChildBone},
-		{"Bone_getBoneMatrix", Polycore_Bone_getBoneMatrix},
-		{"Bone_setBoneMatrix", Polycore_Bone_setBoneMatrix},
-		{"Bone_getRestMatrix", Polycore_Bone_getRestMatrix},
-		{"Bone_getFullRestMatrix", Polycore_Bone_getFullRestMatrix},
-		{"Bone_getParentRestMatrix", Polycore_Bone_getParentRestMatrix},
-		{"Bone_getFinalMatrix", Polycore_Bone_getFinalMatrix},
-		{"Bone_setRestMatrix", Polycore_Bone_setRestMatrix},
-		{"Bone_setBaseMatrix", Polycore_Bone_setBaseMatrix},
-		{"Bone_getBaseMatrix", Polycore_Bone_getBaseMatrix},
-		{"Bone_getFullBaseMatrix", Polycore_Bone_getFullBaseMatrix},
-		{"delete_Bone", Polycore_delete_Bone},
-		{"Camera", Polycore_Camera},
-		{"Camera_buildFrustrumPlanes", Polycore_Camera_buildFrustrumPlanes},
-		{"Camera_isSphereInFrustrum", Polycore_Camera_isSphereInFrustrum},
-		{"Camera_canSee", Polycore_Camera_canSee},
-		{"Camera_setOrthoMode", Polycore_Camera_setOrthoMode},
-		{"Camera_getOrthoMode", Polycore_Camera_getOrthoMode},
-		{"Camera_setFOV", Polycore_Camera_setFOV},
-		{"Camera_getFOV", Polycore_Camera_getFOV},
-		{"Camera_setParentScene", Polycore_Camera_setParentScene},
-		{"Camera_doCameraTransform", Polycore_Camera_doCameraTransform},
-		{"Camera_setLightDepthTexture", Polycore_Camera_setLightDepthTexture},
-		{"Camera_hasFilterShader", Polycore_Camera_hasFilterShader},
-		{"Camera_drawFilter", Polycore_Camera_drawFilter},
-		{"Camera_setExposureLevel", Polycore_Camera_setExposureLevel},
-		{"Camera_getExposureLevel", Polycore_Camera_getExposureLevel},
-		{"Camera_createPostFilter", Polycore_Camera_createPostFilter},
-		{"Camera_setPostFilter", Polycore_Camera_setPostFilter},
-		{"Camera_removePostFilter", Polycore_Camera_removePostFilter},
-		{"Camera_getScreenShaderMaterial", Polycore_Camera_getScreenShaderMaterial},
-		{"delete_Camera", Polycore_delete_Camera},
-		{"Color_get_r", Polycore_Color_get_r},
-		{"Color_get_g", Polycore_Color_get_g},
-		{"Color_get_b", Polycore_Color_get_b},
-		{"Color_get_a", Polycore_Color_get_a},
-		{"Color_set_r", Polycore_Color_set_r},
-		{"Color_set_g", Polycore_Color_set_g},
-		{"Color_set_b", Polycore_Color_set_b},
-		{"Color_set_a", Polycore_Color_set_a},
-		{"Color", Polycore_Color},
-		{"Color_setColorHex", Polycore_Color_setColorHex},
-		{"Color_setColorHexRGB", Polycore_Color_setColorHexRGB},
-		{"Color_setColorHSV", Polycore_Color_setColorHSV},
-		{"Color_setColorRGBA", Polycore_Color_setColorRGBA},
-		{"Color_setColorRGB", Polycore_Color_setColorRGB},
-		{"Color_setColor", Polycore_Color_setColor},
-		{"Color_Random", Polycore_Color_Random},
-		{"Color_getBrightness", Polycore_Color_getBrightness},
-		{"Color_getUint", Polycore_Color_getUint},
-		{"delete_Color", Polycore_delete_Color},
-		{"Config", Polycore_Config},
-		{"Config_loadConfig", Polycore_Config_loadConfig},
-		{"Config_saveConfig", Polycore_Config_saveConfig},
-		{"Config_getEntry", Polycore_Config_getEntry},
-		{"Config_setStringValue", Polycore_Config_setStringValue},
-		{"Config_setNumericValue", Polycore_Config_setNumericValue},
-		{"Config_getNumericValue", Polycore_Config_getNumericValue},
-		{"Config_getStringValue", Polycore_Config_getStringValue},
-		{"delete_Config", Polycore_delete_Config},
-		{"PolycodeViewBase", Polycore_PolycodeViewBase},
-		{"delete_PolycodeViewBase", Polycore_delete_PolycodeViewBase},
-		{"Core_Update", Polycore_Core_Update},
-		{"Core_enableMouse", Polycore_Core_enableMouse},
-		{"Core_setCursor", Polycore_Core_setCursor},
-		{"Core_createThread", Polycore_Core_createThread},
-		{"Core_lockMutex", Polycore_Core_lockMutex},
-		{"Core_unlockMutex", Polycore_Core_unlockMutex},
-		{"Core_createMutex", Polycore_Core_createMutex},
-		{"Core_copyStringToClipboard", Polycore_Core_copyStringToClipboard},
-		{"Core_getClipboardString", Polycore_Core_getClipboardString},
-		{"Core_getServices", Polycore_Core_getServices},
-		{"Core_getFPS", Polycore_Core_getFPS},
-		{"Core_Shutdown", Polycore_Core_Shutdown},
-		{"Core_isFullscreen", Polycore_Core_isFullscreen},
-		{"Core_getAALevel", Polycore_Core_getAALevel},
-		{"Core_getInput", Polycore_Core_getInput},
-		{"Core_getXRes", Polycore_Core_getXRes},
-		{"Core_getYRes", Polycore_Core_getYRes},
-		{"Core_getNumVideoModes", Polycore_Core_getNumVideoModes},
-		{"Core_createFolder", Polycore_Core_createFolder},
-		{"Core_copyDiskItem", Polycore_Core_copyDiskItem},
-		{"Core_moveDiskItem", Polycore_Core_moveDiskItem},
-		{"Core_removeDiskItem", Polycore_Core_removeDiskItem},
-		{"Core_openFolderPicker", Polycore_Core_openFolderPicker},
-		{"Core_setVideoModeIndex", Polycore_Core_setVideoModeIndex},
-		{"Core_setVideoMode", Polycore_Core_setVideoMode},
-		{"Core_resizeTo", Polycore_Core_resizeTo},
-		{"Core_doSleep", Polycore_Core_doSleep},
-		{"Core_getElapsed", Polycore_Core_getElapsed},
-		{"Core_getTicks", Polycore_Core_getTicks},
-		{"Core_getTicksFloat", Polycore_Core_getTicksFloat},
-		{"Core_setUserPointer", Polycore_Core_setUserPointer},
-		{"Core_getUserPointer", Polycore_Core_getUserPointer},
-		{"delete_Core", Polycore_delete_Core},
-		{"CoreInput", Polycore_CoreInput},
-		{"CoreInput_getMousePosition", Polycore_CoreInput_getMousePosition},
-		{"CoreInput_getKeyState", Polycore_CoreInput_getKeyState},
-		{"CoreInput_getMouseDelta", Polycore_CoreInput_getMouseDelta},
-		{"CoreInput_getMouseButtonState", Polycore_CoreInput_getMouseButtonState},
-		{"CoreInput_mouseWheelUp", Polycore_CoreInput_mouseWheelUp},
-		{"CoreInput_mouseWheelDown", Polycore_CoreInput_mouseWheelDown},
-		{"CoreInput_setMouseButtonState", Polycore_CoreInput_setMouseButtonState},
-		{"CoreInput_setMousePosition", Polycore_CoreInput_setMousePosition},
-		{"CoreInput_setKeyState", Polycore_CoreInput_setKeyState},
-		{"CoreInput_setDeltaPosition", Polycore_CoreInput_setDeltaPosition},
-		{"CoreInput_createEvent", Polycore_CoreInput_createEvent},
-		{"delete_CoreInput", Polycore_delete_CoreInput},
-		{"CoreServices_getInstance", Polycore_CoreServices_getInstance},
-		{"CoreServices_setInstance", Polycore_CoreServices_setInstance},
-		{"CoreServices_getRenderMutex", Polycore_CoreServices_getRenderMutex},
-		{"CoreServices_setRenderer", Polycore_CoreServices_setRenderer},
-		{"CoreServices_getRenderer", Polycore_CoreServices_getRenderer},
-		{"CoreServices_Update", Polycore_CoreServices_Update},
-		{"CoreServices_setCore", Polycore_CoreServices_setCore},
-		{"CoreServices_getCore", Polycore_CoreServices_getCore},
-		{"CoreServices_installModule", Polycore_CoreServices_installModule},
-		{"CoreServices_getMaterialManager", Polycore_CoreServices_getMaterialManager},
-		{"CoreServices_getScreenManager", Polycore_CoreServices_getScreenManager},
-		{"CoreServices_getSceneManager", Polycore_CoreServices_getSceneManager},
-		{"CoreServices_getTimerManager", Polycore_CoreServices_getTimerManager},
-		{"CoreServices_getTweenManager", Polycore_CoreServices_getTweenManager},
-		{"CoreServices_getResourceManager", Polycore_CoreServices_getResourceManager},
-		{"CoreServices_getSoundManager", Polycore_CoreServices_getSoundManager},
-		{"CoreServices_getFontManager", Polycore_CoreServices_getFontManager},
-		{"CoreServices_getConfig", Polycore_CoreServices_getConfig},
-		{"delete_CoreServices", Polycore_delete_CoreServices},
-		{"Cubemap", Polycore_Cubemap},
-		{"delete_Cubemap", Polycore_delete_Cubemap},
-		{"Data", Polycore_Data},
-		{"Data_loadFromFile", Polycore_Data_loadFromFile},
-		{"Data_getAsString", Polycore_Data_getAsString},
-		{"Data_setFromString", Polycore_Data_setFromString},
-		{"Data_saveToFile", Polycore_Data_saveToFile},
-		{"Data_getData", Polycore_Data_getData},
-		{"delete_Data", Polycore_delete_Data},
-		{"Entity_get_custEntityType", Polycore_Entity_get_custEntityType},
-		{"Entity_get_billboardMode", Polycore_Entity_get_billboardMode},
-		{"Entity_get_billboardRoll", Polycore_Entity_get_billboardRoll},
-		{"Entity_get_alphaTest", Polycore_Entity_get_alphaTest},
-		{"Entity_get_backfaceCulled", Polycore_Entity_get_backfaceCulled},
-		{"Entity_get_renderWireframe", Polycore_Entity_get_renderWireframe},
-		{"Entity_get_color", Polycore_Entity_get_color},
-		{"Entity_get_enabled", Polycore_Entity_get_enabled},
-		{"Entity_get_visible", Polycore_Entity_get_visible},
-		{"Entity_get_depthWrite", Polycore_Entity_get_depthWrite},
-		{"Entity_get_depthTest", Polycore_Entity_get_depthTest},
-		{"Entity_get_blendingMode", Polycore_Entity_get_blendingMode},
-		{"Entity_get_colorAffectsChildren", Polycore_Entity_get_colorAffectsChildren},
-		{"Entity_get_visibilityAffectsChildren", Polycore_Entity_get_visibilityAffectsChildren},
-		{"Entity_get_depthOnly", Polycore_Entity_get_depthOnly},
-		{"Entity_get_bBox", Polycore_Entity_get_bBox},
-		{"Entity_get_ignoreParentMatrix", Polycore_Entity_get_ignoreParentMatrix},
-		{"Entity_get_isMask", Polycore_Entity_get_isMask},
-		{"Entity_set_custEntityType", Polycore_Entity_set_custEntityType},
-		{"Entity_set_billboardMode", Polycore_Entity_set_billboardMode},
-		{"Entity_set_billboardRoll", Polycore_Entity_set_billboardRoll},
-		{"Entity_set_alphaTest", Polycore_Entity_set_alphaTest},
-		{"Entity_set_backfaceCulled", Polycore_Entity_set_backfaceCulled},
-		{"Entity_set_renderWireframe", Polycore_Entity_set_renderWireframe},
-		{"Entity_set_enabled", Polycore_Entity_set_enabled},
-		{"Entity_set_visible", Polycore_Entity_set_visible},
-		{"Entity_set_depthWrite", Polycore_Entity_set_depthWrite},
-		{"Entity_set_depthTest", Polycore_Entity_set_depthTest},
-		{"Entity_set_blendingMode", Polycore_Entity_set_blendingMode},
-		{"Entity_set_colorAffectsChildren", Polycore_Entity_set_colorAffectsChildren},
-		{"Entity_set_visibilityAffectsChildren", Polycore_Entity_set_visibilityAffectsChildren},
-		{"Entity_set_depthOnly", Polycore_Entity_set_depthOnly},
-		{"Entity_set_ignoreParentMatrix", Polycore_Entity_set_ignoreParentMatrix},
-		{"Entity_set_isMask", Polycore_Entity_set_isMask},
-		{"Entity", Polycore_Entity},
-		{"Entity_Render", Polycore_Entity_Render},
-		{"Entity_Update", Polycore_Entity_Update},
-		{"Entity_transformAndRender", Polycore_Entity_transformAndRender},
-		{"Entity_renderChildren", Polycore_Entity_renderChildren},
-		{"Entity_dirtyMatrix", Polycore_Entity_dirtyMatrix},
-		{"Entity_rebuildTransformMatrix", Polycore_Entity_rebuildTransformMatrix},
-		{"Entity_updateEntityMatrix", Polycore_Entity_updateEntityMatrix},
-		{"Entity_getTransformMatrix", Polycore_Entity_getTransformMatrix},
-		{"Entity_getConcatenatedMatrix", Polycore_Entity_getConcatenatedMatrix},
-		{"Entity_getConcatenatedRollMatrix", Polycore_Entity_getConcatenatedRollMatrix},
-		{"Entity_setTransformByMatrix", Polycore_Entity_setTransformByMatrix},
-		{"Entity_setTransformByMatrixPure", Polycore_Entity_setTransformByMatrixPure},
-		{"Entity_getLookAtMatrix", Polycore_Entity_getLookAtMatrix},
-		{"Entity_addEntity", Polycore_Entity_addEntity},
-		{"Entity_addChild", Polycore_Entity_addChild},
-		{"Entity_removeChild", Polycore_Entity_removeChild},
-		{"Entity_setParentEntity", Polycore_Entity_setParentEntity},
-		{"Entity_getParentEntity", Polycore_Entity_getParentEntity},
-		{"Entity_getPosition", Polycore_Entity_getPosition},
-		{"Entity_getCombinedPosition", Polycore_Entity_getCombinedPosition},
-		{"Entity_setPosition", Polycore_Entity_setPosition},
-		{"Entity_setPositionX", Polycore_Entity_setPositionX},
-		{"Entity_setPositionY", Polycore_Entity_setPositionY},
-		{"Entity_Translate", Polycore_Entity_Translate},
-		{"Entity_setPositionZ", Polycore_Entity_setPositionZ},
-		{"Entity_setScaleX", Polycore_Entity_setScaleX},
-		{"Entity_setScaleY", Polycore_Entity_setScaleY},
-		{"Entity_setScaleZ", Polycore_Entity_setScaleZ},
-		{"Entity_Scale", Polycore_Entity_Scale},
-		{"Entity_setScale", Polycore_Entity_setScale},
-		{"Entity_getCompoundScale", Polycore_Entity_getCompoundScale},
-		{"Entity_getScale", Polycore_Entity_getScale},
-		{"Entity_getCombinedPitch", Polycore_Entity_getCombinedPitch},
-		{"Entity_getCombinedYaw", Polycore_Entity_getCombinedYaw},
-		{"Entity_getCombinedRoll", Polycore_Entity_getCombinedRoll},
-		{"Entity_rebuildRotation", Polycore_Entity_rebuildRotation},
-		{"Entity_setPitch", Polycore_Entity_setPitch},
-		{"Entity_setYaw", Polycore_Entity_setYaw},
-		{"Entity_setRoll", Polycore_Entity_setRoll},
-		{"Entity_Roll", Polycore_Entity_Roll},
-		{"Entity_Yaw", Polycore_Entity_Yaw},
-		{"Entity_Pitch", Polycore_Entity_Pitch},
-		{"Entity_getPitch", Polycore_Entity_getPitch},
-		{"Entity_getYaw", Polycore_Entity_getYaw},
-		{"Entity_getRoll", Polycore_Entity_getRoll},
-		{"Entity_setRotationQuat", Polycore_Entity_setRotationQuat},
-		{"Entity_getRotationQuat", Polycore_Entity_getRotationQuat},
-		{"Entity_lookAt", Polycore_Entity_lookAt},
-		{"Entity_lookAtEntity", Polycore_Entity_lookAtEntity},
-		{"Entity_getCombinedColor", Polycore_Entity_getCombinedColor},
-		{"Entity_setColor", Polycore_Entity_setColor},
-		{"Entity_setColorInt", Polycore_Entity_setColorInt},
-		{"Entity_recalculateBBox", Polycore_Entity_recalculateBBox},
-		{"Entity_getBBoxRadius", Polycore_Entity_getBBoxRadius},
-		{"Entity_getCompoundBBoxRadius", Polycore_Entity_getCompoundBBoxRadius},
-		{"Entity_setBBoxRadius", Polycore_Entity_setBBoxRadius},
-		{"Entity_setMask", Polycore_Entity_setMask},
-		{"Entity_clearMask", Polycore_Entity_clearMask},
-		{"Entity_setBlendingMode", Polycore_Entity_setBlendingMode},
-		{"Entity_getChildCenter", Polycore_Entity_getChildCenter},
-		{"Entity_getEntityProp", Polycore_Entity_getEntityProp},
-		{"Entity_doUpdates", Polycore_Entity_doUpdates},
-		{"Entity_buildPositionMatrix", Polycore_Entity_buildPositionMatrix},
-		{"Entity_adjustMatrixForChildren", Polycore_Entity_adjustMatrixForChildren},
-		{"Entity_setRenderer", Polycore_Entity_setRenderer},
-		{"delete_Entity", Polycore_delete_Entity},
+	static const struct luaL_reg polycoreLib [] = {		{"SkeletonAnimation", Polycore_SkeletonAnimation},
+		{"SkeletonAnimation_addBoneTrack", Polycore_SkeletonAnimation_addBoneTrack},
+		{"SkeletonAnimation_getName", Polycore_SkeletonAnimation_getName},
+		{"SkeletonAnimation_Play", Polycore_SkeletonAnimation_Play},
+		{"SkeletonAnimation_Stop", Polycore_SkeletonAnimation_Stop},
+		{"SkeletonAnimation_Update", Polycore_SkeletonAnimation_Update},
+		{"SkeletonAnimation_setSpeed", Polycore_SkeletonAnimation_setSpeed},
+		{"delete_SkeletonAnimation", Polycore_delete_SkeletonAnimation},
+		{"Skeleton", Polycore_Skeleton},
+		{"Skeleton_loadSkeleton", Polycore_Skeleton_loadSkeleton},
+		{"Skeleton_playAnimation", Polycore_Skeleton_playAnimation},
+		{"Skeleton_playAnimationByIndex", Polycore_Skeleton_playAnimationByIndex},
+		{"Skeleton_addAnimation", Polycore_Skeleton_addAnimation},
+		{"Skeleton_getAnimation", Polycore_Skeleton_getAnimation},
+		{"Skeleton_Update", Polycore_Skeleton_Update},
+		{"Skeleton_getBoneByName", Polycore_Skeleton_getBoneByName},
+		{"Skeleton_bonesVisible", Polycore_Skeleton_bonesVisible},
+		{"Skeleton_enableBoneLabels", Polycore_Skeleton_enableBoneLabels},
+		{"Skeleton_getNumBones", Polycore_Skeleton_getNumBones},
+		{"Skeleton_getBone", Polycore_Skeleton_getBone},
+		{"Skeleton_getCurrentAnimation", Polycore_Skeleton_getCurrentAnimation},
+		{"delete_Skeleton", Polycore_delete_Skeleton},
+		{"BoneTrack_get_LocXVec", Polycore_BoneTrack_get_LocXVec},
+		{"BoneTrack_get_LocYVec", Polycore_BoneTrack_get_LocYVec},
+		{"BoneTrack_get_LocZVec", Polycore_BoneTrack_get_LocZVec},
+		{"BoneTrack_get_ScaleXVec", Polycore_BoneTrack_get_ScaleXVec},
+		{"BoneTrack_get_ScaleYVec", Polycore_BoneTrack_get_ScaleYVec},
+		{"BoneTrack_get_ScaleZVec", Polycore_BoneTrack_get_ScaleZVec},
+		{"BoneTrack_get_boneQuat", Polycore_BoneTrack_get_boneQuat},
+		{"BoneTrack_get_QuatWVec", Polycore_BoneTrack_get_QuatWVec},
+		{"BoneTrack_get_QuatXVec", Polycore_BoneTrack_get_QuatXVec},
+		{"BoneTrack_get_QuatYVec", Polycore_BoneTrack_get_QuatYVec},
+		{"BoneTrack_get_QuatZVec", Polycore_BoneTrack_get_QuatZVec},
+		{"BoneTrack", Polycore_BoneTrack},
+		{"BoneTrack_Play", Polycore_BoneTrack_Play},
+		{"BoneTrack_Stop", Polycore_BoneTrack_Stop},
+		{"BoneTrack_Update", Polycore_BoneTrack_Update},
+		{"BoneTrack_setSpeed", Polycore_BoneTrack_setSpeed},
+		{"delete_BoneTrack", Polycore_delete_BoneTrack},
+		{"TweenManager", Polycore_TweenManager},
+		{"TweenManager_addTween", Polycore_TweenManager_addTween},
+		{"TweenManager_removeTween", Polycore_TweenManager_removeTween},
+		{"TweenManager_Update", Polycore_TweenManager_Update},
+		{"delete_TweenManager", Polycore_delete_TweenManager},
 		{"Event", Polycore_Event},
 		{"Event", Polycore_Event},
 		{"Event_getEventCode", Polycore_Event_getEventCode},
 		{"Event_getEventCode", Polycore_Event_getEventCode},
 		{"Event_getDispatcher", Polycore_Event_getDispatcher},
 		{"Event_getDispatcher", Polycore_Event_getDispatcher},
@@ -301,188 +56,8 @@ int luaopen_Polycode(lua_State *L) {
 		{"Event_setDispatcher", Polycore_Event_setDispatcher},
 		{"Event_setDispatcher", Polycore_Event_setDispatcher},
 		{"Event_getEventType", Polycore_Event_getEventType},
 		{"Event_getEventType", Polycore_Event_getEventType},
 		{"delete_Event", Polycore_delete_Event},
 		{"delete_Event", Polycore_delete_Event},
-		{"EventDispatcher", Polycore_EventDispatcher},
-		{"EventDispatcher_removeAllHandlers", Polycore_EventDispatcher_removeAllHandlers},
-		{"EventDispatcher_removeAllHandlersForListener", Polycore_EventDispatcher_removeAllHandlersForListener},
-		{"EventDispatcher_addEventListener", Polycore_EventDispatcher_addEventListener},
-		{"EventDispatcher_removeEventListener", Polycore_EventDispatcher_removeEventListener},
-		{"EventDispatcher___dispatchEvent", Polycore_EventDispatcher___dispatchEvent},
-		{"EventDispatcher_dispatchEvent", Polycore_EventDispatcher_dispatchEvent},
-		{"EventDispatcher_dispatchEventNoDelete", Polycore_EventDispatcher_dispatchEventNoDelete},
-		{"delete_EventDispatcher", Polycore_delete_EventDispatcher},
 		{"EventHandler", Polycore_EventHandler},
 		{"EventHandler", Polycore_EventHandler},
 		{"delete_EventHandler", Polycore_delete_EventHandler},
 		{"delete_EventHandler", Polycore_delete_EventHandler},
-		{"FixedShader", Polycore_FixedShader},
-		{"FixedShader_createBinding", Polycore_FixedShader_createBinding},
-		{"delete_FixedShader", Polycore_delete_FixedShader},
-		{"FixedShaderBinding", Polycore_FixedShaderBinding},
-		{"FixedShaderBinding_addTexture", Polycore_FixedShaderBinding_addTexture},
-		{"FixedShaderBinding_addCubemap", Polycore_FixedShaderBinding_addCubemap},
-		{"FixedShaderBinding_addParam", Polycore_FixedShaderBinding_addParam},
-		{"FixedShaderBinding_getDiffuseTexture", Polycore_FixedShaderBinding_getDiffuseTexture},
-		{"delete_FixedShaderBinding", Polycore_delete_FixedShaderBinding},
-		{"Font_get_loaded", Polycore_Font_get_loaded},
-		{"Font_set_loaded", Polycore_Font_set_loaded},
-		{"Font", Polycore_Font},
-		{"Font_getFace", Polycore_Font_getFace},
-		{"Font_isValid", Polycore_Font_isValid},
-		{"delete_Font", Polycore_delete_Font},
-		{"FontManager", Polycore_FontManager},
-		{"FontManager_registerFont", Polycore_FontManager_registerFont},
-		{"FontManager_getFontByName", Polycore_FontManager_getFontByName},
-		{"delete_FontManager", Polycore_delete_FontManager},
-		{"Image", Polycore_Image},
-		{"Image_loadImage", Polycore_Image_loadImage},
-		{"Image_loadPNG", Polycore_Image_loadPNG},
-		{"Image_createEmpty", Polycore_Image_createEmpty},
-		{"Image_fill", Polycore_Image_fill},
-		{"Image_setPixel", Polycore_Image_setPixel},
-		{"Image_getPixel", Polycore_Image_getPixel},
-		{"Image_swap", Polycore_Image_swap},
-		{"Image_line", Polycore_Image_line},
-		{"Image_moveTo", Polycore_Image_moveTo},
-		{"Image_move", Polycore_Image_move},
-		{"Image_lineTo", Polycore_Image_lineTo},
-		{"Image_drawRect", Polycore_Image_drawRect},
-		{"Image_perlinNoise", Polycore_Image_perlinNoise},
-		{"Image_fastBlur", Polycore_Image_fastBlur},
-		{"Image_fastBlurVert", Polycore_Image_fastBlurVert},
-		{"Image_fastBlurHor", Polycore_Image_fastBlurHor},
-		{"Image_darken", Polycore_Image_darken},
-		{"Image_lighten", Polycore_Image_lighten},
-		{"Image_multiply", Polycore_Image_multiply},
-		{"Image_getBrushX", Polycore_Image_getBrushX},
-		{"Image_getBrushY", Polycore_Image_getBrushY},
-		{"Image_isLoaded", Polycore_Image_isLoaded},
-		{"Image_getType", Polycore_Image_getType},
-		{"Image_writeBMP", Polycore_Image_writeBMP},
-		{"Image_getWidth", Polycore_Image_getWidth},
-		{"Image_getHeight", Polycore_Image_getHeight},
-		{"Image_getPixels", Polycore_Image_getPixels},
-		{"delete_Image", Polycore_delete_Image},
-		{"InputEvent_get_mouseButton", Polycore_InputEvent_get_mouseButton},
-		{"InputEvent_get_mousePosition", Polycore_InputEvent_get_mousePosition},
-		{"InputEvent_get_key", Polycore_InputEvent_get_key},
-		{"InputEvent_get_charCode", Polycore_InputEvent_get_charCode},
-		{"InputEvent_get_timestamp", Polycore_InputEvent_get_timestamp},
-		{"InputEvent_set_mouseButton", Polycore_InputEvent_set_mouseButton},
-		{"InputEvent_set_timestamp", Polycore_InputEvent_set_timestamp},
-		{"InputEvent", Polycore_InputEvent},
-		{"InputEvent_getMousePosition", Polycore_InputEvent_getMousePosition},
-		{"InputEvent_getKey", Polycore_InputEvent_getKey},
-		{"InputEvent_getMouseButton", Polycore_InputEvent_getMouseButton},
-		{"InputEvent_keyCode", Polycore_InputEvent_keyCode},
-		{"delete_InputEvent", Polycore_delete_InputEvent},
-		{"Label", Polycore_Label},
-		{"Label_setText", Polycore_Label_setText},
-		{"Label_getText", Polycore_Label_getText},
-		{"Label_getTextWidth", Polycore_Label_getTextWidth},
-		{"Label_getTextHeight", Polycore_Label_getTextHeight},
-		{"Label_getFont", Polycore_Label_getFont},
-		{"delete_Label", Polycore_delete_Label},
-		{"Logger", Polycore_Logger},
-		{"Logger_log", Polycore_Logger_log},
-		{"Logger_logw", Polycore_Logger_logw},
-		{"delete_Logger", Polycore_delete_Logger},
-		{"Material_get_specularValue", Polycore_Material_get_specularValue},
-		{"Material_get_specularColor", Polycore_Material_get_specularColor},
-		{"Material_get_diffuseColor", Polycore_Material_get_diffuseColor},
-		{"Material_set_specularValue", Polycore_Material_set_specularValue},
-		{"Material", Polycore_Material},
-		{"Material_addShader", Polycore_Material_addShader},
-		{"Material_getNumShaders", Polycore_Material_getNumShaders},
-		{"Material_addShaderRenderTarget", Polycore_Material_addShaderRenderTarget},
-		{"Material_getNumShaderRenderTargets", Polycore_Material_getNumShaderRenderTargets},
-		{"Material_getShaderRenderTarget", Polycore_Material_getShaderRenderTarget},
-		{"Material_getName", Polycore_Material_getName},
-		{"Material_getShader", Polycore_Material_getShader},
-		{"Material_getShaderBinding", Polycore_Material_getShaderBinding},
-		{"Material_loadMaterial", Polycore_Material_loadMaterial},
-		{"delete_Material", Polycore_delete_Material},
-		{"MaterialManager", Polycore_MaterialManager},
-		{"MaterialManager_Update", Polycore_MaterialManager_Update},
-		{"MaterialManager_createFramebufferTexture", Polycore_MaterialManager_createFramebufferTexture},
-		{"MaterialManager_createTexture", Polycore_MaterialManager_createTexture},
-		{"MaterialManager_createNewTexture", Polycore_MaterialManager_createNewTexture},
-		{"MaterialManager_createTextureFromImage", Polycore_MaterialManager_createTextureFromImage},
-		{"MaterialManager_createTextureFromFile", Polycore_MaterialManager_createTextureFromFile},
-		{"MaterialManager_deleteTexture", Polycore_MaterialManager_deleteTexture},
-		{"MaterialManager_reloadTextures", Polycore_MaterialManager_reloadTextures},
-		{"MaterialManager_reloadProgramsAndTextures", Polycore_MaterialManager_reloadProgramsAndTextures},
-		{"MaterialManager_reloadPrograms", Polycore_MaterialManager_reloadPrograms},
-		{"MaterialManager_addShaderModule", Polycore_MaterialManager_addShaderModule},
-		{"MaterialManager_getTextureByResourcePath", Polycore_MaterialManager_getTextureByResourcePath},
-		{"MaterialManager_cubemapFromXMLNode", Polycore_MaterialManager_cubemapFromXMLNode},
-		{"MaterialManager_loadMaterialsFromFile", Polycore_MaterialManager_loadMaterialsFromFile},
-		{"MaterialManager_materialFromXMLNode", Polycore_MaterialManager_materialFromXMLNode},
-		{"MaterialManager_setShaderFromXMLNode", Polycore_MaterialManager_setShaderFromXMLNode},
-		{"MaterialManager_createShaderFromXMLNode", Polycore_MaterialManager_createShaderFromXMLNode},
-		{"delete_MaterialManager", Polycore_delete_MaterialManager},
-		{"Matrix4", Polycore_Matrix4},
-		{"Matrix4_identity", Polycore_Matrix4_identity},
-		{"Matrix4_rotateVector", Polycore_Matrix4_rotateVector},
-		{"Matrix4_getPosition", Polycore_Matrix4_getPosition},
-		{"Matrix4_setPosition", Polycore_Matrix4_setPosition},
-		{"Matrix4_setScale", Polycore_Matrix4_setScale},
-		{"Matrix4_getEulerAngles", Polycore_Matrix4_getEulerAngles},
-		{"Matrix4_inverse", Polycore_Matrix4_inverse},
-		{"Matrix4_inverseAffine", Polycore_Matrix4_inverseAffine},
-		{"delete_Matrix4", Polycore_delete_Matrix4},
-		{"Mesh_get_useVertexColors", Polycore_Mesh_get_useVertexColors},
-		{"Mesh_set_useVertexColors", Polycore_Mesh_set_useVertexColors},
-		{"Mesh", Polycore_Mesh},
-		{"Mesh_addPolygon", Polycore_Mesh_addPolygon},
-		{"Mesh_loadMesh", Polycore_Mesh_loadMesh},
-		{"Mesh_saveToFile", Polycore_Mesh_saveToFile},
-		{"Mesh_loadFromFile", Polycore_Mesh_loadFromFile},
-		{"Mesh_getPolygonCount", Polycore_Mesh_getPolygonCount},
-		{"Mesh_getVertexCount", Polycore_Mesh_getVertexCount},
-		{"Mesh_getPolygon", Polycore_Mesh_getPolygon},
-		{"Mesh_createPlane", Polycore_Mesh_createPlane},
-		{"Mesh_createVPlane", Polycore_Mesh_createVPlane},
-		{"Mesh_createTorus", Polycore_Mesh_createTorus},
-		{"Mesh_createBox", Polycore_Mesh_createBox},
-		{"Mesh_createSphere", Polycore_Mesh_createSphere},
-		{"Mesh_createCylinder", Polycore_Mesh_createCylinder},
-		{"Mesh_createCone", Polycore_Mesh_createCone},
-		{"Mesh_recenterMesh", Polycore_Mesh_recenterMesh},
-		{"Mesh_useVertexNormals", Polycore_Mesh_useVertexNormals},
-		{"Mesh_setVertexBuffer", Polycore_Mesh_setVertexBuffer},
-		{"Mesh_getVertexBuffer", Polycore_Mesh_getVertexBuffer},
-		{"Mesh_getRadius", Polycore_Mesh_getRadius},
-		{"Mesh_calculateNormals", Polycore_Mesh_calculateNormals},
-		{"Mesh_getMeshType", Polycore_Mesh_getMeshType},
-		{"Mesh_setMeshType", Polycore_Mesh_setMeshType},
-		{"Mesh_calculateBBox", Polycore_Mesh_calculateBBox},
-		{"Mesh_hasVertexBuffer", Polycore_Mesh_hasVertexBuffer},
-		{"delete_Mesh", Polycore_delete_Mesh},
-		{"VertexBuffer_get_verticesPerFace", Polycore_VertexBuffer_get_verticesPerFace},
-		{"VertexBuffer_get_meshType", Polycore_VertexBuffer_get_meshType},
-		{"VertexBuffer_set_verticesPerFace", Polycore_VertexBuffer_set_verticesPerFace},
-		{"VertexBuffer_set_meshType", Polycore_VertexBuffer_set_meshType},
-		{"VertexBuffer", Polycore_VertexBuffer},
-		{"VertexBuffer_getVertexCount", Polycore_VertexBuffer_getVertexCount},
-		{"delete_VertexBuffer", Polycore_delete_VertexBuffer},
-		{"PolycodeModule", Polycore_PolycodeModule},
-		{"PolycodeModule_getType", Polycore_PolycodeModule_getType},
-		{"delete_PolycodeModule", Polycore_delete_PolycodeModule},
-		{"ObjectEntry_get_type", Polycore_ObjectEntry_get_type},
-		{"ObjectEntry_get_name", Polycore_ObjectEntry_get_name},
-		{"ObjectEntry_get_NumberVal", Polycore_ObjectEntry_get_NumberVal},
-		{"ObjectEntry_get_intVal", Polycore_ObjectEntry_get_intVal},
-		{"ObjectEntry_get_stringVal", Polycore_ObjectEntry_get_stringVal},
-		{"ObjectEntry_get_boolVal", Polycore_ObjectEntry_get_boolVal},
-		{"ObjectEntry_get_length", Polycore_ObjectEntry_get_length},
-		{"ObjectEntry_set_type", Polycore_ObjectEntry_set_type},
-		{"ObjectEntry_set_name", Polycore_ObjectEntry_set_name},
-		{"ObjectEntry_set_NumberVal", Polycore_ObjectEntry_set_NumberVal},
-		{"ObjectEntry_set_intVal", Polycore_ObjectEntry_set_intVal},
-		{"ObjectEntry_set_stringVal", Polycore_ObjectEntry_set_stringVal},
-		{"ObjectEntry_set_boolVal", Polycore_ObjectEntry_set_boolVal},
-		{"ObjectEntry_set_length", Polycore_ObjectEntry_set_length},
-		{"ObjectEntry", Polycore_ObjectEntry},
-		{"ObjectEntry_addChild", Polycore_ObjectEntry_addChild},
-		{"delete_ObjectEntry", Polycore_delete_ObjectEntry},
 		{"Particle_get_velVector", Polycore_Particle_get_velVector},
 		{"Particle_get_velVector", Polycore_Particle_get_velVector},
 		{"Particle_get_dirVector", Polycore_Particle_get_dirVector},
 		{"Particle_get_dirVector", Polycore_Particle_get_dirVector},
 		{"Particle_get_deviation", Polycore_Particle_get_deviation},
 		{"Particle_get_deviation", Polycore_Particle_get_deviation},
@@ -503,122 +78,10 @@ int luaopen_Polycode(lua_State *L) {
 		{"Particle_createSceneParticle", Polycore_Particle_createSceneParticle},
 		{"Particle_createSceneParticle", Polycore_Particle_createSceneParticle},
 		{"Particle_createScreenParticle", Polycore_Particle_createScreenParticle},
 		{"Particle_createScreenParticle", Polycore_Particle_createScreenParticle},
 		{"delete_Particle", Polycore_delete_Particle},
 		{"delete_Particle", Polycore_delete_Particle},
-		{"ScreenParticleEmitter", Polycore_ScreenParticleEmitter},
-		{"ScreenParticleEmitter_getEmitter", Polycore_ScreenParticleEmitter_getEmitter},
-		{"ScreenParticleEmitter_addParticleBody", Polycore_ScreenParticleEmitter_addParticleBody},
-		{"ScreenParticleEmitter_getBaseMatrix", Polycore_ScreenParticleEmitter_getBaseMatrix},
-		{"ScreenParticleEmitter_Update", Polycore_ScreenParticleEmitter_Update},
-		{"delete_ScreenParticleEmitter", Polycore_delete_ScreenParticleEmitter},
-		{"SceneParticleEmitter", Polycore_SceneParticleEmitter},
-		{"SceneParticleEmitter_getEmitter", Polycore_SceneParticleEmitter_getEmitter},
-		{"SceneParticleEmitter_respawnSceneParticles", Polycore_SceneParticleEmitter_respawnSceneParticles},
-		{"SceneParticleEmitter_addParticleBody", Polycore_SceneParticleEmitter_addParticleBody},
-		{"SceneParticleEmitter_getBaseMatrix", Polycore_SceneParticleEmitter_getBaseMatrix},
-		{"SceneParticleEmitter_Update", Polycore_SceneParticleEmitter_Update},
-		{"delete_SceneParticleEmitter", Polycore_delete_SceneParticleEmitter},
-		{"ParticleEmitter_get_particleSpeedMod", Polycore_ParticleEmitter_get_particleSpeedMod},
-		{"ParticleEmitter_get_brightnessDeviation", Polycore_ParticleEmitter_get_brightnessDeviation},
-		{"ParticleEmitter_get_deviation", Polycore_ParticleEmitter_get_deviation},
-		{"ParticleEmitter_get_dirVector", Polycore_ParticleEmitter_get_dirVector},
-		{"ParticleEmitter_get_gravVector", Polycore_ParticleEmitter_get_gravVector},
-		{"ParticleEmitter_get_lifespan", Polycore_ParticleEmitter_get_lifespan},
-		{"ParticleEmitter_get_rotationFollowsPath", Polycore_ParticleEmitter_get_rotationFollowsPath},
-		{"ParticleEmitter_get_scaleCurve", Polycore_ParticleEmitter_get_scaleCurve},
-		{"ParticleEmitter_get_colorCurveR", Polycore_ParticleEmitter_get_colorCurveR},
-		{"ParticleEmitter_get_colorCurveG", Polycore_ParticleEmitter_get_colorCurveG},
-		{"ParticleEmitter_get_colorCurveB", Polycore_ParticleEmitter_get_colorCurveB},
-		{"ParticleEmitter_get_colorCurveA", Polycore_ParticleEmitter_get_colorCurveA},
-		{"ParticleEmitter_get_useColorCurves", Polycore_ParticleEmitter_get_useColorCurves},
-		{"ParticleEmitter_get_useScaleCurves", Polycore_ParticleEmitter_get_useScaleCurves},
-		{"ParticleEmitter_set_particleSpeedMod", Polycore_ParticleEmitter_set_particleSpeedMod},
-		{"ParticleEmitter_set_brightnessDeviation", Polycore_ParticleEmitter_set_brightnessDeviation},
-		{"ParticleEmitter_set_lifespan", Polycore_ParticleEmitter_set_lifespan},
-		{"ParticleEmitter_set_rotationFollowsPath", Polycore_ParticleEmitter_set_rotationFollowsPath},
-		{"ParticleEmitter_set_useColorCurves", Polycore_ParticleEmitter_set_useColorCurves},
-		{"ParticleEmitter_set_useScaleCurves", Polycore_ParticleEmitter_set_useScaleCurves},
-		{"ParticleEmitter", Polycore_ParticleEmitter},
-		{"ParticleEmitter_createParticles", Polycore_ParticleEmitter_createParticles},
-		{"ParticleEmitter_setRotationSpeed", Polycore_ParticleEmitter_setRotationSpeed},
-		{"ParticleEmitter_setParticleBlendingMode", Polycore_ParticleEmitter_setParticleBlendingMode},
-		{"ParticleEmitter_setDepthWrite", Polycore_ParticleEmitter_setDepthWrite},
-		{"ParticleEmitter_setDepthTest", Polycore_ParticleEmitter_setDepthTest},
-		{"ParticleEmitter_setAlphaTest", Polycore_ParticleEmitter_setAlphaTest},
-		{"ParticleEmitter_enablePerlin", Polycore_ParticleEmitter_enablePerlin},
-		{"ParticleEmitter_setParticleVisibility", Polycore_ParticleEmitter_setParticleVisibility},
-		{"ParticleEmitter_setPerlinModSize", Polycore_ParticleEmitter_setPerlinModSize},
-		{"ParticleEmitter_setBillboardMode", Polycore_ParticleEmitter_setBillboardMode},
-		{"ParticleEmitter_enableEmitter", Polycore_ParticleEmitter_enableEmitter},
-		{"ParticleEmitter_emitterEnabled", Polycore_ParticleEmitter_emitterEnabled},
-		{"ParticleEmitter_setEmitterRadius", Polycore_ParticleEmitter_setEmitterRadius},
-		{"ParticleEmitter_setAllAtOnce", Polycore_ParticleEmitter_setAllAtOnce},
-		{"ParticleEmitter_Trigger", Polycore_ParticleEmitter_Trigger},
-		{"ParticleEmitter_resetParticle", Polycore_ParticleEmitter_resetParticle},
-		{"ParticleEmitter_setParticleCount", Polycore_ParticleEmitter_setParticleCount},
-		{"ParticleEmitter_addParticleBody", Polycore_ParticleEmitter_addParticleBody},
-		{"ParticleEmitter_getBaseMatrix", Polycore_ParticleEmitter_getBaseMatrix},
-		{"ParticleEmitter_updateEmitter", Polycore_ParticleEmitter_updateEmitter},
-		{"delete_ParticleEmitter", Polycore_delete_ParticleEmitter},
-		{"Perlin", Polycore_Perlin},
-		{"Perlin_Get", Polycore_Perlin_Get},
-		{"delete_Perlin", Polycore_delete_Perlin},
-		{"Polygon_get_useVertexNormals", Polycore_Polygon_get_useVertexNormals},
-		{"Polygon_set_useVertexNormals", Polycore_Polygon_set_useVertexNormals},
-		{"Polygon", Polycore_Polygon},
-		{"Polygon_getVertexCount", Polycore_Polygon_getVertexCount},
-		{"Polygon_getVertex", Polycore_Polygon_getVertex},
-		{"Polygon_addVertex", Polycore_Polygon_addVertex},
-		{"Polygon_removeVertex", Polycore_Polygon_removeVertex},
-		{"Polygon_calculateNormal", Polycore_Polygon_calculateNormal},
-		{"Polygon_getFaceNormal", Polycore_Polygon_getFaceNormal},
-		{"Polygon_getBounds2D", Polycore_Polygon_getBounds2D},
-		{"Polygon_setNormal", Polycore_Polygon_setNormal},
-		{"Polygon_flipUVY", Polycore_Polygon_flipUVY},
-		{"delete_Polygon", Polycore_delete_Polygon},
-		{"Quaternion_get_x", Polycore_Quaternion_get_x},
-		{"Quaternion_get_y", Polycore_Quaternion_get_y},
-		{"Quaternion_get_z", Polycore_Quaternion_get_z},
-		{"Quaternion_get_w", Polycore_Quaternion_get_w},
-		{"Quaternion_set_x", Polycore_Quaternion_set_x},
-		{"Quaternion_set_y", Polycore_Quaternion_set_y},
-		{"Quaternion_set_z", Polycore_Quaternion_set_z},
-		{"Quaternion_set_w", Polycore_Quaternion_set_w},
-		{"Quaternion", Polycore_Quaternion},
-		{"Quaternion_setFromMatrix", Polycore_Quaternion_setFromMatrix},
-		{"Quaternion_Slerp", Polycore_Quaternion_Slerp},
-		{"Quaternion_Dot", Polycore_Quaternion_Dot},
-		{"Quaternion_Log", Polycore_Quaternion_Log},
-		{"Quaternion_Exp", Polycore_Quaternion_Exp},
-		{"Quaternion_Norm", Polycore_Quaternion_Norm},
-		{"Quaternion_normalize", Polycore_Quaternion_normalize},
-		{"Quaternion_lookAt", Polycore_Quaternion_lookAt},
-		{"Quaternion_createFromMatrix", Polycore_Quaternion_createFromMatrix},
-		{"Quaternion_Squad", Polycore_Quaternion_Squad},
-		{"Quaternion_Inverse", Polycore_Quaternion_Inverse},
-		{"Quaternion_set", Polycore_Quaternion_set},
-		{"Quaternion_inverse", Polycore_Quaternion_inverse},
-		{"Quaternion_InvSqrt", Polycore_Quaternion_InvSqrt},
-		{"Quaternion_fromAxes", Polycore_Quaternion_fromAxes},
-		{"Quaternion_FromAngleAxis", Polycore_Quaternion_FromAngleAxis},
-		{"Quaternion_ToAngleAxis", Polycore_Quaternion_ToAngleAxis},
-		{"Quaternion_createFromAxisAngle", Polycore_Quaternion_createFromAxisAngle},
-		{"Quaternion_createMatrix", Polycore_Quaternion_createMatrix},
-		{"delete_Quaternion", Polycore_delete_Quaternion},
-		{"QuaternionCurve", Polycore_QuaternionCurve},
-		{"QuaternionCurve_interpolate", Polycore_QuaternionCurve_interpolate},
-		{"QuaternionCurve_generatePointsFromCurves", Polycore_QuaternionCurve_generatePointsFromCurves},
-		{"QuaternionCurve_recalcTangents", Polycore_QuaternionCurve_recalcTangents},
-		{"delete_QuaternionCurve", Polycore_delete_QuaternionCurve},
-		{"Rectangle_get_x", Polycore_Rectangle_get_x},
-		{"Rectangle_get_y", Polycore_Rectangle_get_y},
-		{"Rectangle_get_w", Polycore_Rectangle_get_w},
-		{"Rectangle_get_h", Polycore_Rectangle_get_h},
-		{"Rectangle_set_x", Polycore_Rectangle_set_x},
-		{"Rectangle_set_y", Polycore_Rectangle_set_y},
-		{"Rectangle_set_w", Polycore_Rectangle_set_w},
-		{"Rectangle_set_h", Polycore_Rectangle_set_h},
-		{"Rectangle", Polycore_Rectangle},
-		{"Rectangle_setRect", Polycore_Rectangle_setRect},
-		{"delete_Rectangle", Polycore_delete_Rectangle},
+		{"FontManager", Polycore_FontManager},
+		{"FontManager_registerFont", Polycore_FontManager_registerFont},
+		{"FontManager_getFontByName", Polycore_FontManager_getFontByName},
+		{"delete_FontManager", Polycore_delete_FontManager},
 		{"Renderer_get_ambientColor", Polycore_Renderer_get_ambientColor},
 		{"Renderer_get_ambientColor", Polycore_Renderer_get_ambientColor},
 		{"Renderer_get_clearColor", Polycore_Renderer_get_clearColor},
 		{"Renderer_get_clearColor", Polycore_Renderer_get_clearColor},
 		{"Renderer_get_exposureLevel", Polycore_Renderer_get_exposureLevel},
 		{"Renderer_get_exposureLevel", Polycore_Renderer_get_exposureLevel},
@@ -712,27 +175,43 @@ int luaopen_Polycode(lua_State *L) {
 		{"Renderer_getNumSpotLights", Polycore_Renderer_getNumSpotLights},
 		{"Renderer_getNumSpotLights", Polycore_Renderer_getNumSpotLights},
 		{"Renderer_getNumLights", Polycore_Renderer_getNumLights},
 		{"Renderer_getNumLights", Polycore_Renderer_getNumLights},
 		{"delete_Renderer", Polycore_delete_Renderer},
 		{"delete_Renderer", Polycore_delete_Renderer},
-		{"Resource", Polycore_Resource},
-		{"Resource_getResourceName", Polycore_Resource_getResourceName},
-		{"Resource_getResourceType", Polycore_Resource_getResourceType},
-		{"Resource_setResourceName", Polycore_Resource_setResourceName},
-		{"Resource_setResourcePath", Polycore_Resource_setResourcePath},
-		{"Resource_getResourcePath", Polycore_Resource_getResourcePath},
-		{"delete_Resource", Polycore_delete_Resource},
-		{"ResourceManager", Polycore_ResourceManager},
-		{"ResourceManager_addResource", Polycore_ResourceManager_addResource},
-		{"ResourceManager_addDirResource", Polycore_ResourceManager_addDirResource},
-		{"ResourceManager_addArchive", Polycore_ResourceManager_addArchive},
-		{"ResourceManager_readFile", Polycore_ResourceManager_readFile},
-		{"ResourceManager_parseTextures", Polycore_ResourceManager_parseTextures},
-		{"ResourceManager_parseMaterials", Polycore_ResourceManager_parseMaterials},
-		{"ResourceManager_parseShaders", Polycore_ResourceManager_parseShaders},
-		{"ResourceManager_parsePrograms", Polycore_ResourceManager_parsePrograms},
-		{"ResourceManager_parseCubemaps", Polycore_ResourceManager_parseCubemaps},
-		{"ResourceManager_parseOthers", Polycore_ResourceManager_parseOthers},
-		{"ResourceManager_getResource", Polycore_ResourceManager_getResource},
-		{"ResourceManager_addShaderModule", Polycore_ResourceManager_addShaderModule},
-		{"delete_ResourceManager", Polycore_delete_ResourceManager},
+		{"SceneEntity_get_castShadows", Polycore_SceneEntity_get_castShadows},
+		{"SceneEntity_set_castShadows", Polycore_SceneEntity_set_castShadows},
+		{"SceneEntity", Polycore_SceneEntity},
+		{"SceneEntity_testMouseCollision", Polycore_SceneEntity_testMouseCollision},
+		{"delete_SceneEntity", Polycore_delete_SceneEntity},
+		{"Texture_get_scrollSpeedX", Polycore_Texture_get_scrollSpeedX},
+		{"Texture_get_scrollSpeedY", Polycore_Texture_get_scrollSpeedY},
+		{"Texture_get_clamp", Polycore_Texture_get_clamp},
+		{"Texture_set_scrollSpeedX", Polycore_Texture_set_scrollSpeedX},
+		{"Texture_set_scrollSpeedY", Polycore_Texture_set_scrollSpeedY},
+		{"Texture_set_clamp", Polycore_Texture_set_clamp},
+		{"Texture_setTextureData", Polycore_Texture_setTextureData},
+		{"Texture_recreateFromImageData", Polycore_Texture_recreateFromImageData},
+		{"Texture_getScrollOffsetX", Polycore_Texture_getScrollOffsetX},
+		{"Texture_getScrollOffsetY", Polycore_Texture_getScrollOffsetY},
+		{"Texture_setImageData", Polycore_Texture_setImageData},
+		{"Texture_updateScroll", Polycore_Texture_updateScroll},
+		{"Texture_setResourcePath", Polycore_Texture_setResourcePath},
+		{"Texture_getResourcePath", Polycore_Texture_getResourcePath},
+		{"Texture_getTextureData", Polycore_Texture_getTextureData},
+		{"Texture_getWidth", Polycore_Texture_getWidth},
+		{"Texture_getHeight", Polycore_Texture_getHeight},
+		{"delete_Texture", Polycore_delete_Texture},
+		{"Vector3_get_x", Polycore_Vector3_get_x},
+		{"Vector3_get_y", Polycore_Vector3_get_y},
+		{"Vector3_get_z", Polycore_Vector3_get_z},
+		{"Vector3_set_x", Polycore_Vector3_set_x},
+		{"Vector3_set_y", Polycore_Vector3_set_y},
+		{"Vector3_set_z", Polycore_Vector3_set_z},
+		{"Vector3", Polycore_Vector3},
+		{"Vector3_set", Polycore_Vector3_set},
+		{"Vector3_distance", Polycore_Vector3_distance},
+		{"Vector3_length", Polycore_Vector3_length},
+		{"Vector3_dot", Polycore_Vector3_dot},
+		{"Vector3_crossProduct", Polycore_Vector3_crossProduct},
+		{"Vector3_Normalize", Polycore_Vector3_Normalize},
+		{"delete_Vector3", Polycore_delete_Vector3},
 		{"Scene_get_clearColor", Polycore_Scene_get_clearColor},
 		{"Scene_get_clearColor", Polycore_Scene_get_clearColor},
 		{"Scene_get_useClearColor", Polycore_Scene_get_useClearColor},
 		{"Scene_get_useClearColor", Polycore_Scene_get_useClearColor},
 		{"Scene_get_ambientColor", Polycore_Scene_get_ambientColor},
 		{"Scene_get_ambientColor", Polycore_Scene_get_ambientColor},
@@ -773,90 +252,6 @@ int luaopen_Polycode(lua_State *L) {
 		{"Scene_getLight", Polycore_Scene_getLight},
 		{"Scene_getLight", Polycore_Scene_getLight},
 		{"Scene_getCustomEntityByType", Polycore_Scene_getCustomEntityByType},
 		{"Scene_getCustomEntityByType", Polycore_Scene_getCustomEntityByType},
 		{"delete_Scene", Polycore_delete_Scene},
 		{"delete_Scene", Polycore_delete_Scene},
-		{"SceneEntity_get_castShadows", Polycore_SceneEntity_get_castShadows},
-		{"SceneEntity_set_castShadows", Polycore_SceneEntity_set_castShadows},
-		{"SceneEntity", Polycore_SceneEntity},
-		{"SceneEntity_testMouseCollision", Polycore_SceneEntity_testMouseCollision},
-		{"delete_SceneEntity", Polycore_delete_SceneEntity},
-		{"SceneLabel", Polycore_SceneLabel},
-		{"SceneLabel_testMouseCollision", Polycore_SceneLabel_testMouseCollision},
-		{"SceneLabel_setText", Polycore_SceneLabel_setText},
-		{"SceneLabel_getLabel", Polycore_SceneLabel_getLabel},
-		{"SceneLabel_Render", Polycore_SceneLabel_Render},
-		{"delete_SceneLabel", Polycore_delete_SceneLabel},
-		{"SceneLight_get_specularLightColor", Polycore_SceneLight_get_specularLightColor},
-		{"SceneLight_get_lightColor", Polycore_SceneLight_get_lightColor},
-		{"SceneLight", Polycore_SceneLight},
-		{"SceneLight_getIntensity", Polycore_SceneLight_getIntensity},
-		{"SceneLight_setIntensity", Polycore_SceneLight_setIntensity},
-		{"SceneLight_setAttenuation", Polycore_SceneLight_setAttenuation},
-		{"SceneLight_getConstantAttenuation", Polycore_SceneLight_getConstantAttenuation},
-		{"SceneLight_getLinearAttenuation", Polycore_SceneLight_getLinearAttenuation},
-		{"SceneLight_getQuadraticAttenuation", Polycore_SceneLight_getQuadraticAttenuation},
-		{"SceneLight_getType", Polycore_SceneLight_getType},
-		{"SceneLight_renderDepthMap", Polycore_SceneLight_renderDepthMap},
-		{"SceneLight_Render", Polycore_SceneLight_Render},
-		{"SceneLight_getLightViewMatrix", Polycore_SceneLight_getLightViewMatrix},
-		{"SceneLight_getZBufferTexture", Polycore_SceneLight_getZBufferTexture},
-		{"SceneLight_setSpecularLightColor", Polycore_SceneLight_setSpecularLightColor},
-		{"SceneLight_setDiffuseLightColor", Polycore_SceneLight_setDiffuseLightColor},
-		{"SceneLight_setLightColor", Polycore_SceneLight_setLightColor},
-		{"SceneLight_setSpotlightProperties", Polycore_SceneLight_setSpotlightProperties},
-		{"SceneLight_getSpotlightCutoff", Polycore_SceneLight_getSpotlightCutoff},
-		{"SceneLight_getSpotlightExponent", Polycore_SceneLight_getSpotlightExponent},
-		{"SceneLight_enableShadows", Polycore_SceneLight_enableShadows},
-		{"SceneLight_setShadowMapFOV", Polycore_SceneLight_setShadowMapFOV},
-		{"SceneLight_areShadowsEnabled", Polycore_SceneLight_areShadowsEnabled},
-		{"SceneLight_getLightType", Polycore_SceneLight_getLightType},
-		{"SceneLight_enableDebugDraw", Polycore_SceneLight_enableDebugDraw},
-		{"SceneLight_setLightImportance", Polycore_SceneLight_setLightImportance},
-		{"SceneLight_getLightImportance", Polycore_SceneLight_getLightImportance},
-		{"delete_SceneLight", Polycore_delete_SceneLight},
-		{"SceneLine", Polycore_SceneLine},
-		{"SceneLine_Render", Polycore_SceneLine_Render},
-		{"delete_SceneLine", Polycore_delete_SceneLine},
-		{"SceneManager", Polycore_SceneManager},
-		{"SceneManager_addScene", Polycore_SceneManager_addScene},
-		{"SceneManager_Update", Polycore_SceneManager_Update},
-		{"SceneManager_UpdateVirtual", Polycore_SceneManager_UpdateVirtual},
-		{"SceneManager_removeScene", Polycore_SceneManager_removeScene},
-		{"SceneManager_registerRenderTexture", Polycore_SceneManager_registerRenderTexture},
-		{"delete_SceneManager", Polycore_delete_SceneManager},
-		{"SceneMesh_get_lightmapIndex", Polycore_SceneMesh_get_lightmapIndex},
-		{"SceneMesh_get_showVertexNormals", Polycore_SceneMesh_get_showVertexNormals},
-		{"SceneMesh_set_showVertexNormals", Polycore_SceneMesh_set_showVertexNormals},
-		{"SceneMesh", Polycore_SceneMesh},
-		{"SceneMesh_Render", Polycore_SceneMesh_Render},
-		{"SceneMesh_getLocalShaderOptions", Polycore_SceneMesh_getLocalShaderOptions},
-		{"SceneMesh_getMesh", Polycore_SceneMesh_getMesh},
-		{"SceneMesh_getTexture", Polycore_SceneMesh_getTexture},
-		{"SceneMesh_getMaterial", Polycore_SceneMesh_getMaterial},
-		{"SceneMesh_loadTexture", Polycore_SceneMesh_loadTexture},
-		{"SceneMesh_loadSkeleton", Polycore_SceneMesh_loadSkeleton},
-		{"SceneMesh_setTexture", Polycore_SceneMesh_setTexture},
-		{"SceneMesh_setMaterial", Polycore_SceneMesh_setMaterial},
-		{"SceneMesh_setMaterialByName", Polycore_SceneMesh_setMaterialByName},
-		{"SceneMesh_setMesh", Polycore_SceneMesh_setMesh},
-		{"SceneMesh_setSkeleton", Polycore_SceneMesh_setSkeleton},
-		{"SceneMesh_getSkeleton", Polycore_SceneMesh_getSkeleton},
-		{"SceneMesh_renderMeshLocally", Polycore_SceneMesh_renderMeshLocally},
-		{"SceneMesh_cacheToVertexBuffer", Polycore_SceneMesh_cacheToVertexBuffer},
-		{"delete_SceneMesh", Polycore_delete_SceneMesh},
-		{"ScenePrimitive", Polycore_ScenePrimitive},
-		{"delete_ScenePrimitive", Polycore_delete_ScenePrimitive},
-		{"SceneRenderTexture", Polycore_SceneRenderTexture},
-		{"SceneRenderTexture_drawScreen", Polycore_SceneRenderTexture_drawScreen},
-		{"SceneRenderTexture_getTargetTexture", Polycore_SceneRenderTexture_getTargetTexture},
-		{"SceneRenderTexture_getTargetScene", Polycore_SceneRenderTexture_getTargetScene},
-		{"SceneRenderTexture_getTargetCamera", Polycore_SceneRenderTexture_getTargetCamera},
-		{"delete_SceneRenderTexture", Polycore_delete_SceneRenderTexture},
-		{"SceneSound", Polycore_SceneSound},
-		{"SceneSound_Update", Polycore_SceneSound_Update},
-		{"SceneSound_getSound", Polycore_SceneSound_getSound},
-		{"delete_SceneSound", Polycore_delete_SceneSound},
-		{"SceneSoundListener", Polycore_SceneSoundListener},
-		{"SceneSoundListener_Update", Polycore_SceneSoundListener_Update},
-		{"delete_SceneSoundListener", Polycore_delete_SceneSoundListener},
 		{"Screen_get_enabled", Polycore_Screen_get_enabled},
 		{"Screen_get_enabled", Polycore_Screen_get_enabled},
 		{"Screen_set_enabled", Polycore_Screen_set_enabled},
 		{"Screen_set_enabled", Polycore_Screen_set_enabled},
 		{"Screen", Polycore_Screen},
 		{"Screen", Polycore_Screen},
@@ -883,307 +278,905 @@ int luaopen_Polycode(lua_State *L) {
 		{"Screen_getRootEntity", Polycore_Screen_getRootEntity},
 		{"Screen_getRootEntity", Polycore_Screen_getRootEntity},
 		{"Screen_getScreenShaderMaterial", Polycore_Screen_getScreenShaderMaterial},
 		{"Screen_getScreenShaderMaterial", Polycore_Screen_getScreenShaderMaterial},
 		{"delete_Screen", Polycore_delete_Screen},
 		{"delete_Screen", Polycore_delete_Screen},
+		{"Vertex_get_restNormal", Polycore_Vertex_get_restNormal},
+		{"Vertex_get_restPosition", Polycore_Vertex_get_restPosition},
+		{"Vertex_get_normal", Polycore_Vertex_get_normal},
+		{"Vertex_get_vertexColor", Polycore_Vertex_get_vertexColor},
+		{"Vertex_get_useVertexColor", Polycore_Vertex_get_useVertexColor},
+		{"Vertex_set_useVertexColor", Polycore_Vertex_set_useVertexColor},
+		{"Vertex", Polycore_Vertex},
+		{"Vertex_addBoneAssignment", Polycore_Vertex_addBoneAssignment},
+		{"Vertex_getNumBoneAssignments", Polycore_Vertex_getNumBoneAssignments},
+		{"Vertex_getBoneAssignment", Polycore_Vertex_getBoneAssignment},
+		{"Vertex_normalizeWeights", Polycore_Vertex_normalizeWeights},
+		{"Vertex_getTexCoord", Polycore_Vertex_getTexCoord},
+		{"Vertex_setTexCoord", Polycore_Vertex_setTexCoord},
+		{"Vertex_setNormal", Polycore_Vertex_setNormal},
+		{"delete_Vertex", Polycore_delete_Vertex},
+		{"ScreenImage", Polycore_ScreenImage},
+		{"ScreenImage_setImageCoordinates", Polycore_ScreenImage_setImageCoordinates},
+		{"ScreenImage_getImageWidth", Polycore_ScreenImage_getImageWidth},
+		{"ScreenImage_getImageHeight", Polycore_ScreenImage_getImageHeight},
+		{"delete_ScreenImage", Polycore_delete_ScreenImage},
+		{"ResourceManager", Polycore_ResourceManager},
+		{"ResourceManager_addResource", Polycore_ResourceManager_addResource},
+		{"ResourceManager_addDirResource", Polycore_ResourceManager_addDirResource},
+		{"ResourceManager_addArchive", Polycore_ResourceManager_addArchive},
+		{"ResourceManager_readFile", Polycore_ResourceManager_readFile},
+		{"ResourceManager_parseTextures", Polycore_ResourceManager_parseTextures},
+		{"ResourceManager_parseMaterials", Polycore_ResourceManager_parseMaterials},
+		{"ResourceManager_parseShaders", Polycore_ResourceManager_parseShaders},
+		{"ResourceManager_parsePrograms", Polycore_ResourceManager_parsePrograms},
+		{"ResourceManager_parseCubemaps", Polycore_ResourceManager_parseCubemaps},
+		{"ResourceManager_parseOthers", Polycore_ResourceManager_parseOthers},
+		{"ResourceManager_getResource", Polycore_ResourceManager_getResource},
+		{"ResourceManager_addShaderModule", Polycore_ResourceManager_addShaderModule},
+		{"delete_ResourceManager", Polycore_delete_ResourceManager},
+		{"ScreenMesh", Polycore_ScreenMesh},
+		{"ScreenMesh_Render", Polycore_ScreenMesh_Render},
+		{"ScreenMesh_getMesh", Polycore_ScreenMesh_getMesh},
+		{"ScreenMesh_getTexture", Polycore_ScreenMesh_getTexture},
+		{"ScreenMesh_loadTexture", Polycore_ScreenMesh_loadTexture},
+		{"ScreenMesh_setTexture", Polycore_ScreenMesh_setTexture},
+		{"delete_ScreenMesh", Polycore_delete_ScreenMesh},
+		{"ScenePrimitive", Polycore_ScenePrimitive},
+		{"delete_ScenePrimitive", Polycore_delete_ScenePrimitive},
+		{"SceneSound", Polycore_SceneSound},
+		{"SceneSound_Update", Polycore_SceneSound_Update},
+		{"SceneSound_getSound", Polycore_SceneSound_getSound},
+		{"delete_SceneSound", Polycore_delete_SceneSound},
+		{"SceneSoundListener", Polycore_SceneSoundListener},
+		{"SceneSoundListener_Update", Polycore_SceneSoundListener_Update},
+		{"delete_SceneSoundListener", Polycore_delete_SceneSoundListener},
+		{"Config", Polycore_Config},
+		{"Config_loadConfig", Polycore_Config_loadConfig},
+		{"Config_saveConfig", Polycore_Config_saveConfig},
+		{"Config_getEntry", Polycore_Config_getEntry},
+		{"Config_setStringValue", Polycore_Config_setStringValue},
+		{"Config_setNumericValue", Polycore_Config_setNumericValue},
+		{"Config_getNumericValue", Polycore_Config_getNumericValue},
+		{"Config_getStringValue", Polycore_Config_getStringValue},
+		{"delete_Config", Polycore_delete_Config},
+		{"QuaternionTween", Polycore_QuaternionTween},
+		{"QuaternionTween_updateCustomTween", Polycore_QuaternionTween_updateCustomTween},
+		{"delete_QuaternionTween", Polycore_delete_QuaternionTween},
+		{"Tween_get_repeat", Polycore_Tween_get_repeat},
+		{"Tween_set_repeat", Polycore_Tween_set_repeat},
+		{"Tween", Polycore_Tween},
+		{"Tween_interpolateTween", Polycore_Tween_interpolateTween},
+		{"Tween_updateCustomTween", Polycore_Tween_updateCustomTween},
+		{"Tween_doOnComplete", Polycore_Tween_doOnComplete},
+		{"Tween_Pause", Polycore_Tween_Pause},
+		{"Tween_Reset", Polycore_Tween_Reset},
+		{"Tween_isComplete", Polycore_Tween_isComplete},
+		{"Tween_setSpeed", Polycore_Tween_setSpeed},
+		{"delete_Tween", Polycore_delete_Tween},
+		{"BezierPathTween", Polycore_BezierPathTween},
+		{"BezierPathTween_updateCustomTween", Polycore_BezierPathTween_updateCustomTween},
+		{"delete_BezierPathTween", Polycore_delete_BezierPathTween},
+		{"QuaternionCurve", Polycore_QuaternionCurve},
+		{"QuaternionCurve_interpolate", Polycore_QuaternionCurve_interpolate},
+		{"QuaternionCurve_generatePointsFromCurves", Polycore_QuaternionCurve_generatePointsFromCurves},
+		{"QuaternionCurve_recalcTangents", Polycore_QuaternionCurve_recalcTangents},
+		{"delete_QuaternionCurve", Polycore_delete_QuaternionCurve},
+		{"SceneManager", Polycore_SceneManager},
+		{"SceneManager_addScene", Polycore_SceneManager_addScene},
+		{"SceneManager_Update", Polycore_SceneManager_Update},
+		{"SceneManager_UpdateVirtual", Polycore_SceneManager_UpdateVirtual},
+		{"SceneManager_removeScene", Polycore_SceneManager_removeScene},
+		{"SceneManager_registerRenderTexture", Polycore_SceneManager_registerRenderTexture},
+		{"delete_SceneManager", Polycore_delete_SceneManager},
+		{"Matrix4", Polycore_Matrix4},
+		{"Matrix4_identity", Polycore_Matrix4_identity},
+		{"Matrix4_rotateVector", Polycore_Matrix4_rotateVector},
+		{"Matrix4_getPosition", Polycore_Matrix4_getPosition},
+		{"Matrix4_setPosition", Polycore_Matrix4_setPosition},
+		{"Matrix4_setScale", Polycore_Matrix4_setScale},
+		{"Matrix4_getEulerAngles", Polycore_Matrix4_getEulerAngles},
+		{"Matrix4_inverse", Polycore_Matrix4_inverse},
+		{"Matrix4_inverseAffine", Polycore_Matrix4_inverseAffine},
+		{"delete_Matrix4", Polycore_delete_Matrix4},
+		{"SceneLine", Polycore_SceneLine},
+		{"SceneLine_Render", Polycore_SceneLine_Render},
+		{"delete_SceneLine", Polycore_delete_SceneLine},
+		{"ScreenEvent", Polycore_ScreenEvent},
+		{"delete_ScreenEvent", Polycore_delete_ScreenEvent},
+		{"Bone_get_parentBoneId", Polycore_Bone_get_parentBoneId},
+		{"Bone_get_boneMatrix", Polycore_Bone_get_boneMatrix},
+		{"Bone_get_restMatrix", Polycore_Bone_get_restMatrix},
+		{"Bone_get_baseMatrix", Polycore_Bone_get_baseMatrix},
+		{"Bone_set_parentBoneId", Polycore_Bone_set_parentBoneId},
+		{"Bone", Polycore_Bone},
+		{"Bone_enableBoneLabel", Polycore_Bone_enableBoneLabel},
+		{"Bone_getName", Polycore_Bone_getName},
+		{"Bone_Render", Polycore_Bone_Render},
+		{"Bone_setParentBone", Polycore_Bone_setParentBone},
+		{"Bone_addChildBone", Polycore_Bone_addChildBone},
+		{"Bone_getParentBone", Polycore_Bone_getParentBone},
+		{"Bone_getNumChildBones", Polycore_Bone_getNumChildBones},
+		{"Bone_getChildBone", Polycore_Bone_getChildBone},
+		{"Bone_getBoneMatrix", Polycore_Bone_getBoneMatrix},
+		{"Bone_setBoneMatrix", Polycore_Bone_setBoneMatrix},
+		{"Bone_getRestMatrix", Polycore_Bone_getRestMatrix},
+		{"Bone_getFullRestMatrix", Polycore_Bone_getFullRestMatrix},
+		{"Bone_getParentRestMatrix", Polycore_Bone_getParentRestMatrix},
+		{"Bone_getFinalMatrix", Polycore_Bone_getFinalMatrix},
+		{"Bone_setRestMatrix", Polycore_Bone_setRestMatrix},
+		{"Bone_setBaseMatrix", Polycore_Bone_setBaseMatrix},
+		{"Bone_getBaseMatrix", Polycore_Bone_getBaseMatrix},
+		{"Bone_getFullBaseMatrix", Polycore_Bone_getFullBaseMatrix},
+		{"delete_Bone", Polycore_delete_Bone},
+		{"SceneMesh_get_lightmapIndex", Polycore_SceneMesh_get_lightmapIndex},
+		{"SceneMesh_get_showVertexNormals", Polycore_SceneMesh_get_showVertexNormals},
+		{"SceneMesh_set_showVertexNormals", Polycore_SceneMesh_set_showVertexNormals},
+		{"SceneMesh", Polycore_SceneMesh},
+		{"SceneMesh_Render", Polycore_SceneMesh_Render},
+		{"SceneMesh_getLocalShaderOptions", Polycore_SceneMesh_getLocalShaderOptions},
+		{"SceneMesh_getMesh", Polycore_SceneMesh_getMesh},
+		{"SceneMesh_getTexture", Polycore_SceneMesh_getTexture},
+		{"SceneMesh_getMaterial", Polycore_SceneMesh_getMaterial},
+		{"SceneMesh_loadTexture", Polycore_SceneMesh_loadTexture},
+		{"SceneMesh_loadSkeleton", Polycore_SceneMesh_loadSkeleton},
+		{"SceneMesh_setTexture", Polycore_SceneMesh_setTexture},
+		{"SceneMesh_setMaterial", Polycore_SceneMesh_setMaterial},
+		{"SceneMesh_setMaterialByName", Polycore_SceneMesh_setMaterialByName},
+		{"SceneMesh_setMesh", Polycore_SceneMesh_setMesh},
+		{"SceneMesh_setSkeleton", Polycore_SceneMesh_setSkeleton},
+		{"SceneMesh_getSkeleton", Polycore_SceneMesh_getSkeleton},
+		{"SceneMesh_renderMeshLocally", Polycore_SceneMesh_renderMeshLocally},
+		{"SceneMesh_cacheToVertexBuffer", Polycore_SceneMesh_cacheToVertexBuffer},
+		{"delete_SceneMesh", Polycore_delete_SceneMesh},
+		{"Sound", Polycore_Sound},
+		{"Sound_Play", Polycore_Sound_Play},
+		{"Sound_Stop", Polycore_Sound_Stop},
+		{"Sound_setVolume", Polycore_Sound_setVolume},
+		{"Sound_setPitch", Polycore_Sound_setPitch},
+		{"Sound_setIsPositional", Polycore_Sound_setIsPositional},
+		{"Sound_setSoundPosition", Polycore_Sound_setSoundPosition},
+		{"Sound_setSoundVelocity", Polycore_Sound_setSoundVelocity},
+		{"Sound_setSoundDirection", Polycore_Sound_setSoundDirection},
+		{"Sound_setPositionalProperties", Polycore_Sound_setPositionalProperties},
+		{"Sound_loadWAV", Polycore_Sound_loadWAV},
+		{"Sound_loadOGG", Polycore_Sound_loadOGG},
+		{"Sound_GenSource", Polycore_Sound_GenSource},
+		{"Sound_checkALError", Polycore_Sound_checkALError},
+		{"Sound_soundError", Polycore_Sound_soundError},
+		{"Sound_soundCheck", Polycore_Sound_soundCheck},
+		{"delete_Sound", Polycore_delete_Sound},
+		{"Shader_get_numSpotLights", Polycore_Shader_get_numSpotLights},
+		{"Shader_get_numAreaLights", Polycore_Shader_get_numAreaLights},
+		{"Shader_set_numSpotLights", Polycore_Shader_set_numSpotLights},
+		{"Shader_set_numAreaLights", Polycore_Shader_set_numAreaLights},
+		{"Shader_getType", Polycore_Shader_getType},
+		{"Shader_setName", Polycore_Shader_setName},
+		{"Shader_getName", Polycore_Shader_getName},
+		{"Shader_createBinding", Polycore_Shader_createBinding},
+		{"delete_Shader", Polycore_delete_Shader},
+		{"ShaderBinding", Polycore_ShaderBinding},
+		{"ShaderBinding_clearTexture", Polycore_ShaderBinding_clearTexture},
+		{"ShaderBinding_addTexture", Polycore_ShaderBinding_addTexture},
+		{"ShaderBinding_addParam", Polycore_ShaderBinding_addParam},
+		{"ShaderBinding_addCubemap", Polycore_ShaderBinding_addCubemap},
+		{"ShaderBinding_getNumLocalParams", Polycore_ShaderBinding_getNumLocalParams},
+		{"ShaderBinding_getLocalParam", Polycore_ShaderBinding_getLocalParam},
+		{"ShaderBinding_getLocalParamByName", Polycore_ShaderBinding_getLocalParamByName},
+		{"ShaderBinding_addRenderTargetBinding", Polycore_ShaderBinding_addRenderTargetBinding},
+		{"ShaderBinding_getNumRenderTargetBindings", Polycore_ShaderBinding_getNumRenderTargetBindings},
+		{"ShaderBinding_getRenderTargetBinding", Polycore_ShaderBinding_getRenderTargetBinding},
+		{"ShaderBinding_getNumInTargetBindings", Polycore_ShaderBinding_getNumInTargetBindings},
+		{"ShaderBinding_getInTargetBinding", Polycore_ShaderBinding_getInTargetBinding},
+		{"ShaderBinding_getNumOutTargetBindings", Polycore_ShaderBinding_getNumOutTargetBindings},
+		{"ShaderBinding_getOutTargetBinding", Polycore_ShaderBinding_getOutTargetBinding},
+		{"ShaderBinding_addLocalParam", Polycore_ShaderBinding_addLocalParam},
+		{"delete_ShaderBinding", Polycore_delete_ShaderBinding},
+		{"ObjectEntry_get_type", Polycore_ObjectEntry_get_type},
+		{"ObjectEntry_get_name", Polycore_ObjectEntry_get_name},
+		{"ObjectEntry_get_NumberVal", Polycore_ObjectEntry_get_NumberVal},
+		{"ObjectEntry_get_intVal", Polycore_ObjectEntry_get_intVal},
+		{"ObjectEntry_get_stringVal", Polycore_ObjectEntry_get_stringVal},
+		{"ObjectEntry_get_boolVal", Polycore_ObjectEntry_get_boolVal},
+		{"ObjectEntry_get_length", Polycore_ObjectEntry_get_length},
+		{"ObjectEntry_set_type", Polycore_ObjectEntry_set_type},
+		{"ObjectEntry_set_name", Polycore_ObjectEntry_set_name},
+		{"ObjectEntry_set_NumberVal", Polycore_ObjectEntry_set_NumberVal},
+		{"ObjectEntry_set_intVal", Polycore_ObjectEntry_set_intVal},
+		{"ObjectEntry_set_stringVal", Polycore_ObjectEntry_set_stringVal},
+		{"ObjectEntry_set_boolVal", Polycore_ObjectEntry_set_boolVal},
+		{"ObjectEntry_set_length", Polycore_ObjectEntry_set_length},
+		{"ObjectEntry", Polycore_ObjectEntry},
+		{"ObjectEntry_addChild", Polycore_ObjectEntry_addChild},
+		{"delete_ObjectEntry", Polycore_delete_ObjectEntry},
+		{"ScreenManager", Polycore_ScreenManager},
+		{"ScreenManager_removeScreen", Polycore_ScreenManager_removeScreen},
+		{"ScreenManager_addScreen", Polycore_ScreenManager_addScreen},
+		{"ScreenManager_Update", Polycore_ScreenManager_Update},
+		{"delete_ScreenManager", Polycore_delete_ScreenManager},
+		{"Vector2", Polycore_Vector2},
+		{"delete_Vector2", Polycore_delete_Vector2},
+		{"EventDispatcher", Polycore_EventDispatcher},
+		{"EventDispatcher_removeAllHandlers", Polycore_EventDispatcher_removeAllHandlers},
+		{"EventDispatcher_removeAllHandlersForListener", Polycore_EventDispatcher_removeAllHandlersForListener},
+		{"EventDispatcher_addEventListener", Polycore_EventDispatcher_addEventListener},
+		{"EventDispatcher_removeEventListener", Polycore_EventDispatcher_removeEventListener},
+		{"EventDispatcher___dispatchEvent", Polycore_EventDispatcher___dispatchEvent},
+		{"EventDispatcher_dispatchEvent", Polycore_EventDispatcher_dispatchEvent},
+		{"EventDispatcher_dispatchEventNoDelete", Polycore_EventDispatcher_dispatchEventNoDelete},
+		{"delete_EventDispatcher", Polycore_delete_EventDispatcher},
+		{"SoundManager", Polycore_SoundManager},
+		{"SoundManager_setListenerPosition", Polycore_SoundManager_setListenerPosition},
+		{"SoundManager_setListenerOrientation", Polycore_SoundManager_setListenerOrientation},
+		{"SoundManager_initAL", Polycore_SoundManager_initAL},
+		{"SoundManager_setGlobalVolume", Polycore_SoundManager_setGlobalVolume},
+		{"delete_SoundManager", Polycore_delete_SoundManager},
+		{"Logger", Polycore_Logger},
+		{"Logger_log", Polycore_Logger_log},
+		{"Logger_logw", Polycore_Logger_logw},
+		{"delete_Logger", Polycore_delete_Logger},
+		{"Image", Polycore_Image},
+		{"Image_loadImage", Polycore_Image_loadImage},
+		{"Image_loadPNG", Polycore_Image_loadPNG},
+		{"Image_createEmpty", Polycore_Image_createEmpty},
+		{"Image_fill", Polycore_Image_fill},
+		{"Image_setPixel", Polycore_Image_setPixel},
+		{"Image_getPixel", Polycore_Image_getPixel},
+		{"Image_swap", Polycore_Image_swap},
+		{"Image_line", Polycore_Image_line},
+		{"Image_moveTo", Polycore_Image_moveTo},
+		{"Image_move", Polycore_Image_move},
+		{"Image_lineTo", Polycore_Image_lineTo},
+		{"Image_drawRect", Polycore_Image_drawRect},
+		{"Image_perlinNoise", Polycore_Image_perlinNoise},
+		{"Image_fastBlur", Polycore_Image_fastBlur},
+		{"Image_fastBlurVert", Polycore_Image_fastBlurVert},
+		{"Image_fastBlurHor", Polycore_Image_fastBlurHor},
+		{"Image_darken", Polycore_Image_darken},
+		{"Image_lighten", Polycore_Image_lighten},
+		{"Image_multiply", Polycore_Image_multiply},
+		{"Image_getBrushX", Polycore_Image_getBrushX},
+		{"Image_getBrushY", Polycore_Image_getBrushY},
+		{"Image_isLoaded", Polycore_Image_isLoaded},
+		{"Image_getType", Polycore_Image_getType},
+		{"Image_writeBMP", Polycore_Image_writeBMP},
+		{"Image_getWidth", Polycore_Image_getWidth},
+		{"Image_getHeight", Polycore_Image_getHeight},
+		{"Image_getPixels", Polycore_Image_getPixels},
+		{"delete_Image", Polycore_delete_Image},
+		{"Perlin", Polycore_Perlin},
+		{"Perlin_Get", Polycore_Perlin_Get},
+		{"delete_Perlin", Polycore_delete_Perlin},
+		{"ScreenLabel", Polycore_ScreenLabel},
+		{"ScreenLabel_addDropShadow", Polycore_ScreenLabel_addDropShadow},
+		{"ScreenLabel_setText", Polycore_ScreenLabel_setText},
+		{"ScreenLabel_getText", Polycore_ScreenLabel_getText},
+		{"ScreenLabel_getLabel", Polycore_ScreenLabel_getLabel},
+		{"delete_ScreenLabel", Polycore_delete_ScreenLabel},
+		{"Cubemap", Polycore_Cubemap},
+		{"delete_Cubemap", Polycore_delete_Cubemap},
+		{"SceneLabel", Polycore_SceneLabel},
+		{"SceneLabel_testMouseCollision", Polycore_SceneLabel_testMouseCollision},
+		{"SceneLabel_setText", Polycore_SceneLabel_setText},
+		{"SceneLabel_getLabel", Polycore_SceneLabel_getLabel},
+		{"SceneLabel_Render", Polycore_SceneLabel_Render},
+		{"delete_SceneLabel", Polycore_delete_SceneLabel},
+		{"TimerManager", Polycore_TimerManager},
+		{"TimerManager_removeTimer", Polycore_TimerManager_removeTimer},
+		{"TimerManager_addTimer", Polycore_TimerManager_addTimer},
+		{"TimerManager_Update", Polycore_TimerManager_Update},
+		{"delete_TimerManager", Polycore_delete_TimerManager},
+		{"Quaternion_get_x", Polycore_Quaternion_get_x},
+		{"Quaternion_get_y", Polycore_Quaternion_get_y},
+		{"Quaternion_get_z", Polycore_Quaternion_get_z},
+		{"Quaternion_get_w", Polycore_Quaternion_get_w},
+		{"Quaternion_set_x", Polycore_Quaternion_set_x},
+		{"Quaternion_set_y", Polycore_Quaternion_set_y},
+		{"Quaternion_set_z", Polycore_Quaternion_set_z},
+		{"Quaternion_set_w", Polycore_Quaternion_set_w},
+		{"Quaternion", Polycore_Quaternion},
+		{"Quaternion_setFromMatrix", Polycore_Quaternion_setFromMatrix},
+		{"Quaternion_Slerp", Polycore_Quaternion_Slerp},
+		{"Quaternion_Dot", Polycore_Quaternion_Dot},
+		{"Quaternion_Log", Polycore_Quaternion_Log},
+		{"Quaternion_Exp", Polycore_Quaternion_Exp},
+		{"Quaternion_Norm", Polycore_Quaternion_Norm},
+		{"Quaternion_normalize", Polycore_Quaternion_normalize},
+		{"Quaternion_lookAt", Polycore_Quaternion_lookAt},
+		{"Quaternion_createFromMatrix", Polycore_Quaternion_createFromMatrix},
+		{"Quaternion_Squad", Polycore_Quaternion_Squad},
+		{"Quaternion_Inverse", Polycore_Quaternion_Inverse},
+		{"Quaternion_set", Polycore_Quaternion_set},
+		{"Quaternion_inverse", Polycore_Quaternion_inverse},
+		{"Quaternion_InvSqrt", Polycore_Quaternion_InvSqrt},
+		{"Quaternion_fromAxes", Polycore_Quaternion_fromAxes},
+		{"Quaternion_FromAngleAxis", Polycore_Quaternion_FromAngleAxis},
+		{"Quaternion_ToAngleAxis", Polycore_Quaternion_ToAngleAxis},
+		{"Quaternion_createFromAxisAngle", Polycore_Quaternion_createFromAxisAngle},
+		{"Quaternion_createMatrix", Polycore_Quaternion_createMatrix},
+		{"delete_Quaternion", Polycore_delete_Quaternion},
+		{"Label", Polycore_Label},
+		{"Label_setText", Polycore_Label_setText},
+		{"Label_getText", Polycore_Label_getText},
+		{"Label_getTextWidth", Polycore_Label_getTextWidth},
+		{"Label_getTextHeight", Polycore_Label_getTextHeight},
+		{"Label_getFont", Polycore_Label_getFont},
+		{"delete_Label", Polycore_delete_Label},
+		{"ScreenLine", Polycore_ScreenLine},
+		{"ScreenLine_Update", Polycore_ScreenLine_Update},
+		{"ScreenLine_Render", Polycore_ScreenLine_Render},
+		{"ScreenLine_setLineWidth", Polycore_ScreenLine_setLineWidth},
+		{"delete_ScreenLine", Polycore_delete_ScreenLine},
+		{"ScreenSoundListener", Polycore_ScreenSoundListener},
+		{"ScreenSoundListener_Update", Polycore_ScreenSoundListener_Update},
+		{"delete_ScreenSoundListener", Polycore_delete_ScreenSoundListener},
+		{"ScreenSound", Polycore_ScreenSound},
+		{"ScreenSound_Update", Polycore_ScreenSound_Update},
+		{"ScreenSound_getSound", Polycore_ScreenSound_getSound},
+		{"delete_ScreenSound", Polycore_delete_ScreenSound},
+		{"String_get_contents", Polycore_String_get_contents},
+		{"String", Polycore_String},
+		{"String_size", Polycore_String_size},
+		{"String_length", Polycore_String_length},
+		{"String_substr", Polycore_String_substr},
+		{"String_rfind", Polycore_String_rfind},
+		{"String_find", Polycore_String_find},
+		{"String_find_last_of", Polycore_String_find_last_of},
+		{"String_toLowerCase", Polycore_String_toLowerCase},
+		{"String_toUpperCase", Polycore_String_toUpperCase},
+		{"String_replace", Polycore_String_replace},
+		{"String_NumberToString", Polycore_String_NumberToString},
+		{"String_IntToString", Polycore_String_IntToString},
+		{"String_c_str", Polycore_String_c_str},
+		{"String_getDataWithEncoding", Polycore_String_getDataWithEncoding},
+		{"String_getDataSizeWithEncoding", Polycore_String_getDataSizeWithEncoding},
+		{"String_setDataWithEncoding", Polycore_String_setDataWithEncoding},
+		{"delete_String", Polycore_delete_String},
+		{"PolycodeModule", Polycore_PolycodeModule},
+		{"PolycodeModule_getType", Polycore_PolycodeModule_getType},
+		{"delete_PolycodeModule", Polycore_delete_PolycodeModule},
+		{"Core_Update", Polycore_Core_Update},
+		{"Core_enableMouse", Polycore_Core_enableMouse},
+		{"Core_setCursor", Polycore_Core_setCursor},
+		{"Core_createThread", Polycore_Core_createThread},
+		{"Core_lockMutex", Polycore_Core_lockMutex},
+		{"Core_unlockMutex", Polycore_Core_unlockMutex},
+		{"Core_createMutex", Polycore_Core_createMutex},
+		{"Core_copyStringToClipboard", Polycore_Core_copyStringToClipboard},
+		{"Core_getClipboardString", Polycore_Core_getClipboardString},
+		{"Core_getServices", Polycore_Core_getServices},
+		{"Core_getFPS", Polycore_Core_getFPS},
+		{"Core_Shutdown", Polycore_Core_Shutdown},
+		{"Core_isFullscreen", Polycore_Core_isFullscreen},
+		{"Core_getAALevel", Polycore_Core_getAALevel},
+		{"Core_getInput", Polycore_Core_getInput},
+		{"Core_getXRes", Polycore_Core_getXRes},
+		{"Core_getYRes", Polycore_Core_getYRes},
+		{"Core_getNumVideoModes", Polycore_Core_getNumVideoModes},
+		{"Core_createFolder", Polycore_Core_createFolder},
+		{"Core_copyDiskItem", Polycore_Core_copyDiskItem},
+		{"Core_moveDiskItem", Polycore_Core_moveDiskItem},
+		{"Core_removeDiskItem", Polycore_Core_removeDiskItem},
+		{"Core_openFolderPicker", Polycore_Core_openFolderPicker},
+		{"Core_setVideoModeIndex", Polycore_Core_setVideoModeIndex},
+		{"Core_setVideoMode", Polycore_Core_setVideoMode},
+		{"Core_resizeTo", Polycore_Core_resizeTo},
+		{"Core_doSleep", Polycore_Core_doSleep},
+		{"Core_getElapsed", Polycore_Core_getElapsed},
+		{"Core_getTicks", Polycore_Core_getTicks},
+		{"Core_getTicksFloat", Polycore_Core_getTicksFloat},
+		{"Core_setUserPointer", Polycore_Core_setUserPointer},
+		{"Core_getUserPointer", Polycore_Core_getUserPointer},
+		{"delete_Core", Polycore_delete_Core},
+		{"PolycodeViewBase", Polycore_PolycodeViewBase},
+		{"delete_PolycodeViewBase", Polycore_delete_PolycodeViewBase},
+		{"InputEvent_get_mouseButton", Polycore_InputEvent_get_mouseButton},
+		{"InputEvent_get_mousePosition", Polycore_InputEvent_get_mousePosition},
+		{"InputEvent_get_key", Polycore_InputEvent_get_key},
+		{"InputEvent_get_charCode", Polycore_InputEvent_get_charCode},
+		{"InputEvent_get_timestamp", Polycore_InputEvent_get_timestamp},
+		{"InputEvent_set_mouseButton", Polycore_InputEvent_set_mouseButton},
+		{"InputEvent_set_timestamp", Polycore_InputEvent_set_timestamp},
+		{"InputEvent", Polycore_InputEvent},
+		{"InputEvent_getMousePosition", Polycore_InputEvent_getMousePosition},
+		{"InputEvent_getKey", Polycore_InputEvent_getKey},
+		{"InputEvent_getMouseButton", Polycore_InputEvent_getMouseButton},
+		{"InputEvent_keyCode", Polycore_InputEvent_keyCode},
+		{"delete_InputEvent", Polycore_delete_InputEvent},
+		{"VertexBuffer_get_verticesPerFace", Polycore_VertexBuffer_get_verticesPerFace},
+		{"VertexBuffer_get_meshType", Polycore_VertexBuffer_get_meshType},
+		{"VertexBuffer_set_verticesPerFace", Polycore_VertexBuffer_set_verticesPerFace},
+		{"VertexBuffer_set_meshType", Polycore_VertexBuffer_set_meshType},
+		{"VertexBuffer", Polycore_VertexBuffer},
+		{"VertexBuffer_getVertexCount", Polycore_VertexBuffer_getVertexCount},
+		{"delete_VertexBuffer", Polycore_delete_VertexBuffer},
+		{"Mesh_get_useVertexColors", Polycore_Mesh_get_useVertexColors},
+		{"Mesh_set_useVertexColors", Polycore_Mesh_set_useVertexColors},
+		{"Mesh", Polycore_Mesh},
+		{"Mesh_addPolygon", Polycore_Mesh_addPolygon},
+		{"Mesh_loadMesh", Polycore_Mesh_loadMesh},
+		{"Mesh_saveToFile", Polycore_Mesh_saveToFile},
+		{"Mesh_loadFromFile", Polycore_Mesh_loadFromFile},
+		{"Mesh_getPolygonCount", Polycore_Mesh_getPolygonCount},
+		{"Mesh_getVertexCount", Polycore_Mesh_getVertexCount},
+		{"Mesh_getPolygon", Polycore_Mesh_getPolygon},
+		{"Mesh_createPlane", Polycore_Mesh_createPlane},
+		{"Mesh_createVPlane", Polycore_Mesh_createVPlane},
+		{"Mesh_createTorus", Polycore_Mesh_createTorus},
+		{"Mesh_createBox", Polycore_Mesh_createBox},
+		{"Mesh_createSphere", Polycore_Mesh_createSphere},
+		{"Mesh_createCylinder", Polycore_Mesh_createCylinder},
+		{"Mesh_createCone", Polycore_Mesh_createCone},
+		{"Mesh_recenterMesh", Polycore_Mesh_recenterMesh},
+		{"Mesh_useVertexNormals", Polycore_Mesh_useVertexNormals},
+		{"Mesh_setVertexBuffer", Polycore_Mesh_setVertexBuffer},
+		{"Mesh_getVertexBuffer", Polycore_Mesh_getVertexBuffer},
+		{"Mesh_getRadius", Polycore_Mesh_getRadius},
+		{"Mesh_calculateNormals", Polycore_Mesh_calculateNormals},
+		{"Mesh_getMeshType", Polycore_Mesh_getMeshType},
+		{"Mesh_setMeshType", Polycore_Mesh_setMeshType},
+		{"Mesh_calculateBBox", Polycore_Mesh_calculateBBox},
+		{"Mesh_hasVertexBuffer", Polycore_Mesh_hasVertexBuffer},
+		{"delete_Mesh", Polycore_delete_Mesh},
+		{"MaterialManager", Polycore_MaterialManager},
+		{"MaterialManager_Update", Polycore_MaterialManager_Update},
+		{"MaterialManager_createFramebufferTexture", Polycore_MaterialManager_createFramebufferTexture},
+		{"MaterialManager_createTexture", Polycore_MaterialManager_createTexture},
+		{"MaterialManager_createNewTexture", Polycore_MaterialManager_createNewTexture},
+		{"MaterialManager_createTextureFromImage", Polycore_MaterialManager_createTextureFromImage},
+		{"MaterialManager_createTextureFromFile", Polycore_MaterialManager_createTextureFromFile},
+		{"MaterialManager_deleteTexture", Polycore_MaterialManager_deleteTexture},
+		{"MaterialManager_reloadTextures", Polycore_MaterialManager_reloadTextures},
+		{"MaterialManager_reloadProgramsAndTextures", Polycore_MaterialManager_reloadProgramsAndTextures},
+		{"MaterialManager_reloadPrograms", Polycore_MaterialManager_reloadPrograms},
+		{"MaterialManager_addShaderModule", Polycore_MaterialManager_addShaderModule},
+		{"MaterialManager_getTextureByResourcePath", Polycore_MaterialManager_getTextureByResourcePath},
+		{"MaterialManager_cubemapFromXMLNode", Polycore_MaterialManager_cubemapFromXMLNode},
+		{"MaterialManager_loadMaterialsFromFile", Polycore_MaterialManager_loadMaterialsFromFile},
+		{"MaterialManager_materialFromXMLNode", Polycore_MaterialManager_materialFromXMLNode},
+		{"MaterialManager_setShaderFromXMLNode", Polycore_MaterialManager_setShaderFromXMLNode},
+		{"MaterialManager_createShaderFromXMLNode", Polycore_MaterialManager_createShaderFromXMLNode},
+		{"delete_MaterialManager", Polycore_delete_MaterialManager},
+		{"BezierCurve", Polycore_BezierCurve},
+		{"BezierCurve_getControlPoint", Polycore_BezierCurve_getControlPoint},
+		{"BezierCurve_getNumControlPoints", Polycore_BezierCurve_getNumControlPoints},
+		{"BezierCurve_addControlPoint", Polycore_BezierCurve_addControlPoint},
+		{"BezierCurve_addControlPoint3dWithHandles", Polycore_BezierCurve_addControlPoint3dWithHandles},
+		{"BezierCurve_addControlPoint3d", Polycore_BezierCurve_addControlPoint3d},
+		{"BezierCurve_addControlPoint2dWithHandles", Polycore_BezierCurve_addControlPoint2dWithHandles},
+		{"BezierCurve_addControlPoint2d", Polycore_BezierCurve_addControlPoint2d},
+		{"BezierCurve_getHeightAt", Polycore_BezierCurve_getHeightAt},
+		{"BezierCurve_getPointAt", Polycore_BezierCurve_getPointAt},
+		{"BezierCurve_getPointBetween", Polycore_BezierCurve_getPointBetween},
+		{"BezierCurve_rebuildBuffers", Polycore_BezierCurve_rebuildBuffers},
+		{"delete_BezierCurve", Polycore_delete_BezierCurve},
+		{"ScreenShape_get_strokeEnabled", Polycore_ScreenShape_get_strokeEnabled},
+		{"ScreenShape_get_strokeColor", Polycore_ScreenShape_get_strokeColor},
+		{"ScreenShape_get_lineSmooth", Polycore_ScreenShape_get_lineSmooth},
+		{"ScreenShape_set_strokeEnabled", Polycore_ScreenShape_set_strokeEnabled},
+		{"ScreenShape_set_lineSmooth", Polycore_ScreenShape_set_lineSmooth},
+		{"ScreenShape", Polycore_ScreenShape},
+		{"ScreenShape_Render", Polycore_ScreenShape_Render},
+		{"ScreenShape_setStrokeColor", Polycore_ScreenShape_setStrokeColor},
+		{"ScreenShape_setStrokeWidth", Polycore_ScreenShape_setStrokeWidth},
+		{"ScreenShape_setGradient", Polycore_ScreenShape_setGradient},
+		{"ScreenShape_clearGradient", Polycore_ScreenShape_clearGradient},
+		{"ScreenShape_setShapeSize", Polycore_ScreenShape_setShapeSize},
+		{"ScreenShape_addShapePoint", Polycore_ScreenShape_addShapePoint},
+		{"delete_ScreenShape", Polycore_delete_ScreenShape},
+		{"ScreenParticleEmitter", Polycore_ScreenParticleEmitter},
+		{"ScreenParticleEmitter_getEmitter", Polycore_ScreenParticleEmitter_getEmitter},
+		{"ScreenParticleEmitter_addParticleBody", Polycore_ScreenParticleEmitter_addParticleBody},
+		{"ScreenParticleEmitter_getBaseMatrix", Polycore_ScreenParticleEmitter_getBaseMatrix},
+		{"ScreenParticleEmitter_Update", Polycore_ScreenParticleEmitter_Update},
+		{"delete_ScreenParticleEmitter", Polycore_delete_ScreenParticleEmitter},
+		{"SceneParticleEmitter", Polycore_SceneParticleEmitter},
+		{"SceneParticleEmitter_getEmitter", Polycore_SceneParticleEmitter_getEmitter},
+		{"SceneParticleEmitter_respawnSceneParticles", Polycore_SceneParticleEmitter_respawnSceneParticles},
+		{"SceneParticleEmitter_addParticleBody", Polycore_SceneParticleEmitter_addParticleBody},
+		{"SceneParticleEmitter_getBaseMatrix", Polycore_SceneParticleEmitter_getBaseMatrix},
+		{"SceneParticleEmitter_Update", Polycore_SceneParticleEmitter_Update},
+		{"delete_SceneParticleEmitter", Polycore_delete_SceneParticleEmitter},
+		{"ParticleEmitter_get_particleSpeedMod", Polycore_ParticleEmitter_get_particleSpeedMod},
+		{"ParticleEmitter_get_brightnessDeviation", Polycore_ParticleEmitter_get_brightnessDeviation},
+		{"ParticleEmitter_get_deviation", Polycore_ParticleEmitter_get_deviation},
+		{"ParticleEmitter_get_dirVector", Polycore_ParticleEmitter_get_dirVector},
+		{"ParticleEmitter_get_gravVector", Polycore_ParticleEmitter_get_gravVector},
+		{"ParticleEmitter_get_lifespan", Polycore_ParticleEmitter_get_lifespan},
+		{"ParticleEmitter_get_rotationFollowsPath", Polycore_ParticleEmitter_get_rotationFollowsPath},
+		{"ParticleEmitter_get_scaleCurve", Polycore_ParticleEmitter_get_scaleCurve},
+		{"ParticleEmitter_get_colorCurveR", Polycore_ParticleEmitter_get_colorCurveR},
+		{"ParticleEmitter_get_colorCurveG", Polycore_ParticleEmitter_get_colorCurveG},
+		{"ParticleEmitter_get_colorCurveB", Polycore_ParticleEmitter_get_colorCurveB},
+		{"ParticleEmitter_get_colorCurveA", Polycore_ParticleEmitter_get_colorCurveA},
+		{"ParticleEmitter_get_useColorCurves", Polycore_ParticleEmitter_get_useColorCurves},
+		{"ParticleEmitter_get_useScaleCurves", Polycore_ParticleEmitter_get_useScaleCurves},
+		{"ParticleEmitter_set_particleSpeedMod", Polycore_ParticleEmitter_set_particleSpeedMod},
+		{"ParticleEmitter_set_brightnessDeviation", Polycore_ParticleEmitter_set_brightnessDeviation},
+		{"ParticleEmitter_set_lifespan", Polycore_ParticleEmitter_set_lifespan},
+		{"ParticleEmitter_set_rotationFollowsPath", Polycore_ParticleEmitter_set_rotationFollowsPath},
+		{"ParticleEmitter_set_useColorCurves", Polycore_ParticleEmitter_set_useColorCurves},
+		{"ParticleEmitter_set_useScaleCurves", Polycore_ParticleEmitter_set_useScaleCurves},
+		{"ParticleEmitter", Polycore_ParticleEmitter},
+		{"ParticleEmitter_createParticles", Polycore_ParticleEmitter_createParticles},
+		{"ParticleEmitter_setRotationSpeed", Polycore_ParticleEmitter_setRotationSpeed},
+		{"ParticleEmitter_setParticleBlendingMode", Polycore_ParticleEmitter_setParticleBlendingMode},
+		{"ParticleEmitter_setDepthWrite", Polycore_ParticleEmitter_setDepthWrite},
+		{"ParticleEmitter_setDepthTest", Polycore_ParticleEmitter_setDepthTest},
+		{"ParticleEmitter_setAlphaTest", Polycore_ParticleEmitter_setAlphaTest},
+		{"ParticleEmitter_enablePerlin", Polycore_ParticleEmitter_enablePerlin},
+		{"ParticleEmitter_setParticleVisibility", Polycore_ParticleEmitter_setParticleVisibility},
+		{"ParticleEmitter_setPerlinModSize", Polycore_ParticleEmitter_setPerlinModSize},
+		{"ParticleEmitter_setBillboardMode", Polycore_ParticleEmitter_setBillboardMode},
+		{"ParticleEmitter_enableEmitter", Polycore_ParticleEmitter_enableEmitter},
+		{"ParticleEmitter_emitterEnabled", Polycore_ParticleEmitter_emitterEnabled},
+		{"ParticleEmitter_setEmitterRadius", Polycore_ParticleEmitter_setEmitterRadius},
+		{"ParticleEmitter_setAllAtOnce", Polycore_ParticleEmitter_setAllAtOnce},
+		{"ParticleEmitter_Trigger", Polycore_ParticleEmitter_Trigger},
+		{"ParticleEmitter_resetParticle", Polycore_ParticleEmitter_resetParticle},
+		{"ParticleEmitter_setParticleCount", Polycore_ParticleEmitter_setParticleCount},
+		{"ParticleEmitter_addParticleBody", Polycore_ParticleEmitter_addParticleBody},
+		{"ParticleEmitter_getBaseMatrix", Polycore_ParticleEmitter_getBaseMatrix},
+		{"ParticleEmitter_updateEmitter", Polycore_ParticleEmitter_updateEmitter},
+		{"delete_ParticleEmitter", Polycore_delete_ParticleEmitter},
+		{"Data", Polycore_Data},
+		{"Data_loadFromFile", Polycore_Data_loadFromFile},
+		{"Data_getAsString", Polycore_Data_getAsString},
+		{"Data_setFromString", Polycore_Data_setFromString},
+		{"Data_saveToFile", Polycore_Data_saveToFile},
+		{"Data_getData", Polycore_Data_getData},
+		{"delete_Data", Polycore_delete_Data},
+		{"ScreenEntity_get_hasFocus", Polycore_ScreenEntity_get_hasFocus},
+		{"ScreenEntity_get_blockMouseInput", Polycore_ScreenEntity_get_blockMouseInput},
+		{"ScreenEntity_get_zindex", Polycore_ScreenEntity_get_zindex},
+		{"ScreenEntity_get_snapToPixels", Polycore_ScreenEntity_get_snapToPixels},
+		{"ScreenEntity_set_hasFocus", Polycore_ScreenEntity_set_hasFocus},
+		{"ScreenEntity_set_blockMouseInput", Polycore_ScreenEntity_set_blockMouseInput},
+		{"ScreenEntity_set_zindex", Polycore_ScreenEntity_set_zindex},
+		{"ScreenEntity_set_snapToPixels", Polycore_ScreenEntity_set_snapToPixels},
+		{"ScreenEntity", Polycore_ScreenEntity},
+		{"ScreenEntity_setPosition", Polycore_ScreenEntity_setPosition},
+		{"ScreenEntity_setScale", Polycore_ScreenEntity_setScale},
+		{"ScreenEntity_setRotation", Polycore_ScreenEntity_setRotation},
+		{"ScreenEntity_getRotation", Polycore_ScreenEntity_getRotation},
+		{"ScreenEntity__onMouseDown", Polycore_ScreenEntity__onMouseDown},
+		{"ScreenEntity__onMouseUp", Polycore_ScreenEntity__onMouseUp},
+		{"ScreenEntity__onMouseMove", Polycore_ScreenEntity__onMouseMove},
+		{"ScreenEntity__onMouseWheelUp", Polycore_ScreenEntity__onMouseWheelUp},
+		{"ScreenEntity__onMouseWheelDown", Polycore_ScreenEntity__onMouseWheelDown},
+		{"ScreenEntity_onMouseDown", Polycore_ScreenEntity_onMouseDown},
+		{"ScreenEntity_onMouseUp", Polycore_ScreenEntity_onMouseUp},
+		{"ScreenEntity_onMouseMove", Polycore_ScreenEntity_onMouseMove},
+		{"ScreenEntity_onMouseWheelUp", Polycore_ScreenEntity_onMouseWheelUp},
+		{"ScreenEntity_onMouseWheelDown", Polycore_ScreenEntity_onMouseWheelDown},
+		{"ScreenEntity__onKeyDown", Polycore_ScreenEntity__onKeyDown},
+		{"ScreenEntity__onKeyUp", Polycore_ScreenEntity__onKeyUp},
+		{"ScreenEntity_onKeyDown", Polycore_ScreenEntity_onKeyDown},
+		{"ScreenEntity_onKeyUp", Polycore_ScreenEntity_onKeyUp},
+		{"ScreenEntity_hitTest", Polycore_ScreenEntity_hitTest},
+		{"ScreenEntity_buildPositionMatrix", Polycore_ScreenEntity_buildPositionMatrix},
+		{"ScreenEntity_adjustMatrixForChildren", Polycore_ScreenEntity_adjustMatrixForChildren},
+		{"ScreenEntity_getWidth", Polycore_ScreenEntity_getWidth},
+		{"ScreenEntity_getHeight", Polycore_ScreenEntity_getHeight},
+		{"ScreenEntity_setWidth", Polycore_ScreenEntity_setWidth},
+		{"ScreenEntity_setHeight", Polycore_ScreenEntity_setHeight},
+		{"ScreenEntity_onGainFocus", Polycore_ScreenEntity_onGainFocus},
+		{"ScreenEntity_onLoseFocus", Polycore_ScreenEntity_onLoseFocus},
+		{"ScreenEntity_startDrag", Polycore_ScreenEntity_startDrag},
+		{"ScreenEntity_stopDrag", Polycore_ScreenEntity_stopDrag},
+		{"ScreenEntity_setBlendingMode", Polycore_ScreenEntity_setBlendingMode},
+		{"ScreenEntity_setPositionMode", Polycore_ScreenEntity_setPositionMode},
+		{"ScreenEntity_setDragLimits", Polycore_ScreenEntity_setDragLimits},
+		{"ScreenEntity_clearDragLimits", Polycore_ScreenEntity_clearDragLimits},
+		{"ScreenEntity_focusChild", Polycore_ScreenEntity_focusChild},
+		{"ScreenEntity_focusNextChild", Polycore_ScreenEntity_focusNextChild},
+		{"ScreenEntity_getPosition2D", Polycore_ScreenEntity_getPosition2D},
+		{"ScreenEntity_isFocusable", Polycore_ScreenEntity_isFocusable},
+		{"delete_ScreenEntity", Polycore_delete_ScreenEntity},
+		{"Timer", Polycore_Timer},
+		{"Timer_Pause", Polycore_Timer_Pause},
+		{"Timer_isPaused", Polycore_Timer_isPaused},
+		{"Timer_getTicks", Polycore_Timer_getTicks},
+		{"Timer_Update", Polycore_Timer_Update},
+		{"Timer_Reset", Polycore_Timer_Reset},
+		{"Timer_hasElapsed", Polycore_Timer_hasElapsed},
+		{"Timer_getElapsedf", Polycore_Timer_getElapsedf},
+		{"delete_Timer", Polycore_delete_Timer},
+		{"CoreInput", Polycore_CoreInput},
+		{"CoreInput_getMousePosition", Polycore_CoreInput_getMousePosition},
+		{"CoreInput_getKeyState", Polycore_CoreInput_getKeyState},
+		{"CoreInput_getMouseDelta", Polycore_CoreInput_getMouseDelta},
+		{"CoreInput_getMouseButtonState", Polycore_CoreInput_getMouseButtonState},
+		{"CoreInput_mouseWheelUp", Polycore_CoreInput_mouseWheelUp},
+		{"CoreInput_mouseWheelDown", Polycore_CoreInput_mouseWheelDown},
+		{"CoreInput_setMouseButtonState", Polycore_CoreInput_setMouseButtonState},
+		{"CoreInput_setMousePosition", Polycore_CoreInput_setMousePosition},
+		{"CoreInput_setKeyState", Polycore_CoreInput_setKeyState},
+		{"CoreInput_setDeltaPosition", Polycore_CoreInput_setDeltaPosition},
+		{"CoreInput_createEvent", Polycore_CoreInput_createEvent},
+		{"delete_CoreInput", Polycore_delete_CoreInput},
+		{"OSFILE_get_fileType", Polycore_OSFILE_get_fileType},
+		{"OSFILE_set_fileType", Polycore_OSFILE_set_fileType},
+		{"OSFILE", Polycore_OSFILE},
+		{"OSFILE_debugDump", Polycore_OSFILE_debugDump},
+		{"delete_OSFILE", Polycore_delete_OSFILE},
+		{"OSFileEntry_get_name", Polycore_OSFileEntry_get_name},
+		{"OSFileEntry_get_extension", Polycore_OSFileEntry_get_extension},
+		{"OSFileEntry_get_nameWithoutExtension", Polycore_OSFileEntry_get_nameWithoutExtension},
+		{"OSFileEntry_get_basePath", Polycore_OSFileEntry_get_basePath},
+		{"OSFileEntry_get_fullPath", Polycore_OSFileEntry_get_fullPath},
+		{"OSFileEntry_get_type", Polycore_OSFileEntry_get_type},
+		{"OSFileEntry_set_type", Polycore_OSFileEntry_set_type},
+		{"OSFileEntry", Polycore_OSFileEntry},
+		{"delete_OSFileEntry", Polycore_delete_OSFileEntry},
+		{"OSBasics_open", Polycore_OSBasics_open},
+		{"OSBasics_close", Polycore_OSBasics_close},
+		{"OSBasics_read", Polycore_OSBasics_read},
+		{"OSBasics_write", Polycore_OSBasics_write},
+		{"OSBasics_seek", Polycore_OSBasics_seek},
+		{"OSBasics_tell", Polycore_OSBasics_tell},
+		{"OSBasics_isFolder", Polycore_OSBasics_isFolder},
+		{"OSBasics_createFolder", Polycore_OSBasics_createFolder},
+		{"OSBasics_removeItem", Polycore_OSBasics_removeItem},
+		{"delete_OSBasics", Polycore_delete_OSBasics},
+		{"Polygon_get_useVertexNormals", Polycore_Polygon_get_useVertexNormals},
+		{"Polygon_set_useVertexNormals", Polycore_Polygon_set_useVertexNormals},
+		{"Polygon", Polycore_Polygon},
+		{"Polygon_getVertexCount", Polycore_Polygon_getVertexCount},
+		{"Polygon_getVertex", Polycore_Polygon_getVertex},
+		{"Polygon_addVertex", Polycore_Polygon_addVertex},
+		{"Polygon_removeVertex", Polycore_Polygon_removeVertex},
+		{"Polygon_calculateNormal", Polycore_Polygon_calculateNormal},
+		{"Polygon_getFaceNormal", Polycore_Polygon_getFaceNormal},
+		{"Polygon_getBounds2D", Polycore_Polygon_getBounds2D},
+		{"Polygon_setNormal", Polycore_Polygon_setNormal},
+		{"Polygon_flipUVY", Polycore_Polygon_flipUVY},
+		{"delete_Polygon", Polycore_delete_Polygon},
+		{"Font_get_loaded", Polycore_Font_get_loaded},
+		{"Font_set_loaded", Polycore_Font_set_loaded},
+		{"Font", Polycore_Font},
+		{"Font_getFace", Polycore_Font_getFace},
+		{"Font_isValid", Polycore_Font_isValid},
+		{"delete_Font", Polycore_delete_Font},
+		{"Entity_get_custEntityType", Polycore_Entity_get_custEntityType},
+		{"Entity_get_billboardMode", Polycore_Entity_get_billboardMode},
+		{"Entity_get_billboardRoll", Polycore_Entity_get_billboardRoll},
+		{"Entity_get_alphaTest", Polycore_Entity_get_alphaTest},
+		{"Entity_get_backfaceCulled", Polycore_Entity_get_backfaceCulled},
+		{"Entity_get_renderWireframe", Polycore_Entity_get_renderWireframe},
+		{"Entity_get_color", Polycore_Entity_get_color},
+		{"Entity_get_enabled", Polycore_Entity_get_enabled},
+		{"Entity_get_visible", Polycore_Entity_get_visible},
+		{"Entity_get_depthWrite", Polycore_Entity_get_depthWrite},
+		{"Entity_get_depthTest", Polycore_Entity_get_depthTest},
+		{"Entity_get_blendingMode", Polycore_Entity_get_blendingMode},
+		{"Entity_get_colorAffectsChildren", Polycore_Entity_get_colorAffectsChildren},
+		{"Entity_get_visibilityAffectsChildren", Polycore_Entity_get_visibilityAffectsChildren},
+		{"Entity_get_depthOnly", Polycore_Entity_get_depthOnly},
+		{"Entity_get_bBox", Polycore_Entity_get_bBox},
+		{"Entity_get_ignoreParentMatrix", Polycore_Entity_get_ignoreParentMatrix},
+		{"Entity_get_isMask", Polycore_Entity_get_isMask},
+		{"Entity_set_custEntityType", Polycore_Entity_set_custEntityType},
+		{"Entity_set_billboardMode", Polycore_Entity_set_billboardMode},
+		{"Entity_set_billboardRoll", Polycore_Entity_set_billboardRoll},
+		{"Entity_set_alphaTest", Polycore_Entity_set_alphaTest},
+		{"Entity_set_backfaceCulled", Polycore_Entity_set_backfaceCulled},
+		{"Entity_set_renderWireframe", Polycore_Entity_set_renderWireframe},
+		{"Entity_set_enabled", Polycore_Entity_set_enabled},
+		{"Entity_set_visible", Polycore_Entity_set_visible},
+		{"Entity_set_depthWrite", Polycore_Entity_set_depthWrite},
+		{"Entity_set_depthTest", Polycore_Entity_set_depthTest},
+		{"Entity_set_blendingMode", Polycore_Entity_set_blendingMode},
+		{"Entity_set_colorAffectsChildren", Polycore_Entity_set_colorAffectsChildren},
+		{"Entity_set_visibilityAffectsChildren", Polycore_Entity_set_visibilityAffectsChildren},
+		{"Entity_set_depthOnly", Polycore_Entity_set_depthOnly},
+		{"Entity_set_ignoreParentMatrix", Polycore_Entity_set_ignoreParentMatrix},
+		{"Entity_set_isMask", Polycore_Entity_set_isMask},
+		{"Entity", Polycore_Entity},
+		{"Entity_Render", Polycore_Entity_Render},
+		{"Entity_Update", Polycore_Entity_Update},
+		{"Entity_transformAndRender", Polycore_Entity_transformAndRender},
+		{"Entity_renderChildren", Polycore_Entity_renderChildren},
+		{"Entity_dirtyMatrix", Polycore_Entity_dirtyMatrix},
+		{"Entity_rebuildTransformMatrix", Polycore_Entity_rebuildTransformMatrix},
+		{"Entity_updateEntityMatrix", Polycore_Entity_updateEntityMatrix},
+		{"Entity_getTransformMatrix", Polycore_Entity_getTransformMatrix},
+		{"Entity_getConcatenatedMatrix", Polycore_Entity_getConcatenatedMatrix},
+		{"Entity_getConcatenatedRollMatrix", Polycore_Entity_getConcatenatedRollMatrix},
+		{"Entity_setTransformByMatrix", Polycore_Entity_setTransformByMatrix},
+		{"Entity_setTransformByMatrixPure", Polycore_Entity_setTransformByMatrixPure},
+		{"Entity_getLookAtMatrix", Polycore_Entity_getLookAtMatrix},
+		{"Entity_addEntity", Polycore_Entity_addEntity},
+		{"Entity_addChild", Polycore_Entity_addChild},
+		{"Entity_removeChild", Polycore_Entity_removeChild},
+		{"Entity_setParentEntity", Polycore_Entity_setParentEntity},
+		{"Entity_getParentEntity", Polycore_Entity_getParentEntity},
+		{"Entity_getPosition", Polycore_Entity_getPosition},
+		{"Entity_getCombinedPosition", Polycore_Entity_getCombinedPosition},
+		{"Entity_setPosition", Polycore_Entity_setPosition},
+		{"Entity_setPositionX", Polycore_Entity_setPositionX},
+		{"Entity_setPositionY", Polycore_Entity_setPositionY},
+		{"Entity_Translate", Polycore_Entity_Translate},
+		{"Entity_setPositionZ", Polycore_Entity_setPositionZ},
+		{"Entity_setScaleX", Polycore_Entity_setScaleX},
+		{"Entity_setScaleY", Polycore_Entity_setScaleY},
+		{"Entity_setScaleZ", Polycore_Entity_setScaleZ},
+		{"Entity_Scale", Polycore_Entity_Scale},
+		{"Entity_setScale", Polycore_Entity_setScale},
+		{"Entity_getCompoundScale", Polycore_Entity_getCompoundScale},
+		{"Entity_getScale", Polycore_Entity_getScale},
+		{"Entity_getCombinedPitch", Polycore_Entity_getCombinedPitch},
+		{"Entity_getCombinedYaw", Polycore_Entity_getCombinedYaw},
+		{"Entity_getCombinedRoll", Polycore_Entity_getCombinedRoll},
+		{"Entity_rebuildRotation", Polycore_Entity_rebuildRotation},
+		{"Entity_setPitch", Polycore_Entity_setPitch},
+		{"Entity_setYaw", Polycore_Entity_setYaw},
+		{"Entity_setRoll", Polycore_Entity_setRoll},
+		{"Entity_Roll", Polycore_Entity_Roll},
+		{"Entity_Yaw", Polycore_Entity_Yaw},
+		{"Entity_Pitch", Polycore_Entity_Pitch},
+		{"Entity_getPitch", Polycore_Entity_getPitch},
+		{"Entity_getYaw", Polycore_Entity_getYaw},
+		{"Entity_getRoll", Polycore_Entity_getRoll},
+		{"Entity_setRotationQuat", Polycore_Entity_setRotationQuat},
+		{"Entity_getRotationQuat", Polycore_Entity_getRotationQuat},
+		{"Entity_lookAt", Polycore_Entity_lookAt},
+		{"Entity_lookAtEntity", Polycore_Entity_lookAtEntity},
+		{"Entity_getCombinedColor", Polycore_Entity_getCombinedColor},
+		{"Entity_setColor", Polycore_Entity_setColor},
+		{"Entity_setColorInt", Polycore_Entity_setColorInt},
+		{"Entity_recalculateBBox", Polycore_Entity_recalculateBBox},
+		{"Entity_getBBoxRadius", Polycore_Entity_getBBoxRadius},
+		{"Entity_getCompoundBBoxRadius", Polycore_Entity_getCompoundBBoxRadius},
+		{"Entity_setBBoxRadius", Polycore_Entity_setBBoxRadius},
+		{"Entity_setMask", Polycore_Entity_setMask},
+		{"Entity_clearMask", Polycore_Entity_clearMask},
+		{"Entity_setBlendingMode", Polycore_Entity_setBlendingMode},
+		{"Entity_getChildCenter", Polycore_Entity_getChildCenter},
+		{"Entity_getEntityProp", Polycore_Entity_getEntityProp},
+		{"Entity_doUpdates", Polycore_Entity_doUpdates},
+		{"Entity_buildPositionMatrix", Polycore_Entity_buildPositionMatrix},
+		{"Entity_adjustMatrixForChildren", Polycore_Entity_adjustMatrixForChildren},
+		{"Entity_setRenderer", Polycore_Entity_setRenderer},
+		{"delete_Entity", Polycore_delete_Entity},
+		{"Material_get_specularValue", Polycore_Material_get_specularValue},
+		{"Material_get_specularColor", Polycore_Material_get_specularColor},
+		{"Material_get_diffuseColor", Polycore_Material_get_diffuseColor},
+		{"Material_set_specularValue", Polycore_Material_set_specularValue},
+		{"Material", Polycore_Material},
+		{"Material_addShader", Polycore_Material_addShader},
+		{"Material_getNumShaders", Polycore_Material_getNumShaders},
+		{"Material_addShaderRenderTarget", Polycore_Material_addShaderRenderTarget},
+		{"Material_getNumShaderRenderTargets", Polycore_Material_getNumShaderRenderTargets},
+		{"Material_getShaderRenderTarget", Polycore_Material_getShaderRenderTarget},
+		{"Material_getName", Polycore_Material_getName},
+		{"Material_getShader", Polycore_Material_getShader},
+		{"Material_getShaderBinding", Polycore_Material_getShaderBinding},
+		{"Material_loadMaterial", Polycore_Material_loadMaterial},
+		{"delete_Material", Polycore_delete_Material},
+		{"Color_get_r", Polycore_Color_get_r},
+		{"Color_get_g", Polycore_Color_get_g},
+		{"Color_get_b", Polycore_Color_get_b},
+		{"Color_get_a", Polycore_Color_get_a},
+		{"Color_set_r", Polycore_Color_set_r},
+		{"Color_set_g", Polycore_Color_set_g},
+		{"Color_set_b", Polycore_Color_set_b},
+		{"Color_set_a", Polycore_Color_set_a},
+		{"Color", Polycore_Color},
+		{"Color_setColorHex", Polycore_Color_setColorHex},
+		{"Color_setColorHexRGB", Polycore_Color_setColorHexRGB},
+		{"Color_setColorHSV", Polycore_Color_setColorHSV},
+		{"Color_setColorRGBA", Polycore_Color_setColorRGBA},
+		{"Color_setColorRGB", Polycore_Color_setColorRGB},
+		{"Color_setColor", Polycore_Color_setColor},
+		{"Color_Random", Polycore_Color_Random},
+		{"Color_getBrightness", Polycore_Color_getBrightness},
+		{"Color_getUint", Polycore_Color_getUint},
+		{"delete_Color", Polycore_delete_Color},
 		{"ScreenCurve", Polycore_ScreenCurve},
 		{"ScreenCurve", Polycore_ScreenCurve},
 		{"delete_ScreenCurve", Polycore_delete_ScreenCurve},
 		{"delete_ScreenCurve", Polycore_delete_ScreenCurve},
-		{"ScreenEntity_get_hasFocus", Polycore_ScreenEntity_get_hasFocus},
-		{"ScreenEntity_get_blockMouseInput", Polycore_ScreenEntity_get_blockMouseInput},
-		{"ScreenEntity_get_zindex", Polycore_ScreenEntity_get_zindex},
-		{"ScreenEntity_get_snapToPixels", Polycore_ScreenEntity_get_snapToPixels},
-		{"ScreenEntity_set_hasFocus", Polycore_ScreenEntity_set_hasFocus},
-		{"ScreenEntity_set_blockMouseInput", Polycore_ScreenEntity_set_blockMouseInput},
-		{"ScreenEntity_set_zindex", Polycore_ScreenEntity_set_zindex},
-		{"ScreenEntity_set_snapToPixels", Polycore_ScreenEntity_set_snapToPixels},
-		{"ScreenEntity", Polycore_ScreenEntity},
-		{"ScreenEntity_setPosition", Polycore_ScreenEntity_setPosition},
-		{"ScreenEntity_setScale", Polycore_ScreenEntity_setScale},
-		{"ScreenEntity_setRotation", Polycore_ScreenEntity_setRotation},
-		{"ScreenEntity_getRotation", Polycore_ScreenEntity_getRotation},
-		{"ScreenEntity__onMouseDown", Polycore_ScreenEntity__onMouseDown},
-		{"ScreenEntity__onMouseUp", Polycore_ScreenEntity__onMouseUp},
-		{"ScreenEntity__onMouseMove", Polycore_ScreenEntity__onMouseMove},
-		{"ScreenEntity__onMouseWheelUp", Polycore_ScreenEntity__onMouseWheelUp},
-		{"ScreenEntity__onMouseWheelDown", Polycore_ScreenEntity__onMouseWheelDown},
-		{"ScreenEntity_onMouseDown", Polycore_ScreenEntity_onMouseDown},
-		{"ScreenEntity_onMouseUp", Polycore_ScreenEntity_onMouseUp},
-		{"ScreenEntity_onMouseMove", Polycore_ScreenEntity_onMouseMove},
-		{"ScreenEntity_onMouseWheelUp", Polycore_ScreenEntity_onMouseWheelUp},
-		{"ScreenEntity_onMouseWheelDown", Polycore_ScreenEntity_onMouseWheelDown},
-		{"ScreenEntity__onKeyDown", Polycore_ScreenEntity__onKeyDown},
-		{"ScreenEntity__onKeyUp", Polycore_ScreenEntity__onKeyUp},
-		{"ScreenEntity_onKeyDown", Polycore_ScreenEntity_onKeyDown},
-		{"ScreenEntity_onKeyUp", Polycore_ScreenEntity_onKeyUp},
-		{"ScreenEntity_hitTest", Polycore_ScreenEntity_hitTest},
-		{"ScreenEntity_buildPositionMatrix", Polycore_ScreenEntity_buildPositionMatrix},
-		{"ScreenEntity_adjustMatrixForChildren", Polycore_ScreenEntity_adjustMatrixForChildren},
-		{"ScreenEntity_getWidth", Polycore_ScreenEntity_getWidth},
-		{"ScreenEntity_getHeight", Polycore_ScreenEntity_getHeight},
-		{"ScreenEntity_setWidth", Polycore_ScreenEntity_setWidth},
-		{"ScreenEntity_setHeight", Polycore_ScreenEntity_setHeight},
-		{"ScreenEntity_onGainFocus", Polycore_ScreenEntity_onGainFocus},
-		{"ScreenEntity_onLoseFocus", Polycore_ScreenEntity_onLoseFocus},
-		{"ScreenEntity_startDrag", Polycore_ScreenEntity_startDrag},
-		{"ScreenEntity_stopDrag", Polycore_ScreenEntity_stopDrag},
-		{"ScreenEntity_setBlendingMode", Polycore_ScreenEntity_setBlendingMode},
-		{"ScreenEntity_setPositionMode", Polycore_ScreenEntity_setPositionMode},
-		{"ScreenEntity_setDragLimits", Polycore_ScreenEntity_setDragLimits},
-		{"ScreenEntity_clearDragLimits", Polycore_ScreenEntity_clearDragLimits},
-		{"ScreenEntity_focusChild", Polycore_ScreenEntity_focusChild},
-		{"ScreenEntity_focusNextChild", Polycore_ScreenEntity_focusNextChild},
-		{"ScreenEntity_getPosition2D", Polycore_ScreenEntity_getPosition2D},
-		{"ScreenEntity_isFocusable", Polycore_ScreenEntity_isFocusable},
-		{"delete_ScreenEntity", Polycore_delete_ScreenEntity},
-		{"ScreenEvent", Polycore_ScreenEvent},
-		{"delete_ScreenEvent", Polycore_delete_ScreenEvent},
-		{"ScreenImage", Polycore_ScreenImage},
-		{"ScreenImage_setImageCoordinates", Polycore_ScreenImage_setImageCoordinates},
-		{"ScreenImage_getImageWidth", Polycore_ScreenImage_getImageWidth},
-		{"ScreenImage_getImageHeight", Polycore_ScreenImage_getImageHeight},
-		{"delete_ScreenImage", Polycore_delete_ScreenImage},
-		{"ScreenLabel", Polycore_ScreenLabel},
-		{"ScreenLabel_addDropShadow", Polycore_ScreenLabel_addDropShadow},
-		{"ScreenLabel_setText", Polycore_ScreenLabel_setText},
-		{"ScreenLabel_getText", Polycore_ScreenLabel_getText},
-		{"ScreenLabel_getLabel", Polycore_ScreenLabel_getLabel},
-		{"delete_ScreenLabel", Polycore_delete_ScreenLabel},
-		{"ScreenLine", Polycore_ScreenLine},
-		{"ScreenLine_Update", Polycore_ScreenLine_Update},
-		{"ScreenLine_Render", Polycore_ScreenLine_Render},
-		{"ScreenLine_setLineWidth", Polycore_ScreenLine_setLineWidth},
-		{"delete_ScreenLine", Polycore_delete_ScreenLine},
-		{"ScreenManager", Polycore_ScreenManager},
-		{"ScreenManager_removeScreen", Polycore_ScreenManager_removeScreen},
-		{"ScreenManager_addScreen", Polycore_ScreenManager_addScreen},
-		{"ScreenManager_Update", Polycore_ScreenManager_Update},
-		{"delete_ScreenManager", Polycore_delete_ScreenManager},
-		{"ScreenMesh", Polycore_ScreenMesh},
-		{"ScreenMesh_Render", Polycore_ScreenMesh_Render},
-		{"ScreenMesh_getMesh", Polycore_ScreenMesh_getMesh},
-		{"ScreenMesh_getTexture", Polycore_ScreenMesh_getTexture},
-		{"ScreenMesh_loadTexture", Polycore_ScreenMesh_loadTexture},
-		{"ScreenMesh_setTexture", Polycore_ScreenMesh_setTexture},
-		{"delete_ScreenMesh", Polycore_delete_ScreenMesh},
-		{"ScreenShape_get_strokeEnabled", Polycore_ScreenShape_get_strokeEnabled},
-		{"ScreenShape_get_strokeColor", Polycore_ScreenShape_get_strokeColor},
-		{"ScreenShape_get_lineSmooth", Polycore_ScreenShape_get_lineSmooth},
-		{"ScreenShape_set_strokeEnabled", Polycore_ScreenShape_set_strokeEnabled},
-		{"ScreenShape_set_lineSmooth", Polycore_ScreenShape_set_lineSmooth},
-		{"ScreenShape", Polycore_ScreenShape},
-		{"ScreenShape_Render", Polycore_ScreenShape_Render},
-		{"ScreenShape_setStrokeColor", Polycore_ScreenShape_setStrokeColor},
-		{"ScreenShape_setStrokeWidth", Polycore_ScreenShape_setStrokeWidth},
-		{"ScreenShape_setGradient", Polycore_ScreenShape_setGradient},
-		{"ScreenShape_clearGradient", Polycore_ScreenShape_clearGradient},
-		{"ScreenShape_setShapeSize", Polycore_ScreenShape_setShapeSize},
-		{"ScreenShape_addShapePoint", Polycore_ScreenShape_addShapePoint},
-		{"delete_ScreenShape", Polycore_delete_ScreenShape},
-		{"ScreenSoundListener", Polycore_ScreenSoundListener},
-		{"ScreenSoundListener_Update", Polycore_ScreenSoundListener_Update},
-		{"delete_ScreenSoundListener", Polycore_delete_ScreenSoundListener},
-		{"ScreenSound", Polycore_ScreenSound},
-		{"ScreenSound_Update", Polycore_ScreenSound_Update},
-		{"ScreenSound_getSound", Polycore_ScreenSound_getSound},
-		{"delete_ScreenSound", Polycore_delete_ScreenSound},
+		{"Rectangle_get_x", Polycore_Rectangle_get_x},
+		{"Rectangle_get_y", Polycore_Rectangle_get_y},
+		{"Rectangle_get_w", Polycore_Rectangle_get_w},
+		{"Rectangle_get_h", Polycore_Rectangle_get_h},
+		{"Rectangle_set_x", Polycore_Rectangle_set_x},
+		{"Rectangle_set_y", Polycore_Rectangle_set_y},
+		{"Rectangle_set_w", Polycore_Rectangle_set_w},
+		{"Rectangle_set_h", Polycore_Rectangle_set_h},
+		{"Rectangle", Polycore_Rectangle},
+		{"Rectangle_setRect", Polycore_Rectangle_setRect},
+		{"delete_Rectangle", Polycore_delete_Rectangle},
+		{"CoreServices_getInstance", Polycore_CoreServices_getInstance},
+		{"CoreServices_setInstance", Polycore_CoreServices_setInstance},
+		{"CoreServices_getRenderMutex", Polycore_CoreServices_getRenderMutex},
+		{"CoreServices_setRenderer", Polycore_CoreServices_setRenderer},
+		{"CoreServices_getRenderer", Polycore_CoreServices_getRenderer},
+		{"CoreServices_Update", Polycore_CoreServices_Update},
+		{"CoreServices_setCore", Polycore_CoreServices_setCore},
+		{"CoreServices_getCore", Polycore_CoreServices_getCore},
+		{"CoreServices_installModule", Polycore_CoreServices_installModule},
+		{"CoreServices_getMaterialManager", Polycore_CoreServices_getMaterialManager},
+		{"CoreServices_getScreenManager", Polycore_CoreServices_getScreenManager},
+		{"CoreServices_getSceneManager", Polycore_CoreServices_getSceneManager},
+		{"CoreServices_getTimerManager", Polycore_CoreServices_getTimerManager},
+		{"CoreServices_getTweenManager", Polycore_CoreServices_getTweenManager},
+		{"CoreServices_getResourceManager", Polycore_CoreServices_getResourceManager},
+		{"CoreServices_getSoundManager", Polycore_CoreServices_getSoundManager},
+		{"CoreServices_getFontManager", Polycore_CoreServices_getFontManager},
+		{"CoreServices_getConfig", Polycore_CoreServices_getConfig},
+		{"delete_CoreServices", Polycore_delete_CoreServices},
+		{"Resource", Polycore_Resource},
+		{"Resource_getResourceName", Polycore_Resource_getResourceName},
+		{"Resource_getResourceType", Polycore_Resource_getResourceType},
+		{"Resource_setResourceName", Polycore_Resource_setResourceName},
+		{"Resource_setResourcePath", Polycore_Resource_setResourcePath},
+		{"Resource_getResourcePath", Polycore_Resource_getResourcePath},
+		{"delete_Resource", Polycore_delete_Resource},
+		{"SceneRenderTexture", Polycore_SceneRenderTexture},
+		{"SceneRenderTexture_drawScreen", Polycore_SceneRenderTexture_drawScreen},
+		{"SceneRenderTexture_getTargetTexture", Polycore_SceneRenderTexture_getTargetTexture},
+		{"SceneRenderTexture_getTargetScene", Polycore_SceneRenderTexture_getTargetScene},
+		{"SceneRenderTexture_getTargetCamera", Polycore_SceneRenderTexture_getTargetCamera},
+		{"delete_SceneRenderTexture", Polycore_delete_SceneRenderTexture},
+		{"Camera", Polycore_Camera},
+		{"Camera_buildFrustrumPlanes", Polycore_Camera_buildFrustrumPlanes},
+		{"Camera_isSphereInFrustrum", Polycore_Camera_isSphereInFrustrum},
+		{"Camera_canSee", Polycore_Camera_canSee},
+		{"Camera_setOrthoMode", Polycore_Camera_setOrthoMode},
+		{"Camera_getOrthoMode", Polycore_Camera_getOrthoMode},
+		{"Camera_setFOV", Polycore_Camera_setFOV},
+		{"Camera_getFOV", Polycore_Camera_getFOV},
+		{"Camera_setParentScene", Polycore_Camera_setParentScene},
+		{"Camera_doCameraTransform", Polycore_Camera_doCameraTransform},
+		{"Camera_setLightDepthTexture", Polycore_Camera_setLightDepthTexture},
+		{"Camera_hasFilterShader", Polycore_Camera_hasFilterShader},
+		{"Camera_drawFilter", Polycore_Camera_drawFilter},
+		{"Camera_setExposureLevel", Polycore_Camera_setExposureLevel},
+		{"Camera_getExposureLevel", Polycore_Camera_getExposureLevel},
+		{"Camera_createPostFilter", Polycore_Camera_createPostFilter},
+		{"Camera_setPostFilter", Polycore_Camera_setPostFilter},
+		{"Camera_removePostFilter", Polycore_Camera_removePostFilter},
+		{"Camera_getScreenShaderMaterial", Polycore_Camera_getScreenShaderMaterial},
+		{"delete_Camera", Polycore_delete_Camera},
 		{"ScreenSprite", Polycore_ScreenSprite},
 		{"ScreenSprite", Polycore_ScreenSprite},
 		{"ScreenSprite_addAnimation", Polycore_ScreenSprite_addAnimation},
 		{"ScreenSprite_addAnimation", Polycore_ScreenSprite_addAnimation},
 		{"ScreenSprite_playAnimation", Polycore_ScreenSprite_playAnimation},
 		{"ScreenSprite_playAnimation", Polycore_ScreenSprite_playAnimation},
 		{"ScreenSprite_Update", Polycore_ScreenSprite_Update},
 		{"ScreenSprite_Update", Polycore_ScreenSprite_Update},
 		{"delete_ScreenSprite", Polycore_delete_ScreenSprite},
 		{"delete_ScreenSprite", Polycore_delete_ScreenSprite},
-		{"Shader_get_numSpotLights", Polycore_Shader_get_numSpotLights},
-		{"Shader_get_numAreaLights", Polycore_Shader_get_numAreaLights},
-		{"Shader_set_numSpotLights", Polycore_Shader_set_numSpotLights},
-		{"Shader_set_numAreaLights", Polycore_Shader_set_numAreaLights},
-		{"Shader_getType", Polycore_Shader_getType},
-		{"Shader_setName", Polycore_Shader_setName},
-		{"Shader_getName", Polycore_Shader_getName},
-		{"Shader_createBinding", Polycore_Shader_createBinding},
-		{"delete_Shader", Polycore_delete_Shader},
-		{"ShaderBinding", Polycore_ShaderBinding},
-		{"ShaderBinding_clearTexture", Polycore_ShaderBinding_clearTexture},
-		{"ShaderBinding_addTexture", Polycore_ShaderBinding_addTexture},
-		{"ShaderBinding_addParam", Polycore_ShaderBinding_addParam},
-		{"ShaderBinding_addCubemap", Polycore_ShaderBinding_addCubemap},
-		{"ShaderBinding_getNumLocalParams", Polycore_ShaderBinding_getNumLocalParams},
-		{"ShaderBinding_getLocalParam", Polycore_ShaderBinding_getLocalParam},
-		{"ShaderBinding_getLocalParamByName", Polycore_ShaderBinding_getLocalParamByName},
-		{"ShaderBinding_addRenderTargetBinding", Polycore_ShaderBinding_addRenderTargetBinding},
-		{"ShaderBinding_getNumRenderTargetBindings", Polycore_ShaderBinding_getNumRenderTargetBindings},
-		{"ShaderBinding_getRenderTargetBinding", Polycore_ShaderBinding_getRenderTargetBinding},
-		{"ShaderBinding_getNumInTargetBindings", Polycore_ShaderBinding_getNumInTargetBindings},
-		{"ShaderBinding_getInTargetBinding", Polycore_ShaderBinding_getInTargetBinding},
-		{"ShaderBinding_getNumOutTargetBindings", Polycore_ShaderBinding_getNumOutTargetBindings},
-		{"ShaderBinding_getOutTargetBinding", Polycore_ShaderBinding_getOutTargetBinding},
-		{"ShaderBinding_addLocalParam", Polycore_ShaderBinding_addLocalParam},
-		{"delete_ShaderBinding", Polycore_delete_ShaderBinding},
-		{"SkeletonAnimation", Polycore_SkeletonAnimation},
-		{"SkeletonAnimation_addBoneTrack", Polycore_SkeletonAnimation_addBoneTrack},
-		{"SkeletonAnimation_getName", Polycore_SkeletonAnimation_getName},
-		{"SkeletonAnimation_Play", Polycore_SkeletonAnimation_Play},
-		{"SkeletonAnimation_Stop", Polycore_SkeletonAnimation_Stop},
-		{"SkeletonAnimation_Update", Polycore_SkeletonAnimation_Update},
-		{"SkeletonAnimation_setSpeed", Polycore_SkeletonAnimation_setSpeed},
-		{"delete_SkeletonAnimation", Polycore_delete_SkeletonAnimation},
-		{"BoneTrack_get_LocXVec", Polycore_BoneTrack_get_LocXVec},
-		{"BoneTrack_get_LocYVec", Polycore_BoneTrack_get_LocYVec},
-		{"BoneTrack_get_LocZVec", Polycore_BoneTrack_get_LocZVec},
-		{"BoneTrack_get_ScaleXVec", Polycore_BoneTrack_get_ScaleXVec},
-		{"BoneTrack_get_ScaleYVec", Polycore_BoneTrack_get_ScaleYVec},
-		{"BoneTrack_get_ScaleZVec", Polycore_BoneTrack_get_ScaleZVec},
-		{"BoneTrack_get_boneQuat", Polycore_BoneTrack_get_boneQuat},
-		{"BoneTrack_get_QuatWVec", Polycore_BoneTrack_get_QuatWVec},
-		{"BoneTrack_get_QuatXVec", Polycore_BoneTrack_get_QuatXVec},
-		{"BoneTrack_get_QuatYVec", Polycore_BoneTrack_get_QuatYVec},
-		{"BoneTrack_get_QuatZVec", Polycore_BoneTrack_get_QuatZVec},
-		{"BoneTrack", Polycore_BoneTrack},
-		{"BoneTrack_Play", Polycore_BoneTrack_Play},
-		{"BoneTrack_Stop", Polycore_BoneTrack_Stop},
-		{"BoneTrack_Update", Polycore_BoneTrack_Update},
-		{"BoneTrack_setSpeed", Polycore_BoneTrack_setSpeed},
-		{"delete_BoneTrack", Polycore_delete_BoneTrack},
-		{"Skeleton", Polycore_Skeleton},
-		{"Skeleton_loadSkeleton", Polycore_Skeleton_loadSkeleton},
-		{"Skeleton_playAnimation", Polycore_Skeleton_playAnimation},
-		{"Skeleton_playAnimationByIndex", Polycore_Skeleton_playAnimationByIndex},
-		{"Skeleton_addAnimation", Polycore_Skeleton_addAnimation},
-		{"Skeleton_getAnimation", Polycore_Skeleton_getAnimation},
-		{"Skeleton_Update", Polycore_Skeleton_Update},
-		{"Skeleton_getBoneByName", Polycore_Skeleton_getBoneByName},
-		{"Skeleton_bonesVisible", Polycore_Skeleton_bonesVisible},
-		{"Skeleton_enableBoneLabels", Polycore_Skeleton_enableBoneLabels},
-		{"Skeleton_getNumBones", Polycore_Skeleton_getNumBones},
-		{"Skeleton_getBone", Polycore_Skeleton_getBone},
-		{"Skeleton_getCurrentAnimation", Polycore_Skeleton_getCurrentAnimation},
-		{"delete_Skeleton", Polycore_delete_Skeleton},
-		{"Sound", Polycore_Sound},
-		{"Sound_Play", Polycore_Sound_Play},
-		{"Sound_Stop", Polycore_Sound_Stop},
-		{"Sound_setVolume", Polycore_Sound_setVolume},
-		{"Sound_setPitch", Polycore_Sound_setPitch},
-		{"Sound_setIsPositional", Polycore_Sound_setIsPositional},
-		{"Sound_setSoundPosition", Polycore_Sound_setSoundPosition},
-		{"Sound_setSoundVelocity", Polycore_Sound_setSoundVelocity},
-		{"Sound_setSoundDirection", Polycore_Sound_setSoundDirection},
-		{"Sound_setPositionalProperties", Polycore_Sound_setPositionalProperties},
-		{"Sound_loadWAV", Polycore_Sound_loadWAV},
-		{"Sound_loadOGG", Polycore_Sound_loadOGG},
-		{"Sound_GenSource", Polycore_Sound_GenSource},
-		{"Sound_checkALError", Polycore_Sound_checkALError},
-		{"Sound_soundError", Polycore_Sound_soundError},
-		{"Sound_soundCheck", Polycore_Sound_soundCheck},
-		{"delete_Sound", Polycore_delete_Sound},
-		{"SoundManager", Polycore_SoundManager},
-		{"SoundManager_setListenerPosition", Polycore_SoundManager_setListenerPosition},
-		{"SoundManager_setListenerOrientation", Polycore_SoundManager_setListenerOrientation},
-		{"SoundManager_initAL", Polycore_SoundManager_initAL},
-		{"SoundManager_setGlobalVolume", Polycore_SoundManager_setGlobalVolume},
-		{"delete_SoundManager", Polycore_delete_SoundManager},
-		{"String_get_contents", Polycore_String_get_contents},
-		{"String_get_s_contents", Polycore_String_get_s_contents},
-		{"String", Polycore_String},
-		{"String_size", Polycore_String_size},
-		{"String_length", Polycore_String_length},
-		{"String_getSTLString", Polycore_String_getSTLString},
-		{"String_getSTLWString", Polycore_String_getSTLWString},
-		{"String_substr", Polycore_String_substr},
-		{"String_rfind", Polycore_String_rfind},
-		{"String_find", Polycore_String_find},
-		{"String_find_last_of", Polycore_String_find_last_of},
-		{"String_toLowerCase", Polycore_String_toLowerCase},
-		{"String_toUpperCase", Polycore_String_toUpperCase},
-		{"String_replace", Polycore_String_replace},
-		{"String_NumberToString", Polycore_String_NumberToString},
-		{"String_IntToString", Polycore_String_IntToString},
-		{"String_c_str", Polycore_String_c_str},
-		{"String_wc_str", Polycore_String_wc_str},
-		{"String_data", Polycore_String_data},
-		{"String_getDataWithEncoding", Polycore_String_getDataWithEncoding},
-		{"String_getDataSizeWithEncoding", Polycore_String_getDataSizeWithEncoding},
-		{"String_setDataWithEncoding", Polycore_String_setDataWithEncoding},
-		{"delete_String", Polycore_delete_String},
-		{"Texture_get_scrollSpeedX", Polycore_Texture_get_scrollSpeedX},
-		{"Texture_get_scrollSpeedY", Polycore_Texture_get_scrollSpeedY},
-		{"Texture_get_clamp", Polycore_Texture_get_clamp},
-		{"Texture_set_scrollSpeedX", Polycore_Texture_set_scrollSpeedX},
-		{"Texture_set_scrollSpeedY", Polycore_Texture_set_scrollSpeedY},
-		{"Texture_set_clamp", Polycore_Texture_set_clamp},
-		{"Texture_setTextureData", Polycore_Texture_setTextureData},
-		{"Texture_recreateFromImageData", Polycore_Texture_recreateFromImageData},
-		{"Texture_getScrollOffsetX", Polycore_Texture_getScrollOffsetX},
-		{"Texture_getScrollOffsetY", Polycore_Texture_getScrollOffsetY},
-		{"Texture_setImageData", Polycore_Texture_setImageData},
-		{"Texture_updateScroll", Polycore_Texture_updateScroll},
-		{"Texture_setResourcePath", Polycore_Texture_setResourcePath},
-		{"Texture_getResourcePath", Polycore_Texture_getResourcePath},
-		{"Texture_getTextureData", Polycore_Texture_getTextureData},
-		{"Texture_getWidth", Polycore_Texture_getWidth},
-		{"Texture_getHeight", Polycore_Texture_getHeight},
-		{"delete_Texture", Polycore_delete_Texture},
-		{"Timer", Polycore_Timer},
-		{"Timer_Pause", Polycore_Timer_Pause},
-		{"Timer_isPaused", Polycore_Timer_isPaused},
-		{"Timer_getTicks", Polycore_Timer_getTicks},
-		{"Timer_Update", Polycore_Timer_Update},
-		{"Timer_Reset", Polycore_Timer_Reset},
-		{"Timer_hasElapsed", Polycore_Timer_hasElapsed},
-		{"Timer_getElapsedf", Polycore_Timer_getElapsedf},
-		{"delete_Timer", Polycore_delete_Timer},
-		{"TimerManager", Polycore_TimerManager},
-		{"TimerManager_removeTimer", Polycore_TimerManager_removeTimer},
-		{"TimerManager_addTimer", Polycore_TimerManager_addTimer},
-		{"TimerManager_Update", Polycore_TimerManager_Update},
-		{"delete_TimerManager", Polycore_delete_TimerManager},
-		{"Tween_get_repeat", Polycore_Tween_get_repeat},
-		{"Tween_set_repeat", Polycore_Tween_set_repeat},
-		{"Tween", Polycore_Tween},
-		{"Tween_interpolateTween", Polycore_Tween_interpolateTween},
-		{"Tween_updateCustomTween", Polycore_Tween_updateCustomTween},
-		{"Tween_doOnComplete", Polycore_Tween_doOnComplete},
-		{"Tween_Pause", Polycore_Tween_Pause},
-		{"Tween_Reset", Polycore_Tween_Reset},
-		{"Tween_isComplete", Polycore_Tween_isComplete},
-		{"Tween_setSpeed", Polycore_Tween_setSpeed},
-		{"delete_Tween", Polycore_delete_Tween},
-		{"BezierPathTween", Polycore_BezierPathTween},
-		{"BezierPathTween_updateCustomTween", Polycore_BezierPathTween_updateCustomTween},
-		{"delete_BezierPathTween", Polycore_delete_BezierPathTween},
-		{"QuaternionTween", Polycore_QuaternionTween},
-		{"QuaternionTween_updateCustomTween", Polycore_QuaternionTween_updateCustomTween},
-		{"delete_QuaternionTween", Polycore_delete_QuaternionTween},
-		{"TweenManager", Polycore_TweenManager},
-		{"TweenManager_addTween", Polycore_TweenManager_addTween},
-		{"TweenManager_removeTween", Polycore_TweenManager_removeTween},
-		{"TweenManager_Update", Polycore_TweenManager_Update},
-		{"delete_TweenManager", Polycore_delete_TweenManager},
-		{"Vector2", Polycore_Vector2},
-		{"delete_Vector2", Polycore_delete_Vector2},
-		{"Vector3_get_x", Polycore_Vector3_get_x},
-		{"Vector3_get_y", Polycore_Vector3_get_y},
-		{"Vector3_get_z", Polycore_Vector3_get_z},
-		{"Vector3_set_x", Polycore_Vector3_set_x},
-		{"Vector3_set_y", Polycore_Vector3_set_y},
-		{"Vector3_set_z", Polycore_Vector3_set_z},
-		{"Vector3", Polycore_Vector3},
-		{"Vector3_set", Polycore_Vector3_set},
-		{"Vector3_distance", Polycore_Vector3_distance},
-		{"Vector3_length", Polycore_Vector3_length},
-		{"Vector3_dot", Polycore_Vector3_dot},
-		{"Vector3_crossProduct", Polycore_Vector3_crossProduct},
-		{"Vector3_Normalize", Polycore_Vector3_Normalize},
-		{"delete_Vector3", Polycore_delete_Vector3},
-		{"Vertex_get_restNormal", Polycore_Vertex_get_restNormal},
-		{"Vertex_get_restPosition", Polycore_Vertex_get_restPosition},
-		{"Vertex_get_normal", Polycore_Vertex_get_normal},
-		{"Vertex_get_vertexColor", Polycore_Vertex_get_vertexColor},
-		{"Vertex_get_useVertexColor", Polycore_Vertex_get_useVertexColor},
-		{"Vertex_set_useVertexColor", Polycore_Vertex_set_useVertexColor},
-		{"Vertex", Polycore_Vertex},
-		{"Vertex_addBoneAssignment", Polycore_Vertex_addBoneAssignment},
-		{"Vertex_getNumBoneAssignments", Polycore_Vertex_getNumBoneAssignments},
-		{"Vertex_getBoneAssignment", Polycore_Vertex_getBoneAssignment},
-		{"Vertex_normalizeWeights", Polycore_Vertex_normalizeWeights},
-		{"Vertex_getTexCoord", Polycore_Vertex_getTexCoord},
-		{"Vertex_setTexCoord", Polycore_Vertex_setTexCoord},
-		{"Vertex_setNormal", Polycore_Vertex_setNormal},
-		{"delete_Vertex", Polycore_delete_Vertex},
+		{"FixedShader", Polycore_FixedShader},
+		{"FixedShader_createBinding", Polycore_FixedShader_createBinding},
+		{"delete_FixedShader", Polycore_delete_FixedShader},
+		{"FixedShaderBinding", Polycore_FixedShaderBinding},
+		{"FixedShaderBinding_addTexture", Polycore_FixedShaderBinding_addTexture},
+		{"FixedShaderBinding_addCubemap", Polycore_FixedShaderBinding_addCubemap},
+		{"FixedShaderBinding_addParam", Polycore_FixedShaderBinding_addParam},
+		{"FixedShaderBinding_getDiffuseTexture", Polycore_FixedShaderBinding_getDiffuseTexture},
+		{"delete_FixedShaderBinding", Polycore_delete_FixedShaderBinding},
+		{"SceneLight_get_specularLightColor", Polycore_SceneLight_get_specularLightColor},
+		{"SceneLight_get_lightColor", Polycore_SceneLight_get_lightColor},
+		{"SceneLight", Polycore_SceneLight},
+		{"SceneLight_getIntensity", Polycore_SceneLight_getIntensity},
+		{"SceneLight_setIntensity", Polycore_SceneLight_setIntensity},
+		{"SceneLight_setAttenuation", Polycore_SceneLight_setAttenuation},
+		{"SceneLight_getConstantAttenuation", Polycore_SceneLight_getConstantAttenuation},
+		{"SceneLight_getLinearAttenuation", Polycore_SceneLight_getLinearAttenuation},
+		{"SceneLight_getQuadraticAttenuation", Polycore_SceneLight_getQuadraticAttenuation},
+		{"SceneLight_getType", Polycore_SceneLight_getType},
+		{"SceneLight_renderDepthMap", Polycore_SceneLight_renderDepthMap},
+		{"SceneLight_Render", Polycore_SceneLight_Render},
+		{"SceneLight_getLightViewMatrix", Polycore_SceneLight_getLightViewMatrix},
+		{"SceneLight_getZBufferTexture", Polycore_SceneLight_getZBufferTexture},
+		{"SceneLight_setSpecularLightColor", Polycore_SceneLight_setSpecularLightColor},
+		{"SceneLight_setDiffuseLightColor", Polycore_SceneLight_setDiffuseLightColor},
+		{"SceneLight_setLightColor", Polycore_SceneLight_setLightColor},
+		{"SceneLight_setSpotlightProperties", Polycore_SceneLight_setSpotlightProperties},
+		{"SceneLight_getSpotlightCutoff", Polycore_SceneLight_getSpotlightCutoff},
+		{"SceneLight_getSpotlightExponent", Polycore_SceneLight_getSpotlightExponent},
+		{"SceneLight_enableShadows", Polycore_SceneLight_enableShadows},
+		{"SceneLight_setShadowMapFOV", Polycore_SceneLight_setShadowMapFOV},
+		{"SceneLight_areShadowsEnabled", Polycore_SceneLight_areShadowsEnabled},
+		{"SceneLight_getLightType", Polycore_SceneLight_getLightType},
+		{"SceneLight_enableDebugDraw", Polycore_SceneLight_enableDebugDraw},
+		{"SceneLight_setLightImportance", Polycore_SceneLight_setLightImportance},
+		{"SceneLight_getLightImportance", Polycore_SceneLight_getLightImportance},
+		{"delete_SceneLight", Polycore_delete_SceneLight},
 		{NULL, NULL}
 		{NULL, NULL}
 	};
 	};
 	luaL_openlib(L, "Polycore", polycoreLib, 0);
 	luaL_openlib(L, "Polycore", polycoreLib, 0);

+ 374 - 366
Bindings/Scripts/create_lua_library/create_lua_library.py

@@ -10,8 +10,9 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	lfout = ""
 	lfout = ""
 	
 	
 	sout += "#include \"%sLUA.h\"\n" % (prefix)
 	sout += "#include \"%sLUA.h\"\n" % (prefix)
-	sout += "#include \"%sLUAWrappers.h\"\n\n" % (prefix)
-	
+	sout += "#include \"%sLUAWrappers.h\"\n" % (prefix)
+	sout += "#include \"PolyCoreServices.h\"\n\n"
+	sout += "using namespace Polycode;\n\n"
 	sout += "int luaopen_%s(lua_State *L) {\n" % (prefix)
 	sout += "int luaopen_%s(lua_State *L) {\n" % (prefix)
 	if prefix != "Polycode":
 	if prefix != "Polycode":
 		sout += "CoreServices *inst = (CoreServices*)lua_topointer(L, 1);\n"
 		sout += "CoreServices *inst = (CoreServices*)lua_topointer(L, 1);\n"
@@ -19,13 +20,23 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	sout += "\tstatic const struct luaL_reg %sLib [] = {" % (libSmallName)
 	sout += "\tstatic const struct luaL_reg %sLib [] = {" % (libSmallName)
 	
 	
 	out += "#pragma once\n\n"
 	out += "#pragma once\n\n"
-	out += "#include <%s>\n\n" % (mainInclude)
-	
+
 	out += "extern \"C\" {\n\n"
 	out += "extern \"C\" {\n\n"
 	out += "#include <stdio.h>\n"
 	out += "#include <stdio.h>\n"
 	out += "#include \"lua.h\"\n"
 	out += "#include \"lua.h\"\n"
 	out += "#include \"lualib.h\"\n"
 	out += "#include \"lualib.h\"\n"
-	out += "#include \"lauxlib.h\"\n\n"
+	out += "#include \"lauxlib.h\"\n"
+	out += "} // extern \"C\" \n\n"
+
+	files = os.listdir(inputPath)
+	filteredFiles = []
+	for fileName in files:
+		ignore = ["PolyGLSLProgram", "PolyGLSLShader", "PolyGLSLShaderModule", "PolyWinCore", "PolyCocoaCore", "PolyAGLCore", "PolySDLCore", "Poly_iPhone", "PolyGLES1Renderer", "PolyGLRenderer", "tinyxml", "tinystr", "OpenGLCubemap", "PolyiPhoneCore", "PolyGLES1Texture", "PolyGLTexture", "PolyGLVertexBuffer", "PolyThreaded"]
+		if fileName.split(".")[1] == "h" and fileName.split(".")[0] not in ignore:
+			filteredFiles.append(fileName)
+			out += "#include \"%s\"\n" % (fileName)
+
+	out += "\nnamespace Polycode {\n\n"
 	
 	
 	if prefix == "Polycode":
 	if prefix == "Polycode":
 		out += "class LuaEventHandler : public EventHandler {\n"
 		out += "class LuaEventHandler : public EventHandler {\n"
@@ -41,396 +52,394 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 		out += "	}\n"
 		out += "	}\n"
 		out += "	int wrapperIndex;\n"
 		out += "	int wrapperIndex;\n"
 		out += "	lua_State *L;\n"
 		out += "	lua_State *L;\n"
-		out += "};\n"
+		out += "};\n\n"
 	
 	
-	files = os.listdir(inputPath)
-	for fileName in files:
+	for fileName in filteredFiles:
 		inheritInModule = ["PhysicsSceneEntity", "CollisionScene", "CollisionSceneEntity"]
 		inheritInModule = ["PhysicsSceneEntity", "CollisionScene", "CollisionSceneEntity"]
-		ignore = ["PolyGLSLProgram", "PolyGLSLShader", "PolyGLSLShaderModule", "PolyWinCore", "PolyCocoaCore", "PolyAGLCore", "PolySDLCore", "PolyGLES1Renderer", "PolyGLRenderer", "tinyxml", "tinystr", "OpenGLCubemap", "PolyiPhoneCore", "PolyGLES1Texture", "PolyGLTexture", "PolyGLVertexBuffer", "PolyThreaded"]
-		if fileName.split(".")[1] == "h" and fileName.split(".")[0] not in ignore:
-			headerFile = "%s/%s" % (inputPath, fileName)
-			print "Parsing %s" % fileName
-			try:
-				f = open(headerFile)
-				contents = f.read().replace("_PolyExport", "")
-				cppHeader = CppHeaderParser.CppHeader(contents, "string")
-				ignore_classes = ["PolycodeShaderModule", "Object", "Threaded", "OpenGLCubemap"]
-				for ckey in cppHeader.classes:
-					print ">> Parsing class %s" % ckey
-					c = cppHeader.classes[ckey]
-		#			if ckey == "ParticleEmitter":
-		#				print c
-					lout = ""
-					inherits = False
-					if len(c["inherits"]) > 0:
-						if c["inherits"][0]["class"] not in ignore_classes:	
-							if c["inherits"][0]["class"] in inheritInModule:
-								lout += "require \"%s/%s\"\n\n" % (prefix, c["inherits"][0]["class"])
-							else:
-								lout += "require \"Polycode/%s\"\n\n" % (c["inherits"][0]["class"])
-							lout += "class \"%s\" (%s)\n\n" % (ckey, c["inherits"][0]["class"])
-							inherits = True
-					if inherits == False:
-						lout += "class \"%s\"\n\n" % ckey
-			
-					if len(c["methods"]["public"]) < 2 or ckey in ignore_classes:
-						continue
-	
-					if ckey == "OSFileEntry":
-						print c["methods"]["public"]
-					parsed_methods = []
-					ignore_methods = ["readByte32", "readByte16", "getCustomEntitiesByType", "Core", "Renderer", "Shader", "Texture", "handleEvent", "secondaryHandler"]
-					lout += "\n\n"
-	
-					pps = []
-					for pp in c["properties"]["public"]:
-						if pp["type"].find("static ") != -1:
-							if "defaltValue" in pp:
-								lout += "%s = %s\n" % (pp["name"], pp["defaltValue"])
+		headerFile = "%s/%s" % (inputPath, fileName)
+		print "Parsing %s" % fileName
+		try:
+			f = open(headerFile)
+			contents = f.read().replace("_PolyExport", "")
+			cppHeader = CppHeaderParser.CppHeader(contents, "string")
+			ignore_classes = ["PolycodeShaderModule", "Object", "Threaded", "OpenGLCubemap"]
+
+			for ckey in cppHeader.classes:
+				print ">> Parsing class %s" % ckey
+				c = cppHeader.classes[ckey]
+	#			if ckey == "ParticleEmitter":
+	#				print c
+				lout = ""
+				inherits = False
+				if len(c["inherits"]) > 0:
+					if c["inherits"][0]["class"] not in ignore_classes:
+						if c["inherits"][0]["class"] in inheritInModule:
+							lout += "require \"%s/%s\"\n\n" % (prefix, c["inherits"][0]["class"])
 						else:
 						else:
-							#there are some bugs in the class parser that cause it to return junk
-							if pp["type"].find("*") == -1 and pp["type"].find("vector") == -1 and pp["name"] != "16" and pp["name"] != "setScale" and pp["name"] != "setPosition" and pp["name"] != "BUFFER_CACHE_PRECISION":
-								pps.append(pp)
-							#if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
-							#	pps.append(pp)
-							#else:
-							#	print(">>> Skipping %s[%s %s]" % (ckey, pp["type"], pp["name"]))
-	
-					pidx = 0
-			
-					# hack to fix the lack of multiple inheritance
-					#if ckey == "ScreenParticleEmitter" or ckey == "SceneParticleEmitter":
-					#		pps.append({"name": "emitter", "type": "ParticleEmitter"})
-	
-					if len(pps) > 0:
-						lout += "function %s:__index__(name)\n" % ckey
-						for pp in pps:
+							lout += "require \"Polycode/%s\"\n\n" % (c["inherits"][0]["class"])
+						lout += "class \"%s\" (%s)\n\n" % (ckey, c["inherits"][0]["class"])
+						inherits = True
+				if inherits == False:
+					lout += "class \"%s\"\n\n" % ckey
+
+				if len(c["methods"]["public"]) < 2 or ckey in ignore_classes:
+					continue
+
+				if ckey == "OSFileEntry":
+					print c["methods"]["public"]
+				parsed_methods = []
+				ignore_methods = ["readByte32", "readByte16", "getCustomEntitiesByType", "Core", "Renderer", "Shader", "Texture", "handleEvent", "secondaryHandler", "getSTLString"]
+				lout += "\n\n"
+
+				pps = []
+				for pp in c["properties"]["public"]:
+					if pp["type"].find("static ") != -1:
+						if "defaltValue" in pp:
+							lout += "%s = %s\n" % (pp["name"], pp["defaltValue"])
+					else:
+						#there are some bugs in the class parser that cause it to return junk
+						if pp["type"].find("*") == -1 and pp["type"].find("vector") == -1 and pp["name"] != "16" and pp["name"] != "setScale" and pp["name"] != "setPosition" and pp["name"] != "BUFFER_CACHE_PRECISION":
+							pps.append(pp)
+						#if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
+						#	pps.append(pp)
+						#else:
+						#	print(">>> Skipping %s[%s %s]" % (ckey, pp["type"], pp["name"]))
+
+				pidx = 0
+
+				# hack to fix the lack of multiple inheritance
+				#if ckey == "ScreenParticleEmitter" or ckey == "SceneParticleEmitter":
+				#		pps.append({"name": "emitter", "type": "ParticleEmitter"})
+
+				if len(pps) > 0:
+					lout += "function %s:__index__(name)\n" % ckey
+					for pp in pps:
+						if pidx == 0:
+							lout += "\tif name == \"%s\" then\n" % (pp["name"])
+						else:
+							lout += "\telseif name == \"%s\" then\n" % (pp["name"])
+
+						if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
+							lout += "\t\treturn %s.%s_get_%s(self.__ptr)\n" % (libName, ckey, pp["name"])
+						elif (ckey == "ScreenParticleEmitter" or ckey == "SceneParticleEmitter") and pp["name"] == "emitter":
+							lout += "\t\tlocal ret = %s(\"__skip_ptr__\")\n" % (pp["type"])
+							lout += "\t\tret.__ptr = self.__ptr\n"
+							lout += "\t\treturn ret\n"
+						else:
+							lout += "\t\tretVal = %s.%s_get_%s(self.__ptr)\n" % (libName, ckey, pp["name"])
+							lout += "\t\tif Polycore.__ptr_lookup[retVal] ~= nil then\n"
+							lout += "\t\t\treturn Polycore.__ptr_lookup[retVal]\n"
+							lout += "\t\telse\n"
+							lout += "\t\t\tPolycore.__ptr_lookup[retVal] = %s(\"__skip_ptr__\")\n" % (pp["type"])
+							lout += "\t\t\tPolycore.__ptr_lookup[retVal].__ptr = retVal\n"
+							lout += "\t\t\treturn Polycore.__ptr_lookup[retVal]\n"
+							lout += "\t\tend\n"
+
+						if not ((ckey == "ScreenParticleEmitter" or ckey == "SceneParticleEmitter") and pp["name"] == "emitter"):
+							sout += "\t\t{\"%s_get_%s\", %s_%s_get_%s},\n" % (ckey, pp["name"], libName, ckey, pp["name"])
+							out += "static int %s_%s_get_%s(lua_State *L) {\n" % (libName, ckey, pp["name"])
+							out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
+							out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey, ckey)
+
+							outfunc = "lua_pushlightuserdata"
+							retFunc = ""
+							if pp["type"] == "Number":
+								outfunc = "lua_pushnumber"
+							if pp["type"] == "String":
+								outfunc = "lua_pushstring"
+								retFunc = ".c_str()"
+							if pp["type"] == "int":
+								outfunc = "lua_pushinteger"
+							if pp["type"] == "bool":
+								outfunc = "lua_pushboolean"
+
+							if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
+								out += "\t%s(L, inst->%s%s);\n" % (outfunc, pp["name"], retFunc)
+							else:
+								out += "\t%s(L, &inst->%s%s);\n" % (outfunc, pp["name"], retFunc)
+							out += "\treturn 1;\n"
+							out += "}\n\n"
+						pidx = pidx + 1
+
+					lout += "\tend\n"
+					lout += "end\n"
+
+				lout += "\n\n"
+				pidx = 0
+				if len(pps) > 0:
+					lout += "function %s:__set_callback(name,value)\n" % ckey
+					for pp in pps:
+						if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
 							if pidx == 0:
 							if pidx == 0:
 								lout += "\tif name == \"%s\" then\n" % (pp["name"])
 								lout += "\tif name == \"%s\" then\n" % (pp["name"])
 							else:
 							else:
 								lout += "\telseif name == \"%s\" then\n" % (pp["name"])
 								lout += "\telseif name == \"%s\" then\n" % (pp["name"])
+							lout += "\t\t%s.%s_set_%s(self.__ptr, value)\n" % (libName, ckey, pp["name"])
+							lout += "\t\treturn true\n"
 
 
-							if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
-								lout += "\t\treturn %s.%s_get_%s(self.__ptr)\n" % (libName, ckey, pp["name"])
-							elif (ckey == "ScreenParticleEmitter" or ckey == "SceneParticleEmitter") and pp["name"] == "emitter":
-								lout += "\t\tlocal ret = %s(\"__skip_ptr__\")\n" % (pp["type"])
-								lout += "\t\tret.__ptr = self.__ptr\n"
-								lout += "\t\treturn ret\n"
-							else:
-								lout += "\t\tretVal = %s.%s_get_%s(self.__ptr)\n" % (libName, ckey, pp["name"])
-								lout += "\t\tif Polycore.__ptr_lookup[retVal] ~= nil then\n"
-								lout += "\t\t\treturn Polycore.__ptr_lookup[retVal]\n"
-								lout += "\t\telse\n"
-								lout += "\t\t\tPolycore.__ptr_lookup[retVal] = %s(\"__skip_ptr__\")\n" % (pp["type"])
-								lout += "\t\t\tPolycore.__ptr_lookup[retVal].__ptr = retVal\n"
-								lout += "\t\t\treturn Polycore.__ptr_lookup[retVal]\n"
-								lout += "\t\tend\n"
+							sout += "\t\t{\"%s_set_%s\", %s_%s_set_%s},\n" % (ckey, pp["name"], libName, ckey, pp["name"])
+							out += "static int %s_%s_set_%s(lua_State *L) {\n" % (libName, ckey, pp["name"])
+							out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
+							out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey, ckey)
 
 
-							if not ((ckey == "ScreenParticleEmitter" or ckey == "SceneParticleEmitter") and pp["name"] == "emitter"):
-								sout += "\t\t{\"%s_get_%s\", %s_%s_get_%s},\n" % (ckey, pp["name"], libName, ckey, pp["name"])
-								out += "static int %s_%s_get_%s(lua_State *L) {\n" % (libName, ckey, pp["name"])
-								out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
-								out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"), ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
-	
-								outfunc = "lua_pushlightuserdata"
-								retFunc = ""
-								if pp["type"] == "Number":
-									outfunc = "lua_pushnumber"
-								if pp["type"] == "String":
-									outfunc = "lua_pushstring"
-									retFunc = ".c_str()"
-								if pp["type"] == "int":
-									outfunc = "lua_pushinteger"
-								if pp["type"] == "bool":
-									outfunc = "lua_pushboolean"
-	
-								if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
-									out += "\t%s(L, inst->%s%s);\n" % (outfunc, pp["name"], retFunc)
-								else:
-									out += "\t%s(L, &inst->%s%s);\n" % (outfunc, pp["name"], retFunc)
-								out += "\treturn 1;\n"
-								out += "}\n\n"
+							outfunc = "lua_topointer"
+							if pp["type"] == "Number":
+								outfunc = "lua_tonumber"
+							if pp["type"] == "String":
+								outfunc = "lua_tostring"
+							if pp["type"] == "int":
+								outfunc = "lua_tointeger"
+							if pp["type"] == "bool":
+								outfunc = "lua_toboolean"
+
+							out += "\t%s param = %s(L, 2);\n" % (pp["type"], outfunc)
+							out += "\tinst->%s = param;\n" % (pp["name"])
+
+							out += "\treturn 0;\n"
+							out += "}\n\n"
 							pidx = pidx + 1
 							pidx = pidx + 1
-	
+					if pidx != 0:
 						lout += "\tend\n"
 						lout += "\tend\n"
-						lout += "end\n"
-	
-					lout += "\n\n"
-					pidx = 0
-					if len(pps) > 0:
-						lout += "function %s:__set_callback(name,value)\n" % ckey
-						for pp in pps:
-							if pp["type"] == "Number" or  pp["type"] == "String" or pp["type"] == "int" or pp["type"] == "bool":
-								if pidx == 0:
-									lout += "\tif name == \"%s\" then\n" % (pp["name"])
-								else:
-									lout += "\telseif name == \"%s\" then\n" % (pp["name"])
-								lout += "\t\t%s.%s_set_%s(self.__ptr, value)\n" % (libName, ckey, pp["name"])
-								lout += "\t\treturn true\n"
-	
-								sout += "\t\t{\"%s_set_%s\", %s_%s_set_%s},\n" % (ckey, pp["name"], libName, ckey, pp["name"])
-								out += "static int %s_%s_set_%s(lua_State *L) {\n" % (libName, ckey, pp["name"])
-								out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
-								out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"), ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
-	
-								outfunc = "lua_topointer"
-								if pp["type"] == "Number":
-									outfunc = "lua_tonumber"
-								if pp["type"] == "String":
-									outfunc = "lua_tostring"
-								if pp["type"] == "int":
-									outfunc = "lua_tointeger"
-								if pp["type"] == "bool":
-									outfunc = "lua_toboolean"
-	
-								out += "\t%s param = %s(L, 2);\n" % (pp["type"], outfunc)
-								out += "\tinst->%s = param;\n" % (pp["name"])
-		
-								out += "\treturn 0;\n"
-								out += "}\n\n"
-								pidx = pidx + 1
-						if pidx != 0:
-							lout += "\tend\n"
-						lout += "\treturn false\n"
-						lout += "end\n"
-						
-	
-					lout += "\n\n"
-					for pm in c["methods"]["public"]:
-						if pm["name"] in parsed_methods or pm["name"].find("operator") > -1 or pm["name"] in ignore_methods:
-							continue 
-	
-						if pm["name"] == "~"+ckey or pm["rtnType"].find("<") > -1:
-							out += ""
+					lout += "\treturn false\n"
+					lout += "end\n"
+
+
+				lout += "\n\n"
+				for pm in c["methods"]["public"]:
+					if pm["name"] in parsed_methods or pm["name"].find("operator") > -1 or pm["name"] in ignore_methods:
+						continue
+
+					if pm["name"] == "~"+ckey or pm["rtnType"].find("<") > -1:
+						out += ""
+					else:
+						basicType = False
+						voidRet = False
+						if pm["name"] == ckey:
+							sout += "\t\t{\"%s\", %s_%s},\n" % (ckey, libName, ckey)
+							out += "static int %s_%s(lua_State *L) {\n" % (libName, ckey)
+							idx = 1
 						else:
 						else:
-							basicType = False
-							voidRet = False
-							if pm["name"] == ckey:
-								sout += "\t\t{\"%s\", %s_%s},\n" % (ckey, libName, ckey)
-								out += "static int %s_%s(lua_State *L) {\n" % (libName, ckey)
-								idx = 1
-							else: 
-								sout += "\t\t{\"%s_%s\", %s_%s_%s},\n" % (ckey, pm["name"], libName, ckey, pm["name"])
-								out += "static int %s_%s_%s(lua_State *L) {\n" % (libName, ckey, pm["name"])
-	
-								if pm["rtnType"].find("static ") == -1:
-									out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
-									out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"), ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
-								idx = 2
-							paramlist = []
-							lparamlist = []
-							for param in pm["parameters"]:
-								if not param.has_key("type"):
-									continue
-								if param["type"] == "0":
-									continue
-	
-								param["name"] = param["name"].replace("end", "_end").replace("repeat", "_repeat")
-								if"type" in param:
-									luatype = "LUA_TLIGHTUSERDATA"
-									checkfunc = "lua_islightuserdata"
-									if param["type"].find("*") > -1:
-										luafunc = "(%s)lua_topointer" % (param["type"].replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
-									elif param["type"].find("&") > -1:
-										luafunc = "*(%s*)lua_topointer" % (param["type"].replace("const", "").replace("&", "").replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
-									else:
-										luafunc = "*(%s*)lua_topointer" % (param["type"].replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
-									lend = ".__ptr"
-									if param["type"] == "int" or param["type"] == "unsigned int":
-										luafunc = "lua_tointeger"
-										luatype = "LUA_TNUMBER"
-										checkfunc = "lua_isnumber"
-										lend = ""
-									if param["type"] == "bool":
-										luafunc = "lua_toboolean"
-										luatype = "LUA_TBOOLEAN"
-										checkfunc = "lua_isboolean"
-										lend = ""
-									if param["type"] == "Number" or param["type"] == "float" or param["type"] == "double":
-										luatype = "LUA_TNUMBER"
-										luafunc = "lua_tonumber"
-										checkfunc = "lua_isnumber"
-										lend = ""
-									if param["type"] == "String":
-										luatype = "LUA_TSTRING"
-										luafunc = "lua_tostring"
-										checkfunc = "lua_isstring"
-										lend = ""
-									
-									param["type"] = param["type"].replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle")
-	
-									if "defaltValue" in param:
-										if checkfunc != "lua_islightuserdata" or (checkfunc == "lua_islightuserdata" and param["defaltValue"] == "NULL"):
-											#param["defaltValue"] = param["defaltValue"].replace(" 0f", ".0f")
-											param["defaltValue"] = param["defaltValue"].replace(": :", "::")
-											#param["defaltValue"] = param["defaltValue"].replace("0 ", "0.")
-											param["defaltValue"] = re.sub(r'([0-9]+) ([0-9])+', r'\1.\2', param["defaltValue"])
-	
-											out += "\t%s %s;\n" % (param["type"], param["name"])
-											out += "\tif(%s(L, %d)) {\n" % (checkfunc, idx)
-											out += "\t\t%s = %s(L, %d);\n" % (param["name"], luafunc, idx)
-											out += "\t} else {\n"
-											out += "\t\t%s = %s;\n" % (param["name"], param["defaltValue"])
-											out += "\t}\n"
-										else:
-											out += "\tluaL_checktype(L, %d, %s);\n" % (idx, luatype);
-											if param["type"] == "String":
-												out += "\t%s %s = String(%s(L, %d));\n" % (param["type"], param["name"], luafunc, idx)
-											else:
-												out += "\t%s %s = %s(L, %d);\n" % (param["type"], param["name"], luafunc, idx)
+							sout += "\t\t{\"%s_%s\", %s_%s_%s},\n" % (ckey, pm["name"], libName, ckey, pm["name"])
+							out += "static int %s_%s_%s(lua_State *L) {\n" % (libName, ckey, pm["name"])
+
+							if pm["rtnType"].find("static ") == -1:
+								out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
+								out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey, ckey)
+							idx = 2
+						paramlist = []
+						lparamlist = []
+						for param in pm["parameters"]:
+							if not param.has_key("type"):
+								continue
+							if param["type"] == "0":
+								continue
+
+							param["name"] = param["name"].replace("end", "_end").replace("repeat", "_repeat")
+							if"type" in param:
+								luatype = "LUA_TLIGHTUSERDATA"
+								checkfunc = "lua_islightuserdata"
+								if param["type"].find("*") > -1:
+									luafunc = "(%s)lua_topointer" % (param["type"].replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
+								elif param["type"].find("&") > -1:
+									luafunc = "*(%s*)lua_topointer" % (param["type"].replace("const", "").replace("&", "").replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
+								else:
+									luafunc = "*(%s*)lua_topointer" % (param["type"].replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
+								lend = ".__ptr"
+								if param["type"] == "int" or param["type"] == "unsigned int":
+									luafunc = "lua_tointeger"
+									luatype = "LUA_TNUMBER"
+									checkfunc = "lua_isnumber"
+									lend = ""
+								if param["type"] == "bool":
+									luafunc = "lua_toboolean"
+									luatype = "LUA_TBOOLEAN"
+									checkfunc = "lua_isboolean"
+									lend = ""
+								if param["type"] == "Number" or param["type"] == "float" or param["type"] == "double":
+									luatype = "LUA_TNUMBER"
+									luafunc = "lua_tonumber"
+									checkfunc = "lua_isnumber"
+									lend = ""
+								if param["type"] == "String":
+									luatype = "LUA_TSTRING"
+									luafunc = "lua_tostring"
+									checkfunc = "lua_isstring"
+									lend = ""
+
+								param["type"] = param["type"].replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle")
+
+								if "defaltValue" in param:
+									if checkfunc != "lua_islightuserdata" or (checkfunc == "lua_islightuserdata" and param["defaltValue"] == "NULL"):
+										#param["defaltValue"] = param["defaltValue"].replace(" 0f", ".0f")
+										param["defaltValue"] = param["defaltValue"].replace(": :", "::")
+										#param["defaltValue"] = param["defaltValue"].replace("0 ", "0.")
+										param["defaltValue"] = re.sub(r'([0-9]+) ([0-9])+', r'\1.\2', param["defaltValue"])
+
+										out += "\t%s %s;\n" % (param["type"], param["name"])
+										out += "\tif(%s(L, %d)) {\n" % (checkfunc, idx)
+										out += "\t\t%s = %s(L, %d);\n" % (param["name"], luafunc, idx)
+										out += "\t} else {\n"
+										out += "\t\t%s = %s;\n" % (param["name"], param["defaltValue"])
+										out += "\t}\n"
 									else:
 									else:
 										out += "\tluaL_checktype(L, %d, %s);\n" % (idx, luatype);
 										out += "\tluaL_checktype(L, %d, %s);\n" % (idx, luatype);
 										if param["type"] == "String":
 										if param["type"] == "String":
 											out += "\t%s %s = String(%s(L, %d));\n" % (param["type"], param["name"], luafunc, idx)
 											out += "\t%s %s = String(%s(L, %d));\n" % (param["type"], param["name"], luafunc, idx)
 										else:
 										else:
 											out += "\t%s %s = %s(L, %d);\n" % (param["type"], param["name"], luafunc, idx)
 											out += "\t%s %s = %s(L, %d);\n" % (param["type"], param["name"], luafunc, idx)
-									paramlist.append(param["name"])
-								
-									lparamlist.append(param["name"]+lend)
-									idx = idx +1
-						
-							if pm["name"] == ckey:
-								if ckey == "EventHandler":
-									out += "\tLuaEventHandler *inst = new LuaEventHandler();\n"
-									out += "\tinst->wrapperIndex = luaL_ref(L, LUA_REGISTRYINDEX );\n"
-									out += "\tinst->L = L;\n"
 								else:
 								else:
-									out += "\t%s *inst = new %s(%s);\n" % (ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"), ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"), ", ".join(paramlist))
-								out += "\tlua_pushlightuserdata(L, (void*)inst);\n"
-								out += "\treturn 1;\n"
+									out += "\tluaL_checktype(L, %d, %s);\n" % (idx, luatype);
+									if param["type"] == "String":
+										out += "\t%s %s = String(%s(L, %d));\n" % (param["type"], param["name"], luafunc, idx)
+									else:
+										out += "\t%s %s = %s(L, %d);\n" % (param["type"], param["name"], luafunc, idx)
+								paramlist.append(param["name"])
+
+								lparamlist.append(param["name"]+lend)
+								idx = idx +1
+
+						if pm["name"] == ckey:
+							if ckey == "EventHandler":
+								out += "\tLuaEventHandler *inst = new LuaEventHandler();\n"
+								out += "\tinst->wrapperIndex = luaL_ref(L, LUA_REGISTRYINDEX );\n"
+								out += "\tinst->L = L;\n"
 							else:
 							else:
-								if pm["rtnType"].find("static ") == -1:
-									call = "inst->%s(%s)" % (pm["name"], ", ".join(paramlist))
-								else:
-									call = "%s::%s(%s)" % (ckey, pm["name"], ", ".join(paramlist))
-								if pm["rtnType"] == "void" or pm["rtnType"] == "static void" or pm["rtnType"] == "virtual void" or pm["rtnType"] == "inline void":
-									out += "\t%s;\n" % (call)
+								out += "\t%s *inst = new %s(%s);\n" % (ckey, ckey, ", ".join(paramlist))
+							out += "\tlua_pushlightuserdata(L, (void*)inst);\n"
+							out += "\treturn 1;\n"
+						else:
+							if pm["rtnType"].find("static ") == -1:
+								call = "inst->%s(%s)" % (pm["name"], ", ".join(paramlist))
+							else:
+								call = "%s::%s(%s)" % (ckey, pm["name"], ", ".join(paramlist))
+							if pm["rtnType"] == "void" or pm["rtnType"] == "static void" or pm["rtnType"] == "virtual void" or pm["rtnType"] == "inline void":
+								out += "\t%s;\n" % (call)
+								basicType = True
+								voidRet = True
+								out += "\treturn 0;\n"
+							else:
+								outfunc = "lua_pushlightuserdata"
+								retFunc = ""
+								basicType = False
+								if pm["rtnType"] == "Number" or  pm["rtnType"] == "inline Number":
+									outfunc = "lua_pushnumber"
+									basicType = True
+								if pm["rtnType"] == "String" or pm["rtnType"] == "static String":
+									outfunc = "lua_pushstring"
 									basicType = True
 									basicType = True
-									voidRet = True
-									out += "\treturn 0;\n"
+									retFunc = ".c_str()"
+								if pm["rtnType"] == "int" or pm["rtnType"] == "static int" or  pm["rtnType"] == "size_t" or pm["rtnType"] == "static size_t" or pm["rtnType"] == "long" or pm["rtnType"] == "unsigned int" or pm["rtnType"] == "static long":
+									outfunc = "lua_pushinteger"
+									basicType = True
+								if pm["rtnType"] == "bool" or pm["rtnType"] == "static bool" or pm["rtnType"] == "virtual bool":
+									outfunc = "lua_pushboolean"
+									basicType = True
+
+								if pm["rtnType"].find("*") > -1:
+									out += "\tvoid *ptrRetVal = (void*)%s%s;\n" % (call, retFunc)
+									out += "\tif(ptrRetVal == NULL) {\n"
+									out += "\t\tlua_pushnil(L);\n"
+									out += "\t} else {\n"
+									out += "\t\t%s(L, ptrRetVal);\n" % (outfunc)
+									out += "\t}\n"
+								elif basicType == True:
+									out += "\t%s(L, %s%s);\n" % (outfunc, call, retFunc)
 								else:
 								else:
-									outfunc = "lua_pushlightuserdata"
-									retFunc = ""
-									basicType = False
-									if pm["rtnType"] == "Number" or  pm["rtnType"] == "inline Number":
-										outfunc = "lua_pushnumber"
-										basicType = True
-									if pm["rtnType"] == "String" or pm["rtnType"] == "static String":
-										outfunc = "lua_pushstring"
-										basicType = True
-										retFunc = ".c_str()"
-									if pm["rtnType"] == "int" or pm["rtnType"] == "static int" or  pm["rtnType"] == "size_t" or pm["rtnType"] == "static size_t" or pm["rtnType"] == "long" or pm["rtnType"] == "unsigned int" or pm["rtnType"] == "static long":
-										outfunc = "lua_pushinteger"
-										basicType = True
-									if pm["rtnType"] == "bool" or pm["rtnType"] == "static bool" or pm["rtnType"] == "virtual bool":
-										outfunc = "lua_pushboolean"
-										basicType = True
-	
-									if pm["rtnType"].find("*") > -1:
-										out += "\tvoid *ptrRetVal = (void*)%s%s;\n" % (call, retFunc)
-										out += "\tif(ptrRetVal == NULL) {\n"
-										out += "\t\tlua_pushnil(L);\n"
-										out += "\t} else {\n"
-										out += "\t\t%s(L, ptrRetVal);\n" % (outfunc)
-										out += "\t}\n"
-									elif basicType == True:
-										out += "\t%s(L, %s%s);\n" % (outfunc, call, retFunc)
-									else:
-										className = pm["rtnType"].replace("const", "").replace("&", "").replace("inline", "").replace("virtual", "").replace("static", "")
-										if className == "Polygon":
-											className = "Polycode::Polygon"
-										if className == "Rectangle":
-											className = "Polycode::Rectangle"
-										out += "\t%s *retInst = new %s();\n" % (className, className)
-										out += "\t*retInst = %s;\n" % (call)
-										out += "\t%s(L, retInst);\n" % (outfunc)
-									out += "\treturn 1;\n"
-							out += "}\n\n"
-							
-							if pm["name"] == ckey:
-								lout += "function %s:%s(...)\n" % (ckey, ckey)
-								if inherits:
-									lout += "\tif type(arg[1]) == \"table\" and count(arg) == 1 then\n"
-									lout += "\t\tif \"\"..arg[1]:class() == \"%s\" then\n" % (c["inherits"][0]["class"])
-									lout += "\t\t\tself.__ptr = arg[1].__ptr\n"
-									lout += "\t\t\treturn\n"
-									lout += "\t\tend\n"
-									lout += "\tend\n"
-								lout += "\tfor k,v in pairs(arg) do\n"
-								lout += "\t\tif type(v) == \"table\" then\n"
-								lout += "\t\t\tif v.__ptr ~= nil then\n"
-								lout += "\t\t\t\targ[k] = v.__ptr\n"
-								lout += "\t\t\tend\n"
+									className = pm["rtnType"].replace("const", "").replace("&", "").replace("inline", "").replace("virtual", "").replace("static", "")
+									if className == "Polygon":
+										className = "Polycode::Polygon"
+									if className == "Rectangle":
+										className = "Polycode::Rectangle"
+									out += "\t%s *retInst = new %s();\n" % (className, className)
+									out += "\t*retInst = %s;\n" % (call)
+									out += "\t%s(L, retInst);\n" % (outfunc)
+								out += "\treturn 1;\n"
+						out += "}\n\n"
+
+						if pm["name"] == ckey:
+							lout += "function %s:%s(...)\n" % (ckey, ckey)
+							if inherits:
+								lout += "\tif type(arg[1]) == \"table\" and count(arg) == 1 then\n"
+								lout += "\t\tif \"\"..arg[1]:class() == \"%s\" then\n" % (c["inherits"][0]["class"])
+								lout += "\t\t\tself.__ptr = arg[1].__ptr\n"
+								lout += "\t\t\treturn\n"
 								lout += "\t\tend\n"
 								lout += "\t\tend\n"
 								lout += "\tend\n"
 								lout += "\tend\n"
-								lout += "\tif self.__ptr == nil and arg[1] ~= \"__skip_ptr__\" then\n"
-								if ckey == "EventHandler":
-									lout += "\t\tself.__ptr = %s.%s(self)\n" % (libName, ckey)
+							lout += "\tfor k,v in pairs(arg) do\n"
+							lout += "\t\tif type(v) == \"table\" then\n"
+							lout += "\t\t\tif v.__ptr ~= nil then\n"
+							lout += "\t\t\t\targ[k] = v.__ptr\n"
+							lout += "\t\t\tend\n"
+							lout += "\t\tend\n"
+							lout += "\tend\n"
+							lout += "\tif self.__ptr == nil and arg[1] ~= \"__skip_ptr__\" then\n"
+							if ckey == "EventHandler":
+								lout += "\t\tself.__ptr = %s.%s(self)\n" % (libName, ckey)
+							else:
+								lout += "\t\tself.__ptr = %s.%s(unpack(arg))\n" % (libName, ckey)
+							lout += "\t\tPolycore.__ptr_lookup[self.__ptr] = self\n"
+							lout += "\tend\n"
+							lout += "end\n\n"
+						else:
+							lout += "function %s:%s(%s)\n" % (ckey, pm["name"], ", ".join(paramlist))
+							if pm["rtnType"].find("static ") == -1:
+								if len(lparamlist):
+									lout += "\tlocal retVal = %s.%s_%s(self.__ptr, %s)\n" % (libName, ckey, pm["name"], ", ".join(lparamlist))
 								else:
 								else:
-									lout += "\t\tself.__ptr = %s.%s(unpack(arg))\n" % (libName, ckey)
-								lout += "\t\tPolycore.__ptr_lookup[self.__ptr] = self\n"
-								lout += "\tend\n"
-								lout += "end\n\n"
+									lout += "\tlocal retVal =  %s.%s_%s(self.__ptr)\n" % (libName, ckey, pm["name"])
 							else:
 							else:
-								lout += "function %s:%s(%s)\n" % (ckey, pm["name"], ", ".join(paramlist))
-								if pm["rtnType"].find("static ") == -1:
-									if len(lparamlist):
-										lout += "\tlocal retVal = %s.%s_%s(self.__ptr, %s)\n" % (libName, ckey, pm["name"], ", ".join(lparamlist))
-									else:
-										lout += "\tlocal retVal =  %s.%s_%s(self.__ptr)\n" % (libName, ckey, pm["name"])
+								if len(lparamlist):
+									lout += "\tlocal retVal = %s.%s_%s(%s)\n" % (libName, ckey, pm["name"], ", ".join(lparamlist))
 								else:
 								else:
-									if len(lparamlist):
-										lout += "\tlocal retVal = %s.%s_%s(%s)\n" % (libName, ckey, pm["name"], ", ".join(lparamlist))
-									else:
-										lout += "\tlocal retVal =  %s.%s_%s()\n" % (libName, ckey, pm["name"])
-	
-								if not voidRet:
-									if basicType == True:
-										lout += "\treturn retVal\n"
-									else:
-										className = pm["rtnType"].replace("const", "").replace("&", "").replace("inline", "").replace("virtual", "").replace("static", "").replace("*","").replace(" ", "")
-										lout += "\tif retVal == nil then return nil end\n"
-										lout += "\tif Polycore.__ptr_lookup[retVal] ~= nil then\n"
-										lout += "\t\treturn Polycore.__ptr_lookup[retVal]\n"
-										lout += "\telse\n"
-										lout += "\t\tPolycore.__ptr_lookup[retVal] = %s(\"__skip_ptr__\")\n" % (className)
-										lout += "\t\tPolycore.__ptr_lookup[retVal].__ptr = retVal\n"
-										lout += "\t\treturn Polycore.__ptr_lookup[retVal]\n"
-										lout += "\tend\n"
-								lout += "end\n\n"
-	
-						parsed_methods.append(pm["name"])
-		
-					#cleanup
-					sout += "\t\t{\"delete_%s\", %s_delete_%s},\n" % (ckey, libName, ckey)
-					out += "static int %s_delete_%s(lua_State *L) {\n" % (libName, ckey)
-					out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
-					out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"), ckey.replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
-					out += "\tdelete inst;\n"
-					out += "\treturn 0;\n"
-					out += "}\n\n"
+									lout += "\tlocal retVal =  %s.%s_%s()\n" % (libName, ckey, pm["name"])
+
+							if not voidRet:
+								if basicType == True:
+									lout += "\treturn retVal\n"
+								else:
+									className = pm["rtnType"].replace("const", "").replace("&", "").replace("inline", "").replace("virtual", "").replace("static", "").replace("*","").replace(" ", "")
+									lout += "\tif retVal == nil then return nil end\n"
+									lout += "\tif Polycore.__ptr_lookup[retVal] ~= nil then\n"
+									lout += "\t\treturn Polycore.__ptr_lookup[retVal]\n"
+									lout += "\telse\n"
+									lout += "\t\tPolycore.__ptr_lookup[retVal] = %s(\"__skip_ptr__\")\n" % (className)
+									lout += "\t\tPolycore.__ptr_lookup[retVal].__ptr = retVal\n"
+									lout += "\t\treturn Polycore.__ptr_lookup[retVal]\n"
+									lout += "\tend\n"
+							lout += "end\n\n"
+
+					parsed_methods.append(pm["name"])
 
 
+				#cleanup
+				sout += "\t\t{\"delete_%s\", %s_delete_%s},\n" % (ckey, libName, ckey)
+				out += "static int %s_delete_%s(lua_State *L) {\n" % (libName, ckey)
+				out += "\tluaL_checktype(L, 1, LUA_TLIGHTUSERDATA);\n"
+				out += "\t%s *inst = (%s*)lua_topointer(L, 1);\n" % (ckey, ckey)
+				out += "\tdelete inst;\n"
+				out += "\treturn 0;\n"
+				out += "}\n\n"
+
+				lout += "\n\n"
+				lout += "function %s:__delete()\n" % (ckey)
+				lout += "\tPolycore.__ptr_lookup[self.__ptr] = nil\n"
+				lout += "\t%s.delete_%s(self.__ptr)\n" % (libName, ckey)
+				lout += "end\n"
+				if ckey == "EventHandler":
 					lout += "\n\n"
 					lout += "\n\n"
-					lout += "function %s:__delete()\n" % (ckey)
-					lout += "\tPolycore.__ptr_lookup[self.__ptr] = nil\n"
-					lout += "\t%s.delete_%s(self.__ptr)\n" % (libName, ckey)
+					lout += "function EventHandler:__handleEvent(event)\n"
+					lout += "\tevt = Event(\"__skip_ptr__\")\n"
+					lout += "\tevt.__ptr = event\n"
+					lout += "\tself:handleEvent(evt)\n"
+					#lout += "\tself:handleEvent(event)\n"
 					lout += "end\n"
 					lout += "end\n"
-					if ckey == "EventHandler":
-						lout += "\n\n"
-						lout += "function EventHandler:__handleEvent(event)\n"
-						lout += "\tevt = Event(\"__skip_ptr__\")\n"
-						lout += "\tevt.__ptr = event\n"
-						lout += "\tself:handleEvent(evt)\n"
-						#lout += "\tself:handleEvent(event)\n"
-						lout += "end\n"
-					lfout += "require \"%s/%s\"\n" % (prefix, ckey)
-					fout = open("%s/%s.lua" % (apiClassPath, ckey), "w")
-					fout.write(lout)
-			except CppHeaderParser.CppParseError,  e:
-				print e
-				sys.exit(1)
-			
-	out += "}"
+				lfout += "require \"%s/%s\"\n" % (prefix, ckey)
+				fout = open("%s/%s.lua" % (apiClassPath, ckey), "w")
+				fout.write(lout)
+		except CppHeaderParser.CppParseError,  e:
+			print e
+			sys.exit(1)
+
+	out += "} // namespace Polycode\n"
 	
 	
 	sout += "\t\t{NULL, NULL}\n"
 	sout += "\t\t{NULL, NULL}\n"
 	sout += "\t};\n"
 	sout += "\t};\n"
@@ -442,7 +451,6 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	shout = ""
 	shout = ""
 	shout += "#pragma once\n"
 	shout += "#pragma once\n"
 	shout += "#include <%s>\n" % (mainInclude)
 	shout += "#include <%s>\n" % (mainInclude)
-	shout += "#include \"%sLUAWrappers.h\"\n" % (prefix)
 	shout += "extern \"C\" {\n"
 	shout += "extern \"C\" {\n"
 	shout += "#include <stdio.h>\n"
 	shout += "#include <stdio.h>\n"
 	shout += "#include \"lua.h\"\n"
 	shout += "#include \"lua.h\"\n"

+ 3 - 1
CMake/ExternalAssimp.cmake

@@ -13,7 +13,9 @@ SET(assimp_CMAKE_ARGS
 )
 )
 
 
 IF(APPLE)
 IF(APPLE)
-LIST(APPEND assimp_CMAKE_ARGS -DCMAKE_CXX_FLAGS_RELEASE="-O2")
+    # Work around a compiler crash building assimp on Mac
+    STRING(REPLACE "-O3" "-O2" assimp_CXX_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
+    LIST(APPEND assimp_CMAKE_ARGS -DCMAKE_CXX_FLAGS_RELEASE=${assimp_CXX_FLAGS})
 ENDIF(APPLE)
 ENDIF(APPLE)
 
 
 ExternalProject_Add(assimp
 ExternalProject_Add(assimp

+ 3 - 3
CMake/ExternalBox2D.cmake

@@ -3,9 +3,9 @@ INCLUDE(ExternalProject)
 SET(box2d_PREFIX ${PROJECT_BINARY_DIR}/box2d)
 SET(box2d_PREFIX ${PROJECT_BINARY_DIR}/box2d)
 
 
 # Needs fpic to link in shared lib on Linux
 # Needs fpic to link in shared lib on Linux
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    SET(box2d_CXX_ARGS -DCMAKE_CXX_FLAGS=-fPIC)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+#IF(CMAKE_COMPILER_IS_GNUCXX)
+#    SET(box2d_CXX_ARGS -DCMAKE_CXX_FLAGS=-fPIC)
+#ENDIF(CMAKE_COMPILER_IS_GNUCXX)
 
 
 SET(box2d_CMAKE_ARGS
 SET(box2d_CMAKE_ARGS
     -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>

+ 4 - 4
CMake/ExternalBullet.cmake

@@ -12,10 +12,10 @@ SET(bullet_CMAKE_ARGS
     -DBUILD_UNIT_TESTS=OFF
     -DBUILD_UNIT_TESTS=OFF
 )
 )
 
 
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    # Needs fpic to link in shared lib on Linux with GCC
-    LIST(APPEND bullet_CMAKE_ARGS -DCMAKE_CXX_FLAGS=-fPIC)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+#IF(CMAKE_COMPILER_IS_GNUCXX)
+#    # Needs fpic to link in shared lib on Linux with GCC
+#    LIST(APPEND bullet_CMAKE_ARGS -DCMAKE_CXX_FLAGS=-fPIC)
+#ENDIF(CMAKE_COMPILER_IS_GNUCXX)
 
 
 ExternalProject_Add(bullet
 ExternalProject_Add(bullet
     PREFIX ${bullet_PREFIX}
     PREFIX ${bullet_PREFIX}

+ 3 - 3
CMake/PolycodeIncludes.cmake

@@ -1,13 +1,13 @@
 # platform specific defines and include directories for win and sdl
 # platform specific defines and include directories for win and sdl
 IF(MSVC)
 IF(MSVC)
     ADD_DEFINITIONS(/D_UNICODE /DUNICODE)
     ADD_DEFINITIONS(/D_UNICODE /DUNICODE)
-    INCLUDE_DIRECTORIES(${Polycode_SOURCE_DIR}/Core/Build/MSVC/Polycore)
+    INCLUDE_DIRECTORIES("${Polycode_SOURCE_DIR}/Core/Contents/PolycodeView/Build/MSVC/Polycore")
 ELSEIF(APPLE)
 ELSEIF(APPLE)
     ADD_DEFINITIONS(-DGL_GLEXT_PROTOTYPES)
     ADD_DEFINITIONS(-DGL_GLEXT_PROTOTYPES)
-    INCLUDE_DIRECTORIES("${Polycode_SOURCE_DIR}/Core/Build/Mac OS X")
+    INCLUDE_DIRECTORIES("${Polycode_SOURCE_DIR}/Core/Contents/PolycodeView/Build/Mac OS X")
 ELSE(MSVC)
 ELSE(MSVC)
     ADD_DEFINITIONS(-DGL_GLEXT_PROTOTYPES)
     ADD_DEFINITIONS(-DGL_GLEXT_PROTOTYPES)
-    INCLUDE_DIRECTORIES(${Polycode_SOURCE_DIR}/Core/Build/Linux)
+    INCLUDE_DIRECTORIES("${Polycode_SOURCE_DIR}/Core/Contents/PolycodeView/Linux")
 ENDIF(MSVC)
 ENDIF(MSVC)
 
 
 FIND_PACKAGE(OpenGL REQUIRED)
 FIND_PACKAGE(OpenGL REQUIRED)

+ 6 - 3
CMakeLists.txt

@@ -77,9 +77,12 @@ ENDIF(POLYCODE_BUILD_TOOLS)
 INSTALL(FILES LICENSE.txt
 INSTALL(FILES LICENSE.txt
         DESTINATION ./)
         DESTINATION ./)
 
 
-INSTALL(DIRECTORY ${Polycode_SOURCE_DIR}/Examples/C++/Build/${CMAKE_SYSTEM_NAME} DESTINATION Examples)
-INSTALL(DIRECTORY ${Polycode_SOURCE_DIR}/Examples/C++/Contents DESTINATION Examples/${CMAKE_SYSTEM_NAME})
-INSTALL(DIRECTORY ${Polycode_SOURCE_DIR}/Examples/C++/Resources DESTINATION Examples/${CMAKE_SYSTEM_NAME})
+# No Windows Build yet
+IF (NOT WIN32)
+    INSTALL(DIRECTORY ${Polycode_SOURCE_DIR}/Examples/C++/Build/${CMAKE_SYSTEM_NAME} DESTINATION Examples)
+    INSTALL(DIRECTORY ${Polycode_SOURCE_DIR}/Examples/C++/Contents DESTINATION Examples/${CMAKE_SYSTEM_NAME})
+    INSTALL(DIRECTORY ${Polycode_SOURCE_DIR}/Examples/C++/Resources DESTINATION Examples/${CMAKE_SYSTEM_NAME})
+ENDIF(NOT WIN32)
 
 
 INSTALL(DIRECTORY ${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies DESTINATION Core)
 INSTALL(DIRECTORY ${POLYCODE_RELEASE_DIR}/Framework/Core/Dependencies DESTINATION Core)
 INSTALL(DIRECTORY ${POLYCODE_RELEASE_DIR}/Framework/Modules/Dependencies DESTINATION Modules)
 INSTALL(DIRECTORY ${POLYCODE_RELEASE_DIR}/Framework/Modules/Dependencies DESTINATION Modules)

+ 11 - 11
Core/Contents/CMakeLists.txt

@@ -228,21 +228,21 @@ IF(POLYCODE_INSTALL_FRAMEWORK)
     INSTALL(FILES ${polycore_HDRS} 
     INSTALL(FILES ${polycore_HDRS} 
         DESTINATION Core/include)
         DESTINATION Core/include)
 
 
-
-	IF(APPLE)
-	    INSTALL(FILES "PolycodeView/Mac OS X/PolycodeView.h" "PolycodeView/Mac OS X/PolycodeView.mm"
-		DESTINATION "Core/PolycodeView")
-	ENDIF(APPLE)
+    IF(APPLE)
+        INSTALL(FILES "PolycodeView/Mac OS X/PolycodeView.h" "PolycodeView/Mac OS X/PolycodeView.mm"
+            DESTINATION "Core/PolycodeView")
+    ENDIF(APPLE)
 
 
     # install libraries
     # install libraries
-#    IF(POLYCODE_BUILD_SHARED)
-#        INSTALL(TARGETS Polycore_dynamic EXPORT Polycore-targets 
-#            DESTINATION ${POLYCODE_RELEASE_DIR}/Framework/Core/lib)
-#    ENDIF(POLYCODE_BUILD_SHARED)
+#   IF(POLYCODE_BUILD_SHARED)
+#       INSTALL(TARGETS Polycore_dynamic EXPORT Polycore-targets
+#           DESTINATION ${POLYCODE_RELEASE_DIR}/Framework/Core/lib)
+#   ENDIF(POLYCODE_BUILD_SHARED)
     
     
 #    IF(POLYCODE_BUILD_STATIC)
 #    IF(POLYCODE_BUILD_STATIC)
-        INSTALL(TARGETS Polycore EXPORT Polycore-targets 
-            DESTINATION Core/lib)
+    INSTALL(TARGETS Polycore EXPORT Polycore-targets
+        DESTINATION Core/lib)
+
 #    ENDIF(POLYCODE_BUILD_STATIC)
 #    ENDIF(POLYCODE_BUILD_STATIC)
 ENDIF(POLYCODE_INSTALL_FRAMEWORK)
 ENDIF(POLYCODE_INSTALL_FRAMEWORK)
 
 

+ 15 - 28
Core/Contents/Include/OSBasics.h

@@ -22,35 +22,22 @@
 
 
 #pragma once
 #pragma once
 
 
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyString.h"
 #include "PolyString.h"
 
 
-#ifdef _WINDOWS
-	#include <windows.h>
-#else
-	#include <dirent.h> 
-	#include <sys/types.h>
-	#include <sys/stat.h>
-#endif
-
-#include <vector>
-#include <string>
-#include "physfs.h"
-
-using namespace std;
-using namespace Polycode;
+struct PHYSFS_File;
 
 
 class _PolyExport OSFileEntry {
 class _PolyExport OSFileEntry {
+
 	public:
 	public:
 		OSFileEntry() {};
 		OSFileEntry() {};
-		OSFileEntry(String path, String name, int type);
+		OSFileEntry(const Polycode::String& path, const Polycode::String& name, int type);
 		
 		
-		String name;
-		String extension;
-		String nameWithoutExtension;
-		String basePath;
-		String fullPath;
+		Polycode::String name;
+		Polycode::String extension;
+		Polycode::String nameWithoutExtension;
+		Polycode::String basePath;
+		Polycode::String fullPath;
 		int type;
 		int type;
 		
 		
 		static const int TYPE_FILE = 0;
 		static const int TYPE_FILE = 0;
@@ -65,7 +52,7 @@ public:
 	
 	
 	int fileType;
 	int fileType;
 	FILE *file;	
 	FILE *file;	
-	PHYSFS_file *physFSFile;
+	PHYSFS_File *physFSFile;
 	static const int TYPE_FILE = 0;
 	static const int TYPE_FILE = 0;
 	static const int TYPE_ARCHIVE_FILE = 1;	
 	static const int TYPE_ARCHIVE_FILE = 1;	
 };
 };
@@ -73,18 +60,18 @@ public:
 class _PolyExport OSBasics {
 class _PolyExport OSBasics {
 	public:
 	public:
 	
 	
-		static OSFILE *open(String filename, String opts);
+		static OSFILE *open(const Polycode::String& filename, const Polycode::String& opts);
 		static int close(OSFILE *file);
 		static int close(OSFILE *file);
 		static size_t read( void * ptr, size_t size, size_t count, OSFILE * stream );	
 		static size_t read( void * ptr, size_t size, size_t count, OSFILE * stream );	
 		static size_t write( const void * ptr, size_t size, size_t count, OSFILE * stream );
 		static size_t write( const void * ptr, size_t size, size_t count, OSFILE * stream );
 		static int seek(OSFILE * stream, long int offset, int origin );
 		static int seek(OSFILE * stream, long int offset, int origin );
 		static long tell(OSFILE * stream);
 		static long tell(OSFILE * stream);
 	
 	
-		static vector<OSFileEntry> parsePhysFSFolder(String pathString, bool showHidden);
-		static vector<OSFileEntry> parseFolder(String pathString, bool showHidden);
-		static bool isFolder(String pathString);
-		static void createFolder(String pathString);
-		static void removeItem(String pathString);
+		static std::vector<OSFileEntry> parsePhysFSFolder(const Polycode::String& pathString, bool showHidden);
+		static std::vector<OSFileEntry> parseFolder(const Polycode::String& pathString, bool showHidden);
+		static bool isFolder(const Polycode::String& pathString);
+		static void createFolder(const Polycode::String& pathString);
+		static void removeItem(const Polycode::String& pathString);
 		
 		
 	private:
 	private:
 	
 	

+ 3 - 6
Core/Contents/Include/PolyBezierCurve.h

@@ -23,13 +23,10 @@
 
 
 #pragma once 
 #pragma once 
 
 
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyString.h"
 #include "PolyVector3.h"
 #include "PolyVector3.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
 
 
 #define BUFFER_CACHE_PRECISION 100
 #define BUFFER_CACHE_PRECISION 100
 
 
@@ -173,8 +170,8 @@ namespace Polycode {
 
 
 		Number heightBuffer[BUFFER_CACHE_PRECISION];
 		Number heightBuffer[BUFFER_CACHE_PRECISION];
 
 
-		vector<BezierPoint*> controlPoints;
-		vector<Number> distances;
+		std::vector<BezierPoint*> controlPoints;
+		std::vector<Number> distances;
 		
 		
 		
 		
 		protected:
 		protected:
@@ -186,4 +183,4 @@ namespace Polycode {
 			
 			
 	};
 	};
 
 
-}
+}

+ 18 - 20
Core/Contents/Include/PolyBone.h

@@ -21,17 +21,15 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyString.h"
 #include "PolyString.h"
+#include "PolyMatrix4.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolyMesh.h"
-#include "PolyCoreServices.h"
-#include "PolySceneLabel.h"
-#include "PolySceneLine.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Mesh;
+
 	/** 
 	/** 
 	* Skeleton bone. Bones are bound to vertices of a mesh and when transformed, move the bound vertices of the mesh along with them. Bones are subclassed from SceneEntity, but have their own hierarchy system.
 	* Skeleton bone. Bones are bound to vertices of a mesh and when transformed, move the bound vertices of the mesh along with them. Bones are subclassed from SceneEntity, but have their own hierarchy system.
 	* @see Skeleton
 	* @see Skeleton
@@ -42,16 +40,16 @@ namespace Polycode {
 			* Constructor.
 			* Constructor.
 			* @param boneName Name of the bone.
 			* @param boneName Name of the bone.
 			*/				
 			*/				
-			Bone(String boneName);
+			Bone(const String& boneName);
 			~Bone();
 			~Bone();
 			
 			
-			void enableBoneLabel(String labelFont, Number size, Number scale, Color labelColor);
+			void enableBoneLabel(const String& labelFont, Number size, Number scale, Color labelColor);
 			
 			
 			/**
 			/**
 			* Returns the name of the bone.
 			* Returns the name of the bone.
 			* @return Name of the bone.
 			* @return Name of the bone.
 			*/
 			*/
-			String getName();
+			const String& getName() const;
 			void Render();
 			void Render();
 
 
 			/**
 			/**
@@ -89,60 +87,60 @@ namespace Polycode {
 			* Returns the bone matrix
 			* Returns the bone matrix
 			* @return Bone matrix.
 			* @return Bone matrix.
 			*/									
 			*/									
-			Matrix4 getBoneMatrix();
+			Matrix4 getBoneMatrix() const;
 			
 			
 			/**
 			/**
 			* Sets the bone matrix.
 			* Sets the bone matrix.
 			* @return Bone matrix.
 			* @return Bone matrix.
 			*/												
 			*/												
-			void setBoneMatrix(Matrix4 matrix);
+			void setBoneMatrix(const Matrix4& matrix);
 			
 			
 			/**
 			/**
 			* Returns the rest matrix of this bone.
 			* Returns the rest matrix of this bone.
 			* @return Rest matrix.
 			* @return Rest matrix.
 			*/															
 			*/															
-			Matrix4 getRestMatrix();
+			Matrix4 getRestMatrix() const;
 			
 			
 			/**
 			/**
 			* Returns the full rest matrix of this bone.
 			* Returns the full rest matrix of this bone.
 			* @return Full rest matrix.
 			* @return Full rest matrix.
 			*/																		
 			*/																		
-			Matrix4 getFullRestMatrix();
+			Matrix4 getFullRestMatrix() const;
 			
 			
 			/**
 			/**
 			* Returns the rest matrix of this bone's parent.
 			* Returns the rest matrix of this bone's parent.
 			* @return Rest matrix of the bone's parent.
 			* @return Rest matrix of the bone's parent.
 			*/																					
 			*/																					
-			Matrix4 getParentRestMatrix();
+			Matrix4 getParentRestMatrix() const;
 			
 			
 			/**
 			/**
 			* @see getBoneMatrix()
 			* @see getBoneMatrix()
 			*/																								
 			*/																								
-			Matrix4 getFinalMatrix();
+			Matrix4 getFinalMatrix() const;
 			
 			
 			/**
 			/**
 			* Sets the rest matrix for this bone.
 			* Sets the rest matrix for this bone.
 			* @param matrix New rest matrix.
 			* @param matrix New rest matrix.
 			*/
 			*/
-			void setRestMatrix(Matrix4 matrix);
+			void setRestMatrix(const Matrix4& matrix);
 			
 			
 			/**
 			/**
 			* Sets the base matrix for this bone.
 			* Sets the base matrix for this bone.
 			* @param matrix New base matrix.
 			* @param matrix New base matrix.
 			*/			
 			*/			
-			void setBaseMatrix(Matrix4 matrix);
+			void setBaseMatrix(const Matrix4& matrix);
 			
 			
 			/**
 			/**
 			* Returns the base matrix of this bone.
 			* Returns the base matrix of this bone.
 			* @return Base matrix.
 			* @return Base matrix.
 			*/			
 			*/			
-			Matrix4 getBaseMatrix() { return baseMatrix; }
+			const Matrix4& getBaseMatrix() const { return baseMatrix; }
 			
 			
 			/**
 			/**
 			* Returns the full base matrix of this bone.
 			* Returns the full base matrix of this bone.
 			* @return Full base matrix.
 			* @return Full base matrix.
 			*/						
 			*/						
-			Matrix4 getFullBaseMatrix();
+			Matrix4 getFullBaseMatrix() const;
 		
 		
 			/**
 			/**
 			* Id of the bone.
 			* Id of the bone.
@@ -159,8 +157,8 @@ namespace Polycode {
 			Mesh *boneMesh;
 			Mesh *boneMesh;
 		
 		
 			Bone* parentBone;
 			Bone* parentBone;
-			vector<Bone*> childBones;
+			std::vector<Bone*> childBones;
 			String boneName;
 			String boneName;
 	};
 	};
 
 
-}
+}

+ 9 - 8
Core/Contents/Include/PolyCamera.h

@@ -22,15 +22,16 @@
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyLogger.h"
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolySceneRenderTexture.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Scene;
+	class Material;
+	class ShaderBinding;
+	class Texture;
+
 	/**
 	/**
 	* Camera in a 3D scene. Cameras can be added to a scene and changed between dynamically. You can also set a shader to a camera that will run as a screen shader for post-processing effects.
 	* Camera in a 3D scene. Cameras can be added to a scene and changed between dynamically. You can also set a shader to a camera that will run as a screen shader for post-processing effects.
 	*/	
 	*/	
@@ -104,7 +105,7 @@ namespace Polycode {
 			* Sets the post-processing shader for the camera.
 			* Sets the post-processing shader for the camera.
 			* @param shaderName The shader name of the post-processing filter.
 			* @param shaderName The shader name of the post-processing filter.
 			*/												
 			*/												
-			void setPostFilter(String shaderName);
+			void setPostFilter(const String& shaderName);
 			
 			
 			/**
 			/**
 			* Removes the currently assigned post filter.
 			* Removes the currently assigned post filter.
@@ -114,7 +115,7 @@ namespace Polycode {
 			/**
 			/**
 			* Returns the local shader options for the camera post processing material.
 			* Returns the local shader options for the camera post processing material.
 			*/
 			*/
-			vector<ShaderBinding*> getLocalShaderOptions() { return localShaderOptions; }
+			std::vector<ShaderBinding*> getLocalShaderOptions() { return localShaderOptions; }
 			
 			
 			/**
 			/**
 			* Returns the shader material applied to the camera.
 			* Returns the shader material applied to the camera.
@@ -135,7 +136,7 @@ namespace Polycode {
 			Material *filterShaderMaterial;			
 			Material *filterShaderMaterial;			
 			Texture *originalSceneTexture;			
 			Texture *originalSceneTexture;			
 			Texture *zBufferSceneTexture;						
 			Texture *zBufferSceneTexture;						
-			vector<ShaderBinding*> localShaderOptions;
+			std::vector<ShaderBinding*> localShaderOptions;
 			bool _hasFilterShader;
 			bool _hasFilterShader;
 	};	
 	};	
-}
+}

+ 6 - 6
Core/Contents/Include/PolyCocoaCore.h

@@ -76,16 +76,16 @@ namespace Polycode {
 		void resizeTo(int xRes, int yRes);
 		void resizeTo(int xRes, int yRes);
 		void createThread(Threaded *target);		
 		void createThread(Threaded *target);		
 		
 		
-		void createFolder(String folderPath);
-		void copyDiskItem(String itemPath, String destItemPath);
-		void moveDiskItem(String itemPath, String destItemPath);		
-		void removeDiskItem(String itemPath);		
+		void createFolder(const String& folderPath);
+		void copyDiskItem(const String& itemPath, const String& destItemPath);
+		void moveDiskItem(const String& itemPath, const String& destItemPath);
+		void removeDiskItem(const String& itemPath);
 		String openFolderPicker();
 		String openFolderPicker();
 		vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple);
 		vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple);
 		
 		
 		void setCursor(int cursorType);
 		void setCursor(int cursorType);
 		
 		
-		void copyStringToClipboard(String str);
+		void copyStringToClipboard(const String& str);
 		String getClipboardString();		
 		String getClipboardString();		
 		
 		
 //		static pascal OSStatus coreEventHandler (EventHandlerCallRef next, EventRef event, void *data);	
 //		static pascal OSStatus coreEventHandler (EventHandlerCallRef next, EventRef event, void *data);	
@@ -113,4 +113,4 @@ namespace Polycode {
 		uint64_t initTime;		
 		uint64_t initTime;		
 				
 				
 	};
 	};
-}
+}

+ 6 - 9
Core/Contents/Include/PolyColor.h

@@ -22,10 +22,7 @@
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <stdlib.h>
  
  
 namespace Polycode {
 namespace Polycode {
 
 
@@ -62,7 +59,7 @@ namespace Polycode {
 			* Create from another color.
 			* Create from another color.
 			* @param color The color to create from.
 			* @param color The color to create from.
 			*/												
 			*/												
-			Color(Color *color);
+			Color(const Color *color);
 			
 			
 			/**
 			/**
 			* Create from integer color.
 			* Create from integer color.
@@ -75,7 +72,7 @@ namespace Polycode {
 			/** 
 			/** 
 			* Multiplies the color with another color.
 			* Multiplies the color with another color.
 			*/
 			*/
-			inline Color operator * ( const Color& v2)  {
+			inline Color operator * ( const Color& v2) const {
 				Number nr = r * v2.r;
 				Number nr = r * v2.r;
 				Number ng = g * v2.g;
 				Number ng = g * v2.g;
 				Number nb = b * v2.b;
 				Number nb = b * v2.b;
@@ -142,7 +139,7 @@ namespace Polycode {
 			* Set from another color.
 			* Set from another color.
 			* @param color The color to set from.
 			* @param color The color to set from.
 			*/															
 			*/															
-			void setColor(Color *color);
+			void setColor(const Color *color);
 			
 			
 			/**
 			/**
 			* Sets the color to a random color. This does not affect alpha.
 			* Sets the color to a random color. This does not affect alpha.
@@ -153,13 +150,13 @@ namespace Polycode {
 			* Retuns the brightness of the color
 			* Retuns the brightness of the color
 			* @return Brightness.
 			* @return Brightness.
 			*/
 			*/
-			Number getBrightness();
+			Number getBrightness() const;
 			
 			
 			/**
 			/**
 			* Returns the color as a 32-bit usigned integer.
 			* Returns the color as a 32-bit usigned integer.
 			* @return Color as a single 32-bit unsigned integer.
 			* @return Color as a single 32-bit unsigned integer.
 			*/
 			*/
-			unsigned int getUint();
+			unsigned int getUint() const;
 			
 			
 			/**
 			/**
 			* Red value.
 			* Red value.
@@ -184,4 +181,4 @@ namespace Polycode {
 	
 	
 	};
 	};
 
 
-}
+}

+ 10 - 16
Core/Contents/Include/PolyConfig.h

@@ -21,14 +21,8 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
-#include <vector>
-#include "tinyxml.h"
-
-using std::string;
-using std::vector;
+#include "PolyString.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -57,16 +51,16 @@ namespace Polycode {
 		* @param configNamespace Namespace of the config to load data into.
 		* @param configNamespace Namespace of the config to load data into.
 		* @param fileName Path to the file to load.
 		* @param fileName Path to the file to load.
 		*/
 		*/
-		void loadConfig(String configNamespace, String fileName);	
+		void loadConfig(const String& configNamespace, const String& fileName);
 		
 		
 		/**
 		/**
 		* Save config to a specified file from the specified namespace.
 		* Save config to a specified file from the specified namespace.
 		* @param configNamespace Namespace of the config to save data from.
 		* @param configNamespace Namespace of the config to save data from.
 		* @param fileName Path to the file to save data to.
 		* @param fileName Path to the file to save data to.
 		*/		
 		*/		
-		void saveConfig(String configNamespace, String fileName);
+		void saveConfig(const String& configNamespace, const String& fileName);
 
 
-		ConfigEntry *getEntry(String configNamespace, String key);
+		ConfigEntry *getEntry(const String& configNamespace, const String& key);
 
 
 		/**
 		/**
 		* Sets a string value into the specified config namespace.
 		* Sets a string value into the specified config namespace.
@@ -74,7 +68,7 @@ namespace Polycode {
 		* @param key String key of the value.
 		* @param key String key of the value.
 		* @param value The string value to save.
 		* @param value The string value to save.
 		*/
 		*/
-		void setStringValue(String configNamespace, String key, String value);
+		void setStringValue(const String& configNamespace, const String& key, const String& value);
 		
 		
 		/**
 		/**
 		* Sets a numeric value into the specified config namespace.
 		* Sets a numeric value into the specified config namespace.
@@ -82,25 +76,25 @@ namespace Polycode {
 		* @param key String key of the value.
 		* @param key String key of the value.
 		* @param value The numeric value to save.
 		* @param value The numeric value to save.
 		*/		
 		*/		
-		void setNumericValue(String configNamespace, String key, Number value);		
+		void setNumericValue(const String& configNamespace, const String& key, Number value);
 		
 		
 		/**
 		/**
 		* Returns a numeric value by a string key.
 		* Returns a numeric value by a string key.
 		* @param configNamespace Namespace to get the value from.
 		* @param configNamespace Namespace to get the value from.
 		* @param key String key of the value.
 		* @param key String key of the value.
 		*/				
 		*/				
-		Number getNumericValue(String configNamespace, String key);
+		Number getNumericValue(const String& configNamespace, const String& key);
 		
 		
 		/**
 		/**
 		* Returns a string value by a string key.
 		* Returns a string value by a string key.
 		* @param configNamespace Namespace to get the value from.
 		* @param configNamespace Namespace to get the value from.
 		* @param key String key of the value.
 		* @param key String key of the value.
 		*/						
 		*/						
-		String getStringValue(String configNamespace, String key);
+		const String& getStringValue(const String& configNamespace, const String& key);
 		
 		
 	private:
 	private:
 		
 		
-		vector<ConfigEntry*> entries;
+		std::vector<ConfigEntry*> entries;
 		
 		
 	};
 	};
-}
+}

+ 15 - 22
Core/Contents/Include/PolyCore.h

@@ -21,18 +21,11 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyRenderer.h"
-#include "PolyThreaded.h"
-#include "PolyCoreInput.h"
-//#include "PolyGLRenderer.h"
-#include "PolyMaterialManager.h"
-#include "PolyCoreServices.h"
+#include "PolyString.h"
 #include "PolyRectangle.h"
 #include "PolyRectangle.h"
-#include <vector>
-#include <string>
+#include "PolyVector2.h"
+#include "PolyEventDispatcher.h"
 
 
 #define CURSOR_ARROW 0
 #define CURSOR_ARROW 0
 #define CURSOR_TEXT 1
 #define CURSOR_TEXT 1
@@ -41,14 +34,14 @@ THE SOFTWARE.
 #define CURSOR_RESIZE_LEFT_RIGHT 4
 #define CURSOR_RESIZE_LEFT_RIGHT 4
 #define CURSOR_RESIZE_UP_DOWN 5
 #define CURSOR_RESIZE_UP_DOWN 5
 
 
-using std::vector;
-using std::wstring;
-
 long getThreadID();
 long getThreadID();
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class CoreInput;
 	class CoreServices;
 	class CoreServices;
+	class Renderer;
+	class Threaded;
 
 
 	class _PolyExport CoreMutex {
 	class _PolyExport CoreMutex {
 	public:
 	public:
@@ -130,7 +123,7 @@ namespace Polycode {
 		* Copies the specified string to system clipboard.
 		* Copies the specified string to system clipboard.
 		* @param str String to copy to clipboard.
 		* @param str String to copy to clipboard.
 		*/
 		*/
-		virtual void copyStringToClipboard(String str) = 0;
+		virtual void copyStringToClipboard(const String& str) = 0;
 		
 		
 		/**
 		/**
 		* Returns the system clipboard as a string.
 		* Returns the system clipboard as a string.
@@ -194,33 +187,33 @@ namespace Polycode {
 		* Returns the available system video modes. 
 		* Returns the available system video modes. 
 		* @return An STL vector of video modes.
 		* @return An STL vector of video modes.
 		*/															
 		*/															
-		virtual vector<Rectangle> getVideoModes() = 0;
+		virtual std::vector<Rectangle> getVideoModes() = 0;
 				
 				
 		/**
 		/**
 		* Creates a folder on disk with the specified path.
 		* Creates a folder on disk with the specified path.
 		* @param folderPath Path to create the folder in.
 		* @param folderPath Path to create the folder in.
 		*/																			
 		*/																			
-		virtual void createFolder(String folderPath) = 0;
+		virtual void createFolder(const String& folderPath) = 0;
 		
 		
 		/**
 		/**
 		* Copies a disk item from one path to another
 		* Copies a disk item from one path to another
 		* @param itemPath Path to the item to copy.
 		* @param itemPath Path to the item to copy.
 		* @param destItemPath Destination path to copy to.
 		* @param destItemPath Destination path to copy to.
 		*/																					
 		*/																					
-		virtual void copyDiskItem(String itemPath, String destItemPath) = 0;		
+		virtual void copyDiskItem(const String& itemPath, const String& destItemPath) = 0;
 		
 		
 		/**
 		/**
 		* Moves a disk item from one path to another
 		* Moves a disk item from one path to another
 		* @param itemPath Path to the item to move.
 		* @param itemPath Path to the item to move.
 		* @param destItemPath Destination path to move to.
 		* @param destItemPath Destination path to move to.
 		*/																							
 		*/																							
-		virtual void moveDiskItem(String itemPath, String destItemPath) = 0;		
+		virtual void moveDiskItem(const String& itemPath, const String& destItemPath) = 0;
 		
 		
 		/**
 		/**
 		* Removes a disk item.
 		* Removes a disk item.
 		* @param itemPath Path to the item to remove.
 		* @param itemPath Path to the item to remove.
 		*/																							
 		*/																							
-		virtual void removeDiskItem(String itemPath) = 0;
+		virtual void removeDiskItem(const String& itemPath) = 0;
 
 
 		/**
 		/**
 		* Opens a system folder picker and suspends operation.
 		* Opens a system folder picker and suspends operation.
@@ -234,7 +227,7 @@ namespace Polycode {
 		* @param allowMultiple If set to true, the picker can select multiple files.
 		* @param allowMultiple If set to true, the picker can select multiple files.
 		* @return An STL vector of the selected file paths.
 		* @return An STL vector of the selected file paths.
 		*/																							
 		*/																							
-		virtual vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple) = 0;
+		virtual std::vector<String> openFilePicker(std::vector<CoreFileExtension> extensions, bool allowMultiple) = 0;
 		
 		
 		void setVideoModeIndex(int index, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel);
 		void setVideoModeIndex(int index, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel);
 		
 		
@@ -288,7 +281,7 @@ namespace Polycode {
 		bool fullScreen;
 		bool fullScreen;
 		int aaLevel;
 		int aaLevel;
 	
 	
-		vector<Vector2>	videoModes;
+		std::vector<Vector2>	videoModes;
 		void updateCore();
 		void updateCore();
 
 
 		int numVideoModes;
 		int numVideoModes;
@@ -314,4 +307,4 @@ namespace Polycode {
 		CoreServices *services;
 		CoreServices *services;
 	};
 	};
 	
 	
-}
+}

+ 5 - 5
Core/Contents/Include/PolyCoreInput.h

@@ -21,16 +21,16 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
+#include "PolyString.h"
 #include "PolyVector2.h"
 #include "PolyVector2.h"
-#include "PolyEventDispatcher.h"
-#include "PolyInputEvent.h"
 #include "PolyInputKeys.h"
 #include "PolyInputKeys.h"
+#include "PolyEventDispatcher.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class InputEvent;
+
 	/**
 	/**
 	* User input event dispatcher. The Core input class is where all of the input events originate. You can add event listeners to this class to listen for user input events or poll it manually to check the state of user input.
 	* User input event dispatcher. The Core input class is where all of the input events originate. You can add event listeners to this class to listen for user input events or poll it manually to check the state of user input.
 	*/
 	*/
@@ -104,4 +104,4 @@ namespace Polycode {
 		Vector2 deltaMousePosition;
 		Vector2 deltaMousePosition;
 	};
 	};
 	
 	
-}
+}

+ 7 - 18
Core/Contents/Include/PolyCoreServices.h

@@ -21,28 +21,17 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyRenderer.h"
-#include "PolyMaterialManager.h"
-#include "PolyScreenManager.h"
-#include "PolySceneManager.h"
-#include "PolyTimerManager.h"
-#include "PolyFontManager.h"
-#include "PolyTweenManager.h"
-#include "PolySoundManager.h"
-#include "PolyResourceManager.h"
-#include "PolyCore.h"
-#include "PolyConfig.h"
-#include "PolyModule.h"
-#include "PolyBasics.h"
-
+#include "PolyString.h"
+#include "PolyEventDispatcher.h"
 #include <map>
 #include <map>
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class PolycodeModule;
 	class Renderer;
 	class Renderer;
+	class Config;
+	class FontManager;
 	class MaterialManager;
 	class MaterialManager;
 	class SceneManager;
 	class SceneManager;
 	class ScreenManager;
 	class ScreenManager;
@@ -170,7 +159,7 @@ namespace Polycode {
 			static std::map <long, CoreServices*> instanceMap;
 			static std::map <long, CoreServices*> instanceMap;
 			static CoreMutex *renderMutex;
 			static CoreMutex *renderMutex;
 		
 		
-			vector<PolycodeModule*> modules;
+			std::vector<PolycodeModule*> modules;
 		
 		
 			Core *core;
 			Core *core;
 			Config *config;
 			Config *config;
@@ -184,4 +173,4 @@ namespace Polycode {
 			FontManager *fontManager;
 			FontManager *fontManager;
 			Renderer *renderer;
 			Renderer *renderer;
 	};
 	};
-}
+}

+ 4 - 4
Core/Contents/Include/PolyCubemap.h

@@ -21,13 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyResource.h"
 #include "PolyResource.h"
-#include "PolyTexture.h"
 
 
 namespace Polycode {
 namespace Polycode {
-	
+
+	class Texture;
+
 	class _PolyExport Cubemap : public Resource {
 	class _PolyExport Cubemap : public Resource {
 		public:
 		public:
 			Cubemap(Texture *t0, Texture *t1, Texture *t2, Texture *t3, Texture *t4, Texture *t5);
 			Cubemap(Texture *t0, Texture *t1, Texture *t2, Texture *t3, Texture *t4, Texture *t5);
@@ -36,4 +36,4 @@ namespace Polycode {
 		protected:		
 		protected:		
 		
 		
 	};
 	};
-}
+}

+ 7 - 7
Core/Contents/Include/PolyData.h

@@ -20,9 +20,9 @@
  THE SOFTWARE.
  THE SOFTWARE.
  */
  */
 
 
+#pragma once
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyString.h"
 #include "PolyString.h"
-#include "OSBasics.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -41,34 +41,34 @@ namespace Polycode {
 		* Loads data from a file.
 		* Loads data from a file.
 		* @param fileName Path to the file to load data from.
 		* @param fileName Path to the file to load data from.
 		*/						
 		*/						
-		void loadFromFile(String fileName);
+		void loadFromFile(const String& fileName);
 		
 		
 		/**
 		/**
 		* Retuns data as a string with the specified encoding.
 		* Retuns data as a string with the specified encoding.
 		* @param encoding The encoding to use. Currently only supports String::ENCODING_UTF8
 		* @param encoding The encoding to use. Currently only supports String::ENCODING_UTF8
 		* @return String of the specified encoding.
 		* @return String of the specified encoding.
 		*/						
 		*/						
-		String getAsString(int encoding);
+		String getAsString(int encoding) const;
 
 
 		/**
 		/**
 		* Sets the data from a string with the specified encoding.
 		* Sets the data from a string with the specified encoding.
 		* @param str The string to create the data from.
 		* @param str The string to create the data from.
 		* @param encoding The encoding to use. Currently only supports String::ENCODING_UTF8
 		* @param encoding The encoding to use. Currently only supports String::ENCODING_UTF8
 		*/								
 		*/								
-		void setFromString(String str, int encoding);
+		void setFromString(const String& str, int encoding);
 		
 		
 		/**
 		/**
 		* Saves the data to a file.
 		* Saves the data to a file.
 		* @param fileName Path to the file to save data to.
 		* @param fileName Path to the file to save data to.
 		* @return Returns true if successful or false if otherwise.
 		* @return Returns true if successful or false if otherwise.
 		*/								
 		*/								
-		bool saveToFile(String fileName);
+		bool saveToFile(const String& fileName) const;
 		
 		
 		/**
 		/**
 		* Returns pointer to the data.
 		* Returns pointer to the data.
 		* @return Pointer to the data buffer.
 		* @return Pointer to the data buffer.
 		*/										
 		*/										
-		char *getData() { return data; }
+		char *getData() const { return data; }
 				
 				
 		protected:
 		protected:
 
 
@@ -77,4 +77,4 @@ namespace Polycode {
 		
 		
 	};
 	};
 
 
-}
+}

+ 28 - 30
Core/Contents/Include/PolyEntity.h

@@ -21,19 +21,17 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
+#include "PolyString.h"
 #include "PolyMatrix4.h"
 #include "PolyMatrix4.h"
 #include "PolyQuaternion.h"
 #include "PolyQuaternion.h"
 #include "PolyColor.h"
 #include "PolyColor.h"
-#include "PolyRenderer.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
+	class Renderer;
+
 	class _PolyExport EntityProp {
 	class _PolyExport EntityProp {
 	public:
 	public:
 		String propName;
 		String propName;
@@ -88,32 +86,32 @@ namespace Polycode {
 			* Returns the entity's transform matrix.
 			* Returns the entity's transform matrix.
 			@return Transform matrix.
 			@return Transform matrix.
 			*/
 			*/
-			Matrix4 getTransformMatrix();
+			const Matrix4& getTransformMatrix() const;
 			
 			
 			/** 
 			/** 
 			* Returns the entity's matrix multiplied by its parent's concatenated matrix. This, in effect, returns the entity's actual world transformation.
 			* Returns the entity's matrix multiplied by its parent's concatenated matrix. This, in effect, returns the entity's actual world transformation.
 			@return Entity's concatenated matrix.
 			@return Entity's concatenated matrix.
 			*/
 			*/
-			Matrix4 getConcatenatedMatrix();
+			Matrix4 getConcatenatedMatrix() const;
 			
 			
 			/** 
 			/** 
 			* Returns Same as getConcatenatedMatrix(), but contains only roll information for rotation. Used internally for billboards.
 			* Returns Same as getConcatenatedMatrix(), but contains only roll information for rotation. Used internally for billboards.
 			@return Entity's concatenated roll matrix.
 			@return Entity's concatenated roll matrix.
 			@see getConcatenatedMatrix()
 			@see getConcatenatedMatrix()
 			*/			
 			*/			
-			Matrix4 getConcatenatedRollMatrix();				
+			Matrix4 getConcatenatedRollMatrix() const;
 			
 			
 			/**
 			/**
 			* Sets all of the individual transform properties from the matrix and rebuilds the transform matrix.
 			* Sets all of the individual transform properties from the matrix and rebuilds the transform matrix.
 			@param matrix 4x4 transform matrix to apply.
 			@param matrix 4x4 transform matrix to apply.
 			*/			
 			*/			
-			void setTransformByMatrix(Matrix4 matrix);	
+			void setTransformByMatrix(const Matrix4& matrix);
 			
 			
 			/**
 			/**
 			* Sets the transform matrix directly, without setting all of the individual transfrom properties of the entity.
 			* Sets the transform matrix directly, without setting all of the individual transfrom properties of the entity.
 			@param matrix 4x4 transform matrix to apply.
 			@param matrix 4x4 transform matrix to apply.
 			*/						
 			*/						
-			void setTransformByMatrixPure(Matrix4 matrix);	
+			void setTransformByMatrixPure(const Matrix4& matrix);
 			
 			
 			/** Returns the matrix for the entity looking at a location based on a location and an up vector.
 			/** Returns the matrix for the entity looking at a location based on a location and an up vector.
 			* @param loc Location to look at.
 			* @param loc Location to look at.
@@ -158,7 +156,7 @@ namespace Polycode {
 			* Returns the parent entity of the entity.
 			* Returns the parent entity of the entity.
 			@return Parent entity of this entity.
 			@return Parent entity of this entity.
 			*/
 			*/
-			Entity *getParentEntity();
+			Entity *getParentEntity() const;
 				
 				
 			//@}
 			//@}
 			// ----------------------------------------------------------------------------------------------------------------
 			// ----------------------------------------------------------------------------------------------------------------
@@ -173,14 +171,14 @@ namespace Polycode {
 			* Returns the entity's position.
 			* Returns the entity's position.
 			@return Entity's position as a vector.
 			@return Entity's position as a vector.
 			*/			
 			*/			
-			Vector3 getPosition();
+			Vector3 getPosition() const;
 			
 			
 			/**
 			/**
 			* Returns the entity's position added to the combined position of its parent. This method is here only for convenience of calculating certain properties and should not be used to get an entity's actual position in the world. To get the actual world position of the entity, use the entity's concatendated matrix.
 			* Returns the entity's position added to the combined position of its parent. This method is here only for convenience of calculating certain properties and should not be used to get an entity's actual position in the world. To get the actual world position of the entity, use the entity's concatendated matrix.
 			@see getConcatenatedMatrix()
 			@see getConcatenatedMatrix()
 			@return Entity's position as a vector.
 			@return Entity's position as a vector.
 			*/			
 			*/			
-			Vector3 getCombinedPosition();			
+			Vector3 getCombinedPosition() const;
 
 
 			/**
 			/**
 			* Sets the entity's position.
 			* Sets the entity's position.
@@ -267,31 +265,31 @@ namespace Polycode {
 			* Returns the entity's scale multiplied by its parent's compound scale.
 			* Returns the entity's scale multiplied by its parent's compound scale.
 			* @return Compound scale as vector.
 			* @return Compound scale as vector.
 			*/			
 			*/			
-			Vector3 getCompoundScale();			
+			Vector3 getCompoundScale() const;
 			
 			
 			/**
 			/**
 			* Returns the entity's scale.
 			* Returns the entity's scale.
 			@return Entity's scale as a vector.
 			@return Entity's scale as a vector.
 			*/						
 			*/						
-			Vector3 getScale();		
+			Vector3 getScale() const;
 		
 		
 			/**
 			/**
 			* Returns the entity's pitch combined with the combined pitch of its parent.
 			* Returns the entity's pitch combined with the combined pitch of its parent.
 			@return Entity's combined pitch.
 			@return Entity's combined pitch.
 			*/									
 			*/									
-			Number getCombinedPitch();
+			Number getCombinedPitch() const;
 			
 			
 			/**
 			/**
 			* Returns the entity's yaw combined with the combined yaw of its parent.
 			* Returns the entity's yaw combined with the combined yaw of its parent.
 			@return Entity's combined yaw.
 			@return Entity's combined yaw.
 			*/									
 			*/									
-			Number getCombinedYaw();
+			Number getCombinedYaw() const;
 			
 			
 			/**
 			/**
 			* Returns the entity's roll combined with the combined roll of its parent.
 			* Returns the entity's roll combined with the combined roll of its parent.
 			@return Entity's combined roll.
 			@return Entity's combined roll.
 			*/												
 			*/												
-			Number getCombinedRoll();
+			Number getCombinedRoll() const;
 			
 			
 			/**
 			/**
 			* Forces the rotation quaternion to be rebuilt.
 			* Forces the rotation quaternion to be rebuilt.
@@ -338,19 +336,19 @@ namespace Polycode {
 			* Returns the current pitch of the entity.
 			* Returns the current pitch of the entity.
 			* @return Current pitch value.
 			* @return Current pitch value.
 			*/																				
 			*/																				
-			Number getPitch();
+			Number getPitch() const;
 			
 			
 			/**
 			/**
 			* Returns the current yaw of the entity.
 			* Returns the current yaw of the entity.
 			* @return Current yaw value.
 			* @return Current yaw value.
 			*/																							
 			*/																							
-			Number getYaw();
+			Number getYaw() const;
 			
 			
 			/**
 			/**
 			* Returns the current roll of the entity.
 			* Returns the current roll of the entity.
 			* @return Current roll value.
 			* @return Current roll value.
 			*/																										
 			*/																										
-			Number getRoll();
+			Number getRoll() const;
 		
 		
 			/**
 			/**
 			* Sets the rotation with quaternion value.
 			* Sets the rotation with quaternion value.
@@ -362,7 +360,7 @@ namespace Polycode {
 			* Returns the current rotation as a quaternion.
 			* Returns the current rotation as a quaternion.
 			* @return Current rotation value.
 			* @return Current rotation value.
 			*/																												
 			*/																												
-			Quaternion getRotationQuat();
+			Quaternion getRotationQuat() const;
 			
 			
 			/**
 			/**
 			* Orients the entity towards the specified location with the provided up vector. The up vector determines which side of the entity will be pointing in that direction.
 			* Orients the entity towards the specified location with the provided up vector. The up vector determines which side of the entity will be pointing in that direction.
@@ -383,7 +381,7 @@ namespace Polycode {
 			* Returns the entity's color multiplied by its parent entity's combined color.
 			* Returns the entity's color multiplied by its parent entity's combined color.
 			* @return Entity's combined color.
 			* @return Entity's combined color.
 			*/
 			*/
-			Color getCombinedColor();
+			Color getCombinedColor() const;
 			
 			
 			/**
 			/**
 			* Sets the color of the entity as normalized floating point values.
 			* Sets the color of the entity as normalized floating point values.
@@ -429,13 +427,13 @@ namespace Polycode {
 			* Returns the bounding box radius.
 			* Returns the bounding box radius.
 			* @return The bounding box radius.
 			* @return The bounding box radius.
 			*/			
 			*/			
-			Number getBBoxRadius();
+			Number getBBoxRadius() const;
 			
 			
 			/**
 			/**
 			* Returns the entity's bounding box radius compounded from its children's bounding box radii.
 			* Returns the entity's bounding box radius compounded from its children's bounding box radii.
 			* @return The compound bounding box radius.
 			* @return The compound bounding box radius.
 			*/						
 			*/						
-			Number getCompoundBBoxRadius();
+			Number getCompoundBBoxRadius() const;
 			
 			
 			/**
 			/**
 			* Sets the bounding box radius.
 			* Sets the bounding box radius.
@@ -551,10 +549,10 @@ namespace Polycode {
 				
 				
 			void setBlendingMode(int newBlendingMode);
 			void setBlendingMode(int newBlendingMode);
 				
 				
-			Vector3 getChildCenter();
+			Vector3 getChildCenter() const;
 							
 							
-			vector <EntityProp> entityProps;						
-			String getEntityProp(String propName);		
+			std::vector <EntityProp> entityProps;
+			String getEntityProp(const String& propName);
 			
 			
 			void doUpdates();				
 			void doUpdates();				
 			virtual Matrix4 buildPositionMatrix();
 			virtual Matrix4 buildPositionMatrix();
@@ -568,7 +566,7 @@ namespace Polycode {
 			bool isMask;
 			bool isMask;
 		
 		
 		protected:
 		protected:
-			vector<Entity*> children;
+			std::vector<Entity*> children;
 
 
 			Vector3 childCenter;
 			Vector3 childCenter;
 			Number bBoxRadius;		
 			Number bBoxRadius;		
@@ -599,4 +597,4 @@ namespace Polycode {
 		
 		
 			Renderer *renderer;
 			Renderer *renderer;
 	};
 	};
-}
+}

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

@@ -21,12 +21,8 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
-
-using std::string;
+#include "PolyString.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -53,17 +49,17 @@ namespace Polycode {
 			* Returns the event code for this event.
 			* Returns the event code for this event.
 			* @return Event code for the event.
 			* @return Event code for the event.
 			*/ 						
 			*/ 						
-			int getEventCode();
+			int getEventCode() const;
 			
 			
 			/**
 			/**
 			* Returns the event dispatcher which originated the event.
 			* Returns the event dispatcher which originated the event.
 			* @return Event dispatcher which originated the event.
 			* @return Event dispatcher which originated the event.
 			*/ 									
 			*/ 									
-			EventDispatcher *getDispatcher();
+			EventDispatcher *getDispatcher() const;
 			
 			
 			void setEventCode(int eventCode);			
 			void setEventCode(int eventCode);			
 			void setDispatcher(EventDispatcher *dispatcher);
 			void setDispatcher(EventDispatcher *dispatcher);
-			String getEventType();
+			const String& getEventType() const;
 			
 			
 			static const int COMPLETE_EVENT = 0;
 			static const int COMPLETE_EVENT = 0;
 			static const int CHANGE_EVENT = 1;
 			static const int CHANGE_EVENT = 1;
@@ -75,4 +71,4 @@ namespace Polycode {
 			int eventCode;
 			int eventCode;
 			
 			
 	};
 	};
-}
+}

+ 3 - 7
Core/Contents/Include/PolyEventDispatcher.h

@@ -22,17 +22,13 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyEventHandler.h"
 #include "PolyEventHandler.h"
-#include "PolyEvent.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
-
 namespace Polycode {
 namespace Polycode {
 
 
+	class Event;
 
 
 typedef struct {
 typedef struct {
 	EventHandler *handler;
 	EventHandler *handler;
@@ -91,7 +87,7 @@ typedef struct {
 		
 		
 		protected:
 		protected:
 	
 	
-		vector<EventEntry> handlerEntries;
+		std::vector<EventEntry> handlerEntries;
 	
 	
 	};
 	};
-}
+}

+ 2 - 3
Core/Contents/Include/PolyEventHandler.h

@@ -21,13 +21,12 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyEvent.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Event;
+
 	/**
 	/**
 	* Can handle events from EventDispatcher classes.
 	* Can handle events from EventDispatcher classes.
 	*/
 	*/

+ 6 - 6
Core/Contents/Include/PolyFixedShader.h

@@ -45,17 +45,17 @@ namespace Polycode {
 			FixedShaderBinding(FixedShader *shader);
 			FixedShaderBinding(FixedShader *shader);
 			~FixedShaderBinding();
 			~FixedShaderBinding();
 			
 			
-			void addTexture(String name, Texture *texture); 
-			void addCubemap(String name, Cubemap *cubemap);		
-			void addParam(String type, String name, String value);
+			void addTexture(const String& name, Texture *texture);
+			void addCubemap(const String& name, Cubemap *cubemap);
+			void addParam(const String& type, const String& name, const String& value);
 			
 			
 			Texture *getDiffuseTexture();
 			Texture *getDiffuseTexture();
 			
 			
 		protected:
 		protected:
 
 
-			vector<Texture*> textures;
-			vector<Cubemap*> cubemaps;		
+			std::vector<Texture*> textures;
+			std::vector<Cubemap*> cubemaps;
 			FixedShader *fixedShader;
 			FixedShader *fixedShader;
 	};
 	};
 
 
-}
+}

+ 5 - 9
Core/Contents/Include/PolyFont.h

@@ -21,25 +21,21 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
 #include "ft2build.h"
 #include "ft2build.h"
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
-#include "OSBasics.h"
-
-using namespace std;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class String;
+
 	class _PolyExport Font {
 	class _PolyExport Font {
 		public:
 		public:
-			Font(String fileName);
+			Font(const String& fileName);
 			~Font();
 			~Font();
 			
 			
 			FT_Face getFace();
 			FT_Face getFace();
-			bool isValid();
+			bool isValid() const;
 			
 			
 			bool loaded;
 			bool loaded;
 		protected:
 		protected:
@@ -47,4 +43,4 @@ namespace Polycode {
 			bool valid;
 			bool valid;
 			FT_Face ftFace;
 			FT_Face ftFace;
 	};
 	};
-}
+}

+ 7 - 10
Core/Contents/Include/PolyFontManager.h

@@ -22,17 +22,14 @@ THE SOFTWARE.
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyFont.h"
+#include "PolyString.h"
 #include <vector>
 #include <vector>
-#include <string>
-
-using std::vector;
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Font;
+
 	class FontEntry {
 	class FontEntry {
 	public:
 	public:
 		String fontName;
 		String fontName;
@@ -52,19 +49,19 @@ namespace Polycode {
 		* @param fontName Name to register the font as.
 		* @param fontName Name to register the font as.
 		* @param fontPath Filename of the font to load.
 		* @param fontPath Filename of the font to load.
 		*/
 		*/
-		void registerFont(String fontName, String fontPath);		
+		void registerFont(const String& fontName, const String& fontPath);
 		
 		
 		/**
 		/**
 		* Retuns a font based on the registerd font name.
 		* Retuns a font based on the registerd font name.
 		* @param fontName Name of registered font name.
 		* @param fontName Name of registered font name.
 		* @return The font instance associated with the font name or NULL if one doesn't exist.
 		* @return The font instance associated with the font name or NULL if one doesn't exist.
 		*/		
 		*/		
-		Font *getFontByName(String fontName);		
+		Font *getFontByName(const String& fontName);
 		
 		
 	private:
 	private:
 		
 		
-		vector <FontEntry> fonts;
+		std::vector <FontEntry> fonts;
 		
 		
 	};
 	};
 	
 	
-}
+}

+ 10 - 11
Core/Contents/Include/PolyGLCubemap.h

@@ -22,27 +22,26 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 
 
-#ifdef _WINDOWS
-#include <windows.h>
-#endif
-
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyTexture.h"
-#include "PolyGLRenderer.h"
 #include "PolyCubemap.h"
 #include "PolyCubemap.h"
+
+#ifdef _WINDOWS
+#include <windows.h>
+#endif
+
 #if defined(__APPLE__) && defined(__MACH__)
 #if defined(__APPLE__) && defined(__MACH__)
 #include <OpenGL/gl.h>
 #include <OpenGL/gl.h>
 #include <OpenGL/glext.h>
 #include <OpenGL/glext.h>
 #include <OpenGL/glu.h>	
 #include <OpenGL/glu.h>	
 #else
 #else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
+#include <GL/gl.h>
+#include <GL/glext.h>
 #endif
 #endif
 
 
-
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Texture;
+
 	class _PolyExport OpenGLCubemap : public Cubemap {
 	class _PolyExport OpenGLCubemap : public Cubemap {
 	public:
 	public:
 		
 		
@@ -57,4 +56,4 @@ namespace Polycode {
 		GLuint textureID;
 		GLuint textureID;
 	};
 	};
 	
 	
-}
+}

+ 4 - 13
Core/Contents/Include/PolyGLRenderer.h

@@ -22,29 +22,20 @@ THE SOFTWARE.
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyRenderer.h"
 #include "PolyRenderer.h"
-#include "PolyTexture.h"
-#include "PolyGLTexture.h"
-#include "PolyCubemap.h"
-#include "PolyGLCubemap.h"
-#include "PolyGLVertexBuffer.h"
-#include "PolyFixedShader.h"
-#include "PolyMesh.h"
 
 
 #ifdef _WINDOWS
 #ifdef _WINDOWS
-	#include <windows.h>
+#include <windows.h>
 #endif
 #endif
 
 
 #if defined(__APPLE__) && defined(__MACH__)
 #if defined(__APPLE__) && defined(__MACH__)
 #include <OpenGL/gl.h>
 #include <OpenGL/gl.h>
 #include <OpenGL/glext.h>
 #include <OpenGL/glext.h>
-#include <OpenGL/glu.h>	
+#include <OpenGL/glu.h>
 #else
 #else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
+#include <GL/gl.h>
+#include <GL/glu.h>
 #include <GL/glext.h>
 #include <GL/glext.h>
 
 
 #ifdef _WINDOWS
 #ifdef _WINDOWS

+ 4 - 24
Core/Contents/Include/PolyGLSLProgram.h

@@ -22,29 +22,9 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 
 
-#include "Polycode.h"
-
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-
-#include "PolyLogger.h"
+#include "PolyString.h"
 #include "PolyResource.h"
 #include "PolyResource.h"
-#include "PolyVector3.h"
-#include <vector>
-
-
-#if defined(__APPLE__) && defined(__MACH__)
-#include <OpenGL/gl.h>
-#include <OpenGL/glext.h>
-#include <OpenGL/glu.h>	
-#else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
-#include <GL/glext.h>
-#endif
-
-
-
-using std::vector;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -57,7 +37,7 @@ class _PolyExport GLSLProgramParam {
 	void *defaultData;
 	void *defaultData;
 	int paramType;
 	int paramType;
 	
 	
-	static void *createParamData(int *retType, String type, String value);
+	static void *createParamData(int *retType, const String& type, const String& value);
 	
 	
 	static const int POLY_MODELVIEWPROJ_MATRIX = 0;
 	static const int POLY_MODELVIEWPROJ_MATRIX = 0;
 	static const int POLY_MODELVIEW_MATRIX = 2;
 	static const int POLY_MODELVIEW_MATRIX = 2;
@@ -113,7 +93,7 @@ class _PolyExport GLSLProgramParam {
 			GLSLProgram(int type);
 			GLSLProgram(int type);
 			~GLSLProgram();
 			~GLSLProgram();
 			
 			
-			void addParam(String name, bool isAuto, int autoID, int paramType, void *defaultData);
+			void addParam(const String& name, bool isAuto, int autoID, int paramType, void *defaultData);
 		
 		
 			unsigned int program;
 			unsigned int program;
 //			GLSLparameter modelViewProjection;
 //			GLSLparameter modelViewProjection;
@@ -123,6 +103,6 @@ class _PolyExport GLSLProgramParam {
 			
 			
 			int type;
 			int type;
 			
 			
-			vector<GLSLProgramParam> params;
+			std::vector<GLSLProgramParam> params;
 	};
 	};
 }
 }

+ 9 - 27
Core/Contents/Include/PolyGLSLShader.h

@@ -23,32 +23,14 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 
 
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-
-#include "PolyLogger.h"
+#include "PolyString.h"
 #include "PolyShader.h"
 #include "PolyShader.h"
-#include "PolyGLSLProgram.h"
-#include "PolyTexture.h"
-#include "PolyCubemap.h"
 #include <vector>
 #include <vector>
 
 
-#if defined(__APPLE__) && defined(__MACH__)
-#include <OpenGL/gl.h>
-#include <OpenGL/glext.h>
-#include <OpenGL/glu.h>	
-#else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
-#include <GL/glext.h>
-#ifdef _WINDOWS
-#include <GL/wglext.h>
-#endif
-#endif
-
-
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
+	class GLSLProgram;
+
 	typedef struct {
 	typedef struct {
 		Texture *texture;
 		Texture *texture;
 		String name;
 		String name;
@@ -80,13 +62,13 @@ namespace Polycode {
 			GLSLShaderBinding(GLSLShader *shader);
 			GLSLShaderBinding(GLSLShader *shader);
 			virtual ~GLSLShaderBinding();
 			virtual ~GLSLShaderBinding();
 			
 			
-			void addTexture(String name, Texture *texture); 
-			void addCubemap(String name, Cubemap *cubemap);				
-			void clearTexture(String name);			
-			void addParam(String type, String name, String value);
+			void addTexture(const String& name, Texture *texture);
+			void addCubemap(const String& name, Cubemap *cubemap);
+			void clearTexture(const String& name);
+			void addParam(const String& type, const String& name, const String& value);
 			
 			
-			vector<GLSLTextureBinding> textures;
-			vector<GLSLCubemapBinding> cubemaps;		
+			std::vector<GLSLTextureBinding> textures;
+			std::vector<GLSLCubemapBinding> cubemaps;
 		
 		
 			GLSLShader *glslShader;
 			GLSLShader *glslShader;
 	};
 	};

+ 10 - 26
Core/Contents/Include/PolyGLSLShaderModule.h

@@ -22,37 +22,21 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 
 
-#include "Polycode.h"
-#include "PolyGLSLProgram.h"
-#include "PolyGLSLShader.h"
-#include "PolyMaterial.h"
-#include "PolyGLTexture.h"
-#include <string>
-#include <vector>
-
-#if defined(__APPLE__) && defined(__MACH__)
-#include <OpenGL/gl.h>
-#include <OpenGL/glext.h>
-#include <OpenGL/glu.h>	
-#else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
-#include <GL/glext.h>
-#endif
-
-
-using std::vector;
-using std::string;
+#include "PolyModule.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class GLSLProgram;
+	class GLSLProgramParam;
+	class GLSLShader;
+
 	class _PolyExport GLSLShaderModule : public PolycodeShaderModule {
 	class _PolyExport GLSLShaderModule : public PolycodeShaderModule {
 		public:
 		public:
 			GLSLShaderModule();
 			GLSLShaderModule();
 			virtual ~GLSLShaderModule();
 			virtual ~GLSLShaderModule();
 		
 		
-			bool acceptsExtension(String extension);
-			Resource* createProgramFromFile(String extension, String fullPath);	
+			bool acceptsExtension(const String& extension);
+			Resource* createProgramFromFile(const String& extension, const String& fullPath);
 			void reloadPrograms();
 			void reloadPrograms();
 			String getShaderType();
 			String getShaderType();
 			Shader *createShader(TiXmlNode *node);
 			Shader *createShader(TiXmlNode *node);
@@ -62,8 +46,8 @@ namespace Polycode {
 	protected:
 	protected:
 
 
 		void addParamToProgram(GLSLProgram *program,TiXmlNode *node);		
 		void addParamToProgram(GLSLProgram *program,TiXmlNode *node);		
-		void recreateGLSLProgram(GLSLProgram *prog, String fileName, int type);
-		GLSLProgram *createGLSLProgram(String fileName, int type);		
+		void recreateGLSLProgram(GLSLProgram *prog, const String& fileName, int type);
+		GLSLProgram *createGLSLProgram(const String& fileName, int type);
 		void updateGLSLParam(Renderer *renderer, GLSLShader *glslShader, GLSLProgramParam &param, ShaderBinding *materialOptions, ShaderBinding *localOptions);		
 		void updateGLSLParam(Renderer *renderer, GLSLShader *glslShader, GLSLProgramParam &param, ShaderBinding *materialOptions, ShaderBinding *localOptions);		
 			
 			
 		void setGLSLAreaLightPositionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);
 		void setGLSLAreaLightPositionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);
@@ -78,7 +62,7 @@ namespace Polycode {
 //		GLSLprofile vertexProfile;
 //		GLSLprofile vertexProfile;
 //		GLSLprofile fragmentProfile;
 //		GLSLprofile fragmentProfile;
 		
 		
-		vector<GLSLProgram*> programs;
+		std::vector<GLSLProgram*> programs;
 	};
 	};
 	
 	
 }
 }

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

@@ -22,23 +22,21 @@ THE SOFTWARE.
 
 
  
  
 #pragma once
 #pragma once
+#include "PolyGlobals.h"
+#include "PolyTexture.h"
 
 
 #ifdef _WINDOWS
 #ifdef _WINDOWS
-	#include <windows.h>
+#include <windows.h>
 #endif
 #endif
 
 
-#include "PolyString.h"
-#include "PolyGlobals.h"
-#include "PolyTexture.h"
-#include "PolyGLRenderer.h"
-#include "PolyCoreServices.h"
 #if defined(__APPLE__) && defined(__MACH__)
 #if defined(__APPLE__) && defined(__MACH__)
 #include <OpenGL/gl.h>
 #include <OpenGL/gl.h>
 #include <OpenGL/glext.h>
 #include <OpenGL/glext.h>
 #include <OpenGL/glu.h>	
 #include <OpenGL/glu.h>	
 #else
 #else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
+#include <GL/gl.h>
+#include <GL/glext.h>
+#include <GL/glu.h>
 #endif
 #endif
 
 
 
 
@@ -68,4 +66,4 @@ namespace Polycode {
 			GLuint frameBufferID;
 			GLuint frameBufferID;
 	};
 	};
 
 
-}
+}

+ 5 - 9
Core/Contents/Include/PolyGLVertexBuffer.h

@@ -22,25 +22,21 @@ THE SOFTWARE.
 
 
 
 
 #pragma once
 #pragma once
+#include "PolyMesh.h"
 
 
 #ifdef _WINDOWS
 #ifdef _WINDOWS
 #include <windows.h>
 #include <windows.h>
 #endif
 #endif
-#include "PolyString.h"
-#include "PolyGlobals.h"
-#include "PolyMesh.h"
-#include "PolyGLRenderer.h"
 
 
 #if defined(__APPLE__) && defined(__MACH__)
 #if defined(__APPLE__) && defined(__MACH__)
 #include <OpenGL/gl.h>
 #include <OpenGL/gl.h>
 #include <OpenGL/glext.h>
 #include <OpenGL/glext.h>
-#include <OpenGL/glu.h>	
+#include <OpenGL/glu.h>
 #else
 #else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
+#include <GL/gl.h>
+#include <GL/glext.h>
 #endif
 #endif
 
 
-
 namespace Polycode {
 namespace Polycode {
 	
 	
 	class _PolyExport OpenGLVertexBuffer : public VertexBuffer {
 	class _PolyExport OpenGLVertexBuffer : public VertexBuffer {
@@ -62,4 +58,4 @@ namespace Polycode {
 		GLuint colorBufferID;		
 		GLuint colorBufferID;		
 	};
 	};
 	
 	
-}
+}

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

@@ -47,7 +47,7 @@ THE SOFTWARE.
 #define TODEGREES 57.2957795
 #define TODEGREES 57.2957795
 #define TORADIANS 0.0174532925
 #define TORADIANS 0.0174532925
 
 
-#ifdef _WINDOWS
+#if defined(_WINDOWS) && defined(Polycore_EXPORTS)
 	#define _PolyExport __declspec(dllexport)
 	#define _PolyExport __declspec(dllexport)
 #else
 #else
 	#define _PolyExport
 	#define _PolyExport

+ 12 - 17
Core/Contents/Include/PolyImage.h

@@ -21,18 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyColor.h"
 #include "PolyColor.h"
-#include "PolyPerlin.h"
-#include <string>
-#include <math.h>
-#include "OSBasics.h"
-
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class String;
+
 	/**
 	/**
 	* 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.
 	* 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.
 	*/
 	*/
@@ -43,7 +38,7 @@ namespace Polycode {
 			* Create image from file name.
 			* Create image from file name.
 			* @param fileName Path to image file to load.
 			* @param fileName Path to image file to load.
 			*/ 
 			*/ 
-			Image(String fileName);
+			Image(const String& fileName);
 			
 			
 			/**
 			/**
 			* Create a blank image of specified size and type.
 			* Create a blank image of specified size and type.
@@ -75,8 +70,8 @@ namespace Polycode {
 			* @param fileName Path to image file to load.
 			* @param fileName Path to image file to load.
 			* @return True if successfully loaded, false otherwise.
 			* @return True if successfully loaded, false otherwise.
 			*/ 			
 			*/ 			
-			bool loadImage(String fileName);
-			bool loadPNG(String fileName);		
+			bool loadImage(const String& fileName);
+			bool loadPNG(const String& fileName);
 			
 			
 			/**
 			/**
 			* Recreate the image as an empty image of specified size. The image type stays the same.
 			* Recreate the image as an empty image of specified size. The image type stays the same.
@@ -188,28 +183,28 @@ namespace Polycode {
 			/**
 			/**
 			* Returns the x position of the brush.
 			* Returns the x position of the brush.
 			*/
 			*/
-			int getBrushX();
+			int getBrushX() const;
 			
 			
 			/**
 			/**
 			* Returns the y position of the brush.
 			* Returns the y position of the brush.
 			*/			
 			*/			
-			int getBrushY();
+			int getBrushY() const;
 		
 		
-			bool isLoaded();
+			bool isLoaded() const;
 		
 		
-			int getType() { return imageType; }
+			int getType() const { return imageType; }
 			
 			
-			void writeBMP(String fileName);
+			void writeBMP(const String& fileName) const;
 			
 			
 			/**
 			/**
 			* Returns the width of the image.
 			* Returns the width of the image.
 			*/			
 			*/			
-			unsigned int getWidth();
+			unsigned int getWidth() const;
 			
 			
 			/**
 			/**
 			* Returns the height of the image.
 			* Returns the height of the image.
 			*/						
 			*/						
-			unsigned int getHeight();
+			unsigned int getHeight() const;
 			
 			
 			/**
 			/**
 			* Returns the raw image data
 			* Returns the raw image data

+ 1 - 2
Core/Contents/Include/PolyInputEvent.h

@@ -21,7 +21,6 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyEvent.h"
 #include "PolyEvent.h"
 #include "PolyVector2.h"
 #include "PolyVector2.h"
@@ -91,4 +90,4 @@ namespace Polycode {
 		
 		
 			
 			
 	};
 	};
-}
+}

+ 11 - 15
Core/Contents/Include/PolyLabel.h

@@ -23,32 +23,28 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyFont.h"
 #include "PolyImage.h"
 #include "PolyImage.h"
 
 
-#include <string>
-using namespace std;
-
-using std::wstring;
-
 #define TAB_REPLACE "    "
 #define TAB_REPLACE "    "
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Font;
+
 	class _PolyExport Label : public Image {
 	class _PolyExport Label : public Image {
 		public:
 		public:
 			
 			
-			Label(Font *font, String text, int size, int antiAliasMode);
+			Label(Font *font, const String& text, int size, int antiAliasMode);
 			~Label();
 			~Label();
-			void setText(String text);
-			String getText();
-			int getTextWidth(Font *font, String text, int size);
-			int getTextHeight(Font *font, String text, int size);
+			void setText(const String& text);
+			const String& getText() const;
+			int getTextWidth(Font *font, const String& text, int size) const;
+			int getTextHeight(Font *font, const String& text, int size) const;
 					
 					
-			Number getTextWidth();		
-			Number getTextHeight();
+			Number getTextWidth() const;
+			Number getTextHeight() const;
 		
 		
-			Font *getFont();
+			Font *getFont() const;
 					
 					
 			static const int ANTIALIAS_FULL = 0;
 			static const int ANTIALIAS_FULL = 0;
 			static const int ANTIALIAS_NONE = 1;
 			static const int ANTIALIAS_NONE = 1;
@@ -63,4 +59,4 @@ namespace Polycode {
 			Font *font;
 			Font *font;
 	};
 	};
 
 
-}
+}

+ 0 - 11
Core/Contents/Include/PolyLogger.h

@@ -22,17 +22,6 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <string>
-#include <iostream>
-
-#ifdef MSVC
-#include <windows.h>
-#endif
-
-using std::wstring;
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 

+ 16 - 18
Core/Contents/Include/PolyMaterial.h

@@ -23,34 +23,32 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
-#include <vector>
-#include "PolyTexture.h"
-#include "PolyShader.h"
 #include "PolyResource.h"
 #include "PolyResource.h"
-
-
-using std::string;
-using std::vector;
+#include "PolyColor.h"
+#include <vector>
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Shader;
+	class ShaderBinding;
+	class ShaderRenderTarget;
+
 	class _PolyExport Material : public Resource {
 	class _PolyExport Material : public Resource {
 		public:
 		public:
-			Material(String name);
+			Material(const String& name);
 			virtual ~Material();
 			virtual ~Material();
 			
 			
 			void addShader(Shader *shader,ShaderBinding *shaderBinding);
 			void addShader(Shader *shader,ShaderBinding *shaderBinding);
-			unsigned int getNumShaders();
+			unsigned int getNumShaders() const;
 			
 			
 			void addShaderRenderTarget(ShaderRenderTarget *newTarget);
 			void addShaderRenderTarget(ShaderRenderTarget *newTarget);
 			int getNumShaderRenderTargets();
 			int getNumShaderRenderTargets();
 			ShaderRenderTarget *getShaderRenderTarget(unsigned int index);
 			ShaderRenderTarget *getShaderRenderTarget(unsigned int index);
 				
 				
-			String getName();
-			Shader *getShader(unsigned int index);
-			ShaderBinding *getShaderBinding(unsigned int index);
-			void loadMaterial(String fileName);
+			const String& getName() const;
+			Shader *getShader(unsigned int index) const;
+			ShaderBinding *getShaderBinding(unsigned int index) const;
+			void loadMaterial(const String& fileName);
 			
 			
 			Number specularValue;
 			Number specularValue;
 			Color specularColor;
 			Color specularColor;
@@ -58,11 +56,11 @@ namespace Polycode {
 						
 						
 		protected:
 		protected:
 		
 		
-			vector<Shader*> materialShaders;
-			vector<ShaderBinding*> shaderBindings;
-			vector<ShaderRenderTarget*> renderTargets;
+			std::vector<Shader*> materialShaders;
+			std::vector<ShaderBinding*> shaderBindings;
+			std::vector<ShaderRenderTarget*> renderTargets;
 					
 					
 			String name;
 			String name;
 		
 		
 	};
 	};
-}
+}

+ 12 - 16
Core/Contents/Include/PolyMaterialManager.h

@@ -21,25 +21,21 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
-#include "PolyTexture.h"
-#include "PolyCubemap.h"
-#include "PolyMaterial.h"
-#include "PolyShader.h"
-#include "PolyFixedShader.h"
-#include "PolyModule.h"
 #include "PolyImage.h"
 #include "PolyImage.h"
-#include "tinyxml.h"
 #include <vector>
 #include <vector>
 
 
-using namespace std;
+class TiXmlNode;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Cubemap;
+	class Material;
+	class PolycodeShaderModule;
 	class Texture;
 	class Texture;
 	class SceneRenderTexture;
 	class SceneRenderTexture;
+	class Shader;
+	class String;
 	
 	
 	/**
 	/**
 	* Manages loading and reloading of materials, textures and shaders. This class should be only accessed from the CoreServices singleton.
 	* Manages loading and reloading of materials, textures and shaders. This class should be only accessed from the CoreServices singleton.
@@ -58,7 +54,7 @@ namespace Polycode {
 			Texture *createTexture(int width, int height, char *imageData, bool clamp=true, int type=Image::IMAGE_RGBA);
 			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);
 			Texture *createNewTexture(int width, int height, bool clamp=true, int type=Image::IMAGE_RGBA);
 			Texture *createTextureFromImage(Image *image, bool clamp=true);
 			Texture *createTextureFromImage(Image *image, bool clamp=true);
-			Texture *createTextureFromFile(String fileName, bool clamp=true);
+			Texture *createTextureFromFile(const String& fileName, bool clamp=true);
 			void deleteTexture(Texture *texture);
 			void deleteTexture(Texture *texture);
 		
 		
 			void reloadTextures();
 			void reloadTextures();
@@ -69,7 +65,7 @@ namespace Polycode {
 			void addShaderModule(PolycodeShaderModule *module);		
 			void addShaderModule(PolycodeShaderModule *module);		
 		
 		
 			//SceneRenderTexture *createRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight);
 			//SceneRenderTexture *createRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight);
-			Texture *getTextureByResourcePath(String resourcePath);
+			Texture *getTextureByResourcePath(const String& resourcePath) const;
 			
 			
 			// cubemaps
 			// cubemaps
 		
 		
@@ -82,9 +78,9 @@ namespace Polycode {
 			Shader *createShaderFromXMLNode(TiXmlNode *node);
 			Shader *createShaderFromXMLNode(TiXmlNode *node);
 		
 		
 		private:
 		private:
-			vector<Texture*> textures;
-			vector<Material*> materials;
+			std::vector<Texture*> textures;
+			std::vector<Material*> materials;
 		
 		
-			vector <PolycodeShaderModule*> shaderModules;
+			std::vector <PolycodeShaderModule*> shaderModules;
 	};
 	};
-};
+};

+ 9 - 9
Core/Contents/Include/PolyMatrix4.h

@@ -21,10 +21,9 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
+#include <string.h>
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyVector3.h"
 #include "PolyVector3.h"
-#include <string.h>
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -68,7 +67,7 @@ namespace Polycode {
 			/**
 			/**
 			* Construct with pointer to 16 Number values.
 			* Construct with pointer to 16 Number values.
 			*/ 			
 			*/ 			
-			Matrix4(Number *m);
+			Matrix4(const Number *m);
 			~Matrix4();			
 			~Matrix4();			
 			
 			
 			union {
 			union {
@@ -91,7 +90,7 @@ namespace Polycode {
 			* Rotates a vector by the matrix values.
 			* Rotates a vector by the matrix values.
 			* @param v2 Vector to rotate.
 			* @param v2 Vector to rotate.
 			*/			
 			*/			
-			inline Vector3 rotateVector(const Vector3 &v2) {
+			inline Vector3 rotateVector(const Vector3 &v2) const {
 				return Vector3(v2.x*m[0][0] + v2.y*m[1][0] + v2.z*m[2][0],
 				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][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]);
 								v2.x*m[0][2] + v2.y*m[1][2] + v2.z*m[2][2]);
@@ -101,7 +100,7 @@ namespace Polycode {
 			* Returns the position from the matrix.
 			* Returns the position from the matrix.
 			* @return Position.
 			* @return Position.
 			*/						
 			*/						
-			inline Vector3 getPosition() {
+			inline Vector3 getPosition() const {
 				Vector3 pos;
 				Vector3 pos;
 				pos.x = m[3][0];
 				pos.x = m[3][0];
 				pos.y = m[3][1];
 				pos.y = m[3][1];
@@ -124,6 +123,7 @@ namespace Polycode {
 			}			
 			}			
 			
 			
 			inline Number* operator [] ( int row ) { return m[row];}
 			inline Number* operator [] ( int row ) { return m[row];}
+			inline const Number* operator [] ( int row ) const { return m[row];}
 			
 			
 			inline Matrix4 operator + ( const Matrix4 &m2 ) const {
 			inline Matrix4 operator + ( const Matrix4 &m2 ) const {
 				Matrix4 r;
 				Matrix4 r;
@@ -211,7 +211,7 @@ namespace Polycode {
 			* @param ay Pointer to pitch angle to set.
 			* @param ay Pointer to pitch angle to set.
 			* @param az Pointer to yaw angle to set.
 			* @param az Pointer to yaw angle to set.
 			*/					
 			*/					
-			inline void getEulerAngles(Number *ax, Number *ay, Number *az) {
+			inline void getEulerAngles(Number *ax, Number *ay, Number *az) const {
 				Number angle_x, angle_y, angle_z,tr_x,tr_y,C;
 				Number angle_x, angle_y, angle_z,tr_x,tr_y,C;
 				
 				
 				angle_y = asin(m[0][2]);
 				angle_y = asin(m[0][2]);
@@ -246,14 +246,14 @@ namespace Polycode {
 			/**
 			/**
 			* Returns the inverse of the matrix.
 			* Returns the inverse of the matrix.
 			*/
 			*/
-			Matrix4 inverse();
+			Matrix4 inverse() const;
 			
 			
 			/**
 			/**
 			* Returns the affine inverse of the matrix.
 			* Returns the affine inverse of the matrix.
 			*/			
 			*/			
-			Matrix4 inverseAffine();
+			Matrix4 inverseAffine() const;
 	
 	
 		protected:
 		protected:
 		
 		
 	};
 	};
-}	
+}	

+ 12 - 15
Core/Contents/Include/PolyMesh.h

@@ -21,19 +21,16 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include <math.h>
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyPolygon.h"
 #include "PolyVertex.h"
 #include "PolyVertex.h"
-#include <string>
-#include <vector>
-#include "OSBasics.h"
 
 
-using namespace std;
- 
+class OSFILE;
+
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Polygon;
+	class String;
+
 	class _PolyExport VertexSorter {
 	class _PolyExport VertexSorter {
 		public:
 		public:
 			Vertex *target;
 			Vertex *target;
@@ -45,7 +42,7 @@ namespace Polycode {
 			VertexBuffer(){}
 			VertexBuffer(){}
 			virtual ~VertexBuffer(){}
 			virtual ~VertexBuffer(){}
 		
 		
-			int getVertexCount() { return vertexCount;}
+			int getVertexCount() const { return vertexCount;}
 		
 		
 			int verticesPerFace;
 			int verticesPerFace;
 			int meshType;
 			int meshType;
@@ -123,7 +120,7 @@ namespace Polycode {
 			* Construct from a mesh loaded from a file.
 			* Construct from a mesh loaded from a file.
 			* @param fileName Path to mesh file.
 			* @param fileName Path to mesh file.
 			*/
 			*/
-			Mesh(String fileName);
+			Mesh(const String& fileName);
 
 
 			~Mesh();
 			~Mesh();
 			
 			
@@ -137,13 +134,13 @@ namespace Polycode {
 			* Loads a mesh from a file.
 			* Loads a mesh from a file.
 			* @param fileName Path to mesh file.
 			* @param fileName Path to mesh file.
 			*/			
 			*/			
-			void loadMesh(String fileName);
+			void loadMesh(const String& fileName);
 
 
 			/**
 			/**
 			* Saves mesh to a file.
 			* Saves mesh to a file.
 			* @param fileName Path to file to save to.
 			* @param fileName Path to file to save to.
 			*/			
 			*/			
-			void saveToFile(String fileName);
+			void saveToFile(const String& fileName);
 
 
 			void loadFromFile(OSFILE *inFile);
 			void loadFromFile(OSFILE *inFile);
 			void saveToFile(OSFILE *outFile);
 			void saveToFile(OSFILE *outFile);
@@ -259,7 +256,7 @@ namespace Polycode {
 			*/
 			*/
 			void calculateNormals(bool smooth=true, Number smoothAngle=90.0);	
 			void calculateNormals(bool smooth=true, Number smoothAngle=90.0);	
 			
 			
-			vector<Polygon*> getConnectedFaces(Vertex *v);
+			std::vector<Polygon*> getConnectedFaces(Vertex *v);
 			
 			
 			/**
 			/**
 			* Returns the mesh type.
 			* Returns the mesh type.
@@ -335,6 +332,6 @@ namespace Polycode {
 		VertexBuffer *vertexBuffer;
 		VertexBuffer *vertexBuffer;
 		bool meshHasVertexBuffer;
 		bool meshHasVertexBuffer;
 		int meshType;
 		int meshType;
-		vector <Polygon*> polygons;
+		std::vector <Polygon*> polygons;
 	};
 	};
-}
+}

+ 11 - 8
Core/Contents/Include/PolyModule.h

@@ -10,13 +10,16 @@
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "tinyxml.h"
-#include "PolyShader.h"
-#include "PolyMaterial.h"
+
+class TiXmlNode;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
-	class Renderer;	
+	class Material;
+	class Renderer;
+	class Shader;
+	class ShaderBinding;
+	class Resource;
 	
 	
 	class _PolyExport PolycodeModule {
 	class _PolyExport PolycodeModule {
 	public:
 	public:
@@ -36,8 +39,8 @@ namespace Polycode {
 		PolycodeShaderModule();
 		PolycodeShaderModule();
 		virtual ~PolycodeShaderModule();
 		virtual ~PolycodeShaderModule();
 		
 		
-		virtual bool acceptsExtension(String extension) = 0;
-		virtual Resource* createProgramFromFile(String extension, String fullPath) = 0;
+		virtual bool acceptsExtension(const String& extension) = 0;
+		virtual Resource* createProgramFromFile(const String& extension, const String& fullPath) = 0;
 		virtual String getShaderType() = 0;
 		virtual String getShaderType() = 0;
 		virtual Shader *createShader(TiXmlNode *node) = 0;
 		virtual Shader *createShader(TiXmlNode *node) = 0;
 	
 	
@@ -46,7 +49,7 @@ namespace Polycode {
 		virtual void clearShader() = 0;
 		virtual void clearShader() = 0;
 		virtual void reloadPrograms() = 0;
 		virtual void reloadPrograms() = 0;
 	protected:
 	protected:
-		vector<Shader*> shaders;
+		std::vector<Shader*> shaders;
 	};
 	};
 	
 	
-}
+}

+ 13 - 12
Core/Contents/Include/PolyObject.h

@@ -20,10 +20,11 @@
  THE SOFTWARE.
  THE SOFTWARE.
  */
  */
 
 
-
+#pragma once
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyString.h"
 #include "PolyString.h"
-#include "tinyxml.h"
+
+class TiXmlElement;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -78,7 +79,7 @@ namespace Polycode {
 		* @param name Lookup key for the object entry.
 		* @param name Lookup key for the object entry.
 		* @return The added object entry.
 		* @return The added object entry.
 		*/				
 		*/				
-		ObjectEntry *addChild(String name) {
+		ObjectEntry *addChild(const String& name) {
 			ObjectEntry *entry = new ObjectEntry();
 			ObjectEntry *entry = new ObjectEntry();
 			entry->type = ObjectEntry::CONTAINER_ENTRY;			
 			entry->type = ObjectEntry::CONTAINER_ENTRY;			
 			entry->name = name;
 			entry->name = name;
@@ -93,7 +94,7 @@ namespace Polycode {
 		* @param val Number to set as value in the object entry.
 		* @param val Number to set as value in the object entry.
 		* @return The added object entry.
 		* @return The added object entry.
 		*/						
 		*/						
-		ObjectEntry *addChild(String name, Number val) {
+		ObjectEntry *addChild(const String& name, Number val) {
 			ObjectEntry *entry = new ObjectEntry();
 			ObjectEntry *entry = new ObjectEntry();
 			entry->type = ObjectEntry::FLOAT_ENTRY;			
 			entry->type = ObjectEntry::FLOAT_ENTRY;			
 			entry->NumberVal = val;
 			entry->NumberVal = val;
@@ -110,7 +111,7 @@ namespace Polycode {
 		* @return The added object entry.
 		* @return The added object entry.
 		*/						
 		*/						
 
 
-		ObjectEntry *addChild(String name, int val) {
+		ObjectEntry *addChild(const String& name, int val) {
 			ObjectEntry *entry = new ObjectEntry();
 			ObjectEntry *entry = new ObjectEntry();
 			entry->type = ObjectEntry::INT_ENTRY;
 			entry->type = ObjectEntry::INT_ENTRY;
 			entry->intVal = val;
 			entry->intVal = val;
@@ -126,7 +127,7 @@ namespace Polycode {
 		* @param val String to set as value in the object entry.
 		* @param val String to set as value in the object entry.
 		* @return The added object entry.
 		* @return The added object entry.
 		*/						
 		*/						
-		ObjectEntry *addChild(String name, String val) {
+		ObjectEntry *addChild(const String& name, const String& val) {
 			ObjectEntry *entry = new ObjectEntry();
 			ObjectEntry *entry = new ObjectEntry();
 			entry->type = ObjectEntry::STRING_ENTRY;
 			entry->type = ObjectEntry::STRING_ENTRY;
 			entry->stringVal = val;
 			entry->stringVal = val;
@@ -143,7 +144,7 @@ namespace Polycode {
 		* @param val Boolean to set as value in the object entry.
 		* @param val Boolean to set as value in the object entry.
 		* @return The added object entry.
 		* @return The added object entry.
 		*/								
 		*/								
-		ObjectEntry *addChild(String name, bool val) {
+		ObjectEntry *addChild(const String& name, bool val) {
 			ObjectEntry *entry = new ObjectEntry();
 			ObjectEntry *entry = new ObjectEntry();
 			entry->type = ObjectEntry::BOOL_ENTRY;			
 			entry->type = ObjectEntry::BOOL_ENTRY;			
 			entry->boolVal = val;
 			entry->boolVal = val;
@@ -179,9 +180,9 @@ namespace Polycode {
 		* @param key Lookup key to return value for.
 		* @param key Lookup key to return value for.
 		* @return Object entry corresponding to the string value or NULL if one doesn't exist.
 		* @return Object entry corresponding to the string value or NULL if one doesn't exist.
 		*/
 		*/
-		inline ObjectEntry *operator [] ( String key) { for(int i=0; i < children.size(); i++) { if(children[i]->name == key) { return children[i]; } } return NULL; }		
+		inline ObjectEntry *operator [] ( const String& key) { for(int i=0; i < children.size(); i++) { if(children[i]->name == key) { return children[i]; } } return NULL; }
 		
 		
-		vector<ObjectEntry*> children;		
+		std::vector<ObjectEntry*> children;
 	};
 	};
 	
 	
 	/**
 	/**
@@ -201,13 +202,13 @@ namespace Polycode {
 		* @param fileName Path to the XML file to load.
 		* @param fileName Path to the XML file to load.
 		* @return Returns true is succesful, false if otherwise.
 		* @return Returns true is succesful, false if otherwise.
 		*/		
 		*/		
-		bool loadFromXML(String fileName);
+		bool loadFromXML(const String& fileName);
 		
 		
 		/**
 		/**
 		* Saves the object to an XML file.
 		* Saves the object to an XML file.
 		* @param fileName Path to the XML file to save to.
 		* @param fileName Path to the XML file to save to.
 		*/				
 		*/				
-		void saveToXML(String fileName);
+		void saveToXML(const String& fileName);
 		
 		
 		void createFromXMLElement(TiXmlElement *element, ObjectEntry *entry);
 		void createFromXMLElement(TiXmlElement *element, ObjectEntry *entry);
 		TiXmlElement *createElementFromObjectEntry(ObjectEntry *entry);
 		TiXmlElement *createElementFromObjectEntry(ObjectEntry *entry);
@@ -219,4 +220,4 @@ namespace Polycode {
 		
 		
 	};
 	};
 	
 	
-}
+}

+ 7 - 7
Core/Contents/Include/PolyParticle.h

@@ -21,16 +21,16 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolySceneEntity.h"
-#include "PolyScreenShape.h"
-#include "PolyScenePrimitive.h"
-#include "PolyCoreServices.h"
-
+#include "PolyVector3.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Entity;
+	class Material;
+	class Mesh;
+	class Texture;
+
 	class _PolyExport Particle {
 	class _PolyExport Particle {
 		public:
 		public:
 			Particle(int particleType, bool isScreenParticle, Material *material, Texture *texture, Mesh *particleMesh);
 			Particle(int particleType, bool isScreenParticle, Material *material, Texture *texture, Mesh *particleMesh);
@@ -57,4 +57,4 @@ namespace Polycode {
 			static const int BILLBOARD_PARTICLE = 0;
 			static const int BILLBOARD_PARTICLE = 0;
 			static const int MESH_PARTICLE = 1;
 			static const int MESH_PARTICLE = 1;
 	};
 	};
-}
+}

+ 26 - 17
Core/Contents/Include/PolyParticleEmitter.h

@@ -21,25 +21,34 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyEntity.h"
-#include "PolyScenePrimitive.h"
-#include "PolyScreenMesh.h"
-#include "PolyCoreServices.h"
-#include "PolyParticle.h"
-#include <vector>
-
-using std::vector;
+#include "PolyString.h"
+#include "PolyVector3.h"
+#include "PolyMatrix4.h"
+#include "PolyBezierCurve.h"
+#include "PolySceneEntity.h"
+#include "PolyScreenEntity.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Entity;
+	class Material;
+	class Mesh;
+	class Particle;
+	class Perlin;
+	class Scene;
+	class SceneMesh;
+	class Screen;
+	class ScreenMesh;
+	class Texture;
+	class Timer;
+
 	/** 
 	/** 
 	* Particle emitter base.
 	* Particle emitter base.
 	*/
 	*/
 	class _PolyExport ParticleEmitter {
 	class _PolyExport ParticleEmitter {
 		public:
 		public:
-			ParticleEmitter(String imageFile, Mesh *particleMesh, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation);
+			ParticleEmitter(const String& imageFile, Mesh *particleMesh, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation);
 			virtual ~ParticleEmitter();
 			virtual ~ParticleEmitter();
 		
 		
 			void createParticles();
 			void createParticles();
@@ -124,7 +133,7 @@ namespace Polycode {
 			void setParticleCount(int count);
 			void setParticleCount(int count);
 		
 		
 			virtual void addParticleBody(Entity *particleBody) {}
 			virtual void addParticleBody(Entity *particleBody) {}
-			virtual Matrix4 getBaseMatrix() {Matrix4 m; return m;}
+			virtual Matrix4 getBaseMatrix() const {Matrix4 m; return m;}
 		
 		
 			/**
 			/**
 			* Particle movement speed multiplier
 			* Particle movement speed multiplier
@@ -226,7 +235,7 @@ namespace Polycode {
 			
 			
 			Number rotationSpeed;
 			Number rotationSpeed;
 			Number numParticles;
 			Number numParticles;
-			vector<Particle*> particles;
+			std::vector<Particle*> particles;
 			
 			
 			Number emitSpeed;
 			Number emitSpeed;
 			Timer *timer;
 			Timer *timer;
@@ -251,7 +260,7 @@ namespace Polycode {
 		* @param particleMesh If particle type is Particle::MESH_PARTICLE, this must be set to the mesh to use for each particle
 		* @param particleMesh If particle type is Particle::MESH_PARTICLE, this must be set to the mesh to use for each particle
 		* @param emitter If this is specified, particles will be emitted from this meshe's vertices.
 		* @param emitter If this is specified, particles will be emitted from this meshe's vertices.
 		*/
 		*/
-		SceneParticleEmitter(String materialName, Scene *particleParentScene, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation, Mesh *particleMesh = NULL, SceneMesh *emitter = NULL);
+		SceneParticleEmitter(const String& materialName, Scene *particleParentScene, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation, Mesh *particleMesh = NULL, SceneMesh *emitter = NULL);
 		~SceneParticleEmitter();		
 		~SceneParticleEmitter();		
 		
 		
 		/**
 		/**
@@ -261,7 +270,7 @@ namespace Polycode {
 		
 		
 		void respawnSceneParticles();
 		void respawnSceneParticles();
 		void addParticleBody(Entity *particleBody);
 		void addParticleBody(Entity *particleBody);
-		Matrix4 getBaseMatrix();
+		Matrix4 getBaseMatrix() const;
 		void Update();
 		void Update();
 		
 		
 	protected:
 	protected:
@@ -274,7 +283,7 @@ namespace Polycode {
 	*/
 	*/
 	class _PolyExport ScreenParticleEmitter : public ScreenEntity, public ParticleEmitter {
 	class _PolyExport ScreenParticleEmitter : public ScreenEntity, public ParticleEmitter {
 	public:
 	public:
-		ScreenParticleEmitter(String imageFile, Screen *particleParentScreen, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation, Mesh *particleMesh = NULL, ScreenMesh *emitter = NULL);
+		ScreenParticleEmitter(const String& imageFile, Screen *particleParentScreen, int particleType, int emitterType, Number lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation, Mesh *particleMesh = NULL, ScreenMesh *emitter = NULL);
 		~ScreenParticleEmitter();		
 		~ScreenParticleEmitter();		
 		
 		
 		/**
 		/**
@@ -283,11 +292,11 @@ namespace Polycode {
 		ParticleEmitter *getEmitter() { return this; }		
 		ParticleEmitter *getEmitter() { return this; }		
 		
 		
 		void addParticleBody(Entity *particleBody);
 		void addParticleBody(Entity *particleBody);
-		Matrix4 getBaseMatrix();
+		Matrix4 getBaseMatrix() const;
 		void Update();
 		void Update();
 		
 		
 	protected:
 	protected:
 		ScreenMesh *emitterMesh;		
 		ScreenMesh *emitterMesh;		
 		Screen *particleParentScreen;
 		Screen *particleParentScreen;
 	};		
 	};		
-}
+}

+ 4 - 11
Core/Contents/Include/PolyPolygon.h

@@ -21,22 +21,15 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include <math.h>
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyVertex.h"
 #include "PolyVector3.h"
 #include "PolyVector3.h"
-#include "PolyVector2.h"
 #include "PolyRectangle.h"
 #include "PolyRectangle.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
-using std::min;
-using std::max;
-
 namespace Polycode {
 namespace Polycode {
 
 
+	class Vertex;
+
 	/**
 	/**
 	* A polygon structure.
 	* A polygon structure.
 	*/ 
 	*/ 
@@ -126,8 +119,8 @@ namespace Polycode {
 		protected:
 		protected:
 		
 		
 			unsigned int vertexCount;
 			unsigned int vertexCount;
-			vector<Vertex*> vertices;
+			std::vector<Vertex*> vertices;
 			Vector3			normal;
 			Vector3			normal;
 	};
 	};
 
 
-}
+}

+ 4 - 6
Core/Contents/Include/PolyQuaternion.h

@@ -21,11 +21,9 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyBasics.h"
 #include "PolyMatrix4.h"
 #include "PolyMatrix4.h"
-#include <math.h>
+#include "PolyVector3.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -118,7 +116,7 @@ namespace Polycode {
 			 */
 			 */
 		}
 		}
 		
 		
-		void createFromMatrix(Matrix4 matrix) {
+		void createFromMatrix(const Matrix4& matrix) {
 			Number  tr, s, q[4];
 			Number  tr, s, q[4];
 			int    i, j, k;
 			int    i, j, k;
 			
 			
@@ -265,7 +263,7 @@ namespace Polycode {
     }			
     }			
 			
 			
 			void createFromAxisAngle(Number x, Number y, Number z, Number degrees);
 			void createFromAxisAngle(Number x, Number y, Number z, Number degrees);
-			Matrix4 createMatrix();
+			Matrix4 createMatrix() const;
 			
 			
 			
 			
 			
 			
@@ -280,4 +278,4 @@ namespace Polycode {
 			
 			
 		protected:
 		protected:
 	};
 	};
-}
+}

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

@@ -21,16 +21,14 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyBezierCurve.h"
 #include "PolyQuaternion.h"
 #include "PolyQuaternion.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
+	class BezierCurve;
+
 	class _PolyExport QuatTriple {
 	class _PolyExport QuatTriple {
 		public:
 		public:
 		Quaternion q1;
 		Quaternion q1;
@@ -51,8 +49,8 @@ namespace Polycode {
 		
 		
 		protected:
 		protected:
 		
 		
-			vector<QuatTriple> tPoints;
-			vector<Quaternion> points;			
-			vector<Quaternion> tangents;
+			std::vector<QuatTriple> tPoints;
+			std::vector<Quaternion> points;
+			std::vector<Quaternion> tangents;
 	};
 	};
-}
+}

+ 1 - 2
Core/Contents/Include/PolyRectangle.h

@@ -21,7 +21,6 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 
 
 namespace Polycode {
 namespace Polycode {
@@ -65,4 +64,4 @@ namespace Polycode {
 			*/																
 			*/																
 			Number h;
 			Number h;
 	};
 	};
-}
+}

+ 20 - 18
Core/Contents/Include/PolyRenderer.h

@@ -23,20 +23,22 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyColor.h"
-#include "PolyPolygon.h"
-#include "PolyMesh.h"
-#include "PolyTexture.h"
-#include "PolyCubemap.h"
-#include "PolyMaterial.h"
-#include "PolyModule.h"
-#include "PolyVector3.h"
-#include "PolyQuaternion.h"
 #include "PolyMatrix4.h"
 #include "PolyMatrix4.h"
+#include "PolyVector2.h"
+#include "PolyImage.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Cubemap;
+	class Material;
+	class Mesh;
+	class PolycodeShaderBinding;
+	class PolycodeShaderModule;
+	class Polygon;
+	class RenderDataArray;
+	class ShaderBinding;
 	class Texture;
 	class Texture;
+	class VertexBuffer;
 
 
 	class _PolyExport LightInfo {
 	class _PolyExport LightInfo {
 		public:
 		public:
@@ -175,8 +177,8 @@ namespace Polycode {
 		virtual void clearBuffer(bool colorBuffer, bool depthBuffer) = 0;
 		virtual void clearBuffer(bool colorBuffer, bool depthBuffer) = 0;
 		virtual void drawToColorBuffer(bool val) = 0;
 		virtual void drawToColorBuffer(bool val) = 0;
 		
 		
-		Matrix4 getCameraMatrix();
-		void setCameraMatrix(Matrix4 matrix);
+		const Matrix4& getCameraMatrix() const;
+		void setCameraMatrix(const Matrix4& matrix);
 		void setCameraPosition(Vector3 pos);
 		void setCameraPosition(Vector3 pos);
 		
 		
 		virtual void drawScreenQuad(Number qx, Number qy) = 0;
 		virtual void drawScreenQuad(Number qx, Number qy) = 0;
@@ -242,8 +244,8 @@ namespace Polycode {
 		int getNumSpotLights() { return numSpotLights; }
 		int getNumSpotLights() { return numSpotLights; }
 		int getNumLights() { return numLights; }
 		int getNumLights() { return numLights; }
 		
 		
-		vector<LightInfo> getAreaLights() { return areaLights; }
-		vector<LightInfo> getSpotLights() { return spotLights;	}
+		std::vector<LightInfo> getAreaLights() { return areaLights; }
+		std::vector<LightInfo> getSpotLights() { return spotLights;	}
 		
 		
 	protected:
 	protected:
 	
 	
@@ -267,11 +269,11 @@ namespace Polycode {
 		Matrix4 cameraMatrix;
 		Matrix4 cameraMatrix;
 	
 	
 		PolycodeShaderModule* currentShaderModule;
 		PolycodeShaderModule* currentShaderModule;
-		vector <PolycodeShaderModule*> shaderModules;
+		std::vector <PolycodeShaderModule*> shaderModules;
 
 
-		vector<LightInfo> lights;
-		vector<LightInfo> areaLights;
-		vector<LightInfo> spotLights;		
+		std::vector<LightInfo> lights;
+		std::vector<LightInfo> areaLights;
+		std::vector<LightInfo> spotLights;
 		int numLights;
 		int numLights;
 		int numAreaLights;
 		int numAreaLights;
 		int numSpotLights;
 		int numSpotLights;
@@ -286,4 +288,4 @@ namespace Polycode {
 		int xRes;
 		int xRes;
 		int yRes;
 		int yRes;
 	};
 	};
-}
+}

+ 6 - 11
Core/Contents/Include/PolyResource.h

@@ -24,11 +24,6 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <vector>
-#include <string>
-
-using std::vector;
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -48,11 +43,11 @@ namespace Polycode {
 			virtual ~Resource();
 			virtual ~Resource();
 			
 			
 			
 			
-			String getResourceName();
-			int getResourceType();
-			void setResourceName(String newName);
-			void setResourcePath(String path);
-			String getResourcePath();		
+			const String& getResourceName() const;
+			int getResourceType() const;
+			void setResourceName(const String& newName);
+			void setResourcePath(const String& path);
+			const String& getResourcePath() const;
 
 
 			static const int RESOURCE_TEXTURE = 0;
 			static const int RESOURCE_TEXTURE = 0;
 			static const int RESOURCE_MATERIAL = 1;
 			static const int RESOURCE_MATERIAL = 1;
@@ -71,4 +66,4 @@ namespace Polycode {
 	
 	
 					
 					
 	};
 	};
-}
+}

+ 17 - 26
Core/Contents/Include/PolyResourceManager.h

@@ -22,24 +22,15 @@ THE SOFTWARE.
  
  
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include <vector>
 #include <vector>
-#include <string>
-#include "OSBasics.h"
-#include "PolyTexture.h"
-#include "PolyCubemap.h"
-#include "PolyResource.h"
-#include "PolyCoreServices.h"
-#include "PolyModule.h"
-#include "tinyxml.h"
-#include "physfs.h"
-
-using std::vector;
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Resource;
+	class PolycodeShaderModule;
+	class String;
+
 	/**
 	/**
 	* Manages loading and unloading of resources from directories and archives. Should only be accessed via the CoreServices singleton. 
 	* Manages loading and unloading of resources from directories and archives. Should only be accessed via the CoreServices singleton. 
 	*/ 
 	*/ 
@@ -59,34 +50,34 @@ namespace Polycode {
 			* @param dirPath Path to directory to load resources from.
 			* @param dirPath Path to directory to load resources from.
 			* @param recursive If true, will recurse into subdirectories.
 			* @param recursive If true, will recurse into subdirectories.
 			*/
 			*/
-			void addDirResource(String dirPath, bool recursive=true);
+			void addDirResource(const String& dirPath, bool recursive=true);
 			
 			
 			/**
 			/**
 			* 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.
 			* 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);
+			void addArchive(const String& zipPath);
 		
 		
-			bool readFile(String fileName){ return false;}
+			bool readFile(const String& fileName) { return false;}
 		
 		
-			void parseTextures(String dirPath, bool recursive);
-			void parseMaterials(String dirPath, bool recursive);
-			void parseShaders(String dirPath, bool recursive);
-			void parsePrograms(String dirPath, bool recursive);
-			void parseCubemaps(String dirPath, bool recursive);
-			void parseOthers(String dirPath, bool recursive);	
+			void parseTextures(const String& dirPath, bool recursive);
+			void parseMaterials(const String& dirPath, bool recursive);
+			void parseShaders(const String& dirPath, bool recursive);
+			void parsePrograms(const String& dirPath, bool recursive);
+			void parseCubemaps(const String& dirPath, bool recursive);
+			void parseOthers(const String& dirPath, bool recursive);
 		
 		
 			/**
 			/**
 			* Request a loaded resource. You need to manually cast it to its subclass based on its type.
 			* 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 resourceType Type of resource. See Resource for available resource types.
 			* @param resourceName Name of the resource to request.
 			* @param resourceName Name of the resource to request.
 			*/
 			*/
-			Resource *getResource(int resourceType, String resourceName);
+			Resource *getResource(int resourceType, const String& resourceName) const;
 		
 		
 			void addShaderModule(PolycodeShaderModule *module);
 			void addShaderModule(PolycodeShaderModule *module);
 		
 		
 		
 		
 		private:
 		private:
-			vector <Resource*> resources;
-			vector <PolycodeShaderModule*> shaderModules;
+			std::vector <Resource*> resources;
+			std::vector <PolycodeShaderModule*> shaderModules;
 	};
 	};
-}
+}

+ 12 - 15
Core/Contents/Include/PolySDLCore.h

@@ -24,17 +24,14 @@
 
 
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyCore.h"
 #include "PolyCore.h"
-#include "PolyGLRenderer.h"
-#include "PolyGLSLShaderModule.h"
-#include "PolyRectangle.h"
 #include <vector>
 #include <vector>
-#include <SDL/SDL.h>
-#include <iostream>
 
 
-using std::vector;
+struct SDL_mutex;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class PolycodeView;
+
 	class _PolyExport SDLCoreMutex : public CoreMutex {
 	class _PolyExport SDLCoreMutex : public CoreMutex {
 	public:
 	public:
 		SDL_mutex *pMutex;
 		SDL_mutex *pMutex;
@@ -44,28 +41,28 @@ namespace Polycode {
 		
 		
 	public:
 	public:
 		
 		
-		SDLCore(PolycodeViewBase *view, int xRes, int yRes, bool fullScreen, int aaLevel, int frameRate);
+		SDLCore(PolycodeView *view, int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel, int frameRate);
 		~SDLCore();
 		~SDLCore();
 
 
 		void enableMouse(bool newval);
 		void enableMouse(bool newval);
 		unsigned int getTicks();
 		unsigned int getTicks();
 		bool Update();
 		bool Update();
-		void setVideoMode(int xRes, int yRes, bool fullScreen, int aaLevel);
+		void setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel);
 		void createThread(Threaded *target);
 		void createThread(Threaded *target);
-		vector<Rectangle> getVideoModes();
+		std::vector<Rectangle> getVideoModes();
 		
 		
 		void setCursor(int cursorType);
 		void setCursor(int cursorType);
 		void lockMutex(CoreMutex *mutex);
 		void lockMutex(CoreMutex *mutex);
 		void unlockMutex(CoreMutex *mutex);
 		void unlockMutex(CoreMutex *mutex);
 		CoreMutex *createMutex();
 		CoreMutex *createMutex();
-		void copyStringToClipboard(String str);
+		void copyStringToClipboard(const String& str);
 		String getClipboardString();
 		String getClipboardString();
-		void createFolder(String folderPath);
-		void copyDiskItem(String itemPath, String destItemPath);		
-		void moveDiskItem(String itemPath, String destItemPath);		
-		void removeDiskItem(String itemPath);
+		void createFolder(const String& folderPath);
+		void copyDiskItem(const String& itemPath, const String& destItemPath);
+		void moveDiskItem(const String& itemPath, const String& destItemPath);
+		void removeDiskItem(const String& itemPath);
 		String openFolderPicker();
 		String openFolderPicker();
-		vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple);
+		std::vector<String> openFilePicker(std::vector<CoreFileExtension> extensions, bool allowMultiple);
 		void resizeTo(int xRes, int yRes);
 		void resizeTo(int xRes, int yRes);
 
 
 	private:
 	private:

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

@@ -21,20 +21,20 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyRenderer.h"
-#include "PolySceneEntity.h"
-#include "PolyCamera.h"
-#include "PolySceneLight.h"
-#include "PolySceneMesh.h"
+#include "PolyString.h"
+#include "PolyColor.h"
+#include "PolyVector3.h"
+#include "PolyEventDispatcher.h"
+
 #include <vector>
 #include <vector>
 
 
-using std::vector;
+class OSFILE;
 
 
 namespace Polycode {
 namespace Polycode {
 		
 		
 	class Camera;
 	class Camera;
+	class SceneEntity;
 	class SceneLight;
 	class SceneLight;
 	class SceneMesh;
 	class SceneMesh;
 	
 	
@@ -117,7 +117,7 @@ namespace Polycode {
 		void RenderDepthOnly(Camera *targetCamera);
 		void RenderDepthOnly(Camera *targetCamera);
 		
 		
 		static String readString(OSFILE *inFile);
 		static String readString(OSFILE *inFile);
-		void loadScene(String fileName);
+		void loadScene(const String& fileName);
 		void generateLightmaps(Number lightMapRes, Number lightMapQuality, int numRadPasses);
 		void generateLightmaps(Number lightMapRes, Number lightMapQuality, int numRadPasses);
 		
 		
 		/**
 		/**
@@ -135,8 +135,8 @@ namespace Polycode {
 		SceneLight *getNearestLight(Vector3 pos);
 		SceneLight *getNearestLight(Vector3 pos);
 		
 		
 		void writeEntityMatrix(SceneEntity *entity, OSFILE *outFile);
 		void writeEntityMatrix(SceneEntity *entity, OSFILE *outFile);
-		void writeString(String str, OSFILE *outFile);
-		void saveScene(String fileName);
+		void writeString(const String& str, OSFILE *outFile);
+		void saveScene(const String& fileName);
 		
 		
 		int getNumStaticGeometry();
 		int getNumStaticGeometry();
 		SceneMesh *getStaticGeometry(int index);
 		SceneMesh *getStaticGeometry(int index);
@@ -146,8 +146,8 @@ namespace Polycode {
 		int getNumLights();
 		int getNumLights();
 		SceneLight *getLight(int index);
 		SceneLight *getLight(int index);
 		
 		
-		SceneEntity *getCustomEntityByType(String type);
-		vector<SceneEntity*> getCustomEntitiesByType(String type);		
+		SceneEntity *getCustomEntityByType(const String& type) const;
+		std::vector<SceneEntity*> getCustomEntitiesByType(const String& type) const;
 		
 		
 		static const unsigned int ENTITY_MESH = 0;
 		static const unsigned int ENTITY_MESH = 0;
 		static const unsigned int ENTITY_LIGHT = 1;			
 		static const unsigned int ENTITY_LIGHT = 1;			
@@ -184,16 +184,16 @@ namespace Polycode {
 		
 		
 		bool hasLightmaps;
 		bool hasLightmaps;
 		
 		
-		vector <SceneLight*> lights;				
-		vector <SceneMesh*> staticGeometry;
-		vector <SceneMesh*> collisionGeometry;
-		vector <SceneEntity*> customEntities;
+		std::vector <SceneLight*> lights;
+		std::vector <SceneMesh*> staticGeometry;
+		std::vector <SceneMesh*> collisionGeometry;
+		std::vector <SceneEntity*> customEntities;
 		
 		
 		
 		
 		bool isSceneVirtual;
 		bool isSceneVirtual;
 		
 		
 		Camera *defaultCamera;
 		Camera *defaultCamera;
-		vector <SceneEntity*> entities;
+		std::vector <SceneEntity*> entities;
 		
 		
 		bool lightingEnabled;
 		bool lightingEnabled;
 		bool fogEnabled;
 		bool fogEnabled;
@@ -203,4 +203,4 @@ namespace Polycode {
 		Number fogEndDepth;
 		Number fogEndDepth;
 		
 		
 	};
 	};
-}
+}

+ 1 - 11
Core/Contents/Include/PolySceneEntity.h

@@ -21,18 +21,8 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
-#include "PolyGlobals.h"
-#include "PolyRenderer.h"
-#include "PolyVector3.h"
-#include "PolyMatrix4.h"
-#include "PolyQuaternion.h"
 #include "PolyEntity.h"
 #include "PolyEntity.h"
 #include "PolyEventHandler.h"
 #include "PolyEventHandler.h"
-#include <vector>
-
-using std::vector;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -61,4 +51,4 @@ namespace Polycode {
 		protected:
 		protected:
 
 
 	};
 	};
-}
+}

+ 7 - 13
Core/Contents/Include/PolySceneLabel.h

@@ -21,21 +21,15 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
-#include "PolyFont.h"
-#include "PolyLabel.h"
-#include "PolyMesh.h"
-#include "PolyTexture.h"
-#include "PolyPolygon.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
 
 
-#include <string>
-using std::string;
-
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Label;
+	class Mesh;
+	class Texture;
+
 	/**
 	/**
 	* 3D text label. Creates a 3D text label.
 	* 3D text label. Creates a 3D text label.
 	*/
 	*/
@@ -50,7 +44,7 @@ namespace Polycode {
 			* @param scale Scale to multiply pixel size by for the actual world size of the label.
 			* @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.
 			* @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(const String& fontName, const String& text, int size, Number scale, int amode);
 			~SceneLabel();			
 			~SceneLabel();			
 		
 		
 			bool testMouseCollision(Number x, Number y);
 			bool testMouseCollision(Number x, Number y);
@@ -59,7 +53,7 @@ namespace Polycode {
 			* Sets new text for the labe.
 			* Sets new text for the labe.
 			* @param newText New text to display.
 			* @param newText New text to display.
 			*/ 
 			*/ 
-			void setText(String newText);
+			void setText(const String& newText);
 			
 			
 			Label *getLabel();
 			Label *getLabel();
 			void Render();
 			void Render();
@@ -72,4 +66,4 @@ namespace Polycode {
 			Number scale;
 			Number scale;
 			Label *label;
 			Label *label;
 	};
 	};
-}
+}

+ 15 - 19
Core/Contents/Include/PolySceneLight.h

@@ -22,19 +22,15 @@ THE SOFTWARE.
  
  
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolyCoreServices.h"
-#include "PolyScene.h"
-#include "PolyCamera.h"
-#include "PolyMesh.h"
-//#include "PolyScenePrimitive.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
 	class Scene;
 	class Scene;
 	class Camera;
 	class Camera;
+	class Mesh;
+	class Texture;
 //	class ScenePrimitive;
 //	class ScenePrimitive;
 	
 	
 	/**
 	/**
@@ -58,7 +54,7 @@ namespace Polycode {
 			/*
 			/*
 			* Returns the light's intensity.
 			* Returns the light's intensity.
 			*/
 			*/
-			Number getIntensity();
+			Number getIntensity() const;
 
 
 			/**
 			/**
 			* Sets the light's intensity
 			* Sets the light's intensity
@@ -75,25 +71,25 @@ namespace Polycode {
 			*/
 			*/
 			void setAttenuation(Number constantAttenuation, Number linearAttenuation, Number quadraticAttenuation);			
 			void setAttenuation(Number constantAttenuation, Number linearAttenuation, Number quadraticAttenuation);			
 						
 						
-			Number getConstantAttenuation() { return constantAttenuation; }
-			Number getLinearAttenuation() { return linearAttenuation; }
-			Number getQuadraticAttenuation() { return quadraticAttenuation; }
+			Number getConstantAttenuation() const { return constantAttenuation; }
+			Number getLinearAttenuation() const { return linearAttenuation; }
+			Number getQuadraticAttenuation() const { return quadraticAttenuation; }
 									
 									
 			/*
 			/*
 			* Returns the light's type.
 			* Returns the light's type.
 			*/			
 			*/			
-			int getType();
+			int getType() const;
 			
 			
 			void renderDepthMap(Scene *scene);
 			void renderDepthMap(Scene *scene);
 			
 			
 			void Render();
 			void Render();
 
 
-			Matrix4 getLightViewMatrix();
+			const Matrix4& getLightViewMatrix() const;
 			
 			
 			static const int AREA_LIGHT = 0;
 			static const int AREA_LIGHT = 0;
 			static const int SPOT_LIGHT = 1;
 			static const int SPOT_LIGHT = 1;
 			
 			
-			Texture *getZBufferTexture();
+			Texture *getZBufferTexture() const;
 			
 			
 			/**
 			/**
 			* Color of the light.
 			* Color of the light.
@@ -152,8 +148,8 @@ namespace Polycode {
 				this->spotlightExponent = cosVal - (0.02*spotlightExponent);				
 				this->spotlightExponent = cosVal - (0.02*spotlightExponent);				
 			}
 			}
 			
 			
-			Number getSpotlightCutoff() { return spotlightCutoff; }
-			Number getSpotlightExponent() { return spotlightExponent; }
+			Number getSpotlightCutoff() const { return spotlightCutoff; }
+			Number getSpotlightExponent() const { return spotlightExponent; }
 						
 						
 			
 			
 			/**
 			/**
@@ -172,12 +168,12 @@ namespace Polycode {
 			/**
 			/**
 			* Returns true if shadows are enabled.
 			* Returns true if shadows are enabled.
 			*/
 			*/
-			bool areShadowsEnabled();
+			bool areShadowsEnabled() const;
 		
 		
 			/**
 			/**
 			* Returns the light type.
 			* Returns the light type.
 			*/
 			*/
-			int getLightType() { return type; }
+			int getLightType() const { return type; }
 		
 		
 			/**
 			/**
 			* If set to true, draws a wireframe primitive visualizing the light.
 			* If set to true, draws a wireframe primitive visualizing the light.
@@ -185,7 +181,7 @@ namespace Polycode {
 			void enableDebugDraw(bool val);
 			void enableDebugDraw(bool val);
 			
 			
 			void setLightImportance(int newImportance);
 			void setLightImportance(int newImportance);
-			int getLightImportance();
+			int getLightImportance() const;
 		
 		
 			SceneEntity *lightShape;
 			SceneEntity *lightShape;
 			
 			
@@ -217,4 +213,4 @@ namespace Polycode {
 			Number distance;
 			Number distance;
 			Mesh *lightMesh;
 			Mesh *lightMesh;
 	};
 	};
-}
+}

+ 3 - 8
Core/Contents/Include/PolySceneManager.h

@@ -21,15 +21,10 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyScene.h"
-#include "PolySceneRenderTexture.h"
 
 
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 	
 	
 	class Scene;
 	class Scene;
@@ -50,9 +45,9 @@ namespace Polycode {
 		
 		
 		void updateRenderTextures(Scene *scene);
 		void updateRenderTextures(Scene *scene);
 		
 		
-		vector <Scene*> scenes;
-		vector <SceneRenderTexture*> renderTextures;
+		std::vector <Scene*> scenes;
+		std::vector <SceneRenderTexture*> renderTextures;
 			
 			
 	};
 	};
 
 
-}
+}

+ 8 - 14
Core/Contents/Include/PolySceneMesh.h

@@ -21,22 +21,16 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolyMesh.h"
-#include "PolySkeleton.h"
-#include "PolyMaterial.h"
-#include "PolyImage.h"
-#include <string>
-
-using namespace std;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Material;
+	class Mesh;
 	class Texture;
 	class Texture;
 	class Skeleton;
 	class Skeleton;
+	class ShaderBinding;
 	
 	
 	/**
 	/**
 	* 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.
 	* 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.
@@ -48,7 +42,7 @@ namespace Polycode {
 			* Construct a scene mesh from a mesh file.
 			* Construct a scene mesh from a mesh file.
 			* @param fileName Path to mesh file to load.
 			* @param fileName Path to mesh file to load.
 			*/
 			*/
-			SceneMesh(String fileName);
+			SceneMesh(const String& fileName);
 			
 			
 			/**
 			/**
 			* Construct an empty scene mesh with the specified type.
 			* Construct an empty scene mesh with the specified type.
@@ -86,13 +80,13 @@ namespace Polycode {
 			* @param fileName Filename to load the mesh from.
 			* @param fileName Filename to load the mesh from.
 			* @param clamp If true, clamps the texture to edges. See Texture for details on that.
 			* @param clamp If true, clamps the texture to edges. See Texture for details on that.
 			*/
 			*/
-			void loadTexture(String fileName, bool clamp=true);
+			void loadTexture(const String& fileName, bool clamp=true);
 			
 			
 			/**
 			/**
 			* Loads a skeleton from a file and applies it to the scene mesh.
 			* Loads a skeleton from a file and applies it to the scene mesh.
 			* @param fileName Filename to load the skeleton from.
 			* @param fileName Filename to load the skeleton from.
 			*/
 			*/
-			void loadSkeleton(String fileName);
+			void loadSkeleton(const String& fileName);
 			
 			
 			/**
 			/**
 			* Sets the texture from an existing Texture instance.
 			* Sets the texture from an existing Texture instance.
@@ -110,7 +104,7 @@ namespace Polycode {
 			* 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.
 			* 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.
 			* @param materialName Name of material to apply.
 			*/									
 			*/									
-			void setMaterialByName(String materialName);
+			void setMaterialByName(const String& materialName);
 			
 			
 			/**
 			/**
 			* Set the mesh this scene mesh renders.
 			* Set the mesh this scene mesh renders.
@@ -150,4 +144,4 @@ namespace Polycode {
 			Skeleton *skeleton;
 			Skeleton *skeleton;
 			ShaderBinding *localShaderOptions;
 			ShaderBinding *localShaderOptions;
 	};
 	};
-}
+}

+ 1 - 6
Core/Contents/Include/PolyScenePrimitive.h

@@ -21,13 +21,8 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolySceneMesh.h"
 #include "PolySceneMesh.h"
-#include "PolyCoreServices.h"
-
-#include <string>
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -110,4 +105,4 @@ namespace Polycode {
 		
 		
 	};
 	};
 	
 	
-}
+}

+ 3 - 4
Core/Contents/Include/PolySceneRenderTexture.h

@@ -21,14 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyScene.h"
-#include "PolyTexture.h"
 
 
 namespace Polycode {
 namespace Polycode {
+
 	class Scene;
 	class Scene;
 	class Camera;
 	class Camera;
+	class Texture;
 	
 	
 	/**
 	/**
 	* 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.
 	* 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.
@@ -68,4 +67,4 @@ namespace Polycode {
 			Scene *targetScene;
 			Scene *targetScene;
 			Camera *targetCamera;
 			Camera *targetCamera;
 	};
 	};
-}
+}

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