Ver Fonte

Updated xcode projects with recent additions/changes for terrain and gamepad.
Gameplay encoder and lua generator executables still need to be re-build and checked in.

Steve Grenier há 13 anos atrás
pai
commit
faee73afbe

+ 12 - 0
gameplay-encoder/gameplay-encoder.xcodeproj/project.pbxproj

@@ -61,6 +61,8 @@
 		42D277591472EFA700D867A4 /* libpcre.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 42D277571472EFA700D867A4 /* libpcre.a */; };
 		42D277591472EFA700D867A4 /* libpcre.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 42D277571472EFA700D867A4 /* libpcre.a */; };
 		42D2775A1472EFA700D867A4 /* libpcrecpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 42D277581472EFA700D867A4 /* libpcrecpp.a */; };
 		42D2775A1472EFA700D867A4 /* libpcrecpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 42D277581472EFA700D867A4 /* libpcrecpp.a */; };
 		5BCD0643152CFC3C0071FAB5 /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BCD0642152CFC3C0071FAB5 /* libpng.a */; };
 		5BCD0643152CFC3C0071FAB5 /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BCD0642152CFC3C0071FAB5 /* libpng.a */; };
+		B661733F16A61CE40083A307 /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B661733D16A61CE40083A307 /* Image.cpp */; };
+		B661734316A61CFA0083A307 /* NormalMapGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B661734116A61CFA0083A307 /* NormalMapGenerator.cpp */; };
 		F18DCD0615D554B800DB35DB /* Heightmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F18DCD0315D554B800DB35DB /* Heightmap.cpp */; };
 		F18DCD0615D554B800DB35DB /* Heightmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F18DCD0315D554B800DB35DB /* Heightmap.cpp */; };
 /* End PBXBuildFile section */
 /* End PBXBuildFile section */
 
 
@@ -179,6 +181,10 @@
 		42D277571472EFA700D867A4 /* libpcre.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpcre.a; path = "../external-deps/pcre/lib/macosx/libpcre.a"; sourceTree = "<group>"; };
 		42D277571472EFA700D867A4 /* libpcre.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpcre.a; path = "../external-deps/pcre/lib/macosx/libpcre.a"; sourceTree = "<group>"; };
 		42D277581472EFA700D867A4 /* libpcrecpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpcrecpp.a; path = "../external-deps/pcre/lib/macosx/libpcrecpp.a"; sourceTree = "<group>"; };
 		42D277581472EFA700D867A4 /* libpcrecpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpcrecpp.a; path = "../external-deps/pcre/lib/macosx/libpcrecpp.a"; sourceTree = "<group>"; };
 		5BCD0642152CFC3C0071FAB5 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../external-deps/libpng/lib/macosx/libpng.a"; sourceTree = "<group>"; };
 		5BCD0642152CFC3C0071FAB5 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../external-deps/libpng/lib/macosx/libpng.a"; sourceTree = "<group>"; };
+		B661733D16A61CE40083A307 /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Image.cpp; path = src/Image.cpp; sourceTree = SOURCE_ROOT; };
+		B661733E16A61CE40083A307 /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Image.h; path = src/Image.h; sourceTree = SOURCE_ROOT; };
+		B661734116A61CFA0083A307 /* NormalMapGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NormalMapGenerator.cpp; path = src/NormalMapGenerator.cpp; sourceTree = SOURCE_ROOT; };
+		B661734216A61CFA0083A307 /* NormalMapGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NormalMapGenerator.h; path = src/NormalMapGenerator.h; sourceTree = SOURCE_ROOT; };
 		F18DCD0315D554B800DB35DB /* Heightmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Heightmap.cpp; path = src/Heightmap.cpp; sourceTree = SOURCE_ROOT; };
 		F18DCD0315D554B800DB35DB /* Heightmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Heightmap.cpp; path = src/Heightmap.cpp; sourceTree = SOURCE_ROOT; };
 		F18DCD0415D554B800DB35DB /* Heightmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Heightmap.h; path = src/Heightmap.h; sourceTree = SOURCE_ROOT; };
 		F18DCD0415D554B800DB35DB /* Heightmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Heightmap.h; path = src/Heightmap.h; sourceTree = SOURCE_ROOT; };
 		F18DCD0515D554B800DB35DB /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Thread.h; path = src/Thread.h; sourceTree = SOURCE_ROOT; };
 		F18DCD0515D554B800DB35DB /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Thread.h; path = src/Thread.h; sourceTree = SOURCE_ROOT; };
@@ -278,6 +284,8 @@
 				42C8EDD614724CD700E43619 /* GPBDecoder.h */,
 				42C8EDD614724CD700E43619 /* GPBDecoder.h */,
 				42C8EDD714724CD700E43619 /* GPBFile.cpp */,
 				42C8EDD714724CD700E43619 /* GPBFile.cpp */,
 				42C8EDD814724CD700E43619 /* GPBFile.h */,
 				42C8EDD814724CD700E43619 /* GPBFile.h */,
