Selaa lähdekoodia

Added a String class, replaced std::string and wstring with the new class

Ivan Safrin 15 vuotta sitten
vanhempi
sitoutus
6508f8c9a0
100 muutettua tiedostoa jossa 386 lisäystä ja 231 poistoa
  1. 7 0
      .gitignore
  2. 8 0
      Core/Build/Mac OS X/PolyCore.xcodeproj/project.pbxproj
  3. 13 11
      Core/Contents/Include/OSBasics.h
  4. 1 0
      Core/Contents/Include/PolyAGLCore.h
  5. 1 0
      Core/Contents/Include/PolyBezierCurve.h
  6. 4 3
      Core/Contents/Include/PolyBone.h
  7. 2 1
      Core/Contents/Include/PolyCamera.h
  8. 9 7
      Core/Contents/Include/PolyCocoaCore.h
  9. 1 0
      Core/Contents/Include/PolyColor.h
  10. 11 11
      Core/Contents/Include/PolyConfig.h
  11. 10 9
      Core/Contents/Include/PolyCore.h
  12. 1 0
      Core/Contents/Include/PolyCoreInput.h
  13. 1 0
      Core/Contents/Include/PolyCoreServices.h
  14. 1 0
      Core/Contents/Include/PolyCubemap.h
  15. 5 4
      Core/Contents/Include/PolyEntity.h
  16. 3 2
      Core/Contents/Include/PolyEvent.h
  17. 1 0
      Core/Contents/Include/PolyEventDispatcher.h
  18. 1 0
      Core/Contents/Include/PolyEventHandler.h
  19. 4 3
      Core/Contents/Include/PolyFixedShader.h
  20. 2 1
      Core/Contents/Include/PolyFont.h
  21. 4 4
      Core/Contents/Include/PolyFontManager.h
  22. 1 0
      Core/Contents/Include/PolyGLCubemap.h
  23. 1 0
      Core/Contents/Include/PolyGLES1Renderer.h
  24. 1 1
      Core/Contents/Include/PolyGLES1Texture.h
  25. 1 0
      Core/Contents/Include/PolyGLRenderer.h
  26. 1 0
      Core/Contents/Include/PolyGLTexture.h
  27. 1 1
      Core/Contents/Include/PolyGLVertexBuffer.h
  28. 8 7
      Core/Contents/Include/PolyGenericScene.h
  29. 5 5
      Core/Contents/Include/PolyImage.h
  30. 1 1
      Core/Contents/Include/PolyInputEvent.h
  31. 7 7
      Core/Contents/Include/PolyLabel.h
  32. 0 1
      Core/Contents/Include/PolyLogger.h
  33. 5 5
      Core/Contents/Include/PolyMaterial.h
  34. 4 3
      Core/Contents/Include/PolyMaterialManager.h
  35. 1 0
      Core/Contents/Include/PolyMatrix4.h
  36. 3 3
      Core/Contents/Include/PolyMesh.h
  37. 4 3
      Core/Contents/Include/PolyModule.h
  38. 1 0
      Core/Contents/Include/PolyParticle.h
  39. 2 1
      Core/Contents/Include/PolyParticleEmitter.h
  40. 1 0
      Core/Contents/Include/PolyPerlin.h
  41. 1 1
      Core/Contents/Include/PolyPolygon.h
  42. 1 0
      Core/Contents/Include/PolyQuaternion.h
  43. 1 0
      Core/Contents/Include/PolyQuaternionCurve.h
  44. 1 0
      Core/Contents/Include/PolyRectangle.h
  45. 1 0
      Core/Contents/Include/PolyRenderer.h
  46. 7 6
      Core/Contents/Include/PolyResource.h
  47. 10 9
      Core/Contents/Include/PolyResourceManager.h
  48. 1 0
      Core/Contents/Include/PolyScene.h
  49. 1 0
      Core/Contents/Include/PolySceneEntity.h
  50. 3 2
      Core/Contents/Include/PolySceneLabel.h
  51. 1 0
      Core/Contents/Include/PolySceneLight.h
  52. 1 0
      Core/Contents/Include/PolySceneLine.h
  53. 1 0
      Core/Contents/Include/PolySceneManager.h
  54. 5 4
      Core/Contents/Include/PolySceneMesh.h
  55. 1 0
      Core/Contents/Include/PolyScenePrimitive.h
  56. 1 0
      Core/Contents/Include/PolySceneRenderTexture.h
  57. 2 2
      Core/Contents/Include/PolyScreen.h
  58. 1 0
      Core/Contents/Include/PolyScreenCurve.h
  59. 1 0
      Core/Contents/Include/PolyScreenEntity.h
  60. 1 0
      Core/Contents/Include/PolyScreenEvent.h
  61. 2 1
      Core/Contents/Include/PolyScreenImage.h
  62. 4 4
      Core/Contents/Include/PolyScreenLabel.h
  63. 1 0
      Core/Contents/Include/PolyScreenLine.h
  64. 1 1
      Core/Contents/Include/PolyScreenManager.h
  65. 3 2
      Core/Contents/Include/PolyScreenMesh.h
  66. 1 0
      Core/Contents/Include/PolyScreenShape.h
  67. 6 5
      Core/Contents/Include/PolyScreenSprite.h
  68. 13 12
      Core/Contents/Include/PolyShader.h
  69. 9 8
      Core/Contents/Include/PolySkeleton.h
  70. 7 7
      Core/Contents/Include/PolySound.h
  71. 1 0
      Core/Contents/Include/PolySoundManager.h
  72. 69 0
      Core/Contents/Include/PolyString.h
  73. 1 0
      Core/Contents/Include/PolySubstanceView.h
  74. 4 3
      Core/Contents/Include/PolyTexture.h
  75. 1 1
      Core/Contents/Include/PolyThreaded.h
  76. 1 0
      Core/Contents/Include/PolyTimer.h
  77. 1 0
      Core/Contents/Include/PolyTimerManager.h
  78. 1 0
      Core/Contents/Include/PolyTween.h
  79. 1 0
      Core/Contents/Include/PolyTweenManager.h
  80. 1 5
      Core/Contents/Include/PolyUtil.h
  81. 1 1
      Core/Contents/Include/PolyVector2.h
  82. 1 0
      Core/Contents/Include/PolyVector3.h
  83. 1 0
      Core/Contents/Include/PolyVertex.h
  84. 1 0
      Core/Contents/Include/Poly_iPhone.h
  85. 1 0
      Core/Contents/Include/Polycode.h
  86. 1 0
      Core/Contents/Include/PolyiPhoneCore.h
  87. 10 10
      Core/Contents/Source/OSBasics.cpp
  88. 2 2
      Core/Contents/Source/PolyBone.cpp
  89. 1 1
      Core/Contents/Source/PolyCamera.cpp
  90. 7 7
      Core/Contents/Source/PolyCocoaCore.cpp
  91. 20 11
      Core/Contents/Source/PolyConfig.cpp
  92. 1 1
      Core/Contents/Source/PolyEntity.cpp
  93. 1 1
      Core/Contents/Source/PolyEvent.cpp
  94. 3 3
      Core/Contents/Source/PolyFixedShader.cpp
  95. 1 1
      Core/Contents/Source/PolyFont.cpp
  96. 2 2
      Core/Contents/Source/PolyFontManager.cpp
  97. 9 9
      Core/Contents/Source/PolyGenericScene.cpp
  98. 4 4
      Core/Contents/Source/PolyImage.cpp
  99. 8 8
      Core/Contents/Source/PolyLabel.cpp
  100. 3 3
      Core/Contents/Source/PolyMaterial.cpp

+ 7 - 0
.gitignore

@@ -13,3 +13,10 @@ Core/Build/Mac\ OS\ X/build
 IDE/Build/Mac\ OS\ X/build
 Modules/Build/Mac\ OS\ X/build
 Core/Dependencies
+
+# OS generated files #
+######################
+.DS_Store?
+ehthumbs.db
+Icon?
+Thumbs.db

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

@@ -7,6 +7,8 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		6D8656A912AF5FCD008A486E /* PolyString.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D8656A812AF5FCD008A486E /* PolyString.h */; };
+		6D8656AB12AF5FD5008A486E /* PolyString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D8656AA12AF5FD5008A486E /* PolyString.cpp */; };
 		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 */; };
@@ -201,6 +203,8 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+		6D8656A812AF5FCD008A486E /* PolyString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyString.h; sourceTree = "<group>"; };
+		6D8656AA12AF5FD5008A486E /* PolyString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolyString.cpp; 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>"; };
@@ -450,6 +454,7 @@
 		6DFBF30B12A3184E00C43A7D /* Include */ = {
 			isa = PBXGroup;
 			children = (
+				6D8656A812AF5FCD008A486E /* PolyString.h */,
 				6DFBF30D12A3184E00C43A7D /* OSBasics.h */,
 				6DFBF30E12A3184E00C43A7D /* Poly_iPhone.h */,
 				6DFBF30F12A3184E00C43A7D /* PolyAGLCore.h */,
@@ -547,6 +552,7 @@
 		6DFBF36612A3184E00C43A7D /* Source */ = {
 			isa = PBXGroup;
 			children = (
+				6D8656AA12AF5FD5008A486E /* PolyString.cpp */,
 				6DFBF36712A3184E00C43A7D /* OSBasics.cpp */,
 				6DFBF36812A3184E00C43A7D /* PolyAGLCore.cpp */,
 				6DFBF36912A3184E00C43A7D /* PolyBezierCurve.cpp */,
@@ -771,6 +777,7 @@
 				6DFBF77712A383AF00C43A7D /* physfs_platforms.h in Headers */,
 				6DFBF77A12A383AF00C43A7D /* physfs.h in Headers */,
 				6DFB016F12A73BC200C43A7D /* PolyModule.h in Headers */,
+				6D8656A912AF5FCD008A486E /* PolyString.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -920,6 +927,7 @@
 				6DFBF7B712A3846A00C43A7D /* posix.c in Sources */,
 				6DFBF7B812A3846A00C43A7D /* unix.c in Sources */,
 				6DFB017112A73BCF00C43A7D /* PolyModule.cpp in Sources */,
+				6D8656AB12AF5FD5008A486E /* PolyString.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 13 - 11
Core/Contents/Include/OSBasics.h

@@ -13,6 +13,7 @@
 
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
+#include "PolyString.h"
 
 #ifdef _WINDOWS
 	#include <windows.h>
@@ -27,17 +28,18 @@
 #include "physfs.h"
 
 using namespace std;
+using namespace Polycode;
 
 class _PolyExport OSFileEntry {
 	public:
 		OSFileEntry() {};
-		OSFileEntry(string path, string name, int type);
+		OSFileEntry(String path, String name, int type);
 		
-		string name;
-		string extension;
-		string nameWithoutExtension;
-		string basePath;
-		string fullPath;
+		String name;
+		String extension;
+		String nameWithoutExtension;
+		String basePath;
+		String fullPath;
 		int type;
 		
 		static const int TYPE_FILE = 0;
@@ -60,17 +62,17 @@ public:
 class _PolyExport OSBasics {
 	public:
 	
-		static OSFILE *open(string filename, string opts);
+		static OSFILE *open(String filename, String opts);
 		static int close(OSFILE *file);
 		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 int seek(OSFILE * stream, long int offset, int origin );
 		static long tell(OSFILE * stream);
 	
-		static vector<OSFileEntry> parsePhysFSFolder(string pathString, bool showHidden);
-		static vector<OSFileEntry> parseFolder(string pathString, bool showHidden);
-		static bool isFolder(string pathString);
-		static void createFolder(string pathString);
+		static vector<OSFileEntry> parsePhysFSFolder(String pathString, bool showHidden);
+		static vector<OSFileEntry> parseFolder(String pathString, bool showHidden);
+		static bool isFolder(String pathString);
+		static void createFolder(String pathString);
 		
 	private:
 	

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

@@ -12,6 +12,7 @@
 #include "PolyGlobals.h"
 #include "PolyCore.h"
 #include "PolyRectangle.h"
+#include "PolyString.h"
 #include <vector>
 #include <OpenGL/gl.h>
 #include <OpenGL/OpenGL.h>

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

@@ -13,6 +13,7 @@
 
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
+#include "PolyString.h"
 #include "PolyVector3.h"
 #include <vector>
 

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

@@ -11,6 +11,7 @@
 #pragma once
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
+#include "PolyString.h"
 #include "PolySceneEntity.h"
 #include "PolyMesh.h"
 #include "PolyFont.h"
@@ -21,10 +22,10 @@ namespace Polycode {
 
 	class _PolyExport Bone : public SceneEntity {
 		public:
-			Bone(string boneName);
+			Bone(String boneName);
 			~Bone();
 			void enableBoneLabel(Font *font, float size, float scale);
-			string getName();
+			String getName();
 			void Render();
 
 			void setParentBone(Bone *bone);
@@ -49,7 +50,7 @@ namespace Polycode {
 			Matrix4 restMatrix;
 			Bone* parentBone;
 			vector<Bone*> childBones;
-			string boneName;
+			String boneName;
 			Mesh *boneMesh;
 	};
 

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

@@ -11,6 +11,7 @@
 
 #pragma once
 #include "PolyLogger.h"
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolySceneEntity.h"
@@ -46,7 +47,7 @@ namespace Polycode {
 			float getExposureLevel();
 			
 			void createPostFilter(Material *shaderMaterial);
-			void setPostFilter(string shaderName);
+			void setPostFilter(String shaderName);
 			
 		private:
 		

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

@@ -10,8 +10,10 @@
 // @package Core
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCore.h"
+#include "PolyString.h"
 #include "PolyRectangle.h"
 #include <vector>
 #include <OpenGL/gl.h>
@@ -61,17 +63,17 @@ namespace Polycode {
 		void resizeTo(int xRes, int yRes);
 		void createThread(Threaded *target);		
 		
-		void createFolder(string folderPath);
-		void copyDiskItem(string itemPath, string destItemPath);
-		void moveDiskItem(string itemPath, string destItemPath);		
-		void removeDiskItem(string itemPath);		
-		string openFolderPicker();
+		void createFolder(String folderPath);
+		void copyDiskItem(String itemPath, String destItemPath);
+		void moveDiskItem(String itemPath, String destItemPath);		
+		void removeDiskItem(String itemPath);		
+		String openFolderPicker();
 		vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple);
 		
 		void setCursor(int cursorType);
 		
-		void copyStringToClipboard(wstring str);
-		wstring getClipboardString();		
+		void copyStringToClipboard(String str);
+		String getClipboardString();		
 		
 //		static pascal OSStatus coreEventHandler (EventHandlerCallRef next, EventRef event, void *data);	
 		

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

@@ -9,6 +9,7 @@
 // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include <stdlib.h>

+ 11 - 11
Core/Contents/Include/PolyConfig.h

@@ -10,7 +10,7 @@
 // @package Services
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include <string>
 #include <vector>
@@ -24,10 +24,10 @@ namespace Polycode {
 
 	class ConfigEntry {
 	public:
-		string key;
-		string configNamespace;
+		String key;
+		String configNamespace;
 		float numVal;
-		string stringVal;
+		String stringVal;
 		bool isString;
 	};
 	
@@ -36,16 +36,16 @@ namespace Polycode {
 		Config();
 		~Config();		
 
-		void loadConfig(string configNamespace, string fileName);	
-		void saveConfig(string configNamespace, string fileName);
+		void loadConfig(String configNamespace, String fileName);	
+		void saveConfig(String configNamespace, String fileName);
 		
-		ConfigEntry *getEntry(string configNamespace, string key);
+		ConfigEntry *getEntry(String configNamespace, String key);
 		
-		void setStringValue(string configNamespace, string key, string value);
-		void setNumericValue(string configNamespace, string key, float value);		
+		void setStringValue(String configNamespace, String key, String value);
+		void setNumericValue(String configNamespace, String key, float value);		
 			
-		float getNumericValue(string configNamespace, string key);
-		string getStringValue(string configNamespace, string key);
+		float getNumericValue(String configNamespace, String key);
+		String getStringValue(String configNamespace, String key);
 		
 	private:
 		

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

@@ -10,6 +10,7 @@
 // @package Core
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyRenderer.h"
@@ -45,8 +46,8 @@ namespace Polycode {
 	
 	class _PolyExport CoreFileExtension {
 	public:
-		string extension;
-		string description;
+		String extension;
+		String description;
 	};
 	
 	class _PolyExport Core : public EventDispatcher {
@@ -67,8 +68,8 @@ namespace Polycode {
 		virtual void unlockMutex(CoreMutex *mutex) = 0;
 		virtual CoreMutex *createMutex() = 0;
 		
-		virtual void copyStringToClipboard(wstring str) = 0;
-		virtual wstring getClipboardString() = 0;
+		virtual void copyStringToClipboard(String str) = 0;
+		virtual String getClipboardString() = 0;
 		
 		CoreServices *getServices();
 		float getFPS();
@@ -85,12 +86,12 @@ namespace Polycode {
 		virtual vector<Rectangle> getVideoModes() = 0;
 		
 		
-		virtual void createFolder(string folderPath) = 0;
-		virtual void copyDiskItem(string itemPath, string destItemPath) = 0;		
-		virtual void moveDiskItem(string itemPath, string destItemPath) = 0;		
-		virtual void removeDiskItem(string itemPath) = 0;
+		virtual void createFolder(String folderPath) = 0;
+		virtual void copyDiskItem(String itemPath, String destItemPath) = 0;		
+		virtual void moveDiskItem(String itemPath, String destItemPath) = 0;		
+		virtual void removeDiskItem(String itemPath) = 0;
 
-		virtual string openFolderPicker() = 0;
+		virtual String openFolderPicker() = 0;
 		virtual vector<string> openFilePicker(vector<CoreFileExtension> extensions, bool allowMultiple) = 0;
 		
 		void setVideoModeIndex(int index, bool fullScreen, int aaLevel);

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

@@ -9,6 +9,7 @@
 // @package Core
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyVector2.h"

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

@@ -10,6 +10,7 @@
 // @package Services
  
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyRenderer.h"

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

@@ -10,6 +10,7 @@
 // @package Materials
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyResource.h"
 #include "PolyTexture.h"

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

@@ -10,6 +10,7 @@
 // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyMatrix4.h"
@@ -25,8 +26,8 @@ namespace Polycode {
 	
 	class _PolyExport EntityProp {
 	public:
-		string propName;
-		string propValue;		
+		String propName;
+		String propValue;		
 	};	
 
 	class _PolyExport Entity {
@@ -126,10 +127,10 @@ namespace Polycode {
 		
 			Vector3 getCompoundScale();
 		
-			string custEntityType;
+			String custEntityType;
 			vector <EntityProp> entityProps;				
 		
-			string getEntityProp(string propName);
+			String getEntityProp(String propName);
 		
 			Vector3 bBox;
 			bool billboardMode;			

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

@@ -9,6 +9,7 @@
 // @package Events
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include <string>
@@ -28,14 +29,14 @@ namespace Polycode {
 			void setEventCode(int eventCode);
 			EventDispatcher *getDispatcher();
 			void setDispatcher(EventDispatcher *dispatcher);
-			string getEventType();
+			String getEventType();
 			
 			static const int COMPLETE_EVENT = 0;
 			static const int CHANGE_EVENT = 1;
 						
 		protected:
 			
-			string eventType;
+			String eventType;
 			EventDispatcher *dispatcher;
 			int eventCode;
 			

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

@@ -9,6 +9,7 @@
 // @package Events
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyEventHandler.h"

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

@@ -10,6 +10,7 @@
 // @package Events
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyEvent.h"

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

@@ -9,6 +9,7 @@
 // @package Materials
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyShader.h"
@@ -32,9 +33,9 @@ namespace Polycode {
 			FixedShaderBinding(FixedShader *shader);
 			~FixedShaderBinding();
 			
-			void addTexture(string name, Texture *texture); 
-			void addCubemap(string name, Cubemap *cubemap);		
-			void addParam(string type, string name, string value);
+			void addTexture(String name, Texture *texture); 
+			void addCubemap(String name, Cubemap *cubemap);		
+			void addParam(String type, String name, String value);
 			
 			Texture *getDiffuseTexture();
 			

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

@@ -9,6 +9,7 @@
 // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include <string>
@@ -22,7 +23,7 @@ namespace Polycode {
 	
 	class _PolyExport Font {
 		public:
-			Font(string fileName);
+			Font(String fileName);
 			~Font();
 			
 			FT_Face getFace();

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

@@ -10,7 +10,7 @@
 // @package Services
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyFont.h"
 #include <vector>
@@ -23,7 +23,7 @@ namespace Polycode {
 
 	class FontEntry {
 	public:
-		string fontName;
+		String fontName;
 		Font *font;
 	};
 	
@@ -32,8 +32,8 @@ namespace Polycode {
 		FontManager();
 		~FontManager();
 
-		void registerFont(string fontName, string fontPath);		
-		Font *getFontByName(string fontName);		
+		void registerFont(String fontName, String fontPath);		
+		Font *getFontByName(String fontName);		
 		
 	private:
 		

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

@@ -14,6 +14,7 @@
 #include <windows.h>
 #endif
 
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyTexture.h"
 #include "PolyGLRenderer.h"

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

@@ -10,6 +10,7 @@
 // @package Renderer
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyRenderer.h"

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

@@ -10,7 +10,7 @@
 // @package Renderer
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyTexture.h"
 #include "PolyGLES1Renderer.h"

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

@@ -9,6 +9,7 @@
 // @package Renderer
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyRenderer.h"

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

@@ -15,6 +15,7 @@
 	#include <windows.h>
 #endif
 
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyTexture.h"
 #include "PolyGLRenderer.h"

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

@@ -12,7 +12,7 @@
 #ifdef _WINDOWS
 #include <windows.h>
 #endif
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyMesh.h"
 #include "PolyGLRenderer.h"

+ 8 - 7
Core/Contents/Include/PolyGenericScene.h

@@ -9,6 +9,7 @@
 // @package Scene
  
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include <vector>
@@ -30,18 +31,18 @@ namespace Polycode {
 			
 			void Render();
 			void RenderDepthOnly(Camera *targetCamera);
-			void addGrid(string gridTexture);
+			void addGrid(String gridTexture);
 	
-			static string readString(OSFILE *inFile);
-			void loadScene(string fileName);
+			static String readString(OSFILE *inFile);
+			void loadScene(String fileName);
 			void generateLightmaps(float lightMapRes, float lightMapQuality, int numRadPasses);
 
 			void addLight(SceneLight *light);
 			SceneLight *getNearestLight(Vector3 pos);
 			
 			void writeEntityMatrix(SceneEntity *entity, OSFILE *outFile);
-			void writeString(string str, OSFILE *outFile);
-			void saveScene(string fileName);
+			void writeString(String str, OSFILE *outFile);
+			void saveScene(String fileName);
 	
 			int getNumStaticGeometry();
 			SceneMesh *getStaticGeometry(int index);
@@ -51,8 +52,8 @@ namespace Polycode {
 			int getNumLights();
 			SceneLight *getLight(int index);
 			
-			SceneEntity *getCustomEntityByType(string type);
-			vector<SceneEntity*> getCustomEntitiesByType(string type);		
+			SceneEntity *getCustomEntityByType(String type);
+			vector<SceneEntity*> getCustomEntitiesByType(String type);		
 			
 			static const unsigned int ENTITY_MESH = 0;
 			static const unsigned int ENTITY_LIGHT = 1;			

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

@@ -9,7 +9,7 @@
 // @package BasicTypes
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "png.h"
 #include "PolyColor.h"
@@ -23,15 +23,15 @@ using std::string;
 namespace Polycode {
 	class _PolyExport Image {
 		public:
-			Image(string fileName);
+			Image(String fileName);
 			Image(int width, int height, int type = IMAGE_RGBA);
 			Image(char *data, int width, int height, int type = IMAGE_RGBA);
 			Image(Image *copyImage);		
 			Image();			
 			~Image();
 
-			bool loadImage(string fileName);
-			bool loadPNG(string fileName);
+			bool loadImage(String fileName);
+			bool loadPNG(String fileName);
 		
 			
 			void createEmpty(unsigned int width, unsigned int height);
@@ -66,7 +66,7 @@ namespace Polycode {
 		
 			int getType() { return imageType; }
 			
-			void writeBMP(string fileName);
+			void writeBMP(String fileName);
 			
 			unsigned int getWidth();
 			unsigned int getHeight();

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

@@ -10,7 +10,7 @@
 // @package Core
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyEvent.h"
 #include "PolyVector2.h"

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

@@ -9,7 +9,7 @@
 // @package BasicTypes
  
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyFont.h"
 #include "PolyImage.h"
@@ -27,12 +27,12 @@ namespace Polycode {
 	class _PolyExport Label : public Image {
 		public:
 			
-			Label(Font *font, wstring text, int size, int antiAliasMode);
+			Label(Font *font, String text, int size, int antiAliasMode);
 			~Label();
-			void setText(wstring text);
-			wstring getText();
-			int getTextWidth(Font *font, wstring text, int size);
-			int getTextHeight(Font *font, wstring text, int size);
+			void setText(String text);
+			String getText();
+			int getTextWidth(Font *font, String text, int size);
+			int getTextHeight(Font *font, String text, int size);
 					
 			float getTextWidth();		
 			float getTextHeight();
@@ -48,7 +48,7 @@ namespace Polycode {
 			float currentTextHeight;
 			int antiAliasMode;
 			int size;
-			wstring text;
+			String text;
 			Font *font;
 	};
 

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

@@ -1,7 +1,6 @@
 // @package Services
 
 #pragma once
-
 #include "PolyGlobals.h"
 #include <stdio.h>
 #include <stdarg.h>

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

@@ -9,7 +9,7 @@
 // @package Materials
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include <string>
 #include <vector>
@@ -25,7 +25,7 @@ namespace Polycode {
 	
 	class _PolyExport Material : public Resource {
 		public:
-			Material(string name);
+			Material(String name);
 			virtual ~Material();
 			
 			void addShader(Shader *shader,ShaderBinding *shaderBinding);
@@ -35,10 +35,10 @@ namespace Polycode {
 			int getNumShaderRenderTargets();
 			ShaderRenderTarget *getShaderRenderTarget(unsigned int index);
 				
-			string getName();
+			String getName();
 			Shader *getShader(unsigned int index);
 			ShaderBinding *getShaderBinding(unsigned int index);
-			void loadMaterial(string fileName);
+			void loadMaterial(String fileName);
 			
 		protected:
 		
@@ -46,7 +46,7 @@ namespace Polycode {
 			vector<ShaderBinding*> shaderBindings;
 			vector<ShaderRenderTarget*> renderTargets;
 					
-			string name;
+			String name;
 		
 	};
 }

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

@@ -10,6 +10,7 @@
 // @package Services
  
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolyTexture.h"
@@ -40,7 +41,7 @@ namespace Polycode {
 			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 *createTextureFromImage(Image *image, bool clamp=true);
-			Texture *createTextureFromFile(string fileName);
+			Texture *createTextureFromFile(String fileName);
 			void deleteTexture(Texture *texture);
 		
 			void reloadTextures();
@@ -51,14 +52,14 @@ namespace Polycode {
 			void addShaderModule(PolycodeShaderModule *module);		
 		
 			//SceneRenderTexture *createRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight);
-			Texture *getTextureByResourcePath(string resourcePath);
+			Texture *getTextureByResourcePath(String resourcePath);
 			
 			// cubemaps
 		
 			Cubemap *cubemapFromXMLNode(TiXmlNode *node);
 		
 			// materials
-			void loadMaterialsFromFile(string fileName);
+			void loadMaterialsFromFile(String fileName);
 			Material *materialFromXMLNode(TiXmlNode *node);
 			Shader *setShaderFromXMLNode(TiXmlNode *node);
 			Shader *createShaderFromXMLNode(TiXmlNode *node);

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

@@ -9,6 +9,7 @@
 // @package Math
  
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyVector3.h"
 #include <string.h>

+ 3 - 3
Core/Contents/Include/PolyMesh.h

@@ -10,7 +10,7 @@
 // @package BasicTypes
  
 #pragma once
-
+#include "PolyString.h"
 #include <math.h>
 #include "PolyGlobals.h"
 #include "PolyPolygon.h"
@@ -70,13 +70,13 @@ namespace Polycode {
 
 	class _PolyExport Mesh {
 		public:
-			Mesh(string fileName);
+			Mesh(String fileName);
 			Mesh(int meshType);
 			~Mesh();
 			
 			void addPolygon(Polygon *newPolygon);
 			
-			void loadMesh(string fileName);
+			void loadMesh(String fileName);
 
 			void loadFromFile(OSFILE *inFile);
 			void saveToFile(OSFILE *outFile);

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

@@ -8,6 +8,7 @@
  */
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "tinyxml.h"
 #include "PolyShader.h"
@@ -35,9 +36,9 @@ namespace Polycode {
 		PolycodeShaderModule();
 		virtual ~PolycodeShaderModule();
 		
-		virtual bool acceptsExtension(string extension) = 0;
-		virtual Resource* createProgramFromFile(string extension, string fullPath) = 0;
-		virtual string getShaderType() = 0;
+		virtual bool acceptsExtension(String extension) = 0;
+		virtual Resource* createProgramFromFile(String extension, String fullPath) = 0;
+		virtual String getShaderType() = 0;
 		virtual Shader *createShader(TiXmlNode *node) = 0;
 	
 		virtual bool applyShaderMaterial(Renderer *renderer, Material *material, ShaderBinding *localOptions, unsigned int shaderIndex) = 0;

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

@@ -9,6 +9,7 @@
 // @package Scene
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolySceneEntity.h"
 #include "PolyScenePrimitive.h"

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

@@ -10,6 +10,7 @@
 // @package Scene
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyEntity.h"
 #include "PolyScenePrimitive.h"
@@ -22,7 +23,7 @@ using std::vector;
 namespace Polycode {
 	class _PolyExport ParticleEmitter : public SceneEntity {
 		public:
-			ParticleEmitter(string imageFile, Mesh *particleMesh, SceneMesh *emitter, Scene *particleParentScene, int particleType, int emitterType, float lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation);
+			ParticleEmitter(String imageFile, Mesh *particleMesh, SceneMesh *emitter, Scene *particleParentScene, int particleType, int emitterType, float lifespan, unsigned int numParticles, Vector3 direction, Vector3 gravity, Vector3 deviation);
 			~ParticleEmitter();
 			void setRotationSpeed(float speed);
 			void setStartingColor(Color c);

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

@@ -10,6 +10,7 @@
 // @package Math
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 
 #define SAMPLE_SIZE 1024

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

@@ -10,7 +10,7 @@
 // @package BasicTypes
 
 #pragma once
-
+#include "PolyString.h"
 #include <math.h>
 #include "PolyGlobals.h"
 #include "PolyVertex.h"

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

@@ -8,6 +8,7 @@
  */
  
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyBasics.h"
 #include "PolyMatrix4.h"

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

@@ -9,6 +9,7 @@
 // @package Math
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyBezierCurve.h"
 #include "PolyQuaternion.h"

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

@@ -9,6 +9,7 @@
 // @package Math
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 
 namespace Polycode {

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

@@ -10,6 +10,7 @@
 // @package Renderer
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyColor.h"
 #include "PolyPolygon.h"

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

@@ -10,6 +10,7 @@
 // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include <vector>
 #include <string>
@@ -23,11 +24,11 @@ namespace Polycode {
 			Resource(int type);
 			virtual ~Resource();
 			
-			string getResourceName();
+			String getResourceName();
 			int getResourceType();
-			void setResourceName(string newName);
-			void setResourcePath(string path);
-			string getResourcePath();		
+			void setResourceName(String newName);
+			void setResourcePath(String path);
+			String getResourcePath();		
 
 			static const int RESOURCE_TEXTURE = 0;
 			static const int RESOURCE_MATERIAL = 1;
@@ -39,8 +40,8 @@ namespace Polycode {
 		protected:
 			
 			int type;
-			string resourcePath;
-			string name;
+			String resourcePath;
+			String name;
 	
 					
 	};

+ 10 - 9
Core/Contents/Include/PolyResourceManager.h

@@ -9,6 +9,7 @@
 // @package Services
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include <vector>
 #include <string>
@@ -33,18 +34,18 @@ namespace Polycode {
 			
 			void addResource(Resource *resource);
 			
-			void addDirResource(string dirPath, bool recursive);
-			void addArchive(string zipPath);
+			void addDirResource(String dirPath, bool recursive);
+			void addArchive(String zipPath);
 		
-			bool readFile(string fileName){ return false;}
+			bool readFile(String fileName){ return false;}
 		
-			void parseTextures(string dirPath, bool recursive);
-			void parseMaterials(string dirPath, bool recursive);
-			void parseShaders(string dirPath, bool recursive);
-			void parsePrograms(string dirPath, bool recursive);
-			void parseCubemaps(string dirPath, bool recursive);
+			void parseTextures(String dirPath, bool recursive);
+			void parseMaterials(String dirPath, bool recursive);
+			void parseShaders(String dirPath, bool recursive);
+			void parsePrograms(String dirPath, bool recursive);
+			void parseCubemaps(String dirPath, bool recursive);
 		
-			Resource *getResource(int resourceType, string resourceName);
+			Resource *getResource(int resourceType, String resourceName);
 		
 			void addShaderModule(PolycodeShaderModule *module);
 		

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

@@ -9,6 +9,7 @@
 // @package Scene
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyRenderer.h"
 #include "PolySceneEntity.h"

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

@@ -9,6 +9,7 @@
 // @package Scene
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include "PolyRenderer.h"

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

@@ -10,6 +10,7 @@
 // @package Scene
  
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolyFont.h"
@@ -27,12 +28,12 @@ namespace Polycode {
 	class _PolyExport SceneLabel : public SceneEntity {
 		public:
 			
-			SceneLabel(string fontName, wstring text, int size, float scale, int amode);
+			SceneLabel(String fontName, String text, int size, float scale, int amode);
 			~SceneLabel();			
 		
 			bool testMouseCollision(float x, float y);
 		
-			void setText(wstring newText);
+			void setText(String newText);
 			Label *getLabel();
 			void Render();
 			

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

@@ -10,6 +10,7 @@
 // @package Scene
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolySceneEntity.h"
 #include "PolyCoreServices.h"

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

@@ -10,6 +10,7 @@
 // @package Scene
  
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolySceneEntity.h"
 #include "PolyCoreServices.h"

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

@@ -10,6 +10,7 @@
 // @package Services
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyScene.h"
 #include "PolySceneRenderTexture.h"

+ 5 - 4
Core/Contents/Include/PolySceneMesh.h

@@ -10,6 +10,7 @@
 // @package Scene
  
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolySceneEntity.h"
@@ -27,7 +28,7 @@ namespace Polycode {
 
 	class _PolyExport SceneMesh : public SceneEntity {
 		public:
-			SceneMesh(string fileName);
+			SceneMesh(String fileName);
 			SceneMesh(int meshType);
 			SceneMesh(Mesh *mesh);
 			virtual ~SceneMesh();
@@ -39,11 +40,11 @@ namespace Polycode {
 			Mesh *getMesh();
 			Texture *getTexture();
 			Material *getMaterial();
-			void loadTexture(string fileName);
-			void loadSkeleton(string fileName);
+			void loadTexture(String fileName);
+			void loadSkeleton(String fileName);
 			void setTexture(Texture *texture);
 			void setMaterial(Material *material);
-			void setMaterial(string materialName);
+			void setMaterial(String materialName);
 		
 			void setSkeleton(Skeleton *skeleton);
 			Skeleton *getSkeleton();

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

@@ -10,6 +10,7 @@
 // @package Scene
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolySceneMesh.h"
 #include "PolyCoreServices.h"

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

@@ -10,6 +10,7 @@
 // @package Scene
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyScene.h"
 #include "PolyTexture.h"

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

@@ -10,7 +10,7 @@
 // @package Screen
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyScreenEntity.h"
 #include "PolyRenderer.h"
@@ -40,7 +40,7 @@ namespace Polycode {
 		void Render();
 		void setRenderer(Renderer *renderer);
 		
-		void setScreenShader(string shaderName);
+		void setScreenShader(String shaderName);
 		
 		void handleEvent(Event *event);
 		int getHighestZIndex();

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

@@ -10,6 +10,7 @@
 // @package Screen
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolyScreenEntity.h"

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

@@ -10,6 +10,7 @@
 // @package Screen
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyVector2.h"
 #include "PolyInputEvent.h"

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

@@ -10,6 +10,7 @@
 // @package Screen
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyEvent.h"
 

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

@@ -10,6 +10,7 @@
 // @package Screen
 
 #pragma once
+#include "PolyString.h"
 #include <math.h>
 #include "PolyGlobals.h"
 #include "PolyScreenShape.h"
@@ -26,7 +27,7 @@ namespace Polycode {
 
 	class _PolyExport ScreenImage : public ScreenShape {
 		public:
-		ScreenImage(string fileName);
+		ScreenImage(String fileName);
 		ScreenImage(Image *image);		
 		~ScreenImage();
 		

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

@@ -10,7 +10,7 @@
 // @package Screen
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolyScreenShape.h"
@@ -30,12 +30,12 @@ namespace Polycode {
 	class _PolyExport ScreenLabel : public ScreenShape {
 		public:
 			
-			ScreenLabel(string fontName, wstring text, int size, int amode);
+			ScreenLabel(String fontName, String text, int size, int amode);
 			~ScreenLabel();		
 		
 			void addDropShadow(Color color, float size, float offsetX, float offsetY);
-			void setText(wstring newText);
-			wstring getText();
+			void setText(String newText);
+			String getText();
 		
 			Label *getLabel();
 			

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

@@ -10,6 +10,7 @@
 // @package Screen
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyScreenEntity.h"
 #include "PolyCoreServices.h"

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

@@ -10,7 +10,7 @@
 // @package Services
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyScreen.h"
 //#include "PolyPhysicsScreen.h"

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

@@ -10,6 +10,7 @@
 // @package Screen
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolyScreenEntity.h"
@@ -24,7 +25,7 @@ namespace Polycode {
 
 	class _PolyExport ScreenMesh : public ScreenEntity {
 		public:
-			ScreenMesh(string fileName);
+			ScreenMesh(String fileName);
 			ScreenMesh(int meshType);
 			~ScreenMesh();
 			
@@ -32,7 +33,7 @@ namespace Polycode {
 			
 			Mesh *getMesh();
 			Texture *getTexture();
-			void loadTexture(string fileName);
+			void loadTexture(String fileName);
 			void loadTexture(Image *image);	
 			void setTexture(Texture *texture);
 			

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

@@ -10,6 +10,7 @@
 // @package Screen
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolyScreenEntity.h"

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

@@ -6,7 +6,8 @@
  *  Copyright 2009 __MyCompanyName__. All rights reserved.
  *
  */
-
+#pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCoreServices.h"
 #include "PolyScreenShape.h"
@@ -18,7 +19,7 @@ namespace Polycode {
 class SpriteAnimation {
 	public:
 		float speed;
-		string name;
+		String name;
 		int numFrames;
 	
 		vector<Vector2> framesOffsets;
@@ -27,11 +28,11 @@ class SpriteAnimation {
 class ScreenSprite : public ScreenShape 
 {
 	public:
-		ScreenSprite(string fileName, float spriteWidth, float spriteHeight);
+		ScreenSprite(String fileName, float spriteWidth, float spriteHeight);
 		~ScreenSprite();
 		
-		void addAnimation(string name, string frames, float speed);
-		void playAnimation(string name, int startFrame, bool once);
+		void addAnimation(String name, String frames, float speed);
+		void playAnimation(String name, int startFrame, bool once);
 		void Update();
 		
 	private:

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

@@ -9,6 +9,7 @@
 // @package Materials
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyResource.h"
 #include "PolyTexture.h"
@@ -23,8 +24,8 @@ namespace Polycode {
 			virtual ~Shader();
 
 			int getType();
-			void setName(string name);
-			string getName();
+			void setName(String name);
+			String getName();
 			
 			virtual ShaderBinding *createBinding() = 0;
 
@@ -33,13 +34,13 @@ namespace Polycode {
 							
 		protected:
 		
-			string name;
+			String name;
 			int type;
 	};
 	
 	class _PolyExport ShaderRenderTarget {
 		public:
-			string id;
+			String id;
 			float width;
 			float height;
 			int sizeMode;
@@ -51,13 +52,13 @@ namespace Polycode {
 	};
 	
 	typedef struct {
-		string name;
+		String name;
 		void *data;		
 	} LocalShaderParam;	
 	
 	typedef struct {
-			string id;
-			string name;
+			String id;
+			String name;
 			int mode;
 			Texture *texture;
 			float width;
@@ -71,14 +72,14 @@ namespace Polycode {
 			ShaderBinding(Shader *shader);
 			virtual ~ShaderBinding();
 			
-			virtual void clearTexture(string name){};
-			virtual void addTexture(string name, Texture *texture)  {};
-			virtual void addParam(string type, string name, string value) {};
-			virtual void addCubemap(string name, Cubemap *cubemap) {};
+			virtual void clearTexture(String name){};
+			virtual void addTexture(String name, Texture *texture)  {};
+			virtual void addParam(String type, String name, String value) {};
+			virtual void addCubemap(String name, Cubemap *cubemap) {};
 		
 			unsigned int getNumLocalParams();
 			LocalShaderParam *getLocalParam(unsigned int index);
-			LocalShaderParam *getLocalParamByName(string name);
+			LocalShaderParam *getLocalParamByName(String name);
 			
 			void addRenderTargetBinding(RenderTargetBinding *binding);
 

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

@@ -9,6 +9,7 @@
 // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyBone.h"
 #include <string>
@@ -63,10 +64,10 @@ namespace Polycode {
 
 	class _PolyExport SkeletonAnimation {
 		public:
-			SkeletonAnimation(string name, float duration);
+			SkeletonAnimation(String name, float duration);
 			~SkeletonAnimation();			
 			void addBoneTrack(BoneTrack *boneTrack);
-			string getName();
+			String getName();
 			void Play();
 			void Stop();
 			void Update();
@@ -75,22 +76,22 @@ namespace Polycode {
 			
 		private:
 			
-			string name;
+			String name;
 			float duration;
 			vector<BoneTrack*> boneTracks;
 	};
 
 	class _PolyExport Skeleton : public SceneEntity {
 		public:
-			Skeleton(string fileName);
-			void loadSkeleton(string fileName);
+			Skeleton(String fileName);
+			void loadSkeleton(String fileName);
 			~Skeleton();
 		
-			void playAnimation(string animName);
-			SkeletonAnimation *getAnimation(string name);
+			void playAnimation(String animName);
+			SkeletonAnimation *getAnimation(String name);
 			void Update();
 			
-			Bone *getBoneByName(string name);
+			Bone *getBoneByName(String name);
 			void bonesVisible(bool val);
 			void enableBoneLabels(Font *font, float size, float scale);
 					

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

@@ -10,7 +10,7 @@
 
 #pragma once
 #include <vorbis/vorbisfile.h>
-
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include <string>
@@ -36,21 +36,21 @@ namespace Polycode {
 	
 	class _PolyExport Sound {
 	public:
-		Sound(string fileName);
+		Sound(String fileName);
 		~Sound();
 		
 		void Play(bool once);
 		void Stop();
 		
-		ALuint loadWAV(string fileName);
-		ALuint loadOGG(string fileName);
+		ALuint loadWAV(String fileName);
+		ALuint loadOGG(String fileName);
 		
 		ALuint GenSource(ALuint buffer);
 		ALuint GenSource();
 	
-		void checkALError(string operation);
-		void soundError(string err);
-		void soundCheck(bool result, string err);
+		void checkALError(String operation);
+		void soundError(String err);
+		void soundCheck(bool result, String err);
 		static unsigned long readByte32(const unsigned char buffer[4]);		
 		static unsigned short readByte16(const unsigned char buffer[2]);
 

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

@@ -9,6 +9,7 @@
 // @package Sound
 
 #pragma once
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyGlobals.h"
 #include <stdio.h>

+ 69 - 0
Core/Contents/Include/PolyString.h

@@ -0,0 +1,69 @@
+
+#pragma once
+
+#include "PolyGlobals.h"
+#include <string>
+#include <vector>
+
+using std::vector;
+
+using namespace std;
+
+namespace Polycode {
+
+	class _PolyExport String {
+		public:
+			String();
+			String(const wchar_t *str);
+			String(const char *str);
+			String(string str);
+			String(wstring str);
+		
+			virtual ~String();
+		
+			size_t size() { return contents.size(); }
+			size_t length() { return contents.size(); }
+		
+			string getSTLString();
+			wstring getSTLWString();
+		
+			String substr(size_t pos = 0, size_t n = wstring::npos) const { return String(contents.substr(pos,n)); }
+		
+			size_t rfind ( const String &str, size_t pos = wstring::npos ) const { return contents.rfind(str.contents, pos); }
+			size_t find ( const String &str, size_t pos = 0 ) const { return contents.find(str.contents, pos); }
+
+			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); }
+		
+			String operator += (const String &str) { contents = contents + str.contents; return *this; }		
+			String operator = (const String &str) {  contents = str.contents; return *this;}
+		
+		
+			inline bool operator == (const String &str) const {  return (str.contents == contents); }		
+			inline bool operator != (const String &str) const {  return (str.contents != contents); }		
+		
+			String toLowerCase();
+		
+			inline wchar_t operator [] ( const size_t i ) const { return contents[i]; }
+		
+			vector<String> split(const String &delims);
+			String replace(const String &what, const String &withWhat);
+			
+			static String floatToString(float value);
+		
+			const char *c_str();
+			const wchar_t *wc_str();
+		
+			const wchar_t *data(){ return contents.data(); }
+
+			wstring contents;	
+			string s_contents;
+		private:
+
+	};
+
+	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) { wstring tmp=L" "; tmp[0] = str; return String(tmp + rstr.contents); }		
+}

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

@@ -11,6 +11,7 @@
 #include <OpenGL/gl.h>
 #include <OpenGL/OpenGL.h>
 
+#include "PolyString.h"
 #include "Polycode.h"
 #include "PolyCocoaCore.h"
 

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

@@ -10,6 +10,7 @@
 // @package Materials
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyResource.h"
 #include "PolyImage.h"
@@ -35,8 +36,8 @@ namespace Polycode {
 			void setImageData(Image *data);
 		
 			void updateScroll(int elapsed);
-			void setResourcePath(string newPath);
-			string getResourcePath();
+			void setResourcePath(String newPath);
+			String getResourcePath();
 		
 			char *getTextureData() { return textureData;}
 			
@@ -52,7 +53,7 @@ namespace Polycode {
 		
 			int width;
 			int height;
-			string resourcePath;
+			String resourcePath;
 			char *textureData;
 			float scrollOffsetX;
 			float scrollOffsetY;

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

@@ -8,7 +8,7 @@
  */
 // @package Core
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 
 namespace Polycode{

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

@@ -9,6 +9,7 @@
 // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyEventDispatcher.h"
 #include "PolyCoreServices.h"

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

@@ -9,6 +9,7 @@
 // @package Services
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyTimer.h"
 #include "PolyCoreServices.h"

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

@@ -10,6 +10,7 @@
 // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyEventDispatcher.h"
 #include "PolyCoreServices.h"

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

@@ -9,6 +9,7 @@
 // @package Services
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyTween.h"
 #include <vector>

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

@@ -9,7 +9,7 @@
 // @package Services
 
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include <string>
 #include <vector>
@@ -23,9 +23,5 @@ namespace Polycode {
 
 	class _PolyExport StringUtil {
 		public:
-			static string toLowerCase(const std::string &str);
-			static vector<std::string> split(const std::string &str, const std::string &delims);
-			static string replace(const std::string &str, const std::string &what, const std::string &withWhat);
-			static string floatToString(float value);
 	};
 }

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

@@ -10,7 +10,7 @@
 // @package Math
  
 #pragma once
-
+#include "PolyString.h"
 #include "PolyGlobals.h"
 
 namespace Polycode {

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

@@ -10,6 +10,7 @@
 // @package Math
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include <math.h>
 

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

@@ -9,6 +9,7 @@
  // @package BasicTypes
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyVector3.h"
 #include "PolyVector2.h"

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

@@ -9,6 +9,7 @@
 
 #pragma once
 
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyConfig.h"
 #include "PolyEntity.h"

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

@@ -9,6 +9,7 @@
  
 #pragma once
 
+#include "PolyString.h"
 #include "PolyLogger.h"
 #include "PolyConfig.h"
 #include "PolyEntity.h"

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

@@ -10,6 +10,7 @@
 // @package Core
 
 #pragma once
+#include "PolyString.h"
 #include "PolyGlobals.h"
 #include "PolyCore.h"
 #include "PolyRectangle.h"

+ 10 - 10
Core/Contents/Source/OSBasics.cpp

@@ -31,9 +31,9 @@ void ctow(WCHAR* Dest, const char* Source)
 
 #endif
 
-OSFileEntry::OSFileEntry(string path, string name, int type) {
+OSFileEntry::OSFileEntry(String path, String name, int type) {
 	this->basePath = path;
-	this->fullPath = path + "/" + string(name);
+	this->fullPath = path + "/" + name;
 	this->name = name;
 	this->type = type;
 
@@ -60,7 +60,7 @@ void OSFILE::debugDump() {
 	OSBasics::seek(this, tellval, SEEK_SET);
 }
 
-OSFILE *OSBasics::open(string filename, string opts) {
+OSFILE *OSBasics::open(String filename, String opts) {
 	OSFILE *retFile = NULL;
 	if(PHYSFS_exists(filename.c_str())) {
 		if(!PHYSFS_isDirectory(filename.c_str())) {
@@ -174,14 +174,14 @@ int OSBasics::seek(OSFILE * stream, long int offset, int origin ) {
 	return 0;	
 }
 
-vector<OSFileEntry> OSBasics::parsePhysFSFolder(string pathString, bool showHidden) {
+vector<OSFileEntry> OSBasics::parsePhysFSFolder(String pathString, bool showHidden) {
 	vector<OSFileEntry> returnVector;
 	
 	char **rc = PHYSFS_enumerateFiles(pathString.c_str());
 	char **i;
 	
-	string fullPath;
-	string fname;
+	String fullPath;
+	String fname;
 	for (i = rc; *i != NULL; i++) {
 		fname = string(*i);
 		fullPath = pathString + "/" + fname;
@@ -198,7 +198,7 @@ vector<OSFileEntry> OSBasics::parsePhysFSFolder(string pathString, bool showHidd
 	return returnVector;
 }
 
-vector<OSFileEntry> OSBasics::parseFolder(string pathString, bool showHidden) {
+vector<OSFileEntry> OSBasics::parseFolder(String pathString, bool showHidden) {
 	vector<OSFileEntry> returnVector;
 	
 	if(pathString.size() < 128) {
@@ -232,7 +232,7 @@ vector<OSFileEntry> OSBasics::parseFolder(string pathString, bool showHidden) {
 	do {		
 		memset(fileName, 0, 260);
 		wtoc(fileName, findFileData.cFileName);
-		string fname = string(fileName);
+		String fname = string(fileName);
 		
 		if((fname.c_str()[0] != '.' || (fname.c_str()[0] == '.'  && showHidden)) && fname != "..") {
 			if( findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) {
@@ -267,14 +267,14 @@ vector<OSFileEntry> OSBasics::parseFolder(string pathString, bool showHidden) {
 	return returnVector;
 }
 
-void OSBasics::createFolder(string pathString) {
+void OSBasics::createFolder(String pathString) {
 #ifdef _WINDOWS
 #else
 	mkdir(pathString.c_str(),  S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
 #endif
 }
 
-bool OSBasics::isFolder(string pathString) {	
+bool OSBasics::isFolder(String pathString) {	
 	bool retVal = false;
 #ifdef _WINDOWS
 #else

+ 2 - 2
Core/Contents/Source/PolyBone.cpp

@@ -11,7 +11,7 @@
 
 using namespace Polycode;
 
-Bone::Bone(string boneName) : SceneEntity() {
+Bone::Bone(String boneName) : SceneEntity() {
 	this->boneName = boneName;
 
 	boneMesh = new Mesh(Mesh::QUAD_MESH);
@@ -100,7 +100,7 @@ void Bone::setRestMatrix(Matrix4 matrix) {
 	restMatrix = matrix;
 }
 
-string Bone::getName() {
+String Bone::getName() {
 	return boneName;
 }
 

+ 1 - 1
Core/Contents/Source/PolyCamera.cpp

@@ -218,7 +218,7 @@ void Camera::setParentScene(Scene *parentScene) {
 	this->parentScene = parentScene;
 }
 
-void Camera::setPostFilter(string shaderName) {
+void Camera::setPostFilter(String shaderName) {
 	Material *shaderMaterial = (Material*) CoreServices::getInstance()->getResourceManager()->getResource(Resource::RESOURCE_MATERIAL, shaderName);
 	if(shaderMaterial)
 		createPostFilter(shaderMaterial);

+ 7 - 7
Core/Contents/Source/PolyCocoaCore.cpp

@@ -52,7 +52,7 @@ CocoaCore::CocoaCore(SubstanceView *view, int xRes, int yRes, bool fullScreen,in
 
 }
 
-void CocoaCore::copyStringToClipboard(wstring str) {
+void CocoaCore::copyStringToClipboard(String str) {
 	NSPasteboard *pb = [NSPasteboard generalPasteboard];
     NSArray *types = [NSArray arrayWithObjects:NSStringPboardType, nil];
     [pb declareTypes:types owner:glView];
@@ -66,7 +66,7 @@ void CocoaCore::copyStringToClipboard(wstring str) {
     [pb setString: nsstr forType:NSStringPboardType];	
 }
 
-wstring CocoaCore::getClipboardString() {
+String CocoaCore::getClipboardString() {
 	
 }
 
@@ -218,23 +218,23 @@ void CocoaCore::checkEvents() {
 	unlockMutex(eventMutex);		
 }
 
-void CocoaCore::createFolder(string folderPath) {
+void CocoaCore::createFolder(String folderPath) {
 	[[NSFileManager defaultManager] createDirectoryAtPath:[NSString stringWithUTF8String: folderPath.c_str()] withIntermediateDirectories:YES attributes:nil error:nil];
 }
 
-void CocoaCore::copyDiskItem(string itemPath, string destItemPath) {
+void CocoaCore::copyDiskItem(String itemPath, String destItemPath) {
 	[[NSFileManager defaultManager] copyItemAtPath: [NSString stringWithUTF8String: itemPath.c_str()] toPath: [NSString stringWithUTF8String: destItemPath.c_str()] error: nil];	
 }
 
-void CocoaCore::moveDiskItem(string itemPath, string destItemPath) {
+void CocoaCore::moveDiskItem(String itemPath, String destItemPath) {
 	[[NSFileManager defaultManager] moveItemAtPath: [NSString stringWithUTF8String: itemPath.c_str()] toPath: [NSString stringWithUTF8String: destItemPath.c_str()] error: nil];		
 }
 
-void CocoaCore::removeDiskItem(string itemPath) {
+void CocoaCore::removeDiskItem(String itemPath) {
 	[[NSFileManager defaultManager] removeItemAtPath: [NSString stringWithUTF8String: itemPath.c_str()] error:nil];
 }
 
-string CocoaCore::openFolderPicker() {
+String CocoaCore::openFolderPicker() {
 	NSOpenPanel *attachmentPanel = [NSOpenPanel openPanel];	
 	[attachmentPanel setCanChooseFiles:NO];
 	[attachmentPanel setCanCreateDirectories: YES];

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

@@ -19,9 +19,16 @@ Config::~Config() {
 	
 }
 
-void Config::loadConfig(string configNamespace, string fileName) {
+void Config::loadConfig(String configNamespace, String fileName) {
 	TiXmlDocument doc(fileName.c_str());
-	doc.LoadFile();
+	
+	Logger::log("Loading config: %s\n", fileName.c_str());
+	
+	if(!doc.LoadFile()) {
+		Logger::log("Error loading config file...\n");
+		Logger::log("Error: %s\n", doc.ErrorDesc());
+		return;
+	}
 	
 	TiXmlElement *rootElement = doc.RootElement();
 	
@@ -37,7 +44,7 @@ void Config::loadConfig(string configNamespace, string fileName) {
 	
 }
 
-void Config::saveConfig(string configNamespace, string fileName) {
+void Config::saveConfig(String configNamespace, String fileName) {
 
 	TiXmlDocument doc;  
 	TiXmlElement* node;  
@@ -55,17 +62,19 @@ void Config::saveConfig(string configNamespace, string fileName) {
 			if(entries[i]->isString)
 				node->LinkEndChild( new	TiXmlText(entries[i]->stringVal.c_str()));  
 			else
-				node->LinkEndChild( new	TiXmlText(StringUtil::floatToString(entries[i]->numVal).c_str()));  						
+				node->LinkEndChild( new	TiXmlText(String::floatToString(entries[i]->numVal).c_str()));  						
 			root->LinkEndChild( node);		
 		}
 	}
 	doc.SaveFile(fileName.c_str());  	
 }
 
-ConfigEntry *Config::getEntry(string configNamespace, string key) {
+ConfigEntry *Config::getEntry(String configNamespace, String key) {
+	
 	for(int i=0; i < entries.size(); i++) {
-		if(entries[i]->key == key && entries[i]->configNamespace == configNamespace) {
-			return entries[i];
+		ConfigEntry *entry = entries[i];
+		if(entry->key == key && entry->configNamespace == configNamespace) {
+			return entry;
 		}
 	}
 	ConfigEntry *newEntry = new ConfigEntry();
@@ -77,22 +86,22 @@ ConfigEntry *Config::getEntry(string configNamespace, string key) {
 	return newEntry;
 }
 
-void Config::setStringValue(string configNamespace, string key, string value) {
+void Config::setStringValue(String configNamespace, String key, String value) {
 	getEntry(configNamespace, key)->stringVal = value;
 	getEntry(configNamespace, key)->isString = true;	
 }
 
-void Config::setNumericValue(string configNamespace, string key, float value) {
+void Config::setNumericValue(String configNamespace, String key, float value) {
 	getEntry(configNamespace, key)->numVal = value;	
 	getEntry(configNamespace, key)->isString = false;		
 }
 
 
-float Config::getNumericValue(string configNamespace, string key) {
+float Config::getNumericValue(String configNamespace, String key) {
 	return getEntry(configNamespace, key)->numVal;
 }
 
-string Config::getStringValue(string configNamespace, string key) {
+String Config::getStringValue(String configNamespace, String key) {
 	return getEntry(configNamespace, key)->stringVal;	
 }
 

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

@@ -419,7 +419,7 @@ void Entity::rebuildRotation() {
 	rotationQuat.fromAxes(pitch, yaw, roll);
 }
 
-string Entity::getEntityProp(string propName) {
+String Entity::getEntityProp(String propName) {
 	for(int i=0; i < entityProps.size(); i++) {
 		if(entityProps[i].propName == propName) {
 			return entityProps[i].propValue;

+ 1 - 1
Core/Contents/Source/PolyEvent.cpp

@@ -24,7 +24,7 @@ namespace Polycode {
 		
 	}
 	
-	string Event::getEventType() {
+	String Event::getEventType() {
 		return eventType;
 	}
 	

+ 3 - 3
Core/Contents/Source/PolyFixedShader.cpp

@@ -21,11 +21,11 @@ FixedShaderBinding::~FixedShaderBinding() {
 }
 
 
-void FixedShaderBinding::addCubemap(string name, Cubemap *cubemap) {
+void FixedShaderBinding::addCubemap(String name, Cubemap *cubemap) {
 	cubemaps.push_back(cubemap);
 }
 
-void FixedShaderBinding::addTexture(string name, Texture *texture) {
+void FixedShaderBinding::addTexture(String name, Texture *texture) {
 	textures.push_back(texture);
 }
 
@@ -33,7 +33,7 @@ Texture *FixedShaderBinding::getDiffuseTexture() {
 	return textures[0];
 }
 
-void FixedShaderBinding::addParam(string type, string name, string value) {
+void FixedShaderBinding::addParam(String type, String name, String value) {
 
 }
 

+ 1 - 1
Core/Contents/Source/PolyFont.cpp

@@ -11,7 +11,7 @@
 
 using namespace Polycode;
 
-Font::Font(string fileName) {
+Font::Font(String fileName) {
 	FT_Library FTLibrary;
 	FT_Init_FreeType(&FTLibrary);
 	

+ 2 - 2
Core/Contents/Source/PolyFontManager.cpp

@@ -19,7 +19,7 @@ FontManager::~FontManager() {
 
 }
 
-void FontManager::registerFont(string fontName, string fontPath) {
+void FontManager::registerFont(String fontName, String fontPath) {
 	Font *font = new Font(fontPath);
 	FontEntry newEntry;
 	newEntry.font = font;
@@ -27,7 +27,7 @@ void FontManager::registerFont(string fontName, string fontPath) {
 	fonts.push_back(newEntry);
 }
 
-Font *FontManager::getFontByName(string fontName) {
+Font *FontManager::getFontByName(String fontName) {
 	for(int i=0; i < fonts.size(); i++) {
 		FontEntry entry = fonts[i];
 		if(entry.fontName == fontName)

+ 9 - 9
Core/Contents/Source/PolyGenericScene.cpp

@@ -147,7 +147,7 @@ SceneLight *GenericScene::getNearestLight(Vector3 pos) {
 }
 
 
-string GenericScene::readString(OSFILE *inFile) {
+String GenericScene::readString(OSFILE *inFile) {
 	char buffer[1024];
 	unsigned int namelen;
 	OSBasics::read(&namelen, sizeof(unsigned int), 1, inFile);
@@ -157,7 +157,7 @@ string GenericScene::readString(OSFILE *inFile) {
 	
 }
 
-void GenericScene::loadScene(string fileName) {
+void GenericScene::loadScene(String fileName) {
 	OSFILE *inFile = OSBasics::open(fileName.c_str(), "rb");
 	if(!inFile) {
 		Logger::log("Error opening scene file\n");
@@ -241,7 +241,7 @@ void GenericScene::loadScene(string fileName) {
 				break;
 				case ENTITY_ENTITY: {
 					Logger::log("loading entity\n");
-					string entityType = readString(inFile);					
+					String entityType = readString(inFile);					
 					SceneEntity *newCustomEntity = new SceneEntity();
 					newCustomEntity->custEntityType = entityType;					
 					newEntity = newCustomEntity;
@@ -308,7 +308,7 @@ void GenericScene::loadScene(string fileName) {
 			unsigned int numProps;
 			OSBasics::read(&numProps, sizeof(unsigned int), 1, inFile);
 			for(int i=0; i < numProps; i++) {
-				string propName,propValue;
+				String propName,propValue;
 				propName = readString(inFile);
 				propValue = readString(inFile);
 				EntityProp prop;
@@ -361,7 +361,7 @@ void GenericScene::loadScene(string fileName) {
 	OSBasics::close(inFile);
 }
 
-vector<SceneEntity*> GenericScene::getCustomEntitiesByType(string type) {
+vector<SceneEntity*> GenericScene::getCustomEntitiesByType(String type) {
 	vector<SceneEntity*> retVector;
 	for(int i=0; i < customEntities.size(); i++) {
 		if(customEntities[i]->custEntityType == type) {
@@ -371,7 +371,7 @@ vector<SceneEntity*> GenericScene::getCustomEntitiesByType(string type) {
 	return retVector;	
 }
 
-SceneEntity *GenericScene::getCustomEntityByType(string type) {
+SceneEntity *GenericScene::getCustomEntityByType(String type) {
 	for(int i=0; i < customEntities.size(); i++) {
 		if(customEntities[i]->custEntityType == type) {
 			return customEntities[i];
@@ -396,7 +396,7 @@ void GenericScene::writeEntityMatrix(SceneEntity *entity, OSFILE *outFile) {
 	
 }
 
-void GenericScene::saveScene(string fileName) {
+void GenericScene::saveScene(String fileName) {
 	OSFILE *outFile = OSBasics::open(fileName.c_str(), "wb");
 	if(!outFile) {
 		Logger::log("Error opening scene file for writing\n");
@@ -526,7 +526,7 @@ void GenericScene::saveScene(string fileName) {
 	OSBasics::close(outFile);
 }
 
-void GenericScene::writeString(string str, OSFILE *outFile) {
+void GenericScene::writeString(String str, OSFILE *outFile) {
 	unsigned int stLen = str.length();
 	OSBasics::write(&stLen, sizeof(unsigned int), 1, outFile);
 	OSBasics::write(str.c_str(), 1, stLen, outFile);
@@ -563,7 +563,7 @@ void GenericScene::generateLightmaps(float lightMapRes, float lightMapQuality, i
  */
 }
 
-void GenericScene::addGrid(string gridTexture) {
+void GenericScene::addGrid(String gridTexture) {
 	ScenePrimitive *gridMesh = new ScenePrimitive(ScenePrimitive::TYPE_PLANE, 20,20,0);
 	gridMesh->loadTexture(gridTexture);
 	gridMesh->setPitch(-90.0f);

+ 4 - 4
Core/Contents/Source/PolyImage.cpp

@@ -17,7 +17,7 @@ void user_read_data(png_structp png_ptr, png_bytep data, png_size_t length) {
 	OSBasics::read(data, length, 1, file);
 }
 
-Image::Image(string fileName) : imageData(NULL) {
+Image::Image(String fileName) : imageData(NULL) {
 	setPixelType(IMAGE_RGBA);
 	loaded = false;
 	if(!loadImage(fileName)) {
@@ -122,7 +122,7 @@ void Image::perlinNoise(int seed, bool alpha) {
 	}
 }
 
-void Image::writeBMP(string fileName) {
+void Image::writeBMP(String fileName) {
 //	SDL_Surface *image;
 //	image = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32, 0x0000FF, 0x00FF00, 0xFF0000, 0x000000);
 //	memcpy(image->pixels,imageData,width * height * 4);
@@ -447,11 +447,11 @@ void Image::fill(float r, float g, float b, float a) {
 	}
 }
 
-bool Image::loadImage(string fileName) {
+bool Image::loadImage(String fileName) {
 	return loadPNG(fileName);
 }
 
-bool Image::loadPNG(string fileName) {
+bool Image::loadPNG(String fileName) {
 	OSFILE         *infile;
 	
 	png_structp   png_ptr;

+ 8 - 8
Core/Contents/Source/PolyLabel.cpp

@@ -14,7 +14,7 @@ using namespace Polycode;
 #define NORMAL_FT_FLAGS FT_LOAD_TARGET_LIGHT
 
 
-Label::Label(Font *font, wstring text, int size, int antiAliasMode) {
+Label::Label(Font *font, String text, int size, int antiAliasMode) {
 		setPixelType(Image::IMAGE_RGBA);
 		this->font = font;
 		this->size = size;
@@ -29,7 +29,7 @@ Label::~Label() {
 
 }
 
-int Label::getTextWidth(Font *font, wstring text, int size) {
+int Label::getTextWidth(Font *font, String text, int size) {
 	FT_Vector delta;
 	FT_UInt previous = 0;
 	FT_UInt glyph_index;
@@ -37,7 +37,7 @@ int Label::getTextWidth(Font *font, wstring text, int size) {
 	FT_Set_Pixel_Sizes(font->getFace(), 0,  size);
 	int width = 0;
 	
-	wstring actualString = text; //StringUtil::replace(text, "\t", TAB_REPLACE);
+	String actualString = text; //StringUtil::replace(text, "\t", TAB_REPLACE);
 	
 	for(int i=0; i< actualString.length();i++)
 	{
@@ -73,9 +73,9 @@ int Label::getTextWidth(Font *font, wstring text, int size) {
 	return width+5;
 }
 
-int Label::getTextHeight(Font *font, wstring text, int size) {
+int Label::getTextHeight(Font *font, String text, int size) {
 	
-	wstring actualString = text; //StringUtil::replace(text, "\t", TAB_REPLACE);
+	String actualString = text; //StringUtil::replace(text, "\t", TAB_REPLACE);
 	
 	int height = 0;
 	
@@ -116,11 +116,11 @@ Font *Label::getFont() {
 	return font;
 }
 
-wstring Label::getText() {
+String Label::getText() {
 	return text;
 }
 
-void Label::setText(wstring text) {
+void Label::setText(String text) {
 //	Logger::logw((char*)text.c_str());
 	
 	
@@ -132,7 +132,7 @@ void Label::setText(wstring text) {
 	if(!font->isValid())
 		return;
 	
-	wstring actualString = text; //StringUtil::replace(text, "\t", TAB_REPLACE);
+	String actualString = text; //StringUtil::replace(text, "\t", TAB_REPLACE);
 	
 	int textWidth = getTextWidth(font, actualString, size);
 	int textHeight = size+getTextHeight(font, actualString, size);

+ 3 - 3
Core/Contents/Source/PolyMaterial.cpp

@@ -12,7 +12,7 @@
 
 using namespace Polycode;
 
-Material::Material(string name) : Resource(Resource::RESOURCE_MATERIAL) {
+Material::Material(String name) : Resource(Resource::RESOURCE_MATERIAL) {
 	this->name = name;
 }
 
@@ -49,7 +49,7 @@ unsigned int Material::getNumShaders() {
 	return materialShaders.size();
 }
 
-string Material::getName() {
+String Material::getName() {
 	return name;
 }
 
@@ -61,7 +61,7 @@ ShaderBinding *Material::getShaderBinding(unsigned int index) {
 	return shaderBindings[index];
 }
 
-void Material::loadMaterial(string fileName) {
+void Material::loadMaterial(String fileName) {
 
 }
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä