Merge remote-tracking branch 'origin/3.6' into 3.6

This commit is contained in:
NathanSweet 2017-10-09 11:52:32 +02:00
commit 4d7d448197
4 changed files with 11 additions and 11 deletions

View File

@ -22,11 +22,11 @@ void RegisterMemoryLeakDetector()
{ {
// Register our malloc and free functions to track memory leaks // Register our malloc and free functions to track memory leaks
#ifdef KANJI_MEMTRACE #ifdef KANJI_MEMTRACE
_setDebugMalloc(_kanjimalloc); _spSetDebugMalloc(_kanjimalloc);
#endif #endif
_setMalloc(_kanjimalloc); _spSetMalloc(_kanjimalloc);
_setRealloc(_kanjirealloc); _spSetRealloc(_kanjirealloc);
_setFree(_kanjifree); _spSetFree(_kanjifree);
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])
@ -74,6 +74,6 @@ extern "C" { // probably unnecessary
} }
char* _spUtil_readFile(const char* path, int* length) { char* _spUtil_readFile(const char* path, int* length) {
return _readFile(path, length); return _spReadFile(path, length);
} }
} }

View File

@ -30,7 +30,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Our memory system is thread-safe, but instead of linking massive libraries, // Our memory system is thread-safe, but instead of linking massive libraries,
// we attempt to use C++11 std::mutex. // we attempt to use C++11 std::mutex.
#ifdef USE_CPP11_MUTEX #ifdef USE_CPP11_MUTEX_DISABLED
#include <mutex> #include <mutex>
typedef std::recursive_mutex KSysLock; // rentrant typedef std::recursive_mutex KSysLock; // rentrant
struct KAutoLock { struct KAutoLock {

View File

@ -44,13 +44,13 @@ The Spine SFML example works on Windows, Linux and Mac OS X.
The entire example code is contained in [main.cpp](example/main.cpp#L61) The entire example code is contained in [main.cpp](example/main.cpp#L61)
### Linux ### Linux
1. Install the SFML dependencies, e.g. on Ubuntu/Debian via `sudo apt-get install -y libpthread-stubs0-dev libgl1-mesa-dev libx11-dev libxrandr-dev libfreetype6-dev libglew1.5-dev libjpeg8-dev libsndfile1-dev libopenal-dev libudev-dev libxcb-image0-dev libjpeg-dev libflac-dev` 1. Install the SFML dependencies, e.g. on Ubuntu/Debian via `sudo apt install libsfml-dev`
2. Install CMake, e.g. on Ubuntu/Debian via `sudo apt-get install -y cmake` 2. Install CMake, e.g. on Ubuntu/Debian via `sudo apt-get install -y cmake`
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above. 3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Open a terminal, and `cd` into the `spine-runtimes/spine-sfml` folder 4. Open a terminal, and `cd` into the `spine-runtimes/spine-sfml` folder
5. Type `mkdir build && cd build && cmake ../..` to generate Make files 5. Type `mkdir build && cd build && cmake ../..` to generate Make files
6. Type `make` to compile the example 6. Type `make` to compile the example
7. Run the example by `cd spine-sfml-example && ./spine-sfml-example` 7. Run the example by `cd spine-sfml && ./spine-sfml-example`
### Mac OS X ### Mac OS X
1. Install [Xcode](https://developer.apple.com/xcode/) 1. Install [Xcode](https://developer.apple.com/xcode/)

View File

@ -457,7 +457,7 @@ namespace Spine.Unity {
var skeleton = instruction.skeleton; var skeleton = instruction.skeleton;
var drawOrderItems = skeleton.drawOrder.Items; var drawOrderItems = skeleton.drawOrder.Items;
Color32 color; Color32 color = default(Color32);
float skeletonA = skeleton.a * 255, skeletonR = skeleton.r, skeletonG = skeleton.g, skeletonB = skeleton.b; float skeletonA = skeleton.a * 255, skeletonR = skeleton.r, skeletonG = skeleton.g, skeletonB = skeleton.b;
Vector2 meshBoundsMin = this.meshBoundsMin, meshBoundsMax = this.meshBoundsMax; Vector2 meshBoundsMin = this.meshBoundsMin, meshBoundsMax = this.meshBoundsMax;
@ -661,7 +661,7 @@ namespace Spine.Unity {
} }
// Populate Verts // Populate Verts
Color32 color; Color32 color = default(Color32);
int vertexIndex = 0; int vertexIndex = 0;
var tempVerts = this.tempVerts; var tempVerts = this.tempVerts;