Răsfoiți Sursa

Added default shaders, fixed GLSL shader calls, made GLSL part of core, added positional sound support.

Ivan Safrin 14 ani în urmă
părinte
comite
f4baf7df63
100 a modificat fișierele cu 14370 adăugiri și 1511 ștergeri
  1. 2 0
      .gitignore
  2. BIN
      Assets/Default asset pack/default.pak
  3. 14 17
      Assets/Default asset pack/default/DefaultShader.frag
  4. 2 1
      Assets/Default asset pack/default/DefaultShader.vert
  5. 101 0
      Assets/Default asset pack/default/DefaultShaderNoTexture.frag
  6. 11 0
      Assets/Default asset pack/default/DefaultShaderNoTexture.vert
  7. 131 0
      Assets/Default asset pack/default/DefaultShaderShadows.frag
  8. 22 0
      Assets/Default asset pack/default/DefaultShaderShadows.vert
  9. 9 0
      Assets/Default asset pack/default/DefaultShaderVertex.frag
  10. 100 0
      Assets/Default asset pack/default/DefaultShaderVertex.vert
  11. 8 0
      Assets/Default asset pack/default/DefaultShaderVertexNoTexture.frag
  12. 100 0
      Assets/Default asset pack/default/DefaultShaderVertexNoTexture.vert
  13. 8 0
      Assets/Default asset pack/default/ScreenShader.vert
  14. 49 9
      Assets/Default asset pack/default/default.mat
  15. 141 718
      Bindings/Build/Mac OS X/Bindings.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  16. 5 0
      Bindings/Contents/LUA/API/Polycode.lua
  17. 4 0
      Bindings/Contents/LUA/API/Polycode/Camera.lua
  18. 4 0
      Bindings/Contents/LUA/API/Polycode/CoreServices.lua
  19. 54 0
      Bindings/Contents/LUA/API/Polycode/GLSLProgram.lua
  20. 47 0
      Bindings/Contents/LUA/API/Polycode/GLSLShader.lua
  21. 52 0
      Bindings/Contents/LUA/API/Polycode/GLSLShaderBinding.lua
  22. 73 0
      Bindings/Contents/LUA/API/Polycode/GLSLShaderModule.lua
  23. 8 0
      Bindings/Contents/LUA/API/Polycode/Mesh.lua
  24. 28 0
      Bindings/Contents/LUA/API/Polycode/PolycodeViewBase.lua
  25. 14 2
      Bindings/Contents/LUA/API/Polycode/Renderer.lua
  26. 2 2
      Bindings/Contents/LUA/API/Polycode/Scene.lua
  27. 26 2
      Bindings/Contents/LUA/API/Polycode/SceneLight.lua
  28. 2 0
      Bindings/Contents/LUA/API/Polycode/ScenePrimitive.lua
  29. 51 0
      Bindings/Contents/LUA/API/Polycode/SceneSound.lua
  30. 40 0
      Bindings/Contents/LUA/API/Polycode/SceneSoundListener.lua
  31. 4 0
      Bindings/Contents/LUA/API/Polycode/Screen.lua
  32. 51 0
      Bindings/Contents/LUA/API/Polycode/ScreenSound.lua
  33. 40 0
      Bindings/Contents/LUA/API/Polycode/ScreenSoundListener.lua
  34. 17 0
      Bindings/Contents/LUA/API/Polycode/Shader.lua
  35. 30 2
      Bindings/Contents/LUA/API/Polycode/Sound.lua
  36. 12 0
      Bindings/Contents/LUA/API/Polycode/SoundManager.lua
  37. 170 0
      Bindings/Contents/LUA/API/Polycode/Win32Core.lua
  38. 1 1
      Bindings/Contents/LUA/Include/PolycodeLUA.h
  39. 366 17
      Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h
  40. 41 1
      Bindings/Contents/LUA/Source/PolycodeLUA.cpp
  41. 16 13
      Bindings/Scripts/create_lua_library/create_lua_library.py
  42. 40 0
      Core/Build/Mac OS X/PolyCore.xcodeproj/project.pbxproj
  43. 180 161
      Core/Build/Mac OS X/PolyCore.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  44. 5 0
      Core/Contents/Include/PolyCamera.h
  45. 1 0
      Core/Contents/Include/PolyCocoaCore.h
  46. 2 0
      Core/Contents/Include/PolyGLRenderer.h
  47. 128 0
      Core/Contents/Include/PolyGLSLProgram.h
  48. 93 0
      Core/Contents/Include/PolyGLSLShader.h
  49. 84 0
      Core/Contents/Include/PolyGLSLShaderModule.h
  50. 19 2
      Core/Contents/Include/PolyRenderer.h
  51. 1 1
      Core/Contents/Include/PolyScene.h
  52. 33 11
      Core/Contents/Include/PolySceneLight.h
  53. 60 0
      Core/Contents/Include/PolySceneSound.h
  54. 5 0
      Core/Contents/Include/PolyScreen.h
  55. 59 0
      Core/Contents/Include/PolyScreenSound.h
  56. 3 1
      Core/Contents/Include/PolyShader.h
  57. 23 1
      Core/Contents/Include/PolySound.h
  58. 11 0
      Core/Contents/Include/PolySoundManager.h
  59. 2 0
      Core/Contents/Include/Polycode.h
  60. 16 3
      Core/Contents/Source/PolyCamera.cpp
  61. 1 0
      Core/Contents/Source/PolyCocoaCore.cpp
  62. 3 0
      Core/Contents/Source/PolyCoreServices.cpp
  63. 11 1
      Core/Contents/Source/PolyGLRenderer.cpp
  64. 87 0
      Core/Contents/Source/PolyGLSLProgram.cpp
  65. 106 0
      Core/Contents/Source/PolyGLSLShader.cpp
  66. 798 0
      Core/Contents/Source/PolyGLSLShaderModule.cpp
  67. 1 0
      Core/Contents/Source/PolyGLTexture.cpp
  68. 16 1
      Core/Contents/Source/PolyMaterialManager.cpp
  69. 18 2
      Core/Contents/Source/PolyRenderer.cpp
  70. 28 19
      Core/Contents/Source/PolyScene.cpp
  71. 12 9
      Core/Contents/Source/PolySceneLight.cpp
  72. 9 3
      Core/Contents/Source/PolySceneManager.cpp
  73. 4 2
      Core/Contents/Source/PolySceneRenderTexture.cpp
  74. 73 0
      Core/Contents/Source/PolySceneSound.cpp
  75. 20 7
      Core/Contents/Source/PolyScreen.cpp
  76. 73 0
      Core/Contents/Source/PolyScreenSound.cpp
  77. 4 0
      Core/Contents/Source/PolyShader.cpp
  78. 43 3
      Core/Contents/Source/PolySound.cpp
  79. 16 0
      Core/Contents/Source/PolySoundManager.cpp
  80. 17 2
      Modules/Build/Mac OS X/Modules.xcodeproj/project.pbxproj
  81. 169 155
      Modules/Build/Mac OS X/Modules.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  82. 149 9
      Modules/Contents/2DPhysics/Include/PolyPhysicsScreen.h
  83. 16 0
      Modules/Contents/2DPhysics/Include/PolyPhysicsScreenEntity.h
  84. 12 1
      Modules/Contents/3DPhysics/Include/PolyCollisionScene.h
  85. 38 38
      Modules/Contents/CgShading/Include/PolyCGProgram.h
  86. 114 114
      Modules/Contents/CgShading/Source/PolyCGShaderModule.cpp
  87. 39 39
      Modules/Contents/GLSL/Include/PolyGLSLProgram.h
  88. 114 116
      Modules/Contents/GLSL/Source/PolyGLSLShaderModule.cpp
  89. 23 23
      Modules/Contents/UI/Source/PolyUITextInput.cpp
  90. 2 2
      Modules/Contents/UI/Source/PolyUIWindow.cpp
  91. 413 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/project.pbxproj
  92. 7 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  93. 9094 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
  94. 76 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/xcuserdata/ivansafrin.xcuserdatad/xcschemes/StandalonePlayer.xcscheme
  95. 22 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/xcuserdata/ivansafrin.xcuserdatad/xcschemes/xcschememanagement.plist
  96. 32 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayer-Info.plist
  97. 7 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayer-Prefix.pch
  98. 24 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.h
  99. 20 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.m
  100. 38 0
      Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.mm

+ 2 - 0
.gitignore

@@ -24,6 +24,8 @@
 *.lastbuildstate
 *.lib
 *.manifest
+*.zip
+*.swo
 
 Core/Build/Mac\ OS\ X/build
 IDE/Build/Mac\ OS\ X/build

BIN
Assets/Default asset pack/default.pak


+ 14 - 17
Assets/Default asset pack/default/DefaultShader.frag

@@ -76,32 +76,29 @@ void calculateLighting(in int numLights, in vec3 N, in vec3 V, in float shinines
 
     }
 }
+
+uniform sampler2D diffuse;
 varying vec3 normal;
 varying vec3 vertex;
 varying vec4 vertexColor;
+
 void main()
 {
-    // Normalize the normal. A varying variable CANNOT
-    // be modified by a fragment shader. So a new variable
-    // needs to be created.
     vec3 n = normalize(normal);
    
-    vec4 ambient  = vec4(0.0);
-    vec4 diffuse  = vec4(0.0);
-    vec4 specular = vec4(0.0);
-
-    // In this case the built in uniform gl_MaxLights is used
-    // to denote the number of lights. A better option may be passing
-    // in the number of lights as a uniform or replacing the current
-    // value with a smaller value.
-    calculateLighting(1, n, vertex, gl_FrontMaterial.shininess,
-                      ambient, diffuse, specular);
+    vec4 ambient_c  = vec4(0.0);
+    vec4 diffuse_c  = vec4(0.0);
+    vec4 specular_c = vec4(0.0);
+
+    calculateLighting(6, n, vertex, gl_FrontMaterial.shininess, ambient_c, diffuse_c, specular_c);
    
+	vec4 texColor = texture2D(diffuse, gl_TexCoord[0].st);
+    
     vec4 color = gl_FrontLightModelProduct.sceneColor  +
-                 (ambient  * 1.0) +
-                 (diffuse  * 1.0) +
-                 (specular * 0.0);
-    color = clamp(color*vertexColor, 0.0, 1.0);
+                 (ambient_c  * 1.0) +
+                 (diffuse_c  * 1.0) +
+                 (specular_c * 1.0);
+    color = clamp(color*texColor*vertexColor, 0.0, 1.0);
     color.a = vertexColor.a;
     gl_FragColor = color;
 }

+ 2 - 1
Assets/Default asset pack/default/DefaultShader.vert

@@ -3,8 +3,9 @@ varying vec3 vertex;
 varying vec4 vertexColor;
 void main()
 {
+    gl_TexCoord[0] = gl_MultiTexCoord0;		
     normal = normalize(gl_NormalMatrix * gl_Normal);   
     vertex = vec3(gl_ModelViewMatrix * gl_Vertex);     
-   vertexColor = gl_Color;
+    vertexColor = gl_Color;
     gl_Position = ftransform();
 }

+ 101 - 0
Assets/Default asset pack/default/DefaultShaderNoTexture.frag

@@ -0,0 +1,101 @@
+float calculateAttenuation(in int i, in float dist)
+{
+    return(1.0 / (gl_LightSource[i].constantAttenuation +
+                  gl_LightSource[i].linearAttenuation * dist +
+                  gl_LightSource[i].quadraticAttenuation * dist * dist));
+}
+
+void pointLight(in int i, in vec3 N, in vec3 V, in float shininess,
+                inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        vec3 E = normalize(-V);
+        vec3 R = reflect(-L, N);
+       
+        float pf = pow(max(dot(R,E), 0.0), shininess);
+
+        diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL;
+        specular += gl_LightSource[i].specular * attenuation * pf;
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void spotLight(in int i, in vec3 N, in vec3 V, in float shininess,
+               inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        float spotEffect = dot(normalize(gl_LightSource[i].spotDirection), -L);
+       
+        if (spotEffect > gl_LightSource[i].spotCosCutoff)
+        {
+            attenuation *=  pow(spotEffect, gl_LightSource[i].spotExponent);
+
+            vec3 E = normalize(-V);
+            vec3 R = reflect(-L, N);
+       
+            float pf = pow(max(dot(R,E), 0.0), shininess);
+
+            diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL;
+            specular += gl_LightSource[i].specular * attenuation * pf;
+        }
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void calculateLighting(in int numLights, in vec3 N, in vec3 V, in float shininess,
+                       inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    // Just loop through each light, and if its enabled add
+    // its contributions to the color of the pixel.
+    for (int i = 0; i < numLights; i++)
+    {
+		if (gl_LightSource[i].spotCutoff == 180.0)
+                pointLight(i, N, V, shininess, ambient, diffuse, specular);
+            else
+                 spotLight(i, N, V, shininess, ambient, diffuse, specular);
+
+    }
+}
+
+varying vec3 normal;
+varying vec3 vertex;
+varying vec4 vertexColor;
+
+void main()
+{
+    vec3 n = normalize(normal);
+   
+    vec4 ambient_c  = vec4(0.0);
+    vec4 diffuse_c  = vec4(0.0);
+    vec4 specular_c = vec4(0.0);
+
+    calculateLighting(6, n, vertex, gl_FrontMaterial.shininess, ambient_c, diffuse_c, specular_c);
+    
+    vec4 color = gl_FrontLightModelProduct.sceneColor  +
+                 (ambient_c  * 1.0) +
+                 (diffuse_c  * 1.0) +
+                 (specular_c * 1.0);
+    color = clamp(color*vertexColor, 0.0, 1.0);
+    color.a = vertexColor.a;
+    gl_FragColor = color;
+}

+ 11 - 0
Assets/Default asset pack/default/DefaultShaderNoTexture.vert

@@ -0,0 +1,11 @@
+varying vec3 normal;
+varying vec3 vertex;
+varying vec4 vertexColor;
+void main()
+{
+    gl_TexCoord[0] = gl_MultiTexCoord0;		
+    normal = normalize(gl_NormalMatrix * gl_Normal);   
+    vertex = vec3(gl_ModelViewMatrix * gl_Vertex);     
+   vertexColor = gl_Color;
+    gl_Position = gl_ProjectionMatrix * vec4(vertex, 1.0);
+}

+ 131 - 0
Assets/Default asset pack/default/DefaultShaderShadows.frag

@@ -0,0 +1,131 @@
+uniform sampler2D diffuse;
+uniform sampler2D shadowMap0;
+uniform sampler2D shadowMap1;
+varying vec3 normal;
+varying vec3 vertex;
+varying vec4 vertexColor;
+varying vec4 ShadowCoord0;
+varying vec4 ShadowCoord1;
+uniform mat4 shadowMatrix0;
+uniform mat4 shadowMatrix1;
+
+
+
+
+float calculateAttenuation(in int i, in float dist)
+{
+    return(1.0 / (gl_LightSource[i].constantAttenuation +
+                  gl_LightSource[i].linearAttenuation * dist +
+                  gl_LightSource[i].quadraticAttenuation * dist * dist));
+}
+
+void pointLight(in int i, in vec3 N, in vec3 V, in float shininess,
+                inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        vec3 E = normalize(-V);
+        vec3 R = reflect(-L, N);
+       
+        float pf = pow(max(dot(R,E), 0.0), shininess);
+
+        diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL;
+        specular += gl_LightSource[i].specular * attenuation * pf;
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void spotLight(in int i, in vec3 N, in vec3 V, in float shininess,
+               inout vec4 ambient, inout vec4 diffuse, inout vec4 specular, sampler2D shadowMap, vec4 ShadowCoord)
+{
+	
+	vec4 shadowCoordinateWdivide = ShadowCoord / ShadowCoord.w;
+	shadowCoordinateWdivide.z -= 0.000000005;
+	float distanceFromLight = texture2D(shadowMap,shadowCoordinateWdivide.st).z;
+	float shadow = 1.0;
+	if (ShadowCoord.w > 0.0)
+		shadow = distanceFromLight < shadowCoordinateWdivide.z ? 0.0 : 1.0 ;
+	
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        float spotEffect = dot(normalize(gl_LightSource[i].spotDirection), -L);
+       
+        if (spotEffect > gl_LightSource[i].spotCosCutoff)
+        {
+            attenuation *=  pow(spotEffect, gl_LightSource[i].spotExponent);
+
+            vec3 E = normalize(-V);
+            vec3 R = reflect(-L, N);
+       
+            float pf = pow(max(dot(R,E), 0.0), shininess);
+
+            diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL * shadow;
+            specular += gl_LightSource[i].specular * attenuation * pf * shadow;
+        }
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void calculateLighting(in int numLights, in vec3 N, in vec3 V, in float shininess,
+                       inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+	int spot = 0;
+    // Just loop through each light, and if its enabled add
+    // its contributions to the color of the pixel.
+    for (int i = 0; i < numLights; i++)
+    {
+		if (gl_LightSource[i].spotCutoff == 180.0)
+                pointLight(i, N, V, shininess, ambient, diffuse, specular);
+            else {
+            	if(spot == 0) {
+                 spotLight(i, N, V, shininess, ambient, diffuse, specular, shadowMap0, ShadowCoord0);            		
+                 spot = 1;
+            	} else {
+                 spotLight(i, N, V, shininess, ambient, diffuse, specular, shadowMap1, ShadowCoord1);
+            	}
+            }
+
+    }
+}
+
+
+
+void main()
+{
+  vec3 n = normalize(normal);
+   
+    vec4 ambient_c  = vec4(0.0);
+    vec4 diffuse_c  = vec4(0.0);
+    vec4 specular_c = vec4(0.0);
+
+    calculateLighting(6, n, vertex, gl_FrontMaterial.shininess, ambient_c, diffuse_c, specular_c);
+   
+	vec4 texColor = texture2D(diffuse, gl_TexCoord[0].st);
+    
+    vec4 color = gl_FrontLightModelProduct.sceneColor  +
+                 (ambient_c  * 1.0) +
+                 (diffuse_c  * 1.0) +
+                 (specular_c * 1.0);
+    color = clamp(color*texColor*vertexColor, 0.0, 1.0);
+    color.a = vertexColor.a;
+    gl_FragColor = color;
+
+}

+ 22 - 0
Assets/Default asset pack/default/DefaultShaderShadows.vert

@@ -0,0 +1,22 @@
+varying vec3 normal;
+varying vec3 vertex;
+varying vec4 vertexColor;
+varying vec4 ShadowCoord0;
+varying vec4 ShadowCoord1;
+uniform mat4 shadowMatrix0;
+uniform mat4 shadowMatrix1;
+
+void main()
+{
+    gl_TexCoord[0] = gl_MultiTexCoord0;		
+    normal = normalize(gl_NormalMatrix * gl_Normal);   
+    vec4 v = gl_ModelViewMatrix * gl_Vertex;
+    vertex = vec3(v);     
+    
+	ShadowCoord0 = shadowMatrix0 * gl_Vertex;	
+	ShadowCoord1 = shadowMatrix1 * gl_Vertex;	
+		    
+    
+    vertexColor = gl_Color;
+    gl_Position = ftransform();
+}

+ 9 - 0
Assets/Default asset pack/default/DefaultShaderVertex.frag

@@ -0,0 +1,9 @@
+uniform sampler2D diffuse;
+varying vec4 vertexColor;
+
+void main()
+{
+	vec4 texColor = texture2D(diffuse, gl_TexCoord[0].st);	
+    vec4 color = texColor*vertexColor;
+    gl_FragColor = color;
+}

+ 100 - 0
Assets/Default asset pack/default/DefaultShaderVertex.vert

@@ -0,0 +1,100 @@
+float calculateAttenuation(in int i, in float dist)
+{
+    return(1.0 / (gl_LightSource[i].constantAttenuation +
+                  gl_LightSource[i].linearAttenuation * dist +
+                  gl_LightSource[i].quadraticAttenuation * dist * dist));
+}
+
+void pointLight(in int i, in vec3 N, in vec3 V, in float shininess,
+                inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        vec3 E = normalize(-V);
+        vec3 R = reflect(-L, N);
+       
+        float pf = pow(max(dot(R,E), 0.0), shininess);
+
+        diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL;
+        specular += gl_LightSource[i].specular * attenuation * pf;
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void spotLight(in int i, in vec3 N, in vec3 V, in float shininess,
+               inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        float spotEffect = dot(normalize(gl_LightSource[i].spotDirection), -L);
+       
+        if (spotEffect > gl_LightSource[i].spotCosCutoff)
+        {
+            attenuation *=  pow(spotEffect, gl_LightSource[i].spotExponent);
+
+            vec3 E = normalize(-V);
+            vec3 R = reflect(-L, N);
+       
+            float pf = pow(max(dot(R,E), 0.0), shininess);
+
+            diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL;
+            specular += gl_LightSource[i].specular * attenuation * pf;
+        }
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void calculateLighting(in int numLights, in vec3 N, in vec3 V, in float shininess,
+                       inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    // Just loop through each light, and if its enabled add
+    // its contributions to the color of the pixel.
+    for (int i = 0; i < numLights; i++)
+    {
+		if (gl_LightSource[i].spotCutoff == 180.0)
+                pointLight(i, N, V, shininess, ambient, diffuse, specular);
+            else
+                 spotLight(i, N, V, shininess, ambient, diffuse, specular);
+
+    }
+}
+
+varying vec4 vertexColor;
+void main()
+{
+
+    gl_TexCoord[0] = gl_MultiTexCoord0;		
+    vec3 normal = normalize(gl_NormalMatrix * gl_Normal);   
+    vec3 vertex = vec3(gl_ModelViewMatrix * gl_Vertex);     
+    gl_Position = ftransform();    
+   
+    vec4 ambient_c  = vec4(0.0);
+    vec4 diffuse_c  = vec4(0.0);
+    vec4 specular_c = vec4(0.0);
+    
+    calculateLighting(6, normal, vertex, gl_FrontMaterial.shininess, ambient_c, diffuse_c, specular_c);   
+    vec4 color = gl_FrontLightModelProduct.sceneColor  +
+                 (ambient_c  * 1.0) +
+                 (diffuse_c  * 1.0) +
+                 (specular_c * 1.0);
+    color = clamp(color*gl_Color, 0.0, 1.0);
+   vertexColor = color;    
+}

+ 8 - 0
Assets/Default asset pack/default/DefaultShaderVertexNoTexture.frag

@@ -0,0 +1,8 @@
+
+varying vec4 vertexColor;
+
+void main()
+{
+    vec4 color = vertexColor;
+    gl_FragColor = color;
+}

+ 100 - 0
Assets/Default asset pack/default/DefaultShaderVertexNoTexture.vert

@@ -0,0 +1,100 @@
+float calculateAttenuation(in int i, in float dist)
+{
+    return(1.0 / (gl_LightSource[i].constantAttenuation +
+                  gl_LightSource[i].linearAttenuation * dist +
+                  gl_LightSource[i].quadraticAttenuation * dist * dist));
+}
+
+void pointLight(in int i, in vec3 N, in vec3 V, in float shininess,
+                inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        vec3 E = normalize(-V);
+        vec3 R = reflect(-L, N);
+       
+        float pf = pow(max(dot(R,E), 0.0), shininess);
+
+        diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL;
+        specular += gl_LightSource[i].specular * attenuation * pf;
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void spotLight(in int i, in vec3 N, in vec3 V, in float shininess,
+               inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    vec3 D = gl_LightSource[i].position.xyz - V;
+    vec3 L = normalize(D);
+
+    float dist = length(D);
+    float attenuation = calculateAttenuation(i, dist);
+
+    float nDotL = dot(N,L);
+
+    if (nDotL > 0.0)
+    {   
+        float spotEffect = dot(normalize(gl_LightSource[i].spotDirection), -L);
+       
+        if (spotEffect > gl_LightSource[i].spotCosCutoff)
+        {
+            attenuation *=  pow(spotEffect, gl_LightSource[i].spotExponent);
+
+            vec3 E = normalize(-V);
+            vec3 R = reflect(-L, N);
+       
+            float pf = pow(max(dot(R,E), 0.0), shininess);
+
+            diffuse  += gl_LightSource[i].diffuse  * attenuation * nDotL;
+            specular += gl_LightSource[i].specular * attenuation * pf;
+        }
+    }
+   
+    ambient  += gl_LightSource[i].ambient * attenuation;
+}
+
+void calculateLighting(in int numLights, in vec3 N, in vec3 V, in float shininess,
+                       inout vec4 ambient, inout vec4 diffuse, inout vec4 specular)
+{
+    // Just loop through each light, and if its enabled add
+    // its contributions to the color of the pixel.
+    for (int i = 0; i < numLights; i++)
+    {
+		if (gl_LightSource[i].spotCutoff == 180.0)
+                pointLight(i, N, V, shininess, ambient, diffuse, specular);
+            else
+                 spotLight(i, N, V, shininess, ambient, diffuse, specular);
+
+    }
+}
+
+varying vec4 vertexColor;
+void main()
+{
+
+    gl_TexCoord[0] = gl_MultiTexCoord0;		
+    vec3 normal = normalize(gl_NormalMatrix * gl_Normal);   
+    vec3 vertex = vec3(gl_ModelViewMatrix * gl_Vertex);     
+    gl_Position = ftransform();    
+   
+    vec4 ambient_c  = vec4(0.0);
+    vec4 diffuse_c  = vec4(0.0);
+    vec4 specular_c = vec4(0.0);
+    
+    calculateLighting(6, normal, vertex, gl_FrontMaterial.shininess, ambient_c, diffuse_c, specular_c);   
+    vec4 color = gl_FrontLightModelProduct.sceneColor  +
+                 (ambient_c  * 1.0) +
+                 (diffuse_c  * 1.0) +
+                 (specular_c * 1.0);
+    color = clamp(color*gl_Color, 0.0, 1.0);
+   vertexColor = color;    
+}

+ 8 - 0
Assets/Default asset pack/default/ScreenShader.vert

@@ -0,0 +1,8 @@
+varying vec2 vTexCoord;
+void main(void)
+{
+	gl_TexCoord[0] = gl_MultiTexCoord0;		      
+//   vec2 Pos;
+//   Pos = sign(); 
+   gl_Position = vec4(gl_Vertex.xy, 0.0, 1.0);
+}

+ 49 - 9
Assets/Default asset pack/default/default.mat

@@ -1,21 +1,61 @@
 <?xml version="1.0" ?>
-<tau>
+<polycode>	
 	<shaders>		
-		<shader type="glsl" name="DefaultShader">		
+		<shader type="glsl" name="DefaultShader" numAreaLights="4" numSpotLights="2">		
 			<vp source="DefaultShader.vert">
-				<params>
-				</params>
+				<params>			
+				</params>				
 			</vp>
 			<fp source="DefaultShader.frag">
 				<params>			
-				</params>					
+				</params>				
 			</fp>
 		</shader>	
+		<shader type="glsl" name="DefaultShaderNoTexture" numAreaLights="4" numSpotLights="2">		
+			<vp source="DefaultShaderNoTexture.vert">
+				<params>			
+				</params>				
+			</vp>
+			<fp source="DefaultShaderNoTexture.frag">
+				<params>			
+				</params>				
+			</fp>
+		</shader>		
+		<shader type="glsl" name="DefaultShaderVertex" numAreaLights="4" numSpotLights="2">		
+			<vp source="DefaultShaderVertex.vert">
+				<params>			
+				</params>				
+			</vp>
+			<fp source="DefaultShaderVertex.frag">
+				<params>			
+				</params>				
+			</fp>
+		</shader>			
+		<shader type="glsl" name="DefaultShaderVertexNoTexture" numAreaLights="4" numSpotLights="2">		
+			<vp source="DefaultShaderVertexNoTexture.vert">
+				<params>			
+				</params>				
+			</vp>
+			<fp source="DefaultShaderVertexNoTexture.frag">
+				<params>			
+				</params>				
+			</fp>
+		</shader>			
+		<shader type="glsl" name="DefaultShaderShadows" numAreaLights="4" numSpotLights="2">		
+			<vp source="DefaultShaderShadows.vert">
+				<params>			
+				</params>				
+			</vp>
+			<fp source="DefaultShaderShadows.frag">
+				<params>			
+				</params>				
+			</fp>
+		</shader>		
 	</shaders>
 	<materials>
-		<material name="default">
-			<shader name="DefaultShader">
+		<material name="Default">
+			<shader name="DefaultShaderNoTexture">
 			</shader>
-		</material>		
+		</material>			
 	</materials>
-</tau>
+</polycode>

Fișier diff suprimat deoarece este prea mare
+ 141 - 718
Bindings/Build/Mac OS X/Bindings.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate


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

@@ -6,6 +6,7 @@ require "Polycode/Bone"
 require "Polycode/Camera"
 require "Polycode/Color"
 require "Polycode/Config"
+require "Polycode/PolycodeViewBase"
 require "Polycode/Core"
 require "Polycode/CoreInput"
 require "Polycode/CoreServices"
@@ -51,6 +52,8 @@ require "Polycode/SceneManager"
 require "Polycode/SceneMesh"
 require "Polycode/ScenePrimitive"
 require "Polycode/SceneRenderTexture"
+require "Polycode/SceneSound"
+require "Polycode/SceneSoundListener"
 require "Polycode/Screen"
 require "Polycode/ScreenCurve"
 require "Polycode/ScreenEntity"
@@ -61,6 +64,8 @@ require "Polycode/ScreenLine"
 require "Polycode/ScreenManager"
 require "Polycode/ScreenMesh"
 require "Polycode/ScreenShape"
+require "Polycode/ScreenSoundListener"
+require "Polycode/ScreenSound"
 require "Polycode/ScreenSprite"
 require "Polycode/Shader"
 require "Polycode/ShaderBinding"

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

@@ -98,6 +98,10 @@ function Camera:setPostFilter(shaderName)
 	local retVal = Polycore.Camera_setPostFilter(self.__ptr, shaderName)
 end
 
+function Camera:removePostFilter()
+	local retVal =  Polycore.Camera_removePostFilter(self.__ptr)
+end
+
 
 
 function Camera:__delete()

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

@@ -19,6 +19,10 @@ function CoreServices:getInstance()
 	end
 end
 
+function CoreServices:setInstance(_instance)
+	local retVal = Polycore.CoreServices_setInstance(_instance.__ptr)
+end
+
 function CoreServices:getRenderMutex()
 	local retVal =  Polycore.CoreServices_getRenderMutex()
 	if Polycore.__ptr_lookup[retVal] ~= nil then

+ 54 - 0
Bindings/Contents/LUA/API/Polycode/GLSLProgram.lua

@@ -0,0 +1,54 @@
+require "Polycode/Resource"
+
+class "GLSLProgram" (Resource)
+
+
+
+TYPE_VERT = 0
+TYPE_FRAG = 1
+function GLSLProgram:__index__(name)
+	if name == "type" then
+		return Polycore.GLSLProgram_get_type(self.__ptr)
+	end
+end
+
+
+function GLSLProgram:__set_callback(name,value)
+	if name == "type" then
+		Polycore.GLSLProgram_set_type(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function GLSLProgram:GLSLProgram(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "Resource" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.GLSLProgram(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function GLSLProgram:addParam(name, isAuto, autoID, paramType, defaultData)
+	local retVal = Polycore.GLSLProgram_addParam(self.__ptr, name, isAuto, autoID, paramType, defaultData.__ptr)
+end
+
+
+
+function GLSLProgram:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_GLSLProgram(self.__ptr)
+end

+ 47 - 0
Bindings/Contents/LUA/API/Polycode/GLSLShader.lua

@@ -0,0 +1,47 @@
+require "Polycode/Shader"
+
+class "GLSLShader" (Shader)
+
+
+
+
+
+
+
+function GLSLShader:GLSLShader(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "Shader" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.GLSLShader(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function GLSLShader:createBinding()
+	local retVal =  Polycore.GLSLShader_createBinding(self.__ptr)
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = ShaderBinding("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
+end
+
+
+
+function GLSLShader:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_GLSLShader(self.__ptr)
+end

+ 52 - 0
Bindings/Contents/LUA/API/Polycode/GLSLShaderBinding.lua

@@ -0,0 +1,52 @@
+require "Polycode/ShaderBinding"
+
+class "GLSLShaderBinding" (ShaderBinding)
+
+
+
+
+
+
+
+function GLSLShaderBinding:GLSLShaderBinding(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "ShaderBinding" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.GLSLShaderBinding(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function GLSLShaderBinding:addTexture(name, texture)
+	local retVal = Polycore.GLSLShaderBinding_addTexture(self.__ptr, name, texture.__ptr)
+end
+
+function GLSLShaderBinding:addCubemap(name, cubemap)
+	local retVal = Polycore.GLSLShaderBinding_addCubemap(self.__ptr, name, cubemap.__ptr)
+end
+
+function GLSLShaderBinding:clearTexture(name)
+	local retVal = Polycore.GLSLShaderBinding_clearTexture(self.__ptr, name)
+end
+
+function GLSLShaderBinding:addParam(type, name, value)
+	local retVal = Polycore.GLSLShaderBinding_addParam(self.__ptr, type, name, value)
+end
+
+
+
+function GLSLShaderBinding:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_GLSLShaderBinding(self.__ptr)
+end

+ 73 - 0
Bindings/Contents/LUA/API/Polycode/GLSLShaderModule.lua

@@ -0,0 +1,73 @@
+class "GLSLShaderModule"
+
+
+
+
+
+
+
+function GLSLShaderModule:GLSLShaderModule(...)
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.GLSLShaderModule(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function GLSLShaderModule:acceptsExtension(extension)
+	local retVal = Polycore.GLSLShaderModule_acceptsExtension(self.__ptr, extension)
+	return retVal
+end
+
+function GLSLShaderModule:createProgramFromFile(extension, fullPath)
+	local retVal = Polycore.GLSLShaderModule_createProgramFromFile(self.__ptr, extension, fullPath)
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = Resource("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
+end
+
+function GLSLShaderModule:reloadPrograms()
+	local retVal =  Polycore.GLSLShaderModule_reloadPrograms(self.__ptr)
+end
+
+function GLSLShaderModule:getShaderType()
+	local retVal =  Polycore.GLSLShaderModule_getShaderType(self.__ptr)
+	return retVal
+end
+
+function GLSLShaderModule:createShader(node)
+	local retVal = Polycore.GLSLShaderModule_createShader(self.__ptr, node.__ptr)
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = Shader("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
+end
+
+function GLSLShaderModule:applyShaderMaterial(r_enderer, material, localOptions, shaderIndex)
+	local retVal = Polycore.GLSLShaderModule_applyShaderMaterial(self.__ptr, r_enderer.__ptr, material.__ptr, localOptions.__ptr, shaderIndex)
+	return retVal
+end
+
+function GLSLShaderModule:clearShader()
+	local retVal =  Polycore.GLSLShaderModule_clearShader(self.__ptr)
+end
+
+
+
+function GLSLShaderModule:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_GLSLShaderModule(self.__ptr)
+end

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

@@ -82,6 +82,14 @@ function Mesh:createSphere(radius, numRings, numSegments)
 	local retVal = Polycore.Mesh_createSphere(self.__ptr, radius, numRings, numSegments)
 end
 
+function Mesh:createCylinder(height, radius, numSegments)
+	local retVal = Polycore.Mesh_createCylinder(self.__ptr, height, radius, numSegments)
+end
+
+function Mesh:createCone(height, radius, numSegments)
+	local retVal = Polycore.Mesh_createCone(self.__ptr, height, radius, numSegments)
+end
+
 function Mesh:recenterMesh()
 	local retVal =  Polycore.Mesh_recenterMesh(self.__ptr)
 	if Polycore.__ptr_lookup[retVal] ~= nil then

+ 28 - 0
Bindings/Contents/LUA/API/Polycode/PolycodeViewBase.lua

@@ -0,0 +1,28 @@
+class "PolycodeViewBase"
+
+
+
+
+
+
+
+function PolycodeViewBase:PolycodeViewBase(...)
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.PolycodeViewBase(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+
+
+function PolycodeViewBase:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_PolycodeViewBase(self.__ptr)
+end

+ 14 - 2
Bindings/Contents/LUA/API/Polycode/Renderer.lua

@@ -335,12 +335,16 @@ function Renderer:getYRes()
 	return retVal
 end
 
+function Renderer:cullFrontFaces(val)
+	local retVal = Polycore.Renderer_cullFrontFaces(self.__ptr, val)
+end
+
 function Renderer:clearLights()
 	local retVal =  Polycore.Renderer_clearLights(self.__ptr)
 end
 
-function Renderer:addLight(position, direction, type, color, distance, intensity, textureMatrix)
-	local retVal = Polycore.Renderer_addLight(self.__ptr, position.__ptr, direction.__ptr, type, color.__ptr, distance, intensity, textureMatrix.__ptr)
+function Renderer:addLight(position, direction, type, color, constantAttenuation, linearAttenuation, quadraticAttenuation, intensity, spotlightCutoff, spotlightExponent, shadowsEnabled, textureMatrix)
+	local retVal = Polycore.Renderer_addLight(self.__ptr, position.__ptr, direction.__ptr, type, color.__ptr, constantAttenuation, linearAttenuation, quadraticAttenuation, intensity, spotlightCutoff, spotlightExponent, shadowsEnabled, textureMatrix.__ptr)
 end
 
 function Renderer:setExposureLevel(level)
@@ -356,6 +360,10 @@ function Renderer:enableShaders(flag)
 	local retVal = Polycore.Renderer_enableShaders(self.__ptr, flag)
 end
 
+function Renderer:initOSSpecific()
+	local retVal =  Polycore.Renderer_initOSSpecific(self.__ptr)
+end
+
 function Renderer:addShaderModule(module)
 	local retVal = Polycore.Renderer_addShaderModule(self.__ptr, module.__ptr)
 end
@@ -402,6 +410,10 @@ function Renderer:Unproject(x, y)
 	end
 end
 
+function Renderer:sortLights()
+	local retVal =  Polycore.Renderer_sortLights(self.__ptr)
+end
+
 function Renderer:getNumAreaLights()
 	local retVal =  Polycore.Renderer_getNumAreaLights(self.__ptr)
 	return retVal

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

@@ -130,8 +130,8 @@ function Scene:getEntityAtScreenPosition(x, y)
 	end
 end
 
-function Scene:Render()
-	local retVal =  Polycore.Scene_Render(self.__ptr)
+function Scene:Render(targetCamera)
+	local retVal = Polycore.Scene_Render(self.__ptr, targetCamera.__ptr)
 end
 
 function Scene:RenderDepthOnly(targetCamera)

+ 26 - 2
Bindings/Contents/LUA/API/Polycode/SceneLight.lua

@@ -35,8 +35,18 @@ function SceneLight:getIntensity()
 	return retVal
 end
 
-function SceneLight:getDistance()
-	local retVal =  Polycore.SceneLight_getDistance(self.__ptr)
+function SceneLight:getConstantAttenuation()
+	local retVal =  Polycore.SceneLight_getConstantAttenuation(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getLinearAttenuation()
+	local retVal =  Polycore.SceneLight_getLinearAttenuation(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getQuadraticAttenuation()
+	local retVal =  Polycore.SceneLight_getQuadraticAttenuation(self.__ptr)
 	return retVal
 end
 
@@ -79,6 +89,20 @@ function SceneLight:setLightColor(r, g, b)
 	local retVal = Polycore.SceneLight_setLightColor(self.__ptr, r, g, b)
 end
 
+function SceneLight:setSpotlightProperties(spotlightCutoff, spotlightExponent)
+	local retVal = Polycore.SceneLight_setSpotlightProperties(self.__ptr, spotlightCutoff, spotlightExponent)
+end
+
+function SceneLight:getSpotlightCutoff()
+	local retVal =  Polycore.SceneLight_getSpotlightCutoff(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getSpotlightExponent()
+	local retVal =  Polycore.SceneLight_getSpotlightExponent(self.__ptr)
+	return retVal
+end
+
 function SceneLight:enableShadows(val, resolution)
 	local retVal = Polycore.SceneLight_enableShadows(self.__ptr, val, resolution)
 end

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

@@ -7,6 +7,8 @@ class "ScenePrimitive" (SceneMesh)
 TYPE_BOX = 0
 TYPE_PLANE = 1
 TYPE_SPHERE = 2
+TYPE_CYLINDER = 3
+TYPE_CONE = 4
 
 
 

+ 51 - 0
Bindings/Contents/LUA/API/Polycode/SceneSound.lua

@@ -0,0 +1,51 @@
+require "Polycode/SceneEntity"
+
+class "SceneSound" (SceneEntity)
+
+
+
+
+
+
+
+function SceneSound:SceneSound(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "SceneEntity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneSound(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function SceneSound:Update()
+	local retVal =  Polycore.SceneSound_Update(self.__ptr)
+end
+
+function SceneSound:getSound()
+	local retVal =  Polycore.SceneSound_getSound(self.__ptr)
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = Sound("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
+end
+
+
+
+function SceneSound:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_SceneSound(self.__ptr)
+end

+ 40 - 0
Bindings/Contents/LUA/API/Polycode/SceneSoundListener.lua

@@ -0,0 +1,40 @@
+require "Polycode/SceneEntity"
+
+class "SceneSoundListener" (SceneEntity)
+
+
+
+
+
+
+
+function SceneSoundListener:SceneSoundListener(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "SceneEntity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneSoundListener(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function SceneSoundListener:Update()
+	local retVal =  Polycore.SceneSoundListener_Update(self.__ptr)
+end
+
+
+
+function SceneSoundListener:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_SceneSoundListener(self.__ptr)
+end

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

@@ -112,6 +112,10 @@ function Screen:setScreenShader(shaderName)
 	local retVal = Polycore.Screen_setScreenShader(self.__ptr, shaderName)
 end
 
+function Screen:clearScreenShader()
+	local retVal =  Polycore.Screen_clearScreenShader(self.__ptr)
+end
+
 function Screen:getHighestZIndex()
 	local retVal =  Polycore.Screen_getHighestZIndex(self.__ptr)
 	return retVal

+ 51 - 0
Bindings/Contents/LUA/API/Polycode/ScreenSound.lua

@@ -0,0 +1,51 @@
+require "Polycode/ScreenEntity"
+
+class "ScreenSound" (ScreenEntity)
+
+
+
+
+
+
+
+function ScreenSound:ScreenSound(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "ScreenEntity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ScreenSound(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function ScreenSound:Update()
+	local retVal =  Polycore.ScreenSound_Update(self.__ptr)
+end
+
+function ScreenSound:getSound()
+	local retVal =  Polycore.ScreenSound_getSound(self.__ptr)
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = Sound("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
+end
+
+
+
+function ScreenSound:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_ScreenSound(self.__ptr)
+end

+ 40 - 0
Bindings/Contents/LUA/API/Polycode/ScreenSoundListener.lua

@@ -0,0 +1,40 @@
+require "Polycode/ScreenEntity"
+
+class "ScreenSoundListener" (ScreenEntity)
+
+
+
+
+
+
+
+function ScreenSoundListener:ScreenSoundListener(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "ScreenEntity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ScreenSoundListener(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function ScreenSoundListener:Update()
+	local retVal =  Polycore.ScreenSoundListener_Update(self.__ptr)
+end
+
+
+
+function ScreenSoundListener:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_ScreenSoundListener(self.__ptr)
+end

+ 17 - 0
Bindings/Contents/LUA/API/Polycode/Shader.lua

@@ -6,8 +6,25 @@ class "Shader" (Resource)
 
 FIXED_SHADER = 0
 MODULE_SHADER = 1
+function Shader:__index__(name)
+	if name == "numSpotLights" then
+		return Polycore.Shader_get_numSpotLights(self.__ptr)
+	elseif name == "numAreaLights" then
+		return Polycore.Shader_get_numAreaLights(self.__ptr)
+	end
+end
 
 
+function Shader:__set_callback(name,value)
+	if name == "numSpotLights" then
+		Polycore.Shader_set_numSpotLights(self.__ptr, value)
+		return true
+	elseif name == "numAreaLights" then
+		Polycore.Shader_set_numAreaLights(self.__ptr, value)
+		return true
+	end
+	return false
+end
 
 
 function Shader:getType()

+ 30 - 2
Bindings/Contents/LUA/API/Polycode/Sound.lua

@@ -20,14 +20,42 @@ function Sound:Sound(...)
 	end
 end
 
-function Sound:Play(once)
-	local retVal = Polycore.Sound_Play(self.__ptr, once)
+function Sound:Play(loop)
+	local retVal = Polycore.Sound_Play(self.__ptr, loop)
 end
 
 function Sound:Stop()
 	local retVal =  Polycore.Sound_Stop(self.__ptr)
 end
 
+function Sound:setVolume(newVolume)
+	local retVal = Polycore.Sound_setVolume(self.__ptr, newVolume)
+end
+
+function Sound:setPitch(newPitch)
+	local retVal = Polycore.Sound_setPitch(self.__ptr, newPitch)
+end
+
+function Sound:setIsPositional(isPositional)
+	local retVal = Polycore.Sound_setIsPositional(self.__ptr, isPositional)
+end
+
+function Sound:setSoundPosition(position)
+	local retVal = Polycore.Sound_setSoundPosition(self.__ptr, position.__ptr)
+end
+
+function Sound:setSoundVelocity(velocity)
+	local retVal = Polycore.Sound_setSoundVelocity(self.__ptr, velocity.__ptr)
+end
+
+function Sound:setSoundDirection(direction)
+	local retVal = Polycore.Sound_setSoundDirection(self.__ptr, direction.__ptr)
+end
+
+function Sound:setPositionalProperties(referenceDistance, maxDistance)
+	local retVal = Polycore.Sound_setPositionalProperties(self.__ptr, referenceDistance, maxDistance)
+end
+
 function Sound:loadWAV(fileName)
 	local retVal = Polycore.Sound_loadWAV(self.__ptr, fileName)
 	if Polycore.__ptr_lookup[retVal] ~= nil then

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

@@ -20,10 +20,22 @@ function SoundManager:SoundManager(...)
 	end
 end
 
+function SoundManager:setListenerPosition(position)
+	local retVal = Polycore.SoundManager_setListenerPosition(self.__ptr, position.__ptr)
+end
+
+function SoundManager:setListenerOrientation(orientation)
+	local retVal = Polycore.SoundManager_setListenerOrientation(self.__ptr, orientation.__ptr)
+end
+
 function SoundManager:initAL()
 	local retVal =  Polycore.SoundManager_initAL(self.__ptr)
 end
 
+function SoundManager:setGlobalVolume(globalVolume)
+	local retVal = Polycore.SoundManager_setGlobalVolume(self.__ptr, globalVolume)
+end
+
 
 
 function SoundManager:__delete()

+ 170 - 0
Bindings/Contents/LUA/API/Polycode/Win32Core.lua

@@ -0,0 +1,170 @@
+require "Polycode/Core"
+
+class "Win32Core" (Core)
+
+
+
+
+
+
+
+function Win32Core:Win32Core(...)
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1]:class() == "Core" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Win32Core(unpack(arg))
+		Polycore.__ptr_lookup[self.__ptr] = self
+	end
+end
+
+function Win32Core:enableMouse(newval)
+	local retVal = Polycore.Win32Core_enableMouse(self.__ptr, newval)
+end
+
+function Win32Core:getTicks()
+	local retVal =  Polycore.Win32Core_getTicks(self.__ptr)
+	return retVal
+end
+
+function Win32Core:Update()
+	local retVal =  Polycore.Win32Core_Update(self.__ptr)
+	return retVal
+end
+
+function Win32Core:handleKeyDown(lParam, wParam)
+	local retVal = Polycore.Win32Core_handleKeyDown(self.__ptr, lParam.__ptr, wParam.__ptr)
+end
+
+function Win32Core:handleKeyUp(lParam, wParam)
+	local retVal = Polycore.Win32Core_handleKeyUp(self.__ptr, lParam.__ptr, wParam.__ptr)
+end
+
+function Win32Core:handleMouseMove(lParam, wParam)
+	local retVal = Polycore.Win32Core_handleMouseMove(self.__ptr, lParam.__ptr, wParam.__ptr)
+end
+
+function Win32Core:handleMouseWheel(lParam, wParam)
+	local retVal = Polycore.Win32Core_handleMouseWheel(self.__ptr, lParam.__ptr, wParam.__ptr)
+end
+
+function Win32Core:handleMouseDown(mouseCode, lParam, wParam)
+	local retVal = Polycore.Win32Core_handleMouseDown(self.__ptr, mouseCode, lParam.__ptr, wParam.__ptr)
+end
+
+function Win32Core:handleMouseUp(mouseCode, lParam, wParam)
+	local retVal = Polycore.Win32Core_handleMouseUp(self.__ptr, mouseCode, lParam.__ptr, wParam.__ptr)
+end
+
+function Win32Core:setVideoMode(xRes, yRes, fullScreen, aaLevel)
+	local retVal = Polycore.Win32Core_setVideoMode(self.__ptr, xRes, yRes, fullScreen, aaLevel)
+end
+
+function Win32Core:initContext(usePixelFormat, pixelFormat)
+	local retVal = Polycore.Win32Core_initContext(self.__ptr, usePixelFormat, pixelFormat)
+end
+
+function Win32Core:destroyContext()
+	local retVal =  Polycore.Win32Core_destroyContext(self.__ptr)
+end
+
+function Win32Core:createThread(target)
+	local retVal = Polycore.Win32Core_createThread(self.__ptr, target.__ptr)
+end
+
+function Win32Core:mapKey(lParam, wParam)
+	local retVal = Polycore.Win32Core_mapKey(self.__ptr, lParam.__ptr, wParam.__ptr)
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = PolyKEY("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
+end
+
+function Win32Core:lockMutex(mutex)
+	local retVal = Polycore.Win32Core_lockMutex(self.__ptr, mutex.__ptr)
+end
+
+function Win32Core:unlockMutex(mutex)
+	local retVal = Polycore.Win32Core_unlockMutex(self.__ptr, mutex.__ptr)
+end
+
+function Win32Core:createMutex()
+	local retVal =  Polycore.Win32Core_createMutex(self.__ptr)
+	if Polycore.__ptr_lookup[retVal] ~= nil then
+		return Polycore.__ptr_lookup[retVal]
+	else
+		Polycore.__ptr_lookup[retVal] = CoreMutex("__skip_ptr__")
+		Polycore.__ptr_lookup[retVal].__ptr = retVal
+		return Polycore.__ptr_lookup[retVal]
+	end
+end
+
+function Win32Core:checkEvents()
+	local retVal =  Polycore.Win32Core_checkEvents(self.__ptr)
+end
+
+function Win32Core:initKeymap()
+	local retVal =  Polycore.Win32Core_initKeymap(self.__ptr)
+end
+
+function Win32Core:platformSleep(msecs)
+	local retVal = Polycore.Win32Core_platformSleep(self.__ptr, msecs)
+end
+
+function Win32Core:setCursor(cursorType)
+	local retVal = Polycore.Win32Core_setCursor(self.__ptr, cursorType)
+end
+
+function Win32Core:copyStringToClipboard(str)
+	local retVal = Polycore.Win32Core_copyStringToClipboard(self.__ptr, str)
+end
+
+function Win32Core:getClipboardString()
+	local retVal =  Polycore.Win32Core_getClipboardString(self.__ptr)
+	return retVal
+end
+
+function Win32Core:createFolder(folderPath)
+	local retVal = Polycore.Win32Core_createFolder(self.__ptr, folderPath)
+end
+
+function Win32Core:copyDiskItem(itemPath, destItemPath)
+	local retVal = Polycore.Win32Core_copyDiskItem(self.__ptr, itemPath, destItemPath)
+end
+
+function Win32Core:moveDiskItem(itemPath, destItemPath)
+	local retVal = Polycore.Win32Core_moveDiskItem(self.__ptr, itemPath, destItemPath)
+end
+
+function Win32Core:openFolderPicker()
+	local retVal =  Polycore.Win32Core_openFolderPicker(self.__ptr)
+	return retVal
+end
+
+function Win32Core:removeDiskItem(itemPath)
+	local retVal = Polycore.Win32Core_removeDiskItem(self.__ptr, itemPath)
+end
+
+function Win32Core:resizeTo(xRes, yRes)
+	local retVal = Polycore.Win32Core_resizeTo(self.__ptr, xRes, yRes)
+end
+
+
+
+function Win32Core:__delete()
+	Polycore.__ptr_lookup[self.__ptr] = nil
+	Polycore.delete_Win32Core(self.__ptr)
+end

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

@@ -6,5 +6,5 @@ extern "C" {
 #include "lua.h"
 #include "lualib.h"
 #include "lauxlib.h"
-int luaopen_Polycode(lua_State *L);
+int _PolyExport luaopen_Polycode(lua_State *L);
 }

+ 366 - 17
Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h

@@ -743,6 +743,13 @@ static int Polycore_Camera_setPostFilter(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_Camera_removePostFilter(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Camera *inst = (Camera*)lua_topointer(L, 1);
+	inst->removePostFilter();
+	return 0;
+}
+
 static int Polycore_delete_Camera(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Camera *inst = (Camera*)lua_topointer(L, 1);
@@ -1012,6 +1019,19 @@ static int Polycore_delete_Config(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_PolycodeViewBase(lua_State *L) {
+	PolycodeViewBase *inst = new PolycodeViewBase();
+	lua_pushlightuserdata(L, (void*)inst);
+	return 1;
+}
+
+static int Polycore_delete_PolycodeViewBase(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	PolycodeViewBase *inst = (PolycodeViewBase*)lua_topointer(L, 1);
+	delete inst;
+	return 0;
+}
+
 static int Polycore_Core_Update(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Core *inst = (Core*)lua_topointer(L, 1);
@@ -5836,6 +5856,15 @@ static int Polycore_Renderer_getYRes(lua_State *L) {
 	return 1;
 }
 
+static int Polycore_Renderer_cullFrontFaces(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Renderer *inst = (Renderer*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TBOOLEAN);
+	bool val = lua_toboolean(L, 2);
+	inst->cullFrontFaces(val);
+	return 0;
+}
+
 static int Polycore_Renderer_clearLights(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Renderer *inst = (Renderer*)lua_topointer(L, 1);
@@ -5855,12 +5884,22 @@ static int Polycore_Renderer_addLight(lua_State *L) {
 	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
 	Color color = *(Color*)lua_topointer(L, 5);
 	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number distance = lua_tonumber(L, 6);
+	Number constantAttenuation = lua_tonumber(L, 6);
 	luaL_checktype(L, 7, LUA_TNUMBER);
-	Number intensity = lua_tonumber(L, 7);
-	luaL_checktype(L, 8, LUA_TLIGHTUSERDATA);
-	Matrix4 * textureMatrix = (Matrix4 *)lua_topointer(L, 8);
-	inst->addLight(position, direction, type, color, distance, intensity, textureMatrix);
+	Number linearAttenuation = lua_tonumber(L, 7);
+	luaL_checktype(L, 8, LUA_TNUMBER);
+	Number quadraticAttenuation = lua_tonumber(L, 8);
+	luaL_checktype(L, 9, LUA_TNUMBER);
+	Number intensity = lua_tonumber(L, 9);
+	luaL_checktype(L, 10, LUA_TNUMBER);
+	Number spotlightCutoff = lua_tonumber(L, 10);
+	luaL_checktype(L, 11, LUA_TNUMBER);
+	Number spotlightExponent = lua_tonumber(L, 11);
+	luaL_checktype(L, 12, LUA_TBOOLEAN);
+	bool shadowsEnabled = lua_toboolean(L, 12);
+	luaL_checktype(L, 13, LUA_TLIGHTUSERDATA);
+	Matrix4 * textureMatrix = (Matrix4 *)lua_topointer(L, 13);
+	inst->addLight(position, direction, type, color, constantAttenuation, linearAttenuation, quadraticAttenuation, intensity, spotlightCutoff, spotlightExponent, shadowsEnabled, textureMatrix);
 	return 0;
 }
 
@@ -5901,6 +5940,13 @@ static int Polycore_Renderer_enableShaders(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_Renderer_initOSSpecific(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Renderer *inst = (Renderer*)lua_topointer(L, 1);
+	inst->initOSSpecific();
+	return 0;
+}
+
 static int Polycore_Renderer_addShaderModule(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Renderer *inst = (Renderer*)lua_topointer(L, 1);
@@ -5967,6 +6013,13 @@ static int Polycore_Renderer_Unproject(lua_State *L) {
 	return 1;
 }
 
+static int Polycore_Renderer_sortLights(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Renderer *inst = (Renderer*)lua_topointer(L, 1);
+	inst->sortLights();
+	return 0;
+}
+
 static int Polycore_Renderer_getNumAreaLights(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Renderer *inst = (Renderer*)lua_topointer(L, 1);
@@ -6355,7 +6408,9 @@ static int Polycore_Scene_getEntityAtScreenPosition(lua_State *L) {
 static int Polycore_Scene_Render(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Scene *inst = (Scene*)lua_topointer(L, 1);
-	inst->Render();
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	Camera * targetCamera = (Camera *)lua_topointer(L, 2);
+	inst->Render(targetCamera);
 	return 0;
 }
 
@@ -6599,13 +6654,29 @@ static int Polycore_delete_SceneLabel(lua_State *L) {
 static int Polycore_SceneLight(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TNUMBER);
 	int type = lua_tointeger(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number intensity = lua_tonumber(L, 2);
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	Scene * parentScene = (Scene *)lua_topointer(L, 2);
 	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number distance = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Scene * parentScene = (Scene *)lua_topointer(L, 4);
-	SceneLight *inst = new SceneLight(type, intensity, distance, parentScene);
+	Number intensity = lua_tonumber(L, 3);
+	Number constantAttenuation;
+	if(lua_isnumber(L, 4)) {
+		constantAttenuation = lua_tonumber(L, 4);
+	} else {
+		constantAttenuation = 1;
+	}
+	Number linearAttenuation;
+	if(lua_isnumber(L, 5)) {
+		linearAttenuation = lua_tonumber(L, 5);
+	} else {
+		linearAttenuation = 1;
+	}
+	Number quadraticAttenuation;
+	if(lua_isnumber(L, 6)) {
+		quadraticAttenuation = lua_tonumber(L, 6);
+	} else {
+		quadraticAttenuation = 1;
+	}
+	SceneLight *inst = new SceneLight(type, parentScene, intensity, constantAttenuation, linearAttenuation, quadraticAttenuation);
 	lua_pushlightuserdata(L, (void*)inst);
 	return 1;
 }
@@ -6617,10 +6688,24 @@ static int Polycore_SceneLight_getIntensity(lua_State *L) {
 	return 1;
 }
 
-static int Polycore_SceneLight_getDistance(lua_State *L) {
+static int Polycore_SceneLight_getConstantAttenuation(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getDistance());
+	lua_pushnumber(L, inst->getConstantAttenuation());
+	return 1;
+}
+
+static int Polycore_SceneLight_getLinearAttenuation(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
+	lua_pushnumber(L, inst->getLinearAttenuation());
+	return 1;
+}
+
+static int Polycore_SceneLight_getQuadraticAttenuation(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
+	lua_pushnumber(L, inst->getQuadraticAttenuation());
 	return 1;
 }
 
@@ -6676,6 +6761,31 @@ static int Polycore_SceneLight_setLightColor(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_SceneLight_setSpotlightProperties(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TNUMBER);
+	Number spotlightCutoff = lua_tonumber(L, 2);
+	luaL_checktype(L, 3, LUA_TNUMBER);
+	Number spotlightExponent = lua_tonumber(L, 3);
+	inst->setSpotlightProperties(spotlightCutoff, spotlightExponent);
+	return 0;
+}
+
+static int Polycore_SceneLight_getSpotlightCutoff(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
+	lua_pushnumber(L, inst->getSpotlightCutoff());
+	return 1;
+}
+
+static int Polycore_SceneLight_getSpotlightExponent(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
+	lua_pushnumber(L, inst->getSpotlightExponent());
+	return 1;
+}
+
 static int Polycore_SceneLight_enableShadows(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
@@ -7038,6 +7148,59 @@ static int Polycore_delete_SceneRenderTexture(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_SceneSound(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TSTRING);
+	String fileName = String(lua_tostring(L, 1));
+	luaL_checktype(L, 2, LUA_TNUMBER);
+	Number referenceDistance = lua_tonumber(L, 2);
+	luaL_checktype(L, 3, LUA_TNUMBER);
+	Number maxDistance = lua_tonumber(L, 3);
+	SceneSound *inst = new SceneSound(fileName, referenceDistance, maxDistance);
+	lua_pushlightuserdata(L, (void*)inst);
+	return 1;
+}
+
+static int Polycore_SceneSound_Update(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneSound *inst = (SceneSound*)lua_topointer(L, 1);
+	inst->Update();
+	return 0;
+}
+
+static int Polycore_SceneSound_getSound(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneSound *inst = (SceneSound*)lua_topointer(L, 1);
+	lua_pushlightuserdata(L, (void*)inst->getSound());
+	return 1;
+}
+
+static int Polycore_delete_SceneSound(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneSound *inst = (SceneSound*)lua_topointer(L, 1);
+	delete inst;
+	return 0;
+}
+
+static int Polycore_SceneSoundListener(lua_State *L) {
+	SceneSoundListener *inst = new SceneSoundListener();
+	lua_pushlightuserdata(L, (void*)inst);
+	return 1;
+}
+
+static int Polycore_SceneSoundListener_Update(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneSoundListener *inst = (SceneSoundListener*)lua_topointer(L, 1);
+	inst->Update();
+	return 0;
+}
+
+static int Polycore_delete_SceneSoundListener(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SceneSoundListener *inst = (SceneSoundListener*)lua_topointer(L, 1);
+	delete inst;
+	return 0;
+}
+
 static int Polycore_Screen_get_enabled(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Screen *inst = (Screen*)lua_topointer(L, 1);
@@ -7162,6 +7325,13 @@ static int Polycore_Screen_setScreenShader(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_Screen_clearScreenShader(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Screen *inst = (Screen*)lua_topointer(L, 1);
+	inst->clearScreenShader();
+	return 0;
+}
+
 static int Polycore_Screen_getHighestZIndex(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Screen *inst = (Screen*)lua_topointer(L, 1);
@@ -8097,6 +8267,59 @@ static int Polycore_delete_ScreenShape(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_ScreenSoundListener(lua_State *L) {
+	ScreenSoundListener *inst = new ScreenSoundListener();
+	lua_pushlightuserdata(L, (void*)inst);
+	return 1;
+}
+
+static int Polycore_ScreenSoundListener_Update(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	ScreenSoundListener *inst = (ScreenSoundListener*)lua_topointer(L, 1);
+	inst->Update();
+	return 0;
+}
+
+static int Polycore_delete_ScreenSoundListener(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	ScreenSoundListener *inst = (ScreenSoundListener*)lua_topointer(L, 1);
+	delete inst;
+	return 0;
+}
+
+static int Polycore_ScreenSound(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TSTRING);
+	String fileName = String(lua_tostring(L, 1));
+	luaL_checktype(L, 2, LUA_TNUMBER);
+	Number referenceDistance = lua_tonumber(L, 2);
+	luaL_checktype(L, 3, LUA_TNUMBER);
+	Number maxDistance = lua_tonumber(L, 3);
+	ScreenSound *inst = new ScreenSound(fileName, referenceDistance, maxDistance);
+	lua_pushlightuserdata(L, (void*)inst);
+	return 1;
+}
+
+static int Polycore_ScreenSound_Update(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	ScreenSound *inst = (ScreenSound*)lua_topointer(L, 1);
+	inst->Update();
+	return 0;
+}
+
+static int Polycore_ScreenSound_getSound(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	ScreenSound *inst = (ScreenSound*)lua_topointer(L, 1);
+	lua_pushlightuserdata(L, (void*)inst->getSound());
+	return 1;
+}
+
+static int Polycore_delete_ScreenSound(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	ScreenSound *inst = (ScreenSound*)lua_topointer(L, 1);
+	delete inst;
+	return 0;
+}
+
 static int Polycore_ScreenSprite(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TSTRING);
 	String fileName = String(lua_tostring(L, 1));
@@ -8149,6 +8372,36 @@ static int Polycore_delete_ScreenSprite(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_Shader_get_numSpotLights(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Shader *inst = (Shader*)lua_topointer(L, 1);
+	lua_pushinteger(L, inst->numSpotLights);
+	return 1;
+}
+
+static int Polycore_Shader_get_numAreaLights(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Shader *inst = (Shader*)lua_topointer(L, 1);
+	lua_pushinteger(L, inst->numAreaLights);
+	return 1;
+}
+
+static int Polycore_Shader_set_numSpotLights(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Shader *inst = (Shader*)lua_topointer(L, 1);
+	int param = lua_tointeger(L, 2);
+	inst->numSpotLights = param;
+	return 0;
+}
+
+static int Polycore_Shader_set_numAreaLights(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Shader *inst = (Shader*)lua_topointer(L, 1);
+	int param = lua_tointeger(L, 2);
+	inst->numAreaLights = param;
+	return 0;
+}
+
 static int Polycore_Shader_getType(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Shader *inst = (Shader*)lua_topointer(L, 1);
@@ -8573,9 +8826,13 @@ static int Polycore_Sound(lua_State *L) {
 static int Polycore_Sound_Play(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool once = lua_toboolean(L, 2);
-	inst->Play(once);
+	bool loop;
+	if(lua_isboolean(L, 2)) {
+		loop = lua_toboolean(L, 2);
+	} else {
+		loop = false;
+	}
+	inst->Play(loop);
 	return 0;
 }
 
@@ -8586,6 +8843,71 @@ static int Polycore_Sound_Stop(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_Sound_setVolume(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Sound *inst = (Sound*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TNUMBER);
+	Number newVolume = lua_tonumber(L, 2);
+	inst->setVolume(newVolume);
+	return 0;
+}
+
+static int Polycore_Sound_setPitch(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Sound *inst = (Sound*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TNUMBER);
+	Number newPitch = lua_tonumber(L, 2);
+	inst->setPitch(newPitch);
+	return 0;
+}
+
+static int Polycore_Sound_setIsPositional(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Sound *inst = (Sound*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TBOOLEAN);
+	bool isPositional = lua_toboolean(L, 2);
+	inst->setIsPositional(isPositional);
+	return 0;
+}
+
+static int Polycore_Sound_setSoundPosition(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Sound *inst = (Sound*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	Vector3 position = *(Vector3*)lua_topointer(L, 2);
+	inst->setSoundPosition(position);
+	return 0;
+}
+
+static int Polycore_Sound_setSoundVelocity(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Sound *inst = (Sound*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	Vector3 velocity = *(Vector3*)lua_topointer(L, 2);
+	inst->setSoundVelocity(velocity);
+	return 0;
+}
+
+static int Polycore_Sound_setSoundDirection(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Sound *inst = (Sound*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	Vector3 direction = *(Vector3*)lua_topointer(L, 2);
+	inst->setSoundDirection(direction);
+	return 0;
+}
+
+static int Polycore_Sound_setPositionalProperties(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	Sound *inst = (Sound*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TNUMBER);
+	Number referenceDistance = lua_tonumber(L, 2);
+	luaL_checktype(L, 3, LUA_TNUMBER);
+	Number maxDistance = lua_tonumber(L, 3);
+	inst->setPositionalProperties(referenceDistance, maxDistance);
+	return 0;
+}
+
 static int Polycore_Sound_loadWAV(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	Sound *inst = (Sound*)lua_topointer(L, 1);
@@ -8661,6 +8983,24 @@ static int Polycore_SoundManager(lua_State *L) {
 	return 1;
 }
 
+static int Polycore_SoundManager_setListenerPosition(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	Vector3 position = *(Vector3*)lua_topointer(L, 2);
+	inst->setListenerPosition(position);
+	return 0;
+}
+
+static int Polycore_SoundManager_setListenerOrientation(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	Vector3 orientation = *(Vector3*)lua_topointer(L, 2);
+	inst->setListenerOrientation(orientation);
+	return 0;
+}
+
 static int Polycore_SoundManager_initAL(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
@@ -8668,6 +9008,15 @@ static int Polycore_SoundManager_initAL(lua_State *L) {
 	return 0;
 }
 
+static int Polycore_SoundManager_setGlobalVolume(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TNUMBER);
+	Number globalVolume = lua_tonumber(L, 2);
+	inst->setGlobalVolume(globalVolume);
+	return 0;
+}
+
 static int Polycore_delete_SoundManager(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);

+ 41 - 1
Bindings/Contents/LUA/Source/PolycodeLUA.cpp

@@ -83,6 +83,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"Camera_getExposureLevel", Polycore_Camera_getExposureLevel},
 		{"Camera_createPostFilter", Polycore_Camera_createPostFilter},
 		{"Camera_setPostFilter", Polycore_Camera_setPostFilter},
+		{"Camera_removePostFilter", Polycore_Camera_removePostFilter},
 		{"delete_Camera", Polycore_delete_Camera},
 		{"Color_get_r", Polycore_Color_get_r},
 		{"Color_get_g", Polycore_Color_get_g},
@@ -112,6 +113,8 @@ int luaopen_Polycode(lua_State *L) {
 		{"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},
@@ -649,17 +652,20 @@ int luaopen_Polycode(lua_State *L) {
 		{"Renderer_drawScreenQuad", Polycore_Renderer_drawScreenQuad},
 		{"Renderer_getXRes", Polycore_Renderer_getXRes},
 		{"Renderer_getYRes", Polycore_Renderer_getYRes},
+		{"Renderer_cullFrontFaces", Polycore_Renderer_cullFrontFaces},
 		{"Renderer_clearLights", Polycore_Renderer_clearLights},
 		{"Renderer_addLight", Polycore_Renderer_addLight},
 		{"Renderer_setExposureLevel", Polycore_Renderer_setExposureLevel},
 		{"Renderer_rayTriangleIntersect", Polycore_Renderer_rayTriangleIntersect},
 		{"Renderer_enableShaders", Polycore_Renderer_enableShaders},
+		{"Renderer_initOSSpecific", Polycore_Renderer_initOSSpecific},
 		{"Renderer_addShaderModule", Polycore_Renderer_addShaderModule},
 		{"Renderer_test2DCoordinate", Polycore_Renderer_test2DCoordinate},
 		{"Renderer_getProjectionMatrix", Polycore_Renderer_getProjectionMatrix},
 		{"Renderer_getModelviewMatrix", Polycore_Renderer_getModelviewMatrix},
 		{"Renderer_addShadowMap", Polycore_Renderer_addShadowMap},
 		{"Renderer_Unproject", Polycore_Renderer_Unproject},
+		{"Renderer_sortLights", Polycore_Renderer_sortLights},
 		{"Renderer_getNumAreaLights", Polycore_Renderer_getNumAreaLights},
 		{"Renderer_getNumSpotLights", Polycore_Renderer_getNumSpotLights},
 		{"Renderer_getNumLights", Polycore_Renderer_getNumLights},
@@ -732,13 +738,18 @@ int luaopen_Polycode(lua_State *L) {
 		{"delete_SceneLabel", Polycore_delete_SceneLabel},
 		{"SceneLight", Polycore_SceneLight},
 		{"SceneLight_getIntensity", Polycore_SceneLight_getIntensity},
-		{"SceneLight_getDistance", Polycore_SceneLight_getDistance},
+		{"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_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},
@@ -781,6 +792,13 @@ int luaopen_Polycode(lua_State *L) {
 		{"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_set_enabled", Polycore_Screen_set_enabled},
 		{"Screen", Polycore_Screen},
@@ -795,6 +813,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"Screen_setRenderer", Polycore_Screen_setRenderer},
 		{"Screen_setNormalizedCoordinates", Polycore_Screen_setNormalizedCoordinates},
 		{"Screen_setScreenShader", Polycore_Screen_setScreenShader},
+		{"Screen_clearScreenShader", Polycore_Screen_clearScreenShader},
 		{"Screen_getHighestZIndex", Polycore_Screen_getHighestZIndex},
 		{"Screen_sortChildren", Polycore_Screen_sortChildren},
 		{"Screen_cmpZindex", Polycore_Screen_cmpZindex},
@@ -897,11 +916,22 @@ int luaopen_Polycode(lua_State *L) {
 		{"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},
 		{"ScreenSprite", Polycore_ScreenSprite},
 		{"ScreenSprite_addAnimation", Polycore_ScreenSprite_addAnimation},
 		{"ScreenSprite_playAnimation", Polycore_ScreenSprite_playAnimation},
 		{"ScreenSprite_Update", Polycore_ScreenSprite_Update},
 		{"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},
@@ -954,6 +984,13 @@ int luaopen_Polycode(lua_State *L) {
 		{"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},
@@ -962,7 +999,10 @@ int luaopen_Polycode(lua_State *L) {
 		{"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", Polycore_String},
 		{"String_size", Polycore_String_size},

+ 16 - 13
Bindings/Scripts/create_lua_library/create_lua_library.py

@@ -13,8 +13,9 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	sout += "#include \"%sLUAWrappers.h\"\n\n" % (prefix)
 	
 	sout += "int luaopen_%s(lua_State *L) {\n" % (prefix)
-	sout += "CoreServices *inst = (CoreServices*)lua_topointer(L, 1);\n"
-	sout += "CoreServices::setInstance(inst);\n"
+	if prefix != "Polycode":
+		sout += "CoreServices *inst = (CoreServices*)lua_topointer(L, 1);\n"
+		sout += "CoreServices::setInstance(inst);\n"
 	sout += "\tstatic const struct luaL_reg %sLib [] = {" % (libSmallName)
 	
 	out += "#pragma once\n\n"
@@ -45,7 +46,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	files = os.listdir(inputPath)
 	for fileName in files:
 		inheritInModule = ["PhysicsSceneEntity", "CollisionScene", "CollisionSceneEntity"]
-		ignore = ["PolyCocoaCore", "PolyAGLCore", "PolyGLES1Renderer", "PolyGLRenderer", "tinyxml", "tinystr", "OpenGLCubemap", "PolyiPhoneCore", "PolyGLES1Texture", "PolyGLTexture", "PolyGLVertexBuffer", "PolyThreaded"]
+		ignore = ["PolyGLSLProgram", "PolyGLSLShader", "PolyGLSLShaderModule", "PolyWinCore", "PolyCocoaCore", "PolyAGLCore", "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
@@ -101,7 +102,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 							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"), ckey.replace("Polygon", "Polycode::Polygon"))
+							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 = ""
@@ -139,7 +140,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 							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"), ckey.replace("Polygon", "Polycode::Polygon"))
+							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":
@@ -183,7 +184,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	
 								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"), ckey.replace("Polygon", "Polycode::Polygon"))
+									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 = []
@@ -198,11 +199,11 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 									luatype = "LUA_TLIGHTUSERDATA"
 									checkfunc = "lua_islightuserdata"
 									if param["type"].find("*") > -1:
-										luafunc = "(%s)lua_topointer" % (param["type"].replace("Polygon", "Polycode::Polygon"))
+										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"))
+										luafunc = "*(%s*)lua_topointer" % (param["type"].replace("const", "").replace("&", "").replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle"))
 									else:
-										luafunc = "*(%s*)lua_topointer" % (param["type"])
+										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"
@@ -225,7 +226,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 										checkfunc = "lua_isstring"
 										lend = ""
 									
-									param["type"] = param["type"].replace("Polygon", "Polycode::Polygon")
+									param["type"] = param["type"].replace("Polygon", "Polycode::Polygon").replace("Rectangle", "Polycode::Rectangle")
 	
 									if "defaltValue" in param and checkfunc != "lua_islightuserdata":
 										param["defaltValue"] = param["defaltValue"].replace(" 0f", ".0f")
@@ -255,7 +256,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 									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 += "\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"
 							else:
@@ -294,6 +295,8 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 										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)
@@ -357,7 +360,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 					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"), ckey.replace("Polygon", "Polycode::Polygon"))
+					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"
@@ -400,7 +403,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	shout += "#include \"lua.h\"\n"
 	shout += "#include \"lualib.h\"\n"
 	shout += "#include \"lauxlib.h\"\n"
-	shout += "int luaopen_%s(lua_State *L);\n" % (prefix)
+	shout += "int _PolyExport luaopen_%s(lua_State *L);\n" % (prefix)
 	shout += "}\n"
 	
 	fout = open("%s/%sLUA.h" % (includePath, prefix), "w")

+ 40 - 0
Core/Build/Mac OS X/PolyCore.xcodeproj/project.pbxproj

@@ -11,8 +11,18 @@
 		6D8656AB12AF5FD5008A486E /* PolyString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D8656AA12AF5FD5008A486E /* PolyString.cpp */; };
 		6D865AC212B07363008A486E /* PolyData.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D865AC112B07363008A486E /* PolyData.h */; };
 		6D865AC412B0736C008A486E /* PolyData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D865AC312B0736C008A486E /* PolyData.cpp */; };
+		6DB5B5B91394A9F0008C00CA /* PolySceneSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DB5B5B71394A9EF008C00CA /* PolySceneSound.h */; };
+		6DB5B5BA1394A9F0008C00CA /* PolyScreenSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DB5B5B81394A9EF008C00CA /* PolyScreenSound.h */; };
+		6DB5B5BE1394AA11008C00CA /* PolySceneSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DB5B5BC1394AA0C008C00CA /* PolySceneSound.cpp */; };
+		6DB5B5BF1394AA11008C00CA /* PolyScreenSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DB5B5BD1394AA0F008C00CA /* PolyScreenSound.cpp */; };
 		6DD40E2B136C68B700D602D3 /* PolycodeView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DD40E2A136C68B700D602D3 /* PolycodeView.h */; };
 		6DD40E2D136C68C400D602D3 /* PolycodeView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6DD40E2C136C68C400D602D3 /* PolycodeView.mm */; };
+		6DE45C54138EF8CB000BDFBA /* PolyGLSLProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45C51138EF8CA000BDFBA /* PolyGLSLProgram.cpp */; };
+		6DE45C55138EF8CB000BDFBA /* PolyGLSLShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45C52138EF8CB000BDFBA /* PolyGLSLShader.cpp */; };
+		6DE45C56138EF8CB000BDFBA /* PolyGLSLShaderModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45C53138EF8CB000BDFBA /* PolyGLSLShaderModule.cpp */; };
+		6DE45C5A138EF933000BDFBA /* PolyGLSLProgram.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DE45C57138EF933000BDFBA /* PolyGLSLProgram.h */; };
+		6DE45C5B138EF933000BDFBA /* PolyGLSLShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DE45C58138EF933000BDFBA /* PolyGLSLShader.h */; };
+		6DE45C5C138EF933000BDFBA /* PolyGLSLShaderModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DE45C59138EF933000BDFBA /* PolyGLSLShaderModule.h */; };
 		6DFB016F12A73BC200C43A7D /* PolyModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFB016E12A73BC200C43A7D /* PolyModule.h */; };
 		6DFB017112A73BCF00C43A7D /* PolyModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DFB017012A73BCF00C43A7D /* PolyModule.cpp */; };
 		6DFBF3BD12A3184E00C43A7D /* OSBasics.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DFBF30D12A3184E00C43A7D /* OSBasics.h */; };
@@ -185,8 +195,18 @@
 		6D8656AA12AF5FD5008A486E /* PolyString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyString.cpp; sourceTree = "<group>"; };
 		6D865AC112B07363008A486E /* PolyData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyData.h; sourceTree = "<group>"; };
 		6D865AC312B0736C008A486E /* PolyData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyData.cpp; sourceTree = "<group>"; };
+		6DB5B5B71394A9EF008C00CA /* PolySceneSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolySceneSound.h; sourceTree = "<group>"; };
+		6DB5B5B81394A9EF008C00CA /* PolyScreenSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyScreenSound.h; sourceTree = "<group>"; };
+		6DB5B5BC1394AA0C008C00CA /* PolySceneSound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolySceneSound.cpp; sourceTree = "<group>"; };
+		6DB5B5BD1394AA0F008C00CA /* PolyScreenSound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyScreenSound.cpp; sourceTree = "<group>"; };
 		6DD40E2A136C68B700D602D3 /* PolycodeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolycodeView.h; sourceTree = "<group>"; };
 		6DD40E2C136C68C400D602D3 /* PolycodeView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = PolycodeView.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+		6DE45C51138EF8CA000BDFBA /* PolyGLSLProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyGLSLProgram.cpp; sourceTree = "<group>"; };
+		6DE45C52138EF8CB000BDFBA /* PolyGLSLShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyGLSLShader.cpp; sourceTree = "<group>"; };
+		6DE45C53138EF8CB000BDFBA /* PolyGLSLShaderModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyGLSLShaderModule.cpp; sourceTree = "<group>"; };
+		6DE45C57138EF933000BDFBA /* PolyGLSLProgram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyGLSLProgram.h; sourceTree = "<group>"; };
+		6DE45C58138EF933000BDFBA /* PolyGLSLShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyGLSLShader.h; sourceTree = "<group>"; };
+		6DE45C59138EF933000BDFBA /* PolyGLSLShaderModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyGLSLShaderModule.h; sourceTree = "<group>"; };
 		6DFB016E12A73BC200C43A7D /* PolyModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyModule.h; sourceTree = "<group>"; };
 		6DFB017012A73BCF00C43A7D /* PolyModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyModule.cpp; sourceTree = "<group>"; };
 		6DFBF30D12A3184E00C43A7D /* OSBasics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OSBasics.h; sourceTree = "<group>"; };
@@ -408,6 +428,11 @@
 		6DFBF30B12A3184E00C43A7D /* Include */ = {
 			isa = PBXGroup;
 			children = (
+				6DB5B5B71394A9EF008C00CA /* PolySceneSound.h */,
+				6DB5B5B81394A9EF008C00CA /* PolyScreenSound.h */,
+				6DE45C57138EF933000BDFBA /* PolyGLSLProgram.h */,
+				6DE45C58138EF933000BDFBA /* PolyGLSLShader.h */,
+				6DE45C59138EF933000BDFBA /* PolyGLSLShaderModule.h */,
 				6DD40E2A136C68B700D602D3 /* PolycodeView.h */,
 				6DFE5FC412D450C30005B100 /* PolyObject.h */,
 				6D865AC112B07363008A486E /* PolyData.h */,
@@ -504,6 +529,11 @@
 		6DFBF36612A3184E00C43A7D /* Source */ = {
 			isa = PBXGroup;
 			children = (
+				6DB5B5BC1394AA0C008C00CA /* PolySceneSound.cpp */,
+				6DB5B5BD1394AA0F008C00CA /* PolyScreenSound.cpp */,
+				6DE45C51138EF8CA000BDFBA /* PolyGLSLProgram.cpp */,
+				6DE45C52138EF8CB000BDFBA /* PolyGLSLShader.cpp */,
+				6DE45C53138EF8CB000BDFBA /* PolyGLSLShaderModule.cpp */,
 				6DD40E2C136C68C400D602D3 /* PolycodeView.mm */,
 				6DFE5FC712D450CB0005B100 /* PolyObject.cpp */,
 				6D865AC312B0736C008A486E /* PolyData.cpp */,
@@ -696,6 +726,11 @@
 				6D865AC212B07363008A486E /* PolyData.h in Headers */,
 				6DFE5FC512D450C30005B100 /* PolyObject.h in Headers */,
 				6DD40E2B136C68B700D602D3 /* PolycodeView.h in Headers */,
+				6DE45C5A138EF933000BDFBA /* PolyGLSLProgram.h in Headers */,
+				6DE45C5B138EF933000BDFBA /* PolyGLSLShader.h in Headers */,
+				6DE45C5C138EF933000BDFBA /* PolyGLSLShaderModule.h in Headers */,
+				6DB5B5B91394A9F0008C00CA /* PolySceneSound.h in Headers */,
+				6DB5B5BA1394A9F0008C00CA /* PolyScreenSound.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -830,6 +865,11 @@
 				6D865AC412B0736C008A486E /* PolyData.cpp in Sources */,
 				6DFE5FC812D450CB0005B100 /* PolyObject.cpp in Sources */,
 				6DD40E2D136C68C400D602D3 /* PolycodeView.mm in Sources */,
+				6DE45C54138EF8CB000BDFBA /* PolyGLSLProgram.cpp in Sources */,
+				6DE45C55138EF8CB000BDFBA /* PolyGLSLShader.cpp in Sources */,
+				6DE45C56138EF8CB000BDFBA /* PolyGLSLShaderModule.cpp in Sources */,
+				6DB5B5BE1394AA11008C00CA /* PolySceneSound.cpp in Sources */,
+				6DB5B5BF1394AA11008C00CA /* PolyScreenSound.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Fișier diff suprimat deoarece este prea mare
+ 180 - 161
Core/Build/Mac OS X/PolyCore.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate


+ 5 - 0
Core/Contents/Include/PolyCamera.h

@@ -106,6 +106,11 @@ namespace Polycode {
 			*/												
 			void setPostFilter(String shaderName);
 			
+			/**
+			* Removes the currently assigned post filter.
+			*/
+			void removePostFilter();
+			
 		private:
 		
 			Number exposureLevel;

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

@@ -33,6 +33,7 @@
 #include <mach/mach_time.h>
 #include <unistd.h>
 
+#include "PolyGLSLShaderModule.h"
 #import <Cocoa/Cocoa.h>
 
 using std::vector;

+ 2 - 0
Core/Contents/Include/PolyGLRenderer.h

@@ -134,6 +134,8 @@ namespace Polycode {
 		void bindFrameBufferTexture(Texture *texture);
 		void unbindFramebuffers();
 		
+		void cullFrontFaces(bool val);
+				
 		void pushRenderDataArray(RenderDataArray *array);
 		RenderDataArray *createRenderDataArrayForMesh(Mesh *mesh, int arrayType);
 		RenderDataArray *createRenderDataArray(int arrayType);

+ 128 - 0
Core/Contents/Include/PolyGLSLProgram.h

@@ -0,0 +1,128 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#pragma once
+
+#include "Polycode.h"
+
+#include "PolyGlobals.h"
+
+#include "PolyLogger.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 {
+
+class _PolyExport GLSLProgramParam {
+	public:
+	
+	String name;
+	bool isAuto;
+	int autoID;
+	void *defaultData;
+	int paramType;
+	
+	static void *createParamData(int *retType, String type, String value);
+	
+	static const int POLY_MODELVIEWPROJ_MATRIX = 0;
+	static const int POLY_MODELVIEW_MATRIX = 2;
+	static const int POLY_MODELVIEW_INVERSE_MATRIX = 3;
+	static const int POLY_EXPOSURE_LEVEL = 7;
+	static const int POLY_CLEARCOLOR = 10;
+	static const int POLY_AMBIENTCOLOR = 11;	
+	
+	static const int POLY_AREA_LIGHT_POSITION_0 = 12;
+	static const int POLY_AREA_LIGHT_COLOR_0 = 13;	
+	static const int POLY_AREA_LIGHT_POSITION_1 = 14;
+	static const int POLY_AREA_LIGHT_COLOR_1 = 15;	
+	static const int POLY_AREA_LIGHT_POSITION_2 = 16;
+	static const int POLY_AREA_LIGHT_COLOR_2 = 17;	
+	static const int POLY_AREA_LIGHT_POSITION_3 = 18;
+	static const int POLY_AREA_LIGHT_COLOR_3 = 19;	
+	static const int POLY_AREA_LIGHT_POSITION_4 = 20;
+	static const int POLY_AREA_LIGHT_COLOR_4 = 21;	
+	static const int POLY_AREA_LIGHT_POSITION_5 = 22;
+	static const int POLY_AREA_LIGHT_COLOR_5 = 23;	
+	static const int POLY_AREA_LIGHT_POSITION_6 = 24;
+	static const int POLY_AREA_LIGHT_COLOR_6 = 25;	
+	static const int POLY_AREA_LIGHT_POSITION_7 = 26;
+	static const int POLY_AREA_LIGHT_COLOR_7 = 27;	
+
+	static const int POLY_SPOT_LIGHT_POSITION_0 = 30;
+	static const int POLY_SPOT_LIGHT_COLOR_0 = 31;
+	static const int POLY_SPOT_LIGHT_DIRECTION_0 = 32;
+	static const int POLY_SPOT_LIGHT_POSITION_1 = 33;
+	static const int POLY_SPOT_LIGHT_COLOR_1 = 34;
+	static const int POLY_SPOT_LIGHT_DIRECTION_1 = 35;
+	static const int POLY_SPOT_LIGHT_POSITION_2 = 36;
+	static const int POLY_SPOT_LIGHT_COLOR_2 = 37;
+	static const int POLY_SPOT_LIGHT_DIRECTION_2 = 38;
+	static const int POLY_SPOT_LIGHT_POSITION_3 = 39;
+	static const int POLY_SPOT_LIGHT_COLOR_3 = 40;
+	static const int POLY_SPOT_LIGHT_DIRECTION_3 = 41;
+	
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_0 = 42;	
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_1 = 43;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_2 = 44;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_3 = 45;
+	
+	static const int PARAM_UNKNOWN = 0;	
+	static const int PARAM_Number = 1;
+	static const int PARAM_Number3 = 2;
+	static const int PARAM_Number4 = 3;
+	
+	};
+
+	class _PolyExport GLSLProgram : public Resource {
+		public:
+			GLSLProgram(int type);
+			~GLSLProgram();
+			
+			void addParam(String name, bool isAuto, int autoID, int paramType, void *defaultData);
+		
+			unsigned int program;
+//			GLSLparameter modelViewProjection;
+	
+			static const int TYPE_VERT = 0;
+			static const int TYPE_FRAG = 1;		
+			
+			int type;
+			
+			vector<GLSLProgramParam> params;
+	};
+}

+ 93 - 0
Core/Contents/Include/PolyGLSLShader.h

@@ -0,0 +1,93 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#pragma once
+
+#include "PolyGlobals.h"
+
+#include "PolyLogger.h"
+#include "PolyShader.h"
+#include "PolyGLSLProgram.h"
+#include "PolyTexture.h"
+#include "PolyCubemap.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>
+#ifdef _WINDOWS
+#include <GL/wglext.h>
+#endif
+#endif
+
+
+using std::vector;
+
+namespace Polycode {
+
+	typedef struct {
+		Texture *texture;
+		String name;
+	} GLSLTextureBinding;
+
+	typedef struct {
+		Cubemap *cubemap;
+		String name;
+	} GLSLCubemapBinding;
+	
+	
+	class _PolyExport GLSLShader : public Shader {
+		public:
+			GLSLShader(GLSLProgram *vp, GLSLProgram *fp);
+			virtual ~GLSLShader();
+
+			ShaderBinding *createBinding();
+			
+			unsigned int shader_id;		
+			GLSLProgram *vp;
+			GLSLProgram *fp;			
+			
+		protected:
+			
+	};
+	
+	class _PolyExport GLSLShaderBinding : public ShaderBinding {
+		public:
+			GLSLShaderBinding(GLSLShader *shader);
+			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);
+			
+			vector<GLSLTextureBinding> textures;
+			vector<GLSLCubemapBinding> cubemaps;		
+		
+			GLSLShader *glslShader;
+	};
+}

+ 84 - 0
Core/Contents/Include/PolyGLSLShaderModule.h

@@ -0,0 +1,84 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#pragma once
+
+#include "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;
+
+namespace Polycode {
+	
+	class _PolyExport GLSLShaderModule : public PolycodeShaderModule {
+		public:
+			GLSLShaderModule();
+			virtual ~GLSLShaderModule();
+		
+			bool acceptsExtension(String extension);
+			Resource* createProgramFromFile(String extension, String fullPath);	
+			void reloadPrograms();
+			String getShaderType();
+			Shader *createShader(TiXmlNode *node);
+			bool applyShaderMaterial(Renderer *renderer, Material *material, ShaderBinding *localOptions, unsigned int shaderIndex);	
+			void clearShader();
+		
+	protected:
+
+		void addParamToProgram(GLSLProgram *program,TiXmlNode *node);		
+		void recreateGLSLProgram(GLSLProgram *prog, String fileName, int type);
+		GLSLProgram *createGLSLProgram(String fileName, int type);		
+		void updateGLSLParam(Renderer *renderer, GLSLProgramParam &param, ShaderBinding *materialOptions, ShaderBinding *localOptions);		
+			
+		void setGLSLAreaLightPositionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);
+		void setGLSLAreaLightColorParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);	
+		
+		void setGLSLSpotLightPositionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);
+		void setGLSLSpotLightDirectionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);
+		void setGLSLSpotLightColorParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);	
+		void setGLSLSpotLightTextureMatrixParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex);		
+		
+//		GLSLcontext GLSLContext;
+//		GLSLprofile vertexProfile;
+//		GLSLprofile fragmentProfile;
+		
+		vector<GLSLProgram*> programs;
+	};
+	
+}

+ 19 - 2
Core/Contents/Include/PolyRenderer.h

@@ -43,12 +43,24 @@ namespace Polycode {
 			Vector3 position;
 			Vector3 color;
 			Vector3 dir;
-			Number distance;
+			Number constantAttenuation;
+			Number linearAttenuation;
+			Number quadraticAttenuation;			
 			Number intensity;
+			Number spotlightCutoff;
+			Number spotlightExponent;			
 			int type;
+			bool shadowsEnabled;
 			Matrix4 textureMatrix;
 	};
 
+	class _PolyExport LightSorter {
+		public:
+			Vector3 basePosition;
+			Matrix4 cameraMatrix;
+			bool operator() (LightInfo i,LightInfo j) { return ((cameraMatrix*i.position).distance(basePosition)<(cameraMatrix*j.position).distance(basePosition));}
+	};
+
 	/**
 	* Main renderer. The renderer should only be accessed from the CoreServices singleton. Renderer operations should only be called from within Render methods of entities so that they can be properly managed.
 	*/
@@ -158,8 +170,10 @@ namespace Polycode {
 		int getXRes();
 		int getYRes();
 		
+		virtual void cullFrontFaces(bool val) = 0;
+		
 		void clearLights();
-		void addLight(Vector3 position, Vector3 direction, int type, Color color, Number distance, Number intensity, Matrix4 *textureMatrix);
+		void addLight(Vector3 position, Vector3 direction, int type, Color color, Number constantAttenuation, Number linearAttenuation, Number quadraticAttenuation, Number intensity, Number spotlightCutoff, Number spotlightExponent, bool shadowsEnabled, Matrix4 *textureMatrix);
 		
 		void setExposureLevel(Number level);
 		
@@ -203,6 +217,8 @@ namespace Polycode {
 		Number exposureLevel;		
 		Vector3 cameraPosition;
 		
+		void sortLights();
+		
 		int getNumAreaLights() { return numAreaLights; }
 		int getNumSpotLights() { return numSpotLights; }
 		int getNumLights() { return numLights; }
@@ -212,6 +228,7 @@ namespace Polycode {
 		
 	protected:
 	
+		bool cullingFrontFaces;
 				
 		Texture *currentTexture;
 		Material *currentMaterial;

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

@@ -113,7 +113,7 @@ namespace Polycode {
 		*/
 		SceneEntity *getEntityAtScreenPosition(Number x, Number y);
 		
-		void Render();
+		void Render(Camera *targetCamera = NULL);
 		void RenderDepthOnly(Camera *targetCamera);
 		
 		static String readString(OSFILE *inFile);

+ 33 - 11
Core/Contents/Include/PolySceneLight.h

@@ -44,23 +44,24 @@ namespace Polycode {
 			/**
 			* Constructs a light with parameters.
 			* @param type Type of light to create. Can be SceneLight::AREA_LIGHT or SceneLight::SPOT_LIGHT
-			* @param intensity Light intensity.
-			* @param distance Light falloff disatance.
-			* @param parentScene Scene to light. The reason this parameter is required is for shadow buffer generation.
+			* @param parentScene Scene to light.
+			* @param intensity Light color intensity
+			* @param constantAttenuation Constant falloff attenuation value	
+			* @param linearAttenuation Linear falloff attenuation value	
+			* @param quadraticAttenuation Quadratic falloff attenuation value				
 			*/ 
-			SceneLight(int type, Number intensity, Number distance, Scene *parentScene);
+			SceneLight(int type, Scene *parentScene, Number intensity, Number constantAttenuation=1, Number linearAttenuation=1, Number quadraticAttenuation=1);
 			virtual ~SceneLight();
 		
 			/*
 			* Returns the light's intensity.
 			*/
 			Number getIntensity();
-			
-			/*
-			* Returns the light's falloff distance.
-			*/			
-			Number getDistance();
-			
+						
+			Number getConstantAttenuation() { return constantAttenuation; }
+			Number getLinearAttenuation() { return linearAttenuation; }
+			Number getQuadraticAttenuation() { return quadraticAttenuation; }
+									
 			/*
 			* Returns the light's type.
 			*/			
@@ -91,6 +92,20 @@ namespace Polycode {
 			*/	
 			void setLightColor(Number r, Number g, Number b) { lightColor.r = r; lightColor.g = g; lightColor.b = b; }
 			
+			/**
+			* Sets the spotlight properties. These control the shape of the spotlight beam.
+			* @param spotlightExponent Spotlight exponent size
+			* @param spotlightCutoff Spotlight furstrum cutoff.
+			*/
+			void setSpotlightProperties(Number spotlightCutoff, Number spotlightExponent) {
+				this->spotlightCutoff = spotlightCutoff;
+				this->spotlightExponent = spotlightExponent;				
+			}
+			
+			Number getSpotlightCutoff() { return spotlightCutoff; }
+			Number getSpotlightExponent() { return spotlightExponent; }
+						
+			
 			/**
 			* If this is called with 'true', the light will generate a shadow map.
 			* @param val If set to true, enables this light to cast shadows.
@@ -116,12 +131,19 @@ namespace Polycode {
 		
 		private:
 		
+			Number spotlightExponent;
+			Number spotlightCutoff;
+		
+			Number constantAttenuation;
+			Number linearAttenuation;
+			Number quadraticAttenuation;
+		
 			int type;
 			Number intensity;
 			
 			Camera *spotCamera;
 			Texture *zBufferTexture;
-		
+
 			Scene *parentScene;
 			
 			Matrix4 lightViewMatrix;

+ 60 - 0
Core/Contents/Include/PolySceneSound.h

@@ -0,0 +1,60 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#include "PolyGlobals.h"
+#include "PolySound.h"
+#include "PolySceneEntity.h"
+#include "PolyCoreServices.h"
+
+namespace Polycode {
+
+
+	/**
+	* Creates a positional 3D sound listener. There can be only one listener active at any one time.
+ 	*/	
+	class _PolyExport SceneSoundListener : public SceneEntity {
+		public:
+			SceneSoundListener();
+			virtual ~SceneSoundListener();			
+			void Update();
+	};
+
+
+	/**
+	* Creates a positional 3D sound.
+	*/	
+	class _PolyExport SceneSound : public SceneEntity {
+		public:
+			SceneSound(String fileName, Number referenceDistance, Number maxDistance);
+			virtual ~SceneSound();			
+			void Update();
+			
+			/**
+			* Returns the sound object associated with this positional sound.
+			*/
+			Sound *getSound();
+			
+		protected:
+			Sound *sound;
+	};
+	
+}

+ 5 - 0
Core/Contents/Include/PolyScreen.h

@@ -99,6 +99,11 @@ namespace Polycode {
 		*/				
 		void setScreenShader(String shaderName);
 		
+		/**
+		* Removes the current screen shader for this screen.
+		*/
+		void clearScreenShader();
+		
 		void handleEvent(Event *event);
 		int getHighestZIndex();
 		

+ 59 - 0
Core/Contents/Include/PolyScreenSound.h

@@ -0,0 +1,59 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#include "PolyGlobals.h"
+#include "PolySound.h"
+#include "PolyCoreServices.h"
+#include "PolyScreenEntity.h"
+
+namespace Polycode {
+
+	/**
+	* Creates a positional 2D sound listener. There can be only one listener active at any one time.
+ 	*/	
+	class _PolyExport ScreenSoundListener : public ScreenEntity {
+		public:
+			ScreenSoundListener();
+			virtual ~ScreenSoundListener();			
+			void Update();
+	};
+
+
+	/**
+	* Creates a positional 2D sound.
+	*/	
+	class _PolyExport ScreenSound : public ScreenEntity {
+		public:
+			ScreenSound(String fileName, Number referenceDistance, Number maxDistance);
+			virtual ~ScreenSound();			
+			void Update();
+			
+			/**
+			* Returns the sound object associated with this positional sound.
+			*/			
+			Sound *getSound();
+			
+		protected:
+			Sound *sound;
+	};
+	
+}

+ 3 - 1
Core/Contents/Include/PolyShader.h

@@ -43,6 +43,9 @@ namespace Polycode {
 
 			static const int FIXED_SHADER = 0;
 			static const int MODULE_SHADER = 1;
+
+			int numSpotLights;
+			int numAreaLights;
 							
 		protected:
 		
@@ -103,7 +106,6 @@ namespace Polycode {
 
 			unsigned int getNumOutTargetBindings();
 			RenderTargetBinding *getOutTargetBinding(unsigned int index);
-
 			
 			Shader* shader;
 			vector<LocalShaderParam*> localParams;

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

@@ -25,6 +25,7 @@
 #include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
+#include "PolyVector3.h"
 #include <string>
 #include <vector>
 #include "al.h"
@@ -63,13 +64,33 @@ namespace Polycode {
 		* Play the sound once or in a loop.
 		* @param once If this is true, play it once, otherwise, loop.
 		*/
-		void Play(bool once);
+		void Play(bool loop=false);
 		
 		/**
 		* Stop the sound playback.
 		*/		
 		void Stop();
 		
+		/**
+		* Sets the volume of this sound.
+		* @param newVolume A Number 0-1, where 0 is no sound and 1 is the loudest.
+		*/
+		void setVolume(Number newVolume);
+
+		/**
+		* Sets the pitch of this sound.
+		* @param newPitch A Number 0-1.
+		*/		
+		void setPitch(Number newPitch);
+				
+		void setIsPositional(bool isPositional);
+		
+		void setSoundPosition(Vector3 position);
+		void setSoundVelocity(Vector3 velocity);
+		void setSoundDirection(Vector3 direction);
+		
+		void setPositionalProperties(Number referenceDistance, Number maxDistance);
+		
 		ALuint loadWAV(String fileName);
 		ALuint loadOGG(String fileName);
 		
@@ -84,6 +105,7 @@ namespace Polycode {
 
 	private:
 	
+		bool isPositional;
 		ALuint soundSource;
 		
 	};

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

@@ -27,16 +27,27 @@
 #include <stdio.h>
 #include "al.h"
 #include "alc.h"
+#include "PolyVector3.h"
 
 namespace Polycode {
 	
+	/**
+	* Controls global sound settings.
+	*/
 	class _PolyExport SoundManager {
 	public:
 		SoundManager();
 		~SoundManager();
 		
+		void setListenerPosition(Vector3 position);
+		void setListenerOrientation(Vector3 orientation);	
 		void initAL();
 		
+		/**
+		* Sets the global sound volume.
+		*/ 
+		void setGlobalVolume(Number globalVolume);
+		
 		
 	private:
 		

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

@@ -84,3 +84,5 @@
 #include "PolyThreaded.h"
 #include "PolySound.h"
 #include "PolySoundManager.h"
+#include "PolySceneSound.h"
+#include "PolyScreenSound.h"

+ 16 - 3
Core/Contents/Source/PolyCamera.cpp

@@ -28,6 +28,7 @@ Camera::Camera(Scene *parentScene) : SceneEntity() {
 	setParentScene(parentScene);
 	orthoMode = false;
 	fov = 45.0f;
+	originalSceneTexture = NULL;
 	exposureLevel = 1.0f;
 	_hasFilterShader = false;	
 	fovSet = false;
@@ -237,6 +238,13 @@ void Camera::setPostFilter(String shaderName) {
 		createPostFilter(shaderMaterial);
 }
 
+void Camera::removePostFilter() {
+	if(_hasFilterShader) {
+		filterShaderMaterial = NULL;
+		_hasFilterShader = false;
+	}
+}
+
 void Camera::createPostFilter(Material *shaderMaterial) {
 	if(!shaderMaterial)
 		return;
@@ -249,12 +257,16 @@ void Camera::createPostFilter(Material *shaderMaterial) {
 //	originalSceneTexture = CoreServices::getInstance()->getMaterialManager()->createNewTexture(CoreServices::getInstance()->getCore()->getXRes(), CoreServices::getInstance()->getCore()->getYRes());
 //	zBufferSceneTexture = CoreServices::getInstance()->getMaterialManager()->createFramebufferTexture(CoreServices::getInstance()->getCore()->getXRes(), CoreServices::getInstance()->getCore()->getYRes(), 0);
 
+	if(!originalSceneTexture) {
 	CoreServices::getInstance()->getRenderer()->createRenderTextures(&originalSceneTexture, &zBufferSceneTexture, CoreServices::getInstance()->getCore()->getXRes(), CoreServices::getInstance()->getCore()->getYRes());
+	}
 	
 	for(int i=0; i < shaderMaterial->getNumShaders(); i++) {
 		ShaderBinding* binding = shaderMaterial->getShader(i)->createBinding();		
-		binding->addTexture("PolySceneRender", originalSceneTexture);
-		binding->addTexture("PolySceneZBuffer", zBufferSceneTexture);
+		if(i == 0) {
+			binding->addTexture("screenColorBuffer", originalSceneTexture);
+//			binding->addTexture("screenDepthBuffer", zBufferSceneTexture);
+		}
 		localShaderOptions.push_back(binding);
 	}
 	
@@ -279,7 +291,8 @@ void Camera::drawFilter() {
 	if(!filterShaderMaterial)
 		return;
 
-	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(zBufferSceneTexture);
+	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(originalSceneTexture);
+//	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(zBufferSceneTexture);	
 	parentScene->Render();
 	CoreServices::getInstance()->getRenderer()->unbindFramebuffers();
 

+ 1 - 0
Core/Contents/Source/PolyCocoaCore.cpp

@@ -144,6 +144,7 @@ CocoaCore::CocoaCore(PolycodeView *view, int xRes, int yRes, bool fullScreen,int
 	//[view unlockContext];			
 	setVideoMode(xRes,yRes,fullScreen,aaLevel);		
 
+	CoreServices::getInstance()->installModule(new GLSLShaderModule());	
 
 }
 

+ 3 - 0
Core/Contents/Source/PolyCoreServices.cpp

@@ -120,6 +120,9 @@ CoreServices::~CoreServices() {
 	delete tweenManager;
 	delete resourceManager;
 	delete soundManager;
+	instanceMap.clear();
+	overrideInstance = NULL;
+	
 }
 
 void CoreServices::setCore(Core *core) {

+ 11 - 1
Core/Contents/Source/PolyGLRenderer.cpp

@@ -68,7 +68,7 @@ using namespace Polycode;
 OpenGLRenderer::OpenGLRenderer() : Renderer() {
 
 	nearPlane = 0.1f;
-	farPlane = 1000.0f;
+	farPlane = 100.0f;
 	verticesToDraw = 0;
 }
 
@@ -636,6 +636,16 @@ void OpenGLRenderer::drawToColorBuffer(bool val) {
 	}
 }
 
+void OpenGLRenderer::cullFrontFaces(bool val) {
+	if(val) {
+		glCullFace(GL_FRONT);
+		cullingFrontFaces = true;
+	} else {
+		glCullFace(GL_BACK);	
+		cullingFrontFaces = false;	
+	}
+}
+
 void OpenGLRenderer::clearBuffer(bool colorBuffer, bool depthBuffer) {
 	GLbitfield clearMask = 0;
 	

+ 87 - 0
Core/Contents/Source/PolyGLSLProgram.cpp

@@ -0,0 +1,87 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+#include "PolyGLSLProgram.h"
+
+#ifdef _WINDOWS
+extern PFNGLUSEPROGRAMPROC glUseProgram;
+extern PFNGLUNIFORM1IPROC glUniform1i;
+extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation;
+extern PFNGLACTIVETEXTUREPROC glActiveTexture;
+extern PFNGLCREATESHADERPROC glCreateShader;
+extern PFNGLSHADERSOURCEPROC glShaderSource;
+extern PFNGLCOMPILESHADERPROC glCompileShader;
+extern PFNGLCREATEPROGRAMPROC glCreateProgram;
+extern PFNGLATTACHSHADERPROC glAttachShader;
+extern PFNGLLINKPROGRAMPROC glLinkProgram;
+extern PFNGLDETACHSHADERPROC glDetachShader;
+extern PFNGLDELETESHADERPROC glDeleteShader;
+extern PFNGLDELETEPROGRAMPROC glDeleteProgram;
+#endif
+
+using namespace Polycode;
+
+GLSLProgram::GLSLProgram(int type) : Resource(Resource::RESOURCE_PROGRAM) {
+	this->type = type;
+}
+
+GLSLProgram::~GLSLProgram() {
+	glDeleteShader(program);
+}
+
+void GLSLProgram::addParam(String name, bool isAuto, int autoID, int paramType, void *defaultData) {
+	GLSLProgramParam newParam;
+	newParam.name = name;
+	newParam.paramType = paramType;
+	newParam.defaultData = defaultData;
+	newParam.isAuto = isAuto;
+	newParam.autoID = autoID;
+//	newParam.cgParam = cgGetNamedParameter(program, name.c_str());
+	params.push_back(newParam);
+}
+
+void *GLSLProgramParam::createParamData(int *retType, String type, String value) {
+		void *defaultData;
+		if(type == "Number") {
+			*retType = GLSLProgramParam::PARAM_Number;
+			Number *val = new Number();
+			*val = atof(value.c_str());
+			defaultData = (void*)val;
+			return defaultData;			
+		} else if(type == "Number3") {
+			*retType = GLSLProgramParam::PARAM_Number3;
+			Vector3 *val = new Vector3();
+			defaultData = (void*)val;
+			vector<String> values = value.split(" ");
+			if(values.size() == 3) {
+				val->set(atof(values[0].c_str()), atof(values[1].c_str()), atof(values[2].c_str()));
+			} else {
+				Logger::log("Error: A Number3 must have 3 values (%d provided)!\n", values.size());
+			}
+			return defaultData;
+		} else {
+			*retType = GLSLProgramParam::PARAM_UNKNOWN;
+			return NULL;
+		}
+
+}

+ 106 - 0
Core/Contents/Source/PolyGLSLShader.cpp

@@ -0,0 +1,106 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+#include "PolyGLSLShader.h"
+
+#ifdef _WINDOWS
+extern PFNGLUSEPROGRAMPROC glUseProgram;
+extern PFNGLUNIFORM1IPROC glUniform1i;
+extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation;
+extern PFNGLACTIVETEXTUREPROC glActiveTexture;
+extern PFNGLCREATESHADERPROC glCreateShader;
+extern PFNGLSHADERSOURCEPROC glShaderSource;
+extern PFNGLCOMPILESHADERPROC glCompileShader;
+extern PFNGLCREATEPROGRAMPROC glCreateProgram;
+extern PFNGLATTACHSHADERPROC glAttachShader;
+extern PFNGLLINKPROGRAMPROC glLinkProgram;
+extern PFNGLDETACHSHADERPROC glDetachShader;
+extern PFNGLDELETESHADERPROC glDeleteShader;
+extern PFNGLDELETEPROGRAMPROC glDeleteProgram;
+#endif
+
+using namespace Polycode;
+
+GLSLShaderBinding::GLSLShaderBinding(GLSLShader *shader) : ShaderBinding(shader) {
+	glslShader = shader;
+}
+
+GLSLShaderBinding::~GLSLShaderBinding() {
+	
+}
+
+
+void GLSLShaderBinding::addTexture(String name, Texture *texture) {
+	GLSLTextureBinding binding;
+	binding.name = name;
+	binding.texture = texture;
+//	binding.vpParam = GLSLGetNamedParameter(glslShader->fp->program, name.c_str());
+	textures.push_back(binding);
+}
+
+void GLSLShaderBinding::addCubemap(String name, Cubemap *cubemap) {
+	GLSLCubemapBinding binding;
+	binding.cubemap = cubemap;
+	binding.name = name;
+//	binding.vpParam = GLSLGetNamedParameter(GLSLShader->fp->program, name.c_str());
+	cubemaps.push_back(binding);
+}
+
+void GLSLShaderBinding::clearTexture(String name) {
+	for(int i=0; i < textures.size(); i++) {
+		if(textures[i].name == name) {
+			textures.erase(textures.begin()+i);
+			return;
+		}
+	}
+}
+
+
+void GLSLShaderBinding::addParam(String type, String name, String value) {
+	int paramType;
+	void *defaultData = GLSLProgramParam::createParamData(&paramType, type, value);
+	LocalShaderParam *newParam = new LocalShaderParam;
+	newParam->data = defaultData;
+	newParam->name = name;
+	localParams.push_back(newParam);
+}
+
+GLSLShader::GLSLShader(GLSLProgram *vp, GLSLProgram *fp) : Shader(Shader::MODULE_SHADER) {
+	this->vp = vp;
+	this->fp = fp;
+	
+	shader_id = glCreateProgram();
+    glAttachShader(shader_id, fp->program);
+    glAttachShader(shader_id, vp->program);
+    glLinkProgram(shader_id);	
+}
+
+GLSLShader::~GLSLShader() {
+	glDetachShader(shader_id, fp->program);
+    glDetachShader(shader_id, vp->program);
+	glDeleteProgram(shader_id);	
+}
+
+ShaderBinding *GLSLShader::createBinding() {
+	return new GLSLShaderBinding(this);
+}

+ 798 - 0
Core/Contents/Source/PolyGLSLShaderModule.cpp

@@ -0,0 +1,798 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+#include "PolyGLSLShaderModule.h"
+
+using namespace Polycode;
+
+#ifdef _WINDOWS
+PFNGLUSEPROGRAMPROC glUseProgram;
+PFNGLUNIFORM1IPROC glUniform1i;
+PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocation;
+PFNGLACTIVETEXTUREPROC glActiveTexture;
+PFNGLCREATESHADERPROC glCreateShader;
+PFNGLSHADERSOURCEPROC glShaderSource;
+PFNGLCOMPILESHADERPROC glCompileShader;
+PFNGLCREATEPROGRAMPROC glCreateProgram;
+PFNGLATTACHSHADERPROC glAttachShader;
+PFNGLLINKPROGRAMPROC glLinkProgram;
+PFNGLDETACHSHADERPROC glDetachShader;
+PFNGLDELETESHADERPROC glDeleteShader;
+PFNGLDELETEPROGRAMPROC glDeleteProgram;
+#endif
+
+GLSLShaderModule::GLSLShaderModule() : PolycodeShaderModule() {
+#ifdef _WINDOWS
+	glActiveTexture   = (PFNGLACTIVETEXTUREPROC)wglGetProcAddress("glActiveTexture");
+	glUseProgram   = (PFNGLUSEPROGRAMPROC)wglGetProcAddress("glUseProgram");
+	glUniform1i = (PFNGLUNIFORM1IPROC)wglGetProcAddress("glUniform1i");
+	glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONARBPROC)wglGetProcAddress("glGetUniformLocation");
+	glCreateShader = (PFNGLCREATESHADERPROC)wglGetProcAddress("glCreateShader");
+	glShaderSource = (PFNGLSHADERSOURCEPROC)wglGetProcAddress("glShaderSource");
+	glCompileShader = (PFNGLCOMPILESHADERPROC)wglGetProcAddress("glCompileShader");
+	glCreateProgram = (PFNGLCREATEPROGRAMPROC)wglGetProcAddress("glCreateProgram");
+	glAttachShader = (PFNGLATTACHSHADERPROC)wglGetProcAddress("glAttachShader");
+	glLinkProgram = (PFNGLLINKPROGRAMPROC)wglGetProcAddress("glLinkProgram");
+	glDetachShader = (PFNGLDETACHSHADERPROC)wglGetProcAddress("glDetachShader");
+	glDeleteShader = (PFNGLDELETESHADERPROC)wglGetProcAddress("glDeleteShader");
+	glDeleteProgram = (PFNGLDELETEPROGRAMPROC)wglGetProcAddress("glDeleteProgram");
+#endif
+}
+
+GLSLShaderModule::~GLSLShaderModule() {
+
+}
+
+bool GLSLShaderModule::acceptsExtension(String extension) {
+	if(extension == "vert" || extension == "frag") {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+String GLSLShaderModule::getShaderType() {
+	return "glsl";
+}
+
+Shader *GLSLShaderModule::createShader(TiXmlNode *node) {
+	TiXmlNode* pChild, *pChild2, *pChild3;	
+	GLSLProgram *vp = NULL;
+	GLSLProgram *fp = NULL;
+	GLSLShader *retShader = NULL;
+	
+	for (pChild = node->FirstChild(); pChild != 0; pChild = pChild->NextSibling()) {
+		if(strcmp(pChild->Value(), "vp") == 0) {
+			vp = (GLSLProgram*)CoreServices::getInstance()->getResourceManager()->getResource(Resource::RESOURCE_PROGRAM, String(pChild->ToElement()->Attribute("source")));
+			if(vp) {
+				for (pChild2 = pChild->FirstChild(); pChild2 != 0; pChild2 = pChild2->NextSibling()) {
+					if(strcmp(pChild2->Value(), "params") == 0) {
+						for (pChild3 = pChild2->FirstChild(); pChild3 != 0; pChild3 = pChild3->NextSibling()) {
+							if(strcmp(pChild3->Value(), "param") == 0) {
+								addParamToProgram(vp,pChild3); 
+							}
+						}
+					}
+				}
+			}
+		}
+		if(strcmp(pChild->Value(), "fp") == 0) {
+			fp = (GLSLProgram*)CoreServices::getInstance()->getResourceManager()->getResource(Resource::RESOURCE_PROGRAM, String(pChild->ToElement()->Attribute("source")));
+			if(fp) {
+				for (pChild2 = pChild->FirstChild(); pChild2 != 0; pChild2 = pChild2->NextSibling()) {
+					if(strcmp(pChild2->Value(), "params") == 0) {
+						for (pChild3 = pChild2->FirstChild(); pChild3 != 0; pChild3 = pChild3->NextSibling()) {
+							if(strcmp(pChild3->Value(), "param") == 0) {
+								addParamToProgram(fp,pChild3); 										
+							}
+						}
+					}
+				}
+			}
+		}
+		
+	}
+	if(vp != NULL && fp != NULL) {
+		GLSLShader *cgShader = new GLSLShader(vp,fp);
+		cgShader->setName(String(node->ToElement()->Attribute("name")));
+		retShader = cgShader;
+		shaders.push_back((Shader*)cgShader);
+	}
+	return retShader;
+
+}
+
+void GLSLShaderModule::clearShader() {
+	glUseProgram(0);
+}
+
+void GLSLShaderModule::setGLSLAreaLightPositionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex) {
+	if(renderer->getNumAreaLights() > lightIndex) {
+		vector<LightInfo> areaLights = renderer->getAreaLights();			
+		Vector3 lPos(areaLights[lightIndex].position.x,areaLights[lightIndex].position.y,areaLights[lightIndex].position.z);
+		GLfloat LightPosition[] = {lPos.x, lPos.y, lPos.z, 1};		
+		
+		glLightfv (GL_LIGHT0+lightIndex, GL_POSITION, LightPosition); //change the 	
+		
+//		glLightf(GL_LIGHT0+lightIndex, GL_CONSTANT_ATTENUATION, areaLights[lightIndex].distance);
+//		glLightf(GL_LIGHT0+lightIndex, GL_LINEAR_ATTENUATION, areaLights[lightIndex].intensity);			
+//		glLightf(GL_LIGHT0+lightIndex, GL_QUADRATIC_ATTENUATION, areaLights[lightIndex].intensity);					
+	} else {
+	}	
+}
+
+void GLSLShaderModule::setGLSLSpotLightPositionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex) {
+	if(renderer->getNumSpotLights() > lightIndex) {
+		vector<LightInfo> spotLights = renderer->getSpotLights();		
+		Vector3 lPos(spotLights[lightIndex].position.x,spotLights[lightIndex].position.y,spotLights[lightIndex].position.z);
+		lPos = renderer->getCameraMatrix().inverse() * lPos;
+//		cgGLSetParameter4f(param.cgParam, lPos.x,lPos.y,lPos.z, spotLights[lightIndex].distance);
+	} else {
+//		cgGLSetParameter4f(param.cgParam, 0,0,0,0);
+	}	
+}
+
+void GLSLShaderModule::setGLSLSpotLightDirectionParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex) {
+	if(renderer->getNumSpotLights() > lightIndex) {
+		vector<LightInfo> spotLights = renderer->getSpotLights();		
+		Vector3 lPos(spotLights[lightIndex].dir.x,spotLights[lightIndex].dir.y,spotLights[lightIndex].dir.z);
+		lPos = renderer->getCameraMatrix().inverse().rotateVector(lPos);
+//		cgGLSetParameter3f(param.cgParam, lPos.x,lPos.y,lPos.z);
+	} else {
+//		cgGLSetParameter3f(param.cgParam, 0.0f,0.0f,0.0f);
+	}				
+}
+
+void GLSLShaderModule::setGLSLAreaLightColorParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex) {
+	if(renderer->getNumAreaLights() > lightIndex) {
+		vector<LightInfo> areaLights = renderer->getAreaLights();		
+		
+		GLfloat DiffuseLight[] = {areaLights[lightIndex].color.x, areaLights[lightIndex].color.y, areaLights[lightIndex].color.z};
+		glLightfv (GL_LIGHT0+lightIndex, GL_DIFFUSE, DiffuseLight);
+		
+//		cgGLSetParameter4f(param.cgParam, areaLights[lightIndex].color.x,areaLights[lightIndex].color.y,areaLights[lightIndex].color.z, areaLights[lightIndex].intensity);
+	} else {
+//		cgGLSetParameter4f(param.cgParam, 0,0,0,0);
+	}
+}
+
+void GLSLShaderModule::setGLSLSpotLightColorParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex) {
+	if(renderer->getNumSpotLights() > lightIndex) {
+		vector<LightInfo> spotLights = renderer->getSpotLights();			
+//		cgGLSetParameter4f(param.cgParam, spotLights[lightIndex].color.x,spotLights[lightIndex].color.y,spotLights[lightIndex].color.z, spotLights[lightIndex].intensity);
+	} else {
+//		cgGLSetParameter4f(param.cgParam, 0,0,0,0);
+	}
+}
+
+void GLSLShaderModule::setGLSLSpotLightTextureMatrixParameter(Renderer *renderer, GLSLProgramParam &param, int lightIndex) {
+	if(renderer->getNumLights() > lightIndex) {
+		vector<LightInfo> spotLights = renderer->getSpotLights();			
+		glMatrixMode(GL_MODELVIEW);
+		glPushMatrix();
+		glLoadMatrixd(spotLights[lightIndex].textureMatrix.ml);				
+//		cgGLSetStateMatrixParameter(param.cgParam, GLSL_GL_MODELVIEW_MATRIX,GLSL_GL_MATRIX_IDENTITY);
+		glPopMatrix();
+	}					
+}
+
+
+
+void GLSLShaderModule::updateGLSLParam(Renderer *renderer, GLSLProgramParam &param, ShaderBinding *materialOptions, ShaderBinding *localOptions) {
+	if(param.isAuto) {
+		switch(param.autoID) {
+			case GLSLProgramParam::POLY_MODELVIEWPROJ_MATRIX:
+//				cgGLSetStateMatrixParameter(param.cgParam, GLSL_GL_MODELVIEW_PROJECTION_MATRIX,GLSL_GL_MATRIX_IDENTITY);
+				break;
+				
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_0:
+				setGLSLSpotLightTextureMatrixParameter(renderer, param, 0);					
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_1:
+				setGLSLSpotLightTextureMatrixParameter(renderer, param, 1);					
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_2:
+				setGLSLSpotLightTextureMatrixParameter(renderer, param, 2);					
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_3:
+				setGLSLSpotLightTextureMatrixParameter(renderer, param, 3);					
+				break;
+				
+				
+			case GLSLProgramParam::POLY_AMBIENTCOLOR:
+//				cgGLSetParameter3f(param.cgParam, renderer->ambientColor.r,renderer->ambientColor.g,renderer->ambientColor.b);
+				break;
+			case GLSLProgramParam::POLY_CLEARCOLOR:
+//				cgGLSetParameter3f(param.cgParam, renderer->clearColor.r,renderer->clearColor.g,renderer->clearColor.b);				
+				break;				
+				
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_0:
+				setGLSLSpotLightDirectionParameter(renderer, param, 0);
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_1:
+				setGLSLSpotLightDirectionParameter(renderer, param, 1);
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_2:
+				setGLSLSpotLightDirectionParameter(renderer, param, 2);
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_3:
+				setGLSLSpotLightDirectionParameter(renderer, param, 3);
+				break;
+				
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_0:
+				setGLSLAreaLightPositionParameter(renderer, param, 0);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_1:
+				setGLSLAreaLightPositionParameter(renderer, param, 1);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_2:
+				setGLSLAreaLightPositionParameter(renderer, param, 2);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_3:
+				setGLSLAreaLightPositionParameter(renderer, param, 3);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_4:
+				setGLSLAreaLightPositionParameter(renderer, param, 4);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_5:
+				setGLSLAreaLightPositionParameter(renderer, param, 5);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_6:
+				setGLSLAreaLightPositionParameter(renderer, param, 6);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_7:
+				setGLSLAreaLightPositionParameter(renderer, param, 7);
+				break;				
+				
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_0:
+				setGLSLSpotLightPositionParameter(renderer, param, 0);
+				break;				
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_1:
+				setGLSLSpotLightPositionParameter(renderer, param, 1);
+				break;				
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_2:
+				setGLSLSpotLightPositionParameter(renderer, param, 2);
+				break;				
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_3:
+				setGLSLSpotLightPositionParameter(renderer, param, 3);
+				break;				
+				
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_0:
+				setGLSLAreaLightColorParameter(renderer, param, 0);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_1:
+				setGLSLAreaLightColorParameter(renderer, param, 1);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_2:
+				setGLSLAreaLightColorParameter(renderer, param, 2);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_3:
+				setGLSLAreaLightColorParameter(renderer, param, 3);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_4:
+				setGLSLAreaLightColorParameter(renderer, param, 4);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_5:
+				setGLSLAreaLightColorParameter(renderer, param, 5);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_6:
+				setGLSLAreaLightColorParameter(renderer, param, 6);
+				break;
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_7:
+				setGLSLAreaLightColorParameter(renderer, param, 7);
+				break;
+				
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_0:
+				setGLSLSpotLightColorParameter(renderer, param, 0);
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_1:
+				setGLSLSpotLightColorParameter(renderer, param, 1);
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_2:
+				setGLSLSpotLightColorParameter(renderer, param, 2);
+				break;
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_3:
+				setGLSLSpotLightColorParameter(renderer, param, 3);
+				break;				
+				
+			case GLSLProgramParam::POLY_MODELVIEW_MATRIX: 
+//				cgGLSetStateMatrixParameter(param.cgParam, GLSL_GL_MODELVIEW_MATRIX,GLSL_GL_MATRIX_IDENTITY); }
+				break;
+			case GLSLProgramParam::POLY_MODELVIEW_INVERSE_MATRIX:
+//				cgGLSetStateMatrixParameter(param.cgParam, GLSL_GL_MODELVIEW_MATRIX,GLSL_GL_MATRIX_INVERSE_TRANSPOSE);
+				break;
+			case GLSLProgramParam::POLY_EXPOSURE_LEVEL:
+//				cgGLSetParameter1f(param.cgParam, renderer->exposureLevel);
+				break;
+		}
+	} else {
+		void *paramData = param.defaultData;
+		LocalShaderParam *localParam = materialOptions->getLocalParamByName(param.name);
+		if(localParam)
+			paramData = localParam->data;
+		localParam = localOptions->getLocalParamByName(param.name);
+		if(localParam)
+			paramData = localParam->data;
+		
+		Number *fval;
+		
+		switch(param.paramType) {
+			case GLSLProgramParam::PARAM_Number:
+				fval = (Number*)paramData;
+//				cgGLSetParameter1f(param.cgParam, *fval);
+				break;
+			case GLSLProgramParam::PARAM_Number3:
+				Vector3 *fval3 = (Vector3*)paramData;
+//				cgGLSetParameter3f(param.cgParam, fval3->x,fval3->y,fval3->z);
+				break;
+		}
+	}
+}
+
+bool GLSLShaderModule::applyShaderMaterial(Renderer *renderer, Material *material, ShaderBinding *localOptions, unsigned int shaderIndex) {	
+
+	GLSLShader *glslShader = (GLSLShader*)material->getShader(shaderIndex);
+
+	renderer->sortLights();
+
+	glPushMatrix();
+	glLoadIdentity();
+	
+	
+	int numRendererAreaLights = renderer->getNumAreaLights();
+	int numRendererSpotLights = renderer->getNumSpotLights();
+	
+	int numTotalLights = numRendererAreaLights + numRendererSpotLights;
+	
+	
+	for(int i=0 ; i < numTotalLights; i++) {
+		GLfloat resetData[] = {0.0, 0.0, 0.0, 0.0};				
+		glLightfv (GL_LIGHT0+i, GL_DIFFUSE, resetData);	
+		glLightfv (GL_LIGHT0+i, GL_AMBIENT, resetData);	
+		glLightfv (GL_LIGHT0+i, GL_POSITION, resetData);			
+	}
+	
+	int lightIndex = 0;
+	
+	vector<LightInfo> areaLights = renderer->getAreaLights();
+	GLfloat ambientVal[] = {1, 1, 1, 1.0};				
+	for(int i=0; i < glslShader->numAreaLights; i++) {
+		LightInfo light;
+		if(i < numRendererAreaLights) {
+			light = areaLights[i];
+			light.position = renderer->getCameraMatrix().inverse() * light.position;
+			ambientVal[0] = renderer->ambientColor.r;
+			ambientVal[1] = renderer->ambientColor.g;
+			ambientVal[2] = renderer->ambientColor.b;										
+			ambientVal[3] = 1;
+		} else {
+			light.color.set(0,0,0);
+			light.intensity = 0;
+			ambientVal[0] = 0;
+			ambientVal[1] = 0;
+			ambientVal[2] = 0;
+			ambientVal[3] = 0;									
+		}		
+		
+		GLfloat data4[] = {light.color.x * light.intensity, light.color.y * light.intensity, light.color.z * light.intensity, 1.0};					
+		glLightfv (GL_LIGHT0+lightIndex, GL_DIFFUSE, data4);
+		
+		glLightfv (GL_LIGHT0+lightIndex, GL_SPECULAR, data4);		
+			
+		glLightfv (GL_LIGHT0+lightIndex, GL_AMBIENT, ambientVal);		
+		glLightf (GL_LIGHT0+lightIndex, GL_SPOT_CUTOFF, 180);
+
+		data4[0] = light.position.x;
+		data4[1] = light.position.y;
+		data4[2] = light.position.z;
+		glLightfv (GL_LIGHT0+lightIndex, GL_POSITION, data4);		
+
+		glLightf (GL_LIGHT0+lightIndex, GL_CONSTANT_ATTENUATION, light.constantAttenuation);		
+		glLightf (GL_LIGHT0+lightIndex, GL_LINEAR_ATTENUATION, light.linearAttenuation);				
+		glLightf (GL_LIGHT0+lightIndex, GL_QUADRATIC_ATTENUATION, light.quadraticAttenuation);				
+		lightIndex++;
+	}
+
+	vector<LightInfo> spotLights = renderer->getSpotLights();
+	vector<Texture*> shadowMapTextures = renderer->getShadowMapTextures();	
+	char texName[32];
+	char matName[32];	
+	int shadowMapTextureIndex = 0;
+					
+	glUseProgram(glslShader->shader_id);	
+	int textureIndex = 0;					
+					
+	for(int i=0; i < glslShader->numSpotLights; i++) {
+		LightInfo light;
+		Vector3 pos;
+		Vector3 dir;
+		if(i < numRendererSpotLights) {
+			light = spotLights[i];
+			pos = light.position;
+			dir = light.dir;						
+			pos = renderer->getCameraMatrix().inverse() * pos;
+			dir = renderer->getCameraMatrix().inverse().rotateVector(dir);
+			
+			ambientVal[0] = renderer->ambientColor.r;
+			ambientVal[1] = renderer->ambientColor.g;
+			ambientVal[2] = renderer->ambientColor.b;										
+			ambientVal[3] = 1;
+		} else {
+			light.color.set(0,0,0);
+			light.intensity = 0;
+			ambientVal[0] = 0;
+			ambientVal[1] = 0;
+			ambientVal[2] = 0;
+			ambientVal[3] = 0;									
+			light.shadowsEnabled = false;
+		}		
+		
+		GLfloat data4[] = {light.color.x * light.intensity, light.color.y * light.intensity, light.color.z * light.intensity, 1.0};					
+		glLightfv (GL_LIGHT0+lightIndex, GL_DIFFUSE, data4);
+		
+		glLightfv (GL_LIGHT0+lightIndex, GL_SPECULAR, data4);		
+			
+		glLightfv (GL_LIGHT0+lightIndex, GL_AMBIENT, ambientVal);		
+		glLightf (GL_LIGHT0+lightIndex, GL_SPOT_CUTOFF, light.spotlightCutoff);
+
+		glLightf (GL_LIGHT0+lightIndex, GL_SPOT_EXPONENT, light.spotlightExponent);
+		
+		data4[0] = dir.x;
+		data4[1] = dir.y;
+		data4[2] = dir.z;
+		glLightfv (GL_LIGHT0+lightIndex, GL_SPOT_DIRECTION, data4);
+
+		data4[0] = pos.x;
+		data4[1] = pos.y;
+		data4[2] = pos.z;
+		glLightfv (GL_LIGHT0+lightIndex, GL_POSITION, data4);		
+
+		glLightf (GL_LIGHT0+lightIndex, GL_CONSTANT_ATTENUATION, light.constantAttenuation);		
+		glLightf (GL_LIGHT0+lightIndex, GL_LINEAR_ATTENUATION, light.linearAttenuation);				
+		glLightf (GL_LIGHT0+lightIndex, GL_QUADRATIC_ATTENUATION, light.quadraticAttenuation);				
+		
+		if(light.shadowsEnabled) {		
+			if(shadowMapTextureIndex < shadowMapTextures.size()) {
+				switch(shadowMapTextureIndex) {
+					case 0:
+						strcpy(texName, "shadowMap0");
+						strcpy(matName, "shadowMatrix0");						
+					break;
+					case 1:
+						strcpy(texName, "shadowMap1");
+						strcpy(matName, "shadowMatrix1");												
+					break;
+					case 2:
+						strcpy(texName, "shadowMap2");
+						strcpy(matName, "shadowMatrix2");																		
+					break;
+					case 3:
+						strcpy(texName, "shadowMap3");
+						strcpy(matName, "shadowMatrix3");																		
+					break;							
+				}
+			
+				int texture_location = glGetUniformLocation(glslShader->shader_id, texName);
+				glUniform1i(texture_location, textureIndex);
+				glActiveTexture(GL_TEXTURE0 + textureIndex);		
+				glBindTexture(GL_TEXTURE_2D, ((OpenGLTexture*)shadowMapTextures[shadowMapTextureIndex])->getTextureID());	
+				textureIndex++;
+				
+//				glMatrixMode(GL_MODELVIEW);
+//				glPushMatrix();
+//				glLoadMatrixd(light.textureMatrix.ml);			
+				int mloc = glGetUniformLocation(glslShader->shader_id, matName);				
+				
+				
+				light.textureMatrix = light.textureMatrix;
+				
+			
+				GLfloat mat[16];
+				for(int z=0; z < 16; z++) {
+					mat[z] = light.textureMatrix.ml[z];
+				}
+				glUniformMatrix4fv(mloc, 1, false, mat);
+		
+						
+	//			glPopMatrix();
+				
+					
+			}
+			shadowMapTextureIndex++;
+		}
+		
+		lightIndex++;
+	}
+	glPopMatrix();
+		
+	glEnable(GL_TEXTURE_2D);
+		
+	GLSLShaderBinding *cgBinding = (GLSLShaderBinding*)material->getShaderBinding(shaderIndex);
+	
+	for(int i=0; i < glslShader->vp->params.size(); i++) {
+		GLSLProgramParam param = glslShader->vp->params[i];
+		updateGLSLParam(renderer, param, material->getShaderBinding(shaderIndex), localOptions);
+	}
+	
+	for(int i=0; i < glslShader->fp->params.size(); i++) {
+		GLSLProgramParam param = glslShader->fp->params[i];
+		updateGLSLParam(renderer, param, material->getShaderBinding(shaderIndex), localOptions);
+	}	
+	
+	for(int i=0; i < cgBinding->textures.size(); i++) {
+		int texture_location = glGetUniformLocation(glslShader->shader_id, cgBinding->textures[i].name.c_str());
+		glUniform1i(texture_location, textureIndex);
+		glActiveTexture(GL_TEXTURE0 + textureIndex);		
+		glBindTexture(GL_TEXTURE_2D, ((OpenGLTexture*)cgBinding->textures[i].texture)->getTextureID());	
+		textureIndex++;
+	}	
+	
+		
+	for(int i=0; i < cgBinding->cubemaps.size(); i++) {
+		int texture_location = glGetUniformLocation(glslShader->shader_id, cgBinding->cubemaps[i].name.c_str());
+		glUniform1i(texture_location, textureIndex);
+		
+		glActiveTexture(GL_TEXTURE0 + textureIndex);	
+			
+		glBindTexture(GL_TEXTURE_CUBE_MAP, ((OpenGLCubemap*)cgBinding->cubemaps[i].cubemap)->getTextureID());	
+		textureIndex++;
+	}	
+	
+	cgBinding = (GLSLShaderBinding*)localOptions;
+	for(int i=0; i < cgBinding->textures.size(); i++) {
+		int texture_location = glGetUniformLocation(glslShader->shader_id, cgBinding->textures[i].name.c_str());
+		glUniform1i(texture_location, textureIndex);
+		glActiveTexture(GL_TEXTURE0 + textureIndex);		
+		glBindTexture(GL_TEXTURE_2D, ((OpenGLTexture*)cgBinding->textures[i].texture)->getTextureID());	
+		textureIndex++;
+	}	
+
+	//			Logger::log("applying %s (%s %s)\n", material->getShader()->getName().c_str(), cgShader->vp->getResourceName().c_str(), cgShader->fp->getResourceName().c_str());
+
+	/*
+	vector<Texture*> shadowMapTextures = renderer->getShadowMapTextures();	
+	char texName[32];
+	for(int i=0; i< 4; i++) {
+		if(i < shadowMapTextures.size()) {
+			switch(i) {
+				case 0:
+					strcpy(texName, "shadowMap0");
+					break;
+				case 1:
+					strcpy(texName, "shadowMap1");
+					break;
+				case 2:
+					strcpy(texName, "shadowMap2");
+					break;
+				case 3:
+					strcpy(texName, "shadowMap3");
+					break;							
+			}
+		int texture_location = glGetUniformLocation(glslShader->shader_id, texName);
+		glUniform1i(texture_location, textureIndex);
+		glActiveTexture(GL_TEXTURE0 + textureIndex);		
+		glBindTexture(GL_TEXTURE_2D, ((OpenGLTexture*)shadowMapTextures[i])->getTextureID());	
+		textureIndex++;
+		}
+	}
+	*/
+/*	
+	cgBinding = (GLSLShaderBinding*)localOptions;
+	for(int i=0; i < cgBinding->textures.size(); i++) {
+		cgGLSetTextureParameter(cgBinding->textures[i].vpParam, ((OpenGLTexture*)cgBinding->textures[i].texture)->getTextureID());
+		cgGLEnableTextureParameter(cgBinding->textures[i].vpParam);
+	}			
+	
+	vector<Texture*> shadowMapTextures = renderer->getShadowMapTextures();
+	char texName[32];
+	for(int i=0; i< 4; i++) {
+		if(i < shadowMapTextures.size()) {
+			switch(i) {
+				case 0:
+					strcpy(texName, "shadowMap0");
+					break;
+				case 1:
+					strcpy(texName, "shadowMap1");
+					break;
+				case 2:
+					strcpy(texName, "shadowMap2");
+					break;
+				case 3:
+					strcpy(texName, "shadowMap3");
+					break;							
+			}
+			cgGLSetTextureParameter(cgGetNamedParameter(cgShader->fp->program, texName), ((OpenGLTexture*)shadowMapTextures[i])->getTextureID());
+			cgGLEnableTextureParameter(cgGetNamedParameter(cgShader->fp->program, texName));					
+		}
+	}
+	
+
+	 */
+	 
+
+		 
+	return true;
+}
+
+void GLSLShaderModule::addParamToProgram(GLSLProgram *program,TiXmlNode *node) {
+		bool isAuto = false;
+		int autoID = 0;
+		int paramType = GLSLProgramParam::PARAM_UNKNOWN;
+		void *defaultData = NULL;
+		
+		if(strcmp(node->ToElement()->Attribute("type"), "auto") == 0) {
+			isAuto = true;
+			String pid = node->ToElement()->Attribute("id");
+			if(pid == "POLY_MODELVIEWPROJ_MATRIX")
+				autoID = GLSLProgramParam::POLY_MODELVIEWPROJ_MATRIX;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_0")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_0;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_1")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_1;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_2")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_2;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_3")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_3;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_4")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_4;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_5")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_5;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_6")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_6;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_7")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_7;
+			
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_0;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_1;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_2;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_3;
+			
+			
+			else if(pid == "POLY_AREA_LIGHT_COLOR_0")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_0;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_1")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_1;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_2")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_2;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_3")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_3;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_4")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_4;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_5")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_5;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_6")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_6;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_7")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_7;
+			
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_0;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_1;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_2;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_3;
+			
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_0;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_1;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_2;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_3;
+			
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_0;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_1;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_2;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_3;		
+			
+			else if(pid == "POLY_MODELVIEW_MATRIX")
+				autoID = GLSLProgramParam::POLY_MODELVIEW_MATRIX;
+			else if(pid == "POLY_MODELVIEW_INVERSE_MATRIX")
+				autoID = GLSLProgramParam::POLY_MODELVIEW_INVERSE_MATRIX;
+			else if(pid == "POLY_EXPOSURE_LEVEL")
+				autoID = GLSLProgramParam::POLY_EXPOSURE_LEVEL;
+			else if(pid == "POLY_CLEARCOLOR")
+				autoID = GLSLProgramParam::POLY_CLEARCOLOR;		
+			else if(pid == "POLY_AMBIENTCOLOR")
+				autoID = GLSLProgramParam::POLY_AMBIENTCOLOR;				
+			else
+				isAuto = false;
+		} else {
+			defaultData = GLSLProgramParam::createParamData(&paramType, node->ToElement()->Attribute("type"), node->ToElement()->Attribute("default"));
+		}
+		
+		program->addParam(node->ToElement()->Attribute("name"), isAuto, autoID, paramType, defaultData);
+}
+
+void GLSLShaderModule::reloadPrograms() {
+	for(int i=0; i < programs.size(); i++) {
+		GLSLProgram *program = programs[i];
+		recreateGLSLProgram(program, program->getResourcePath(), program->type);	
+	}	
+}
+
+void GLSLShaderModule::recreateGLSLProgram(GLSLProgram *prog, String fileName, int type) {
+	
+	OSFILE *file = OSBasics::open(fileName, "r");
+	OSBasics::seek(file, 0, SEEK_END);	
+	long progsize = OSBasics::tell(file);
+	OSBasics::seek(file, 0, SEEK_SET);
+	char *buffer = (char*)malloc(progsize+1);
+	memset(buffer, 0, progsize+1);
+	OSBasics::read(buffer, progsize, 1, file);
+	
+	if(type == GLSLProgram::TYPE_VERT) {
+		prog->program =  glCreateShader(GL_VERTEX_SHADER);
+	} else {
+		prog->program =  glCreateShader(GL_FRAGMENT_SHADER);
+	}
+	
+	glShaderSource(prog->program, 1, (const GLchar**)&buffer, 0);
+	glCompileShader(prog->program);	
+	
+	GLint compiled = true;
+    glGetShaderiv(prog->program, GL_COMPILE_STATUS, &compiled);
+    if(!compiled) {
+        GLint length;
+        GLchar* log;
+        glGetShaderiv(prog->program, GL_INFO_LOG_LENGTH, &length);
+        log = (GLchar*)malloc(length);
+        glGetShaderInfoLog(prog->program, length, &length, log);
+		printf("GLSL ERROR: %s\n", log);
+        free(log);
+    }		
+		
+	
+	free(buffer);		
+	
+}
+
+GLSLProgram *GLSLShaderModule::createGLSLProgram(String fileName, int type) {
+	GLSLProgram *prog = new GLSLProgram(type);	
+	recreateGLSLProgram(prog, fileName, type);	
+	programs.push_back(prog);
+	return prog;
+}
+
+Resource* GLSLShaderModule::createProgramFromFile(String extension, String fullPath) {
+	if(extension == "vert") {
+		Logger::log("Adding GLSL vertex program %s\n", fullPath.c_str());				
+		return createGLSLProgram(fullPath, GLSLProgram::TYPE_VERT);
+	}
+	if(extension == "frag") {
+		Logger::log("Adding GLSL fragment program %s\n", fullPath.c_str());
+		return createGLSLProgram(fullPath, GLSLProgram::TYPE_FRAG);								
+	}
+	return NULL;
+}

+ 1 - 0
Core/Contents/Source/PolyGLTexture.cpp

@@ -63,6 +63,7 @@ void OpenGLTexture::recreateFromImageData() {
 	
 	if(textureData) {
 		glTexImage2D(GL_TEXTURE_2D, 0, glTextureType, width, height, 0, glTextureType, GL_UNSIGNED_BYTE, textureData);							
+//		gluBuild2DMipmaps(GL_TEXTURE_2D, 3, glTextureType, width, height, glTextureType, GL_UNSIGNED_BYTE, textureData);
 	}
 	glTextureLoaded = true;
 }

+ 16 - 1
Core/Contents/Source/PolyMaterialManager.cpp

@@ -148,7 +148,6 @@ Shader *MaterialManager::createShaderFromXMLNode(TiXmlNode *node) {
 	if(node->ToElement()->Attribute("type")) {
 		String shaderType = node->ToElement()->Attribute("type");
 //		Logger::log("Attempting to create %s shader\n", shaderType.c_str());
-		
 		for(int m=0; m < shaderModules.size(); m++) {
 			PolycodeShaderModule *shaderModule = shaderModules[m];
 			if(shaderModule->getShaderType() == shaderType) {
@@ -156,6 +155,21 @@ Shader *MaterialManager::createShaderFromXMLNode(TiXmlNode *node) {
 			}
 		}		
 	}
+
+	int numAreaLights = 0;
+	int numSpotLights = 0;
+		
+	if(node->ToElement()->Attribute("numAreaLights")) {
+		numAreaLights = atoi(node->ToElement()->Attribute("numAreaLights"));
+	}
+	if(node->ToElement()->Attribute("numSpotLights")) {
+		numSpotLights = atoi(node->ToElement()->Attribute("numSpotLights"));
+	}
+	
+	if(retShader) {
+		retShader->numAreaLights = numAreaLights;
+		retShader->numSpotLights = numSpotLights;		
+	}	
 	
 	return retShader;
 }
@@ -298,6 +312,7 @@ Material *MaterialManager::materialFromXMLNode(TiXmlNode *node) {
 								
 								for(int l=0; l < renderTargets.size(); l++) {
 									if(renderTargets[l]->id == newBinding->id) {
+										printf("Assigning texture to %s\n", newBinding->id.c_str());
 										newBinding->texture = renderTargets[l]->texture;
 										newBinding->width = renderTargets[l]->width;
 										newBinding->height = renderTargets[l]->height;

+ 18 - 2
Core/Contents/Source/PolyRenderer.cpp

@@ -42,6 +42,7 @@ Renderer::Renderer() : currentTexture(NULL), xRes(0), yRes(0), renderMode(0), or
 	currentFrameBufferTexture = NULL;
 	previousFrameBufferTexture = NULL;
 	fov = 45.0;
+	cullingFrontFaces = false;
 }
 
 Renderer::~Renderer() {
@@ -121,7 +122,16 @@ void Renderer::addShaderModule(PolycodeShaderModule *module) {
 	shaderModules.push_back(module);
 }
 
-void Renderer::addLight(Vector3 position, Vector3 direction, int type, Color color, Number distance, Number intensity, Matrix4 *textureMatrix) {
+void Renderer::sortLights(){
+	LightSorter sorter;
+	sorter.basePosition = (getModelviewMatrix()).getPosition();
+	sorter.cameraMatrix = getCameraMatrix().inverse();	
+	sort (areaLights.begin(), areaLights.end(), sorter);
+	sort (spotLights.begin(), spotLights.end(), sorter);	
+}
+
+void Renderer::addLight(Vector3 position, Vector3 direction, int type, Color color, Number constantAttenuation, Number linearAttenuation, Number quadraticAttenuation, Number intensity, Number spotlightCutoff, Number spotlightExponent, bool shadowsEnabled, Matrix4 *textureMatrix) {
+
 	numLights++;
 	
 	LightInfo info;
@@ -129,10 +139,16 @@ void Renderer::addLight(Vector3 position, Vector3 direction, int type, Color col
 		info.textureMatrix = *textureMatrix;
 	}
 	
+	info.shadowsEnabled = shadowsEnabled;
+	info.spotlightCutoff = spotlightCutoff;
+	info.spotlightExponent = spotlightExponent;	
 	info.intensity = intensity;
 	info.type = type;
 	info.dir = direction;
-	info.distance = distance;
+	info.constantAttenuation = constantAttenuation;
+	info.linearAttenuation = linearAttenuation;
+	info.quadraticAttenuation = quadraticAttenuation;
+			
 	info.color.set(color.r, color.g, color.b);
 	info.position = position;
 	lights.push_back(info);

+ 28 - 19
Core/Contents/Source/PolyScene.cpp

@@ -129,11 +129,14 @@ Camera *Scene::getDefaultCamera() {
 	return defaultCamera;
 }
 
-void Scene::Render() {
+void Scene::Render(Camera *targetCamera) {
 	
-	if(!defaultCamera)
+	if(!targetCamera && !defaultCamera)
 		return;
 	
+	if(!targetCamera)
+		targetCamera = defaultCamera;
+	
 	// prepare lights...
 	for(int i=0; i<entities.size();i++) {
 		entities[i]->doUpdates();		
@@ -146,7 +149,7 @@ void Scene::Render() {
 	Matrix4 *matrixPtr;
 	
 	
-	defaultCamera->rebuildTransformMatrix();
+	targetCamera->rebuildTransformMatrix();
 		
 	if(useClearColor)
 		CoreServices::getInstance()->getRenderer()->setClearColor(clearColor.r,clearColor.g,clearColor.b);	
@@ -163,25 +166,26 @@ void Scene::Render() {
 		Vector3 position;
 		matrixPtr = NULL;				
 		direction.x = 0;		
-		direction.y = 1;
-		direction.z = 0;
+		direction.y = 0;
+		direction.z = -1;
+		
 		
 		direction = light->getConcatenatedMatrix().rotateVector(direction);
 		direction.Normalize();
 		
 		if(light->areShadowsEnabled()) {
 			if(light->getType() == SceneLight::SPOT_LIGHT) {
-				textureMatrix.identity();
+//				textureMatrix.identity();
 				
 				Matrix4 matTexAdj(0.5f,	0.0f,	0.0f,	0.0f,
 								  0.0f,	0.5f,	0.0f,	0.0f,
 								  0.0f,	0.0f,	0.5f,	0.0f,
 								  0.5f,	0.5f,	0.5f,	1.0f );
 				
-				textureMatrix =  defaultCamera->getConcatenatedMatrix() * light->getLightViewMatrix() * matTexAdj;
-				
-				matrixPtr = &textureMatrix;
+								
 				light->renderDepthMap(this);
+				textureMatrix = light->getLightViewMatrix() * matTexAdj;				
+				matrixPtr = &textureMatrix;				
 				CoreServices::getInstance()->getRenderer()->addShadowMap(light->getZBufferTexture());
 			}
 		}
@@ -190,13 +194,13 @@ void Scene::Render() {
 		if(light->getParentEntity() != NULL) {
 			position = light->getParentEntity()->getConcatenatedMatrix() * position;			
 		}
-		CoreServices::getInstance()->getRenderer()->addLight(position, direction, light->getLightType(), light->lightColor, light->getDistance(), light->getIntensity(), matrixPtr);
+		CoreServices::getInstance()->getRenderer()->addLight(position, direction, light->getLightType(), light->lightColor, light->getConstantAttenuation(), light->getLinearAttenuation(), light->getQuadraticAttenuation(), light->getIntensity(), light->getSpotlightCutoff(), light->getSpotlightExponent(), light->areShadowsEnabled(), matrixPtr);
 	}	
 	
-	defaultCamera->doCameraTransform();
-	defaultCamera->buildFrustrumPlanes();
+	targetCamera->doCameraTransform();
+	targetCamera->buildFrustrumPlanes();
 	
-	if(defaultCamera->getOrthoMode()) {
+	if(targetCamera->getOrthoMode()) {
 		CoreServices::getInstance()->getRenderer()->_setOrthoMode();
 	}
 	
@@ -208,14 +212,14 @@ void Scene::Render() {
 	
 	for(int i=0; i<entities.size();i++) {
 		if(entities[i]->getBBoxRadius() > 0) {
-			if(defaultCamera->isSphereInFrustrum((entities[i]->getPosition()), entities[i]->getBBoxRadius()))
+			if(targetCamera->isSphereInFrustrum((entities[i]->getPosition()), entities[i]->getBBoxRadius()))
 				entities[i]->transformAndRender();
 		} else {
 			entities[i]->transformAndRender();		
 		}
 	}
 	
-	if(defaultCamera->getOrthoMode()) {
+	if(targetCamera->getOrthoMode()) {
 		CoreServices::getInstance()->getRenderer()->setPerspectiveMode();
 	}
 	
@@ -224,13 +228,15 @@ void Scene::Render() {
 
 void Scene::RenderDepthOnly(Camera *targetCamera) {
 	
+	CoreServices::getInstance()->getRenderer()->cullFrontFaces(true);
+	
 	for(int i=0; i<entities.size();i++) {
 		entities[i]->doUpdates();		
 		entities[i]->updateEntityMatrix();
 	}
 	
-	targetCamera->doCameraTransform();
-		
+	targetCamera->rebuildTransformMatrix();	
+	targetCamera->doCameraTransform();	
 	targetCamera->buildFrustrumPlanes();
 	
 	CoreServices::getInstance()->getRenderer()->setTexture(NULL);
@@ -244,6 +250,7 @@ void Scene::RenderDepthOnly(Camera *targetCamera) {
 		}
 	}	
 	CoreServices::getInstance()->getRenderer()->enableShaders(true);
+	CoreServices::getInstance()->getRenderer()->cullFrontFaces(false);	
 }
 
 void Scene::addLight(SceneLight *light) {
@@ -402,7 +409,7 @@ void Scene::loadScene(String fileName) {
 				newEntity = (SceneEntity*)this->getDefaultCamera();
 				break;
 			case ENTITY_LIGHT:
-				
+				/*
 				Number col[3],e,d;
 				unsigned int lType;
 				OSBasics::read(&lType, sizeof(unsigned int), 1, inFile);				
@@ -414,6 +421,7 @@ void Scene::loadScene(String fileName) {
 				newLight->lightColor.setColor(col[0],col[1],col[2],1.0f);
 				addLight(newLight);
 				newEntity = (SceneEntity*)newLight;
+				*/
 				break;
 		}
 		
@@ -582,6 +590,7 @@ void Scene::saveScene(String fileName) {
 		}
 	}
 	*/
+	/*
 	Number col[3],e,d;
 	for(int i=0; i < lights.size(); i++) {
 		
@@ -599,7 +608,7 @@ void Scene::saveScene(String fileName) {
 		OSBasics::write(&d, sizeof(Number), 1, outFile);
 		OSBasics::write(col, sizeof(Number), 3, outFile);
 	}
-	
+	*/
 	for(int i=0; i < customEntities.size(); i++) {
 		SceneEntity *custEnt = customEntities[i];
 		

+ 12 - 9
Core/Contents/Source/PolySceneLight.cpp

@@ -24,10 +24,16 @@
 
 using namespace Polycode;
 
-SceneLight::SceneLight(int type, Number intensity, Number distance, Scene *parentScene) : SceneEntity() {
+SceneLight::SceneLight(int type, Scene *parentScene, Number intensity, Number constantAttenuation, Number linearAttenuation, Number quadraticAttenuation) : SceneEntity() {
 	this->type = type;
 	this->intensity = intensity;
-	this->distance = distance;
+	this->constantAttenuation = constantAttenuation;
+	this->linearAttenuation = linearAttenuation;
+	this->quadraticAttenuation = quadraticAttenuation;
+	
+	spotlightCutoff = 40;
+	spotlightExponent = 10;
+		
 	this->depthWrite = false;
 	lightMesh = new Mesh(Mesh::QUAD_MESH);
 	lightMesh->createBox(0.1,0.1,0.1);
@@ -38,6 +44,7 @@ SceneLight::SceneLight(int type, Number intensity, Number distance, Scene *paren
 	spotCamera = NULL;
 	this->parentScene = parentScene;
 	shadowsEnabled = false;
+	lightColor.setColor(1.0f,1.0f,1.0f,1.0f);
 }
 
 void SceneLight::enableShadows(bool val, Number resolution) {
@@ -47,7 +54,7 @@ void SceneLight::enableShadows(bool val, Number resolution) {
 		}
 		if(!spotCamera) {
 			spotCamera = new Camera(parentScene);
-			spotCamera->setPitch(-90.0f);
+//			spotCamera->setPitch(-45.0f);
 			addEntity(spotCamera);	
 		}
 		shadowMapRes = resolution;
@@ -62,7 +69,7 @@ bool SceneLight::areShadowsEnabled() {
 }
 
 void SceneLight::setShadowMapFOV(Number fov) {
-	
+	shadowMapFOV = fov;
 }
 
 SceneLight::~SceneLight() {
@@ -78,7 +85,7 @@ void SceneLight::renderDepthMap(Scene *scene) {
 	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(zBufferTexture);	
 
 	scene->RenderDepthOnly(spotCamera);
-	
+		
 	lightViewMatrix = CoreServices::getInstance()->getRenderer()->getModelviewMatrix() *  CoreServices::getInstance()->getRenderer()->getProjectionMatrix();
 	CoreServices::getInstance()->getRenderer()->unbindFramebuffers();
 	CoreServices::getInstance()->getRenderer()->popMatrix();
@@ -97,10 +104,6 @@ Number SceneLight::getIntensity() {
 	return intensity;
 }
 
-Number SceneLight::getDistance() {
-	return distance;
-}
-
 void SceneLight::Render() {
 /*
 	CoreServices::getInstance()->getRenderer()->setTexture(NULL);

+ 9 - 3
Core/Contents/Source/PolySceneManager.cpp

@@ -59,9 +59,15 @@ void SceneManager::UpdateVirtual() {
 	for(int i=0;i<renderTextures.size();i++) {
 		CoreServices::getInstance()->getRenderer()->setViewportSize(renderTextures[i]->getTargetTexture()->getWidth(), renderTextures[i]->getTargetTexture()->getHeight());
 		CoreServices::getInstance()->getRenderer()->loadIdentity();
-		renderTextures[i]->getTargetScene()->Update();
-		renderTextures[i]->getTargetScene()->Render();
-		renderTextures[i]->drawScreen();
+		if(renderTextures[i]->getTargetScene()->isVirtual())
+			renderTextures[i]->getTargetScene()->Update();
+			
+	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(renderTextures[i]->getTargetTexture());	
+			
+			
+		renderTextures[i]->getTargetScene()->Render(renderTextures[i]->getTargetCamera());
+		//renderTextures[i]->drawScreen();
+		CoreServices::getInstance()->getRenderer()->unbindFramebuffers();		
 		CoreServices::getInstance()->getRenderer()->clearScreen();
 		CoreServices::getInstance()->getRenderer()->loadIdentity();
 	}

+ 4 - 2
Core/Contents/Source/PolySceneRenderTexture.cpp

@@ -26,14 +26,16 @@
 using namespace Polycode;
 
 SceneRenderTexture::SceneRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight) {
-	targetTexture = CoreServices::getInstance()->getMaterialManager()->createTexture(renderWidth, renderHeight, NULL,true);
+//	targetTexture = CoreServices::getInstance()->getMaterialManager()->createTexture(renderWidth, renderHeight, NULL,true);
+	Texture *tex;
+	CoreServices::getInstance()->getRenderer()->createRenderTextures(&targetTexture, &tex, renderWidth, renderHeight);
 	this->targetScene = targetScene;
 	this->targetCamera = targetCamera;
 	CoreServices::getInstance()->getSceneManager()->registerRenderTexture(this);
 }
 
 void SceneRenderTexture::drawScreen() {
-	CoreServices::getInstance()->getRenderer()->renderToTexture(targetTexture);
+	//CoreServices::getInstance()->getRenderer()->renderToTexture(targetTexture);
 }
 	
 Scene *SceneRenderTexture::getTargetScene() {

+ 73 - 0
Core/Contents/Source/PolySceneSound.cpp

@@ -0,0 +1,73 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#include "PolySceneSound.h"
+
+using namespace Polycode;
+
+SceneSoundListener::SceneSoundListener() : SceneEntity() {
+
+}
+SceneSoundListener::~SceneSoundListener() {
+
+}
+
+void SceneSoundListener::Update() {
+	Matrix4 finalMatrix = getConcatenatedMatrix();
+	CoreServices::getInstance()->getSoundManager()->setListenerPosition(finalMatrix.getPosition());
+	
+	Vector3 direction;
+	direction.x = 0;		
+	direction.y = 0;
+	direction.z = -1;
+	direction = finalMatrix.rotateVector(direction);
+	CoreServices::getInstance()->getSoundManager()->setListenerOrientation(direction);
+
+}
+
+
+SceneSound::SceneSound(String fileName, Number referenceDistance, Number maxDistance) : SceneEntity() {
+	sound = new Sound(fileName);
+	sound->setIsPositional(true);
+	sound->setPositionalProperties(referenceDistance, maxDistance);
+}
+
+SceneSound::~SceneSound() {
+	delete sound;
+}
+
+void SceneSound::Update() {
+	Matrix4 finalMatrix = getConcatenatedMatrix();
+	sound->setSoundPosition(finalMatrix.getPosition());
+	
+	Vector3 direction;
+	direction.x = 0;		
+	direction.y = 0;
+	direction.z = -1;
+	direction = finalMatrix.rotateVector(direction);
+	sound->setSoundDirection(direction);
+	
+}
+
+Sound *SceneSound::getSound() {
+	return sound;
+}

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

@@ -29,6 +29,7 @@ Screen::Screen() : EventDispatcher() {
 	offset.y = 0;
 	enabled = true;
 	focusChild = NULL;
+	originalSceneTexture = NULL;
 	CoreServices::getInstance()->getScreenManager()->addScreen(this);
 	filterShaderMaterial = NULL;
 	_hasFilterShader = false;
@@ -151,12 +152,15 @@ void Screen::setScreenShader(String shaderName) {
 	if(!filterShaderMaterial)
 		return;
 	
-	CoreServices::getInstance()->getRenderer()->createRenderTextures(&originalSceneTexture, &zBufferSceneTexture, CoreServices::getInstance()->getCore()->getXRes(), CoreServices::getInstance()->getCore()->getYRes());
+	if(!originalSceneTexture) {
+	CoreServices::getInstance()->getRenderer()->createRenderTextures(&originalSceneTexture, NULL, CoreServices::getInstance()->getCore()->getXRes(), CoreServices::getInstance()->getCore()->getYRes());
+	}
 	
 	for(int i=0; i < filterShaderMaterial->getNumShaders(); i++) {
 		ShaderBinding* binding = filterShaderMaterial->getShader(i)->createBinding();		
-		binding->addTexture("tauSceneRender", originalSceneTexture);
-		binding->addTexture("tauSceneZBuffer", zBufferSceneTexture);
+		if( i == 0) 
+			binding->addTexture("screenColorBuffer", originalSceneTexture);
+			
 		localShaderOptions.push_back(binding);
 	}
 		
@@ -164,13 +168,20 @@ void Screen::setScreenShader(String shaderName) {
 	
 }
 
+void Screen::clearScreenShader() {
+	if(_hasFilterShader) {
+		_hasFilterShader = false;
+		filterShaderMaterial = NULL;
+	}
+}
+
 
 void Screen::drawFilter() {
 	
 	if(!filterShaderMaterial)
 		return;
 	
-	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(zBufferSceneTexture);
+	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(originalSceneTexture);
 	
 	Render();
 	//CoreServices::getInstance()->getRenderer()->renderToTexture(originalSceneTexture);	
@@ -180,7 +191,8 @@ void Screen::drawFilter() {
 	ShaderBinding* materialBinding;		
 	for(int i=0; i < filterShaderMaterial->getNumShaders(); i++) {
 		materialBinding = filterShaderMaterial->getShaderBinding(i);
-		CoreServices::getInstance()->getRenderer()->applyMaterial(filterShaderMaterial, localShaderOptions[i], i);		
+		CoreServices::getInstance()->getRenderer()->applyMaterial(filterShaderMaterial, localShaderOptions[i], i);	
+			
 		if(i==filterShaderMaterial->getNumShaders()-1) {
 	//		CoreServices::getInstance()->getRenderer()->clearScreen();
 			CoreServices::getInstance()->getRenderer()->loadIdentity();
@@ -190,12 +202,13 @@ void Screen::drawFilter() {
 				//				CoreServices::getInstance()->getRenderer()->clearScreen();
 				//				CoreServices::getInstance()->getRenderer()->loadIdentity();
 				CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(materialBinding->getOutTargetBinding(j)->texture);
-				//				Logger::log("drawing quad (%s) %f,%f\n", materialBinding->getOutTargetBinding(j)->texture->getResourceName().c_str(), materialBinding->getOutTargetBinding(j)->width, materialBinding->getOutTargetBinding(j)->height);
+				//				Logger::log("drawing quad (%s) %f,%f\n", materialBinding->getOutTargetBinding(j)->texture->getResourceName().c_str(), materialBinding->getOutTargetBinding(j)->width, materialBinding->getOutTargetBinding(j)->height);		
+				
 				CoreServices::getInstance()->getRenderer()->drawScreenQuad(materialBinding->getOutTargetBinding(j)->width, materialBinding->getOutTargetBinding(j)->height);
 				CoreServices::getInstance()->getRenderer()->unbindFramebuffers();
 				
 				//				CoreServices::getInstance()->getRenderer()->renderToTexture(materialBinding->getOutTargetBinding(j)->texture);
-			}		
+			}						
 		}
 		CoreServices::getInstance()->getRenderer()->clearShader();
 		CoreServices::getInstance()->getRenderer()->loadIdentity();

+ 73 - 0
Core/Contents/Source/PolyScreenSound.cpp

@@ -0,0 +1,73 @@
+/*
+Copyright (C) 2011 by Ivan Safrin
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+#include "PolyScreenSound.h"
+
+using namespace Polycode;
+
+ScreenSoundListener::ScreenSoundListener() : ScreenEntity() {
+
+}
+ScreenSoundListener::~ScreenSoundListener() {
+
+}
+
+void ScreenSoundListener::Update() {
+	Matrix4 finalMatrix = getConcatenatedMatrix();
+	CoreServices::getInstance()->getSoundManager()->setListenerPosition(finalMatrix.getPosition());
+	
+	Vector3 direction;
+	direction.x = 0;		
+	direction.y = 0;
+	direction.z = -1;
+	direction = finalMatrix.rotateVector(direction);
+	CoreServices::getInstance()->getSoundManager()->setListenerOrientation(direction);
+
+}
+
+
+ScreenSound::ScreenSound(String fileName, Number referenceDistance, Number maxDistance) : ScreenEntity() {
+	sound = new Sound(fileName);
+	sound->setIsPositional(true);
+	sound->setPositionalProperties(referenceDistance, maxDistance);	
+}
+
+ScreenSound::~ScreenSound() {
+	delete sound;
+}
+
+void ScreenSound::Update() {
+	Matrix4 finalMatrix = getConcatenatedMatrix();
+	sound->setSoundPosition(finalMatrix.getPosition());
+	
+	Vector3 direction;
+	direction.x = 0;		
+	direction.y = 0;
+	direction.z = -1;
+	direction = finalMatrix.rotateVector(direction);
+	sound->setSoundDirection(direction);
+	
+}
+
+Sound *ScreenSound::getSound() {
+	return sound;
+}

+ 4 - 0
Core/Contents/Source/PolyShader.cpp

@@ -53,8 +53,10 @@ void ShaderBinding::addRenderTargetBinding(RenderTargetBinding *binding) {
 	renderTargetBindings.push_back(binding);
 	if(binding->mode == RenderTargetBinding::MODE_IN) {
 		inTargetBindings.push_back(binding);
+		printf("Adding in target binding [%s] [%s]\n", binding->id.c_str(), binding->name.c_str());
 	} else {
 		outTargetBindings.push_back(binding);	
+		printf("Adding out target binding [%s]\n", binding->id.c_str());		
 	}
 }
 
@@ -84,6 +86,8 @@ RenderTargetBinding *ShaderBinding::getOutTargetBinding(unsigned int index) {
 
 
 Shader::Shader(int type) : Resource(Resource::RESOURCE_SHADER) {
+	numSpotLights = 0;
+	numAreaLights = 0;
 	this->type = type;
 }
 

+ 43 - 3
Core/Contents/Source/PolySound.cpp

@@ -45,7 +45,6 @@ long custom_tellfunc(void *datasource) {
 }
 
 Sound::Sound(String fileName) {
-	
 	String extension;
 	size_t found;
 	found=fileName.rfind(".");
@@ -63,6 +62,7 @@ Sound::Sound(String fileName) {
 	}
 	
 	soundSource = GenSource(buffer);
+	setIsPositional(false);
 }
 
 Sound::~Sound() {
@@ -95,8 +95,8 @@ unsigned short Sound::readByte16(const unsigned char buffer[2]) {
 #endif	
 }
 
-void Sound::Play(bool once) {
-	if(once) {
+void Sound::Play(bool loop) {
+	if(!loop) {
 		alSourcei(soundSource, AL_LOOPING, AL_FALSE);
 	} else {
 		alSourcei(soundSource, AL_LOOPING, AL_TRUE);		
@@ -104,6 +104,46 @@ void Sound::Play(bool once) {
 	alSourcePlay(soundSource);
 }
 
+void Sound::setVolume(Number newVolume) {
+	alSourcef(soundSource, AL_GAIN, newVolume);
+}
+
+void Sound::setPitch(Number newPitch) {
+	alSourcef(soundSource, AL_PITCH, newPitch);
+}
+
+void Sound::setSoundPosition(Vector3 position) {
+	if(isPositional)
+		alSource3f(soundSource,AL_POSITION, position.x, position.y, position.z);
+}
+
+void Sound::setSoundVelocity(Vector3 velocity) {
+	if(isPositional)
+		alSource3f(soundSource,AL_VELOCITY, velocity.x, velocity.y, velocity.z);
+}
+
+void Sound::setSoundDirection(Vector3 direction) {
+	if(isPositional)
+		alSource3f(soundSource,AL_DIRECTION, direction.x, direction.y, direction.z);
+}
+
+void Sound::setPositionalProperties(Number referenceDistance, Number maxDistance) { 
+	alSourcef(soundSource,AL_REFERENCE_DISTANCE, referenceDistance);
+	alSourcef(soundSource,AL_MAX_DISTANCE, maxDistance);	
+}
+
+void Sound::setIsPositional(bool isPositional) {
+	this->isPositional = isPositional;
+	if(isPositional) {
+		alSourcei(soundSource, AL_SOURCE_RELATIVE, AL_FALSE);
+	} else {
+		alSourcei(soundSource, AL_SOURCE_RELATIVE, AL_TRUE);	
+		alSource3f(soundSource,AL_POSITION, 0,0,0);
+		alSource3f(soundSource,AL_VELOCITY, 0,0,0);
+		alSource3f(soundSource,AL_DIRECTION, 0,0,0);				
+	}
+}
+
 void Sound::checkALError(String operation) {
 	ALenum error = alGetError();
 	if(error != AL_NO_ERROR) {

+ 16 - 0
Core/Contents/Source/PolySoundManager.cpp

@@ -81,9 +81,25 @@ void SoundManager::initAL() {
 //		ShutdownAL();
 //		PCCE_THROW("InitializeAL: Could not set listener position");
 	}
+	
+	alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
+//	alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED);
+	
 	Logger::log("OpenAL initialized...\n");
 }
 
+void SoundManager::setGlobalVolume(Number globalVolume) {
+	alListenerf(AL_GAIN, globalVolume);
+}
+
+void SoundManager::setListenerPosition(Vector3 position) {
+	alListener3f(AL_POSITION, position.x, position.y, position.z);
+}
+
+void SoundManager::setListenerOrientation(Vector3 orientation) {
+	alListener3f(AL_ORIENTATION, orientation.x, orientation.y, orientation.z);
+}
+
 SoundManager::~SoundManager() {
 	alcSuspendContext(context);
 	alcDestroyContext(context);

+ 17 - 2
Modules/Build/Mac OS X/Modules.xcodeproj/project.pbxproj

@@ -131,7 +131,7 @@
 		6D26112E13766DC900745E74 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
 		6D26113013766DD500745E74 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
 		6D26113213766DDC00745E74 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
-		6D26114B1376780900745E74 /* Polycode2DPhysics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Polycode2DPhysics.h; path = Include/Polycode2DPhysics.h; sourceTree = "<group>"; };
+		6D26114B1376780900745E74 /* Polycode2DPhysics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Polycode2DPhysics.h; sourceTree = "<group>"; };
 		6D26114D1376792000745E74 /* liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblua.a; path = ../../../Core/Dependencies/lua/src/liblua.a; sourceTree = "<group>"; };
 		6D26115013767A8300745E74 /* Physics2DLUA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Physics2DLUA.h; sourceTree = "<group>"; };
 		6D26115113767A8300745E74 /* Physics2DLUAWrappers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Physics2DLUAWrappers.h; sourceTree = "<group>"; };
@@ -425,7 +425,6 @@
 			children = (
 				6D26114F13767A8300745E74 /* Include */,
 				6D26115213767A8300745E74 /* Source */,
-				6D26114B1376780900745E74 /* Polycode2DPhysics.h */,
 			);
 			name = Module;
 			sourceTree = "<group>";
@@ -498,6 +497,7 @@
 		6D580E0412D29FB5006FB999 /* Include */ = {
 			isa = PBXGroup;
 			children = (
+				6D26114B1376780900745E74 /* Polycode2DPhysics.h */,
 				6D580E0512D29FB5006FB999 /* PolyPhysicsScreen.h */,
 				6D580E0612D29FB5006FB999 /* PolyPhysicsScreenEntity.h */,
 			);
@@ -1213,6 +1213,7 @@
 				GCC_MODEL_TUNING = G5;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				INSTALL_PATH = /usr/local/lib;
+				ONLY_ACTIVE_ARCH = YES;
 				PREBINDING = NO;
 				PRODUCT_NAME = Polycode2DPhysics;
 			};
@@ -1226,7 +1227,21 @@
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
 				GCC_MODEL_TUNING = G5;
+				HEADER_SEARCH_PATHS = (
+					/usr/local/include/,
+					/usr/local/include/libfreenect,
+					../../../Core/Dependencies/box2d/Box2D,
+					../../../Core/Contents/Include,
+					../../../Core/Dependencies/bullet/src,
+					../../../Core/Dependencies/libvorbis/include,
+					../../../Core/Dependencies/libogg/include,
+					/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers,
+					../../../Core/Dependencies/freetype/include,
+					../../../Core/Dependencies/libpng,
+					../../../Core/Dependencies/physfs,
+				);
 				INSTALL_PATH = /usr/local/lib;
+				ONLY_ACTIVE_ARCH = NO;
 				PREBINDING = NO;
 				PRODUCT_NAME = Polycode2DPhysics;
 				ZERO_LINK = NO;

Fișier diff suprimat deoarece este prea mare
+ 169 - 155
Modules/Build/Mac OS X/Modules.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate


+ 149 - 9
Modules/Contents/2DPhysics/Include/PolyPhysicsScreen.h

@@ -74,14 +74,14 @@ public:
 };
 
 /**
-* A 2D Physics enabled screen. 
+* A 2D Physics enabled screen. A PhysicsScreen acts like a normal screen, except that entities added to it with addPhysicsChild have physics automatically simulated. You can also use it to check collisions using addCollisionChild.
 */	
 class _PolyExport PhysicsScreen : public Screen, b2ContactListener {
 
 public:
 
 	/**
-	*
+	* Creates a new physics screen.
 	*/ 
 	PhysicsScreen(Number worldScale, Number freq);
 	
@@ -98,50 +98,190 @@ public:
 	* Adds a ScreenEntity as a physics enabled child. 
 	* @param newEntity Screen entity to add.
 	* @param entType Physics entity type to add as. Possible values are PhysicsScreenEntity::ENTITY_RECT, PhysicsScreenEntity::ENTITY_CIRCLE and PhysicsScreenEntity::ENTITY_STATICRECT
+	* @param friction Friction of the physics entity. Friction controls how entities drag along each other.
+	* @param density Density of the physics entity. Density controls how heavy the entity is.
+	* @param restitution Restitution of the physics entity. Restitution controls how bouncy the entity is.
+	* @param isSensor If this is set to true, the entity won't collide with other entities, but its collision will register.
+	* @param fixedRotation If this is set to true, the entity will always have a locked rotation.
 	* @return The physics entity wrapper.
 	*/
 	PhysicsScreenEntity *addPhysicsChild(ScreenEntity *newEntity, int entType, Number friction=0.1, Number density=1, Number restitution = 0, bool isSensor = false, bool fixedRotation = false);
+	
+	/**
+	* Removes a physics child from the screen.
+	* @param entityToRemove Entity to remove from the screen.
+	*/
 	void removePhysicsChild(PhysicsScreenEntity *entityToRemove);
 	
+	/**
+	* Begins tracking collisions for a ScreenEntity.
+	* @param newEntity Entity to track collisions for.
+	* @param entType Physics shape of the entity. Possible values are PhysicsScreenEntity::ENTITY_RECT or PhysicsScreenEntity::ENTITY_CIRCLE.
+	* @param entityToRemove Entity to remove from the screen.
+	*/	
 	PhysicsScreenEntity *addCollisionChild(ScreenEntity *newEntity, int entType);
 	
+	/**
+	* Removes an existing joint.
+	* @param joint Joint to remove.
+	*/
 	void destroyJoint(PhysicsJoint *joint);
+	
+	/**
+	* Creates a new distance joint. Distance joints keep the two entities at a fixed distance.
+	* @param ent1 First entity to join.
+	* @param ent2 Second entity to join.	
+	* @param collideConnected If set to true, both entities will collide with each other, if false, they will not.
+	*/ 
 	void createDistanceJoint(ScreenEntity *ent1, ScreenEntity *ent2, bool collideConnected);
+	
+	/**
+	* Creates a new prismatic joint. Prismatic joints provide one degree of freedom between two entities. 
+	* @param ent1 First entity to join.
+	* @param ent2 Second entity to join.	
+	* @param collideConnected If set to true, both entities will collide with each other, if false, they will not.
+	*/ 	
 	void createPrismaticJoint(ScreenEntity *ent1, ScreenEntity *ent2, bool collideConnected);
+
+	/**
+	* Creates a new revolute joint. Revolute joints enable one entity to rotate around a point on another entity.
+	* @param ent1 Entity to anchor to.
+	* @param ent2 Entity to anchor.
+	* @param ax Anchor point x (relative to first entity)
+	* @param ay Anchor point y (relative to first entity)
+	* @param enableLimit If true, the rotation will be limited to the specified values 
+	* @param lowerLimit If enableLimit is true, specifies the lower limit of the rotation in degrees.
+	* @param upperLimit If enableLimit is true, specifies the upper limit of the rotation in degrees.				
+	* @param motorEnabled If enabled, applies a constant torque to the rotation joint.
+	* @param motorSpeed If motorEnabled is true, controls the speed at which the motor rotates.
+	* @param maxTorque	If motorEnabled is true, specifies the maximum torque applied.		
+	* @return Created physics joint.
+	*/ 		
 	PhysicsJoint *createRevoluteJoint(ScreenEntity *ent1, ScreenEntity *ent2, Number ax, Number ay, bool enableLimit, Number lowerLimit, Number upperLimit, bool motorEnabled, Number motorSpeed, Number maxTorque);
+	
 //	b2MouseJoint *createMouseJoint(ScreenEntity *ent1, Vector2 *mp);
+
+	/**
+	* Applies linear force to an entity.
+	* @param ent Entity to apply force to.
+	* @param fx X value of the force direction vector.
+	* @param fy Y value of the force direction vector.		
+	*/ 	
 	void applyForce(ScreenEntity *ent, Number fx, Number fy);
-	void applyImpulse(ScreenEntity *ent, Number fx, Number fy);
 	
+	/**
+	* Applies an impulse to an entity
+	* @param ent Entity to apply force to.
+	* @param fx X value of the impulse direction vector.
+	* @param fy Y value of the impulse direction vector.		
+	*/ 		
+	void applyImpulse(ScreenEntity *ent, Number fx, Number fy);
+
+	/**
+	* Sets the gravity for this screen.
+	* @param newGravity The new gravity vector.
+	*/ 			
 	void setGravity(Vector2 newGravity);
-	
+
+	/**
+	* Warps an entity to the specified location and angle.
+	* @param ent Entity to transform.
+	* @param pos New position to set.
+	* @param angle New angle to set.
+	*/ 				
 	void setTransform(ScreenEntity *ent, Vector2 pos, Number angle);
+
 	
 	PhysicsScreenEntity *getPhysicsEntityByShape(b2Shape *shape);
 	PhysicsScreenEntity *getPhysicsEntityByFixture(b2Fixture *fixture);
-	
+
+	/**
+	* Sets the linear velocity of an entity.
+	* @param ent Entity to set velocity to.
+	* @param fx X direction of velocity vector.
+	* @param fy Y direction of velocity vector.
+	*/ 					
 	void setVelocity(ScreenEntity *ent, Number fx, Number fy);	
+
+	/**
+	* Sets the linear velocity of an entity on the X axis.
+	* @param ent Entity to set velocity to.
+	* @param fx X direction of velocity vector.
+	*/ 						
 	void setVelocityX(ScreenEntity *ent, Number fx);	
+	
+	/**
+	* Sets the linear velocity of an entity on the Y axis.
+	* @param ent Entity to set velocity to.
+	* @param fy Y direction of velocity vector.
+	*/ 							
 	void setVelocityY(ScreenEntity *ent, Number fy);	
-	void setSpin(ScreenEntity *ent, Number spin);
 	
+	/**
+	* Sets the spin of an entity
+	* @param ent Entity to apply spin to.
+	* @param spin Spin value.
+	*/ 								
+	void setSpin(ScreenEntity *ent, Number spin);
+
+	/**
+	* Returns the velocity of an entity.
+	* @param ent Entity to return velocity for
+	* @return Velocity of the specified entity.
+	*/ 									
 	Vector2 getVelocity(ScreenEntity *ent);
 			
 	void BeginContact (b2Contact *contact);
 	void EndContact (b2Contact *contact);	
-	
+
+	/**
+	* Wake up a sleeping entity. The physics engine puts non-moving entities to sleep automatically. Use this to wake them up.
+	* @param ent Entity to wake up.
+	*/ 										
 	void wakeUp(ScreenEntity *ent);
 	
 	void handleEvent(Event *event);
-	
+
+	/**
+	* Returns the collision normal between two collision-tracked or physics entities.
+	* @param ent1 First entity to check.
+	* @param ent2 Second entity to check.	
+	* @return If the specified entities are colliding, this will return the collision normal or (0,0) otherwise.
+	*/ 											
 	Vector2 getEntityCollisionNormal(ScreenEntity *ent1, ScreenEntity *ent2);
-	
+
+	/**
+	* Returns the collision status between two collision-tracked or physics entities.
+	* @param ent1 First entity to check.
+	* @param ent2 Second entity to check.	
+	* @return If the specified entities are colliding, will return true, and false if they are not.
+	*/ 												
 	bool areEntitiesColliding(ScreenEntity *ent1, ScreenEntity *ent2);
+	
+	/**
+	* Returns the entity at the specified position.
+	* @param x X position.
+	* @param y Y position.
+	* @return If there is a collision-tracked entity at the specified position, it will be returned, NULL if there isn't.
+	*/ 													
 	ScreenEntity *getEntityAtPosition(Number x, Number y);
+	
+	/**
+	* Returns true if the specified entity is at the specified position.
+	* @param ent Entity to test.
+	* @param x X position.
+	* @param y Y position.
+	* @return If there specified entity overlaps the specified position, this returns true.
+	*/ 														
 	bool testEntityAtPosition(ScreenEntity *ent, Number x, Number y);
 	
 	void Shutdown();
 	
+	/**
+	* Returns the physics entity for the specified screen entity. When you add ScreenEntities to the physics screen, these physics entities are created to track the physics status of the screen entities. You don't need to deal with these ever, but if you want, you can get them anyway.
+	* @param ent ScreenEntity instance to return the physics entity for.
+	* @return PhysicsEntity associated with the ScreenEntity.
+	*/
 	PhysicsScreenEntity *getPhysicsByScreenEntity(ScreenEntity *ent);
 	void destroyMouseJoint(b2MouseJoint *mJoint);
 

+ 16 - 0
Modules/Contents/2DPhysics/Include/PolyPhysicsScreenEntity.h

@@ -37,15 +37,31 @@ namespace Polycode {
 			
 			ScreenEntity *getScreenEntity();
 			
+			/**
+			* Applies torque to the physics entity		
+			*/
 			void applyTorque(Number torque);
+			
+			/**
+			* Applies force to the physics entity		
+			*/			
 			void applyForce(Vector2 force);
 		
 			void setTransform(Vector2 pos, Number angle);
 			
 			void Update();
 			
+			/**
+			* Rectangular physics entity
+			*/ 
 			static const int ENTITY_RECT = 1;
+			/**
+			* Circular physics entity
+			*/ 			
 			static const int ENTITY_CIRCLE = 2;	
+			/**
+			* Static rectangular entity.
+			*/ 						
 			static const int ENTITY_STATICRECT = 3;
 		
 			b2Fixture *fixture;		

+ 12 - 1
Modules/Contents/3DPhysics/Include/PolyCollisionScene.h

@@ -47,9 +47,14 @@ struct CollisionResult {
 		Vector3 position;
 	};
 
-	
+	/**
+	* A scene that tracks collisions between entities. The collision scene acts like a regular scene, only it automatically tracks collisions between its child entities.
+	*/
 	class _PolyExport CollisionScene : public Scene {
 		public:
+			/**
+			* Creates a collision scene.
+			*/
 			CollisionScene();
 			CollisionScene(bool virtualScene);		
 			virtual ~CollisionScene();
@@ -57,6 +62,12 @@ struct CollisionResult {
 			void initCollisionScene();
 		
 			virtual void Update();		
+			
+			/**
+			* Enables collision tracking for an entity.
+			* @param entity Entity to track collision for.
+			* @param 
+			*/			
 			void enableCollision(SceneEntity *entity, bool val);		
 			CollisionSceneEntity *getCollisionEntityByObject(btCollisionObject *collisionObject);		
 			RayTestResult getFirstEntityInRay(const Vector3 &origin,  const Vector3 &dest);

+ 38 - 38
Modules/Contents/CgShading/Include/PolyCGProgram.h

@@ -49,47 +49,47 @@ class _PolyExport CGProgramParam {
 	
 	static void *createParamData(int *retType, String type, String value);
 	
-	static const int TAU_MODELVIEWPROJ_MATRIX = 0;
-	static const int TAU_MODELVIEW_MATRIX = 2;
-	static const int TAU_MODELVIEW_INVERSE_MATRIX = 3;
-	static const int TAU_EXPOSURE_LEVEL = 7;
-	static const int TAU_CLEARCOLOR = 10;
-	static const int TAU_AMBIENTCOLOR = 11;	
+	static const int POLY_MODELVIEWPROJ_MATRIX = 0;
+	static const int POLY_MODELVIEW_MATRIX = 2;
+	static const int POLY_MODELVIEW_INVERSE_MATRIX = 3;
+	static const int POLY_EXPOSURE_LEVEL = 7;
+	static const int POLY_CLEARCOLOR = 10;
+	static const int POLY_AMBIENTCOLOR = 11;	
 	
-	static const int TAU_AREA_LIGHT_POSITION_0 = 12;
-	static const int TAU_AREA_LIGHT_COLOR_0 = 13;	
-	static const int TAU_AREA_LIGHT_POSITION_1 = 14;
-	static const int TAU_AREA_LIGHT_COLOR_1 = 15;	
-	static const int TAU_AREA_LIGHT_POSITION_2 = 16;
-	static const int TAU_AREA_LIGHT_COLOR_2 = 17;	
-	static const int TAU_AREA_LIGHT_POSITION_3 = 18;
-	static const int TAU_AREA_LIGHT_COLOR_3 = 19;	
-	static const int TAU_AREA_LIGHT_POSITION_4 = 20;
-	static const int TAU_AREA_LIGHT_COLOR_4 = 21;	
-	static const int TAU_AREA_LIGHT_POSITION_5 = 22;
-	static const int TAU_AREA_LIGHT_COLOR_5 = 23;	
-	static const int TAU_AREA_LIGHT_POSITION_6 = 24;
-	static const int TAU_AREA_LIGHT_COLOR_6 = 25;	
-	static const int TAU_AREA_LIGHT_POSITION_7 = 26;
-	static const int TAU_AREA_LIGHT_COLOR_7 = 27;	
+	static const int POLY_AREA_LIGHT_POSITION_0 = 12;
+	static const int POLY_AREA_LIGHT_COLOR_0 = 13;	
+	static const int POLY_AREA_LIGHT_POSITION_1 = 14;
+	static const int POLY_AREA_LIGHT_COLOR_1 = 15;	
+	static const int POLY_AREA_LIGHT_POSITION_2 = 16;
+	static const int POLY_AREA_LIGHT_COLOR_2 = 17;	
+	static const int POLY_AREA_LIGHT_POSITION_3 = 18;
+	static const int POLY_AREA_LIGHT_COLOR_3 = 19;	
+	static const int POLY_AREA_LIGHT_POSITION_4 = 20;
+	static const int POLY_AREA_LIGHT_COLOR_4 = 21;	
+	static const int POLY_AREA_LIGHT_POSITION_5 = 22;
+	static const int POLY_AREA_LIGHT_COLOR_5 = 23;	
+	static const int POLY_AREA_LIGHT_POSITION_6 = 24;
+	static const int POLY_AREA_LIGHT_COLOR_6 = 25;	
+	static const int POLY_AREA_LIGHT_POSITION_7 = 26;
+	static const int POLY_AREA_LIGHT_COLOR_7 = 27;	
 
-	static const int TAU_SPOT_LIGHT_POSITION_0 = 30;
-	static const int TAU_SPOT_LIGHT_COLOR_0 = 31;
-	static const int TAU_SPOT_LIGHT_DIRECTION_0 = 32;
-	static const int TAU_SPOT_LIGHT_POSITION_1 = 33;
-	static const int TAU_SPOT_LIGHT_COLOR_1 = 34;
-	static const int TAU_SPOT_LIGHT_DIRECTION_1 = 35;
-	static const int TAU_SPOT_LIGHT_POSITION_2 = 36;
-	static const int TAU_SPOT_LIGHT_COLOR_2 = 37;
-	static const int TAU_SPOT_LIGHT_DIRECTION_2 = 38;
-	static const int TAU_SPOT_LIGHT_POSITION_3 = 39;
-	static const int TAU_SPOT_LIGHT_COLOR_3 = 40;
-	static const int TAU_SPOT_LIGHT_DIRECTION_3 = 41;
+	static const int POLY_SPOT_LIGHT_POSITION_0 = 30;
+	static const int POLY_SPOT_LIGHT_COLOR_0 = 31;
+	static const int POLY_SPOT_LIGHT_DIRECTION_0 = 32;
+	static const int POLY_SPOT_LIGHT_POSITION_1 = 33;
+	static const int POLY_SPOT_LIGHT_COLOR_1 = 34;
+	static const int POLY_SPOT_LIGHT_DIRECTION_1 = 35;
+	static const int POLY_SPOT_LIGHT_POSITION_2 = 36;
+	static const int POLY_SPOT_LIGHT_COLOR_2 = 37;
+	static const int POLY_SPOT_LIGHT_DIRECTION_2 = 38;
+	static const int POLY_SPOT_LIGHT_POSITION_3 = 39;
+	static const int POLY_SPOT_LIGHT_COLOR_3 = 40;
+	static const int POLY_SPOT_LIGHT_DIRECTION_3 = 41;
 	
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_0 = 42;	
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_1 = 43;
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_2 = 44;
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_3 = 45;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_0 = 42;	
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_1 = 43;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_2 = 44;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_3 = 45;
 	
 	static const int PARAM_UNKNOWN = 0;	
 	static const int PARAM_Number = 1;

+ 114 - 114
Modules/Contents/CgShading/Source/PolyCGShaderModule.cpp

@@ -187,127 +187,127 @@ void CGShaderModule::setCGSpotLightTextureMatrixParameter(Renderer *renderer, CG
 void CGShaderModule::updateCGParam(Renderer *renderer, CGProgramParam &param, ShaderBinding *materialOptions, ShaderBinding *localOptions) {
 	if(param.isAuto) {
 		switch(param.autoID) {
-			case CGProgramParam::TAU_MODELVIEWPROJ_MATRIX:
+			case CGProgramParam::POLY_MODELVIEWPROJ_MATRIX:
 				cgGLSetStateMatrixParameter(param.cgParam, CG_GL_MODELVIEW_PROJECTION_MATRIX,CG_GL_MATRIX_IDENTITY);
 				break;
 				
-			case CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_0:
+			case CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_0:
 				setCGSpotLightTextureMatrixParameter(renderer, param, 0);					
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_1:
+			case CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_1:
 				setCGSpotLightTextureMatrixParameter(renderer, param, 1);					
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_2:
+			case CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_2:
 				setCGSpotLightTextureMatrixParameter(renderer, param, 2);					
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_3:
+			case CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_3:
 				setCGSpotLightTextureMatrixParameter(renderer, param, 3);					
 				break;
 				
 				
-			case CGProgramParam::TAU_AMBIENTCOLOR:
+			case CGProgramParam::POLY_AMBIENTCOLOR:
 				cgGLSetParameter3f(param.cgParam, renderer->ambientColor.r,renderer->ambientColor.g,renderer->ambientColor.b);
 				break;
-			case CGProgramParam::TAU_CLEARCOLOR:
+			case CGProgramParam::POLY_CLEARCOLOR:
 				cgGLSetParameter3f(param.cgParam, renderer->clearColor.r,renderer->clearColor.g,renderer->clearColor.b);				
 				break;				
 				
-			case CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_0:
+			case CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_0:
 				setCGSpotLightDirectionParameter(renderer, param, 0);
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_1:
+			case CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_1:
 				setCGSpotLightDirectionParameter(renderer, param, 1);
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_2:
+			case CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_2:
 				setCGSpotLightDirectionParameter(renderer, param, 2);
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_3:
+			case CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_3:
 				setCGSpotLightDirectionParameter(renderer, param, 3);
 				break;
 				
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_0:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_0:
 				setCGAreaLightPositionParameter(renderer, param, 0);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_1:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_1:
 				setCGAreaLightPositionParameter(renderer, param, 1);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_2:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_2:
 				setCGAreaLightPositionParameter(renderer, param, 2);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_3:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_3:
 				setCGAreaLightPositionParameter(renderer, param, 3);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_4:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_4:
 				setCGAreaLightPositionParameter(renderer, param, 4);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_5:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_5:
 				setCGAreaLightPositionParameter(renderer, param, 5);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_6:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_6:
 				setCGAreaLightPositionParameter(renderer, param, 6);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_POSITION_7:
+			case CGProgramParam::POLY_AREA_LIGHT_POSITION_7:
 				setCGAreaLightPositionParameter(renderer, param, 7);
 				break;				
 				
-			case CGProgramParam::TAU_SPOT_LIGHT_POSITION_0:
+			case CGProgramParam::POLY_SPOT_LIGHT_POSITION_0:
 				setCGSpotLightPositionParameter(renderer, param, 0);
 				break;				
-			case CGProgramParam::TAU_SPOT_LIGHT_POSITION_1:
+			case CGProgramParam::POLY_SPOT_LIGHT_POSITION_1:
 				setCGSpotLightPositionParameter(renderer, param, 1);
 				break;				
-			case CGProgramParam::TAU_SPOT_LIGHT_POSITION_2:
+			case CGProgramParam::POLY_SPOT_LIGHT_POSITION_2:
 				setCGSpotLightPositionParameter(renderer, param, 2);
 				break;				
-			case CGProgramParam::TAU_SPOT_LIGHT_POSITION_3:
+			case CGProgramParam::POLY_SPOT_LIGHT_POSITION_3:
 				setCGSpotLightPositionParameter(renderer, param, 3);
 				break;				
 				
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_0:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_0:
 				setCGAreaLightColorParameter(renderer, param, 0);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_1:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_1:
 				setCGAreaLightColorParameter(renderer, param, 1);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_2:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_2:
 				setCGAreaLightColorParameter(renderer, param, 2);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_3:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_3:
 				setCGAreaLightColorParameter(renderer, param, 3);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_4:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_4:
 				setCGAreaLightColorParameter(renderer, param, 4);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_5:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_5:
 				setCGAreaLightColorParameter(renderer, param, 5);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_6:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_6:
 				setCGAreaLightColorParameter(renderer, param, 6);
 				break;
-			case CGProgramParam::TAU_AREA_LIGHT_COLOR_7:
+			case CGProgramParam::POLY_AREA_LIGHT_COLOR_7:
 				setCGAreaLightColorParameter(renderer, param, 7);
 				break;
 				
-			case CGProgramParam::TAU_SPOT_LIGHT_COLOR_0:
+			case CGProgramParam::POLY_SPOT_LIGHT_COLOR_0:
 				setCGSpotLightColorParameter(renderer, param, 0);
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_COLOR_1:
+			case CGProgramParam::POLY_SPOT_LIGHT_COLOR_1:
 				setCGSpotLightColorParameter(renderer, param, 1);
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_COLOR_2:
+			case CGProgramParam::POLY_SPOT_LIGHT_COLOR_2:
 				setCGSpotLightColorParameter(renderer, param, 2);
 				break;
-			case CGProgramParam::TAU_SPOT_LIGHT_COLOR_3:
+			case CGProgramParam::POLY_SPOT_LIGHT_COLOR_3:
 				setCGSpotLightColorParameter(renderer, param, 3);
 				break;				
 				
-			case CGProgramParam::TAU_MODELVIEW_MATRIX: {
+			case CGProgramParam::POLY_MODELVIEW_MATRIX: {
 				cgGLSetStateMatrixParameter(param.cgParam, CG_GL_MODELVIEW_MATRIX,CG_GL_MATRIX_IDENTITY); }
 				break;
-			case CGProgramParam::TAU_MODELVIEW_INVERSE_MATRIX:
+			case CGProgramParam::POLY_MODELVIEW_INVERSE_MATRIX:
 				cgGLSetStateMatrixParameter(param.cgParam, CG_GL_MODELVIEW_MATRIX,CG_GL_MATRIX_INVERSE_TRANSPOSE);
 				break;
-			case CGProgramParam::TAU_EXPOSURE_LEVEL:
+			case CGProgramParam::POLY_EXPOSURE_LEVEL:
 				cgGLSetParameter1f(param.cgParam, renderer->exposureLevel);
 				break;
 		}
@@ -409,89 +409,89 @@ void CGShaderModule::addParamToProgram(CGProgram *program,TiXmlNode *node) {
 		if(strcmp(node->ToElement()->Attribute("type"), "auto") == 0) {
 			isAuto = true;
 			String pid = node->ToElement()->Attribute("id");
-			if(pid == "TAU_MODELVIEWPROJ_MATRIX")
-				autoID = CGProgramParam::TAU_MODELVIEWPROJ_MATRIX;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_0")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_0;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_1")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_1;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_2")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_2;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_3")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_3;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_4")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_4;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_5")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_5;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_6")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_6;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_7")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_POSITION_7;
+			if(pid == "POLY_MODELVIEWPROJ_MATRIX")
+				autoID = CGProgramParam::POLY_MODELVIEWPROJ_MATRIX;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_0")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_0;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_1")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_1;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_2")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_2;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_3")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_3;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_4")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_4;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_5")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_5;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_6")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_6;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_7")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_POSITION_7;
 			
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_0")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_POSITION_0;
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_1")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_POSITION_1;
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_2")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_POSITION_2;
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_3")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_POSITION_3;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_0")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_POSITION_0;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_1")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_POSITION_1;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_2")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_POSITION_2;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_3")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_POSITION_3;
 			
 			
-			else if(pid == "TAU_AREA_LIGHT_COLOR_0")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_0;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_1")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_1;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_2")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_2;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_3")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_3;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_4")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_4;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_5")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_5;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_6")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_6;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_7")
-				autoID = CGProgramParam::TAU_AREA_LIGHT_COLOR_7;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_0")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_0;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_1")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_1;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_2")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_2;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_3")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_3;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_4")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_4;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_5")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_5;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_6")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_6;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_7")
+				autoID = CGProgramParam::POLY_AREA_LIGHT_COLOR_7;
 			
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_0")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_COLOR_0;
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_1")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_COLOR_1;
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_2")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_COLOR_2;
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_3")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_COLOR_3;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_0")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_COLOR_0;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_1")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_COLOR_1;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_2")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_COLOR_2;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_3")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_COLOR_3;
 			
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_0")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_0;		
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_1")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_1;		
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_2")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_2;		
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_3")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_DIRECTION_3;
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_0")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_0;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_1")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_1;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_2")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_2;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_3")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_DIRECTION_3;
 			
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_0")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_0;
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_1")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_1;
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_2")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_2;
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_3")
-				autoID = CGProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_3;		
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_0")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_0;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_1")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_1;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_2")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_2;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_3")
+				autoID = CGProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_3;		
 			
-			else if(pid == "TAU_MODELVIEW_MATRIX")
-				autoID = CGProgramParam::TAU_MODELVIEW_MATRIX;
-			else if(pid == "TAU_MODELVIEW_INVERSE_MATRIX")
-				autoID = CGProgramParam::TAU_MODELVIEW_INVERSE_MATRIX;
-			else if(pid == "TAU_EXPOSURE_LEVEL")
-				autoID = CGProgramParam::TAU_EXPOSURE_LEVEL;
-			else if(pid == "TAU_CLEARCOLOR")
-				autoID = CGProgramParam::TAU_CLEARCOLOR;		
-			else if(pid == "TAU_AMBIENTCOLOR")
-				autoID = CGProgramParam::TAU_AMBIENTCOLOR;				
+			else if(pid == "POLY_MODELVIEW_MATRIX")
+				autoID = CGProgramParam::POLY_MODELVIEW_MATRIX;
+			else if(pid == "POLY_MODELVIEW_INVERSE_MATRIX")
+				autoID = CGProgramParam::POLY_MODELVIEW_INVERSE_MATRIX;
+			else if(pid == "POLY_EXPOSURE_LEVEL")
+				autoID = CGProgramParam::POLY_EXPOSURE_LEVEL;
+			else if(pid == "POLY_CLEARCOLOR")
+				autoID = CGProgramParam::POLY_CLEARCOLOR;		
+			else if(pid == "POLY_AMBIENTCOLOR")
+				autoID = CGProgramParam::POLY_AMBIENTCOLOR;				
 			else
 				isAuto = false;
 		} else {

+ 39 - 39
Modules/Contents/GLSL/Include/PolyGLSLProgram.h

@@ -59,47 +59,47 @@ class _PolyExport GLSLProgramParam {
 	
 	static void *createParamData(int *retType, String type, String value);
 	
-	static const int TAU_MODELVIEWPROJ_MATRIX = 0;
-	static const int TAU_MODELVIEW_MATRIX = 2;
-	static const int TAU_MODELVIEW_INVERSE_MATRIX = 3;
-	static const int TAU_EXPOSURE_LEVEL = 7;
-	static const int TAU_CLEARCOLOR = 10;
-	static const int TAU_AMBIENTCOLOR = 11;	
+	static const int POLY_MODELVIEWPROJ_MATRIX = 0;
+	static const int POLY_MODELVIEW_MATRIX = 2;
+	static const int POLY_MODELVIEW_INVERSE_MATRIX = 3;
+	static const int POLY_EXPOSURE_LEVEL = 7;
+	static const int POLY_CLEARCOLOR = 10;
+	static const int POLY_AMBIENTCOLOR = 11;	
 	
-	static const int TAU_AREA_LIGHT_POSITION_0 = 12;
-	static const int TAU_AREA_LIGHT_COLOR_0 = 13;	
-	static const int TAU_AREA_LIGHT_POSITION_1 = 14;
-	static const int TAU_AREA_LIGHT_COLOR_1 = 15;	
-	static const int TAU_AREA_LIGHT_POSITION_2 = 16;
-	static const int TAU_AREA_LIGHT_COLOR_2 = 17;	
-	static const int TAU_AREA_LIGHT_POSITION_3 = 18;
-	static const int TAU_AREA_LIGHT_COLOR_3 = 19;	
-	static const int TAU_AREA_LIGHT_POSITION_4 = 20;
-	static const int TAU_AREA_LIGHT_COLOR_4 = 21;	
-	static const int TAU_AREA_LIGHT_POSITION_5 = 22;
-	static const int TAU_AREA_LIGHT_COLOR_5 = 23;	
-	static const int TAU_AREA_LIGHT_POSITION_6 = 24;
-	static const int TAU_AREA_LIGHT_COLOR_6 = 25;	
-	static const int TAU_AREA_LIGHT_POSITION_7 = 26;
-	static const int TAU_AREA_LIGHT_COLOR_7 = 27;	
-
-	static const int TAU_SPOT_LIGHT_POSITION_0 = 30;
-	static const int TAU_SPOT_LIGHT_COLOR_0 = 31;
-	static const int TAU_SPOT_LIGHT_DIRECTION_0 = 32;
-	static const int TAU_SPOT_LIGHT_POSITION_1 = 33;
-	static const int TAU_SPOT_LIGHT_COLOR_1 = 34;
-	static const int TAU_SPOT_LIGHT_DIRECTION_1 = 35;
-	static const int TAU_SPOT_LIGHT_POSITION_2 = 36;
-	static const int TAU_SPOT_LIGHT_COLOR_2 = 37;
-	static const int TAU_SPOT_LIGHT_DIRECTION_2 = 38;
-	static const int TAU_SPOT_LIGHT_POSITION_3 = 39;
-	static const int TAU_SPOT_LIGHT_COLOR_3 = 40;
-	static const int TAU_SPOT_LIGHT_DIRECTION_3 = 41;
+	static const int POLY_AREA_LIGHT_POSITION_0 = 12;
+	static const int POLY_AREA_LIGHT_COLOR_0 = 13;	
+	static const int POLY_AREA_LIGHT_POSITION_1 = 14;
+	static const int POLY_AREA_LIGHT_COLOR_1 = 15;	
+	static const int POLY_AREA_LIGHT_POSITION_2 = 16;
+	static const int POLY_AREA_LIGHT_COLOR_2 = 17;	
+	static const int POLY_AREA_LIGHT_POSITION_3 = 18;
+	static const int POLY_AREA_LIGHT_COLOR_3 = 19;	
+	static const int POLY_AREA_LIGHT_POSITION_4 = 20;
+	static const int POLY_AREA_LIGHT_COLOR_4 = 21;	
+	static const int POLY_AREA_LIGHT_POSITION_5 = 22;
+	static const int POLY_AREA_LIGHT_COLOR_5 = 23;	
+	static const int POLY_AREA_LIGHT_POSITION_6 = 24;
+	static const int POLY_AREA_LIGHT_COLOR_6 = 25;	
+	static const int POLY_AREA_LIGHT_POSITION_7 = 26;
+	static const int POLY_AREA_LIGHT_COLOR_7 = 27;	
+
+	static const int POLY_SPOT_LIGHT_POSITION_0 = 30;
+	static const int POLY_SPOT_LIGHT_COLOR_0 = 31;
+	static const int POLY_SPOT_LIGHT_DIRECTION_0 = 32;
+	static const int POLY_SPOT_LIGHT_POSITION_1 = 33;
+	static const int POLY_SPOT_LIGHT_COLOR_1 = 34;
+	static const int POLY_SPOT_LIGHT_DIRECTION_1 = 35;
+	static const int POLY_SPOT_LIGHT_POSITION_2 = 36;
+	static const int POLY_SPOT_LIGHT_COLOR_2 = 37;
+	static const int POLY_SPOT_LIGHT_DIRECTION_2 = 38;
+	static const int POLY_SPOT_LIGHT_POSITION_3 = 39;
+	static const int POLY_SPOT_LIGHT_COLOR_3 = 40;
+	static const int POLY_SPOT_LIGHT_DIRECTION_3 = 41;
 	
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_0 = 42;	
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_1 = 43;
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_2 = 44;
-	static const int TAU_SPOT_LIGHT_TEXTUREMATRIX_3 = 45;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_0 = 42;	
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_1 = 43;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_2 = 44;
+	static const int POLY_SPOT_LIGHT_TEXTUREMATRIX_3 = 45;
 	
 	static const int PARAM_UNKNOWN = 0;	
 	static const int PARAM_Number = 1;

+ 114 - 116
Modules/Contents/GLSL/Source/PolyGLSLShaderModule.cpp

@@ -201,127 +201,127 @@ void GLSLShaderModule::setGLSLSpotLightTextureMatrixParameter(Renderer *renderer
 void GLSLShaderModule::updateGLSLParam(Renderer *renderer, GLSLProgramParam &param, ShaderBinding *materialOptions, ShaderBinding *localOptions) {
 	if(param.isAuto) {
 		switch(param.autoID) {
-			case GLSLProgramParam::TAU_MODELVIEWPROJ_MATRIX:
+			case GLSLProgramParam::POLY_MODELVIEWPROJ_MATRIX:
 //				cgGLSetStateMatrixParameter(param.cgParam, GLSL_GL_MODELVIEW_PROJECTION_MATRIX,GLSL_GL_MATRIX_IDENTITY);
 				break;
 				
-			case GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_0:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_0:
 				setGLSLSpotLightTextureMatrixParameter(renderer, param, 0);					
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_1:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_1:
 				setGLSLSpotLightTextureMatrixParameter(renderer, param, 1);					
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_2:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_2:
 				setGLSLSpotLightTextureMatrixParameter(renderer, param, 2);					
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_3:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_3:
 				setGLSLSpotLightTextureMatrixParameter(renderer, param, 3);					
 				break;
 				
 				
-			case GLSLProgramParam::TAU_AMBIENTCOLOR:
+			case GLSLProgramParam::POLY_AMBIENTCOLOR:
 //				cgGLSetParameter3f(param.cgParam, renderer->ambientColor.r,renderer->ambientColor.g,renderer->ambientColor.b);
 				break;
-			case GLSLProgramParam::TAU_CLEARCOLOR:
+			case GLSLProgramParam::POLY_CLEARCOLOR:
 //				cgGLSetParameter3f(param.cgParam, renderer->clearColor.r,renderer->clearColor.g,renderer->clearColor.b);				
 				break;				
 				
-			case GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_0:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_0:
 				setGLSLSpotLightDirectionParameter(renderer, param, 0);
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_1:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_1:
 				setGLSLSpotLightDirectionParameter(renderer, param, 1);
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_2:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_2:
 				setGLSLSpotLightDirectionParameter(renderer, param, 2);
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_3:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_3:
 				setGLSLSpotLightDirectionParameter(renderer, param, 3);
 				break;
 				
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_0:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_0:
 				setGLSLAreaLightPositionParameter(renderer, param, 0);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_1:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_1:
 				setGLSLAreaLightPositionParameter(renderer, param, 1);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_2:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_2:
 				setGLSLAreaLightPositionParameter(renderer, param, 2);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_3:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_3:
 				setGLSLAreaLightPositionParameter(renderer, param, 3);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_4:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_4:
 				setGLSLAreaLightPositionParameter(renderer, param, 4);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_5:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_5:
 				setGLSLAreaLightPositionParameter(renderer, param, 5);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_6:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_6:
 				setGLSLAreaLightPositionParameter(renderer, param, 6);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_POSITION_7:
+			case GLSLProgramParam::POLY_AREA_LIGHT_POSITION_7:
 				setGLSLAreaLightPositionParameter(renderer, param, 7);
 				break;				
 				
-			case GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_0:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_0:
 				setGLSLSpotLightPositionParameter(renderer, param, 0);
 				break;				
-			case GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_1:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_1:
 				setGLSLSpotLightPositionParameter(renderer, param, 1);
 				break;				
-			case GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_2:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_2:
 				setGLSLSpotLightPositionParameter(renderer, param, 2);
 				break;				
-			case GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_3:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_3:
 				setGLSLSpotLightPositionParameter(renderer, param, 3);
 				break;				
 				
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_0:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_0:
 				setGLSLAreaLightColorParameter(renderer, param, 0);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_1:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_1:
 				setGLSLAreaLightColorParameter(renderer, param, 1);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_2:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_2:
 				setGLSLAreaLightColorParameter(renderer, param, 2);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_3:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_3:
 				setGLSLAreaLightColorParameter(renderer, param, 3);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_4:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_4:
 				setGLSLAreaLightColorParameter(renderer, param, 4);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_5:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_5:
 				setGLSLAreaLightColorParameter(renderer, param, 5);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_6:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_6:
 				setGLSLAreaLightColorParameter(renderer, param, 6);
 				break;
-			case GLSLProgramParam::TAU_AREA_LIGHT_COLOR_7:
+			case GLSLProgramParam::POLY_AREA_LIGHT_COLOR_7:
 				setGLSLAreaLightColorParameter(renderer, param, 7);
 				break;
 				
-			case GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_0:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_0:
 				setGLSLSpotLightColorParameter(renderer, param, 0);
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_1:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_1:
 				setGLSLSpotLightColorParameter(renderer, param, 1);
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_2:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_2:
 				setGLSLSpotLightColorParameter(renderer, param, 2);
 				break;
-			case GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_3:
+			case GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_3:
 				setGLSLSpotLightColorParameter(renderer, param, 3);
 				break;				
 				
-			case GLSLProgramParam::TAU_MODELVIEW_MATRIX: 
+			case GLSLProgramParam::POLY_MODELVIEW_MATRIX: 
 //				cgGLSetStateMatrixParameter(param.cgParam, GLSL_GL_MODELVIEW_MATRIX,GLSL_GL_MATRIX_IDENTITY); }
 				break;
-			case GLSLProgramParam::TAU_MODELVIEW_INVERSE_MATRIX:
+			case GLSLProgramParam::POLY_MODELVIEW_INVERSE_MATRIX:
 //				cgGLSetStateMatrixParameter(param.cgParam, GLSL_GL_MODELVIEW_MATRIX,GLSL_GL_MATRIX_INVERSE_TRANSPOSE);
 				break;
-			case GLSLProgramParam::TAU_EXPOSURE_LEVEL:
+			case GLSLProgramParam::POLY_EXPOSURE_LEVEL:
 //				cgGLSetParameter1f(param.cgParam, renderer->exposureLevel);
 				break;
 		}
@@ -378,8 +378,6 @@ bool GLSLShaderModule::applyShaderMaterial(Renderer *renderer, Material *materia
 		glBindTexture(GL_TEXTURE_2D, ((OpenGLTexture*)cgBinding->textures[i].texture)->getTextureID());	
 		textureIndex++;
 	}	
-		
-	
 
 	//			Logger::log("applying %s (%s %s)\n", material->getShader()->getName().c_str(), cgShader->vp->getResourceName().c_str(), cgShader->fp->getResourceName().c_str());
 		
@@ -437,89 +435,89 @@ void GLSLShaderModule::addParamToProgram(GLSLProgram *program,TiXmlNode *node) {
 		if(strcmp(node->ToElement()->Attribute("type"), "auto") == 0) {
 			isAuto = true;
 			String pid = node->ToElement()->Attribute("id");
-			if(pid == "TAU_MODELVIEWPROJ_MATRIX")
-				autoID = GLSLProgramParam::TAU_MODELVIEWPROJ_MATRIX;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_0")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_0;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_1")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_1;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_2")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_2;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_3")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_3;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_4")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_4;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_5")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_5;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_6")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_6;
-			else if(pid == "TAU_AREA_LIGHT_POSITION_7")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_POSITION_7;
+			if(pid == "POLY_MODELVIEWPROJ_MATRIX")
+				autoID = GLSLProgramParam::POLY_MODELVIEWPROJ_MATRIX;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_0")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_0;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_1")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_1;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_2")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_2;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_3")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_3;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_4")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_4;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_5")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_5;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_6")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_6;
+			else if(pid == "POLY_AREA_LIGHT_POSITION_7")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_POSITION_7;
 			
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_0")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_0;
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_1")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_1;
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_2")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_2;
-			else if(pid == "TAU_SPOT_LIGHT_POSITION_3")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_POSITION_3;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_0;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_1;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_2;
+			else if(pid == "POLY_SPOT_LIGHT_POSITION_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_POSITION_3;
 			
 			
-			else if(pid == "TAU_AREA_LIGHT_COLOR_0")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_0;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_1")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_1;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_2")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_2;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_3")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_3;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_4")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_4;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_5")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_5;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_6")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_6;
-			else if(pid == "TAU_AREA_LIGHT_COLOR_7")
-				autoID = GLSLProgramParam::TAU_AREA_LIGHT_COLOR_7;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_0")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_0;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_1")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_1;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_2")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_2;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_3")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_3;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_4")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_4;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_5")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_5;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_6")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_6;
+			else if(pid == "POLY_AREA_LIGHT_COLOR_7")
+				autoID = GLSLProgramParam::POLY_AREA_LIGHT_COLOR_7;
 			
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_0")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_0;
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_1")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_1;
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_2")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_2;
-			else if(pid == "TAU_SPOT_LIGHT_COLOR_3")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_COLOR_3;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_0;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_1;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_2;
+			else if(pid == "POLY_SPOT_LIGHT_COLOR_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_COLOR_3;
 			
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_0")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_0;		
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_1")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_1;		
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_2")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_2;		
-			else if(pid == "TAU_SPOT_LIGHT_DIRECTION_3")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_DIRECTION_3;
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_0;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_1;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_2;		
+			else if(pid == "POLY_SPOT_LIGHT_DIRECTION_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_DIRECTION_3;
 			
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_0")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_0;
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_1")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_1;
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_2")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_2;
-			else if(pid == "TAU_SPOT_LIGHT_TEXTUREMATRIX_3")
-				autoID = GLSLProgramParam::TAU_SPOT_LIGHT_TEXTUREMATRIX_3;		
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_0")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_0;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_1")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_1;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_2")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_2;
+			else if(pid == "POLY_SPOT_LIGHT_TEXTUREMATRIX_3")
+				autoID = GLSLProgramParam::POLY_SPOT_LIGHT_TEXTUREMATRIX_3;		
 			
-			else if(pid == "TAU_MODELVIEW_MATRIX")
-				autoID = GLSLProgramParam::TAU_MODELVIEW_MATRIX;
-			else if(pid == "TAU_MODELVIEW_INVERSE_MATRIX")
-				autoID = GLSLProgramParam::TAU_MODELVIEW_INVERSE_MATRIX;
-			else if(pid == "TAU_EXPOSURE_LEVEL")
-				autoID = GLSLProgramParam::TAU_EXPOSURE_LEVEL;
-			else if(pid == "TAU_CLEARCOLOR")
-				autoID = GLSLProgramParam::TAU_CLEARCOLOR;		
-			else if(pid == "TAU_AMBIENTCOLOR")
-				autoID = GLSLProgramParam::TAU_AMBIENTCOLOR;				
+			else if(pid == "POLY_MODELVIEW_MATRIX")
+				autoID = GLSLProgramParam::POLY_MODELVIEW_MATRIX;
+			else if(pid == "POLY_MODELVIEW_INVERSE_MATRIX")
+				autoID = GLSLProgramParam::POLY_MODELVIEW_INVERSE_MATRIX;
+			else if(pid == "POLY_EXPOSURE_LEVEL")
+				autoID = GLSLProgramParam::POLY_EXPOSURE_LEVEL;
+			else if(pid == "POLY_CLEARCOLOR")
+				autoID = GLSLProgramParam::POLY_CLEARCOLOR;		
+			else if(pid == "POLY_AMBIENTCOLOR")
+				autoID = GLSLProgramParam::POLY_AMBIENTCOLOR;				
 			else
 				isAuto = false;
 		} else {

+ 23 - 23
Modules/Contents/UI/Source/PolyUITextInput.cpp

@@ -536,29 +536,29 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 	
 	CoreInput *input = CoreServices::getInstance()->getCore()->getInput();	
 
-	if(key == TAUK_a && (input->getKeyState(TAUK_LSUPER) || input->getKeyState(TAUK_RSUPER))) {
+	if(key == KEY_a && (input->getKeyState(KEY_LSUPER) || input->getKeyState(KEY_RSUPER))) {
 		selectAll();
 		return;
 	}
 
-	if(key == TAUK_c && (input->getKeyState(TAUK_LSUPER) || input->getKeyState(TAUK_RSUPER))) {
+	if(key == KEY_c && (input->getKeyState(KEY_LSUPER) || input->getKeyState(KEY_RSUPER))) {
 		CoreServices::getInstance()->getCore()->copyStringToClipboard(getSelectionText());
 		return;
 	}
 
-	if(key == TAUK_x && (input->getKeyState(TAUK_LSUPER) || input->getKeyState(TAUK_RSUPER))) {
+	if(key == KEY_x && (input->getKeyState(KEY_LSUPER) || input->getKeyState(KEY_RSUPER))) {
 		return;
 	}
 
-	if(key == TAUK_v && (input->getKeyState(TAUK_LSUPER) || input->getKeyState(TAUK_RSUPER))) {
+	if(key == KEY_v && (input->getKeyState(KEY_LSUPER) || input->getKeyState(KEY_RSUPER))) {
 		insertText(CoreServices::getInstance()->getCore()->getClipboardString());
 		return;
 	}	
 	
 	
-	if(key == TAUK_LEFT) {
-		if(input->getKeyState(TAUK_LSUPER) || input->getKeyState(TAUK_RSUPER)) {
-			if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {
+	if(key == KEY_LEFT) {
+		if(input->getKeyState(KEY_LSUPER) || input->getKeyState(KEY_RSUPER)) {
+			if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {
 				if(hasSelection) {
 					setSelection(this->lineOffset, selectionLine, this->caretPosition, 0);					
 				} else {
@@ -569,8 +569,8 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 				clearSelection();				
 				updateCaretPosition();
 			}
-		} else if (input->getKeyState(TAUK_LALT) || input->getKeyState(TAUK_RALT)) {
-			if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {
+		} else if (input->getKeyState(KEY_LALT) || input->getKeyState(KEY_RALT)) {
+			if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {
 				if(hasSelection) {
 					setSelection(this->lineOffset, selectionLine, this->caretPosition, caretSkipWordBack(selectionLine, selectionCaretPosition));
 				} else {
@@ -583,7 +583,7 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 			}
 		} else {
 			if(caretPosition > 0) {
-				if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {
+				if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {
 					if(hasSelection) {
 						if(selectionCaretPosition > 0)
 							setSelection(this->lineOffset, selectionLine, this->caretPosition, selectionCaretPosition-1);
@@ -600,10 +600,10 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 		return;
 	}
 	
-	if(key == TAUK_RIGHT) {
+	if(key == KEY_RIGHT) {
 		if(caretPosition < currentLine->getText().length()) {			
-			if(input->getKeyState(TAUK_LSUPER) || input->getKeyState(TAUK_RSUPER)) {
-				if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {
+			if(input->getKeyState(KEY_LSUPER) || input->getKeyState(KEY_RSUPER)) {
+				if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {
 					if(hasSelection) {
 						setSelection(this->lineOffset, selectionLine, this->caretPosition, lines[selectionLine]->getText().length());					
 					} else {
@@ -613,8 +613,8 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 					caretPosition = currentLine->getText().length();
 					clearSelection();
 				}				
-			} else if (input->getKeyState(TAUK_LALT) || input->getKeyState(TAUK_RALT)) {
-				if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {
+			} else if (input->getKeyState(KEY_LALT) || input->getKeyState(KEY_RALT)) {
+				if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {
 					if(hasSelection) {
 						setSelection(this->lineOffset, selectionLine, this->caretPosition, caretSkipWordForward(selectionLine, selectionCaretPosition));
 					} else {
@@ -625,7 +625,7 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 					clearSelection();					
 				}				
 			} else {
-				if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {
+				if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {
 					if(hasSelection) {
 						setSelection(this->lineOffset, selectionLine, this->caretPosition, selectionCaretPosition+1);
 					} else {
@@ -641,9 +641,9 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 		return;
 	}
 	
-	if(key == TAUK_UP) {		
+	if(key == KEY_UP) {		
 		if(multiLine) {
-			if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {			
+			if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {			
 				if(hasSelection) {
 					if(selectionLine > 0)
 						setSelection(this->lineOffset, selectionLine-1, this->caretPosition, selectionCaretPosition);
@@ -664,9 +664,9 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 		return;
 	}
 	
-	if(key == TAUK_DOWN) {
+	if(key == KEY_DOWN) {
 		if(multiLine) {
-			if(input->getKeyState(TAUK_LSHIFT) || input->getKeyState(TAUK_RSHIFT)) {			
+			if(input->getKeyState(KEY_LSHIFT) || input->getKeyState(KEY_RSHIFT)) {			
 				if(hasSelection) {
 					if(selectionLine < lines.size()-1)
 						setSelection(this->lineOffset, selectionLine+1, this->caretPosition, selectionCaretPosition);
@@ -688,7 +688,7 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 	}
 	
 	
-	if(key == TAUK_RETURN) {
+	if(key == KEY_RETURN) {
 		if(hasSelection)
 			deleteSelection();		
 		if(multiLine) {
@@ -712,7 +712,7 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 		caretPosition++;
 	}
 	
-	if(key == TAUK_TAB && multiLine) {
+	if(key == KEY_TAB && multiLine) {
 		if(hasSelection)
 			deleteSelection();		
 		ctext = currentLine->getText();				
@@ -722,7 +722,7 @@ void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
 		caretPosition++;		
 	}
 	
-	if(key == TAUK_BACKSPACE) {
+	if(key == KEY_BACKSPACE) {
 		if(hasSelection) {
 			deleteSelection();
 			return;

+ 2 - 2
Modules/Contents/UI/Source/PolyUIWindow.cpp

@@ -78,13 +78,13 @@ UIWindow::~UIWindow() {
 
 void UIWindow::onKeyDown(TAUKey key, wchar_t charCode) {
 	
-	if(key == TAUK_TAB) {
+	if(key == KEY_TAB) {
 		if(hasFocus) {
 			focusNextChild();
 		}
 	}
 	
-	if(key == TAUK_ESCAPE && closeOnEscape) {
+	if(key == KEY_ESCAPE && closeOnEscape) {
 		onClose();
 		dispatchEvent(new UIEvent(), UIEvent::CLOSE_EVENT);		
 	}

+ 413 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/project.pbxproj

@@ -0,0 +1,413 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		6DE45BB9138DA66C000BDFBA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BB8138DA66C000BDFBA /* Cocoa.framework */; };
+		6DE45BC3138DA66C000BDFBA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6DE45BC1138DA66C000BDFBA /* InfoPlist.strings */; };
+		6DE45BC6138DA66C000BDFBA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45BC5138DA66C000BDFBA /* main.m */; };
+		6DE45BCC138DA66C000BDFBA /* StandalonePlayerAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45BCB138DA66C000BDFBA /* StandalonePlayerAppDelegate.mm */; };
+		6DE45BCF138DA66C000BDFBA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6DE45BCD138DA66C000BDFBA /* MainMenu.xib */; };
+		6DE45BDD138DA6A6000BDFBA /* liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BD5138DA6A6000BDFBA /* liblua.a */; };
+		6DE45BDE138DA6A6000BDFBA /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BD6138DA6A6000BDFBA /* IOKit.framework */; };
+		6DE45BDF138DA6A6000BDFBA /* libphysfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BD7138DA6A6000BDFBA /* libphysfs.a */; };
+		6DE45BE0138DA6A6000BDFBA /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BD8138DA6A6000BDFBA /* libfreetype.a */; };
+		6DE45BE1138DA6A6000BDFBA /* libz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BD9138DA6A6000BDFBA /* libz.a */; };
+		6DE45BE2138DA6A6000BDFBA /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BDA138DA6A6000BDFBA /* libpng.a */; };
+		6DE45BE3138DA6A6000BDFBA /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BDB138DA6A6000BDFBA /* OpenAL.framework */; };
+		6DE45BE4138DA6A6000BDFBA /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BDC138DA6A6000BDFBA /* OpenGL.framework */; };
+		6DE45BF0138DA6C3000BDFBA /* libogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BED138DA6C3000BDFBA /* libogg.a */; };
+		6DE45BF1138DA6C3000BDFBA /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BEE138DA6C3000BDFBA /* libvorbis.a */; };
+		6DE45BF2138DA6C3000BDFBA /* libvorbisfile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BEF138DA6C3000BDFBA /* libvorbisfile.a */; };
+		6DE45BF6138DA6F8000BDFBA /* libPolycodeGLSL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BF3138DA6F8000BDFBA /* libPolycodeGLSL.a */; };
+		6DE45BF7138DA6F8000BDFBA /* libPolyCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BF4138DA6F8000BDFBA /* libPolyCore.a */; };
+		6DE45BF8138DA6F8000BDFBA /* libPolycodeLUA.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE45BF5138DA6F8000BDFBA /* libPolycodeLUA.a */; };
+		6DE45BFB138DA707000BDFBA /* PolycodeView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45BFA138DA707000BDFBA /* PolycodeView.mm */; };
+		6DE45BFE138DA70E000BDFBA /* PolycodeCocoaPlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45BFC138DA70E000BDFBA /* PolycodeCocoaPlayer.mm */; };
+		6DE45C01138DA717000BDFBA /* PolycodePlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6DE45BFF138DA717000BDFBA /* PolycodePlayer.mm */; };
+		6DE45C12138DAE6F000BDFBA /* player_icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 6DE45C11138DAE6F000BDFBA /* player_icon.icns */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		6DE45BB4138DA66C000BDFBA /* StandalonePlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StandalonePlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		6DE45BB8138DA66C000BDFBA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+		6DE45BBB138DA66C000BDFBA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		6DE45BBC138DA66C000BDFBA /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+		6DE45BBD138DA66C000BDFBA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		6DE45BC0138DA66C000BDFBA /* StandalonePlayer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "StandalonePlayer-Info.plist"; sourceTree = "<group>"; };
+		6DE45BC2138DA66C000BDFBA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		6DE45BC4138DA66C000BDFBA /* StandalonePlayer-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StandalonePlayer-Prefix.pch"; sourceTree = "<group>"; };
+		6DE45BC5138DA66C000BDFBA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		6DE45BCA138DA66C000BDFBA /* StandalonePlayerAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StandalonePlayerAppDelegate.h; sourceTree = "<group>"; };
+		6DE45BCB138DA66C000BDFBA /* StandalonePlayerAppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = StandalonePlayerAppDelegate.mm; sourceTree = "<group>"; };
+		6DE45BCE138DA66C000BDFBA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
+		6DE45BD5138DA6A6000BDFBA /* liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblua.a; path = ../../../../Core/Dependencies/lua/src/liblua.a; sourceTree = "<group>"; };
+		6DE45BD6138DA6A6000BDFBA /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
+		6DE45BD7138DA6A6000BDFBA /* libphysfs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libphysfs.a; path = ../../../../Core/Dependencies/physfs/Debug/libphysfs.a; sourceTree = "<group>"; };
+		6DE45BD8138DA6A6000BDFBA /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../../../../Core/Dependencies/freetype/libfreetype.a; sourceTree = "<group>"; };
+		6DE45BD9138DA6A6000BDFBA /* libz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libz.a; path = ../../../../Core/Dependencies/zlib/libz.a; sourceTree = "<group>"; };
+		6DE45BDA138DA6A6000BDFBA /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = ../../../../Core/Dependencies/libpng/libpng.a; sourceTree = "<group>"; };
+		6DE45BDB138DA6A6000BDFBA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
+		6DE45BDC138DA6A6000BDFBA /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = ../../../../../../../../../System/Library/Frameworks/OpenGL.framework; sourceTree = "<group>"; };
+		6DE45BED138DA6C3000BDFBA /* libogg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libogg.a; path = "../../../../Release/Mac OS X/Framework/Dependencies/Lib/libogg.a"; sourceTree = "<group>"; };
+		6DE45BEE138DA6C3000BDFBA /* libvorbis.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvorbis.a; path = "../../../../Release/Mac OS X/Framework/Dependencies/Lib/libvorbis.a"; sourceTree = "<group>"; };
+		6DE45BEF138DA6C3000BDFBA /* libvorbisfile.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvorbisfile.a; path = "../../../../Release/Mac OS X/Framework/Dependencies/Lib/libvorbisfile.a"; sourceTree = "<group>"; };
+		6DE45BF3138DA6F8000BDFBA /* libPolycodeGLSL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPolycodeGLSL.a; path = "../../../../../../../Library/Developer/Xcode/DerivedData/Modules-epduxiffqrcazabvaazmexadjpgk/Build/Products/Debug/libPolycodeGLSL.a"; sourceTree = "<group>"; };
+		6DE45BF4138DA6F8000BDFBA /* libPolyCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPolyCore.a; path = "../../../../../../../Library/Developer/Xcode/DerivedData/PolyCore-ecbhldydhvplehavgvhjdlapyvwd/Build/Products/Debug/libPolyCore.a"; sourceTree = "<group>"; };
+		6DE45BF5138DA6F8000BDFBA /* libPolycodeLUA.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPolycodeLUA.a; path = "../../../../../../../Library/Developer/Xcode/DerivedData/Bindings-bojbiqnjfgqgjpgcdihwtncgpnvk/Build/Products/Debug/libPolycodeLUA.a"; sourceTree = "<group>"; };
+		6DE45BF9138DA707000BDFBA /* PolycodeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PolycodeView.h; path = "../../../../../Release/Mac OS X/Framework/Core/PolycodeView/PolycodeView.h"; sourceTree = "<group>"; };
+		6DE45BFA138DA707000BDFBA /* PolycodeView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PolycodeView.mm; path = "../../../../../Release/Mac OS X/Framework/Core/PolycodeView/PolycodeView.mm"; sourceTree = "<group>"; };
+		6DE45BFC138DA70E000BDFBA /* PolycodeCocoaPlayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PolycodeCocoaPlayer.mm; path = ../../../../Contents/Source/PolycodeCocoaPlayer.mm; sourceTree = "<group>"; };
+		6DE45BFD138DA70E000BDFBA /* PolycodeCocoaPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PolycodeCocoaPlayer.h; path = ../../../../Contents/Include/PolycodeCocoaPlayer.h; sourceTree = "<group>"; };
+		6DE45BFF138DA717000BDFBA /* PolycodePlayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PolycodePlayer.mm; path = ../../../../Contents/Source/PolycodePlayer.mm; sourceTree = "<group>"; };
+		6DE45C00138DA717000BDFBA /* PolycodePlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PolycodePlayer.h; path = ../../../../Contents/Include/PolycodePlayer.h; sourceTree = "<group>"; };
+		6DE45C11138DAE6F000BDFBA /* player_icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = player_icon.icns; path = ../../../../../Assets/Icons/player_icon.icns; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		6DE45BB1138DA66C000BDFBA /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				6DE45BB9138DA66C000BDFBA /* Cocoa.framework in Frameworks */,
+				6DE45BDD138DA6A6000BDFBA /* liblua.a in Frameworks */,
+				6DE45BDE138DA6A6000BDFBA /* IOKit.framework in Frameworks */,
+				6DE45BDF138DA6A6000BDFBA /* libphysfs.a in Frameworks */,
+				6DE45BE0138DA6A6000BDFBA /* libfreetype.a in Frameworks */,
+				6DE45BE1138DA6A6000BDFBA /* libz.a in Frameworks */,
+				6DE45BE2138DA6A6000BDFBA /* libpng.a in Frameworks */,
+				6DE45BE3138DA6A6000BDFBA /* OpenAL.framework in Frameworks */,
+				6DE45BE4138DA6A6000BDFBA /* OpenGL.framework in Frameworks */,
+				6DE45BF0138DA6C3000BDFBA /* libogg.a in Frameworks */,
+				6DE45BF1138DA6C3000BDFBA /* libvorbis.a in Frameworks */,
+				6DE45BF2138DA6C3000BDFBA /* libvorbisfile.a in Frameworks */,
+				6DE45BF6138DA6F8000BDFBA /* libPolycodeGLSL.a in Frameworks */,
+				6DE45BF7138DA6F8000BDFBA /* libPolyCore.a in Frameworks */,
+				6DE45BF8138DA6F8000BDFBA /* libPolycodeLUA.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		6DE45BA9138DA66C000BDFBA = {
+			isa = PBXGroup;
+			children = (
+				6DE45BBE138DA66C000BDFBA /* StandalonePlayer */,
+				6DE45BB7138DA66C000BDFBA /* Frameworks */,
+				6DE45BB5138DA66C000BDFBA /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		6DE45BB5138DA66C000BDFBA /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				6DE45BB4138DA66C000BDFBA /* StandalonePlayer.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		6DE45BB7138DA66C000BDFBA /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				6DE45BF3138DA6F8000BDFBA /* libPolycodeGLSL.a */,
+				6DE45BF4138DA6F8000BDFBA /* libPolyCore.a */,
+				6DE45BF5138DA6F8000BDFBA /* libPolycodeLUA.a */,
+				6DE45BED138DA6C3000BDFBA /* libogg.a */,
+				6DE45BEE138DA6C3000BDFBA /* libvorbis.a */,
+				6DE45BEF138DA6C3000BDFBA /* libvorbisfile.a */,
+				6DE45BD5138DA6A6000BDFBA /* liblua.a */,
+				6DE45BD6138DA6A6000BDFBA /* IOKit.framework */,
+				6DE45BD7138DA6A6000BDFBA /* libphysfs.a */,
+				6DE45BD8138DA6A6000BDFBA /* libfreetype.a */,
+				6DE45BD9138DA6A6000BDFBA /* libz.a */,
+				6DE45BDA138DA6A6000BDFBA /* libpng.a */,
+				6DE45BDB138DA6A6000BDFBA /* OpenAL.framework */,
+				6DE45BDC138DA6A6000BDFBA /* OpenGL.framework */,
+				6DE45BB8138DA66C000BDFBA /* Cocoa.framework */,
+				6DE45BBA138DA66C000BDFBA /* Other Frameworks */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		6DE45BBA138DA66C000BDFBA /* Other Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				6DE45BBB138DA66C000BDFBA /* AppKit.framework */,
+				6DE45BBC138DA66C000BDFBA /* CoreData.framework */,
+				6DE45BBD138DA66C000BDFBA /* Foundation.framework */,
+			);
+			name = "Other Frameworks";
+			sourceTree = "<group>";
+		};
+		6DE45BBE138DA66C000BDFBA /* StandalonePlayer */ = {
+			isa = PBXGroup;
+			children = (
+				6DE45C11138DAE6F000BDFBA /* player_icon.icns */,
+				6DE45BFF138DA717000BDFBA /* PolycodePlayer.mm */,
+				6DE45C00138DA717000BDFBA /* PolycodePlayer.h */,
+				6DE45BFC138DA70E000BDFBA /* PolycodeCocoaPlayer.mm */,
+				6DE45BFD138DA70E000BDFBA /* PolycodeCocoaPlayer.h */,
+				6DE45BF9138DA707000BDFBA /* PolycodeView.h */,
+				6DE45BFA138DA707000BDFBA /* PolycodeView.mm */,
+				6DE45BCA138DA66C000BDFBA /* StandalonePlayerAppDelegate.h */,
+				6DE45BCB138DA66C000BDFBA /* StandalonePlayerAppDelegate.mm */,
+				6DE45BCD138DA66C000BDFBA /* MainMenu.xib */,
+				6DE45BBF138DA66C000BDFBA /* Supporting Files */,
+			);
+			path = StandalonePlayer;
+			sourceTree = "<group>";
+		};
+		6DE45BBF138DA66C000BDFBA /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				6DE45BC0138DA66C000BDFBA /* StandalonePlayer-Info.plist */,
+				6DE45BC1138DA66C000BDFBA /* InfoPlist.strings */,
+				6DE45BC4138DA66C000BDFBA /* StandalonePlayer-Prefix.pch */,
+				6DE45BC5138DA66C000BDFBA /* main.m */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		6DE45BB3138DA66C000BDFBA /* StandalonePlayer */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 6DE45BD2138DA66C000BDFBA /* Build configuration list for PBXNativeTarget "StandalonePlayer" */;
+			buildPhases = (
+				6DE45BB0138DA66C000BDFBA /* Sources */,
+				6DE45BB1138DA66C000BDFBA /* Frameworks */,
+				6DE45BB2138DA66C000BDFBA /* Resources */,
+				6DE45C02138DAC19000BDFBA /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = StandalonePlayer;
+			productName = StandalonePlayer;
+			productReference = 6DE45BB4138DA66C000BDFBA /* StandalonePlayer.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		6DE45BAB138DA66C000BDFBA /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				ORGANIZATIONNAME = Tomatogon;
+			};
+			buildConfigurationList = 6DE45BAE138DA66C000BDFBA /* Build configuration list for PBXProject "StandalonePlayer" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = 6DE45BA9138DA66C000BDFBA;
+			productRefGroup = 6DE45BB5138DA66C000BDFBA /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				6DE45BB3138DA66C000BDFBA /* StandalonePlayer */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		6DE45BB2138DA66C000BDFBA /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				6DE45BC3138DA66C000BDFBA /* InfoPlist.strings in Resources */,
+				6DE45BCF138DA66C000BDFBA /* MainMenu.xib in Resources */,
+				6DE45C12138DAE6F000BDFBA /* player_icon.icns in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		6DE45C02138DAC19000BDFBA /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "cp -R ../../../../Bindings/Contents/LUA/API $BUILT_PRODUCTS_DIR/StandalonePlayer.app/Contents/Resources\ncp -R ../../../../Assets/Default\\ asset\\ pack/default.pak $BUILT_PRODUCTS_DIR/StandalonePlayer.app/Contents/Resources";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		6DE45BB0138DA66C000BDFBA /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				6DE45BC6138DA66C000BDFBA /* main.m in Sources */,
+				6DE45BCC138DA66C000BDFBA /* StandalonePlayerAppDelegate.mm in Sources */,
+				6DE45BFB138DA707000BDFBA /* PolycodeView.mm in Sources */,
+				6DE45BFE138DA70E000BDFBA /* PolycodeCocoaPlayer.mm in Sources */,
+				6DE45C01138DA717000BDFBA /* PolycodePlayer.mm in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		6DE45BC1138DA66C000BDFBA /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				6DE45BC2138DA66C000BDFBA /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		6DE45BCD138DA66C000BDFBA /* MainMenu.xib */ = {
+			isa = PBXVariantGroup;
+			children = (
+				6DE45BCE138DA66C000BDFBA /* en */,
+			);
+			name = MainMenu.xib;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		6DE45BD0138DA66C000BDFBA /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.6;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		6DE45BD1138DA66C000BDFBA /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.6;
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
+		6DE45BD3138DA66C000BDFBA /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = NO;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "StandalonePlayer/StandalonePlayer-Prefix.pch";
+				HEADER_SEARCH_PATHS = (
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Core/Include\"",
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Dependencies/Include\"",
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Modules/Include\"",
+					/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Headers,
+					"\"$(SRCROOT)/../../../../Core/Dependencies/lua/src\"",
+					"\"$(SRCROOT)/../../../../Bindings/Contents/LUA/Include\"",
+				);
+				INFOPLIST_FILE = "StandalonePlayer/StandalonePlayer-Info.plist";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/lua/src\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/physfs/Debug\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/freetype\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/zlib\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/libpng\"",
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Dependencies/Lib\"",
+					"\"$(SRCROOT)/../../../../../../../Library/Developer/Xcode/DerivedData/Modules-epduxiffqrcazabvaazmexadjpgk/Build/Products/Debug\"",
+					"\"$(SRCROOT)/../../../../../../../Library/Developer/Xcode/DerivedData/PolyCore-ecbhldydhvplehavgvhjdlapyvwd/Build/Products/Debug\"",
+					"\"$(SRCROOT)/../../../../../../../Library/Developer/Xcode/DerivedData/Bindings-bojbiqnjfgqgjpgcdihwtncgpnvk/Build/Products/Debug\"",
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		6DE45BD4138DA66C000BDFBA /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "StandalonePlayer/StandalonePlayer-Prefix.pch";
+				HEADER_SEARCH_PATHS = (
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Core/Include\"",
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Dependencies/Include\"",
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Modules/Include\"",
+					/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Headers,
+					"\"$(SRCROOT)/../../../../Core/Dependencies/lua/src\"",
+					"\"$(SRCROOT)/../../../../Bindings/Contents/LUA/Include\"",
+				);
+				INFOPLIST_FILE = "StandalonePlayer/StandalonePlayer-Info.plist";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/lua/src\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/physfs/Debug\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/freetype\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/zlib\"",
+					"\"$(SRCROOT)/../../../../Core/Dependencies/libpng\"",
+					"\"$(SRCROOT)/../../../../Release/Mac OS X/Framework/Dependencies/Lib\"",
+					"\"$(SRCROOT)/../../../../../../../Library/Developer/Xcode/DerivedData/Modules-epduxiffqrcazabvaazmexadjpgk/Build/Products/Debug\"",
+					"\"$(SRCROOT)/../../../../../../../Library/Developer/Xcode/DerivedData/PolyCore-ecbhldydhvplehavgvhjdlapyvwd/Build/Products/Debug\"",
+					"\"$(SRCROOT)/../../../../../../../Library/Developer/Xcode/DerivedData/Bindings-bojbiqnjfgqgjpgcdihwtncgpnvk/Build/Products/Debug\"",
+				);
+				ONLY_ACTIVE_ARCH = YES;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		6DE45BAE138DA66C000BDFBA /* Build configuration list for PBXProject "StandalonePlayer" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6DE45BD0138DA66C000BDFBA /* Debug */,
+				6DE45BD1138DA66C000BDFBA /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		6DE45BD2138DA66C000BDFBA /* Build configuration list for PBXNativeTarget "StandalonePlayer" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6DE45BD3138DA66C000BDFBA /* Debug */,
+				6DE45BD4138DA66C000BDFBA /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 6DE45BAB138DA66C000BDFBA /* Project object */;
+}

+ 7 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:StandalonePlayer.xcodeproj">
+   </FileRef>
+</Workspace>

+ 9094 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate

@@ -0,0 +1,9094 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>$archiver</key>
+	<string>NSKeyedArchiver</string>
+	<key>$objects</key>
+	<array>
+		<string>$null</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>2</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>3</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>4</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>5</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>6</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>264</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>412</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>515</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>00CFC2AA-4A31-46D9-9582-46B0E0CEA2A3</string>
+		<string>3FB45CEE-BF87-40E3-816E-23611BC0CC7E</string>
+		<string>72AA1F50-A536-4D0C-B80B-3DE5073B6AA3</string>
+		<string>IDEWorkspaceDocument</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>7</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>8</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>9</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>10</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>11</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>12</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>13</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>262</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>23</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>7</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>2</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>263</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEWorkspaceTabController_9BE927F4-ECFE-4657-9584-361FF21492D3</string>
+		<string>IDEOrderedWorkspaceTabControllers</string>
+		<string>IDEWindowToolbarIsVisible</string>
+		<string>IDEActiveWorkspaceTabController</string>
+		<string>IDEWorkspaceWindowControllerUniqueIdentifier</string>
+		<string>IDEWindowFrame</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>14</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>15</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>16</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>17</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>18</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>19</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>20</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>21</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>22</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>23</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>24</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>139</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>146</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>253</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDETabLabel</string>
+		<string>IDEShowNavigator</string>
+		<string>IDEEditorArea</string>
+		<string>IDEWorkspaceTabControllerUtilityAreaSplitView</string>
+		<string>IDENavigatorArea</string>
+		<string>IDEWorkspaceTabControllerDesignAreaSplitView</string>
+		<string>IDEShowUtilities</string>
+		<string>AssistantEditorsLayout</string>
+		<string>StandalonePlayer-Info.plist</string>
+		<true/>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>25</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>26</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>27</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>28</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>29</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>30</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>31</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>32</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>23</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>33</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>67</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>23</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>117</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>125</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>126</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>ShowDebuggerArea</string>
+		<string>IDEEDitorArea_DebugArea</string>
+		<string>IDEEditorMode_Standard</string>
+		<string>IDEShowEditor</string>
+		<string>EditorMode</string>
+		<string>DebuggerSplitView</string>
+		<string>DefaultPersistentRepresentations</string>
+		<string>layoutTree</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>34</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>35</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>36</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>37</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>38</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>39</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>41</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>45</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>58</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>64</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>LayoutFocusMode</string>
+		<string>console</string>
+		<string>IDEDebuggerAreaSplitView</string>
+		<string>LayoutMode</string>
+		<string>IDEDebugArea_SplitView</string>
+		<string>variables</string>
+		<integer>1</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>42</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>ConsoleFilterMode</string>
+		<integer>0</integer>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSMutableDictionary</string>
+				<string>NSDictionary</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSMutableDictionary</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>46</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>47</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>DVTSplitViewItems</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>48</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>54</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>51</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>52</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>DVTIdentifier</string>
+		<string>DVTViewMagnitude</string>
+		<string>VariablesView</string>
+		<real>280</real>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSDictionary</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSDictionary</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>55</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>56</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>ConsoleArea</string>
+		<real>805</real>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSMutableArray</string>
+				<string>NSArray</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSMutableArray</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>46</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>59</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>60</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>62</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>51</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>61</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>280</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>55</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>63</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>805</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>65</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>66</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>DBGVariablesViewFilterMode</string>
+		<integer>2</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>68</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>69</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>EditorLayout_PersistentRepresentation</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>70</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>71</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Main</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>72</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>73</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>74</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>75</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>115</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>EditorLayout_StateSavingStateDictionaries</string>
+		<string>EditorLayout_Selected</string>
+		<string>EditorLayout_Geometry</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>76</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>77</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>78</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>79</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>80</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>81</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>82</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>83</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>84</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>85</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>103</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>89</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>89</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>111</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>112</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>FileDataType</string>
+		<string>ArchivableRepresentation</string>
+		<string>EditorState</string>
+		<string>NavigableItemName</string>
+		<string>DocumentNavigableItemName</string>
+		<string>DocumentExtensionIdentifier</string>
+		<string>DocumentURL</string>
+		<string>com.apple.xml-property-list</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>102</integer>
+			</dict>
+			<key>DocumentLocation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>98</integer>
+			</dict>
+			<key>DomainIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>86</integer>
+			</dict>
+			<key>IdentifierPath</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>87</integer>
+			</dict>
+			<key>IndexOfDocumentIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>43</integer>
+			</dict>
+		</dict>
+		<string>Xcode.IDENavigableItemDomain.WorkspaceStructure</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>88</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>91</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>93</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>95</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>89</integer>
+			</dict>
+		</dict>
+		<string>StandalonePlayer-Info.plist</string>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>IDEArchivableStringIndexPair</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>IDEArchivableStringIndexPair</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>92</integer>
+			</dict>
+		</dict>
+		<string>Supporting Files</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>94</integer>
+			</dict>
+		</dict>
+		<string>StandalonePlayer</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>96</integer>
+			</dict>
+		</dict>
+		<string>StandalonePlayer</string>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSArray</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSArray</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>101</integer>
+			</dict>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>99</integer>
+			</dict>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayer-Info.plist</string>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSMutableString</string>
+				<string>NSString</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSMutableString</string>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>DVTDocumentLocation</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>DVTDocumentLocation</string>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>IDENavigableItemArchivableRepresentation</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>IDENavigableItemArchivableRepresentation</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>104</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>105</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>106</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>107</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>108</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>109</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDE_PLIST_EDITOR_SELECTION_KEY</string>
+		<string>IDE_PLIST_EDITOR_VISIBLERECT_KEY</string>
+		<string>IDE_PLIST_EDITOR_EXPANSION_KEY</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<string>{{0, 0}, {1086, 443}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSMutableSet</string>
+				<string>NSSet</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSMutableSet</string>
+		</dict>
+		<string>Xcode.IDEKit.EditorDocument.PlistEditor</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>113</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayer-Info.plist</string>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSURL</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSURL</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>116</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>{{0, 0}, {1086, 482}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>46</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>118</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>119</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>122</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>120</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>121</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEEditor</string>
+		<real>504</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>123</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>124</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEDebuggerArea</string>
+		<real>372</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>138</integer>
+			</dict>
+			<key>geniusEditorContextNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>primaryEditorContextNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>127</integer>
+			</dict>
+			<key>rootLayoutTreeNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>135</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>137</integer>
+			</dict>
+			<key>children</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>contentType</key>
+			<integer>1</integer>
+			<key>documentArchivableRepresentation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>128</integer>
+			</dict>
+			<key>orientation</key>
+			<integer>0</integer>
+			<key>parent</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>135</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>102</integer>
+			</dict>
+			<key>DocumentLocation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>98</integer>
+			</dict>
+			<key>DomainIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>86</integer>
+			</dict>
+			<key>IdentifierPath</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>129</integer>
+			</dict>
+			<key>IndexOfDocumentIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>43</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>130</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>131</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>132</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>133</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>89</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>92</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>94</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>134</integer>
+			</dict>
+		</dict>
+		<string>StandalonePlayer</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>137</integer>
+			</dict>
+			<key>children</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>136</integer>
+			</dict>
+			<key>contentType</key>
+			<integer>0</integer>
+			<key>documentArchivableRepresentation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>orientation</key>
+			<integer>0</integer>
+			<key>parent</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>127</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>IDEWorkspaceTabControllerLayoutTreeNode</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>IDEWorkspaceTabControllerLayoutTreeNode</string>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>IDEWorkspaceTabControllerLayoutTree</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>IDEWorkspaceTabControllerLayoutTree</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>46</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>140</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>141</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>144</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>142</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>143</integer>
+				</dict>
+			</array>
+		</dict>
+		<string></string>
+		<real>652</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>142</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>145</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>224</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>147</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>148</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>149</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>150</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>151</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>152</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>177</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>181</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>147</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>195</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Xcode.IDEKit.Navigator.Structure</string>
+		<string>Xcode.DebuggerKit.ThreadsStacksNavigator</string>
+		<string>Xcode.IDEKit.Navigator.BatchFind</string>
+		<string>SelectedNavigator</string>
+		<string>Xcode.IDEKit.Navigator.Issues</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>153</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>154</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>155</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>156</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>157</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>158</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>159</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>160</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>162</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>164</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>167</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEVisibleRect</string>
+		<string>IDEUnsavedDocumentFilteringEnabled</string>
+		<string>IDENavigatorExpandedItemsBeforeFilteringSet</string>
+		<string>IDERecentDocumentFilteringEnabled</string>
+		<string>IDESCMStatusFilteringEnabled</string>
+		<string>IDESelectedObjects</string>
+		<string>IDEExpandedItemsSet</string>
+		<string>{{0, 0}, {313, 832}}</string>
+		<false/>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>163</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSSet</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSSet</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>165</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>166</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>94</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>92</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>89</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>StandalonePlayer</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>163</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>168</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>169</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>171</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>173</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>174</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>176</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>166</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>166</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>170</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Frameworks</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>166</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>170</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>172</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>OpenAL.framework</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>166</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>94</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>92</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>166</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>175</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Products</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>166</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>94</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>178</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>179</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>180</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>66</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEStackCompressionValue</string>
+		<string>IDEThreadsOrQueuesMode</string>
+		<string>IDEHideAncestorForNonInterestingFrames</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>182</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>183</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>184</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>185</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>186</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>187</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>188</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>189</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>190</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>191</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>193</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEBatchFindNavigatorScrollPosition</string>
+		<string>IDEBatchFindNavigatorShowsOptions</string>
+		<string>IDEBatchFindNavigatorReplaceString</string>
+		<string>IDEBatchFindNavigatorFindString</string>
+		<string>IDEBatchFindNavigatorSelectedRowIndexes</string>
+		<string>IDEBatchFindNavigatorFindMode</string>
+		<string>IDEBatchFindNavigatorCollapsedGroups</string>
+		<string></string>
+		<string>Radia</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>192</integer>
+			</dict>
+			<key>NSRangeCount</key>
+			<integer>0</integer>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSIndexSet</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSIndexSet</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>194</integer>
+			</dict>
+			<key>NSRangeCount</key>
+			<integer>0</integer>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSMutableIndexSet</string>
+				<string>NSIndexSet</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSMutableIndexSet</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>196</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>197</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>198</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>199</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>200</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>201</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>202</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>203</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>204</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>205</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>206</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>207</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>208</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>245</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>251</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>252</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEErrorFilteringEnabled</string>
+		<string>IDEVisibleRect</string>
+		<string>IDECollapsedFiles</string>
+		<string>IDEExpandedIssues</string>
+		<string>IDESelectedNavigables</string>
+		<string>IDEShowsByType</string>
+		<string>IDESchemeFilteringEnabled</string>
+		<string>IDECollapsedTypes</string>
+		<string>IDERecentFilteringEnabled</string>
+		<string>IDECollapsedGroups</string>
+		<string>{{0, 0}, {298, 810}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>209</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>210</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>211</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>212</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>213</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>214</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>215</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>219</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>243</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>244</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>243</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>documentLocations</string>
+		<string>subissues</string>
+		<string>shortMessage</string>
+		<string>type</string>
+		<string>fullMessage</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>216</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>218</integer>
+			</dict>
+			<key>characterRangeLen</key>
+			<integer>0</integer>
+			<key>characterRangeLoc</key>
+			<integer>-1</integer>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>217</integer>
+			</dict>
+			<key>endingColumnNumber</key>
+			<integer>9</integer>
+			<key>endingLineNumber</key>
+			<integer>25</integer>
+			<key>startingColumnNumber</key>
+			<integer>9</integer>
+			<key>startingLineNumber</key>
+			<integer>25</integer>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/Include/PolyString.h</string>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>DVTTextDocumentLocation</string>
+				<string>DVTDocumentLocation</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>DVTTextDocumentLocation</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>220</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>227</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>233</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>239</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>210</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>211</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>212</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>213</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>214</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>221</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>224</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>225</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>226</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>225</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>222</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>218</integer>
+			</dict>
+			<key>characterRangeLen</key>
+			<integer>0</integer>
+			<key>characterRangeLoc</key>
+			<integer>-1</integer>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>223</integer>
+			</dict>
+			<key>endingColumnNumber</key>
+			<integer>-1</integer>
+			<key>endingLineNumber</key>
+			<integer>28</integer>
+			<key>startingColumnNumber</key>
+			<integer>-1</integer>
+			<key>startingLineNumber</key>
+			<integer>28</integer>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/PolycodeView/PolycodeView.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<string>In file included from /Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/../../../../../Release/Mac OS X/Framework/Core/PolycodeView/PolycodeView.h:29:</string>
+		<string>Uncategorized</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>210</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>211</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>212</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>213</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>214</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>228</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>231</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>232</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>226</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>232</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>229</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>218</integer>
+			</dict>
+			<key>characterRangeLen</key>
+			<integer>0</integer>
+			<key>characterRangeLoc</key>
+			<integer>-1</integer>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>230</integer>
+			</dict>
+			<key>endingColumnNumber</key>
+			<integer>-1</integer>
+			<key>endingLineNumber</key>
+			<integer>9</integer>
+			<key>startingColumnNumber</key>
+			<integer>-1</integer>
+			<key>startingLineNumber</key>
+			<integer>9</integer>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<string>In file included from /Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.h:10:</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>210</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>211</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>212</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>213</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>214</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>234</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>237</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>238</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>226</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>238</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>235</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>218</integer>
+			</dict>
+			<key>characterRangeLen</key>
+			<integer>0</integer>
+			<key>characterRangeLoc</key>
+			<integer>-1</integer>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>236</integer>
+			</dict>
+			<key>endingColumnNumber</key>
+			<integer>-1</integer>
+			<key>endingLineNumber</key>
+			<integer>8</integer>
+			<key>startingColumnNumber</key>
+			<integer>-1</integer>
+			<key>startingLineNumber</key>
+			<integer>8</integer>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.m</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<string>In file included from /Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.m:9:</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>210</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>211</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>212</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>213</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>214</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>240</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>241</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>242</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>226</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>242</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>216</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<string>'string' file not found in /Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac OS X/Framework/Core/Include/PolyString.h</string>
+		<string>'string' file not found</string>
+		<string>Lexical or Preprocessor Issue</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>246</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>247</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>248</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>249</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>94</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>250</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>id</string>
+		<string>ty</string>
+		<string>g</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>46</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>254</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>255</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>257</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>259</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>18</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>256</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>314</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>16</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>258</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>1086</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>49</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>50</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>260</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>261</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEUtilitiesArea</string>
+		<real>260</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>7</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>{{52, 56}, {1400, 952}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>265</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>266</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>267</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>268</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>269</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>11</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>270</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>410</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>265</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>411</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>3</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEWorkspaceTabController_419854C4-939D-44B9-8FFF-CCCD6C17B1C6</string>
+		<string>IDEOrderedWorkspaceTabControllers</string>
+		<string>IDEWindowToolbarIsVisible</string>
+		<string>IDEActiveWorkspaceTabController</string>
+		<string>IDEWindowFrame</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>271</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>272</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>273</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>274</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>275</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>276</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>277</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>278</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>279</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>366</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>372</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>401</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>318</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>AssistantEditorsLayout</string>
+		<string>IDEShowNavigator</string>
+		<string>IDEEditorArea</string>
+		<string>IDEWorkspaceTabControllerUtilityAreaSplitView</string>
+		<string>IDENavigatorArea</string>
+		<string>IDEWorkspaceTabControllerDesignAreaSplitView</string>
+		<string>IDEShowUtilities</string>
+		<string>IDETabLabel</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>280</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>281</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>282</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>283</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>284</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>285</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>286</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>287</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>288</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>323</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>23</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>351</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>359</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>360</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>ShowDebuggerArea</string>
+		<string>IDEEditorMode_Standard</string>
+		<string>IDEEDitorArea_DebugArea</string>
+		<string>IDEShowEditor</string>
+		<string>EditorMode</string>
+		<string>DebuggerSplitView</string>
+		<string>DefaultPersistentRepresentations</string>
+		<string>layoutTree</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>289</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>290</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>EditorLayout_PersistentRepresentation</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>291</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>292</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Main</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>293</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>294</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>295</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>296</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>321</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>EditorLayout_StateSavingStateDictionaries</string>
+		<string>EditorLayout_Selected</string>
+		<string>EditorLayout_Geometry</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>297</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>298</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>299</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>300</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>301</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>302</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>303</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>304</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>305</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>306</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>310</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>318</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>318</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>319</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>320</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>FileDataType</string>
+		<string>ArchivableRepresentation</string>
+		<string>EditorState</string>
+		<string>NavigableItemName</string>
+		<string>DocumentNavigableItemName</string>
+		<string>DocumentExtensionIdentifier</string>
+		<string>DocumentURL</string>
+		<string>public.c-header</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>102</integer>
+			</dict>
+			<key>DocumentLocation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>308</integer>
+			</dict>
+			<key>DomainIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>IdentifierPath</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>107</integer>
+			</dict>
+			<key>IndexOfDocumentIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>307</integer>
+			</dict>
+		</dict>
+		<integer>9223372036854775807</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>101</integer>
+			</dict>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>309</integer>
+			</dict>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/Include/PolyString.h</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>315</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>316</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>317</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>PrimaryDocumentTimestamp</string>
+		<string>PrimaryDocumentVisibleCharacterRange</string>
+		<string>HideAllIssues</string>
+		<string>PrimaryDocumentSelectedCharacterRange</string>
+		<real>328050812.78905201</real>
+		<string>{0, 1375}</string>
+		<string>{1133, 0}</string>
+		<string>PolyString.h</string>
+		<string>Xcode.IDEKit.EditorDocument.SourceCode</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>309</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>322</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>{{0, 0}, {600, 600}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>324</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>325</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>326</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>327</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>328</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>329</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>330</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>332</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>343</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>349</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>LayoutFocusMode</string>
+		<string>console</string>
+		<string>IDEDebuggerAreaSplitView</string>
+		<string>LayoutMode</string>
+		<string>IDEDebugArea_SplitView</string>
+		<string>variables</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>331</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>ConsoleFilterMode</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>334</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>DVTSplitViewItems</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>335</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>340</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>338</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>339</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>DVTIdentifier</string>
+		<string>DVTViewMagnitude</string>
+		<string>VariablesView</string>
+		<real>298</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>341</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>342</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>ConsoleArea</string>
+		<real>301</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>344</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>345</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>347</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>338</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>346</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>298</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>341</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>348</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>301</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>350</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>66</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>DBGVariablesViewFilterMode</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>352</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>353</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>356</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>354</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>355</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEEditor</string>
+		<real>203</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>357</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>358</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEDebuggerArea</string>
+		<real>115</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>138</integer>
+			</dict>
+			<key>geniusEditorContextNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>primaryEditorContextNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>361</integer>
+			</dict>
+			<key>rootLayoutTreeNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>364</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>137</integer>
+			</dict>
+			<key>children</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>contentType</key>
+			<integer>1</integer>
+			<key>documentArchivableRepresentation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>362</integer>
+			</dict>
+			<key>orientation</key>
+			<integer>0</integer>
+			<key>parent</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>364</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>102</integer>
+			</dict>
+			<key>DocumentLocation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>308</integer>
+			</dict>
+			<key>DomainIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>IdentifierPath</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>107</integer>
+			</dict>
+			<key>IndexOfDocumentIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>363</integer>
+			</dict>
+		</dict>
+		<integer>9223372036854775807</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>137</integer>
+			</dict>
+			<key>children</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>365</integer>
+			</dict>
+			<key>contentType</key>
+			<integer>0</integer>
+			<key>documentArchivableRepresentation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>orientation</key>
+			<integer>0</integer>
+			<key>parent</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>361</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>367</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>368</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>370</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>189</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>369</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>376</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>189</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>371</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>224</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>373</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>374</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>375</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>376</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>375</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>385</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Xcode.IDEKit.Navigator.Structure</string>
+		<string>SelectedNavigator</string>
+		<string>Xcode.IDEKit.Navigator.Issues</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>377</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>378</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>379</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>380</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>381</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>382</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>383</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>384</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>162</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>107</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>162</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEVisibleRect</string>
+		<string>IDEUnsavedDocumentFilteringEnabled</string>
+		<string>IDENavigatorExpandedItemsBeforeFilteringSet</string>
+		<string>IDERecentDocumentFilteringEnabled</string>
+		<string>IDESCMStatusFilteringEnabled</string>
+		<string>IDESelectedObjects</string>
+		<string>IDEExpandedItemsSet</string>
+		<string>{{0, 0}, {259, 832}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>386</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>377</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>387</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>388</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>389</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>390</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>391</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>392</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>393</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>394</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>395</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>396</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>397</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>398</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>399</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>400</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEErrorFilteringEnabled</string>
+		<string>IDECollapsedFiles</string>
+		<string>IDEExpandedIssues</string>
+		<string>IDESelectedNavigables</string>
+		<string>IDEShowsByType</string>
+		<string>IDESchemeFilteringEnabled</string>
+		<string>IDECollapsedTypes</string>
+		<string>IDERecentFilteringEnabled</string>
+		<string>IDECollapsedGroups</string>
+		<string>{{0, 0}, {0, 0}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>402</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>403</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>405</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>407</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>275</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>404</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>178</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>273</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>406</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>962</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>408</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>409</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEUtilitiesArea</string>
+		<real>260</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>265</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>{{163, 404}, {600, 624}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>269</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>266</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>267</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>413</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>11</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>268</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>414</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>415</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>416</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>4</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>413</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEWorkspaceTabController_F24B3BF7-6E97-42BC-8F07-C41A3FF3A95C</string>
+		<string>{{184, 393}, {600, 624}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>413</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>271</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>272</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>273</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>274</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>275</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>276</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>277</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>278</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>417</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>489</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>495</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>507</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>427</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>280</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>281</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>282</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>283</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>284</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>285</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>286</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>287</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>418</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>456</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>23</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>471</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>477</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>478</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>289</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>419</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>291</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>420</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>293</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>294</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>295</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>421</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>455</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>422</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>298</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>299</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>300</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>301</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>302</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>303</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>304</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>423</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>424</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>434</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>451</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>427</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>452</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>453</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>com.apple.InterfaceBuilder3.Cocoa.XIB</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>102</integer>
+			</dict>
+			<key>DocumentLocation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>432</integer>
+			</dict>
+			<key>DomainIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>86</integer>
+			</dict>
+			<key>IdentifierPath</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>425</integer>
+			</dict>
+			<key>IndexOfDocumentIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>431</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>426</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>428</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>430</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>427</integer>
+			</dict>
+		</dict>
+		<string>MainMenu.xib</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>429</integer>
+			</dict>
+		</dict>
+		<string>StandalonePlayer</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>429</integer>
+			</dict>
+		</dict>
+		<integer>9223372036854775807</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>101</integer>
+			</dict>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>433</integer>
+			</dict>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/en.lproj/MainMenu.xib</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>435</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>436</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>437</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>438</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>439</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>440</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>438</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>442</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IBDockViewController</string>
+		<string>SelectedObjectIDs</string>
+		<string>SelectionProvider</string>
+		<string>IBCanvasViewController</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>441</integer>
+				</dict>
+			</array>
+		</dict>
+		<integer>371</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>443</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>444</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>445</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>448</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>ObjectIDToLastKnownCanvasPositionMap</string>
+		<string>EditedTopLevelObjectIDs</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>446</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>447</integer>
+				</dict>
+			</array>
+		</dict>
+		<integer>371</integer>
+		<string>{79, 109}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>449</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>450</integer>
+				</dict>
+			</array>
+		</dict>
+		<integer>29</integer>
+		<integer>371</integer>
+		<string>Window</string>
+		<string>Xcode.IDEKit.CocoaIntegration.EditorDocument.Cocoa</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>454</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/en.lproj/MainMenu.xib</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>322</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>324</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>325</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>326</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>327</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>328</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>329</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>457</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>458</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>464</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>470</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>331</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>459</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>460</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>462</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>338</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>461</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>298</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>341</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>463</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>301</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>465</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>466</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>468</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>338</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>467</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>298</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>341</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>469</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>301</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>350</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>66</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>472</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>473</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>475</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>354</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>474</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>203</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>357</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>476</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>115</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>138</integer>
+			</dict>
+			<key>geniusEditorContextNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>primaryEditorContextNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>479</integer>
+			</dict>
+			<key>rootLayoutTreeNode</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>487</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>137</integer>
+			</dict>
+			<key>children</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>contentType</key>
+			<integer>1</integer>
+			<key>documentArchivableRepresentation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>480</integer>
+			</dict>
+			<key>orientation</key>
+			<integer>0</integer>
+			<key>parent</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>487</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>102</integer>
+			</dict>
+			<key>DocumentLocation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>486</integer>
+			</dict>
+			<key>DomainIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>86</integer>
+			</dict>
+			<key>IdentifierPath</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>481</integer>
+			</dict>
+			<key>IndexOfDocumentIdentifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>485</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>482</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>483</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>484</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>427</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>429</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>90</integer>
+			</dict>
+			<key>Identifier</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>429</integer>
+			</dict>
+		</dict>
+		<integer>9223372036854775807</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>101</integer>
+			</dict>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>433</integer>
+			</dict>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>137</integer>
+			</dict>
+			<key>children</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>488</integer>
+			</dict>
+			<key>contentType</key>
+			<integer>0</integer>
+			<key>documentArchivableRepresentation</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>orientation</key>
+			<integer>0</integer>
+			<key>parent</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>479</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>490</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>491</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>493</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>189</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>492</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>376</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>189</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>494</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>224</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>374</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>373</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>373</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>496</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>377</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>378</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>379</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>380</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>381</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>382</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>383</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>395</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>162</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>497</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>499</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>498</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>427</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>163</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>500</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>501</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>502</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>504</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>506</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>170</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>503</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>OpenAL.framework</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>505</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Supporting Files</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>170</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>508</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>509</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>511</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>513</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>275</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>510</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>314</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>273</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>512</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>1086</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>408</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>514</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>260</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>516</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>517</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>518</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>519</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>520</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>521</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>522</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>523</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>524</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>525</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>526</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>527</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>43</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>677</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>682</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>685</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>715</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>716</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>729</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>BreakpointsActivated</string>
+		<string>DefaultEditorStatesForURLs</string>
+		<string>DebuggingWindowBehavior</string>
+		<string>ActiveRunDestination</string>
+		<string>ActiveScheme</string>
+		<string>LastCompletedPersistentSchemeBasedActivityReport</string>
+		<string>DocumentWindows</string>
+		<string>DefaultEditorFrameSizeForURLs</string>
+		<string>RecentEditorDocumentURLs</string>
+		<string>AppFocusInMiniDebugging</string>
+		<string>MiniDebuggingConsole</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>452</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>111</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>528</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>319</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>529</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>530</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>531</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>541</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>546</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>590</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>658</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>670</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Xcode.Xcode3ProjectSupport.EditorDocument.Xcode3Project</string>
+		<string>Xcode.IDEKit.EditorDocument.LogDocument</string>
+		<string>Xcode.IDEKit.EditorDocument.RTF</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>532</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>534</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>533</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/en.lproj/MainMenu.xib</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>435</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>436</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>437</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>438</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>535</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>536</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>438</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>538</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>537</integer>
+				</dict>
+			</array>
+		</dict>
+		<integer>56</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>443</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>444</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>445</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>539</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>540</integer>
+				</dict>
+			</array>
+		</dict>
+		<integer>29</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>542</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>543</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>99</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>104</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>105</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>106</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>107</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>544</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>545</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>{{0, 0}, {1086, 443}}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>110</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>547</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>549</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>548</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>550</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>551</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>552</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>553</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>554</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>555</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>556</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>562</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>563</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>574</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Xcode3ProjectEditorPreviousProjectEditorClass</string>
+		<string>Xcode3ProjectEditor.sourceList.splitview</string>
+		<string>Xcode3ProjectEditorPreviousTargetEditorClass</string>
+		<string>Xcode3ProjectEditorSelectedDocumentLocations</string>
+		<string>Xcode3ProjectEditor_Xcode3BuildPhasesEditor</string>
+		<string>Xcode3BuildSettingsEditor</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>333</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>557</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>558</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>560</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>189</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>559</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>170</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>336</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>337</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>189</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>561</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>916</real>
+		<string>Xcode3BuildPhasesEditor</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>564</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>573</integer>
+			</dict>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>565</integer>
+			</dict>
+			<key>selection</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>567</integer>
+			</dict>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>566</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/</string>
+		<real>328051871.11566597</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>568</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>569</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>570</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>562</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>429</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>571</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Editor</string>
+		<string>Target</string>
+		<string>Xcode3BuildPhasesEditorLocations</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>572</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>Xcode3ProjectDocumentLocation</string>
+				<string>DVTDocumentLocation</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>Xcode3ProjectDocumentLocation</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>575</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>576</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>577</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>578</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>579</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>580</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>581</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>582</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>583</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>584</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>586</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>587</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>588</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>589</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>6DE45BB1138DA66C000BDFBA</string>
+		<string>6DE45BB3138DA66C000BDFBA</string>
+		<string>Xcode3BuildPhasesEditorDisclosedNamesKey</string>
+		<string>6DE45BB0138DA66C000BDFBA</string>
+		<string>6DE45C02138DAC19000BDFBA</string>
+		<string>6DE45BB2138DA66C000BDFBA</string>
+		<string>kXcode3BuildPhasesEditorScrollPointKey</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>585</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>Run Script</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array/>
+			<key>NS.objects</key>
+			<array/>
+		</dict>
+		<string>{0, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>591</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>593</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>595</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>597</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>599</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>601</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>603</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>605</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>607</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>609</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>611</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>613</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>620</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>624</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>627</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>631</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>635</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>638</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>642</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>646</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>650</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>654</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>592</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/en.lproj/InfoPlist.strings</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>594</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>596</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/Include/OSBasics.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>598</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.mm</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>600</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/PolycodeView/PolycodeView.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>602</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Contents/Source/PolycodePlayer.mm</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>604</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.m</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>606</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/Include/PolyString.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>608</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Contents/Include/PolycodePlayer.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>610</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/main.m</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>612</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>614</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>615</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>616</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>617</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>618</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>619</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>589</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>PrimaryDocumentTimestamp</string>
+		<string>PrimaryDocumentVisibleCharacterRange</string>
+		<string>HideAllIssues</string>
+		<string>PrimaryDocumentSelectedCharacterRange</string>
+		<real>328052339.37936699</real>
+		<string>{0, 45}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>621</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>622</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>623</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328051695.45914203</real>
+		<string>{0, 521}</string>
+		<string>{413, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>625</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>626</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>589</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328051697.268731</real>
+		<string>{0, 1793}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>614</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>615</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>616</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>617</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>628</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>629</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>630</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328052338.183339</real>
+		<string>{0, 997}</string>
+		<string>{461, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>632</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>633</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>634</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328050839.66999102</real>
+		<string>{0, 1794}</string>
+		<string>{1175, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>636</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>637</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>589</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328050713.53709197</real>
+		<string>{0, 2293}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>639</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>640</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>641</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328051161.08167398</real>
+		<string>{0, 416}</string>
+		<string>{155, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>643</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>644</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>645</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328051074.20748299</real>
+		<string>{0, 2164}</string>
+		<string>{1197, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>647</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>648</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>649</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328051024.47653198</real>
+		<string>{0, 1814}</string>
+		<string>{1150, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>651</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>652</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>653</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328051233.24838799</real>
+		<string>{0, 248}</string>
+		<string>{49, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>311</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>312</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>313</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>314</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>655</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>656</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>161</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>657</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>328051078.33419698</real>
+		<string>{0, 1604}</string>
+		<string>{79, 0}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>659</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>661</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>660</integer>
+			</dict>
+		</dict>
+		<string>x-xcode-log://CFE0D3E2-76FA-44A2-B2B3-6478959C95F1</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>662</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>663</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>SelectedDocumentLocations</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>97</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>664</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>669</integer>
+			</dict>
+			<key>documentURL</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>660</integer>
+			</dict>
+			<key>expandTranscript</key>
+			<false/>
+			<key>indexPath</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>665</integer>
+			</dict>
+			<key>timestamp</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>668</integer>
+			</dict>
+			<key>NSIndexPathData</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>666</integer>
+			</dict>
+			<key>NSIndexPathLength</key>
+			<integer>2</integer>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>667</integer>
+			</dict>
+			<key>NS.data</key>
+			<data>
+			AA4=
+			</data>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSMutableData</string>
+				<string>NSData</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSMutableData</string>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSIndexPath</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSIndexPath</string>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>IDELogDocumentLocation</string>
+				<string>DVTDocumentLocation</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>IDELogDocumentLocation</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>671</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>673</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>672</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>100</integer>
+			</dict>
+			<key>NS.string</key>
+			<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/en.lproj/Credits.rtf</string>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>674</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>675</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>589</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>676</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>SelectedCharacterRange</string>
+		<string>VerticalScrollPosition</string>
+		<string>{0, 157}</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>678</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>679</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>680</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>681</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEDeviceLocation</string>
+		<string>IDEDeviceArchitecture</string>
+		<string>dvtdevice-local-computer:localhost</string>
+		<string>x86_64</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>683</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>684</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDENameString</string>
+		<string>StandalonePlayer</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>686</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>687</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>688</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>689</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>714</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>94</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEActivityReportCompletionSummaryStringSegments</string>
+		<string>IDEActivityReportOptions</string>
+		<string>IDEActivityReportTitle</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>690</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>697</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>701</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>705</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>691</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>692</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>693</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>694</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>695</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>696</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEActivityReportStringSegmentPriority</string>
+		<string>IDEActivityReportStringSegmentBackSeparator</string>
+		<string>IDEActivityReportStringSegmentStringValue</string>
+		<real>2</real>
+		<string> </string>
+		<string>Archive</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>691</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>692</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>693</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>698</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>699</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>700</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>4</real>
+		<string>: </string>
+		<string>StandalonePlayer</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>691</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>692</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>693</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>702</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>703</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>704</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>1</real>
+		<string> │ </string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>667</integer>
+			</dict>
+			<key>NS.data</key>
+			<data>
+			YnBsaXN0MDDUAQIDBAUGOzxYJHZlcnNpb25YJG9iamVjdHNZJGFy
+			Y2hpdmVyVCR0b3ASAAGGoK0HCA8QGhscJCUrMTQ3VSRudWxs0wkK
+			CwwNDlxOU0F0dHJpYnV0ZXNWJGNsYXNzWE5TU3RyaW5ngAOADIAC
+			WVN1Y2NlZWRlZNMKERITFBdXTlMua2V5c1pOUy5vYmplY3RzgAui
+			FRaABIAFohgZgAaACVZOU0ZvbnRXTlNDb2xvctQKHR4fICEiI1ZO
+			U05hbWVWTlNTaXplWE5TZkZsYWdzgAiAByNAJgAAAAAAABENEF8Q
+			EUx1Y2lkYUdyYW5kZS1Cb2xk0iYnKClaJGNsYXNzbmFtZVgkY2xh
+			c3Nlc1ZOU0ZvbnSiKCpYTlNPYmplY3TTCiwtLi8wXE5TQ29sb3JT
+			cGFjZVdOU1doaXRlgAoQA0IwANImJzIzV05TQ29sb3KiMirSJic1
+			NlxOU0RpY3Rpb25hcnmiNSrSJic4OV8QEk5TQXR0cmlidXRlZFN0
+			cmluZ6I6Kl8QEk5TQXR0cmlidXRlZFN0cmluZ18QD05TS2V5ZWRB
+			cmNoaXZlctE9PlRyb290gAEACAARABoAIwAtADIANwBFAEsAUgBf
+			AGYAbwBxAHMAdQB/AIYAjgCZAJsAngCgAKIApQCnAKkAsAC4AMEA
+			yADPANgA2gDcAOUA6AD8AQEBDAEVARwBHwEoAS8BPAFEAUYBSAFL
+			AVABWAFbAWABbQFwAXUBigGNAaIBtAG3AbwAAAAAAAACAQAAAAAA
+			AAA/AAAAAAAAAAAAAAAAAAABvg==
+			</data>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>691</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>706</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>707</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>693</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>708</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>709</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>710</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>711</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>713</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>40</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>IDEActivityReportStringSegmentType</string>
+		<string>IDEActivityReportStringSegmentDate</string>
+		<string>IDEActivityReportStringSegmentDateStyle</string>
+		<string>IDEActivityReportStringSegmentTimeStyle</string>
+		<real>3</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>712</integer>
+			</dict>
+			<key>NS.time</key>
+			<real>328052364.98725897</real>
+		</dict>
+		<dict>
+			<key>$classes</key>
+			<array>
+				<string>NSDate</string>
+				<string>NSObject</string>
+			</array>
+			<key>$classname</key>
+			<string>NSDate</string>
+		</dict>
+		<string>Today at 5:39 PM</string>
+		<integer>106</integer>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>2</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>44</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>717</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>719</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>721</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>726</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>718</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/Include/PolyString.h</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>720</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/en.lproj/MainMenu.xib</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>722</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>723</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>724</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>725</integer>
+				</dict>
+			</array>
+		</dict>
+		<string>width</string>
+		<string>height</string>
+		<real>600</real>
+		<real>600</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>53</integer>
+			</dict>
+			<key>NS.keys</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>722</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>723</integer>
+				</dict>
+			</array>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>727</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>728</integer>
+				</dict>
+			</array>
+		</dict>
+		<real>600</real>
+		<real>600</real>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>57</integer>
+			</dict>
+			<key>NS.objects</key>
+			<array>
+				<dict>
+					<key>CF$UID</key>
+					<integer>730</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>732</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>734</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>736</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>737</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>739</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>659</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>741</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>742</integer>
+				</dict>
+				<dict>
+					<key>CF$UID</key>
+					<integer>744</integer>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>731</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayer-Info.plist</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>733</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/en.lproj/InfoPlist.strings</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>735</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.mm</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>565</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>738</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Release/Mac%20OS%20X/Framework/Core/Include/OSBasics.h</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>740</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.h</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>454</integer>
+			</dict>
+		</dict>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>743</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Player/Build/Mac%20OS%20X%20Standalone/StandalonePlayer/StandalonePlayer/main.m</string>
+		<dict>
+			<key>$class</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>114</integer>
+			</dict>
+			<key>NS.base</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>0</integer>
+			</dict>
+			<key>NS.relative</key>
+			<dict>
+				<key>CF$UID</key>
+				<integer>745</integer>
+			</dict>
+		</dict>
+		<string>file://localhost/Users/ivansafrin/Desktop/Workshop/Polycode/Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h</string>
+	</array>
+	<key>$top</key>
+	<dict>
+		<key>State</key>
+		<dict>
+			<key>CF$UID</key>
+			<integer>1</integer>
+		</dict>
+	</dict>
+	<key>$version</key>
+	<integer>100000</integer>
+</dict>
+</plist>

+ 76 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/xcuserdata/ivansafrin.xcuserdatad/xcschemes/StandalonePlayer.xcscheme

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "6DE45BB3138DA66C000BDFBA"
+               BuildableName = "StandalonePlayer.app"
+               BlueprintName = "StandalonePlayer"
+               ReferencedContainer = "container:StandalonePlayer.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      buildConfiguration = "Debug">
+      <Testables>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+      displayScaleIsEnabled = "NO"
+      displayScale = "1.00"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Debug">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "6DE45BB3138DA66C000BDFBA"
+            BuildableName = "StandalonePlayer.app"
+            BlueprintName = "StandalonePlayer"
+            ReferencedContainer = "container:StandalonePlayer.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      displayScaleIsEnabled = "NO"
+      displayScale = "1.00"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Release">
+      <BuildableProductRunnable>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "6DE45BB3138DA66C000BDFBA"
+            BuildableName = "StandalonePlayer.app"
+            BlueprintName = "StandalonePlayer"
+            ReferencedContainer = "container:StandalonePlayer.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 22 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer.xcodeproj/xcuserdata/ivansafrin.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>StandalonePlayer.xcscheme</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>6DE45BB3138DA66C000BDFBA</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
+</dict>
+</plist>

+ 32 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayer-Info.plist

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string>player_icon.icns</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.polycode.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 7 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayer-Prefix.pch

@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'StandalonePlayer' target in the 'StandalonePlayer' project
+//
+
+#ifdef __OBJC__
+	#import <Cocoa/Cocoa.h>
+#endif

+ 24 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.h

@@ -0,0 +1,24 @@
+//
+//  StandalonePlayerAppDelegate.h
+//  StandalonePlayer
+//
+//  Created by Ivan Safrin on 5/25/11.
+//  Copyright 2011 Tomatogon. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+#import "PolycodeView.h"
+#include "PolycodeCocoaPlayer.h"
+
+@interface StandalonePlayerAppDelegate : NSObject <NSApplicationDelegate> {
+@private
+	NSWindow *window;
+	PolycodeView *mainView;
+	CocoaPolycodePlayer *player;
+	NSTimer *timer;
+}
+
+@property (assign) IBOutlet NSWindow *window;
+@property (assign) IBOutlet PolycodeView *mainView;
+
+@end

+ 20 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.m

@@ -0,0 +1,20 @@
+//
+//  StandalonePlayerAppDelegate.m
+//  StandalonePlayer
+//
+//  Created by Ivan Safrin on 5/25/11.
+//  Copyright 2011 Tomatogon. All rights reserved.
+//
+
+#import "StandalonePlayerAppDelegate.h"
+
+@implementation StandalonePlayerAppDelegate
+
+@synthesize window;
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+	// Insert code here to initialize your application
+}
+
+@end

+ 38 - 0
Player/Build/Mac OS X Standalone/StandalonePlayer/StandalonePlayer/StandalonePlayerAppDelegate.mm

@@ -0,0 +1,38 @@
+//
+//  StandalonePlayerAppDelegate.m
+//  StandalonePlayer
+//
+//  Created by Ivan Safrin on 5/25/11.
+//  Copyright 2011 Tomatogon. All rights reserved.
+//
+
+#import "StandalonePlayerAppDelegate.h"
+
+@implementation StandalonePlayerAppDelegate
+
+@synthesize window;
+@synthesize mainView;
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+	chdir([[[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/Contents/Resources"] UTF8String]);
+
+	player =  new CocoaPolycodePlayer(mainView, "main.polyapp", false);
+	player->windowData = self;	
+	player->runPlayer();
+
+	timer = [NSTimer timerWithTimeInterval:(1.0f/90.0f) target:self selector:@selector(animationTimer:) userInfo:nil repeats:YES];
+	[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];
+	[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSEventTrackingRunLoopMode]; // ensure timer fires during resize
+
+}
+
+- (void)animationTimer:(NSTimer *)timer
+{
+
+	if(!player->Update()) {
+		[self close];
+	}
+}
+
+@end

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff