Bläddra i källkod

Fixed LUA event handling

Ivan Safrin 14 år sedan
förälder
incheckning
09f0e77945
89 ändrade filer med 918 tillägg och 616 borttagningar
  1. 3 0
      .gitignore
  2. 181 163
      Bindings/Build/Mac OS X/Bindings.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  3. 5 0
      Bindings/Build/Mac OS X/Bindings.xcodeproj/xcuserdata/ivansafrin.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  4. 1 0
      Bindings/Contents/LUA/API/Polycode/BezierCurve.lua
  5. 1 0
      Bindings/Contents/LUA/API/Polycode/BezierPathTween.lua
  6. 1 0
      Bindings/Contents/LUA/API/Polycode/Bone.lua
  7. 1 0
      Bindings/Contents/LUA/API/Polycode/BoneTrack.lua
  8. 1 0
      Bindings/Contents/LUA/API/Polycode/Camera.lua
  9. 1 0
      Bindings/Contents/LUA/API/Polycode/Color.lua
  10. 1 0
      Bindings/Contents/LUA/API/Polycode/Config.lua
  11. 1 0
      Bindings/Contents/LUA/API/Polycode/CoreInput.lua
  12. 0 4
      Bindings/Contents/LUA/API/Polycode/CoreServices.lua
  13. 1 0
      Bindings/Contents/LUA/API/Polycode/Cubemap.lua
  14. 1 0
      Bindings/Contents/LUA/API/Polycode/Data.lua
  15. 1 0
      Bindings/Contents/LUA/API/Polycode/Entity.lua
  16. 1 0
      Bindings/Contents/LUA/API/Polycode/Event.lua
  17. 1 0
      Bindings/Contents/LUA/API/Polycode/EventDispatcher.lua
  18. 7 7
      Bindings/Contents/LUA/API/Polycode/EventHandler.lua
  19. 1 0
      Bindings/Contents/LUA/API/Polycode/FixedShader.lua
  20. 1 0
      Bindings/Contents/LUA/API/Polycode/FixedShaderBinding.lua
  21. 1 0
      Bindings/Contents/LUA/API/Polycode/Font.lua
  22. 1 0
      Bindings/Contents/LUA/API/Polycode/FontManager.lua
  23. 1 0
      Bindings/Contents/LUA/API/Polycode/Image.lua
  24. 1 0
      Bindings/Contents/LUA/API/Polycode/InputEvent.lua
  25. 1 0
      Bindings/Contents/LUA/API/Polycode/Label.lua
  26. 1 0
      Bindings/Contents/LUA/API/Polycode/Logger.lua
  27. 1 0
      Bindings/Contents/LUA/API/Polycode/Material.lua
  28. 1 0
      Bindings/Contents/LUA/API/Polycode/MaterialManager.lua
  29. 1 0
      Bindings/Contents/LUA/API/Polycode/Matrix4.lua
  30. 1 0
      Bindings/Contents/LUA/API/Polycode/Mesh.lua
  31. 1 0
      Bindings/Contents/LUA/API/Polycode/OSFILE.lua
  32. 1 0
      Bindings/Contents/LUA/API/Polycode/OSFileEntry.lua
  33. 1 0
      Bindings/Contents/LUA/API/Polycode/ObjectEntry.lua
  34. 1 0
      Bindings/Contents/LUA/API/Polycode/OpenGLCubemap.lua
  35. 1 0
      Bindings/Contents/LUA/API/Polycode/Particle.lua
  36. 1 0
      Bindings/Contents/LUA/API/Polycode/Perlin.lua
  37. 1 0
      Bindings/Contents/LUA/API/Polycode/PolycodeModule.lua
  38. 1 0
      Bindings/Contents/LUA/API/Polycode/Polygon.lua
  39. 1 0
      Bindings/Contents/LUA/API/Polycode/Quaternion.lua
  40. 1 0
      Bindings/Contents/LUA/API/Polycode/QuaternionCurve.lua
  41. 1 0
      Bindings/Contents/LUA/API/Polycode/QuaternionTween.lua
  42. 1 0
      Bindings/Contents/LUA/API/Polycode/Rectangle.lua
  43. 1 0
      Bindings/Contents/LUA/API/Polycode/Resource.lua
  44. 1 0
      Bindings/Contents/LUA/API/Polycode/ResourceManager.lua
  45. 1 0
      Bindings/Contents/LUA/API/Polycode/Scene.lua
  46. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneEntity.lua
  47. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneLabel.lua
  48. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneLight.lua
  49. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneLine.lua
  50. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneManager.lua
  51. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneMesh.lua
  52. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneParticleEmitter.lua
  53. 1 0
      Bindings/Contents/LUA/API/Polycode/ScenePrimitive.lua
  54. 1 0
      Bindings/Contents/LUA/API/Polycode/SceneRenderTexture.lua
  55. 1 4
      Bindings/Contents/LUA/API/Polycode/Screen.lua
  56. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenCurve.lua
  57. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenEntity.lua
  58. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenEvent.lua
  59. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenImage.lua
  60. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenLabel.lua
  61. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenLine.lua
  62. 1 4
      Bindings/Contents/LUA/API/Polycode/ScreenManager.lua
  63. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenMesh.lua
  64. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenParticleEmitter.lua
  65. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenShape.lua
  66. 1 0
      Bindings/Contents/LUA/API/Polycode/ScreenSprite.lua
  67. 1 0
      Bindings/Contents/LUA/API/Polycode/ShaderBinding.lua
  68. 1 0
      Bindings/Contents/LUA/API/Polycode/Skeleton.lua
  69. 1 0
      Bindings/Contents/LUA/API/Polycode/SkeletonAnimation.lua
  70. 1 0
      Bindings/Contents/LUA/API/Polycode/Sound.lua
  71. 1 0
      Bindings/Contents/LUA/API/Polycode/SoundManager.lua
  72. 1 0
      Bindings/Contents/LUA/API/Polycode/String.lua
  73. 1 0
      Bindings/Contents/LUA/API/Polycode/Timer.lua
  74. 1 0
      Bindings/Contents/LUA/API/Polycode/TimerManager.lua
  75. 1 4
      Bindings/Contents/LUA/API/Polycode/Tween.lua
  76. 1 0
      Bindings/Contents/LUA/API/Polycode/TweenManager.lua
  77. 1 0
      Bindings/Contents/LUA/API/Polycode/Vector2.lua
  78. 1 0
      Bindings/Contents/LUA/API/Polycode/Vector3.lua
  79. 1 0
      Bindings/Contents/LUA/API/Polycode/Vertex.lua
  80. 1 0
      Bindings/Contents/LUA/API/Polycode/VertexBuffer.lua
  81. 0 1
      Bindings/Contents/LUA/API/defaults.lua
  82. 191 113
      Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h
  83. 0 6
      Bindings/Contents/LUA/Source/PolycodeLUA.cpp
  84. BIN
      Bindings/Scripts/create_lua_library/.create_lua_library.py.swp
  85. 35 3
      Bindings/Scripts/create_lua_library/create_lua_library.py
  86. 180 175
      Core/Build/Mac OS X/PolyCore.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  87. 20 0
      LICENSE.txt
  88. 213 132
      Player/Build/Mac OS X/Polycode Player.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  89. 8 0
      README

+ 3 - 0
.gitignore

@@ -25,6 +25,9 @@ Examples
 Release
 Release
 Documentation
 Documentation
 
 
+Tools/Build/Linux/polybuild*
+Tools/Build/Linux/polyimport*
+
 # OS generated files #
 # OS generated files #
 ######################
 ######################
 .DS_Store?
 .DS_Store?

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 181 - 163
Bindings/Build/Mac OS X/Bindings.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate


+ 5 - 0
Bindings/Build/Mac OS X/Bindings.xcodeproj/xcuserdata/ivansafrin.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+   type = "1"
+   version = "1.0">
+</Bucket>

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/BezierCurve.lua

@@ -16,6 +16,7 @@ function BezierCurve:BezierCurve(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.BezierCurve(unpack(arg))
 		self.__ptr = Polycore.BezierCurve(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/BezierPathTween.lua

@@ -18,6 +18,7 @@ function BezierPathTween:BezierPathTween(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.BezierPathTween(unpack(arg))
 		self.__ptr = Polycore.BezierPathTween(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Bone.lua

@@ -30,6 +30,7 @@ function Bone:Bone(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Bone(unpack(arg))
 		self.__ptr = Polycore.Bone(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/BoneTrack.lua

@@ -16,6 +16,7 @@ function BoneTrack:BoneTrack(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.BoneTrack(unpack(arg))
 		self.__ptr = Polycore.BoneTrack(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -18,6 +18,7 @@ function Camera:Camera(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Camera(unpack(arg))
 		self.__ptr = Polycore.Camera(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Color.lua

@@ -43,6 +43,7 @@ function Color:Color(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Color(unpack(arg))
 		self.__ptr = Polycore.Color(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Config.lua

@@ -16,6 +16,7 @@ function Config:Config(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Config(unpack(arg))
 		self.__ptr = Polycore.Config(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/CoreInput.lua

@@ -21,6 +21,7 @@ function CoreInput:CoreInput(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.CoreInput(unpack(arg))
 		self.__ptr = Polycore.CoreInput(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 0 - 4
Bindings/Contents/LUA/API/Polycode/CoreServices.lua

@@ -64,10 +64,6 @@ function CoreServices:getCore()
 	end
 	end
 end
 end
 
 
-function CoreServices:handleEvent(event)
-	local retVal = Polycore.CoreServices_handleEvent(self.__ptr, event.__ptr)
-end
-
 function CoreServices:installModule(module)
 function CoreServices:installModule(module)
 	local retVal = Polycore.CoreServices_installModule(self.__ptr, module.__ptr)
 	local retVal = Polycore.CoreServices_installModule(self.__ptr, module.__ptr)
 end
 end

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Cubemap.lua

@@ -18,6 +18,7 @@ function Cubemap:Cubemap(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Cubemap(unpack(arg))
 		self.__ptr = Polycore.Cubemap(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Data.lua

@@ -16,6 +16,7 @@ function Data:Data(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Data(unpack(arg))
 		self.__ptr = Polycore.Data(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -98,6 +98,7 @@ function Entity:Entity(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Entity(unpack(arg))
 		self.__ptr = Polycore.Entity(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -18,6 +18,7 @@ function Event:Event(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Event(unpack(arg))
 		self.__ptr = Polycore.Event(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/EventDispatcher.lua

@@ -18,6 +18,7 @@ function EventDispatcher:EventDispatcher(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.EventDispatcher(unpack(arg))
 		self.__ptr = Polycore.EventDispatcher(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 7 - 7
Bindings/Contents/LUA/API/Polycode/EventHandler.lua

@@ -15,15 +15,15 @@ function EventHandler:EventHandler(...)
 		end
 		end
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
-		self.__ptr = Polycore.EventHandler(unpack(arg))
+		self.__ptr = Polycore.EventHandler(self)
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 
-function EventHandler:secondaryHandler(event)
-	local retVal = Polycore.EventHandler_secondaryHandler(self.__ptr, event.__ptr)
-end
 
 
-function EventHandler:handleEvent(event)
-	local retVal = Polycore.EventHandler_handleEvent(self.__ptr, event.__ptr)
-end
 
 
+function EventHandler:__handleEvent(event)
+	evt = Event("__skip_ptr__")
+	evt.__ptr = event
+	self:handleEvent(evt)
+end

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/FixedShader.lua

@@ -18,6 +18,7 @@ function FixedShader:FixedShader(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.FixedShader(unpack(arg))
 		self.__ptr = Polycore.FixedShader(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/FixedShaderBinding.lua

@@ -18,6 +18,7 @@ function FixedShaderBinding:FixedShaderBinding(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.FixedShaderBinding(unpack(arg))
 		self.__ptr = Polycore.FixedShaderBinding(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Font.lua

@@ -16,6 +16,7 @@ function Font:Font(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Font(unpack(arg))
 		self.__ptr = Polycore.Font(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/FontManager.lua

@@ -16,6 +16,7 @@ function FontManager:FontManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.FontManager(unpack(arg))
 		self.__ptr = Polycore.FontManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Image.lua

@@ -18,6 +18,7 @@ function Image:Image(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Image(unpack(arg))
 		self.__ptr = Polycore.Image(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/InputEvent.lua

@@ -46,6 +46,7 @@ function InputEvent:InputEvent(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.InputEvent(unpack(arg))
 		self.__ptr = Polycore.InputEvent(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Label.lua

@@ -20,6 +20,7 @@ function Label:Label(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Label(unpack(arg))
 		self.__ptr = Polycore.Label(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Logger.lua

@@ -16,6 +16,7 @@ function Logger:Logger(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Logger(unpack(arg))
 		self.__ptr = Polycore.Logger(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Material.lua

@@ -18,6 +18,7 @@ function Material:Material(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Material(unpack(arg))
 		self.__ptr = Polycore.Material(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/MaterialManager.lua

@@ -16,6 +16,7 @@ function MaterialManager:MaterialManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.MaterialManager(unpack(arg))
 		self.__ptr = Polycore.MaterialManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Matrix4.lua

@@ -16,6 +16,7 @@ function Matrix4:Matrix4(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Matrix4(unpack(arg))
 		self.__ptr = Polycore.Matrix4(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Mesh.lua

@@ -34,6 +34,7 @@ function Mesh:Mesh(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Mesh(unpack(arg))
 		self.__ptr = Polycore.Mesh(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/OSFILE.lua

@@ -30,6 +30,7 @@ function OSFILE:OSFILE(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.OSFILE(unpack(arg))
 		self.__ptr = Polycore.OSFILE(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/OSFileEntry.lua

@@ -55,6 +55,7 @@ function OSFileEntry:OSFileEntry(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.OSFileEntry(unpack(arg))
 		self.__ptr = Polycore.OSFileEntry(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -64,6 +64,7 @@ function ObjectEntry:ObjectEntry(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ObjectEntry(unpack(arg))
 		self.__ptr = Polycore.ObjectEntry(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/OpenGLCubemap.lua

@@ -18,6 +18,7 @@ function OpenGLCubemap:OpenGLCubemap(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.OpenGLCubemap(unpack(arg))
 		self.__ptr = Polycore.OpenGLCubemap(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Particle.lua

@@ -55,6 +55,7 @@ function Particle:Particle(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Particle(unpack(arg))
 		self.__ptr = Polycore.Particle(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Perlin.lua

@@ -16,6 +16,7 @@ function Perlin:Perlin(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Perlin(unpack(arg))
 		self.__ptr = Polycore.Perlin(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/PolycodeModule.lua

@@ -18,6 +18,7 @@ function PolycodeModule:PolycodeModule(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.PolycodeModule(unpack(arg))
 		self.__ptr = Polycore.PolycodeModule(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Polygon.lua

@@ -28,6 +28,7 @@ function Polygon:Polygon(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Polygon(unpack(arg))
 		self.__ptr = Polycore.Polygon(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Quaternion.lua

@@ -43,6 +43,7 @@ function Quaternion:Quaternion(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Quaternion(unpack(arg))
 		self.__ptr = Polycore.Quaternion(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/QuaternionCurve.lua

@@ -16,6 +16,7 @@ function QuaternionCurve:QuaternionCurve(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.QuaternionCurve(unpack(arg))
 		self.__ptr = Polycore.QuaternionCurve(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/QuaternionTween.lua

@@ -18,6 +18,7 @@ function QuaternionTween:QuaternionTween(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.QuaternionTween(unpack(arg))
 		self.__ptr = Polycore.QuaternionTween(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Rectangle.lua

@@ -43,6 +43,7 @@ function Rectangle:Rectangle(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Rectangle(unpack(arg))
 		self.__ptr = Polycore.Rectangle(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Resource.lua

@@ -22,6 +22,7 @@ function Resource:Resource(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Resource(unpack(arg))
 		self.__ptr = Polycore.Resource(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ResourceManager.lua

@@ -16,6 +16,7 @@ function ResourceManager:ResourceManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ResourceManager(unpack(arg))
 		self.__ptr = Polycore.ResourceManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Scene.lua

@@ -40,6 +40,7 @@ function Scene:Scene(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Scene(unpack(arg))
 		self.__ptr = Polycore.Scene(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SceneEntity.lua

@@ -18,6 +18,7 @@ function SceneEntity:SceneEntity(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneEntity(unpack(arg))
 		self.__ptr = Polycore.SceneEntity(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -18,6 +18,7 @@ function SceneLabel:SceneLabel(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneLabel(unpack(arg))
 		self.__ptr = Polycore.SceneLabel(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SceneLight.lua

@@ -20,6 +20,7 @@ function SceneLight:SceneLight(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneLight(unpack(arg))
 		self.__ptr = Polycore.SceneLight(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SceneLine.lua

@@ -18,6 +18,7 @@ function SceneLine:SceneLine(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneLine(unpack(arg))
 		self.__ptr = Polycore.SceneLine(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SceneManager.lua

@@ -16,6 +16,7 @@ function SceneManager:SceneManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneManager(unpack(arg))
 		self.__ptr = Polycore.SceneManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SceneMesh.lua

@@ -30,6 +30,7 @@ function SceneMesh:SceneMesh(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneMesh(unpack(arg))
 		self.__ptr = Polycore.SceneMesh(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SceneParticleEmitter.lua

@@ -18,6 +18,7 @@ function SceneParticleEmitter:SceneParticleEmitter(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneParticleEmitter(unpack(arg))
 		self.__ptr = Polycore.SceneParticleEmitter(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScenePrimitive.lua

@@ -21,6 +21,7 @@ function ScenePrimitive:ScenePrimitive(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScenePrimitive(unpack(arg))
 		self.__ptr = Polycore.ScenePrimitive(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SceneRenderTexture.lua

@@ -16,6 +16,7 @@ function SceneRenderTexture:SceneRenderTexture(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SceneRenderTexture(unpack(arg))
 		self.__ptr = Polycore.SceneRenderTexture(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -30,6 +30,7 @@ function Screen:Screen(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Screen(unpack(arg))
 		self.__ptr = Polycore.Screen(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 
@@ -105,10 +106,6 @@ function Screen:setScreenShader(shaderName)
 	local retVal = Polycore.Screen_setScreenShader(self.__ptr, shaderName)
 	local retVal = Polycore.Screen_setScreenShader(self.__ptr, shaderName)
 end
 end
 
 
-function Screen:handleEvent(event)
-	local retVal = Polycore.Screen_handleEvent(self.__ptr, event.__ptr)
-end
-
 function Screen:getHighestZIndex()
 function Screen:getHighestZIndex()
 	local retVal =  Polycore.Screen_getHighestZIndex(self.__ptr)
 	local retVal =  Polycore.Screen_getHighestZIndex(self.__ptr)
 	return retVal
 	return retVal

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenCurve.lua

@@ -18,6 +18,7 @@ function ScreenCurve:ScreenCurve(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenCurve(unpack(arg))
 		self.__ptr = Polycore.ScreenCurve(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenEntity.lua

@@ -47,6 +47,7 @@ function ScreenEntity:ScreenEntity(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenEntity(unpack(arg))
 		self.__ptr = Polycore.ScreenEntity(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenEvent.lua

@@ -22,6 +22,7 @@ function ScreenEvent:ScreenEvent(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenEvent(unpack(arg))
 		self.__ptr = Polycore.ScreenEvent(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenImage.lua

@@ -18,6 +18,7 @@ function ScreenImage:ScreenImage(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenImage(unpack(arg))
 		self.__ptr = Polycore.ScreenImage(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenLabel.lua

@@ -18,6 +18,7 @@ function ScreenLabel:ScreenLabel(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenLabel(unpack(arg))
 		self.__ptr = Polycore.ScreenLabel(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenLine.lua

@@ -18,6 +18,7 @@ function ScreenLine:ScreenLine(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenLine(unpack(arg))
 		self.__ptr = Polycore.ScreenLine(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 4
Bindings/Contents/LUA/API/Polycode/ScreenManager.lua

@@ -18,6 +18,7 @@ function ScreenManager:ScreenManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenManager(unpack(arg))
 		self.__ptr = Polycore.ScreenManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 
@@ -33,7 +34,3 @@ function ScreenManager:Update()
 	local retVal =  Polycore.ScreenManager_Update(self.__ptr)
 	local retVal =  Polycore.ScreenManager_Update(self.__ptr)
 end
 end
 
 
-function ScreenManager:handleEvent(event)
-	local retVal = Polycore.ScreenManager_handleEvent(self.__ptr, event.__ptr)
-end
-

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

@@ -18,6 +18,7 @@ function ScreenMesh:ScreenMesh(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenMesh(unpack(arg))
 		self.__ptr = Polycore.ScreenMesh(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenParticleEmitter.lua

@@ -18,6 +18,7 @@ function ScreenParticleEmitter:ScreenParticleEmitter(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenParticleEmitter(unpack(arg))
 		self.__ptr = Polycore.ScreenParticleEmitter(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenShape.lua

@@ -38,6 +38,7 @@ function ScreenShape:ScreenShape(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenShape(unpack(arg))
 		self.__ptr = Polycore.ScreenShape(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ScreenSprite.lua

@@ -18,6 +18,7 @@ function ScreenSprite:ScreenSprite(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ScreenSprite(unpack(arg))
 		self.__ptr = Polycore.ScreenSprite(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/ShaderBinding.lua

@@ -16,6 +16,7 @@ function ShaderBinding:ShaderBinding(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.ShaderBinding(unpack(arg))
 		self.__ptr = Polycore.ShaderBinding(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Skeleton.lua

@@ -18,6 +18,7 @@ function Skeleton:Skeleton(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Skeleton(unpack(arg))
 		self.__ptr = Polycore.Skeleton(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -16,6 +16,7 @@ function SkeletonAnimation:SkeletonAnimation(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SkeletonAnimation(unpack(arg))
 		self.__ptr = Polycore.SkeletonAnimation(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Sound.lua

@@ -16,6 +16,7 @@ function Sound:Sound(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Sound(unpack(arg))
 		self.__ptr = Polycore.Sound(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/SoundManager.lua

@@ -16,6 +16,7 @@ function SoundManager:SoundManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.SoundManager(unpack(arg))
 		self.__ptr = Polycore.SoundManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

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

@@ -17,6 +17,7 @@ function String:String(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.String(unpack(arg))
 		self.__ptr = Polycore.String(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Timer.lua

@@ -19,6 +19,7 @@ function Timer:Timer(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Timer(unpack(arg))
 		self.__ptr = Polycore.Timer(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/TimerManager.lua

@@ -16,6 +16,7 @@ function TimerManager:TimerManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.TimerManager(unpack(arg))
 		self.__ptr = Polycore.TimerManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 4
Bindings/Contents/LUA/API/Polycode/Tween.lua

@@ -55,13 +55,10 @@ function Tween:Tween(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Tween(unpack(arg))
 		self.__ptr = Polycore.Tween(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 
-function Tween:handleEvent(event)
-	local retVal = Polycore.Tween_handleEvent(self.__ptr, event.__ptr)
-end
-
 function Tween:interpolateTween()
 function Tween:interpolateTween()
 	local retVal =  Polycore.Tween_interpolateTween(self.__ptr)
 	local retVal =  Polycore.Tween_interpolateTween(self.__ptr)
 	return retVal
 	return retVal

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/TweenManager.lua

@@ -16,6 +16,7 @@ function TweenManager:TweenManager(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.TweenManager(unpack(arg))
 		self.__ptr = Polycore.TweenManager(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Vector2.lua

@@ -18,6 +18,7 @@ function Vector2:Vector2(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Vector2(unpack(arg))
 		self.__ptr = Polycore.Vector2(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Vector3.lua

@@ -38,6 +38,7 @@ function Vector3:Vector3(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Vector3(unpack(arg))
 		self.__ptr = Polycore.Vector3(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/Vertex.lua

@@ -30,6 +30,7 @@ function Vertex:Vertex(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.Vertex(unpack(arg))
 		self.__ptr = Polycore.Vertex(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 1 - 0
Bindings/Contents/LUA/API/Polycode/VertexBuffer.lua

@@ -33,6 +33,7 @@ function VertexBuffer:VertexBuffer(...)
 	end
 	end
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
 		self.__ptr = Polycore.VertexBuffer(unpack(arg))
 		self.__ptr = Polycore.VertexBuffer(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
 	end
 	end
 end
 end
 
 

+ 0 - 1
Bindings/Contents/LUA/API/defaults.lua

@@ -42,4 +42,3 @@ Services.FontManager.__ptr = Polycore.CoreServices_getFontManager(Polycore.CoreS
 function Update(e)
 function Update(e)
 end
 end
 
 
-print("OKGO!")

+ 191 - 113
Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h

@@ -11,6 +11,20 @@ extern "C" {
 #include "lualib.h"
 #include "lualib.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
 
 
+class LuaEventHandler : public EventHandler {
+public:
+	LuaEventHandler() : EventHandler() {}
+	~LuaEventHandler();
+	void handleEvent(Event *e) {
+		lua_rawgeti( L, LUA_REGISTRYINDEX, wrapperIndex );
+		lua_getfield(L, -1, "__handleEvent");
+		lua_rawgeti( L, LUA_REGISTRYINDEX, wrapperIndex );
+		lua_pushlightuserdata(L, e);
+		lua_call(L, 2, 0);
+	}
+	int wrapperIndex;
+	lua_State *L;
+};
 static int Polycore_OSFILE_get_fileType(lua_State *L) {
 static int Polycore_OSFILE_get_fileType(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	OSFILE *inst = (OSFILE*)lua_topointer(L, 1);
 	OSFILE *inst = (OSFILE*)lua_topointer(L, 1);
@@ -1388,15 +1402,6 @@ static int Polycore_CoreServices_getCore(lua_State *L) {
 	return 1;
 	return 1;
 }
 }
 
 
-static int Polycore_CoreServices_handleEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event * event = (Event *)lua_topointer(L, 2);
-	inst->handleEvent(event);
-	return 0;
-}
-
 static int Polycore_CoreServices_installModule(lua_State *L) {
 static int Polycore_CoreServices_installModule(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
 	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
@@ -2479,29 +2484,13 @@ static int Polycore_EventDispatcher_dispatchEventNoDelete(lua_State *L) {
 }
 }
 
 
 static int Polycore_EventHandler(lua_State *L) {
 static int Polycore_EventHandler(lua_State *L) {
-	EventHandler *inst = new EventHandler();
+	LuaEventHandler *inst = new LuaEventHandler();
+	inst->wrapperIndex = luaL_ref(L, LUA_REGISTRYINDEX );
+	inst->L = L;
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 	return 1;
 }
 }
 
 
-static int Polycore_EventHandler_secondaryHandler(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventHandler *inst = (EventHandler*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event * event = (Event *)lua_topointer(L, 2);
-	inst->secondaryHandler(event);
-	return 0;
-}
-
-static int Polycore_EventHandler_handleEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventHandler *inst = (EventHandler*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event * event = (Event *)lua_topointer(L, 2);
-	inst->handleEvent(event);
-	return 0;
-}
-
 static int Polycore_FixedShader(lua_State *L) {
 static int Polycore_FixedShader(lua_State *L) {
 	FixedShader *inst = new FixedShader();
 	FixedShader *inst = new FixedShader();
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
@@ -3193,10 +3182,18 @@ static int Polycore_MaterialManager_createTexture(lua_State *L) {
 	int height = lua_tointeger(L, 3);
 	int height = lua_tointeger(L, 3);
 	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
 	char * imageData = (char *)lua_topointer(L, 4);
 	char * imageData = (char *)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TBOOLEAN);
-	bool clamp = lua_toboolean(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	int type = lua_tointeger(L, 6);
+	bool clamp;
+	if(lua_isboolean(L, 5)) {
+		clamp = lua_toboolean(L, 5);
+	} else {
+		clamp = true;
+	}
+	int type;
+	if(lua_isnumber(L, 6)) {
+		type = lua_tointeger(L, 6);
+	} else {
+		type = Image :: IMAGE_RGBA;
+	}
 	lua_pushlightuserdata(L, (void*)inst->createTexture(width, height, imageData, clamp, type));
 	lua_pushlightuserdata(L, (void*)inst->createTexture(width, height, imageData, clamp, type));
 	return 1;
 	return 1;
 }
 }
@@ -3208,10 +3205,18 @@ static int Polycore_MaterialManager_createNewTexture(lua_State *L) {
 	int width = lua_tointeger(L, 2);
 	int width = lua_tointeger(L, 2);
 	luaL_checktype(L, 3, LUA_TNUMBER);
 	luaL_checktype(L, 3, LUA_TNUMBER);
 	int height = lua_tointeger(L, 3);
 	int height = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool clamp = lua_toboolean(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int type = lua_tointeger(L, 5);
+	bool clamp;
+	if(lua_isboolean(L, 4)) {
+		clamp = lua_toboolean(L, 4);
+	} else {
+		clamp = true;
+	}
+	int type;
+	if(lua_isnumber(L, 5)) {
+		type = lua_tointeger(L, 5);
+	} else {
+		type = Image :: IMAGE_RGBA;
+	}
 	lua_pushlightuserdata(L, (void*)inst->createNewTexture(width, height, clamp, type));
 	lua_pushlightuserdata(L, (void*)inst->createNewTexture(width, height, clamp, type));
 	return 1;
 	return 1;
 }
 }
@@ -3221,8 +3226,12 @@ static int Polycore_MaterialManager_createTextureFromImage(lua_State *L) {
 	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
 	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
 	Image * image = (Image *)lua_topointer(L, 2);
 	Image * image = (Image *)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool clamp = lua_toboolean(L, 3);
+	bool clamp;
+	if(lua_isboolean(L, 3)) {
+		clamp = lua_toboolean(L, 3);
+	} else {
+		clamp = true;
+	}
 	lua_pushlightuserdata(L, (void*)inst->createTextureFromImage(image, clamp));
 	lua_pushlightuserdata(L, (void*)inst->createTextureFromImage(image, clamp));
 	return 1;
 	return 1;
 }
 }
@@ -3232,8 +3241,12 @@ static int Polycore_MaterialManager_createTextureFromFile(lua_State *L) {
 	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
 	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TSTRING);
 	luaL_checktype(L, 2, LUA_TSTRING);
 	String fileName = lua_tostring(L, 2);
 	String fileName = lua_tostring(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool clamp = lua_toboolean(L, 3);
+	bool clamp;
+	if(lua_isboolean(L, 3)) {
+		clamp = lua_toboolean(L, 3);
+	} else {
+		clamp = true;
+	}
 	lua_pushlightuserdata(L, (void*)inst->createTextureFromFile(fileName, clamp));
 	lua_pushlightuserdata(L, (void*)inst->createTextureFromFile(fileName, clamp));
 	return 1;
 	return 1;
 }
 }
@@ -4524,8 +4537,12 @@ static int Polycore_Quaternion_Slerp(lua_State *L) {
 	const Quaternion & rkP = *( Quaternion *)lua_topointer(L, 3);
 	const Quaternion & rkP = *( Quaternion *)lua_topointer(L, 3);
 	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
 	const Quaternion & rkQ = *( Quaternion *)lua_topointer(L, 4);
 	const Quaternion & rkQ = *( Quaternion *)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TBOOLEAN);
-	bool shortestPath = lua_toboolean(L, 5);
+	bool shortestPath;
+	if(lua_isboolean(L, 5)) {
+		shortestPath = lua_toboolean(L, 5);
+	} else {
+		shortestPath = false;
+	}
 	 Quaternion *retInst = new  Quaternion();
 	 Quaternion *retInst = new  Quaternion();
 	*retInst = Quaternion::Slerp(fT, rkP, rkQ, shortestPath);
 	*retInst = Quaternion::Slerp(fT, rkP, rkQ, shortestPath);
 	lua_pushlightuserdata(L, retInst);
 	lua_pushlightuserdata(L, retInst);
@@ -4913,8 +4930,12 @@ static int Polycore_Renderer_createTexture(lua_State *L) {
 	char * textureData = (char *)lua_topointer(L, 4);
 	char * textureData = (char *)lua_topointer(L, 4);
 	luaL_checktype(L, 5, LUA_TBOOLEAN);
 	luaL_checktype(L, 5, LUA_TBOOLEAN);
 	bool clamp = lua_toboolean(L, 5);
 	bool clamp = lua_toboolean(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	int type = lua_tointeger(L, 6);
+	int type;
+	if(lua_isnumber(L, 6)) {
+		type = lua_tointeger(L, 6);
+	} else {
+		type = Image :: IMAGE_RGBA;
+	}
 	lua_pushlightuserdata(L, (void*)inst->createTexture(width, height, textureData, clamp, type));
 	lua_pushlightuserdata(L, (void*)inst->createTexture(width, height, textureData, clamp, type));
 	return 1;
 	return 1;
 }
 }
@@ -4986,8 +5007,12 @@ static int Polycore_Renderer_setViewportSize(lua_State *L) {
 	int w = lua_tointeger(L, 2);
 	int w = lua_tointeger(L, 2);
 	luaL_checktype(L, 3, LUA_TNUMBER);
 	luaL_checktype(L, 3, LUA_TNUMBER);
 	int h = lua_tointeger(L, 3);
 	int h = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number fov = lua_tonumber(L, 4);
+	Number fov;
+	if(lua_isnumber(L, 4)) {
+		fov = lua_tonumber(L, 4);
+	} else {
+		fov = 45.0f;
+	}
 	inst->setViewportSize(w, h, fov);
 	inst->setViewportSize(w, h, fov);
 	return 0;
 	return 0;
 }
 }
@@ -5002,10 +5027,18 @@ static int Polycore_Renderer_loadIdentity(lua_State *L) {
 static int Polycore_Renderer_setOrthoMode(lua_State *L) {
 static int Polycore_Renderer_setOrthoMode(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Renderer *inst = (Renderer*)lua_topointer(L, 1);
 	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number xSize = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number ySize = lua_tonumber(L, 3);
+	Number xSize;
+	if(lua_isnumber(L, 2)) {
+		xSize = lua_tonumber(L, 2);
+	} else {
+		xSize = 0.0f;
+	}
+	Number ySize;
+	if(lua_isnumber(L, 3)) {
+		ySize = lua_tonumber(L, 3);
+	} else {
+		ySize = 0.0f;
+	}
 	inst->setOrthoMode(xSize, ySize);
 	inst->setOrthoMode(xSize, ySize);
 	return 0;
 	return 0;
 }
 }
@@ -5706,8 +5739,12 @@ static int Polycore_ResourceManager_addDirResource(lua_State *L) {
 	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
 	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TSTRING);
 	luaL_checktype(L, 2, LUA_TSTRING);
 	String dirPath = lua_tostring(L, 2);
 	String dirPath = lua_tostring(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool recursive = lua_toboolean(L, 3);
+	bool recursive;
+	if(lua_isboolean(L, 3)) {
+		recursive = lua_toboolean(L, 3);
+	} else {
+		recursive = true;
+	}
 	inst->addDirResource(dirPath, recursive);
 	inst->addDirResource(dirPath, recursive);
 	return 0;
 	return 0;
 }
 }
@@ -6093,10 +6130,18 @@ static int Polycore_Scene_loadCollisionChild(lua_State *L) {
 	Scene *inst = (Scene*)lua_topointer(L, 1);
 	Scene *inst = (Scene*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
 	SceneEntity * entity = (SceneEntity *)lua_topointer(L, 2);
 	SceneEntity * entity = (SceneEntity *)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool autoCollide = lua_toboolean(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int type = lua_tointeger(L, 4);
+	bool autoCollide;
+	if(lua_isboolean(L, 3)) {
+		autoCollide = lua_toboolean(L, 3);
+	} else {
+		autoCollide = false;
+	}
+	int type;
+	if(lua_isnumber(L, 4)) {
+		type = lua_tointeger(L, 4);
+	} else {
+		type = 0;
+	}
 	inst->loadCollisionChild(entity, autoCollide, type);
 	inst->loadCollisionChild(entity, autoCollide, type);
 	return 0;
 	return 0;
 }
 }
@@ -6278,8 +6323,12 @@ static int Polycore_SceneLight_enableShadows(lua_State *L) {
 	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
 	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TBOOLEAN);
 	luaL_checktype(L, 2, LUA_TBOOLEAN);
 	bool val = lua_toboolean(L, 2);
 	bool val = lua_toboolean(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number resolution = lua_tonumber(L, 3);
+	Number resolution;
+	if(lua_isnumber(L, 3)) {
+		resolution = lua_tonumber(L, 3);
+	} else {
+		resolution = 256;
+	}
 	inst->enableShadows(val, resolution);
 	inst->enableShadows(val, resolution);
 	return 0;
 	return 0;
 }
 }
@@ -6434,8 +6483,12 @@ static int Polycore_SceneMesh_loadTexture(lua_State *L) {
 	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
 	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TSTRING);
 	luaL_checktype(L, 2, LUA_TSTRING);
 	String fileName = lua_tostring(L, 2);
 	String fileName = lua_tostring(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool clamp = lua_toboolean(L, 3);
+	bool clamp;
+	if(lua_isboolean(L, 3)) {
+		clamp = lua_toboolean(L, 3);
+	} else {
+		clamp = true;
+	}
 	inst->loadTexture(fileName, clamp);
 	inst->loadTexture(fileName, clamp);
 	return 0;
 	return 0;
 }
 }
@@ -6520,12 +6573,24 @@ static int Polycore_SceneMesh_cacheToVertexBuffer(lua_State *L) {
 static int Polycore_ScenePrimitive(lua_State *L) {
 static int Polycore_ScenePrimitive(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TNUMBER);
 	luaL_checktype(L, 1, LUA_TNUMBER);
 	int type = lua_tointeger(L, 1);
 	int type = lua_tointeger(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number v1 = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number v2 = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number v3 = lua_tonumber(L, 4);
+	Number v1;
+	if(lua_isnumber(L, 2)) {
+		v1 = lua_tonumber(L, 2);
+	} else {
+		v1 = 1.0f;
+	}
+	Number v2;
+	if(lua_isnumber(L, 3)) {
+		v2 = lua_tonumber(L, 3);
+	} else {
+		v2 = 1.0f;
+	}
+	Number v3;
+	if(lua_isnumber(L, 4)) {
+		v3 = lua_tonumber(L, 4);
+	} else {
+		v3 = 1.0f;
+	}
 	ScenePrimitive *inst = new ScenePrimitive(type, v1, v2, v3);
 	ScenePrimitive *inst = new ScenePrimitive(type, v1, v2, v3);
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 	return 1;
@@ -6678,8 +6743,12 @@ static int Polycore_Screen_setNormalizedCoordinates(lua_State *L) {
 	Screen *inst = (Screen*)lua_topointer(L, 1);
 	Screen *inst = (Screen*)lua_topointer(L, 1);
 	luaL_checktype(L, 2, LUA_TBOOLEAN);
 	luaL_checktype(L, 2, LUA_TBOOLEAN);
 	bool newVal = lua_toboolean(L, 2);
 	bool newVal = lua_toboolean(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number yCoordinateSize = lua_tonumber(L, 3);
+	Number yCoordinateSize;
+	if(lua_isnumber(L, 3)) {
+		yCoordinateSize = lua_tonumber(L, 3);
+	} else {
+		yCoordinateSize = 1.0f;
+	}
 	inst->setNormalizedCoordinates(newVal, yCoordinateSize);
 	inst->setNormalizedCoordinates(newVal, yCoordinateSize);
 	return 0;
 	return 0;
 }
 }
@@ -6693,15 +6762,6 @@ static int Polycore_Screen_setScreenShader(lua_State *L) {
 	return 0;
 	return 0;
 }
 }
 
 
-static int Polycore_Screen_handleEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event * event = (Event *)lua_topointer(L, 2);
-	inst->handleEvent(event);
-	return 0;
-}
-
 static int Polycore_Screen_getHighestZIndex(lua_State *L) {
 static int Polycore_Screen_getHighestZIndex(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Screen *inst = (Screen*)lua_topointer(L, 1);
 	Screen *inst = (Screen*)lua_topointer(L, 1);
@@ -7256,10 +7316,18 @@ static int Polycore_ScreenLabel(lua_State *L) {
 	String text = lua_tostring(L, 1);
 	String text = lua_tostring(L, 1);
 	luaL_checktype(L, 2, LUA_TNUMBER);
 	luaL_checktype(L, 2, LUA_TNUMBER);
 	int size = lua_tointeger(L, 2);
 	int size = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String fontName = lua_tostring(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int amode = lua_tointeger(L, 4);
+	String fontName;
+	if(lua_isstring(L, 3)) {
+		fontName = lua_tostring(L, 3);
+	} else {
+		fontName = "sans";
+	}
+	int amode;
+	if(lua_isnumber(L, 4)) {
+		amode = lua_tointeger(L, 4);
+	} else {
+		amode = 0;
+	}
 	ScreenLabel *inst = new ScreenLabel(text, size, fontName, amode);
 	ScreenLabel *inst = new ScreenLabel(text, size, fontName, amode);
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 	return 1;
@@ -7367,15 +7435,6 @@ static int Polycore_ScreenManager_Update(lua_State *L) {
 	return 0;
 	return 0;
 }
 }
 
 
-static int Polycore_ScreenManager_handleEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenManager *inst = (ScreenManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event * event = (Event *)lua_topointer(L, 2);
-	inst->handleEvent(event);
-	return 0;
-}
-
 static int Polycore_ScreenMesh(lua_State *L) {
 static int Polycore_ScreenMesh(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TSTRING);
 	luaL_checktype(L, 1, LUA_TSTRING);
 	String fileName = lua_tostring(L, 1);
 	String fileName = lua_tostring(L, 1);
@@ -7456,14 +7515,30 @@ static int Polycore_ScreenShape_set_lineSmooth(lua_State *L) {
 static int Polycore_ScreenShape(lua_State *L) {
 static int Polycore_ScreenShape(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TNUMBER);
 	luaL_checktype(L, 1, LUA_TNUMBER);
 	int shapeType = lua_tointeger(L, 1);
 	int shapeType = lua_tointeger(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number option1 = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number option2 = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number option3 = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number option4 = lua_tonumber(L, 5);
+	Number option1;
+	if(lua_isnumber(L, 2)) {
+		option1 = lua_tonumber(L, 2);
+	} else {
+		option1 = 0;
+	}
+	Number option2;
+	if(lua_isnumber(L, 3)) {
+		option2 = lua_tonumber(L, 3);
+	} else {
+		option2 = 0;
+	}
+	Number option3;
+	if(lua_isnumber(L, 4)) {
+		option3 = lua_tonumber(L, 4);
+	} else {
+		option3 = 0;
+	}
+	Number option4;
+	if(lua_isnumber(L, 5)) {
+		option4 = lua_tonumber(L, 5);
+	} else {
+		option4 = 0;
+	}
 	ScreenShape *inst = new ScreenShape(shapeType, option1, option2, option3, option4);
 	ScreenShape *inst = new ScreenShape(shapeType, option1, option2, option3, option4);
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 	return 1;
@@ -8488,22 +8563,17 @@ static int Polycore_Tween(lua_State *L) {
 	Number _endVal = lua_tonumber(L, 4);
 	Number _endVal = lua_tonumber(L, 4);
 	luaL_checktype(L, 5, LUA_TNUMBER);
 	luaL_checktype(L, 5, LUA_TNUMBER);
 	Number time = lua_tonumber(L, 5);
 	Number time = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TBOOLEAN);
-	bool _repeat = lua_toboolean(L, 6);
+	bool _repeat;
+	if(lua_isboolean(L, 6)) {
+		_repeat = lua_toboolean(L, 6);
+	} else {
+		_repeat = false;
+	}
 	Tween *inst = new Tween(target, easeType, startVal, _endVal, time, _repeat);
 	Tween *inst = new Tween(target, easeType, startVal, _endVal, time, _repeat);
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 	return 1;
 }
 }
 
 
-static int Polycore_Tween_handleEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event * event = (Event *)lua_topointer(L, 2);
-	inst->handleEvent(event);
-	return 0;
-}
-
 static int Polycore_Tween_interpolateTween(lua_State *L) {
 static int Polycore_Tween_interpolateTween(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Tween *inst = (Tween*)lua_topointer(L, 1);
 	Tween *inst = (Tween*)lua_topointer(L, 1);
@@ -8566,8 +8636,12 @@ static int Polycore_BezierPathTween(lua_State *L) {
 	int easeType = lua_tointeger(L, 3);
 	int easeType = lua_tointeger(L, 3);
 	luaL_checktype(L, 4, LUA_TNUMBER);
 	luaL_checktype(L, 4, LUA_TNUMBER);
 	Number time = lua_tonumber(L, 4);
 	Number time = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TBOOLEAN);
-	bool _repeat = lua_toboolean(L, 5);
+	bool _repeat;
+	if(lua_isboolean(L, 5)) {
+		_repeat = lua_toboolean(L, 5);
+	} else {
+		_repeat = false;
+	}
 	BezierPathTween *inst = new BezierPathTween(target, curve, easeType, time, _repeat);
 	BezierPathTween *inst = new BezierPathTween(target, curve, easeType, time, _repeat);
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 	return 1;
@@ -8595,8 +8669,12 @@ static int Polycore_QuaternionTween(lua_State *L) {
 	int easeType = lua_tointeger(L, 6);
 	int easeType = lua_tointeger(L, 6);
 	luaL_checktype(L, 7, LUA_TNUMBER);
 	luaL_checktype(L, 7, LUA_TNUMBER);
 	Number time = lua_tonumber(L, 7);
 	Number time = lua_tonumber(L, 7);
-	luaL_checktype(L, 8, LUA_TBOOLEAN);
-	bool _repeat = lua_toboolean(L, 8);
+	bool _repeat;
+	if(lua_isboolean(L, 8)) {
+		_repeat = lua_toboolean(L, 8);
+	} else {
+		_repeat = false;
+	}
 	QuaternionTween *inst = new QuaternionTween(target, wCurve, xCurve, yCurve, zCurve, easeType, time, _repeat);
 	QuaternionTween *inst = new QuaternionTween(target, wCurve, xCurve, yCurve, zCurve, easeType, time, _repeat);
 	lua_pushlightuserdata(L, (void*)inst);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 	return 1;

+ 0 - 6
Bindings/Contents/LUA/Source/PolycodeLUA.cpp

@@ -155,7 +155,6 @@ int luaopen_Polycode(lua_State *L) {
 		{"CoreServices_Update", Polycore_CoreServices_Update},
 		{"CoreServices_Update", Polycore_CoreServices_Update},
 		{"CoreServices_setCore", Polycore_CoreServices_setCore},
 		{"CoreServices_setCore", Polycore_CoreServices_setCore},
 		{"CoreServices_getCore", Polycore_CoreServices_getCore},
 		{"CoreServices_getCore", Polycore_CoreServices_getCore},
-		{"CoreServices_handleEvent", Polycore_CoreServices_handleEvent},
 		{"CoreServices_installModule", Polycore_CoreServices_installModule},
 		{"CoreServices_installModule", Polycore_CoreServices_installModule},
 		{"CoreServices_getMaterialManager", Polycore_CoreServices_getMaterialManager},
 		{"CoreServices_getMaterialManager", Polycore_CoreServices_getMaterialManager},
 		{"CoreServices_getScreenManager", Polycore_CoreServices_getScreenManager},
 		{"CoreServices_getScreenManager", Polycore_CoreServices_getScreenManager},
@@ -284,8 +283,6 @@ int luaopen_Polycode(lua_State *L) {
 		{"EventDispatcher_dispatchEvent", Polycore_EventDispatcher_dispatchEvent},
 		{"EventDispatcher_dispatchEvent", Polycore_EventDispatcher_dispatchEvent},
 		{"EventDispatcher_dispatchEventNoDelete", Polycore_EventDispatcher_dispatchEventNoDelete},
 		{"EventDispatcher_dispatchEventNoDelete", Polycore_EventDispatcher_dispatchEventNoDelete},
 		{"EventHandler", Polycore_EventHandler},
 		{"EventHandler", Polycore_EventHandler},
-		{"EventHandler_secondaryHandler", Polycore_EventHandler_secondaryHandler},
-		{"EventHandler_handleEvent", Polycore_EventHandler_handleEvent},
 		{"FixedShader", Polycore_FixedShader},
 		{"FixedShader", Polycore_FixedShader},
 		{"FixedShader_createBinding", Polycore_FixedShader_createBinding},
 		{"FixedShader_createBinding", Polycore_FixedShader_createBinding},
 		{"FixedShaderBinding", Polycore_FixedShaderBinding},
 		{"FixedShaderBinding", Polycore_FixedShaderBinding},
@@ -741,7 +738,6 @@ int luaopen_Polycode(lua_State *L) {
 		{"Screen_setRenderer", Polycore_Screen_setRenderer},
 		{"Screen_setRenderer", Polycore_Screen_setRenderer},
 		{"Screen_setNormalizedCoordinates", Polycore_Screen_setNormalizedCoordinates},
 		{"Screen_setNormalizedCoordinates", Polycore_Screen_setNormalizedCoordinates},
 		{"Screen_setScreenShader", Polycore_Screen_setScreenShader},
 		{"Screen_setScreenShader", Polycore_Screen_setScreenShader},
-		{"Screen_handleEvent", Polycore_Screen_handleEvent},
 		{"Screen_getHighestZIndex", Polycore_Screen_getHighestZIndex},
 		{"Screen_getHighestZIndex", Polycore_Screen_getHighestZIndex},
 		{"Screen_sortChildren", Polycore_Screen_sortChildren},
 		{"Screen_sortChildren", Polycore_Screen_sortChildren},
 		{"Screen_cmpZindex", Polycore_Screen_cmpZindex},
 		{"Screen_cmpZindex", Polycore_Screen_cmpZindex},
@@ -816,7 +812,6 @@ int luaopen_Polycode(lua_State *L) {
 		{"ScreenManager_removeScreen", Polycore_ScreenManager_removeScreen},
 		{"ScreenManager_removeScreen", Polycore_ScreenManager_removeScreen},
 		{"ScreenManager_addScreen", Polycore_ScreenManager_addScreen},
 		{"ScreenManager_addScreen", Polycore_ScreenManager_addScreen},
 		{"ScreenManager_Update", Polycore_ScreenManager_Update},
 		{"ScreenManager_Update", Polycore_ScreenManager_Update},
-		{"ScreenManager_handleEvent", Polycore_ScreenManager_handleEvent},
 		{"ScreenMesh", Polycore_ScreenMesh},
 		{"ScreenMesh", Polycore_ScreenMesh},
 		{"ScreenMesh_Render", Polycore_ScreenMesh_Render},
 		{"ScreenMesh_Render", Polycore_ScreenMesh_Render},
 		{"ScreenMesh_getMesh", Polycore_ScreenMesh_getMesh},
 		{"ScreenMesh_getMesh", Polycore_ScreenMesh_getMesh},
@@ -945,7 +940,6 @@ int luaopen_Polycode(lua_State *L) {
 		{"Tween_get_repeat", Polycore_Tween_get_repeat},
 		{"Tween_get_repeat", Polycore_Tween_get_repeat},
 		{"Tween_set_repeat", Polycore_Tween_set_repeat},
 		{"Tween_set_repeat", Polycore_Tween_set_repeat},
 		{"Tween", Polycore_Tween},
 		{"Tween", Polycore_Tween},
-		{"Tween_handleEvent", Polycore_Tween_handleEvent},
 		{"Tween_interpolateTween", Polycore_Tween_interpolateTween},
 		{"Tween_interpolateTween", Polycore_Tween_interpolateTween},
 		{"Tween_updateCustomTween", Polycore_Tween_updateCustomTween},
 		{"Tween_updateCustomTween", Polycore_Tween_updateCustomTween},
 		{"Tween_doOnComplete", Polycore_Tween_doOnComplete},
 		{"Tween_doOnComplete", Polycore_Tween_doOnComplete},

BIN
Bindings/Scripts/create_lua_library/.create_lua_library.py.swp


+ 35 - 3
Bindings/Scripts/create_lua_library/create_lua_library.py

@@ -23,6 +23,21 @@ 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\n"
 
 
+out += "class LuaEventHandler : public EventHandler {\n"
+out += "public:\n"
+out += "	LuaEventHandler() : EventHandler() {}\n"
+out += "	~LuaEventHandler();\n"
+out += "	void handleEvent(Event *e) {\n"
+out += "		lua_rawgeti( L, LUA_REGISTRYINDEX, wrapperIndex );\n"
+out += "		lua_getfield(L, -1, \"__handleEvent\");\n"
+out += "		lua_rawgeti( L, LUA_REGISTRYINDEX, wrapperIndex );\n"
+out += "		lua_pushlightuserdata(L, e);\n"
+out += "		lua_call(L, 2, 0);\n"
+out += "	}\n"
+out += "	int wrapperIndex;\n"
+out += "	lua_State *L;\n"
+out += "};\n"
+
 
 
 files = os.listdir("../../../Core/Contents/Include")
 files = os.listdir("../../../Core/Contents/Include")
 for fileName in files:
 for fileName in files:
@@ -53,7 +68,7 @@ for fileName in files:
 				if ckey == "OSFileEntry":
 				if ckey == "OSFileEntry":
 					print c["methods"]["public"]
 					print c["methods"]["public"]
 				parsed_methods = []
 				parsed_methods = []
-				ignore_methods = ["readByte32", "readByte16", "getCustomEntitiesByType", "Core","ParticleEmitter", "Renderer", "Shader", "Texture"]
+				ignore_methods = ["readByte32", "readByte16", "getCustomEntitiesByType", "Core","ParticleEmitter", "Renderer", "Shader", "Texture", "handleEvent", "secondaryHandler"]
 				lout += "\n\n"
 				lout += "\n\n"
 
 
 				pps = []
 				pps = []
@@ -224,7 +239,12 @@ for fileName in files:
 								idx = idx +1
 								idx = idx +1
 					
 					
 						if pm["name"] == ckey:
 						if pm["name"] == ckey:
-							out += "\t%s *inst = new %s(%s);\n" % (ckey.replace("Polygon", "Polycode::Polygon"), ckey.replace("Polygon", "Polycode::Polygon"), ", ".join(paramlist))
+							if ckey == "EventHandler":
+								out += "\tLuaEventHandler *inst = new LuaEventHandler();\n"
+								out += "\tinst->wrapperIndex = luaL_ref(L, LUA_REGISTRYINDEX );\n"
+								out += "\tinst->L = L;\n"
+							else:
+								out += "\t%s *inst = new %s(%s);\n" % (ckey.replace("Polygon", "Polycode::Polygon"), ckey.replace("Polygon", "Polycode::Polygon"), ", ".join(paramlist))
 							out += "\tlua_pushlightuserdata(L, (void*)inst);\n"
 							out += "\tlua_pushlightuserdata(L, (void*)inst);\n"
 							out += "\treturn 1;\n"
 							out += "\treturn 1;\n"
 						else:
 						else:
@@ -279,7 +299,11 @@ for fileName in files:
 							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"
 							lout += "\tif self.__ptr == nil and arg[1] ~= \"__skip_ptr__\" then\n"
-							lout += "\t\tself.__ptr = Polycore.%s(unpack(arg))\n" % (ckey)
+							if ckey == "EventHandler":
+								lout += "\t\tself.__ptr = Polycore.%s(self)\n" % (ckey)
+							else:
+								lout += "\t\tself.__ptr = Polycore.%s(unpack(arg))\n" % (ckey)
+							lout += "\t\tPolycore.__ptr_lookup[self.__ptr] = self\n"
 							lout += "\tend\n"
 							lout += "\tend\n"
 							lout += "end\n\n"
 							lout += "end\n\n"
 						else:
 						else:
@@ -310,6 +334,14 @@ for fileName in files:
 							lout += "end\n\n"
 							lout += "end\n\n"
 
 
 					parsed_methods.append(pm["name"])
 					parsed_methods.append(pm["name"])
+				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 \"Polycode/%s\"\n" % ckey
 				lfout += "require \"Polycode/%s\"\n" % ckey
 				fout = open("../../Contents/LUA/API/Polycode/%s.lua" % ckey, "w")
 				fout = open("../../Contents/LUA/API/Polycode/%s.lua" % ckey, "w")
 				fout.write(lout)
 				fout.write(lout)

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 180 - 175
Core/Build/Mac OS X/PolyCore.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate


+ 20 - 0
LICENSE.txt

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

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 213 - 132
Player/Build/Mac OS X/Polycode Player.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate


+ 8 - 0
README

@@ -0,0 +1,8 @@
+Polycode is a cross-platform framework for creative code. You can use it as a C++ API or as a standalone scripting language to get easy and simple access to accelerated 2D and 3D graphics, hardware shaders, sound and network programming, physics engines and more.
+
+The core Polycode API is written in C++ and can be used to create portable native applications.
+
+On top of the core C++ API, Polycode offers a LUA-based scripting system with its own set of compilation tools. The LUA API mirrors the C++ API and can be used to easily create prototypes and even publish complete applications to multiple platforms without compiling C++.
+
+Polycode is available under the MIT license and was designed and developed by Ivan Safrin.
+

Vissa filer visades inte eftersom för många filer har ändrats