+				B661733D16A61CE40083A307 /* Image.cpp */,
+				B661733E16A61CE40083A307 /* Image.h */,
 				42C8EDD914724CD700E43619 /* Light.cpp */,
 				42C8EDD914724CD700E43619 /* Light.cpp */,
 				42C8EDDA14724CD700E43619 /* Light.h */,
 				42C8EDDA14724CD700E43619 /* Light.h */,
 				42C8EDDD14724CD700E43619 /* main.cpp */,
 				42C8EDDD14724CD700E43619 /* main.cpp */,
@@ -299,6 +307,8 @@
 				42C8EDED14724CD700E43619 /* Model.h */,
 				42C8EDED14724CD700E43619 /* Model.h */,
 				42C8EDEE14724CD700E43619 /* Node.cpp */,
 				42C8EDEE14724CD700E43619 /* Node.cpp */,
 				42C8EDEF14724CD700E43619 /* Node.h */,
 				42C8EDEF14724CD700E43619 /* Node.h */,
+				B661734116A61CFA0083A307 /* NormalMapGenerator.cpp */,
+				B661734216A61CFA0083A307 /* NormalMapGenerator.h */,
 				42C8EDF014724CD700E43619 /* Object.cpp */,
 				42C8EDF014724CD700E43619 /* Object.cpp */,
 				42C8EDF114724CD700E43619 /* Object.h */,
 				42C8EDF114724CD700E43619 /* Object.h */,
 				42C8EDF214724CD700E43619 /* Quaternion.cpp */,
 				42C8EDF214724CD700E43619 /* Quaternion.cpp */,
@@ -444,6 +454,8 @@
 				42783423148D6F7500A6E27F /* FBXSceneEncoder.cpp in Sources */,
 				42783423148D6F7500A6E27F /* FBXSceneEncoder.cpp in Sources */,
 				4251B12C152D044B002F6199 /* Curve.cpp in Sources */,
 				4251B12C152D044B002F6199 /* Curve.cpp in Sources */,
 				F18DCD0615D554B800DB35DB /* Heightmap.cpp in Sources */,
 				F18DCD0615D554B800DB35DB /* Heightmap.cpp in Sources */,
+				B661733F16A61CE40083A307 /* Image.cpp in Sources */,
+				B661734316A61CFA0083A307 /* NormalMapGenerator.cpp in Sources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};

+ 1 - 1
gameplay-encoder/src/Heightmap.cpp

@@ -108,7 +108,7 @@ void Heightmap::generate(const std::vector<std::string>& nodeIds, int width, int
     __totalHeightmapScanlines = height;
     __totalHeightmapScanlines = height;
 
 
     // Determine # of threads to spawn
     // Determine # of threads to spawn
-    int threadCount = min(THREAD_COUNT, height);
+    int threadCount = std::min(THREAD_COUNT, height);
 
 
     // Split the work into separate threads to make max use of available cpu cores and speed up computation.
     // Split the work into separate threads to make max use of available cpu cores and speed up computation.
     HeightmapThreadData* threadData = new HeightmapThreadData[threadCount];
     HeightmapThreadData* threadData = new HeightmapThreadData[threadCount];

+ 4 - 2
gameplay-encoder/src/Image.cpp

@@ -203,6 +203,8 @@ void Image::save(const char* path)
     png_structp png_ptr = NULL;
     png_structp png_ptr = NULL;
     png_infop info_ptr = NULL;
     png_infop info_ptr = NULL;
     png_bytep row = NULL;
     png_bytep row = NULL;
+    unsigned int stride;
+    int index;
 
 
     FILE* fp = fopen(path, "wb");
     FILE* fp = fopen(path, "wb");
     if (fp == NULL)
     if (fp == NULL)
@@ -232,10 +234,10 @@ void Image::save(const char* path)
     png_write_info(png_ptr, info_ptr);
     png_write_info(png_ptr, info_ptr);
 
 
     // Allocate memory for a single row of image data
     // Allocate memory for a single row of image data
-    unsigned int stride = _bpp * _width * sizeof(png_byte);
+    stride = _bpp * _width * sizeof(png_byte);
     row = (png_bytep)malloc(stride);
     row = (png_bytep)malloc(stride);
 
 
-    int index = 0;
+    index = 0;
     for (unsigned int y = 0; y < _height; ++y)
     for (unsigned int y = 0; y < _height; ++y)
     {
     {
         for (unsigned int x = 0; x < stride; ++x)
         for (unsigned int x = 0; x < stride; ++x)

+ 2 - 2
gameplay-luagen/src/main.cpp

@@ -32,7 +32,7 @@ void writeFile(const std::string& path, const std::string& text)
 
 
     // Read in content of path to compare before writing
     // Read in content of path to compare before writing
     bool changed = true;
     bool changed = true;
-    ifstream in(path);
+    ifstream in(path.c_str());
     if (in.is_open())
     if (in.is_open())
     {
     {
         changed = false;
         changed = false;
@@ -54,7 +54,7 @@ void writeFile(const std::string& path, const std::string& text)
 
 
     if (changed)
     if (changed)
     {
     {
-        ofstream o(path);
+        ofstream o(path.c_str());
         o << text;
         o << text;
         o.close();
         o.close();
     }
     }

Diff do ficheiro suprimidas por serem muito extensas
+ 32 - 946
gameplay/gameplay.xcodeproj/project.pbxproj


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff