ソースを参照

Huge tidy up of headers. Moved includes to .cpp files where possible to improve compile times and reduce circular dependencies.

Cameron Hart 14 年 前
コミット
aa4e7b968e
100 ファイル変更468 行追加639 行削除
  1. 15 28
      Core/Contents/Include/OSBasics.h
  2. 3 6
      Core/Contents/Include/PolyBezierCurve.h
  3. 4 6
      Core/Contents/Include/PolyBone.h
  4. 7 6
      Core/Contents/Include/PolyCamera.h
  5. 0 3
      Core/Contents/Include/PolyColor.h
  6. 2 8
      Core/Contents/Include/PolyConfig.h
  7. 9 16
      Core/Contents/Include/PolyCore.h
  8. 5 5
      Core/Contents/Include/PolyCoreInput.h
  9. 7 18
      Core/Contents/Include/PolyCoreServices.h
  10. 4 4
      Core/Contents/Include/PolyCubemap.h
  11. 0 1
      Core/Contents/Include/PolyData.h
  12. 5 7
      Core/Contents/Include/PolyEntity.h
  13. 1 5
      Core/Contents/Include/PolyEvent.h
  14. 3 7
      Core/Contents/Include/PolyEventDispatcher.h
  15. 2 3
      Core/Contents/Include/PolyEventHandler.h
  16. 2 2
      Core/Contents/Include/PolyFixedShader.h
  17. 2 6
      Core/Contents/Include/PolyFont.h
  18. 4 7
      Core/Contents/Include/PolyFontManager.h
  19. 3 8
      Core/Contents/Include/PolyGLCubemap.h
  20. 3 16
      Core/Contents/Include/PolyGLRenderer.h
  21. 2 22
      Core/Contents/Include/PolyGLSLProgram.h
  22. 5 23
      Core/Contents/Include/PolyGLSLShader.h
  23. 6 22
      Core/Contents/Include/PolyGLSLShaderModule.h
  24. 1 8
      Core/Contents/Include/PolyGLTexture.h
  25. 4 12
      Core/Contents/Include/PolyGLVertexBuffer.h
  26. 2 7
      Core/Contents/Include/PolyImage.h
  27. 1 2
      Core/Contents/Include/PolyInputEvent.h
  28. 2 6
      Core/Contents/Include/PolyLabel.h
  29. 0 11
      Core/Contents/Include/PolyLogger.h
  30. 9 11
      Core/Contents/Include/PolyMaterial.h
  31. 10 14
      Core/Contents/Include/PolyMaterialManager.h
  32. 1 2
      Core/Contents/Include/PolyMatrix4.h
  33. 7 10
      Core/Contents/Include/PolyMesh.h
  34. 8 5
      Core/Contents/Include/PolyModule.h
  35. 4 3
      Core/Contents/Include/PolyObject.h
  36. 7 7
      Core/Contents/Include/PolyParticle.h
  37. 19 10
      Core/Contents/Include/PolyParticleEmitter.h
  38. 4 11
      Core/Contents/Include/PolyPolygon.h
  39. 1 3
      Core/Contents/Include/PolyQuaternion.h
  40. 6 8
      Core/Contents/Include/PolyQuaternionCurve.h
  41. 1 2
      Core/Contents/Include/PolyRectangle.h
  42. 17 15
      Core/Contents/Include/PolyRenderer.h
  43. 0 5
      Core/Contents/Include/PolyResource.h
  44. 6 15
      Core/Contents/Include/PolyResourceManager.h
  45. 3 8
      Core/Contents/Include/PolySDLCore.h
  46. 13 13
      Core/Contents/Include/PolyScene.h
  47. 1 11
      Core/Contents/Include/PolySceneEntity.h
  48. 4 10
      Core/Contents/Include/PolySceneLabel.h
  49. 2 6
      Core/Contents/Include/PolySceneLight.h
  50. 3 8
      Core/Contents/Include/PolySceneManager.h
  51. 3 9
      Core/Contents/Include/PolySceneMesh.h
  52. 1 6
      Core/Contents/Include/PolyScenePrimitive.h
  53. 3 4
      Core/Contents/Include/PolySceneRenderTexture.h
  54. 1 2
      Core/Contents/Include/PolySceneSound.h
  55. 12 12
      Core/Contents/Include/PolyScreen.h
  56. 3 6
      Core/Contents/Include/PolyScreenCurve.h
  57. 3 4
      Core/Contents/Include/PolyScreenEntity.h
  58. 0 10
      Core/Contents/Include/PolyScreenImage.h
  59. 3 12
      Core/Contents/Include/PolyScreenLabel.h
  60. 3 7
      Core/Contents/Include/PolyScreenLine.h
  61. 3 8
      Core/Contents/Include/PolyScreenManager.h
  62. 4 8
      Core/Contents/Include/PolyScreenMesh.h
  63. 3 9
      Core/Contents/Include/PolyScreenShape.h
  64. 2 2
      Core/Contents/Include/PolyScreenSound.h
  65. 2 5
      Core/Contents/Include/PolyScreenSprite.h
  66. 7 6
      Core/Contents/Include/PolyShader.h
  67. 10 11
      Core/Contents/Include/PolySkeleton.h
  68. 3 9
      Core/Contents/Include/PolySound.h
  69. 2 4
      Core/Contents/Include/PolySoundManager.h
  70. 9 12
      Core/Contents/Include/PolyString.h
  71. 1 2
      Core/Contents/Include/PolyThreaded.h
  72. 1 5
      Core/Contents/Include/PolyTimer.h
  73. 2 7
      Core/Contents/Include/PolyTimerManager.h
  74. 4 4
      Core/Contents/Include/PolyTween.h
  75. 2 6
      Core/Contents/Include/PolyTweenManager.h
  76. 0 1
      Core/Contents/Include/PolyVector2.h
  77. 0 1
      Core/Contents/Include/PolyVector3.h
  78. 2 5
      Core/Contents/Include/PolyVertex.h
  79. 14 0
      Core/Contents/Source/OSBasics.cpp
  80. 5 0
      Core/Contents/Source/PolyBone.cpp
  81. 8 0
      Core/Contents/Source/PolyCamera.cpp
  82. 1 0
      Core/Contents/Source/PolyColor.cpp
  83. 1 0
      Core/Contents/Source/PolyConfig.cpp
  84. 5 2
      Core/Contents/Source/PolyCore.cpp
  85. 2 1
      Core/Contents/Source/PolyCoreInput.cpp
  86. 16 1
      Core/Contents/Source/PolyCoreServices.cpp
  87. 1 0
      Core/Contents/Source/PolyData.cpp
  88. 1 0
      Core/Contents/Source/PolyEntity.cpp
  89. 2 1
      Core/Contents/Source/PolyEventDispatcher.cpp
  90. 2 0
      Core/Contents/Source/PolyFont.cpp
  91. 1 0
      Core/Contents/Source/PolyFontManager.cpp
  92. 2 1
      Core/Contents/Source/PolyGLCubemap.cpp
  93. 17 1
      Core/Contents/Source/PolyGLRenderer.cpp
  94. 14 0
      Core/Contents/Source/PolyGLSLProgram.cpp
  95. 23 0
      Core/Contents/Source/PolyGLSLShader.cpp
  96. 22 0
      Core/Contents/Source/PolyGLSLShaderModule.cpp
  97. 2 1
      Core/Contents/Source/PolyGLTexture.cpp
  98. 4 1
      Core/Contents/Source/PolyGLVertexBuffer.cpp
  99. 5 1
      Core/Contents/Source/PolyImage.cpp
  100. 1 0
      Core/Contents/Source/PolyLabel.cpp

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

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

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

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

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

@@ -21,17 +21,15 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyString.h"
 #include "PolyString.h"
+#include "PolyMatrix4.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolyMesh.h"
-#include "PolyCoreServices.h"
-#include "PolySceneLabel.h"
-#include "PolySceneLine.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Mesh;
+
 	/** 
 	/** 
 	* Skeleton bone. Bones are bound to vertices of a mesh and when transformed, move the bound vertices of the mesh along with them. Bones are subclassed from SceneEntity, but have their own hierarchy system.
 	* Skeleton bone. Bones are bound to vertices of a mesh and when transformed, move the bound vertices of the mesh along with them. Bones are subclassed from SceneEntity, but have their own hierarchy system.
 	* @see Skeleton
 	* @see Skeleton
@@ -159,7 +157,7 @@ namespace Polycode {
 			Mesh *boneMesh;
 			Mesh *boneMesh;
 		
 		
 			Bone* parentBone;
 			Bone* parentBone;
-			vector<Bone*> childBones;
+			std::vector<Bone*> childBones;
 			String boneName;
 			String boneName;
 	};
 	};
 
 

+ 7 - 6
Core/Contents/Include/PolyCamera.h

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

+ 0 - 3
Core/Contents/Include/PolyColor.h

@@ -22,10 +22,7 @@
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <stdlib.h>
  
  
 namespace Polycode {
 namespace Polycode {
 
 

+ 2 - 8
Core/Contents/Include/PolyConfig.h

@@ -21,14 +21,8 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
-#include <vector>
-#include "tinyxml.h"
-
-using std::string;
-using std::vector;
+#include "PolyString.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -100,7 +94,7 @@ namespace Polycode {
 		
 		
 	private:
 	private:
 		
 		
-		vector<ConfigEntry*> entries;
+		std::vector<ConfigEntry*> entries;
 		
 		
 	};
 	};
 }
 }

+ 9 - 16
Core/Contents/Include/PolyCore.h

@@ -21,18 +21,11 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyRenderer.h"
-#include "PolyThreaded.h"
-#include "PolyCoreInput.h"
-//#include "PolyGLRenderer.h"
-#include "PolyMaterialManager.h"
-#include "PolyCoreServices.h"
+#include "PolyString.h"
 #include "PolyRectangle.h"
 #include "PolyRectangle.h"
-#include <vector>
-#include <string>
+#include "PolyVector2.h"
+#include "PolyEventDispatcher.h"
 
 
 #define CURSOR_ARROW 0
 #define CURSOR_ARROW 0
 #define CURSOR_TEXT 1
 #define CURSOR_TEXT 1
@@ -41,14 +34,14 @@ THE SOFTWARE.
 #define CURSOR_RESIZE_LEFT_RIGHT 4
 #define CURSOR_RESIZE_LEFT_RIGHT 4
 #define CURSOR_RESIZE_UP_DOWN 5
 #define CURSOR_RESIZE_UP_DOWN 5
 
 
-using std::vector;
-using std::wstring;
-
 long getThreadID();
 long getThreadID();
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class CoreInput;
 	class CoreServices;
 	class CoreServices;
+	class Renderer;
+	class Threaded;
 
 
 	class _PolyExport CoreMutex {
 	class _PolyExport CoreMutex {
 	public:
 	public:
@@ -194,7 +187,7 @@ namespace Polycode {
 		* Returns the available system video modes. 
 		* Returns the available system video modes. 
 		* @return An STL vector of video modes.
 		* @return An STL vector of video modes.
 		*/															
 		*/															
-		virtual vector<Rectangle> getVideoModes() = 0;
+		virtual std::vector<Rectangle> getVideoModes() = 0;
 				
 				
 		/**
 		/**
 		* Creates a folder on disk with the specified path.
 		* Creates a folder on disk with the specified path.
@@ -234,7 +227,7 @@ namespace Polycode {
 		* @param allowMultiple If set to true, the picker can select multiple files.
 		* @param allowMultiple If set to true, the picker can select multiple files.
 		* @return An STL vector of the selected file paths.
 		* @return An STL vector of the selected file paths.
 		*/																							
 		*/																							
-		virtual vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple) = 0;
+		virtual std::vector<String> openFilePicker(std::vector<CoreFileExtension> extensions, bool allowMultiple) = 0;
 		
 		
 		void setVideoModeIndex(int index, bool fullScreen, int aaLevel);
 		void setVideoModeIndex(int index, bool fullScreen, int aaLevel);
 		
 		
@@ -288,7 +281,7 @@ namespace Polycode {
 		bool fullScreen;
 		bool fullScreen;
 		int aaLevel;
 		int aaLevel;
 	
 	
-		vector<Vector2>	videoModes;
+		std::vector<Vector2>	videoModes;
 		void updateCore();
 		void updateCore();
 
 
 		int numVideoModes;
 		int numVideoModes;

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

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

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

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

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

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

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

@@ -22,7 +22,6 @@
 
 
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyString.h"
 #include "PolyString.h"
-#include "OSBasics.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 

+ 5 - 7
Core/Contents/Include/PolyEntity.h

@@ -21,19 +21,17 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
+#include "PolyString.h"
 #include "PolyMatrix4.h"
 #include "PolyMatrix4.h"
 #include "PolyQuaternion.h"
 #include "PolyQuaternion.h"
 #include "PolyColor.h"
 #include "PolyColor.h"
-#include "PolyRenderer.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
+	class Renderer;
+
 	class _PolyExport EntityProp {
 	class _PolyExport EntityProp {
 	public:
 	public:
 		String propName;
 		String propName;
@@ -553,7 +551,7 @@ namespace Polycode {
 				
 				
 			Vector3 getChildCenter() const;
 			Vector3 getChildCenter() const;
 							
 							
-			vector <EntityProp> entityProps;						
+			std::vector <EntityProp> entityProps;
 			String getEntityProp(const String& propName);
 			String getEntityProp(const String& propName);
 			
 			
 			void doUpdates();				
 			void doUpdates();				
@@ -568,7 +566,7 @@ namespace Polycode {
 			bool isMask;
 			bool isMask;
 		
 		
 		protected:
 		protected:
-			vector<Entity*> children;
+			std::vector<Entity*> children;
 
 
 			Vector3 childCenter;
 			Vector3 childCenter;
 			Number bBoxRadius;		
 			Number bBoxRadius;		

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

@@ -21,12 +21,8 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
-
-using std::string;
+#include "PolyString.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 

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

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

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

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

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

@@ -53,8 +53,8 @@ namespace Polycode {
 			
 			
 		protected:
 		protected:
 
 
-			vector<Texture*> textures;
-			vector<Cubemap*> cubemaps;		
+			std::vector<Texture*> textures;
+			std::vector<Cubemap*> cubemaps;
 			FixedShader *fixedShader;
 			FixedShader *fixedShader;
 	};
 	};
 
 

+ 2 - 6
Core/Contents/Include/PolyFont.h

@@ -21,18 +21,14 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
 #include "ft2build.h"
 #include "ft2build.h"
 #include FT_FREETYPE_H
 #include FT_FREETYPE_H
-#include "OSBasics.h"
-
-using namespace std;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class String;
+
 	class _PolyExport Font {
 	class _PolyExport Font {
 		public:
 		public:
 			Font(const String& fileName);
 			Font(const String& fileName);

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

@@ -22,17 +22,14 @@ THE SOFTWARE.
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyFont.h"
+#include "PolyString.h"
 #include <vector>
 #include <vector>
-#include <string>
-
-using std::vector;
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Font;
+
 	class FontEntry {
 	class FontEntry {
 	public:
 	public:
 		String fontName;
 		String fontName;
@@ -63,7 +60,7 @@ namespace Polycode {
 		
 		
 	private:
 	private:
 		
 		
-		vector <FontEntry> fonts;
+		std::vector <FontEntry> fonts;
 		
 		
 	};
 	};
 	
 	

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

@@ -22,14 +22,7 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 
 
-#ifdef _WINDOWS
-#include <windows.h>
-#endif
-
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyTexture.h"
-#include "PolyGLRenderer.h"
 #include "PolyCubemap.h"
 #include "PolyCubemap.h"
 #if defined(__APPLE__) && defined(__MACH__)
 #if defined(__APPLE__) && defined(__MACH__)
 #include <OpenGL/gl.h>
 #include <OpenGL/gl.h>
@@ -43,6 +36,8 @@ THE SOFTWARE.
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Texture;
+
 	class _PolyExport OpenGLCubemap : public Cubemap {
 	class _PolyExport OpenGLCubemap : public Cubemap {
 	public:
 	public:
 		
 		
@@ -57,4 +52,4 @@ namespace Polycode {
 		GLuint textureID;
 		GLuint textureID;
 	};
 	};
 	
 	
-}
+}

+ 3 - 16
Core/Contents/Include/PolyGLRenderer.h

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

+ 2 - 22
Core/Contents/Include/PolyGLSLProgram.h

@@ -22,29 +22,9 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 
 
-#include "Polycode.h"
-
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-
-#include "PolyLogger.h"
+#include "PolyString.h"
 #include "PolyResource.h"
 #include "PolyResource.h"
-#include "PolyVector3.h"
-#include <vector>
-
-
-#if defined(__APPLE__) && defined(__MACH__)
-#include <OpenGL/gl.h>
-#include <OpenGL/glext.h>
-#include <OpenGL/glu.h>	
-#else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
-#include <GL/glext.h>
-#endif
-
-
-
-using std::vector;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -123,6 +103,6 @@ class _PolyExport GLSLProgramParam {
 			
 			
 			int type;
 			int type;
 			
 			
-			vector<GLSLProgramParam> params;
+			std::vector<GLSLProgramParam> params;
 	};
 	};
 }
 }

+ 5 - 23
Core/Contents/Include/PolyGLSLShader.h

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

+ 6 - 22
Core/Contents/Include/PolyGLSLShaderModule.h

@@ -22,30 +22,14 @@ THE SOFTWARE.
 
 
 #pragma once
 #pragma once
 
 
-#include "Polycode.h"
-#include "PolyGLSLProgram.h"
-#include "PolyGLSLShader.h"
-#include "PolyMaterial.h"
-#include "PolyGLTexture.h"
-#include <string>
-#include <vector>
-
-#if defined(__APPLE__) && defined(__MACH__)
-#include <OpenGL/gl.h>
-#include <OpenGL/glext.h>
-#include <OpenGL/glu.h>	
-#else
-#include <GL/gl.h>	
-#include <GL/glu.h>	
-#include <GL/glext.h>
-#endif
-
-
-using std::vector;
-using std::string;
+#include "PolyModule.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class GLSLProgram;
+	class GLSLProgramParam;
+	class GLSLShader;
+
 	class _PolyExport GLSLShaderModule : public PolycodeShaderModule {
 	class _PolyExport GLSLShaderModule : public PolycodeShaderModule {
 		public:
 		public:
 			GLSLShaderModule();
 			GLSLShaderModule();
@@ -78,7 +62,7 @@ namespace Polycode {
 //		GLSLprofile vertexProfile;
 //		GLSLprofile vertexProfile;
 //		GLSLprofile fragmentProfile;
 //		GLSLprofile fragmentProfile;
 		
 		
-		vector<GLSLProgram*> programs;
+		std::vector<GLSLProgram*> programs;
 	};
 	};
 	
 	
 }
 }

+ 1 - 8
Core/Contents/Include/PolyGLTexture.h

@@ -22,15 +22,8 @@ THE SOFTWARE.
 
 
  
  
 #pragma once
 #pragma once
-
-#ifdef _WINDOWS
-	#include <windows.h>
-#endif
-
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyTexture.h"
 #include "PolyTexture.h"
-#include "PolyGLRenderer.h"
 #if defined(__APPLE__) && defined(__MACH__)
 #if defined(__APPLE__) && defined(__MACH__)
 #include <OpenGL/gl.h>
 #include <OpenGL/gl.h>
 #include <OpenGL/glext.h>
 #include <OpenGL/glext.h>
@@ -67,4 +60,4 @@ namespace Polycode {
 			GLuint frameBufferID;
 			GLuint frameBufferID;
 	};
 	};
 
 
-}
+}

+ 4 - 12
Core/Contents/Include/PolyGLVertexBuffer.h

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

+ 2 - 7
Core/Contents/Include/PolyImage.h

@@ -21,18 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyColor.h"
 #include "PolyColor.h"
-#include "PolyPerlin.h"
-#include <string>
-#include <math.h>
-#include "OSBasics.h"
-
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class String;
+
 	/**
 	/**
 	* An image in memory. Basic RGB or RGBA images stored in memory. Can be loaded from PNG files, created into textures and written to file.
 	* An image in memory. Basic RGB or RGBA images stored in memory. Can be loaded from PNG files, created into textures and written to file.
 	*/
 	*/

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

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

+ 2 - 6
Core/Contents/Include/PolyLabel.h

@@ -23,18 +23,14 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyFont.h"
 #include "PolyImage.h"
 #include "PolyImage.h"
 
 
-#include <string>
-using namespace std;
-
-using std::wstring;
-
 #define TAB_REPLACE "    "
 #define TAB_REPLACE "    "
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Font;
+
 	class _PolyExport Label : public Image {
 	class _PolyExport Label : public Image {
 		public:
 		public:
 			
 			

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

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

+ 9 - 11
Core/Contents/Include/PolyMaterial.h

@@ -23,18 +23,16 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <string>
-#include <vector>
-#include "PolyTexture.h"
-#include "PolyShader.h"
 #include "PolyResource.h"
 #include "PolyResource.h"
-
-
-using std::string;
-using std::vector;
+#include "PolyColor.h"
+#include <vector>
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Shader;
+	class ShaderBinding;
+	class ShaderRenderTarget;
+
 	class _PolyExport Material : public Resource {
 	class _PolyExport Material : public Resource {
 		public:
 		public:
 			Material(const String& name);
 			Material(const String& name);
@@ -58,9 +56,9 @@ namespace Polycode {
 						
 						
 		protected:
 		protected:
 		
 		
-			vector<Shader*> materialShaders;
-			vector<ShaderBinding*> shaderBindings;
-			vector<ShaderRenderTarget*> renderTargets;
+			std::vector<Shader*> materialShaders;
+			std::vector<ShaderBinding*> shaderBindings;
+			std::vector<ShaderRenderTarget*> renderTargets;
 					
 					
 			String name;
 			String name;
 		
 		

+ 10 - 14
Core/Contents/Include/PolyMaterialManager.h

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

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

@@ -21,10 +21,9 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
+#include <string.h>
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyVector3.h"
 #include "PolyVector3.h"
-#include <string.h>
 
 
 namespace Polycode {
 namespace Polycode {
 
 

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

@@ -21,19 +21,16 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include <math.h>
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyPolygon.h"
 #include "PolyVertex.h"
 #include "PolyVertex.h"
-#include <string>
-#include <vector>
-#include "OSBasics.h"
 
 
-using namespace std;
- 
+class OSFILE;
+
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Polygon;
+	class String;
+
 	class _PolyExport VertexSorter {
 	class _PolyExport VertexSorter {
 		public:
 		public:
 			Vertex *target;
 			Vertex *target;
@@ -259,7 +256,7 @@ namespace Polycode {
 			*/
 			*/
 			void calculateNormals(bool smooth=true, Number smoothAngle=90.0);	
 			void calculateNormals(bool smooth=true, Number smoothAngle=90.0);	
 			
 			
-			vector<Polygon*> getConnectedFaces(Vertex *v);
+			std::vector<Polygon*> getConnectedFaces(Vertex *v);
 			
 			
 			/**
 			/**
 			* Returns the mesh type.
 			* Returns the mesh type.
@@ -335,6 +332,6 @@ namespace Polycode {
 		VertexBuffer *vertexBuffer;
 		VertexBuffer *vertexBuffer;
 		bool meshHasVertexBuffer;
 		bool meshHasVertexBuffer;
 		int meshType;
 		int meshType;
-		vector <Polygon*> polygons;
+		std::vector <Polygon*> polygons;
 	};
 	};
 }
 }

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

@@ -10,13 +10,16 @@
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "tinyxml.h"
-#include "PolyShader.h"
-#include "PolyMaterial.h"
+
+class TiXmlNode;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
-	class Renderer;	
+	class Material;
+	class Renderer;
+	class Shader;
+	class ShaderBinding;
+	class Resource;
 	
 	
 	class _PolyExport PolycodeModule {
 	class _PolyExport PolycodeModule {
 	public:
 	public:
@@ -46,7 +49,7 @@ namespace Polycode {
 		virtual void clearShader() = 0;
 		virtual void clearShader() = 0;
 		virtual void reloadPrograms() = 0;
 		virtual void reloadPrograms() = 0;
 	protected:
 	protected:
-		vector<Shader*> shaders;
+		std::vector<Shader*> shaders;
 	};
 	};
 	
 	
 }
 }

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

@@ -20,10 +20,11 @@
  THE SOFTWARE.
  THE SOFTWARE.
  */
  */
 
 
-
+#pragma once
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyString.h"
 #include "PolyString.h"
-#include "tinyxml.h"
+
+class TiXmlElement;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -181,7 +182,7 @@ namespace Polycode {
 		*/
 		*/
 		inline ObjectEntry *operator [] ( const String& key) { for(int i=0; i < children.size(); i++) { if(children[i]->name == key) { return children[i]; } } return NULL; }
 		inline ObjectEntry *operator [] ( const String& key) { for(int i=0; i < children.size(); i++) { if(children[i]->name == key) { return children[i]; } } return NULL; }
 		
 		
-		vector<ObjectEntry*> children;		
+		std::vector<ObjectEntry*> children;
 	};
 	};
 	
 	
 	/**
 	/**

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

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

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

@@ -21,19 +21,28 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyEntity.h"
-#include "PolyScenePrimitive.h"
-#include "PolyScreenMesh.h"
-#include "PolyCoreServices.h"
-#include "PolyParticle.h"
-#include <vector>
-
-using std::vector;
+#include "PolyString.h"
+#include "PolyVector3.h"
+#include "PolyMatrix4.h"
+#include "PolyBezierCurve.h"
+#include "PolySceneEntity.h"
+#include "PolyScreenEntity.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Entity;
+	class Material;
+	class Mesh;
+	class Particle;
+	class Perlin;
+	class Scene;
+	class SceneMesh;
+	class Screen;
+	class ScreenMesh;
+	class Texture;
+	class Timer;
+
 	/** 
 	/** 
 	* Particle emitter base.
 	* Particle emitter base.
 	*/
 	*/
@@ -226,7 +235,7 @@ namespace Polycode {
 			
 			
 			Number rotationSpeed;
 			Number rotationSpeed;
 			Number numParticles;
 			Number numParticles;
-			vector<Particle*> particles;
+			std::vector<Particle*> particles;
 			
 			
 			Number emitSpeed;
 			Number emitSpeed;
 			Timer *timer;
 			Timer *timer;

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

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

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

@@ -21,11 +21,9 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyBasics.h"
 #include "PolyMatrix4.h"
 #include "PolyMatrix4.h"
-#include <math.h>
+#include "PolyVector3.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 

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

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

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

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

+ 17 - 15
Core/Contents/Include/PolyRenderer.h

@@ -23,20 +23,22 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyColor.h"
-#include "PolyPolygon.h"
-#include "PolyMesh.h"
-#include "PolyTexture.h"
-#include "PolyCubemap.h"
-#include "PolyMaterial.h"
-#include "PolyModule.h"
-#include "PolyVector3.h"
-#include "PolyQuaternion.h"
 #include "PolyMatrix4.h"
 #include "PolyMatrix4.h"
+#include "PolyVector2.h"
+#include "PolyImage.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Cubemap;
+	class Material;
+	class Mesh;
+	class PolycodeShaderBinding;
+	class PolycodeShaderModule;
+	class Polygon;
+	class RenderDataArray;
+	class ShaderBinding;
 	class Texture;
 	class Texture;
+	class VertexBuffer;
 
 
 	class _PolyExport LightInfo {
 	class _PolyExport LightInfo {
 		public:
 		public:
@@ -239,8 +241,8 @@ namespace Polycode {
 		int getNumSpotLights() { return numSpotLights; }
 		int getNumSpotLights() { return numSpotLights; }
 		int getNumLights() { return numLights; }
 		int getNumLights() { return numLights; }
 		
 		
-		vector<LightInfo> getAreaLights() { return areaLights; }
-		vector<LightInfo> getSpotLights() { return spotLights;	}
+		std::vector<LightInfo> getAreaLights() { return areaLights; }
+		std::vector<LightInfo> getSpotLights() { return spotLights;	}
 		
 		
 	protected:
 	protected:
 		Matrix4 currentModelMatrix;
 		Matrix4 currentModelMatrix;
@@ -262,11 +264,11 @@ namespace Polycode {
 		Matrix4 cameraMatrix;
 		Matrix4 cameraMatrix;
 	
 	
 		PolycodeShaderModule* currentShaderModule;
 		PolycodeShaderModule* currentShaderModule;
-		vector <PolycodeShaderModule*> shaderModules;
+		std::vector <PolycodeShaderModule*> shaderModules;
 
 
-		vector<LightInfo> lights;
-		vector<LightInfo> areaLights;
-		vector<LightInfo> spotLights;		
+		std::vector<LightInfo> lights;
+		std::vector<LightInfo> areaLights;
+		std::vector<LightInfo> spotLights;
 		int numLights;
 		int numLights;
 		int numAreaLights;
 		int numAreaLights;
 		int numSpotLights;
 		int numSpotLights;

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

@@ -24,11 +24,6 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <vector>
-#include <string>
-
-using std::vector;
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 

+ 6 - 15
Core/Contents/Include/PolyResourceManager.h

@@ -22,24 +22,15 @@ THE SOFTWARE.
  
  
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include <vector>
 #include <vector>
-#include <string>
-#include "OSBasics.h"
-#include "PolyTexture.h"
-#include "PolyCubemap.h"
-#include "PolyResource.h"
-#include "PolyCoreServices.h"
-#include "PolyModule.h"
-#include "tinyxml.h"
-#include "physfs.h"
-
-using std::vector;
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Resource;
+	class PolycodeShaderModule;
+	class String;
+
 	/**
 	/**
 	* Manages loading and unloading of resources from directories and archives. Should only be accessed via the CoreServices singleton. 
 	* Manages loading and unloading of resources from directories and archives. Should only be accessed via the CoreServices singleton. 
 	*/ 
 	*/ 
@@ -86,7 +77,7 @@ namespace Polycode {
 		
 		
 		
 		
 		private:
 		private:
-			vector <Resource*> resources;
-			vector <PolycodeShaderModule*> shaderModules;
+			std::vector <Resource*> resources;
+			std::vector <PolycodeShaderModule*> shaderModules;
 	};
 	};
 }
 }

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

@@ -24,14 +24,9 @@
 
 
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyCore.h"
 #include "PolyCore.h"
-#include "PolyGLRenderer.h"
-#include "PolyGLSLShaderModule.h"
-#include "PolyRectangle.h"
 #include <vector>
 #include <vector>
-#include <SDL/SDL.h>
-#include <iostream>
 
 
-using std::vector;
+struct SDL_mutex;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -52,7 +47,7 @@ namespace Polycode {
 		bool Update();
 		bool Update();
 		void setVideoMode(int xRes, int yRes, bool fullScreen, int aaLevel);
 		void setVideoMode(int xRes, int yRes, bool fullScreen, int aaLevel);
 		void createThread(Threaded *target);
 		void createThread(Threaded *target);
-		vector<Rectangle> getVideoModes();
+		std::vector<Rectangle> getVideoModes();
 		
 		
 		void setCursor(int cursorType);
 		void setCursor(int cursorType);
 		void lockMutex(CoreMutex *mutex);
 		void lockMutex(CoreMutex *mutex);
@@ -65,7 +60,7 @@ namespace Polycode {
 		void moveDiskItem(const String& itemPath, const String& destItemPath);
 		void moveDiskItem(const String& itemPath, const String& destItemPath);
 		void removeDiskItem(const String& itemPath);
 		void removeDiskItem(const String& itemPath);
 		String openFolderPicker();
 		String openFolderPicker();
-		vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple);
+		std::vector<String> openFilePicker(std::vector<CoreFileExtension> extensions, bool allowMultiple);
 		void resizeTo(int xRes, int yRes);
 		void resizeTo(int xRes, int yRes);
 
 
 	private:
 	private:

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

@@ -21,20 +21,20 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyRenderer.h"
-#include "PolySceneEntity.h"
-#include "PolyCamera.h"
-#include "PolySceneLight.h"
-#include "PolySceneMesh.h"
+#include "PolyString.h"
+#include "PolyColor.h"
+#include "PolyVector3.h"
+#include "PolyEventDispatcher.h"
+
 #include <vector>
 #include <vector>
 
 
-using std::vector;
+class OSFILE;
 
 
 namespace Polycode {
 namespace Polycode {
 		
 		
 	class Camera;
 	class Camera;
+	class SceneEntity;
 	class SceneLight;
 	class SceneLight;
 	class SceneMesh;
 	class SceneMesh;
 	
 	
@@ -140,7 +140,7 @@ namespace Polycode {
 		SceneLight *getLight(int index);
 		SceneLight *getLight(int index);
 		
 		
 		SceneEntity *getCustomEntityByType(const String& type) const;
 		SceneEntity *getCustomEntityByType(const String& type) const;
-		vector<SceneEntity*> getCustomEntitiesByType(const String& type) const;
+		std::vector<SceneEntity*> getCustomEntitiesByType(const String& type) const;
 		
 		
 		static const unsigned int ENTITY_MESH = 0;
 		static const unsigned int ENTITY_MESH = 0;
 		static const unsigned int ENTITY_LIGHT = 1;			
 		static const unsigned int ENTITY_LIGHT = 1;			
@@ -177,16 +177,16 @@ namespace Polycode {
 		
 		
 		bool hasLightmaps;
 		bool hasLightmaps;
 		
 		
-		vector <SceneLight*> lights;				
-		vector <SceneMesh*> staticGeometry;
-		vector <SceneMesh*> collisionGeometry;
-		vector <SceneEntity*> customEntities;
+		std::vector <SceneLight*> lights;
+		std::vector <SceneMesh*> staticGeometry;
+		std::vector <SceneMesh*> collisionGeometry;
+		std::vector <SceneEntity*> customEntities;
 		
 		
 		
 		
 		bool isSceneVirtual;
 		bool isSceneVirtual;
 		
 		
 		Camera *defaultCamera;
 		Camera *defaultCamera;
-		vector <SceneEntity*> entities;
+		std::vector <SceneEntity*> entities;
 		
 		
 		bool lightingEnabled;
 		bool lightingEnabled;
 		bool fogEnabled;
 		bool fogEnabled;

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

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

+ 4 - 10
Core/Contents/Include/PolySceneLabel.h

@@ -21,21 +21,15 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
-#include "PolyFont.h"
-#include "PolyLabel.h"
-#include "PolyMesh.h"
-#include "PolyTexture.h"
-#include "PolyPolygon.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
 
 
-#include <string>
-using std::string;
-
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class Label;
+	class Mesh;
+	class Texture;
+
 	/**
 	/**
 	* 3D text label. Creates a 3D text label.
 	* 3D text label. Creates a 3D text label.
 	*/
 	*/

+ 2 - 6
Core/Contents/Include/PolySceneLight.h

@@ -22,19 +22,15 @@ THE SOFTWARE.
  
  
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolyCoreServices.h"
-#include "PolyScene.h"
-#include "PolyCamera.h"
-#include "PolyMesh.h"
-//#include "PolyScenePrimitive.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
 	class Scene;
 	class Scene;
 	class Camera;
 	class Camera;
+	class Mesh;
+	class Texture;
 //	class ScenePrimitive;
 //	class ScenePrimitive;
 	
 	
 	/**
 	/**

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

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

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

@@ -21,22 +21,16 @@ THE SOFTWARE.
 */
 */
  
  
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolyMesh.h"
-#include "PolySkeleton.h"
-#include "PolyMaterial.h"
-#include "PolyImage.h"
-#include <string>
-
-using namespace std;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Material;
+	class Mesh;
 	class Texture;
 	class Texture;
 	class Skeleton;
 	class Skeleton;
+	class ShaderBinding;
 	
 	
 	/**
 	/**
 	* 3D polygonal mesh instance. The SceneMesh is the base for all polygonal 3d geometry. It can have simple textures or complex materials applied to it.
 	* 3D polygonal mesh instance. The SceneMesh is the base for all polygonal 3d geometry. It can have simple textures or complex materials applied to it.

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

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

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

@@ -21,14 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyScene.h"
-#include "PolyTexture.h"
 
 
 namespace Polycode {
 namespace Polycode {
+
 	class Scene;
 	class Scene;
 	class Camera;
 	class Camera;
+	class Texture;
 	
 	
 	/**
 	/**
 	* Renders scenes to texture. This class automatically renders a scene to a texture every frame that you can use to texture anything else. You can set a scene to virtual (see Scene for details) to only render a scene to a texture if you need to. This class automatically adds itself to the render cycle, so you do not need to do anything manual every frame.
 	* Renders scenes to texture. This class automatically renders a scene to a texture every frame that you can use to texture anything else. You can set a scene to virtual (see Scene for details) to only render a scene to a texture if you need to. This class automatically adds itself to the render cycle, so you do not need to do anything manual every frame.
@@ -68,4 +67,4 @@ namespace Polycode {
 			Scene *targetScene;
 			Scene *targetScene;
 			Camera *targetCamera;
 			Camera *targetCamera;
 	};
 	};
-}
+}

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

@@ -21,12 +21,11 @@ THE SOFTWARE.
 */
 */
 
 
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolySound.h"
 #include "PolySceneEntity.h"
 #include "PolySceneEntity.h"
-#include "PolyCoreServices.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Sound;
 
 
 	/**
 	/**
 	* Creates a positional 3D sound listener. There can be only one listener active at any one time.
 	* Creates a positional 3D sound listener. There can be only one listener active at any one time.

+ 12 - 12
Core/Contents/Include/PolyScreen.h

@@ -22,20 +22,20 @@ THE SOFTWARE.
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyScreenEntity.h"
-#include "PolyRenderer.h"
-#include "PolyInputEvent.h"
-#include "PolyCoreServices.h"
+#include "PolyVector2.h"
+#include "PolyEventDispatcher.h"
 #include <vector>
 #include <vector>
-#include <algorithm>
-#include "PolyScreenEvent.h"
-
-using namespace std;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class InputEvent;
+	class Renderer;
+	class Material;
+	class Texture;
+	class ScreenEntity;
+	class ShaderBinding;
+
 	/**
 	/**
 	* 2D rendering base. The Screen is the container for all 2D rendering in Polycode. Screens are automatically rendered and need only be instantiated to immediately add themselves to the rendering pipeline. Each screen has a root entity.
 	* 2D rendering base. The Screen is the container for all 2D rendering in Polycode. Screens are automatically rendered and need only be instantiated to immediately add themselves to the rendering pipeline. Each screen has a root entity.
 	*/	
 	*/	
@@ -139,7 +139,7 @@ namespace Polycode {
 		/**
 		/**
 		* Returns the local shader options for the camera post processing material.
 		* Returns the local shader options for the camera post processing material.
 		*/				
 		*/				
-		vector<ShaderBinding*> getLocalShaderOptions() { return localShaderOptions; }
+		std::vector<ShaderBinding*> getLocalShaderOptions() { return localShaderOptions; }
 		
 		
 		/**
 		/**
 		* Returns the shader material applied to the camera.
 		* Returns the shader material applied to the camera.
@@ -156,12 +156,12 @@ namespace Polycode {
 		Vector2 offset;
 		Vector2 offset;
 		Renderer *renderer;
 		Renderer *renderer;
 		ScreenEntity *focusChild;
 		ScreenEntity *focusChild;
-		vector <ScreenEntity*> children;
+		std::vector <ScreenEntity*> children;
 		
 		
 		Material *filterShaderMaterial;			
 		Material *filterShaderMaterial;			
 		Texture *originalSceneTexture;			
 		Texture *originalSceneTexture;			
 		Texture *zBufferSceneTexture;						
 		Texture *zBufferSceneTexture;						
-		vector<ShaderBinding*> localShaderOptions;
+		std::vector<ShaderBinding*> localShaderOptions;
 		bool _hasFilterShader;
 		bool _hasFilterShader;
 	};
 	};
 }
 }

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

@@ -21,16 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
-#include "PolyScreenEntity.h"
-#include "PolyBezierCurve.h"
-#include "PolyPolygon.h"
 #include "PolyScreenShape.h"
 #include "PolyScreenShape.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class BezierCurve;
+
 	class _PolyExport ScreenCurve : public ScreenShape {
 	class _PolyExport ScreenCurve : public ScreenShape {
 		public:
 		public:
 			ScreenCurve(BezierCurve *curve, int numVertices);
 			ScreenCurve(BezierCurve *curve, int numVertices);
@@ -41,4 +38,4 @@ namespace Polycode {
 			Number numVertices;
 			Number numVertices;
 			BezierCurve *curve;
 			BezierCurve *curve;
 	};
 	};
-}
+}

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

@@ -22,14 +22,13 @@ THE SOFTWARE.
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyVector2.h"
 #include "PolyVector2.h"
-#include "PolyInputEvent.h"
-#include "PolyEventDispatcher.h"
+#include "PolyMatrix4.h"
 #include "PolyRectangle.h"
 #include "PolyRectangle.h"
+#include "PolyInputKeys.h"
 #include "PolyEntity.h"
 #include "PolyEntity.h"
-
+#include "PolyEventDispatcher.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 

+ 0 - 10
Core/Contents/Include/PolyScreenImage.h

@@ -21,18 +21,8 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include <math.h>
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyScreenShape.h"
 #include "PolyScreenShape.h"
-#include "PolyCoreServices.h"
-#include "PolyImage.h"
-#include "PolyMesh.h"
-#include "PolyTexture.h"
-
-#include <string>
-
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 

+ 3 - 12
Core/Contents/Include/PolyScreenLabel.h

@@ -21,23 +21,14 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
 #include "PolyScreenShape.h"
 #include "PolyScreenShape.h"
-#include "PolyScreenImage.h"
-#include "PolyFont.h"
-#include "PolyLabel.h"
-#include "PolyTexture.h"
-#include "PolyPolygon.h"
-#include "PolyMesh.h"
-
-#include <string>
-using std::string;
-using std::wstring;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Label;
+	class ScreenImage;
+
 	/**
 	/**
 	* 2D screen label display. Displays 2d text in a specified font.
 	* 2D screen label display. Displays 2d text in a specified font.
 	*/ 
 	*/ 

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

@@ -21,17 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyScreenMesh.h"
 #include "PolyScreenMesh.h"
-#include "PolyCoreServices.h"
-#include "PolyMesh.h"
-
-#include <string>
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Vertex;
+
 	/**
 	/**
 	* A 2D line between two points or two ScreenEntity instances.
 	* A 2D line between two points or two ScreenEntity instances.
 	*/ 
 	*/ 
@@ -75,4 +71,4 @@ namespace Polycode {
 			ScreenEntity *target2;
 			ScreenEntity *target2;
 			
 			
 	};
 	};
-}
+}

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

@@ -21,15 +21,10 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyScreen.h"
-//#include "PolyPhysicsScreen.h"
-#include "PolyCoreServices.h"
+#include "PolyEventDispatcher.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
 	class Screen;
 	class Screen;
@@ -54,8 +49,8 @@ namespace Polycode {
 		
 		
 		private:
 		private:
 		
 		
-		vector <Screen*> screens;
+		std::vector <Screen*> screens;
 			
 			
 	};
 	};
 
 
-}
+}

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

@@ -21,19 +21,15 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
 #include "PolyScreenEntity.h"
 #include "PolyScreenEntity.h"
-#include "PolyMesh.h"
-#include "PolyTexture.h"
-#include "PolyPolygon.h"
-
-#include <string>
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Image;
+	class Mesh;
+	class Texture;
+
 	/**
 	/**
 	* 2D Mesh. ScreenMesh is the base for most geometry-based screen entities. It's based aroudn a Mesh instance, like its 3D counterpart (SceneMesh), but currently has fewer options.
 	* 2D Mesh. ScreenMesh is the base for most geometry-based screen entities. It's based aroudn a Mesh instance, like its 3D counterpart (SceneMesh), but currently has fewer options.
 	* @see Mesh
 	* @see Mesh

+ 3 - 9
Core/Contents/Include/PolyScreenShape.h

@@ -21,19 +21,13 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
-#include "PolyScreenEntity.h"
 #include "PolyScreenMesh.h"
 #include "PolyScreenMesh.h"
-#include "PolyPolygon.h"
-#include "PolyMesh.h"
-
-#include <string>
-using std::string;
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Polygon;
+
 	/**
 	/**
 	* 2D primitive. Screen shape can create 2d shapes (Currently only rectangles and circles). 
 	* 2D primitive. Screen shape can create 2d shapes (Currently only rectangles and circles). 
 	*/ 
 	*/ 
@@ -130,4 +124,4 @@ namespace Polycode {
 			int shapeType;
 			int shapeType;
 			
 			
 	};
 	};
-}
+}

+ 2 - 2
Core/Contents/Include/PolyScreenSound.h

@@ -21,12 +21,12 @@ THE SOFTWARE.
 */
 */
 
 
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolySound.h"
-#include "PolyCoreServices.h"
 #include "PolyScreenEntity.h"
 #include "PolyScreenEntity.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Sound;
+
 	/**
 	/**
 	* Creates a positional 2D sound listener. There can be only one listener active at any one time.
 	* Creates a positional 2D sound listener. There can be only one listener active at any one time.
  	*/	
  	*/	

+ 2 - 5
Core/Contents/Include/PolyScreenSprite.h

@@ -21,12 +21,9 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyCoreServices.h"
 #include "PolyScreenShape.h"
 #include "PolyScreenShape.h"
 #include <vector>
 #include <vector>
-#include <string>
 
 
 namespace Polycode {
 namespace Polycode {
 
 
@@ -36,7 +33,7 @@ class _PolyExport SpriteAnimation {
 		String name;
 		String name;
 		int numFrames;
 		int numFrames;
 	
 	
-		vector<Vector2> framesOffsets;
+		std::vector<Vector2> framesOffsets;
 };
 };
 
 
 /**
 /**
@@ -84,7 +81,7 @@ class _PolyExport ScreenSprite : public ScreenShape
 		int currentFrame;
 		int currentFrame;
 		SpriteAnimation *currentAnimation;
 		SpriteAnimation *currentAnimation;
 		
 		
-		vector<SpriteAnimation*> animations;
+		std::vector<SpriteAnimation*> animations;
 };
 };
 	
 	
 }
 }

+ 7 - 6
Core/Contents/Include/PolyShader.h

@@ -24,12 +24,13 @@ THE SOFTWARE.
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyResource.h"
 #include "PolyResource.h"
-#include "PolyTexture.h"
-#include "PolyCubemap.h"
 
 
 namespace Polycode {
 namespace Polycode {
 
 
+	class Cubemap;
 	class ShaderBinding;
 	class ShaderBinding;
+	class Texture;
+
 	class _PolyExport Shader : public Resource {
 	class _PolyExport Shader : public Resource {
 		public:
 		public:
 			Shader(int type);
 			Shader(int type);
@@ -110,10 +111,10 @@ namespace Polycode {
 			void addLocalParam(const String& name, void *ptr);
 			void addLocalParam(const String& name, void *ptr);
 			
 			
 			Shader* shader;
 			Shader* shader;
-			vector<LocalShaderParam*> localParams;
-			vector<RenderTargetBinding*> renderTargetBindings;
-			vector<RenderTargetBinding*> inTargetBindings;
-			vector<RenderTargetBinding*> outTargetBindings;
+			std::vector<LocalShaderParam*> localParams;
+			std::vector<RenderTargetBinding*> renderTargetBindings;
+			std::vector<RenderTargetBinding*> inTargetBindings;
+			std::vector<RenderTargetBinding*> outTargetBindings;
 	};
 	};
 
 
 }
 }

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

@@ -24,17 +24,16 @@ THE SOFTWARE.
 #pragma once
 #pragma once
 #include "PolyString.h"
 #include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyBone.h"
-#include <string>
+#include "PolyColor.h"
+#include "PolyVector3.h"
+#include "PolyQuaternion.h"
+#include "PolySceneEntity.h"
 #include <vector>
 #include <vector>
-#include "PolyBezierCurve.h"
-#include "PolyTween.h"
-
-using std::string;
-using std::vector;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class BezierCurve;
+	class Bone;
 	class QuaternionTween;
 	class QuaternionTween;
 	class BezierPathTween;
 	class BezierPathTween;
 	
 	
@@ -84,7 +83,7 @@ namespace Polycode {
 			bool initialized;
 			bool initialized;
 		
 		
 			Bone *targetBone;
 			Bone *targetBone;
-			vector <BezierPathTween*> pathTweens;
+			std::vector <BezierPathTween*> pathTweens;
 		
 		
 	};
 	};
 
 
@@ -128,7 +127,7 @@ namespace Polycode {
 			
 			
 			String name;
 			String name;
 			Number duration;
 			Number duration;
-			vector<BoneTrack*> boneTracks;
+			std::vector<BoneTrack*> boneTracks;
 	};
 	};
 
 
 	/**
 	/**
@@ -217,8 +216,8 @@ namespace Polycode {
 			SceneEntity *bonesEntity;
 			SceneEntity *bonesEntity;
 		
 		
 			SkeletonAnimation *currentAnimation;
 			SkeletonAnimation *currentAnimation;
-			vector<Bone*> bones;
-			vector<SkeletonAnimation*> animations;
+			std::vector<Bone*> bones;
+			std::vector<SkeletonAnimation*> animations;
 	};
 	};
 
 
 }
 }

+ 3 - 9
Core/Contents/Include/PolySound.h

@@ -21,19 +21,11 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include <vorbis/vorbisfile.h>
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyVector3.h"
 #include "PolyVector3.h"
-#include <string>
-#include <vector>
+
 #include "al.h"
 #include "al.h"
 #include "alc.h"
 #include "alc.h"
-#include "OSBasics.h"
-
-using std::string;
-using std::vector;
 
 
 #define ALNoErrorStr "No AL error occurred"
 #define ALNoErrorStr "No AL error occurred"
 #define ALInvalidNameStr "AL error: a bad name (ID) was passed to an OpenAL function"
 #define ALInvalidNameStr "AL error: a bad name (ID) was passed to an OpenAL function"
@@ -47,6 +39,8 @@ using std::vector;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class String;
+
 	/**
 	/**
 	* Loads and plays a sound. This class can load and play an OGG or WAV sound file.
 	* Loads and plays a sound. This class can load and play an OGG or WAV sound file.
 	*/
 	*/

+ 2 - 4
Core/Contents/Include/PolySoundManager.h

@@ -21,13 +21,11 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
-#include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include <stdio.h>
+#include "PolyVector3.h"
+
 #include "al.h"
 #include "al.h"
 #include "alc.h"
 #include "alc.h"
-#include "PolyVector3.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	

+ 9 - 12
Core/Contents/Include/PolyString.h

@@ -27,9 +27,6 @@
 #include <string>
 #include <string>
 #include <vector>
 #include <vector>
 #include <algorithm>
 #include <algorithm>
-using std::vector;
-
-using namespace std;
 
 
 typedef std::string Str;
 typedef std::string Str;
 typedef std::wstring WStr;
 typedef std::wstring WStr;
@@ -68,12 +65,12 @@ namespace Polycode {
 			/**
 			/**
 			* Initializes the string from an STL string.
 			* Initializes the string from an STL string.
 			*/												
 			*/												
-			String(const string& str);
+			String(const std::string& str);
 			
 			
 			/**
 			/**
 			* Initializes the string from an STL wstring.
 			* Initializes the string from an STL wstring.
 			*/															
 			*/															
-			String(const wstring& str);
+			String(const std::wstring& str);
 		
 		
 			~String();
 			~String();
 		
 		
@@ -90,7 +87,7 @@ namespace Polycode {
 			/**
 			/**
 			* Return the string and an STL string.
 			* Return the string and an STL string.
 			*/		
 			*/		
-			const string& getSTLString() const;
+			const std::string& getSTLString() const;
 					
 					
 			/**
 			/**
 			* Returns the substring of the string.
 			* Returns the substring of the string.
@@ -98,7 +95,7 @@ namespace Polycode {
 			* @param n Length of the substring.
 			* @param n Length of the substring.
 			* @return A string object containing a substring of the current object.
 			* @return A string object containing a substring of the current object.
 			*/					
 			*/					
-			String substr(size_t pos = 0, size_t n = wstring::npos) const { return String(contents.substr(pos,n)); }
+			String substr(size_t pos = 0, size_t n = std::wstring::npos) const { return String(contents.substr(pos,n)); }
 
 
 			/**
 			/**
 			* Find last occurrence of content in string. 
 			* Find last occurrence of content in string. 
@@ -106,7 +103,7 @@ namespace Polycode {
 			* @param pos Position of the last character in the string to be taken into consideration for possible matches. The default value indicates that the entire string is searched.
 			* @param pos Position of the last character in the string to be taken into consideration for possible matches. The default value indicates that the entire string is searched.
 			* @return The position of the last occurrence in the string of the searched content
 			* @return The position of the last occurrence in the string of the searched content
 			*/							
 			*/							
-			size_t rfind ( const String &str, size_t pos = wstring::npos ) const { return contents.rfind(str.contents, pos); }
+			size_t rfind ( const String &str, size_t pos = std::wstring::npos ) const { return contents.rfind(str.contents, pos); }
 			
 			
 			/**
 			/**
 			* Find content in string. 
 			* Find content in string. 
@@ -122,7 +119,7 @@ namespace Polycode {
 			* @param pos Position of the last character in the string to be taken into consideration for possible matches. The default value indicates that the entire string is searched.
 			* @param pos Position of the last character in the string to be taken into consideration for possible matches. The default value indicates that the entire string is searched.
 			* @return The position of the last occurrence in the string of any of the characters searched for.
 			* @return The position of the last occurrence in the string of any of the characters searched for.
 			*/													
 			*/													
-			size_t find_last_of(const String& str, size_t pos = wstring::npos ) { return contents.find_last_of(str.contents, pos); }
+			size_t find_last_of(const String& str, size_t pos = std::wstring::npos ) { return contents.find_last_of(str.contents, pos); }
 		
 		
 			inline String operator + (const char *str) const { return String(contents + String(str).contents); }		
 			inline String operator + (const char *str) const { return String(contents + String(str).contents); }		
 			inline String operator + (const String &str) const { return String(contents + str.contents); }		
 			inline String operator + (const String &str) const { return String(contents + str.contents); }		
@@ -149,7 +146,7 @@ namespace Polycode {
 			* @param delim The delimeter to split by.
 			* @param delim The delimeter to split by.
 			* @return An STL vector of the split parts of the string. 
 			* @return An STL vector of the split parts of the string. 
 			*/																				
 			*/																				
-			vector<String> split(const String &delim) const;
+			std::vector<String> split(const String &delim) const;
 
 
 			/**
 			/**
 			* Replaces parts of the string with another string.
 			* Replaces parts of the string with another string.
@@ -206,7 +203,7 @@ namespace Polycode {
 			/**
 			/**
 			* STL string version of the string.
 			* STL string version of the string.
 			*/																																					
 			*/																																					
-			string contents;
+			std::string contents;
 						
 						
 			/**
 			/**
 			* UTF-8 encoding.
 			* UTF-8 encoding.
@@ -220,5 +217,5 @@ namespace Polycode {
 
 
 	static inline String operator+ (const char *str, const String &rstr) { return String(String(str).contents + rstr.contents); }
 	static inline String operator+ (const char *str, const String &rstr) { return String(String(str).contents + rstr.contents); }
 	static inline String operator+ (const wchar_t *str, const String &rstr) { return String(String(str).contents + rstr.contents); }	
 	static inline String operator+ (const wchar_t *str, const String &rstr) { return String(String(str).contents + rstr.contents); }	
-	static inline String operator+ (const wchar_t str, const String &rstr) { wstring tmp=L" "; tmp[0] = str; return tmp.c_str() + rstr; }
+	static inline String operator+ (const wchar_t str, const String &rstr) { std::wstring tmp=L" "; tmp[0] = str; return tmp.c_str() + rstr; }
 }
 }

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

@@ -21,7 +21,6 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 
 
 namespace Polycode{
 namespace Polycode{
@@ -52,4 +51,4 @@ namespace Polycode{
 		bool threadRunning;
 		bool threadRunning;
 	};
 	};
 	
 	
-}
+}

+ 1 - 5
Core/Contents/Include/PolyTimer.h

@@ -22,12 +22,8 @@ THE SOFTWARE.
 
 
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyEventDispatcher.h"
 #include "PolyEventDispatcher.h"
-#include "PolyCoreServices.h"
-
-using namespace std;
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
@@ -80,4 +76,4 @@ namespace Polycode {
 			unsigned int last;
 			unsigned int last;
 			unsigned int ticks;
 			unsigned int ticks;
 	};
 	};
-}
+}

+ 2 - 7
Core/Contents/Include/PolyTimerManager.h

@@ -21,14 +21,9 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyTimer.h"
-#include "PolyCoreServices.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
 	class Timer;
 	class Timer;
@@ -44,6 +39,6 @@ namespace Polycode {
 		
 		
 		private:
 		private:
 		
 		
-		vector <Timer*> timers;
+		std::vector <Timer*> timers;
 	};
 	};
-}
+}

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

@@ -21,16 +21,16 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
+#include "PolyVector3.h"
 #include "PolyEventDispatcher.h"
 #include "PolyEventDispatcher.h"
-#include "PolyCoreServices.h"
-#include "PolyBezierCurve.h"
-#include "PolyQuaternionCurve.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
+	class BezierCurve;
 	class Timer;
 	class Timer;
+	class Quaternion;
+	class QuaternionCurve;
 	
 	
 	/**
 	/**
 	* Tween animation class. This class lets you tween a floating point value over a period of time with different easing types.
 	* Tween animation class. This class lets you tween a floating point value over a period of time with different easing types.

+ 2 - 6
Core/Contents/Include/PolyTweenManager.h

@@ -21,13 +21,9 @@ THE SOFTWARE.
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
-#include "PolyTween.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
 	class Tween;
 	class Tween;
@@ -40,6 +36,6 @@ namespace Polycode {
 			void Update();
 			void Update();
 		
 		
 		private:
 		private:
-			vector <Tween*> tweens;
+			std::vector <Tween*> tweens;
 	};
 	};
-}
+}

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

@@ -21,7 +21,6 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyVector3.h"
 #include "PolyVector3.h"
 
 

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

@@ -21,7 +21,6 @@
  */
  */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include <math.h>
 #include <math.h>
 
 

+ 2 - 5
Core/Contents/Include/PolyVertex.h

@@ -21,15 +21,12 @@
 */
 */
 
 
 #pragma once
 #pragma once
-#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyGlobals.h"
 #include "PolyVector3.h"
 #include "PolyVector3.h"
 #include "PolyVector2.h"
 #include "PolyVector2.h"
 #include "PolyColor.h"
 #include "PolyColor.h"
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 namespace Polycode {
 namespace Polycode {
 
 
 	class Bone;
 	class Bone;
@@ -183,8 +180,8 @@ namespace Polycode {
 				
 				
 		protected:
 		protected:
 		
 		
-			vector <BoneAssignment*> boneAssignments;
+			std::vector <BoneAssignment*> boneAssignments;
 			Vector2 texCoord;
 			Vector2 texCoord;
 		
 		
 	};
 	};
-}
+}

+ 14 - 0
Core/Contents/Source/OSBasics.cpp

@@ -21,6 +21,20 @@
 */
 */
 
 
 #include "OSBasics.h"
 #include "OSBasics.h"
+#ifdef _WINDOWS
+	#include <windows.h>
+#else
+	#include <dirent.h>
+	#include <sys/types.h>
+	#include <sys/stat.h>
+#endif
+
+#include <vector>
+#include <string>
+#include "physfs.h"
+
+using namespace std;
+using namespace Polycode;
 
 
 
 
 #ifdef _WINDOWS
 #ifdef _WINDOWS

+ 5 - 0
Core/Contents/Source/PolyBone.cpp

@@ -21,6 +21,11 @@
 */
 */
 
 
 #include "PolyBone.h"
 #include "PolyBone.h"
+#include "PolyCoreServices.h"
+#include "PolyLabel.h"
+#include "PolyMesh.h"
+#include "PolyRenderer.h"
+#include "PolySceneLabel.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

+ 8 - 0
Core/Contents/Source/PolyCamera.cpp

@@ -21,6 +21,14 @@
 */
 */
 
 
 #include "PolyCamera.h"
 #include "PolyCamera.h"
+#include "PolyCore.h"
+#include "PolyCoreServices.h"
+#include "PolyMaterial.h"
+#include "PolyRenderer.h"
+#include "PolyResource.h"
+#include "PolyResourceManager.h"
+#include "PolyScene.h"
+#include "PolyShader.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 			
 			

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

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyColor.h"
 #include "PolyColor.h"
+#include <stdlib.h>
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

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

@@ -20,6 +20,7 @@
  THE SOFTWARE.
  THE SOFTWARE.
 */
 */
 #include "PolyConfig.h"
 #include "PolyConfig.h"
+#include "tinyxml.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

+ 5 - 2
Core/Contents/Source/PolyCore.cpp

@@ -21,6 +21,9 @@
 */
 */
 
 
 #include "PolyCore.h"
 #include "PolyCore.h"
+#include "PolyCoreInput.h"
+#include "PolyCoreServices.h"
+
 #ifdef _WINDOWS
 #ifdef _WINDOWS
 #include <windows.h>
 #include <windows.h>
 
 
@@ -84,7 +87,7 @@ namespace Polycode {
 	}
 	}
 	
 	
 	void Core::setVideoModeIndex(int index, bool fullScreen, int aaLevel) {
 	void Core::setVideoModeIndex(int index, bool fullScreen, int aaLevel) {
-		vector<Rectangle> resList = getVideoModes();
+		std::vector<Rectangle> resList = getVideoModes();
 		if(index >= resList.size())
 		if(index >= resList.size())
 			return;
 			return;
 		
 		
@@ -130,4 +133,4 @@ namespace Polycode {
 		return services;
 		return services;
 	}
 	}
 	
 	
-}
+}

+ 2 - 1
Core/Contents/Source/PolyCoreInput.cpp

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyCoreInput.h"
 #include "PolyCoreInput.h"
+#include "PolyInputEvent.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
@@ -98,4 +99,4 @@ namespace Polycode {
 			dispatchEvent(evt, InputEvent::EVENT_KEYUP);
 			dispatchEvent(evt, InputEvent::EVENT_KEYUP);
 		}
 		}
 	}
 	}
-}
+}

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

@@ -21,6 +21,21 @@
 */
 */
 
 
 #include "PolyCoreServices.h"
 #include "PolyCoreServices.h"
+#include "PolyCore.h"
+#include "PolyCoreInput.h"
+#include "PolyInputEvent.h"
+#include "PolyLogger.h"
+#include "PolyModule.h"
+#include "PolyResourceManager.h"
+#include "PolyMaterialManager.h"
+#include "PolyRenderer.h"
+#include "PolyConfig.h"
+#include "PolyFontManager.h"
+#include "PolyScreenManager.h"
+#include "PolySceneManager.h"
+#include "PolyTimerManager.h"
+#include "PolyTweenManager.h"
+#include "PolySoundManager.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 
@@ -197,4 +212,4 @@ TweenManager *CoreServices::getTweenManager() {
 
 
 ResourceManager *CoreServices::getResourceManager() {
 ResourceManager *CoreServices::getResourceManager() {
 	return resourceManager;
 	return resourceManager;
-}
+}

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

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyData.h"
 #include "PolyData.h"
+#include "OSBasics.h"
 #include <string.h>
 #include <string.h>
 
 
 using namespace Polycode;
 using namespace Polycode;

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

@@ -20,6 +20,7 @@
  THE SOFTWARE.
  THE SOFTWARE.
 */
 */
 #include "PolyEntity.h"
 #include "PolyEntity.h"
+#include "PolyRenderer.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

+ 2 - 1
Core/Contents/Source/PolyEventDispatcher.cpp

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyEventDispatcher.h"
 #include "PolyEventDispatcher.h"
+#include "PolyEvent.h"
 
 
 namespace Polycode {
 namespace Polycode {
 	
 	
@@ -83,4 +84,4 @@ namespace Polycode {
 		__dispatchEvent(event,eventCode);
 		__dispatchEvent(event,eventCode);
 		delete event;
 		delete event;
 	}
 	}
-}
+}

+ 2 - 0
Core/Contents/Source/PolyFont.cpp

@@ -21,6 +21,8 @@
 */
 */
 
 
 #include "PolyFont.h"
 #include "PolyFont.h"
+#include "OSBasics.h"
+#include "PolyLogger.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

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

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyFontManager.h"
 #include "PolyFontManager.h"
+#include "PolyFont.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

+ 2 - 1
Core/Contents/Source/PolyGLCubemap.cpp

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyGLCubemap.h"
 #include "PolyGLCubemap.h"
+#include "PolyTexture.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 
@@ -48,4 +49,4 @@ OpenGLCubemap::~OpenGLCubemap() {
 
 
 GLuint OpenGLCubemap::getTextureID() {
 GLuint OpenGLCubemap::getTextureID() {
 	return textureID;
 	return textureID;
-}
+}

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

@@ -21,6 +21,22 @@
 */
 */
 
 
 #include "PolyGLRenderer.h"
 #include "PolyGLRenderer.h"
+#include "PolyString.h"
+#include "PolyLogger.h"
+#include "PolyTexture.h"
+#include "PolyGLTexture.h"
+#include "PolyCubemap.h"
+#include "PolyGLCubemap.h"
+#include "PolyGLVertexBuffer.h"
+#include "PolyFixedShader.h"
+#include "PolyMaterial.h"
+#include "PolyMesh.h"
+#include "PolyModule.h"
+#include "PolyPolygon.h"
+
+#ifdef _WINDOWS
+    #include <windows.h>
+#endif
 
 
 #ifdef _WINDOWS
 #ifdef _WINDOWS
 
 
@@ -1059,4 +1075,4 @@ void OpenGLRenderer::EndRender() {
 
 
 OpenGLRenderer::~OpenGLRenderer() {
 OpenGLRenderer::~OpenGLRenderer() {
 
 
-}
+}

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

@@ -22,6 +22,20 @@ THE SOFTWARE.
 
 
 
 
 #include "PolyGLSLProgram.h"
 #include "PolyGLSLProgram.h"
+#include "PolyVector3.h"
+#include "PolyLogger.h"
+
+#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;
 
 
 #ifdef _WINDOWS
 #ifdef _WINDOWS
 extern PFNGLUSEPROGRAMPROC glUseProgram;
 extern PFNGLUSEPROGRAMPROC glUseProgram;

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

@@ -23,6 +23,29 @@ THE SOFTWARE.
 
 
 #include "PolyGLSLShader.h"
 #include "PolyGLSLShader.h"
 
 
+#include "PolyLogger.h"
+#include "PolyShader.h"
+#include "PolyGLSLProgram.h"
+#include "PolyTexture.h"
+#include "PolyCubemap.h"
+
+
+#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;
+
 #ifdef _WINDOWS
 #ifdef _WINDOWS
 extern PFNGLUSEPROGRAMPROC glUseProgram;
 extern PFNGLUSEPROGRAMPROC glUseProgram;
 extern PFNGLUNIFORM1IPROC glUniform1i;
 extern PFNGLUNIFORM1IPROC glUniform1i;

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

@@ -22,6 +22,28 @@ THE SOFTWARE.
 
 
 
 
 #include "PolyGLSLShaderModule.h"
 #include "PolyGLSLShaderModule.h"
+#include "PolyCoreServices.h"
+#include "PolyResourceManager.h"
+#include "PolyRenderer.h"
+#include "PolyGLSLProgram.h"
+#include "PolyGLSLShader.h"
+#include "PolyGLCubemap.h"
+#include "PolyMaterial.h"
+#include "PolyGLTexture.h"
+
+#include "tinyxml.h"
+
+#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 namespace Polycode;
 using namespace Polycode;
 
 

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

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyGLTexture.h"
 #include "PolyGLTexture.h"
+#include "PolyRenderer.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 
@@ -95,4 +96,4 @@ GLuint OpenGLTexture::getFrameBufferID() {
 
 
 GLuint OpenGLTexture::getTextureID() {
 GLuint OpenGLTexture::getTextureID() {
 	return textureID;
 	return textureID;
-}
+}

+ 4 - 1
Core/Contents/Source/PolyGLVertexBuffer.cpp

@@ -21,6 +21,9 @@
 */
 */
 
 
 #include "PolyGLVertexBuffer.h"
 #include "PolyGLVertexBuffer.h"
+#include "PolyPolygon.h"
+
+#include "malloc.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 
@@ -164,4 +167,4 @@ GLuint OpenGLVertexBuffer::getTextCoordBufferID() {
 
 
 GLuint OpenGLVertexBuffer::getVertexBufferID() {
 GLuint OpenGLVertexBuffer::getVertexBufferID() {
 	return vertexBufferID;
 	return vertexBufferID;
-}
+}

+ 5 - 1
Core/Contents/Source/PolyImage.cpp

@@ -21,8 +21,12 @@
 */
 */
 
 
 #include "png.h"
 #include "png.h"
+#include <math.h>
 #include "PolyImage.h"
 #include "PolyImage.h"
-
+#include "PolyString.h"
+#include "PolyLogger.h"
+#include "OSBasics.h"
+#include "PolyPerlin.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

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

@@ -21,6 +21,7 @@
 */
 */
 
 
 #include "PolyLabel.h"
 #include "PolyLabel.h"
+#include "PolyFont.h"
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません