diff --git a/.gitignore b/.gitignore index ed5a562ee7..2074ff15e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ -obj/ +/bin/ +/build/ +/lib/ + libs/ -lib/ +obj/ util/libmoai Thumbs.db @@ -38,6 +41,8 @@ bin/api-reference-parser/vendor docs/api-reference /moai-sdk/ /bin/env-local.bat +/bin/win32/ +/bin/x64/ /util/moai /**/java/build/ /**/java/*.iml diff --git a/.gitmodules b/.gitmodules index e29ae683c2..9b48de7663 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "3rdparty/civetweb"] path = 3rdparty/civetweb url = https://github.com/civetweb/civetweb.git +[submodule "3rdparty/kissfft"] + path = 3rdparty/kissfft + url = https://github.com/itdaniher/kissfft.git diff --git a/3rdparty-android/deltadna-v3.3.6/lib/dd_android_sdk.jar b/3rdparty-android/deltadna-v3.3.6/lib/dd_android_sdk.jar new file mode 100755 index 0000000000..bd79869b55 Binary files /dev/null and b/3rdparty-android/deltadna-v3.3.6/lib/dd_android_sdk.jar differ diff --git a/3rdparty-android/deltadna-v3.3.6/manifest_declarations.xml b/3rdparty-android/deltadna-v3.3.6/manifest_declarations.xml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/3rdparty-android/deltadna-v3.3.6/manifest_permissions.xml b/3rdparty-android/deltadna-v3.3.6/manifest_permissions.xml new file mode 100644 index 0000000000..f582356d7e --- /dev/null +++ b/3rdparty-android/deltadna-v3.3.6/manifest_permissions.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/3rdparty/LICENSE b/3rdparty/LICENSE index 13ab22b189..99cb2a61aa 100644 --- a/3rdparty/LICENSE +++ b/3rdparty/LICENSE @@ -7,6 +7,7 @@ glew 1.5.6 ISO8601DateFormatter.m, .h jansson 2.1 jpeg-8c +kissfft libogg 1.2.2 libvorbis 1.3.2 libpng 1.4.0 @@ -400,6 +401,37 @@ We are required to state that CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated." +---------------------------------------------------------------- +kissfft +---------------------------------------------------------------- +Copyright (c) 2003-2010 Mark Borgerding + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +* Neither the author nor the names of any contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ---------------------------------------------------------------- libogg 1.2.2 ---------------------------------------------------------------- diff --git a/3rdparty/c-ares-1.7.5/ares_init.c b/3rdparty/c-ares-1.7.5/ares_init.c index 080a9d821f..5ddf7669fc 100644 --- a/3rdparty/c-ares-1.7.5/ares_init.c +++ b/3rdparty/c-ares-1.7.5/ares_init.c @@ -962,11 +962,16 @@ DhcpNameServer status = ARES_EOF; #elif defined(ANDROID) - char value[PROP_VALUE_MAX]=""; - __system_property_get("net.dns1", value); - status = config_nameserver(&servers, &nservers, value); - if (status == ARES_SUCCESS) + #if defined(__arm64__) || defined(__LP64__) + status = ARES_EOF; + #else + char value[PROP_VALUE_MAX]=""; + __system_property_get("net.dns1", value); + status = config_nameserver(&servers, &nservers, value); + if (status == ARES_SUCCESS) + status = ARES_EOF; + #endif #else { char *p; diff --git a/3rdparty/c-ares-1.7.5/include-android/ares_build.h b/3rdparty/c-ares-1.7.5/include-android/ares_build.h index 9c17bb9f0e..fac8d44398 100644 --- a/3rdparty/c-ares-1.7.5/include-android/ares_build.h +++ b/3rdparty/c-ares-1.7.5/include-android/ares_build.h @@ -95,10 +95,10 @@ #ifdef CARES_PULL_SYS_SOCKET_H # include #endif - /* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 +#define CARES_SIZEOF_LONG sizeof(long) + /* Integral data type used for ares_socklen_t. */ #define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t diff --git a/3rdparty/civetweb b/3rdparty/civetweb index 3716b3faaa..a21519cccd 160000 --- a/3rdparty/civetweb +++ b/3rdparty/civetweb @@ -1 +1 @@ -Subproject commit 3716b3faaa96aa53a3658073d31f9cd795eb6060 +Subproject commit a21519cccde58d467982c9c18d291f4b34adbfd0 diff --git a/3rdparty/contrib/edtaa3func.c b/3rdparty/contrib/edtaa3func.c deleted file mode 100755 index f906f602a3..0000000000 --- a/3rdparty/contrib/edtaa3func.c +++ /dev/null @@ -1,577 +0,0 @@ -/* - * Copyright 2009 Stefan Gustavson (stefan.gustavson@gmail.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY STEFAN GUSTAVSON ''AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL STEFAN GUSTAVSON OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are - * those of the authors and should not be interpreted as representing official - * policies, either expressed or implied, of Stefan Gustavson. - * - * - * edtaa3() - * - * Sweep-and-update Euclidean distance transform of an - * image. Positive pixels are treated as object pixels, - * zero or negative pixels are treated as background. - * An attempt is made to treat antialiased edges correctly. - * The input image must have pixels in the range [0,1], - * and the antialiased image should be a box-filter - * sampling of the ideal, crisp edge. - * If the antialias region is more than 1 pixel wide, - * the result from this transform will be inaccurate. - * - * By Stefan Gustavson (stefan.gustavson@gmail.com). - * - * Originally written in 1994, based on a verbal - * description of the SSED8 algorithm published in the - * PhD dissertation of Ingemar Ragnemalm. This is his - * algorithm, I only implemented it in C. - * - * Updated in 2004 to treat border pixels correctly, - * and cleaned up the code to improve readability. - * - * Updated in 2009 to handle anti-aliased edges. - * - * Updated in 2011 to avoid a corner case infinite loop. - * - */ -#include -#include "edtaa3func.h" - -/* - * Compute the local gradient at edge pixels using convolution filters. - * The gradient is computed only at edge pixels. At other places in the - * image, it is never used, and it's mostly zero anyway. - */ -void computegradient(double *img, int w, int h, double *gx, double *gy) -{ - int i,j,k; - double glength; -#define SQRT2 1.4142136 - for(i = 1; i < h-1; i++) { // Avoid edges where the kernels would spill over - for(j = 1; j < w-1; j++) { - k = i*w + j; - if((img[k]>0.0) && (img[k]<1.0)) { // Compute gradient for edge pixels only - gx[k] = -img[k-w-1] - SQRT2*img[k-1] - img[k+w-1] + img[k-w+1] + SQRT2*img[k+1] + img[k+w+1]; - gy[k] = -img[k-w-1] - SQRT2*img[k-w] - img[k+w-1] + img[k-w+1] + SQRT2*img[k+w] + img[k+w+1]; - glength = gx[k]*gx[k] + gy[k]*gy[k]; - if(glength > 0.0) { // Avoid division by zero - glength = sqrt(glength); - gx[k]=gx[k]/glength; - gy[k]=gy[k]/glength; - } - } - } - } - // TODO: Compute reasonable values for gx, gy also around the image edges. - // (These are zero now, which reduces the accuracy for a 1-pixel wide region - // around the image edge.) 2x2 kernels would be suitable for this. -} - -/* - * A somewhat tricky function to approximate the distance to an edge in a - * certain pixel, with consideration to either the local gradient (gx,gy) - * or the direction to the pixel (dx,dy) and the pixel greyscale value a. - * The latter alternative, using (dx,dy), is the metric used by edtaa2(). - * Using a local estimate of the edge gradient (gx,gy) yields much better - * accuracy at and near edges, and reduces the error even at distant pixels - * provided that the gradient direction is accurately estimated. - */ -double edgedf(double gx, double gy, double a) -{ - double df, glength, temp, a1; - - if ((gx == 0) || (gy == 0)) { // Either A) gu or gv are zero, or B) both - df = 0.5-a; // Linear approximation is A) correct or B) a fair guess - } else { - glength = sqrt(gx*gx + gy*gy); - if(glength>0) { - gx = gx/glength; - gy = gy/glength; - } - /* Everything is symmetric wrt sign and transposition, - * so move to first octant (gx>=0, gy>=0, gx>=gy) to - * avoid handling all possible edge directions. - */ - gx = fabs(gx); - gy = fabs(gy); - if(gx 1.0) a = 1.0; - if(a < 0.0) a = 0.0; // Clip grayscale values outside the range [0,1] - if(a == 0.0) return 1000000.0; // Not an object pixel, return "very far" ("don't know yet") - - dx = (double)xi; - dy = (double)yi; - di = sqrt(dx*dx + dy*dy); // Length of integer vector, like a traditional EDT - if(di==0) { // Use local gradient only at edges - // Estimate based on local gradient only - df = edgedf(gx, gy, a); - } else { - // Estimate gradient based on direction to edge (accurate for large di) - df = edgedf(dx, dy, a); - } - return di + df; // Same metric as edtaa2, except at edges (where di=0) -} - -// Shorthand macro: add ubiquitous parameters dist, gx, gy, img and w and call distaa3() -#define DISTAA(c,xc,yc,xi,yi) (distaa3(img, gx, gy, w, c, xc, yc, xi, yi)) - -void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, short *disty, double *dist) -{ - int x, y, i, c; - int offset_u, offset_ur, offset_r, offset_rd, - offset_d, offset_dl, offset_l, offset_lu; - double olddist, newdist; - int cdistx, cdisty, newdistx, newdisty; - int changed; - double epsilon = 1e-3; - - /* Initialize index offsets for the current image width */ - offset_u = -w; - offset_ur = -w+1; - offset_r = 1; - offset_rd = w+1; - offset_d = w; - offset_dl = w-1; - offset_l = -1; - offset_lu = -w-1; - - /* Initialize the distance images */ - for(i=0; i 0) // If non-zero distance or not set yet - { - c = i + offset_u; // Index of candidate for testing - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_ur; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - i++; - - /* Middle pixels have all neighbors */ - for(x=1; x 0) // If not already zero distance - { - c = i+offset_l; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_lu; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_u; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - - /* Move index to second rightmost pixel of current row. */ - /* Rightmost pixel is skipped, it has no right neighbor. */ - i = y*w + w-2; - - /* scan left, propagate distance from right */ - for(x=w-2; x>=0; x--, i--) - { - olddist = dist[i]; - if(olddist <= 0) continue; // Already zero distance - - c = i+offset_r; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - } - - /* Scan rows in reverse order, except last row */ - for(y=h-2; y>=0; y--) - { - /* move index to rightmost pixel of current row */ - i = y*w + w-1; - - /* Scan left, propagate distances from below & right */ - - /* Rightmost pixel is special, has no right neighbors */ - olddist = dist[i]; - if(olddist > 0) // If not already zero distance - { - c = i+offset_d; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_dl; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - i--; - - /* Middle pixels have all neighbors */ - for(x=w-2; x>0; x--, i--) - { - olddist = dist[i]; - if(olddist <= 0) continue; // Already zero distance - - c = i+offset_r; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_rd; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_d; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_dl; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - /* Leftmost pixel is special, has no left neighbors */ - olddist = dist[i]; - if(olddist > 0) // If not already zero distance - { - c = i+offset_r; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_rd; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_d; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - - /* Move index to second leftmost pixel of current row. */ - /* Leftmost pixel is skipped, it has no left neighbor. */ - i = y*w + 1; - for(x=1; x +#include "moai_edtaa3func.h" + +/* + * Compute the local gradient at edge pixels using convolution filters. + * The gradient is computed only at edge pixels. At other places in the + * image, it is never used, and it's mostly zero anyway. + */ +void moai_computegradient(double *img, int w, int h, double *gx, double *gy) +{ + int i,j,k; + double glength; +#define SQRT2 1.4142136 + for(i = 1; i < h-1; i++) { // Avoid edges where the kernels would spill over + for(j = 1; j < w-1; j++) { + k = i*w + j; + if((img[k]>0.0) && (img[k]<1.0)) { // Compute gradient for edge pixels only + gx[k] = -img[k-w-1] - SQRT2*img[k-1] - img[k+w-1] + img[k-w+1] + SQRT2*img[k+1] + img[k+w+1]; + gy[k] = -img[k-w-1] - SQRT2*img[k-w] - img[k+w-1] + img[k-w+1] + SQRT2*img[k+w] + img[k+w+1]; + glength = gx[k]*gx[k] + gy[k]*gy[k]; + if(glength > 0.0) { // Avoid division by zero + glength = sqrt(glength); + gx[k]=gx[k]/glength; + gy[k]=gy[k]/glength; + } + } + } + } + // TODO: Compute reasonable values for gx, gy also around the image edges. + // (These are zero now, which reduces the accuracy for a 1-pixel wide region + // around the image edge.) 2x2 kernels would be suitable for this. +} + +/* + * A somewhat tricky function to approximate the distance to an edge in a + * certain pixel, with consideration to either the local gradient (gx,gy) + * or the direction to the pixel (dx,dy) and the pixel greyscale value a. + * The latter alternative, using (dx,dy), is the metric used by edtaa2(). + * Using a local estimate of the edge gradient (gx,gy) yields much better + * accuracy at and near edges, and reduces the error even at distant pixels + * provided that the gradient direction is accurately estimated. + */ +double edgedf(double gx, double gy, double a) +{ + double df, glength, temp, a1; + + if ((gx == 0) || (gy == 0)) { // Either A) gu or gv are zero, or B) both + df = 0.5-a; // Linear approximation is A) correct or B) a fair guess + } else { + glength = sqrt(gx*gx + gy*gy); + if(glength>0) { + gx = gx/glength; + gy = gy/glength; + } + /* Everything is symmetric wrt sign and transposition, + * so move to first octant (gx>=0, gy>=0, gx>=gy) to + * avoid handling all possible edge directions. + */ + gx = fabs(gx); + gy = fabs(gy); + if(gx 1.0) a = 1.0; + if(a < 0.0) a = 0.0; // Clip grayscale values outside the range [0,1] + if(a == 0.0) return 1000000.0; // Not an object pixel, return "very far" ("don't know yet") + + dx = (double)xi; + dy = (double)yi; + di = sqrt(dx*dx + dy*dy); // Length of integer vector, like a traditional EDT + if(di==0) { // Use local gradient only at edges + // Estimate based on local gradient only + df = edgedf(gx, gy, a); + } else { + // Estimate gradient based on direction to edge (accurate for large di) + df = edgedf(dx, dy, a); + } + return di + df; // Same metric as edtaa2, except at edges (where di=0) +} + +// Shorthand macro: add ubiquitous parameters dist, gx, gy, img and w and call distaa3() +//#define DISTAA(c,xc,yc,xi,yi) (moai_distaa3(img, gx, gy, w, c, xc, yc, xi, yi)) + +void moai_edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, short *disty, double *dist) +{ + int x, y, i, c; + int offset_u, offset_ur, offset_r, offset_rd, + offset_d, offset_dl, offset_l, offset_lu; + double olddist, newdist; + int cdistx, cdisty, newdistx, newdisty; + int changed; + double epsilon = 1e-3; + + /* Initialize index offsets for the current image width */ + offset_u = -w; + offset_ur = -w+1; + offset_r = 1; + offset_rd = w+1; + offset_d = w; + offset_dl = w-1; + offset_l = -1; + offset_lu = -w-1; + + /* Initialize the distance images */ + for(i=0; i 0) // If non-zero distance or not set yet + { + c = i + offset_u; // Index of candidate for testing + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx; + newdisty = cdisty+1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_ur; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx-1; + newdisty = cdisty+1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + changed = 1; + } + } + i++; + + /* Middle pixels have all neighbors */ + for(x=1; x 0) // If not already zero distance + { + c = i+offset_l; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx+1; + newdisty = cdisty; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_lu; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx+1; + newdisty = cdisty+1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_u; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx; + newdisty = cdisty+1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + changed = 1; + } + } + + /* Move index to second rightmost pixel of current row. */ + /* Rightmost pixel is skipped, it has no right neighbor. */ + i = y*w + w-2; + + /* scan left, propagate distance from right */ + for(x=w-2; x>=0; x--, i--) + { + olddist = dist[i]; + if(olddist <= 0) continue; // Already zero distance + + c = i+offset_r; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx-1; + newdisty = cdisty; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + changed = 1; + } + } + } + + /* Scan rows in reverse order, except last row */ + for(y=h-2; y>=0; y--) + { + /* move index to rightmost pixel of current row */ + i = y*w + w-1; + + /* Scan left, propagate distances from below & right */ + + /* Rightmost pixel is special, has no right neighbors */ + olddist = dist[i]; + if(olddist > 0) // If not already zero distance + { + c = i+offset_d; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx; + newdisty = cdisty-1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_dl; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx+1; + newdisty = cdisty-1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + changed = 1; + } + } + i--; + + /* Middle pixels have all neighbors */ + for(x=w-2; x>0; x--, i--) + { + olddist = dist[i]; + if(olddist <= 0) continue; // Already zero distance + + c = i+offset_r; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx-1; + newdisty = cdisty; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_rd; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx-1; + newdisty = cdisty-1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_d; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx; + newdisty = cdisty-1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_dl; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx+1; + newdisty = cdisty-1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + changed = 1; + } + } + /* Leftmost pixel is special, has no left neighbors */ + olddist = dist[i]; + if(olddist > 0) // If not already zero distance + { + c = i+offset_r; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx-1; + newdisty = cdisty; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_rd; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx-1; + newdisty = cdisty-1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + olddist=newdist; + changed = 1; + } + + c = i+offset_d; + cdistx = distx[c]; + cdisty = disty[c]; + newdistx = cdistx; + newdisty = cdisty-1; + newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); + if(newdist < olddist-epsilon) + { + distx[i]=newdistx; + disty[i]=newdisty; + dist[i]=newdist; + changed = 1; + } + } + + /* Move index to second leftmost pixel of current row. */ + /* Leftmost pixel is skipped, it has no left neighbor. */ + i = y*w + 1; + for(x=1; x #endif +#if defined(__arm64__) || defined(__LP64__) + +/* The size of `long', as computed by sizeof. */ +#define CURL_SIZEOF_LONG 8 + +/* Integral data type used for curl_socklen_t. */ +#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t + +/* The size of `curl_socklen_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +/* Data type definition of curl_socklen_t. */ +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; + +/* Signed integral data type used for curl_off_t. */ +#define CURL_TYPEOF_CURL_OFF_T long + +/* Data type definition of curl_off_t. */ +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; + +/* curl_off_t formatting string directive without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_T "ld" + +/* unsigned curl_off_t formatting string without "%" conversion specifier. */ +#define CURL_FORMAT_CURL_OFF_TU "lu" + +/* curl_off_t formatting string directive with "%" conversion specifier. */ +#define CURL_FORMAT_OFF_T "%ld" + +/* The size of `curl_off_t', as computed by sizeof. */ +#define CURL_SIZEOF_CURL_OFF_T 8 + +/* curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_T L + +/* unsigned curl_off_t constant suffix. */ +#define CURL_SUFFIX_CURL_OFF_TU UL + +#else + /* The size of `long', as computed by sizeof. */ #define CURL_SIZEOF_LONG 4 @@ -188,5 +228,6 @@ typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; /* unsigned curl_off_t constant suffix. */ #define CURL_SUFFIX_CURL_OFF_TU ULL +#endif /* __arm64__ */ #endif /* __CURL_CURLBUILD_H */ diff --git a/3rdparty/harfbuzz-1.0.6/COPYING b/3rdparty/harfbuzz-1.0.6/COPYING new file mode 100644 index 0000000000..9d1056f40b --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/COPYING @@ -0,0 +1,36 @@ +HarfBuzz is licensed under the so-called "Old MIT" license. Details follow. +For parts of HarfBuzz that are licensed under different licenses see individual +files names COPYING in subdirectories where applicable. + +Copyright © 2010,2011,2012 Google, Inc. +Copyright © 2012 Mozilla Foundation +Copyright © 2011 Codethink Limited +Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies) +Copyright © 2009 Keith Stribley +Copyright © 2009 Martin Hosken and SIL International +Copyright © 2007 Chris Wilson +Copyright © 2006 Behdad Esfahbod +Copyright © 2005 David Turner +Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc. +Copyright © 1998-2004 David Turner and Werner Lemberg + +For full copyright notices consult the individual files in the package. + + +Permission is hereby granted, without written agreement and without +license or royalty fees, to use, copy, modify, and distribute this +software and its documentation for any purpose, provided that the +above copyright notice and the following two paragraphs appear in +all copies of this software. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN +IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO +PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. diff --git a/3rdparty/harfbuzz-1.0.6/hb-atomic-private.hh b/3rdparty/harfbuzz-1.0.6/hb-atomic-private.hh new file mode 100644 index 0000000000..8179571ad2 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-atomic-private.hh @@ -0,0 +1,164 @@ +/* + * Copyright © 2007 Chris Wilson + * Copyright © 2009,2010 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Contributor(s): + * Chris Wilson + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_ATOMIC_PRIVATE_HH +#define HB_ATOMIC_PRIVATE_HH + +#include "hb-private.hh" + + +/* atomic_int */ + +/* We need external help for these */ + +#if defined(hb_atomic_int_impl_add) \ + && defined(hb_atomic_ptr_impl_get) \ + && defined(hb_atomic_ptr_impl_cmpexch) + +/* Defined externally, i.e. in config.h; must have typedef'ed hb_atomic_int_impl_t as well. */ + + +#elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__)) + +#include + +/* MinGW has a convoluted history of supporting MemoryBarrier + * properly. As such, define a function to wrap the whole + * thing. */ +static inline void _HBMemoryBarrier (void) { +#if !defined(MemoryBarrier) + long dummy = 0; + InterlockedExchange (&dummy, 1); +#else + MemoryBarrier (); +#endif +} + +typedef LONG hb_atomic_int_impl_t; +#define HB_ATOMIC_INT_IMPL_INIT(V) (V) +#define hb_atomic_int_impl_add(AI, V) InterlockedExchangeAdd (&(AI), (V)) + +#define hb_atomic_ptr_impl_get(P) (_HBMemoryBarrier (), (void *) *(P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) (InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O)) + + +#elif !defined(HB_NO_MT) && defined(__APPLE__) + +#include +#ifdef __MAC_OS_X_MIN_REQUIRED +#include +#elif defined(__IPHONE_OS_MIN_REQUIRED) +#include +#endif + + +typedef int32_t hb_atomic_int_impl_t; +#define HB_ATOMIC_INT_IMPL_INIT(V) (V) +#define hb_atomic_int_impl_add(AI, V) (OSAtomicAdd32Barrier ((V), &(AI)) - (V)) + +#define hb_atomic_ptr_impl_get(P) (OSMemoryBarrier (), (void *) *(P)) +#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) +#else +#if __ppc64__ || __x86_64__ || __aarch64__ +#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P)) +#else +#define hb_atomic_ptr_impl_cmpexch(P,O,N) OSAtomicCompareAndSwap32Barrier ((int32_t) (O), (int32_t) (N), (int32_t*) (P)) +#endif +#endif + + +#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) + +typedef int hb_atomic_int_impl_t; +#define HB_ATOMIC_INT_IMPL_INIT(V) (V) +#define hb_atomic_int_impl_add(AI, V) __sync_fetch_and_add (&(AI), (V)) + +#define hb_atomic_ptr_impl_get(P) (void *) (__sync_synchronize (), *(P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) + + +#elif !defined(HB_NO_MT) && defined(HAVE_SOLARIS_ATOMIC_OPS) + +#include +#include + +typedef unsigned int hb_atomic_int_impl_t; +#define HB_ATOMIC_INT_IMPL_INIT(V) (V) +#define hb_atomic_int_impl_add(AI, V) ( ({__machine_rw_barrier ();}), atomic_add_int_nv (&(AI), (V)) - (V)) + +#define hb_atomic_ptr_impl_get(P) ( ({__machine_rw_barrier ();}), (void *) *(P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) ( ({__machine_rw_barrier ();}), atomic_cas_ptr ((void **) (P), (void *) (O), (void *) (N)) == (void *) (O) ? true : false) + + +#elif !defined(HB_NO_MT) + +#define HB_ATOMIC_INT_NIL 1 /* Warn that fallback implementation is in use. */ + +typedef volatile int hb_atomic_int_impl_t; +#define HB_ATOMIC_INT_IMPL_INIT(V) (V) +#define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) + +#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false) + + +#else /* HB_NO_MT */ + +typedef int hb_atomic_int_impl_t; +#define HB_ATOMIC_INT_IMPL_INIT(V) (V) +#define hb_atomic_int_impl_add(AI, V) (((AI) += (V)) - (V)) + +#define hb_atomic_ptr_impl_get(P) ((void *) *(P)) +#define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false) + + +#endif + + +#define HB_ATOMIC_INT_INIT(V) {HB_ATOMIC_INT_IMPL_INIT(V)} + +struct hb_atomic_int_t +{ + hb_atomic_int_impl_t v; + + inline void set_unsafe (int v_) { v = v_; } + inline int get_unsafe (void) const { return v; } + inline int inc (void) { return hb_atomic_int_impl_add (const_cast (v), 1); } + inline int dec (void) { return hb_atomic_int_impl_add (const_cast (v), -1); } +}; + + +#define hb_atomic_ptr_get(P) hb_atomic_ptr_impl_get(P) +#define hb_atomic_ptr_cmpexch(P,O,N) hb_atomic_ptr_impl_cmpexch((P),(O),(N)) + + +#endif /* HB_ATOMIC_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-blob.cc b/3rdparty/harfbuzz-1.0.6/hb-blob.cc new file mode 100644 index 0000000000..a6870dc06e --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-blob.cc @@ -0,0 +1,479 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +/* http://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html */ +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 199309L +#endif + +#include "hb-private.hh" + +#include "hb-object-private.hh" + +#ifdef HAVE_SYS_MMAN_H +#ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ +#include +#endif /* HAVE_SYS_MMAN_H */ + +#include +#include + + + +#ifndef HB_DEBUG_BLOB +#define HB_DEBUG_BLOB (HB_DEBUG+0) +#endif + + +struct hb_blob_t { + hb_object_header_t header; + ASSERT_POD (); + + bool immutable; + + const char *data; + unsigned int length; + hb_memory_mode_t mode; + + void *user_data; + hb_destroy_func_t destroy; +}; + + +static bool _try_writable (hb_blob_t *blob); + +static void +_hb_blob_destroy_user_data (hb_blob_t *blob) +{ + if (blob->destroy) { + blob->destroy (blob->user_data); + blob->user_data = NULL; + blob->destroy = NULL; + } +} + +/** + * hb_blob_create: (skip) + * @data: Pointer to blob data. + * @length: Length of @data in bytes. + * @mode: Memory mode for @data. + * @user_data: Data parameter to pass to @destroy. + * @destroy: Callback to call when @data is not needed anymore. + * + * Creates a new "blob" object wrapping @data. The @mode parameter is used + * to negotiate ownership and lifecycle of @data. + * + * Return value: New blob, or the empty blob if something failed or if @length is + * zero. Destroy with hb_blob_destroy(). + * + * Since: 0.9.2 + **/ +hb_blob_t * +hb_blob_create (const char *data, + unsigned int length, + hb_memory_mode_t mode, + void *user_data, + hb_destroy_func_t destroy) +{ + hb_blob_t *blob; + + if (!length || + length >= 1u << 31 || + data + length < data /* overflows */ || + !(blob = hb_object_create ())) { + if (destroy) + destroy (user_data); + return hb_blob_get_empty (); + } + + blob->data = data; + blob->length = length; + blob->mode = mode; + + blob->user_data = user_data; + blob->destroy = destroy; + + if (blob->mode == HB_MEMORY_MODE_DUPLICATE) { + blob->mode = HB_MEMORY_MODE_READONLY; + if (!_try_writable (blob)) { + hb_blob_destroy (blob); + return hb_blob_get_empty (); + } + } + + return blob; +} + +/** + * hb_blob_create_sub_blob: + * @parent: Parent blob. + * @offset: Start offset of sub-blob within @parent, in bytes. + * @length: Length of sub-blob. + * + * Returns a blob that represents a range of bytes in @parent. The new + * blob is always created with %HB_MEMORY_MODE_READONLY, meaning that it + * will never modify data in the parent blob. The parent data is not + * expected to be modified, and will result in undefined behavior if it + * is. + * + * Makes @parent immutable. + * + * Return value: New blob, or the empty blob if something failed or if + * @length is zero or @offset is beyond the end of @parent's data. Destroy + * with hb_blob_destroy(). + * + * Since: 0.9.2 + **/ +hb_blob_t * +hb_blob_create_sub_blob (hb_blob_t *parent, + unsigned int offset, + unsigned int length) +{ + hb_blob_t *blob; + + if (!length || offset >= parent->length) + return hb_blob_get_empty (); + + hb_blob_make_immutable (parent); + + blob = hb_blob_create (parent->data + offset, + MIN (length, parent->length - offset), + HB_MEMORY_MODE_READONLY, + hb_blob_reference (parent), + (hb_destroy_func_t) hb_blob_destroy); + + return blob; +} + +/** + * hb_blob_get_empty: + * + * Returns the singleton empty blob. + * + * See TODO:link object types for more information. + * + * Return value: (transfer full): the empty blob. + * + * Since: 0.9.2 + **/ +hb_blob_t * +hb_blob_get_empty (void) +{ + static const hb_blob_t _hb_blob_nil = { + HB_OBJECT_HEADER_STATIC, + + true, /* immutable */ + + NULL, /* data */ + 0, /* length */ + HB_MEMORY_MODE_READONLY, /* mode */ + + NULL, /* user_data */ + NULL /* destroy */ + }; + + return const_cast (&_hb_blob_nil); +} + +/** + * hb_blob_reference: (skip) + * @blob: a blob. + * + * Increases the reference count on @blob. + * + * See TODO:link object types for more information. + * + * Return value: @blob. + * + * Since: 0.9.2 + **/ +hb_blob_t * +hb_blob_reference (hb_blob_t *blob) +{ + return hb_object_reference (blob); +} + +/** + * hb_blob_destroy: (skip) + * @blob: a blob. + * + * Descreases the reference count on @blob, and if it reaches zero, destroys + * @blob, freeing all memory, possibly calling the destroy-callback the blob + * was created for if it has not been called already. + * + * See TODO:link object types for more information. + * + * Since: 0.9.2 + **/ +void +hb_blob_destroy (hb_blob_t *blob) +{ + if (!hb_object_destroy (blob)) return; + + _hb_blob_destroy_user_data (blob); + + free (blob); +} + +/** + * hb_blob_set_user_data: (skip) + * @blob: a blob. + * @key: key for data to set. + * @data: data to set. + * @destroy: callback to call when @data is not needed anymore. + * @replace: whether to replace an existing data with the same key. + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_blob_set_user_data (hb_blob_t *blob, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + return hb_object_set_user_data (blob, key, data, destroy, replace); +} + +/** + * hb_blob_get_user_data: (skip) + * @blob: a blob. + * @key: key for data to get. + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +void * +hb_blob_get_user_data (hb_blob_t *blob, + hb_user_data_key_t *key) +{ + return hb_object_get_user_data (blob, key); +} + + +/** + * hb_blob_make_immutable: + * @blob: a blob. + * + * + * + * Since: 0.9.2 + **/ +void +hb_blob_make_immutable (hb_blob_t *blob) +{ + if (hb_object_is_inert (blob)) + return; + + blob->immutable = true; +} + +/** + * hb_blob_is_immutable: + * @blob: a blob. + * + * + * + * Return value: TODO + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_blob_is_immutable (hb_blob_t *blob) +{ + return blob->immutable; +} + + +/** + * hb_blob_get_length: + * @blob: a blob. + * + * + * + * Return value: the length of blob data in bytes. + * + * Since: 0.9.2 + **/ +unsigned int +hb_blob_get_length (hb_blob_t *blob) +{ + return blob->length; +} + +/** + * hb_blob_get_data: + * @blob: a blob. + * @length: (out): + * + * + * + * Returns: (transfer none) (array length=length): + * + * Since: 0.9.2 + **/ +const char * +hb_blob_get_data (hb_blob_t *blob, unsigned int *length) +{ + if (length) + *length = blob->length; + + return blob->data; +} + +/** + * hb_blob_get_data_writable: + * @blob: a blob. + * @length: (out): output length of the writable data. + * + * Tries to make blob data writable (possibly copying it) and + * return pointer to data. + * + * Fails if blob has been made immutable, or if memory allocation + * fails. + * + * Returns: (transfer none) (array length=length): Writable blob data, + * or %NULL if failed. + * + * Since: 0.9.2 + **/ +char * +hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length) +{ + if (!_try_writable (blob)) { + if (length) + *length = 0; + + return NULL; + } + + if (length) + *length = blob->length; + + return const_cast (blob->data); +} + + +static hb_bool_t +_try_make_writable_inplace_unix (hb_blob_t *blob) +{ +#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MPROTECT) + uintptr_t pagesize = -1, mask, length; + const char *addr; + +#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE) + pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE); +#elif defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE) + pagesize = (uintptr_t) sysconf (_SC_PAGESIZE); +#elif defined(HAVE_GETPAGESIZE) + pagesize = (uintptr_t) getpagesize (); +#endif + + if ((uintptr_t) -1L == pagesize) { + DEBUG_MSG_FUNC (BLOB, blob, "failed to get pagesize: %s", strerror (errno)); + return false; + } + DEBUG_MSG_FUNC (BLOB, blob, "pagesize is %lu", (unsigned long) pagesize); + + mask = ~(pagesize-1); + addr = (const char *) (((uintptr_t) blob->data) & mask); + length = (const char *) (((uintptr_t) blob->data + blob->length + pagesize-1) & mask) - addr; + DEBUG_MSG_FUNC (BLOB, blob, + "calling mprotect on [%p..%p] (%lu bytes)", + addr, addr+length, (unsigned long) length); + if (-1 == mprotect ((void *) addr, length, PROT_READ | PROT_WRITE)) { + DEBUG_MSG_FUNC (BLOB, blob, "mprotect failed: %s", strerror (errno)); + return false; + } + + blob->mode = HB_MEMORY_MODE_WRITABLE; + + DEBUG_MSG_FUNC (BLOB, blob, + "successfully made [%p..%p] (%lu bytes) writable\n", + addr, addr+length, (unsigned long) length); + return true; +#else + return false; +#endif +} + +static bool +_try_writable_inplace (hb_blob_t *blob) +{ + DEBUG_MSG_FUNC (BLOB, blob, "making writable inplace\n"); + + if (_try_make_writable_inplace_unix (blob)) + return true; + + DEBUG_MSG_FUNC (BLOB, blob, "making writable -> FAILED\n"); + + /* Failed to make writable inplace, mark that */ + blob->mode = HB_MEMORY_MODE_READONLY; + return false; +} + +static bool +_try_writable (hb_blob_t *blob) +{ + if (blob->immutable) + return false; + + if (blob->mode == HB_MEMORY_MODE_WRITABLE) + return true; + + if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE && _try_writable_inplace (blob)) + return true; + + if (blob->mode == HB_MEMORY_MODE_WRITABLE) + return true; + + + DEBUG_MSG_FUNC (BLOB, blob, "current data is -> %p\n", blob->data); + + char *new_data; + + new_data = (char *) malloc (blob->length); + if (unlikely (!new_data)) + return false; + + DEBUG_MSG_FUNC (BLOB, blob, "dupped successfully -> %p\n", blob->data); + + memcpy (new_data, blob->data, blob->length); + _hb_blob_destroy_user_data (blob); + blob->mode = HB_MEMORY_MODE_WRITABLE; + blob->data = new_data; + blob->user_data = new_data; + blob->destroy = free; + + return true; +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-blob.h b/3rdparty/harfbuzz-1.0.6/hb-blob.h new file mode 100644 index 0000000000..b2419abfd2 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-blob.h @@ -0,0 +1,126 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include instead." +#endif + +#ifndef HB_BLOB_H +#define HB_BLOB_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +/* + * Note re various memory-modes: + * + * - In no case shall the HarfBuzz client modify memory + * that is passed to HarfBuzz in a blob. If there is + * any such possibility, MODE_DUPLICATE should be used + * such that HarfBuzz makes a copy immediately, + * + * - Use MODE_READONLY otherse, unless you really really + * really know what you are doing, + * + * - MODE_WRITABLE is appropriate if you really made a + * copy of data solely for the purpose of passing to + * HarfBuzz and doing that just once (no reuse!), + * + * - If the font is mmap()ed, it's ok to use + * READONLY_MAY_MAKE_WRITABLE, however, using that mode + * correctly is very tricky. Use MODE_READONLY instead. + */ +typedef enum { + HB_MEMORY_MODE_DUPLICATE, + HB_MEMORY_MODE_READONLY, + HB_MEMORY_MODE_WRITABLE, + HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE +} hb_memory_mode_t; + +typedef struct hb_blob_t hb_blob_t; + +hb_blob_t * +hb_blob_create (const char *data, + unsigned int length, + hb_memory_mode_t mode, + void *user_data, + hb_destroy_func_t destroy); + +/* Always creates with MEMORY_MODE_READONLY. + * Even if the parent blob is writable, we don't + * want the user of the sub-blob to be able to + * modify the parent data as that data may be + * shared among multiple sub-blobs. + */ +hb_blob_t * +hb_blob_create_sub_blob (hb_blob_t *parent, + unsigned int offset, + unsigned int length); + +hb_blob_t * +hb_blob_get_empty (void); + +hb_blob_t * +hb_blob_reference (hb_blob_t *blob); + +void +hb_blob_destroy (hb_blob_t *blob); + +hb_bool_t +hb_blob_set_user_data (hb_blob_t *blob, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +void * +hb_blob_get_user_data (hb_blob_t *blob, + hb_user_data_key_t *key); + + +void +hb_blob_make_immutable (hb_blob_t *blob); + +hb_bool_t +hb_blob_is_immutable (hb_blob_t *blob); + + +unsigned int +hb_blob_get_length (hb_blob_t *blob); + +const char * +hb_blob_get_data (hb_blob_t *blob, unsigned int *length); + +char * +hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length); + + +HB_END_DECLS + +#endif /* HB_BLOB_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-buffer-deserialize-json.hh b/3rdparty/harfbuzz-1.0.6/hb-buffer-deserialize-json.hh new file mode 100644 index 0000000000..3f626bda40 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-buffer-deserialize-json.hh @@ -0,0 +1,643 @@ + +#line 1 "hb-buffer-deserialize-json.rl" +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_BUFFER_DESERIALIZE_JSON_HH +#define HB_BUFFER_DESERIALIZE_JSON_HH + +#include "hb-private.hh" + + +#line 36 "hb-buffer-deserialize-json.hh" +static const unsigned char _deserialize_json_trans_keys[] = { + 0u, 0u, 9u, 123u, 9u, 34u, 97u, 103u, 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, + 48u, 57u, 9u, 125u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, + 9u, 125u, 9u, 125u, 108u, 108u, 34u, 34u, 9u, 58u, 9u, 57u, 9u, 125u, 9u, 125u, + 120u, 121u, 34u, 34u, 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, + 9u, 58u, 9u, 57u, 48u, 57u, 9u, 125u, 9u, 125u, 34u, 34u, 9u, 58u, 9u, 57u, + 65u, 122u, 34u, 122u, 9u, 125u, 9u, 125u, 9u, 93u, 9u, 123u, 0u, 0u, 0 +}; + +static const char _deserialize_json_key_spans[] = { + 0, 115, 26, 7, 2, 1, 50, 49, + 10, 117, 117, 117, 1, 50, 49, 10, + 117, 117, 1, 1, 50, 49, 117, 117, + 2, 1, 50, 49, 10, 117, 117, 1, + 50, 49, 10, 117, 117, 1, 50, 49, + 58, 89, 117, 117, 85, 115, 0 +}; + +static const short _deserialize_json_index_offsets[] = { + 0, 0, 116, 143, 151, 154, 156, 207, + 257, 268, 386, 504, 622, 624, 675, 725, + 736, 854, 972, 974, 976, 1027, 1077, 1195, + 1313, 1316, 1318, 1369, 1419, 1430, 1548, 1666, + 1668, 1719, 1769, 1780, 1898, 2016, 2018, 2069, + 2119, 2178, 2268, 2386, 2504, 2590, 2706 +}; + +static const char _deserialize_json_indicies[] = { + 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 3, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 4, 1, + 5, 1, 6, 7, 1, 1, 8, 1, + 9, 10, 1, 11, 1, 11, 11, 11, + 11, 11, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 11, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 12, 1, + 12, 12, 12, 12, 12, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 12, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 13, 1, 1, 14, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 1, 16, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 1, 18, 18, 18, + 18, 18, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 18, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 19, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 20, 1, 21, 21, 21, 21, 21, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 21, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 22, + 1, 18, 18, 18, 18, 18, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 18, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 19, 1, 1, 1, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 20, 1, 23, + 1, 23, 23, 23, 23, 23, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 23, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 24, 1, 24, 24, 24, 24, + 24, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 24, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 25, 1, 1, 26, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 1, 28, 29, + 29, 29, 29, 29, 29, 29, 29, 29, + 1, 30, 30, 30, 30, 30, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 30, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 31, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 32, 1, 30, + 30, 30, 30, 30, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 30, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 31, 1, 1, 1, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 32, 1, 33, 1, 34, + 1, 34, 34, 34, 34, 34, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 34, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 35, 1, 35, 35, 35, 35, + 35, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 35, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 36, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 1, 38, 38, + 38, 38, 38, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 38, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 39, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 40, 1, 38, 38, 38, 38, + 38, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 38, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 39, + 1, 1, 1, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 40, 1, 42, 43, 1, 44, 1, 44, + 44, 44, 44, 44, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 44, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 45, 1, 45, 45, 45, 45, 45, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 45, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 46, 1, + 1, 47, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 1, 49, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 1, 51, + 51, 51, 51, 51, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 51, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 52, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 53, 1, 51, 51, 51, + 51, 51, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 51, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 52, 1, 1, 1, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 53, 1, 54, 1, 54, 54, 54, + 54, 54, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 54, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 55, 1, + 55, 55, 55, 55, 55, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 55, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 56, 1, 1, 57, + 58, 58, 58, 58, 58, 58, 58, 58, + 58, 1, 59, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 1, 61, 61, 61, + 61, 61, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 61, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 62, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 63, 1, 61, 61, 61, 61, 61, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 61, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 62, 1, + 1, 1, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 63, + 1, 64, 1, 64, 64, 64, 64, 64, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 64, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 65, 1, 65, 65, + 65, 65, 65, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 65, 1, 66, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 67, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 1, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 1, 1, 1, 1, 1, 1, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 1, 70, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 71, 71, + 1, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 1, 1, 1, 1, 1, + 1, 1, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 1, 1, 1, 1, + 71, 1, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 1, 72, 72, 72, + 72, 72, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 72, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 73, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 74, 1, 72, 72, 72, 72, 72, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 72, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 73, 1, + 1, 1, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 74, + 1, 76, 76, 76, 76, 76, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 76, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 77, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 78, 1, 0, + 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 0 +}; + +static const char _deserialize_json_trans_targs[] = { + 1, 0, 2, 2, 3, 4, 18, 24, + 37, 5, 12, 6, 7, 8, 9, 11, + 9, 11, 10, 2, 44, 10, 44, 13, + 14, 15, 16, 17, 16, 17, 10, 2, + 44, 19, 20, 21, 22, 23, 10, 2, + 44, 23, 25, 31, 26, 27, 28, 29, + 30, 29, 30, 10, 2, 44, 32, 33, + 34, 35, 36, 35, 36, 10, 2, 44, + 38, 39, 40, 42, 43, 41, 10, 41, + 10, 2, 44, 43, 44, 45, 46 +}; + +static const char _deserialize_json_trans_actions[] = { + 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 2, + 0, 0, 3, 3, 4, 0, 5, 0, + 0, 2, 2, 2, 0, 0, 6, 6, + 7, 0, 0, 0, 2, 2, 8, 8, + 9, 0, 0, 0, 0, 0, 2, 2, + 2, 0, 0, 10, 10, 11, 0, 0, + 2, 2, 2, 0, 0, 12, 12, 13, + 0, 0, 0, 2, 2, 2, 14, 0, + 15, 15, 16, 0, 0, 0, 0 +}; + +static const int deserialize_json_start = 1; +static const int deserialize_json_first_final = 44; +static const int deserialize_json_error = 0; + +static const int deserialize_json_en_main = 1; + + +#line 97 "hb-buffer-deserialize-json.rl" + + +static hb_bool_t +_hb_buffer_deserialize_glyphs_json (hb_buffer_t *buffer, + const char *buf, + unsigned int buf_len, + const char **end_ptr, + hb_font_t *font) +{ + const char *p = buf, *pe = buf + buf_len; + + /* Ensure we have positions. */ + (void) hb_buffer_get_glyph_positions (buffer, NULL); + + while (p < pe && ISSPACE (*p)) + p++; + if (p < pe && *p == (buffer->len ? ',' : '[')) + { + *end_ptr = ++p; + } + + const char *tok = NULL; + int cs; + hb_glyph_info_t info = {0}; + hb_glyph_position_t pos = {0}; + +#line 466 "hb-buffer-deserialize-json.hh" + { + cs = deserialize_json_start; + } + +#line 471 "hb-buffer-deserialize-json.hh" + { + int _slen; + int _trans; + const unsigned char *_keys; + const char *_inds; + if ( p == pe ) + goto _test_eof; + if ( cs == 0 ) + goto _out; +_resume: + _keys = _deserialize_json_trans_keys + (cs<<1); + _inds = _deserialize_json_indicies + _deserialize_json_index_offsets[cs]; + + _slen = _deserialize_json_key_spans[cs]; + _trans = _inds[ _slen > 0 && _keys[0] <=(*p) && + (*p) <= _keys[1] ? + (*p) - _keys[0] : _slen ]; + + cs = _deserialize_json_trans_targs[_trans]; + + if ( _deserialize_json_trans_actions[_trans] == 0 ) + goto _again; + + switch ( _deserialize_json_trans_actions[_trans] ) { + case 1: +#line 38 "hb-buffer-deserialize-json.rl" + { + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); +} + break; + case 5: +#line 43 "hb-buffer-deserialize-json.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 2: +#line 51 "hb-buffer-deserialize-json.rl" + { + tok = p; +} + break; + case 14: +#line 55 "hb-buffer-deserialize-json.rl" + { + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} + break; + case 15: +#line 62 "hb-buffer-deserialize-json.rl" + { if (!parse_uint (tok, p, &info.codepoint)) return false; } + break; + case 8: +#line 63 "hb-buffer-deserialize-json.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } + break; + case 10: +#line 64 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.x_offset )) return false; } + break; + case 12: +#line 65 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } + break; + case 3: +#line 66 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } + break; + case 6: +#line 67 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.y_advance)) return false; } + break; + case 16: +#line 62 "hb-buffer-deserialize-json.rl" + { if (!parse_uint (tok, p, &info.codepoint)) return false; } +#line 43 "hb-buffer-deserialize-json.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 9: +#line 63 "hb-buffer-deserialize-json.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } +#line 43 "hb-buffer-deserialize-json.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 11: +#line 64 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.x_offset )) return false; } +#line 43 "hb-buffer-deserialize-json.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 13: +#line 65 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } +#line 43 "hb-buffer-deserialize-json.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 4: +#line 66 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } +#line 43 "hb-buffer-deserialize-json.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 7: +#line 67 "hb-buffer-deserialize-json.rl" + { if (!parse_int (tok, p, &pos.y_advance)) return false; } +#line 43 "hb-buffer-deserialize-json.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; +#line 624 "hb-buffer-deserialize-json.hh" + } + +_again: + if ( cs == 0 ) + goto _out; + if ( ++p != pe ) + goto _resume; + _test_eof: {} + _out: {} + } + +#line 125 "hb-buffer-deserialize-json.rl" + + + *end_ptr = p; + + return p == pe && *(p-1) != ']'; +} + +#endif /* HB_BUFFER_DESERIALIZE_JSON_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-buffer-deserialize-text.hh b/3rdparty/harfbuzz-1.0.6/hb-buffer-deserialize-text.hh new file mode 100644 index 0000000000..d2d8daae7e --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-buffer-deserialize-text.hh @@ -0,0 +1,571 @@ + +#line 1 "hb-buffer-deserialize-text.rl" +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_BUFFER_DESERIALIZE_TEXT_HH +#define HB_BUFFER_DESERIALIZE_TEXT_HH + +#include "hb-private.hh" + + +#line 36 "hb-buffer-deserialize-text.hh" +static const unsigned char _deserialize_text_trans_keys[] = { + 0u, 0u, 9u, 122u, 45u, 57u, 48u, 57u, 45u, 57u, 48u, 57u, 48u, 57u, 45u, 57u, + 48u, 57u, 44u, 44u, 45u, 57u, 48u, 57u, 44u, 57u, 9u, 124u, 9u, 124u, 0u, 0u, + 9u, 122u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, 9u, 124u, + 9u, 124u, 9u, 124u, 9u, 124u, 0 +}; + +static const char _deserialize_text_key_spans[] = { + 0, 114, 13, 10, 13, 10, 10, 13, + 10, 1, 13, 10, 14, 116, 116, 0, + 114, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116 +}; + +static const short _deserialize_text_index_offsets[] = { + 0, 0, 115, 129, 140, 154, 165, 176, + 190, 201, 203, 217, 228, 243, 360, 477, + 478, 593, 710, 827, 944, 1061, 1178, 1295, + 1412, 1529, 1646 +}; + +static const char _deserialize_text_indicies[] = { + 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 2, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 5, 1, 1, 6, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 1, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 1, 10, 1, 1, + 11, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 1, 13, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 1, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 1, 17, 1, 1, 18, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 1, 20, + 21, 21, 21, 21, 21, 21, 21, 21, + 21, 1, 22, 1, 23, 1, 1, 24, + 25, 25, 25, 25, 25, 25, 25, 25, + 25, 1, 26, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 1, 22, 1, 1, + 1, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 1, 28, 28, 28, 28, + 28, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 28, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 29, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 30, 1, 1, 31, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 32, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 33, + 1, 34, 34, 34, 34, 34, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 34, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 35, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 36, 1, 1, 0, + 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 1, 1, 1, 1, 1, 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 1, 28, 28, 28, 28, 28, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 28, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 29, 1, 1, 1, + 1, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 1, 1, 1, 30, 1, + 1, 31, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 32, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 33, 1, 38, + 38, 38, 38, 38, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 38, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 39, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 40, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 41, 1, 42, 42, 42, 42, + 42, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 42, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 43, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 44, + 1, 42, 42, 42, 42, 42, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 42, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 43, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 44, 1, 38, 38, + 38, 38, 38, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 38, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 39, 1, 1, 1, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 40, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 41, 1, 45, 45, 45, 45, 45, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 45, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 46, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 47, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 48, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 49, 1, + 50, 50, 50, 50, 50, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 50, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 51, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 52, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 53, 1, 50, 50, 50, + 50, 50, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 50, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 51, + 1, 1, 1, 1, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 52, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 53, 1, 45, 45, 45, 45, 45, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 45, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 46, 1, 1, 1, + 1, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 1, 1, 1, 1, 1, + 1, 47, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 48, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 49, 1, 28, + 28, 28, 28, 28, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 28, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 29, 1, 55, 55, 1, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 1, 1, 1, 30, 1, 1, 31, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 1, 1, 32, 1, 55, 1, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, + 55, 1, 33, 1, 0 +}; + +static const char _deserialize_text_trans_targs[] = { + 1, 0, 13, 17, 26, 3, 18, 21, + 18, 21, 5, 19, 20, 19, 20, 22, + 25, 8, 9, 12, 9, 12, 10, 11, + 23, 24, 23, 24, 14, 2, 6, 7, + 15, 16, 14, 15, 16, 17, 14, 4, + 15, 16, 14, 15, 16, 14, 2, 7, + 15, 16, 14, 2, 15, 16, 25, 26 +}; + +static const char _deserialize_text_trans_actions[] = { + 0, 0, 1, 1, 1, 2, 2, 2, + 0, 0, 2, 2, 2, 0, 0, 2, + 2, 2, 2, 2, 0, 0, 3, 2, + 2, 2, 0, 0, 4, 5, 5, 5, + 4, 4, 0, 0, 0, 0, 6, 7, + 6, 6, 8, 8, 8, 9, 10, 10, + 9, 9, 11, 12, 11, 11, 0, 0 +}; + +static const char _deserialize_text_eof_actions[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, + 0, 4, 6, 8, 8, 6, 9, 11, + 11, 9, 4 +}; + +static const int deserialize_text_start = 1; +static const int deserialize_text_first_final = 13; +static const int deserialize_text_error = 0; + +static const int deserialize_text_en_main = 1; + + +#line 91 "hb-buffer-deserialize-text.rl" + + +static hb_bool_t +_hb_buffer_deserialize_glyphs_text (hb_buffer_t *buffer, + const char *buf, + unsigned int buf_len, + const char **end_ptr, + hb_font_t *font) +{ + const char *p = buf, *pe = buf + buf_len; + + /* Ensure we have positions. */ + (void) hb_buffer_get_glyph_positions (buffer, NULL); + + while (p < pe && ISSPACE (*p)) + p++; + if (p < pe && *p == (buffer->len ? '|' : '[')) + { + *end_ptr = ++p; + } + + const char *eof = pe, *tok = NULL; + int cs; + hb_glyph_info_t info = {0}; + hb_glyph_position_t pos = {0}; + +#line 343 "hb-buffer-deserialize-text.hh" + { + cs = deserialize_text_start; + } + +#line 348 "hb-buffer-deserialize-text.hh" + { + int _slen; + int _trans; + const unsigned char *_keys; + const char *_inds; + if ( p == pe ) + goto _test_eof; + if ( cs == 0 ) + goto _out; +_resume: + _keys = _deserialize_text_trans_keys + (cs<<1); + _inds = _deserialize_text_indicies + _deserialize_text_index_offsets[cs]; + + _slen = _deserialize_text_key_spans[cs]; + _trans = _inds[ _slen > 0 && _keys[0] <=(*p) && + (*p) <= _keys[1] ? + (*p) - _keys[0] : _slen ]; + + cs = _deserialize_text_trans_targs[_trans]; + + if ( _deserialize_text_trans_actions[_trans] == 0 ) + goto _again; + + switch ( _deserialize_text_trans_actions[_trans] ) { + case 2: +#line 51 "hb-buffer-deserialize-text.rl" + { + tok = p; +} + break; + case 5: +#line 55 "hb-buffer-deserialize-text.rl" + { + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} + break; + case 10: +#line 62 "hb-buffer-deserialize-text.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } + break; + case 3: +#line 63 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.x_offset )) return false; } + break; + case 12: +#line 64 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } + break; + case 7: +#line 65 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } + break; + case 1: +#line 38 "hb-buffer-deserialize-text.rl" + { + memset (&info, 0, sizeof (info)); + memset (&pos , 0, sizeof (pos )); +} +#line 51 "hb-buffer-deserialize-text.rl" + { + tok = p; +} + break; + case 4: +#line 55 "hb-buffer-deserialize-text.rl" + { + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 9: +#line 62 "hb-buffer-deserialize-text.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 11: +#line 64 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 6: +#line 65 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 8: +#line 66 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.y_advance)) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; +#line 480 "hb-buffer-deserialize-text.hh" + } + +_again: + if ( cs == 0 ) + goto _out; + if ( ++p != pe ) + goto _resume; + _test_eof: {} + if ( p == eof ) + { + switch ( _deserialize_text_eof_actions[cs] ) { + case 4: +#line 55 "hb-buffer-deserialize-text.rl" + { + if (!hb_font_glyph_from_string (font, + tok, p - tok, + &info.codepoint)) + return false; +} +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 9: +#line 62 "hb-buffer-deserialize-text.rl" + { if (!parse_uint (tok, p, &info.cluster )) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 11: +#line 64 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.y_offset )) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 6: +#line 65 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.x_advance)) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; + case 8: +#line 66 "hb-buffer-deserialize-text.rl" + { if (!parse_int (tok, p, &pos.y_advance)) return false; } +#line 43 "hb-buffer-deserialize-text.rl" + { + buffer->add_info (info); + if (buffer->in_error) + return false; + buffer->pos[buffer->len - 1] = pos; + *end_ptr = p; +} + break; +#line 557 "hb-buffer-deserialize-text.hh" + } + } + + _out: {} + } + +#line 119 "hb-buffer-deserialize-text.rl" + + + *end_ptr = p; + + return p == pe && *(p-1) != ']'; +} + +#endif /* HB_BUFFER_DESERIALIZE_TEXT_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-buffer-private.hh b/3rdparty/harfbuzz-1.0.6/hb-buffer-private.hh new file mode 100644 index 0000000000..7fed7386b0 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-buffer-private.hh @@ -0,0 +1,220 @@ +/* + * Copyright © 1998-2004 David Turner and Werner Lemberg + * Copyright © 2004,2007,2009,2010 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Owen Taylor, Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_BUFFER_PRIVATE_HH +#define HB_BUFFER_PRIVATE_HH + +#include "hb-private.hh" +#include "hb-object-private.hh" +#include "hb-unicode-private.hh" + + +ASSERT_STATIC (sizeof (hb_glyph_info_t) == 20); +ASSERT_STATIC (sizeof (hb_glyph_info_t) == sizeof (hb_glyph_position_t)); + + +/* + * hb_buffer_t + */ + +struct hb_buffer_t { + hb_object_header_t header; + ASSERT_POD (); + + /* Information about how the text in the buffer should be treated */ + hb_unicode_funcs_t *unicode; /* Unicode functions */ + hb_buffer_flags_t flags; /* BOT / EOT / etc. */ + hb_buffer_cluster_level_t cluster_level; + hb_codepoint_t replacement; /* U+FFFD or something else. */ + + /* Buffer contents */ + hb_buffer_content_type_t content_type; + hb_segment_properties_t props; /* Script, language, direction */ + + bool in_error; /* Allocation failed */ + bool have_output; /* Whether we have an output buffer going on */ + bool have_positions; /* Whether we have positions */ + + unsigned int idx; /* Cursor into ->info and ->pos arrays */ + unsigned int len; /* Length of ->info and ->pos arrays */ + unsigned int out_len; /* Length of ->out array if have_output */ + + unsigned int allocated; /* Length of allocated arrays */ + hb_glyph_info_t *info; + hb_glyph_info_t *out_info; + hb_glyph_position_t *pos; + + inline hb_glyph_info_t &cur (unsigned int i = 0) { return info[idx + i]; } + inline hb_glyph_info_t cur (unsigned int i = 0) const { return info[idx + i]; } + + inline hb_glyph_position_t &cur_pos (unsigned int i = 0) { return pos[idx + i]; } + inline hb_glyph_position_t cur_pos (unsigned int i = 0) const { return pos[idx + i]; } + + inline hb_glyph_info_t &prev (void) { return out_info[out_len - 1]; } + inline hb_glyph_info_t prev (void) const { return info[out_len - 1]; } + + inline bool has_separate_output (void) const { return info != out_info; } + + unsigned int serial; + + /* These reflect current allocations of the bytes in glyph_info_t's var1 and var2. */ + uint8_t allocated_var_bytes[8]; + const char *allocated_var_owner[8]; + + /* Text before / after the main buffer contents. + * Always in Unicode, and ordered outward. + * Index 0 is for "pre-context", 1 for "post-context". */ + static const unsigned int CONTEXT_LENGTH = 5; + hb_codepoint_t context[2][CONTEXT_LENGTH]; + unsigned int context_len[2]; + + + /* Methods */ + + HB_INTERNAL void reset (void); + HB_INTERNAL void clear (void); + + inline unsigned int backtrack_len (void) const + { return have_output? out_len : idx; } + inline unsigned int lookahead_len (void) const + { return len - idx; } + inline unsigned int next_serial (void) { return serial++; } + + HB_INTERNAL void allocate_var (unsigned int byte_i, unsigned int count, const char *owner); + HB_INTERNAL void deallocate_var (unsigned int byte_i, unsigned int count, const char *owner); + HB_INTERNAL void assert_var (unsigned int byte_i, unsigned int count, const char *owner); + HB_INTERNAL void deallocate_var_all (void); + + HB_INTERNAL void add (hb_codepoint_t codepoint, + unsigned int cluster); + HB_INTERNAL void add_info (const hb_glyph_info_t &glyph_info); + + HB_INTERNAL void reverse_range (unsigned int start, unsigned int end); + HB_INTERNAL void reverse (void); + HB_INTERNAL void reverse_clusters (void); + HB_INTERNAL void guess_segment_properties (void); + + HB_INTERNAL void swap_buffers (void); + HB_INTERNAL void remove_output (void); + HB_INTERNAL void clear_output (void); + HB_INTERNAL void clear_positions (void); + + HB_INTERNAL void replace_glyphs (unsigned int num_in, + unsigned int num_out, + const hb_codepoint_t *glyph_data); + + HB_INTERNAL void replace_glyph (hb_codepoint_t glyph_index); + /* Makes a copy of the glyph at idx to output and replace glyph_index */ + HB_INTERNAL void output_glyph (hb_codepoint_t glyph_index); + HB_INTERNAL void output_info (const hb_glyph_info_t &glyph_info); + /* Copies glyph at idx to output but doesn't advance idx */ + HB_INTERNAL void copy_glyph (void); + HB_INTERNAL bool move_to (unsigned int i); /* i is output-buffer index. */ + /* Copies glyph at idx to output and advance idx. + * If there's no output, just advance idx. */ + inline void + next_glyph (void) + { + if (have_output) + { + if (unlikely (out_info != info || out_len != idx)) { + if (unlikely (!make_room_for (1, 1))) return; + out_info[out_len] = info[idx]; + } + out_len++; + } + + idx++; + } + + /* Advance idx without copying to output. */ + inline void skip_glyph (void) { idx++; } + + inline void reset_masks (hb_mask_t mask) + { + for (unsigned int j = 0; j < len; j++) + info[j].mask = mask; + } + inline void add_masks (hb_mask_t mask) + { + for (unsigned int j = 0; j < len; j++) + info[j].mask |= mask; + } + HB_INTERNAL void set_masks (hb_mask_t value, + hb_mask_t mask, + unsigned int cluster_start, + unsigned int cluster_end); + + HB_INTERNAL void merge_clusters (unsigned int start, + unsigned int end) + { + if (end - start < 2) + return; + merge_clusters_impl (start, end); + } + HB_INTERNAL void merge_clusters_impl (unsigned int start, + unsigned int end); + HB_INTERNAL void merge_out_clusters (unsigned int start, + unsigned int end); + /* Merge clusters for deleting current glyph, and skip it. */ + HB_INTERNAL void delete_glyph (void); + + /* Internal methods */ + HB_INTERNAL bool enlarge (unsigned int size); + + inline bool ensure (unsigned int size) + { return likely (!size || size < allocated) ? true : enlarge (size); } + + inline bool ensure_inplace (unsigned int size) + { return likely (!size || size < allocated); } + + HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out); + HB_INTERNAL bool shift_forward (unsigned int count); + + typedef long scratch_buffer_t; + HB_INTERNAL scratch_buffer_t *get_scratch_buffer (unsigned int *size); + + inline void clear_context (unsigned int side) { context_len[side] = 0; } + + HB_INTERNAL void sort (unsigned int start, unsigned int end, int(*compar)(const hb_glyph_info_t *, const hb_glyph_info_t *)); +}; + + +#define HB_BUFFER_XALLOCATE_VAR(b, func, var, owner) \ + b->func (offsetof (hb_glyph_info_t, var) - offsetof(hb_glyph_info_t, var1), \ + sizeof (b->info[0].var), owner) +#define HB_BUFFER_ALLOCATE_VAR(b, var) \ + HB_BUFFER_XALLOCATE_VAR (b, allocate_var, var (), #var) +#define HB_BUFFER_DEALLOCATE_VAR(b, var) \ + HB_BUFFER_XALLOCATE_VAR (b, deallocate_var, var (), #var) +#define HB_BUFFER_ASSERT_VAR(b, var) \ + HB_BUFFER_XALLOCATE_VAR (b, assert_var, var (), #var) + + +#endif /* HB_BUFFER_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-buffer-serialize.cc b/3rdparty/harfbuzz-1.0.6/hb-buffer-serialize.cc new file mode 100644 index 0000000000..7839cbc3f0 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-buffer-serialize.cc @@ -0,0 +1,418 @@ +/* + * Copyright © 2012,2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-buffer-private.hh" + + +static const char *serialize_formats[] = { + "text", + "json", + NULL +}; + +/** + * hb_buffer_serialize_list_formats: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +const char ** +hb_buffer_serialize_list_formats (void) +{ + return serialize_formats; +} + +/** + * hb_buffer_serialize_format_from_string: + * @str: + * @len: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_buffer_serialize_format_t +hb_buffer_serialize_format_from_string (const char *str, int len) +{ + /* Upper-case it. */ + return (hb_buffer_serialize_format_t) (hb_tag_from_string (str, len) & ~0x20202020u); +} + +/** + * hb_buffer_serialize_format_to_string: + * @format: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +const char * +hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format) +{ + switch (format) + { + case HB_BUFFER_SERIALIZE_FORMAT_TEXT: return serialize_formats[0]; + case HB_BUFFER_SERIALIZE_FORMAT_JSON: return serialize_formats[1]; + default: + case HB_BUFFER_SERIALIZE_FORMAT_INVALID: return NULL; + } +} + +static unsigned int +_hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_flags_t flags) +{ + hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL); + hb_glyph_position_t *pos = (flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS) ? + NULL : hb_buffer_get_glyph_positions (buffer, NULL); + + *buf_consumed = 0; + for (unsigned int i = start; i < end; i++) + { + char b[1024]; + char *p = b; + + /* In the following code, we know b is large enough that no overflow can happen. */ + +#define APPEND(s) HB_STMT_START { strcpy (p, s); p += strlen (s); } HB_STMT_END + + if (i) + *p++ = ','; + + *p++ = '{'; + + APPEND ("\"g\":"); + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES)) + { + char g[128]; + hb_font_glyph_to_string (font, info[i].codepoint, g, sizeof (g)); + *p++ = '"'; + for (char *q = g; *q; q++) { + if (*q == '"') + *p++ = '\\'; + *p++ = *q; + } + *p++ = '"'; + } + else + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%u", info[i].codepoint)); + + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS)) { + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"cl\":%u", info[i].cluster)); + } + + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS)) + { + p += snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"dx\":%d,\"dy\":%d", + pos[i].x_offset, pos[i].y_offset); + p += snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"ax\":%d,\"ay\":%d", + pos[i].x_advance, pos[i].y_advance); + } + + if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS) + { + hb_glyph_extents_t extents; + hb_font_get_glyph_extents(font, info[i].codepoint, &extents); + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"xb\":%d,\"yb\":%d", + extents.x_bearing, extents.y_bearing)); + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",\"w\":%d,\"h\":%d", + extents.width, extents.height)); + } + + *p++ = '}'; + + unsigned int l = p - b; + if (buf_size > l) + { + memcpy (buf, b, l); + buf += l; + buf_size -= l; + *buf_consumed += l; + *buf = '\0'; + } else + return i - start; + } + + return end - start; +} + +static unsigned int +_hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, + hb_font_t *font, + hb_buffer_serialize_flags_t flags) +{ + hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL); + hb_glyph_position_t *pos = (flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS) ? + NULL : hb_buffer_get_glyph_positions (buffer, NULL); + + *buf_consumed = 0; + for (unsigned int i = start; i < end; i++) + { + char b[1024]; + char *p = b; + + /* In the following code, we know b is large enough that no overflow can happen. */ + + if (i) + *p++ = '|'; + + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES)) + { + hb_font_glyph_to_string (font, info[i].codepoint, p, 128); + p += strlen (p); + } + else + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%u", info[i].codepoint)); + + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS)) { + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "=%u", info[i].cluster)); + } + + if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS)) + { + if (pos[i].x_offset || pos[i].y_offset) + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "@%d,%d", pos[i].x_offset, pos[i].y_offset)); + + *p++ = '+'; + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%d", pos[i].x_advance)); + if (pos[i].y_advance) + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",%d", pos[i].y_advance)); + } + + if (flags & HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS) + { + hb_glyph_extents_t extents; + hb_font_get_glyph_extents(font, info[i].codepoint, &extents); + p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "<%d,%d,%d,%d>", extents.x_bearing, extents.y_bearing, extents.width, extents.height)); + } + + unsigned int l = p - b; + if (buf_size > l) + { + memcpy (buf, b, l); + buf += l; + buf_size -= l; + *buf_consumed += l; + *buf = '\0'; + } else + return i - start; + } + + return end - start; +} + +/* Returns number of items, starting at start, that were serialized. */ +/** + * hb_buffer_serialize_glyphs: + * @buffer: a buffer. + * @start: + * @end: + * @buf: (array length=buf_size): + * @buf_size: + * @buf_consumed: (out): + * @font: + * @format: + * @flags: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +unsigned int +hb_buffer_serialize_glyphs (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, /* May be NULL */ + hb_font_t *font, /* May be NULL */ + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags) +{ + assert (start <= end && end <= buffer->len); + + unsigned int sconsumed; + if (!buf_consumed) + buf_consumed = &sconsumed; + *buf_consumed = 0; + + assert ((!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID) || + buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS); + + if (unlikely (start == end)) + return 0; + + if (!font) + font = hb_font_get_empty (); + + switch (format) + { + case HB_BUFFER_SERIALIZE_FORMAT_TEXT: + return _hb_buffer_serialize_glyphs_text (buffer, start, end, + buf, buf_size, buf_consumed, + font, flags); + + case HB_BUFFER_SERIALIZE_FORMAT_JSON: + return _hb_buffer_serialize_glyphs_json (buffer, start, end, + buf, buf_size, buf_consumed, + font, flags); + + default: + case HB_BUFFER_SERIALIZE_FORMAT_INVALID: + return 0; + + } +} + + +static hb_bool_t +parse_uint (const char *pp, const char *end, uint32_t *pv) +{ + char buf[32]; + unsigned int len = MIN (ARRAY_LENGTH (buf) - 1, (unsigned int) (end - pp)); + strncpy (buf, pp, len); + buf[len] = '\0'; + + char *p = buf; + char *pend = p; + uint32_t v; + + errno = 0; + v = strtol (p, &pend, 10); + if (errno || p == pend || pend - p != end - pp) + return false; + + *pv = v; + return true; +} + +static hb_bool_t +parse_int (const char *pp, const char *end, int32_t *pv) +{ + char buf[32]; + unsigned int len = MIN (ARRAY_LENGTH (buf) - 1, (unsigned int) (end - pp)); + strncpy (buf, pp, len); + buf[len] = '\0'; + + char *p = buf; + char *pend = p; + int32_t v; + + errno = 0; + v = strtol (p, &pend, 10); + if (errno || p == pend || pend - p != end - pp) + return false; + + *pv = v; + return true; +} + +#include "hb-buffer-deserialize-json.hh" +#include "hb-buffer-deserialize-text.hh" + +/** + * hb_buffer_deserialize_glyphs: + * @buffer: a buffer. + * @buf: (array length=buf_len): + * @buf_len: + * @end_ptr: (out): + * @font: + * @format: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, + const char *buf, + int buf_len, /* -1 means nul-terminated */ + const char **end_ptr, /* May be NULL */ + hb_font_t *font, /* May be NULL */ + hb_buffer_serialize_format_t format) +{ + const char *end; + if (!end_ptr) + end_ptr = &end; + *end_ptr = buf; + + assert ((!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID) || + buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS); + + if (buf_len == -1) + buf_len = strlen (buf); + + if (!buf_len) + { + *end_ptr = buf; + return false; + } + + hb_buffer_set_content_type (buffer, HB_BUFFER_CONTENT_TYPE_GLYPHS); + + if (!font) + font = hb_font_get_empty (); + + switch (format) + { + case HB_BUFFER_SERIALIZE_FORMAT_TEXT: + return _hb_buffer_deserialize_glyphs_text (buffer, + buf, buf_len, end_ptr, + font); + + case HB_BUFFER_SERIALIZE_FORMAT_JSON: + return _hb_buffer_deserialize_glyphs_json (buffer, + buf, buf_len, end_ptr, + font); + + default: + case HB_BUFFER_SERIALIZE_FORMAT_INVALID: + return false; + + } +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-buffer.cc b/3rdparty/harfbuzz-1.0.6/hb-buffer.cc new file mode 100644 index 0000000000..50710dd23e --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-buffer.cc @@ -0,0 +1,1701 @@ +/* + * Copyright © 1998-2004 David Turner and Werner Lemberg + * Copyright © 2004,2007,2009,2010 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Owen Taylor, Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-buffer-private.hh" +#include "hb-utf-private.hh" + + +#ifndef HB_DEBUG_BUFFER +#define HB_DEBUG_BUFFER (HB_DEBUG+0) +#endif + + +/** + * Since: 0.9.7 + **/ +hb_bool_t +hb_segment_properties_equal (const hb_segment_properties_t *a, + const hb_segment_properties_t *b) +{ + return a->direction == b->direction && + a->script == b->script && + a->language == b->language && + a->reserved1 == b->reserved1 && + a->reserved2 == b->reserved2; + +} + +/** + * Since: 0.9.7 + **/ +unsigned int +hb_segment_properties_hash (const hb_segment_properties_t *p) +{ + return (unsigned int) p->direction ^ + (unsigned int) p->script ^ + (intptr_t) (p->language); +} + + + +/* Here is how the buffer works internally: + * + * There are two info pointers: info and out_info. They always have + * the same allocated size, but different lengths. + * + * As an optimization, both info and out_info may point to the + * same piece of memory, which is owned by info. This remains the + * case as long as out_len doesn't exceed i at any time. + * In that case, swap_buffers() is no-op and the glyph operations operate + * mostly in-place. + * + * As soon as out_info gets longer than info, out_info is moved over + * to an alternate buffer (which we reuse the pos buffer for!), and its + * current contents (out_len entries) are copied to the new place. + * This should all remain transparent to the user. swap_buffers() then + * switches info and out_info. + */ + + + +/* Internal API */ + +bool +hb_buffer_t::enlarge (unsigned int size) +{ + if (unlikely (in_error)) + return false; + + unsigned int new_allocated = allocated; + hb_glyph_position_t *new_pos = NULL; + hb_glyph_info_t *new_info = NULL; + bool separate_out = out_info != info; + + if (unlikely (_hb_unsigned_int_mul_overflows (size, sizeof (info[0])))) + goto done; + + while (size >= new_allocated) + new_allocated += (new_allocated >> 1) + 32; + + ASSERT_STATIC (sizeof (info[0]) == sizeof (pos[0])); + if (unlikely (_hb_unsigned_int_mul_overflows (new_allocated, sizeof (info[0])))) + goto done; + + new_pos = (hb_glyph_position_t *) realloc (pos, new_allocated * sizeof (pos[0])); + new_info = (hb_glyph_info_t *) realloc (info, new_allocated * sizeof (info[0])); + +done: + if (unlikely (!new_pos || !new_info)) + in_error = true; + + if (likely (new_pos)) + pos = new_pos; + + if (likely (new_info)) + info = new_info; + + out_info = separate_out ? (hb_glyph_info_t *) pos : info; + if (likely (!in_error)) + allocated = new_allocated; + + return likely (!in_error); +} + +bool +hb_buffer_t::make_room_for (unsigned int num_in, + unsigned int num_out) +{ + if (unlikely (!ensure (out_len + num_out))) return false; + + if (out_info == info && + out_len + num_out > idx + num_in) + { + assert (have_output); + + out_info = (hb_glyph_info_t *) pos; + memcpy (out_info, info, out_len * sizeof (out_info[0])); + } + + return true; +} + +bool +hb_buffer_t::shift_forward (unsigned int count) +{ + assert (have_output); + if (unlikely (!ensure (len + count))) return false; + + memmove (info + idx + count, info + idx, (len - idx) * sizeof (info[0])); + len += count; + idx += count; + + return true; +} + +hb_buffer_t::scratch_buffer_t * +hb_buffer_t::get_scratch_buffer (unsigned int *size) +{ + have_output = false; + have_positions = false; + + out_len = 0; + out_info = info; + + assert ((uintptr_t) pos % sizeof (scratch_buffer_t) == 0); + *size = allocated * sizeof (pos[0]) / sizeof (scratch_buffer_t); + return (scratch_buffer_t *) (void *) pos; +} + + + +/* HarfBuzz-Internal API */ + +void +hb_buffer_t::reset (void) +{ + if (unlikely (hb_object_is_inert (this))) + return; + + hb_unicode_funcs_destroy (unicode); + unicode = hb_unicode_funcs_get_default (); + flags = HB_BUFFER_FLAG_DEFAULT; + replacement = HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT; + + clear (); +} + +void +hb_buffer_t::clear (void) +{ + if (unlikely (hb_object_is_inert (this))) + return; + + hb_segment_properties_t default_props = HB_SEGMENT_PROPERTIES_DEFAULT; + props = default_props; + + content_type = HB_BUFFER_CONTENT_TYPE_INVALID; + in_error = false; + have_output = false; + have_positions = false; + + idx = 0; + len = 0; + out_len = 0; + out_info = info; + + serial = 0; + memset (allocated_var_bytes, 0, sizeof allocated_var_bytes); + memset (allocated_var_owner, 0, sizeof allocated_var_owner); + + memset (context, 0, sizeof context); + memset (context_len, 0, sizeof context_len); +} + +void +hb_buffer_t::add (hb_codepoint_t codepoint, + unsigned int cluster) +{ + hb_glyph_info_t *glyph; + + if (unlikely (!ensure (len + 1))) return; + + glyph = &info[len]; + + memset (glyph, 0, sizeof (*glyph)); + glyph->codepoint = codepoint; + glyph->mask = 1; + glyph->cluster = cluster; + + len++; +} + +void +hb_buffer_t::add_info (const hb_glyph_info_t &glyph_info) +{ + if (unlikely (!ensure (len + 1))) return; + + info[len] = glyph_info; + + len++; +} + + +void +hb_buffer_t::remove_output (void) +{ + if (unlikely (hb_object_is_inert (this))) + return; + + have_output = false; + have_positions = false; + + out_len = 0; + out_info = info; +} + +void +hb_buffer_t::clear_output (void) +{ + if (unlikely (hb_object_is_inert (this))) + return; + + have_output = true; + have_positions = false; + + out_len = 0; + out_info = info; +} + +void +hb_buffer_t::clear_positions (void) +{ + if (unlikely (hb_object_is_inert (this))) + return; + + have_output = false; + have_positions = true; + + out_len = 0; + out_info = info; + + memset (pos, 0, sizeof (pos[0]) * len); +} + +void +hb_buffer_t::swap_buffers (void) +{ + if (unlikely (in_error)) return; + + assert (have_output); + have_output = false; + + if (out_info != info) + { + hb_glyph_info_t *tmp_string; + tmp_string = info; + info = out_info; + out_info = tmp_string; + pos = (hb_glyph_position_t *) out_info; + } + + unsigned int tmp; + tmp = len; + len = out_len; + out_len = tmp; + + idx = 0; +} + + +void +hb_buffer_t::replace_glyphs (unsigned int num_in, + unsigned int num_out, + const uint32_t *glyph_data) +{ + if (unlikely (!make_room_for (num_in, num_out))) return; + + merge_clusters (idx, idx + num_in); + + hb_glyph_info_t orig_info = info[idx]; + hb_glyph_info_t *pinfo = &out_info[out_len]; + for (unsigned int i = 0; i < num_out; i++) + { + *pinfo = orig_info; + pinfo->codepoint = glyph_data[i]; + pinfo++; + } + + idx += num_in; + out_len += num_out; +} + +void +hb_buffer_t::output_glyph (hb_codepoint_t glyph_index) +{ + if (unlikely (!make_room_for (0, 1))) return; + + out_info[out_len] = info[idx]; + out_info[out_len].codepoint = glyph_index; + + out_len++; +} + +void +hb_buffer_t::output_info (const hb_glyph_info_t &glyph_info) +{ + if (unlikely (!make_room_for (0, 1))) return; + + out_info[out_len] = glyph_info; + + out_len++; +} + +void +hb_buffer_t::copy_glyph (void) +{ + if (unlikely (!make_room_for (0, 1))) return; + + out_info[out_len] = info[idx]; + + out_len++; +} + +bool +hb_buffer_t::move_to (unsigned int i) +{ + if (!have_output) + { + assert (i <= len); + idx = i; + return true; + } + + assert (i <= out_len + (len - idx)); + + if (out_len < i) + { + unsigned int count = i - out_len; + if (unlikely (!make_room_for (count, count))) return false; + + memmove (out_info + out_len, info + idx, count * sizeof (out_info[0])); + idx += count; + out_len += count; + } + else if (out_len > i) + { + /* Tricky part: rewinding... */ + unsigned int count = out_len - i; + + if (unlikely (idx < count && !shift_forward (count + 32))) return false; + + assert (idx >= count); + + idx -= count; + out_len -= count; + memmove (info + idx, out_info + out_len, count * sizeof (out_info[0])); + } + + return true; +} + +void +hb_buffer_t::replace_glyph (hb_codepoint_t glyph_index) +{ + if (unlikely (out_info != info || out_len != idx)) { + if (unlikely (!make_room_for (1, 1))) return; + out_info[out_len] = info[idx]; + } + out_info[out_len].codepoint = glyph_index; + + idx++; + out_len++; +} + + +void +hb_buffer_t::set_masks (hb_mask_t value, + hb_mask_t mask, + unsigned int cluster_start, + unsigned int cluster_end) +{ + hb_mask_t not_mask = ~mask; + value &= mask; + + if (!mask) + return; + + if (cluster_start == 0 && cluster_end == (unsigned int)-1) { + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) + info[i].mask = (info[i].mask & not_mask) | value; + return; + } + + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) + if (cluster_start <= info[i].cluster && info[i].cluster < cluster_end) + info[i].mask = (info[i].mask & not_mask) | value; +} + +void +hb_buffer_t::reverse_range (unsigned int start, + unsigned int end) +{ + unsigned int i, j; + + if (end - start < 2) + return; + + for (i = start, j = end - 1; i < j; i++, j--) { + hb_glyph_info_t t; + + t = info[i]; + info[i] = info[j]; + info[j] = t; + } + + if (have_positions) { + for (i = start, j = end - 1; i < j; i++, j--) { + hb_glyph_position_t t; + + t = pos[i]; + pos[i] = pos[j]; + pos[j] = t; + } + } +} + +void +hb_buffer_t::reverse (void) +{ + if (unlikely (!len)) + return; + + reverse_range (0, len); +} + +void +hb_buffer_t::reverse_clusters (void) +{ + unsigned int i, start, count, last_cluster; + + if (unlikely (!len)) + return; + + reverse (); + + count = len; + start = 0; + last_cluster = info[0].cluster; + for (i = 1; i < count; i++) { + if (last_cluster != info[i].cluster) { + reverse_range (start, i); + start = i; + last_cluster = info[i].cluster; + } + } + reverse_range (start, i); +} + +void +hb_buffer_t::merge_clusters_impl (unsigned int start, + unsigned int end) +{ + if (cluster_level == HB_BUFFER_CLUSTER_LEVEL_CHARACTERS) + return; + + unsigned int cluster = info[start].cluster; + + for (unsigned int i = start + 1; i < end; i++) + cluster = MIN (cluster, info[i].cluster); + + /* Extend end */ + while (end < len && info[end - 1].cluster == info[end].cluster) + end++; + + /* Extend start */ + while (idx < start && info[start - 1].cluster == info[start].cluster) + start--; + + /* If we hit the start of buffer, continue in out-buffer. */ + if (idx == start) + for (unsigned int i = out_len; i && out_info[i - 1].cluster == info[start].cluster; i--) + out_info[i - 1].cluster = cluster; + + for (unsigned int i = start; i < end; i++) + info[i].cluster = cluster; +} +void +hb_buffer_t::merge_out_clusters (unsigned int start, + unsigned int end) +{ + if (cluster_level == HB_BUFFER_CLUSTER_LEVEL_CHARACTERS) + return; + + if (unlikely (end - start < 2)) + return; + + unsigned int cluster = out_info[start].cluster; + + for (unsigned int i = start + 1; i < end; i++) + cluster = MIN (cluster, out_info[i].cluster); + + /* Extend start */ + while (start && out_info[start - 1].cluster == out_info[start].cluster) + start--; + + /* Extend end */ + while (end < out_len && out_info[end - 1].cluster == out_info[end].cluster) + end++; + + /* If we hit the end of out-buffer, continue in buffer. */ + if (end == out_len) + for (unsigned int i = idx; i < len && info[i].cluster == out_info[end - 1].cluster; i++) + info[i].cluster = cluster; + + for (unsigned int i = start; i < end; i++) + out_info[i].cluster = cluster; +} +void +hb_buffer_t::delete_glyph () +{ + unsigned int cluster = info[idx].cluster; + if (idx + 1 < len && cluster == info[idx + 1].cluster) + { + /* Cluster survives; do nothing. */ + goto done; + } + + if (out_len) + { + /* Merge cluster backward. */ + if (cluster < out_info[out_len - 1].cluster) + { + unsigned int old_cluster = out_info[out_len - 1].cluster; + for (unsigned i = out_len; i && out_info[i - 1].cluster == old_cluster; i--) + out_info[i - 1].cluster = cluster; + } + goto done; + } + + if (idx + 1 < len) + { + /* Merge cluster forward. */ + merge_clusters (idx, idx + 2); + goto done; + } + +done: + skip_glyph (); +} + +void +hb_buffer_t::guess_segment_properties (void) +{ + assert (content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || + (!len && content_type == HB_BUFFER_CONTENT_TYPE_INVALID)); + + /* If script is set to INVALID, guess from buffer contents */ + if (props.script == HB_SCRIPT_INVALID) { + for (unsigned int i = 0; i < len; i++) { + hb_script_t script = unicode->script (info[i].codepoint); + if (likely (script != HB_SCRIPT_COMMON && + script != HB_SCRIPT_INHERITED && + script != HB_SCRIPT_UNKNOWN)) { + props.script = script; + break; + } + } + } + + /* If direction is set to INVALID, guess from script */ + if (props.direction == HB_DIRECTION_INVALID) { + props.direction = hb_script_get_horizontal_direction (props.script); + } + + /* If language is not set, use default language from locale */ + if (props.language == HB_LANGUAGE_INVALID) { + /* TODO get_default_for_script? using $LANGUAGE */ + props.language = hb_language_get_default (); + } +} + + +static inline void +dump_var_allocation (const hb_buffer_t *buffer) +{ + char buf[80]; + for (unsigned int i = 0; i < 8; i++) + buf[i] = '0' + buffer->allocated_var_bytes[7 - i]; + buf[8] = '\0'; + DEBUG_MSG (BUFFER, buffer, + "Current var allocation: %s", + buf); +} + +void hb_buffer_t::allocate_var (unsigned int byte_i, unsigned int count, const char *owner) +{ + assert (byte_i < 8 && byte_i + count <= 8); + + if (DEBUG_ENABLED (BUFFER)) + dump_var_allocation (this); + DEBUG_MSG (BUFFER, this, + "Allocating var bytes %d..%d for %s", + byte_i, byte_i + count - 1, owner); + + for (unsigned int i = byte_i; i < byte_i + count; i++) { + assert (!allocated_var_bytes[i]); + allocated_var_bytes[i]++; + allocated_var_owner[i] = owner; + } +} + +void hb_buffer_t::deallocate_var (unsigned int byte_i, unsigned int count, const char *owner) +{ + if (DEBUG_ENABLED (BUFFER)) + dump_var_allocation (this); + + DEBUG_MSG (BUFFER, this, + "Deallocating var bytes %d..%d for %s", + byte_i, byte_i + count - 1, owner); + + assert (byte_i < 8 && byte_i + count <= 8); + for (unsigned int i = byte_i; i < byte_i + count; i++) { + assert (allocated_var_bytes[i]); + assert (0 == strcmp (allocated_var_owner[i], owner)); + allocated_var_bytes[i]--; + } +} + +void hb_buffer_t::assert_var (unsigned int byte_i, unsigned int count, const char *owner) +{ + if (DEBUG_ENABLED (BUFFER)) + dump_var_allocation (this); + + DEBUG_MSG (BUFFER, this, + "Asserting var bytes %d..%d for %s", + byte_i, byte_i + count - 1, owner); + + assert (byte_i < 8 && byte_i + count <= 8); + for (unsigned int i = byte_i; i < byte_i + count; i++) { + assert (allocated_var_bytes[i]); + assert (0 == strcmp (allocated_var_owner[i], owner)); + } +} + +void hb_buffer_t::deallocate_var_all (void) +{ + memset (allocated_var_bytes, 0, sizeof (allocated_var_bytes)); + memset (allocated_var_owner, 0, sizeof (allocated_var_owner)); +} + +/* Public API */ + +/** + * hb_buffer_create: (Xconstructor) + * + * + * + * Return value: (transfer full) + * + * Since: 0.9.2 + **/ +hb_buffer_t * +hb_buffer_create (void) +{ + hb_buffer_t *buffer; + + if (!(buffer = hb_object_create ())) + return hb_buffer_get_empty (); + + buffer->reset (); + + return buffer; +} + +/** + * hb_buffer_get_empty: + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_buffer_t * +hb_buffer_get_empty (void) +{ + static const hb_buffer_t _hb_buffer_nil = { + HB_OBJECT_HEADER_STATIC, + + const_cast (&_hb_unicode_funcs_nil), + HB_BUFFER_FLAG_DEFAULT, + HB_BUFFER_CLUSTER_LEVEL_DEFAULT, + HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT, + + HB_BUFFER_CONTENT_TYPE_INVALID, + HB_SEGMENT_PROPERTIES_DEFAULT, + true, /* in_error */ + true, /* have_output */ + true /* have_positions */ + + /* Zero is good enough for everything else. */ + }; + + return const_cast (&_hb_buffer_nil); +} + +/** + * hb_buffer_reference: (skip) + * @buffer: a buffer. + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_buffer_t * +hb_buffer_reference (hb_buffer_t *buffer) +{ + return hb_object_reference (buffer); +} + +/** + * hb_buffer_destroy: (skip) + * @buffer: a buffer. + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_destroy (hb_buffer_t *buffer) +{ + if (!hb_object_destroy (buffer)) return; + + hb_unicode_funcs_destroy (buffer->unicode); + + free (buffer->info); + free (buffer->pos); + + free (buffer); +} + +/** + * hb_buffer_set_user_data: (skip) + * @buffer: a buffer. + * @key: + * @data: + * @destroy: + * @replace: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_buffer_set_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + return hb_object_set_user_data (buffer, key, data, destroy, replace); +} + +/** + * hb_buffer_get_user_data: (skip) + * @buffer: a buffer. + * @key: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +void * +hb_buffer_get_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key) +{ + return hb_object_get_user_data (buffer, key); +} + + +/** + * hb_buffer_set_content_type: + * @buffer: a buffer. + * @content_type: + * + * + * + * Since: 0.9.5 + **/ +void +hb_buffer_set_content_type (hb_buffer_t *buffer, + hb_buffer_content_type_t content_type) +{ + buffer->content_type = content_type; +} + +/** + * hb_buffer_get_content_type: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.5 + **/ +hb_buffer_content_type_t +hb_buffer_get_content_type (hb_buffer_t *buffer) +{ + return buffer->content_type; +} + + +/** + * hb_buffer_set_unicode_funcs: + * @buffer: a buffer. + * @unicode_funcs: + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, + hb_unicode_funcs_t *unicode_funcs) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + if (!unicode_funcs) + unicode_funcs = hb_unicode_funcs_get_default (); + + + hb_unicode_funcs_reference (unicode_funcs); + hb_unicode_funcs_destroy (buffer->unicode); + buffer->unicode = unicode_funcs; +} + +/** + * hb_buffer_get_unicode_funcs: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_unicode_funcs_t * +hb_buffer_get_unicode_funcs (hb_buffer_t *buffer) +{ + return buffer->unicode; +} + +/** + * hb_buffer_set_direction: + * @buffer: a buffer. + * @direction: + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_set_direction (hb_buffer_t *buffer, + hb_direction_t direction) + +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->props.direction = direction; +} + +/** + * hb_buffer_get_direction: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_direction_t +hb_buffer_get_direction (hb_buffer_t *buffer) +{ + return buffer->props.direction; +} + +/** + * hb_buffer_set_script: + * @buffer: a buffer. + * @script: + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_set_script (hb_buffer_t *buffer, + hb_script_t script) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->props.script = script; +} + +/** + * hb_buffer_get_script: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_script_t +hb_buffer_get_script (hb_buffer_t *buffer) +{ + return buffer->props.script; +} + +/** + * hb_buffer_set_language: + * @buffer: a buffer. + * @language: + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_set_language (hb_buffer_t *buffer, + hb_language_t language) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->props.language = language; +} + +/** + * hb_buffer_get_language: + * @buffer: a buffer. + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +hb_language_t +hb_buffer_get_language (hb_buffer_t *buffer) +{ + return buffer->props.language; +} + +/** + * hb_buffer_set_segment_properties: + * @buffer: a buffer. + * @props: + * + * + * + * Since: 0.9.7 + **/ +void +hb_buffer_set_segment_properties (hb_buffer_t *buffer, + const hb_segment_properties_t *props) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->props = *props; +} + +/** + * hb_buffer_get_segment_properties: + * @buffer: a buffer. + * @props: (out): + * + * + * + * Since: 0.9.7 + **/ +void +hb_buffer_get_segment_properties (hb_buffer_t *buffer, + hb_segment_properties_t *props) +{ + *props = buffer->props; +} + + +/** + * hb_buffer_set_flags: + * @buffer: a buffer. + * @flags: + * + * + * + * Since: 0.9.7 + **/ +void +hb_buffer_set_flags (hb_buffer_t *buffer, + hb_buffer_flags_t flags) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->flags = flags; +} + +/** + * hb_buffer_get_flags: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.7 + **/ +hb_buffer_flags_t +hb_buffer_get_flags (hb_buffer_t *buffer) +{ + return buffer->flags; +} + +/** + * hb_buffer_set_cluster_level: + * @buffer: a buffer. + * @cluster_level: + * + * + * + * Since: 0.9.42 + **/ +void +hb_buffer_set_cluster_level (hb_buffer_t *buffer, + hb_buffer_cluster_level_t cluster_level) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->cluster_level = cluster_level; +} + +/** + * hb_buffer_get_cluster_level: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.42 + **/ +hb_buffer_cluster_level_t +hb_buffer_get_cluster_level (hb_buffer_t *buffer) +{ + return buffer->cluster_level; +} + + +/** + * hb_buffer_set_replacement_codepoint: + * @buffer: a buffer. + * @replacement: + * + * + * + * Since: 0.9.31 + **/ +void +hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, + hb_codepoint_t replacement) +{ + if (unlikely (hb_object_is_inert (buffer))) + return; + + buffer->replacement = replacement; +} + +/** + * hb_buffer_get_replacement_codepoint: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.31 + **/ +hb_codepoint_t +hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer) +{ + return buffer->replacement; +} + + +/** + * hb_buffer_reset: + * @buffer: a buffer. + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_reset (hb_buffer_t *buffer) +{ + buffer->reset (); +} + +/** + * hb_buffer_clear_contents: + * @buffer: a buffer. + * + * + * + * Since: 0.9.11 + **/ +void +hb_buffer_clear_contents (hb_buffer_t *buffer) +{ + buffer->clear (); +} + +/** + * hb_buffer_pre_allocate: + * @buffer: a buffer. + * @size: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size) +{ + return buffer->ensure (size); +} + +/** + * hb_buffer_allocation_successful: + * @buffer: a buffer. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_buffer_allocation_successful (hb_buffer_t *buffer) +{ + return !buffer->in_error; +} + +/** + * hb_buffer_add: + * @buffer: a buffer. + * @codepoint: + * @cluster: + * + * + * + * Since: 0.9.7 + **/ +void +hb_buffer_add (hb_buffer_t *buffer, + hb_codepoint_t codepoint, + unsigned int cluster) +{ + buffer->add (codepoint, cluster); + buffer->clear_context (1); +} + +/** + * hb_buffer_set_length: + * @buffer: a buffer. + * @length: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_buffer_set_length (hb_buffer_t *buffer, + unsigned int length) +{ + if (unlikely (hb_object_is_inert (buffer))) + return length == 0; + + if (!buffer->ensure (length)) + return false; + + /* Wipe the new space */ + if (length > buffer->len) { + memset (buffer->info + buffer->len, 0, sizeof (buffer->info[0]) * (length - buffer->len)); + if (buffer->have_positions) + memset (buffer->pos + buffer->len, 0, sizeof (buffer->pos[0]) * (length - buffer->len)); + } + + buffer->len = length; + + if (!length) + { + buffer->content_type = HB_BUFFER_CONTENT_TYPE_INVALID; + buffer->clear_context (0); + } + buffer->clear_context (1); + + return true; +} + +/** + * hb_buffer_get_length: + * @buffer: a buffer. + * + * Returns the number of items in the buffer. + * + * Return value: buffer length. + * + * Since: 0.9.2 + **/ +unsigned int +hb_buffer_get_length (hb_buffer_t *buffer) +{ + return buffer->len; +} + +/** + * hb_buffer_get_glyph_infos: + * @buffer: a buffer. + * @length: (out): output array length. + * + * Returns buffer glyph information array. Returned pointer + * is valid as long as buffer contents are not modified. + * + * Return value: (transfer none) (array length=length): buffer glyph information array. + * + * Since: 0.9.2 + **/ +hb_glyph_info_t * +hb_buffer_get_glyph_infos (hb_buffer_t *buffer, + unsigned int *length) +{ + if (length) + *length = buffer->len; + + return (hb_glyph_info_t *) buffer->info; +} + +/** + * hb_buffer_get_glyph_positions: + * @buffer: a buffer. + * @length: (out): output length. + * + * Returns buffer glyph position array. Returned pointer + * is valid as long as buffer contents are not modified. + * + * Return value: (transfer none) (array length=length): buffer glyph position array. + * + * Since: 0.9.2 + **/ +hb_glyph_position_t * +hb_buffer_get_glyph_positions (hb_buffer_t *buffer, + unsigned int *length) +{ + if (!buffer->have_positions) + buffer->clear_positions (); + + if (length) + *length = buffer->len; + + return (hb_glyph_position_t *) buffer->pos; +} + +/** + * hb_buffer_reverse: + * @buffer: a buffer. + * + * Reverses buffer contents. + * + * Since: 0.9.2 + **/ +void +hb_buffer_reverse (hb_buffer_t *buffer) +{ + buffer->reverse (); +} + +/** + * hb_buffer_reverse_range: + * @buffer: a buffer. + * @start: start index. + * @end: end index. + * + * Reverses buffer contents between start to end. + * + * Since: 0.9.41 + **/ +void +hb_buffer_reverse_range (hb_buffer_t *buffer, + unsigned int start, unsigned int end) +{ + buffer->reverse_range (start, end); +} + +/** + * hb_buffer_reverse_clusters: + * @buffer: a buffer. + * + * Reverses buffer clusters. That is, the buffer contents are + * reversed, then each cluster (consecutive items having the + * same cluster number) are reversed again. + * + * Since: 0.9.2 + **/ +void +hb_buffer_reverse_clusters (hb_buffer_t *buffer) +{ + buffer->reverse_clusters (); +} + +/** + * hb_buffer_guess_segment_properties: + * @buffer: a buffer. + * + * Sets unset buffer segment properties based on buffer Unicode + * contents. If buffer is not empty, it must have content type + * %HB_BUFFER_CONTENT_TYPE_UNICODE. + * + * If buffer script is not set (ie. is %HB_SCRIPT_INVALID), it + * will be set to the Unicode script of the first character in + * the buffer that has a script other than %HB_SCRIPT_COMMON, + * %HB_SCRIPT_INHERITED, and %HB_SCRIPT_UNKNOWN. + * + * Next, if buffer direction is not set (ie. is %HB_DIRECTION_INVALID), + * it will be set to the natural horizontal direction of the + * buffer script as returned by hb_script_get_horizontal_direction(). + * + * Finally, if buffer language is not set (ie. is %HB_LANGUAGE_INVALID), + * it will be set to the process's default language as returned by + * hb_language_get_default(). This may change in the future by + * taking buffer script into consideration when choosing a language. + * + * Since: 0.9.7 + **/ +void +hb_buffer_guess_segment_properties (hb_buffer_t *buffer) +{ + buffer->guess_segment_properties (); +} + +template +static inline void +hb_buffer_add_utf (hb_buffer_t *buffer, + const typename utf_t::codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + typedef typename utf_t::codepoint_t T; + const hb_codepoint_t replacement = buffer->replacement; + + assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_UNICODE || + (!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID)); + + if (unlikely (hb_object_is_inert (buffer))) + return; + + if (text_length == -1) + text_length = utf_t::strlen (text); + + if (item_length == -1) + item_length = text_length - item_offset; + + buffer->ensure (buffer->len + item_length * sizeof (T) / 4); + + /* If buffer is empty and pre-context provided, install it. + * This check is written this way, to make sure people can + * provide pre-context in one add_utf() call, then provide + * text in a follow-up call. See: + * + * https://bugzilla.mozilla.org/show_bug.cgi?id=801410#c13 + */ + if (!buffer->len && item_offset > 0) + { + /* Add pre-context */ + buffer->clear_context (0); + const T *prev = text + item_offset; + const T *start = text; + while (start < prev && buffer->context_len[0] < buffer->CONTEXT_LENGTH) + { + hb_codepoint_t u; + prev = utf_t::prev (prev, start, &u, replacement); + buffer->context[0][buffer->context_len[0]++] = u; + } + } + + const T *next = text + item_offset; + const T *end = next + item_length; + while (next < end) + { + hb_codepoint_t u; + const T *old_next = next; + next = utf_t::next (next, end, &u, replacement); + buffer->add (u, old_next - (const T *) text); + } + + /* Add post-context */ + buffer->clear_context (1); + end = text + text_length; + while (next < end && buffer->context_len[1] < buffer->CONTEXT_LENGTH) + { + hb_codepoint_t u; + next = utf_t::next (next, end, &u, replacement); + buffer->context[1][buffer->context_len[1]++] = u; + } + + buffer->content_type = HB_BUFFER_CONTENT_TYPE_UNICODE; +} + +/** + * hb_buffer_add_utf8: + * @buffer: a buffer. + * @text: (array length=text_length) (element-type uint8_t): + * @text_length: + * @item_offset: + * @item_length: + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_add_utf8 (hb_buffer_t *buffer, + const char *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + hb_buffer_add_utf (buffer, (const uint8_t *) text, text_length, item_offset, item_length); +} + +/** + * hb_buffer_add_utf16: + * @buffer: a buffer. + * @text: (array length=text_length): + * @text_length: + * @item_offset: + * @item_length: + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_add_utf16 (hb_buffer_t *buffer, + const uint16_t *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); +} + +/** + * hb_buffer_add_utf32: + * @buffer: a buffer. + * @text: (array length=text_length): + * @text_length: + * @item_offset: + * @item_length: + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_add_utf32 (hb_buffer_t *buffer, + const uint32_t *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + hb_buffer_add_utf > (buffer, text, text_length, item_offset, item_length); +} + +/** + * hb_buffer_add_latin1: + * @buffer: a buffer. + * @text: (array length=text_length) (element-type uint8_t): + * @text_length: + * @item_offset: + * @item_length: + * + * + * + * Since: 0.9.39 + **/ +void +hb_buffer_add_latin1 (hb_buffer_t *buffer, + const uint8_t *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + hb_buffer_add_utf (buffer, text, text_length, item_offset, item_length); +} + +/** + * hb_buffer_add_codepoints: + * @buffer: a buffer. + * @text: (array length=text_length): + * @text_length: + * @item_offset: + * @item_length: + * + * + * + * Since: 0.9.31 + **/ +void +hb_buffer_add_codepoints (hb_buffer_t *buffer, + const hb_codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length) +{ + hb_buffer_add_utf > (buffer, text, text_length, item_offset, item_length); +} + + +static int +compare_info_codepoint (const hb_glyph_info_t *pa, + const hb_glyph_info_t *pb) +{ + return (int) pb->codepoint - (int) pa->codepoint; +} + +static inline void +normalize_glyphs_cluster (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + bool backward) +{ + hb_glyph_position_t *pos = buffer->pos; + + /* Total cluster advance */ + hb_position_t total_x_advance = 0, total_y_advance = 0; + for (unsigned int i = start; i < end; i++) + { + total_x_advance += pos[i].x_advance; + total_y_advance += pos[i].y_advance; + } + + hb_position_t x_advance = 0, y_advance = 0; + for (unsigned int i = start; i < end; i++) + { + pos[i].x_offset += x_advance; + pos[i].y_offset += y_advance; + + x_advance += pos[i].x_advance; + y_advance += pos[i].y_advance; + + pos[i].x_advance = 0; + pos[i].y_advance = 0; + } + + if (backward) + { + /* Transfer all cluster advance to the last glyph. */ + pos[end - 1].x_advance = total_x_advance; + pos[end - 1].y_advance = total_y_advance; + + hb_stable_sort (buffer->info + start, end - start - 1, compare_info_codepoint, buffer->pos + start); + } else { + /* Transfer all cluster advance to the first glyph. */ + pos[start].x_advance += total_x_advance; + pos[start].y_advance += total_y_advance; + for (unsigned int i = start + 1; i < end; i++) { + pos[i].x_offset -= total_x_advance; + pos[i].y_offset -= total_y_advance; + } + hb_stable_sort (buffer->info + start + 1, end - start - 1, compare_info_codepoint, buffer->pos + start + 1); + } +} + +/** + * hb_buffer_normalize_glyphs: + * @buffer: a buffer. + * + * + * + * Since: 0.9.2 + **/ +void +hb_buffer_normalize_glyphs (hb_buffer_t *buffer) +{ + assert (buffer->have_positions); + assert (buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS); + + bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); + + unsigned int count = buffer->len; + if (unlikely (!count)) return; + hb_glyph_info_t *info = buffer->info; + + unsigned int start = 0; + unsigned int end; + for (end = start + 1; end < count; end++) + if (info[start].cluster != info[end].cluster) { + normalize_glyphs_cluster (buffer, start, end, backward); + start = end; + } + normalize_glyphs_cluster (buffer, start, end, backward); +} + +void +hb_buffer_t::sort (unsigned int start, unsigned int end, int(*compar)(const hb_glyph_info_t *, const hb_glyph_info_t *)) +{ + assert (!have_positions); + for (unsigned int i = start + 1; i < end; i++) + { + unsigned int j = i; + while (j > start && compar (&info[j - 1], &info[i]) > 0) + j--; + if (i == j) + continue; + /* Move item i to occupy place for item j, shift what's in between. */ + merge_clusters (j, i + 1); + { + hb_glyph_info_t t = info[i]; + memmove (&info[j + 1], &info[j], (i - j) * sizeof (hb_glyph_info_t)); + info[j] = t; + } + } +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-buffer.h b/3rdparty/harfbuzz-1.0.6/hb-buffer.h new file mode 100644 index 0000000000..bb89dc3de7 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-buffer.h @@ -0,0 +1,378 @@ +/* + * Copyright © 1998-2004 David Turner and Werner Lemberg + * Copyright © 2004,2007,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Owen Taylor, Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include instead." +#endif + +#ifndef HB_BUFFER_H +#define HB_BUFFER_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + + +typedef struct hb_glyph_info_t { + hb_codepoint_t codepoint; + hb_mask_t mask; + uint32_t cluster; + + /*< private >*/ + hb_var_int_t var1; + hb_var_int_t var2; +} hb_glyph_info_t; + +typedef struct hb_glyph_position_t { + hb_position_t x_advance; + hb_position_t y_advance; + hb_position_t x_offset; + hb_position_t y_offset; + + /*< private >*/ + hb_var_int_t var; +} hb_glyph_position_t; + + +typedef struct hb_segment_properties_t { + hb_direction_t direction; + hb_script_t script; + hb_language_t language; + /*< private >*/ + void *reserved1; + void *reserved2; +} hb_segment_properties_t; + +#define HB_SEGMENT_PROPERTIES_DEFAULT {HB_DIRECTION_INVALID, \ + HB_SCRIPT_INVALID, \ + HB_LANGUAGE_INVALID, \ + NULL, \ + NULL} + +hb_bool_t +hb_segment_properties_equal (const hb_segment_properties_t *a, + const hb_segment_properties_t *b); + +unsigned int +hb_segment_properties_hash (const hb_segment_properties_t *p); + + + +/* + * hb_buffer_t + */ + +typedef struct hb_buffer_t hb_buffer_t; + +hb_buffer_t * +hb_buffer_create (void); + +hb_buffer_t * +hb_buffer_get_empty (void); + +hb_buffer_t * +hb_buffer_reference (hb_buffer_t *buffer); + +void +hb_buffer_destroy (hb_buffer_t *buffer); + +hb_bool_t +hb_buffer_set_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + +void * +hb_buffer_get_user_data (hb_buffer_t *buffer, + hb_user_data_key_t *key); + + +typedef enum { + HB_BUFFER_CONTENT_TYPE_INVALID = 0, + HB_BUFFER_CONTENT_TYPE_UNICODE, + HB_BUFFER_CONTENT_TYPE_GLYPHS +} hb_buffer_content_type_t; + +void +hb_buffer_set_content_type (hb_buffer_t *buffer, + hb_buffer_content_type_t content_type); + +hb_buffer_content_type_t +hb_buffer_get_content_type (hb_buffer_t *buffer); + + +void +hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, + hb_unicode_funcs_t *unicode_funcs); + +hb_unicode_funcs_t * +hb_buffer_get_unicode_funcs (hb_buffer_t *buffer); + +void +hb_buffer_set_direction (hb_buffer_t *buffer, + hb_direction_t direction); + +hb_direction_t +hb_buffer_get_direction (hb_buffer_t *buffer); + +void +hb_buffer_set_script (hb_buffer_t *buffer, + hb_script_t script); + +hb_script_t +hb_buffer_get_script (hb_buffer_t *buffer); + +void +hb_buffer_set_language (hb_buffer_t *buffer, + hb_language_t language); + + +hb_language_t +hb_buffer_get_language (hb_buffer_t *buffer); + +void +hb_buffer_set_segment_properties (hb_buffer_t *buffer, + const hb_segment_properties_t *props); + +void +hb_buffer_get_segment_properties (hb_buffer_t *buffer, + hb_segment_properties_t *props); + +void +hb_buffer_guess_segment_properties (hb_buffer_t *buffer); + + +/* + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_FLAG_BOT = 0x00000001u, /* Beginning-of-text */ + HB_BUFFER_FLAG_EOT = 0x00000002u, /* End-of-text */ + HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES = 0x00000004u +} hb_buffer_flags_t; + +void +hb_buffer_set_flags (hb_buffer_t *buffer, + hb_buffer_flags_t flags); + +hb_buffer_flags_t +hb_buffer_get_flags (hb_buffer_t *buffer); + +/* + * Since: 0.9.42 + */ +typedef enum { + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES = 0, + HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS = 1, + HB_BUFFER_CLUSTER_LEVEL_CHARACTERS = 2, + HB_BUFFER_CLUSTER_LEVEL_DEFAULT = HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES +} hb_buffer_cluster_level_t; + +void +hb_buffer_set_cluster_level (hb_buffer_t *buffer, + hb_buffer_cluster_level_t cluster_level); + +hb_buffer_cluster_level_t +hb_buffer_get_cluster_level (hb_buffer_t *buffer); + +#define HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT 0xFFFDu + +/* Sets codepoint used to replace invalid UTF-8/16/32 entries. + * Default is 0xFFFDu. */ +void +hb_buffer_set_replacement_codepoint (hb_buffer_t *buffer, + hb_codepoint_t replacement); + +hb_codepoint_t +hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer); + + +/* Resets the buffer. Afterwards it's as if it was just created, + * except that it has a larger buffer allocated perhaps... */ +void +hb_buffer_reset (hb_buffer_t *buffer); + +/* Like reset, but does NOT clear unicode_funcs and replacement_codepoint. */ +void +hb_buffer_clear_contents (hb_buffer_t *buffer); + +/* Returns false if allocation failed */ +hb_bool_t +hb_buffer_pre_allocate (hb_buffer_t *buffer, + unsigned int size); + + +/* Returns false if allocation has failed before */ +hb_bool_t +hb_buffer_allocation_successful (hb_buffer_t *buffer); + +void +hb_buffer_reverse (hb_buffer_t *buffer); + +void +hb_buffer_reverse_range (hb_buffer_t *buffer, + unsigned int start, unsigned int end); + +void +hb_buffer_reverse_clusters (hb_buffer_t *buffer); + + +/* Filling the buffer in */ + +void +hb_buffer_add (hb_buffer_t *buffer, + hb_codepoint_t codepoint, + unsigned int cluster); + +void +hb_buffer_add_utf8 (hb_buffer_t *buffer, + const char *text, + int text_length, + unsigned int item_offset, + int item_length); + +void +hb_buffer_add_utf16 (hb_buffer_t *buffer, + const uint16_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +void +hb_buffer_add_utf32 (hb_buffer_t *buffer, + const uint32_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +/* Allows only access to first 256 Unicode codepoints. */ +void +hb_buffer_add_latin1 (hb_buffer_t *buffer, + const uint8_t *text, + int text_length, + unsigned int item_offset, + int item_length); + +/* Like add_utf32 but does NOT check for invalid Unicode codepoints. */ +void +hb_buffer_add_codepoints (hb_buffer_t *buffer, + const hb_codepoint_t *text, + int text_length, + unsigned int item_offset, + int item_length); + + +/* Clears any new items added at the end */ +hb_bool_t +hb_buffer_set_length (hb_buffer_t *buffer, + unsigned int length); + +/* Return value valid as long as buffer not modified */ +unsigned int +hb_buffer_get_length (hb_buffer_t *buffer); + +/* Getting glyphs out of the buffer */ + +/* Return value valid as long as buffer not modified */ +hb_glyph_info_t * +hb_buffer_get_glyph_infos (hb_buffer_t *buffer, + unsigned int *length); + +/* Return value valid as long as buffer not modified */ +hb_glyph_position_t * +hb_buffer_get_glyph_positions (hb_buffer_t *buffer, + unsigned int *length); + + +/* Reorders a glyph buffer to have canonical in-cluster glyph order / position. + * The resulting clusters should behave identical to pre-reordering clusters. + * NOTE: This has nothing to do with Unicode normalization. */ +void +hb_buffer_normalize_glyphs (hb_buffer_t *buffer); + + +/* + * Serialize + */ + +/* + * Since: 0.9.20 + */ +typedef enum { /*< flags >*/ + HB_BUFFER_SERIALIZE_FLAG_DEFAULT = 0x00000000u, + HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS = 0x00000001u, + HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS = 0x00000002u, + HB_BUFFER_SERIALIZE_FLAG_NO_GLYPH_NAMES = 0x00000004u, + HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS = 0x00000008u +} hb_buffer_serialize_flags_t; + +typedef enum { + HB_BUFFER_SERIALIZE_FORMAT_TEXT = HB_TAG('T','E','X','T'), + HB_BUFFER_SERIALIZE_FORMAT_JSON = HB_TAG('J','S','O','N'), + HB_BUFFER_SERIALIZE_FORMAT_INVALID = HB_TAG_NONE +} hb_buffer_serialize_format_t; + +/* len=-1 means str is NUL-terminated. */ +hb_buffer_serialize_format_t +hb_buffer_serialize_format_from_string (const char *str, int len); + +const char * +hb_buffer_serialize_format_to_string (hb_buffer_serialize_format_t format); + +const char ** +hb_buffer_serialize_list_formats (void); + +/* Returns number of items, starting at start, that were serialized. */ +unsigned int +hb_buffer_serialize_glyphs (hb_buffer_t *buffer, + unsigned int start, + unsigned int end, + char *buf, + unsigned int buf_size, + unsigned int *buf_consumed, /* May be NULL */ + hb_font_t *font, /* May be NULL */ + hb_buffer_serialize_format_t format, + hb_buffer_serialize_flags_t flags); + +hb_bool_t +hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, + const char *buf, + int buf_len, /* -1 means nul-terminated */ + const char **end_ptr, /* May be NULL */ + hb_font_t *font, /* May be NULL */ + hb_buffer_serialize_format_t format); + + +HB_END_DECLS + +#endif /* HB_BUFFER_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-cache-private.hh b/3rdparty/harfbuzz-1.0.6/hb-cache-private.hh new file mode 100644 index 0000000000..19b70b7e39 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-cache-private.hh @@ -0,0 +1,74 @@ +/* + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_CACHE_PRIVATE_HH +#define HB_CACHE_PRIVATE_HH + +#include "hb-private.hh" + + +/* Implements a lock-free cache for int->int functions. */ + +template +struct hb_cache_t +{ + ASSERT_STATIC (key_bits >= cache_bits); + ASSERT_STATIC (key_bits + value_bits - cache_bits < 8 * sizeof (unsigned int)); + + inline void clear (void) + { + memset (values, 255, sizeof (values)); + } + + inline bool get (unsigned int key, unsigned int *value) + { + unsigned int k = key & ((1<> value_bits) != (key >> cache_bits)) + return false; + *value = v & ((1<> key_bits) || (value >> value_bits))) + return false; /* Overflows */ + unsigned int k = key & ((1<>cache_bits)< hb_cmap_cache_t; +typedef hb_cache_t<16, 24, 8> hb_advance_cache_t; + + +#endif /* HB_CACHE_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-common.cc b/3rdparty/harfbuzz-1.0.6/hb-common.cc new file mode 100644 index 0000000000..e67059d10b --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-common.cc @@ -0,0 +1,593 @@ +/* + * Copyright © 2009,2010 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-private.hh" + +#include "hb-mutex-private.hh" +#include "hb-object-private.hh" + +#include + + +/* hb_options_t */ + +hb_options_union_t _hb_options; + +void +_hb_options_init (void) +{ + hb_options_union_t u; + u.i = 0; + u.opts.initialized = 1; + + char *c = getenv ("HB_OPTIONS"); + u.opts.uniscribe_bug_compatible = c && strstr (c, "uniscribe-bug-compatible"); + + /* This is idempotent and threadsafe. */ + _hb_options = u; +} + + +/* hb_tag_t */ + +/** + * hb_tag_from_string: + * @str: (array length=len) (element-type uint8_t): + * @len: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_tag_t +hb_tag_from_string (const char *str, int len) +{ + char tag[4]; + unsigned int i; + + if (!str || !len || !*str) + return HB_TAG_NONE; + + if (len < 0 || len > 4) + len = 4; + for (i = 0; i < (unsigned) len && str[i]; i++) + tag[i] = str[i]; + for (; i < 4; i++) + tag[i] = ' '; + + return HB_TAG_CHAR4 (tag); +} + +/** + * hb_tag_to_string: + * @tag: + * @buf: (array fixed-size=4): + * + * + * + * Since: 0.9.5 + **/ +void +hb_tag_to_string (hb_tag_t tag, char *buf) +{ + buf[0] = (char) (uint8_t) (tag >> 24); + buf[1] = (char) (uint8_t) (tag >> 16); + buf[2] = (char) (uint8_t) (tag >> 8); + buf[3] = (char) (uint8_t) (tag >> 0); +} + + +/* hb_direction_t */ + +const char direction_strings[][4] = { + "ltr", + "rtl", + "ttb", + "btt" +}; + +/** + * hb_direction_from_string: + * @str: (array length=len) (element-type uint8_t): + * @len: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_direction_t +hb_direction_from_string (const char *str, int len) +{ + if (unlikely (!str || !len || !*str)) + return HB_DIRECTION_INVALID; + + /* Lets match loosely: just match the first letter, such that + * all of "ltr", "left-to-right", etc work! + */ + char c = TOLOWER (str[0]); + for (unsigned int i = 0; i < ARRAY_LENGTH (direction_strings); i++) + if (c == direction_strings[i][0]) + return (hb_direction_t) (HB_DIRECTION_LTR + i); + + return HB_DIRECTION_INVALID; +} + +/** + * hb_direction_to_string: + * @direction: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +const char * +hb_direction_to_string (hb_direction_t direction) +{ + if (likely ((unsigned int) (direction - HB_DIRECTION_LTR) + < ARRAY_LENGTH (direction_strings))) + return direction_strings[direction - HB_DIRECTION_LTR]; + + return "invalid"; +} + + +/* hb_language_t */ + +struct hb_language_impl_t { + const char s[1]; +}; + +static const char canon_map[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '-', 0, 0, + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 0, 0, 0, 0, 0, 0, + '-', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 0, 0, 0, 0, '-', + 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 0, 0, 0, 0, 0 +}; + +static bool +lang_equal (hb_language_t v1, + const void *v2) +{ + const unsigned char *p1 = (const unsigned char *) v1; + const unsigned char *p2 = (const unsigned char *) v2; + + while (*p1 && *p1 == canon_map[*p2]) + p1++, p2++; + + return *p1 == canon_map[*p2]; +} + +#if 0 +static unsigned int +lang_hash (const void *key) +{ + const unsigned char *p = key; + unsigned int h = 0; + while (canon_map[*p]) + { + h = (h << 5) - h + canon_map[*p]; + p++; + } + + return h; +} +#endif + + +struct hb_language_item_t { + + struct hb_language_item_t *next; + hb_language_t lang; + + inline bool operator == (const char *s) const { + return lang_equal (lang, s); + } + + inline hb_language_item_t & operator = (const char *s) { + lang = (hb_language_t) strdup (s); + for (unsigned char *p = (unsigned char *) lang; *p; p++) + *p = canon_map[*p]; + + return *this; + } + + void finish (void) { free ((void *) lang); } +}; + + +/* Thread-safe lock-free language list */ + +static hb_language_item_t *langs; + +#ifdef HB_USE_ATEXIT +static +void free_langs (void) +{ + while (langs) { + hb_language_item_t *next = langs->next; + langs->finish (); + free (langs); + langs = next; + } +} +#endif + +static hb_language_item_t * +lang_find_or_insert (const char *key) +{ +retry: + hb_language_item_t *first_lang = (hb_language_item_t *) hb_atomic_ptr_get (&langs); + + for (hb_language_item_t *lang = first_lang; lang; lang = lang->next) + if (*lang == key) + return lang; + + /* Not found; allocate one. */ + hb_language_item_t *lang = (hb_language_item_t *) calloc (1, sizeof (hb_language_item_t)); + if (unlikely (!lang)) + return NULL; + lang->next = first_lang; + *lang = key; + + if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) { + lang->finish (); + free (lang); + goto retry; + } + +#ifdef HB_USE_ATEXIT + if (!first_lang) + atexit (free_langs); /* First person registers atexit() callback. */ +#endif + + return lang; +} + + +/** + * hb_language_from_string: + * @str: (array length=len) (element-type uint8_t): + * @len: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +hb_language_t +hb_language_from_string (const char *str, int len) +{ + if (!str || !len || !*str) + return HB_LANGUAGE_INVALID; + + hb_language_item_t *item = NULL; + if (len >= 0) + { + /* NUL-terminate it. */ + char strbuf[64]; + len = MIN (len, (int) sizeof (strbuf) - 1); + memcpy (strbuf, str, len); + strbuf[len] = '\0'; + item = lang_find_or_insert (strbuf); + } + else + item = lang_find_or_insert (str); + + return likely (item) ? item->lang : HB_LANGUAGE_INVALID; +} + +/** + * hb_language_to_string: + * @language: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +const char * +hb_language_to_string (hb_language_t language) +{ + /* This is actually NULL-safe! */ + return language->s; +} + +/** + * hb_language_get_default: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +hb_language_t +hb_language_get_default (void) +{ + static hb_language_t default_language = HB_LANGUAGE_INVALID; + + hb_language_t language = (hb_language_t) hb_atomic_ptr_get (&default_language); + if (unlikely (language == HB_LANGUAGE_INVALID)) { + language = hb_language_from_string (setlocale (LC_CTYPE, NULL), -1); + (void) hb_atomic_ptr_cmpexch (&default_language, HB_LANGUAGE_INVALID, language); + } + + return default_language; +} + + +/* hb_script_t */ + +/** + * hb_script_from_iso15924_tag: + * @tag: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_script_t +hb_script_from_iso15924_tag (hb_tag_t tag) +{ + if (unlikely (tag == HB_TAG_NONE)) + return HB_SCRIPT_INVALID; + + /* Be lenient, adjust case (one capital letter followed by three small letters) */ + tag = (tag & 0xDFDFDFDFu) | 0x00202020u; + + switch (tag) { + + /* These graduated from the 'Q' private-area codes, but + * the old code is still aliased by Unicode, and the Qaai + * one in use by ICU. */ + case HB_TAG('Q','a','a','i'): return HB_SCRIPT_INHERITED; + case HB_TAG('Q','a','a','c'): return HB_SCRIPT_COPTIC; + + /* Script variants from http://unicode.org/iso15924/ */ + case HB_TAG('C','y','r','s'): return HB_SCRIPT_CYRILLIC; + case HB_TAG('L','a','t','f'): return HB_SCRIPT_LATIN; + case HB_TAG('L','a','t','g'): return HB_SCRIPT_LATIN; + case HB_TAG('S','y','r','e'): return HB_SCRIPT_SYRIAC; + case HB_TAG('S','y','r','j'): return HB_SCRIPT_SYRIAC; + case HB_TAG('S','y','r','n'): return HB_SCRIPT_SYRIAC; + } + + /* If it looks right, just use the tag as a script */ + if (((uint32_t) tag & 0xE0E0E0E0u) == 0x40606060u) + return (hb_script_t) tag; + + /* Otherwise, return unknown */ + return HB_SCRIPT_UNKNOWN; +} + +/** + * hb_script_from_string: + * @s: (array length=len) (element-type uint8_t): + * @len: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_script_t +hb_script_from_string (const char *s, int len) +{ + return hb_script_from_iso15924_tag (hb_tag_from_string (s, len)); +} + +/** + * hb_script_to_iso15924_tag: + * @script: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_tag_t +hb_script_to_iso15924_tag (hb_script_t script) +{ + return (hb_tag_t) script; +} + +/** + * hb_script_get_horizontal_direction: + * @script: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_direction_t +hb_script_get_horizontal_direction (hb_script_t script) +{ + /* http://goo.gl/x9ilM */ + switch ((hb_tag_t) script) + { + /* Unicode-1.1 additions */ + case HB_SCRIPT_ARABIC: + case HB_SCRIPT_HEBREW: + + /* Unicode-3.0 additions */ + case HB_SCRIPT_SYRIAC: + case HB_SCRIPT_THAANA: + + /* Unicode-4.0 additions */ + case HB_SCRIPT_CYPRIOT: + + /* Unicode-4.1 additions */ + case HB_SCRIPT_KHAROSHTHI: + + /* Unicode-5.0 additions */ + case HB_SCRIPT_PHOENICIAN: + case HB_SCRIPT_NKO: + + /* Unicode-5.1 additions */ + case HB_SCRIPT_LYDIAN: + + /* Unicode-5.2 additions */ + case HB_SCRIPT_AVESTAN: + case HB_SCRIPT_IMPERIAL_ARAMAIC: + case HB_SCRIPT_INSCRIPTIONAL_PAHLAVI: + case HB_SCRIPT_INSCRIPTIONAL_PARTHIAN: + case HB_SCRIPT_OLD_SOUTH_ARABIAN: + case HB_SCRIPT_OLD_TURKIC: + case HB_SCRIPT_SAMARITAN: + + /* Unicode-6.0 additions */ + case HB_SCRIPT_MANDAIC: + + /* Unicode-6.1 additions */ + case HB_SCRIPT_MEROITIC_CURSIVE: + case HB_SCRIPT_MEROITIC_HIEROGLYPHS: + + /* Unicode-7.0 additions */ + case HB_SCRIPT_MANICHAEAN: + case HB_SCRIPT_MENDE_KIKAKUI: + case HB_SCRIPT_NABATAEAN: + case HB_SCRIPT_OLD_NORTH_ARABIAN: + case HB_SCRIPT_PALMYRENE: + case HB_SCRIPT_PSALTER_PAHLAVI: + + /* Unicode-8.0 additions */ + case HB_SCRIPT_OLD_HUNGARIAN: + + return HB_DIRECTION_RTL; + } + + return HB_DIRECTION_LTR; +} + + +/* hb_user_data_array_t */ + +bool +hb_user_data_array_t::set (hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + if (!key) + return false; + + if (replace) { + if (!data && !destroy) { + items.remove (key, lock); + return true; + } + } + hb_user_data_item_t item = {key, data, destroy}; + bool ret = !!items.replace_or_insert (item, lock, replace); + + return ret; +} + +void * +hb_user_data_array_t::get (hb_user_data_key_t *key) +{ + hb_user_data_item_t item = {NULL }; + + return items.find (key, &item, lock) ? item.data : NULL; +} + + +/* hb_version */ + +/** + * hb_version: + * @major: (out): Library major version component. + * @minor: (out): Library minor version component. + * @micro: (out): Library micro version component. + * + * Returns library version as three integer components. + * + * Since: 0.9.2 + **/ +void +hb_version (unsigned int *major, + unsigned int *minor, + unsigned int *micro) +{ + *major = HB_VERSION_MAJOR; + *minor = HB_VERSION_MINOR; + *micro = HB_VERSION_MICRO; +} + +/** + * hb_version_string: + * + * Returns library version as a string with three components. + * + * Return value: library version string. + * + * Since: 0.9.2 + **/ +const char * +hb_version_string (void) +{ + return HB_VERSION_STRING; +} + +/** + * hb_version_atleast: + * @major: + * @minor: + * @micro: + * + * + * + * Return value: + * + * Since: 0.9.30 + **/ +hb_bool_t +hb_version_atleast (unsigned int major, + unsigned int minor, + unsigned int micro) +{ + return HB_VERSION_ATLEAST (major, minor, micro); +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-common.h b/3rdparty/harfbuzz-1.0.6/hb-common.h new file mode 100644 index 0000000000..c291dbbe94 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-common.h @@ -0,0 +1,354 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include instead." +#endif + +#ifndef HB_COMMON_H +#define HB_COMMON_H + +#ifndef HB_BEGIN_DECLS +# ifdef __cplusplus +# define HB_BEGIN_DECLS extern "C" { +# define HB_END_DECLS } +# else /* !__cplusplus */ +# define HB_BEGIN_DECLS +# define HB_END_DECLS +# endif /* !__cplusplus */ +#endif + +#if !defined (HB_DONT_DEFINE_STDINT) + +#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \ + defined (_sgi) || defined (__sun) || defined (sun) || \ + defined (__digital__) || defined (__HP_cc) +# include +#elif defined (_AIX) +# include +/* VS 2010 (_MSC_VER 1600) has stdint.h */ +#elif defined (_MSC_VER) && _MSC_VER < 1600 +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +# include +#endif + +#endif + +HB_BEGIN_DECLS + + +typedef int hb_bool_t; + +typedef uint32_t hb_codepoint_t; +typedef int32_t hb_position_t; +typedef uint32_t hb_mask_t; + +typedef union _hb_var_int_t { + uint32_t u32; + int32_t i32; + uint16_t u16[2]; + int16_t i16[2]; + uint8_t u8[4]; + int8_t i8[4]; +} hb_var_int_t; + + +/* hb_tag_t */ + +typedef uint32_t hb_tag_t; + +#define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4)))) +#define HB_UNTAG(tag) ((uint8_t)((tag)>>24)), ((uint8_t)((tag)>>16)), ((uint8_t)((tag)>>8)), ((uint8_t)(tag)) + +#define HB_TAG_NONE HB_TAG(0,0,0,0) +#define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff) +#define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff) + +/* len=-1 means str is NUL-terminated. */ +hb_tag_t +hb_tag_from_string (const char *str, int len); + +/* buf should have 4 bytes. */ +void +hb_tag_to_string (hb_tag_t tag, char *buf); + + +/* hb_direction_t */ + +typedef enum { + HB_DIRECTION_INVALID = 0, + HB_DIRECTION_LTR = 4, + HB_DIRECTION_RTL, + HB_DIRECTION_TTB, + HB_DIRECTION_BTT +} hb_direction_t; + +/* len=-1 means str is NUL-terminated */ +hb_direction_t +hb_direction_from_string (const char *str, int len); + +const char * +hb_direction_to_string (hb_direction_t direction); + +#define HB_DIRECTION_IS_VALID(dir) ((((unsigned int) (dir)) & ~3U) == 4) +/* Direction must be valid for the following */ +#define HB_DIRECTION_IS_HORIZONTAL(dir) ((((unsigned int) (dir)) & ~1U) == 4) +#define HB_DIRECTION_IS_VERTICAL(dir) ((((unsigned int) (dir)) & ~1U) == 6) +#define HB_DIRECTION_IS_FORWARD(dir) ((((unsigned int) (dir)) & ~2U) == 4) +#define HB_DIRECTION_IS_BACKWARD(dir) ((((unsigned int) (dir)) & ~2U) == 5) +#define HB_DIRECTION_REVERSE(dir) ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) + + +/* hb_language_t */ + +typedef const struct hb_language_impl_t *hb_language_t; + +/* len=-1 means str is NUL-terminated */ +hb_language_t +hb_language_from_string (const char *str, int len); + +const char * +hb_language_to_string (hb_language_t language); + +#define HB_LANGUAGE_INVALID ((hb_language_t) NULL) + +hb_language_t +hb_language_get_default (void); + + +/* hb_script_t */ + +/* http://unicode.org/iso15924/ */ +/* http://goo.gl/x9ilM */ +/* Unicode Character Database property: Script (sc) */ +typedef enum +{ + /*1.1*/ HB_SCRIPT_COMMON = HB_TAG ('Z','y','y','y'), + /*1.1*/ HB_SCRIPT_INHERITED = HB_TAG ('Z','i','n','h'), + /*5.0*/ HB_SCRIPT_UNKNOWN = HB_TAG ('Z','z','z','z'), + + /*1.1*/ HB_SCRIPT_ARABIC = HB_TAG ('A','r','a','b'), + /*1.1*/ HB_SCRIPT_ARMENIAN = HB_TAG ('A','r','m','n'), + /*1.1*/ HB_SCRIPT_BENGALI = HB_TAG ('B','e','n','g'), + /*1.1*/ HB_SCRIPT_CYRILLIC = HB_TAG ('C','y','r','l'), + /*1.1*/ HB_SCRIPT_DEVANAGARI = HB_TAG ('D','e','v','a'), + /*1.1*/ HB_SCRIPT_GEORGIAN = HB_TAG ('G','e','o','r'), + /*1.1*/ HB_SCRIPT_GREEK = HB_TAG ('G','r','e','k'), + /*1.1*/ HB_SCRIPT_GUJARATI = HB_TAG ('G','u','j','r'), + /*1.1*/ HB_SCRIPT_GURMUKHI = HB_TAG ('G','u','r','u'), + /*1.1*/ HB_SCRIPT_HANGUL = HB_TAG ('H','a','n','g'), + /*1.1*/ HB_SCRIPT_HAN = HB_TAG ('H','a','n','i'), + /*1.1*/ HB_SCRIPT_HEBREW = HB_TAG ('H','e','b','r'), + /*1.1*/ HB_SCRIPT_HIRAGANA = HB_TAG ('H','i','r','a'), + /*1.1*/ HB_SCRIPT_KANNADA = HB_TAG ('K','n','d','a'), + /*1.1*/ HB_SCRIPT_KATAKANA = HB_TAG ('K','a','n','a'), + /*1.1*/ HB_SCRIPT_LAO = HB_TAG ('L','a','o','o'), + /*1.1*/ HB_SCRIPT_LATIN = HB_TAG ('L','a','t','n'), + /*1.1*/ HB_SCRIPT_MALAYALAM = HB_TAG ('M','l','y','m'), + /*1.1*/ HB_SCRIPT_ORIYA = HB_TAG ('O','r','y','a'), + /*1.1*/ HB_SCRIPT_TAMIL = HB_TAG ('T','a','m','l'), + /*1.1*/ HB_SCRIPT_TELUGU = HB_TAG ('T','e','l','u'), + /*1.1*/ HB_SCRIPT_THAI = HB_TAG ('T','h','a','i'), + + /*2.0*/ HB_SCRIPT_TIBETAN = HB_TAG ('T','i','b','t'), + + /*3.0*/ HB_SCRIPT_BOPOMOFO = HB_TAG ('B','o','p','o'), + /*3.0*/ HB_SCRIPT_BRAILLE = HB_TAG ('B','r','a','i'), + /*3.0*/ HB_SCRIPT_CANADIAN_SYLLABICS = HB_TAG ('C','a','n','s'), + /*3.0*/ HB_SCRIPT_CHEROKEE = HB_TAG ('C','h','e','r'), + /*3.0*/ HB_SCRIPT_ETHIOPIC = HB_TAG ('E','t','h','i'), + /*3.0*/ HB_SCRIPT_KHMER = HB_TAG ('K','h','m','r'), + /*3.0*/ HB_SCRIPT_MONGOLIAN = HB_TAG ('M','o','n','g'), + /*3.0*/ HB_SCRIPT_MYANMAR = HB_TAG ('M','y','m','r'), + /*3.0*/ HB_SCRIPT_OGHAM = HB_TAG ('O','g','a','m'), + /*3.0*/ HB_SCRIPT_RUNIC = HB_TAG ('R','u','n','r'), + /*3.0*/ HB_SCRIPT_SINHALA = HB_TAG ('S','i','n','h'), + /*3.0*/ HB_SCRIPT_SYRIAC = HB_TAG ('S','y','r','c'), + /*3.0*/ HB_SCRIPT_THAANA = HB_TAG ('T','h','a','a'), + /*3.0*/ HB_SCRIPT_YI = HB_TAG ('Y','i','i','i'), + + /*3.1*/ HB_SCRIPT_DESERET = HB_TAG ('D','s','r','t'), + /*3.1*/ HB_SCRIPT_GOTHIC = HB_TAG ('G','o','t','h'), + /*3.1*/ HB_SCRIPT_OLD_ITALIC = HB_TAG ('I','t','a','l'), + + /*3.2*/ HB_SCRIPT_BUHID = HB_TAG ('B','u','h','d'), + /*3.2*/ HB_SCRIPT_HANUNOO = HB_TAG ('H','a','n','o'), + /*3.2*/ HB_SCRIPT_TAGALOG = HB_TAG ('T','g','l','g'), + /*3.2*/ HB_SCRIPT_TAGBANWA = HB_TAG ('T','a','g','b'), + + /*4.0*/ HB_SCRIPT_CYPRIOT = HB_TAG ('C','p','r','t'), + /*4.0*/ HB_SCRIPT_LIMBU = HB_TAG ('L','i','m','b'), + /*4.0*/ HB_SCRIPT_LINEAR_B = HB_TAG ('L','i','n','b'), + /*4.0*/ HB_SCRIPT_OSMANYA = HB_TAG ('O','s','m','a'), + /*4.0*/ HB_SCRIPT_SHAVIAN = HB_TAG ('S','h','a','w'), + /*4.0*/ HB_SCRIPT_TAI_LE = HB_TAG ('T','a','l','e'), + /*4.0*/ HB_SCRIPT_UGARITIC = HB_TAG ('U','g','a','r'), + + /*4.1*/ HB_SCRIPT_BUGINESE = HB_TAG ('B','u','g','i'), + /*4.1*/ HB_SCRIPT_COPTIC = HB_TAG ('C','o','p','t'), + /*4.1*/ HB_SCRIPT_GLAGOLITIC = HB_TAG ('G','l','a','g'), + /*4.1*/ HB_SCRIPT_KHAROSHTHI = HB_TAG ('K','h','a','r'), + /*4.1*/ HB_SCRIPT_NEW_TAI_LUE = HB_TAG ('T','a','l','u'), + /*4.1*/ HB_SCRIPT_OLD_PERSIAN = HB_TAG ('X','p','e','o'), + /*4.1*/ HB_SCRIPT_SYLOTI_NAGRI = HB_TAG ('S','y','l','o'), + /*4.1*/ HB_SCRIPT_TIFINAGH = HB_TAG ('T','f','n','g'), + + /*5.0*/ HB_SCRIPT_BALINESE = HB_TAG ('B','a','l','i'), + /*5.0*/ HB_SCRIPT_CUNEIFORM = HB_TAG ('X','s','u','x'), + /*5.0*/ HB_SCRIPT_NKO = HB_TAG ('N','k','o','o'), + /*5.0*/ HB_SCRIPT_PHAGS_PA = HB_TAG ('P','h','a','g'), + /*5.0*/ HB_SCRIPT_PHOENICIAN = HB_TAG ('P','h','n','x'), + + /*5.1*/ HB_SCRIPT_CARIAN = HB_TAG ('C','a','r','i'), + /*5.1*/ HB_SCRIPT_CHAM = HB_TAG ('C','h','a','m'), + /*5.1*/ HB_SCRIPT_KAYAH_LI = HB_TAG ('K','a','l','i'), + /*5.1*/ HB_SCRIPT_LEPCHA = HB_TAG ('L','e','p','c'), + /*5.1*/ HB_SCRIPT_LYCIAN = HB_TAG ('L','y','c','i'), + /*5.1*/ HB_SCRIPT_LYDIAN = HB_TAG ('L','y','d','i'), + /*5.1*/ HB_SCRIPT_OL_CHIKI = HB_TAG ('O','l','c','k'), + /*5.1*/ HB_SCRIPT_REJANG = HB_TAG ('R','j','n','g'), + /*5.1*/ HB_SCRIPT_SAURASHTRA = HB_TAG ('S','a','u','r'), + /*5.1*/ HB_SCRIPT_SUNDANESE = HB_TAG ('S','u','n','d'), + /*5.1*/ HB_SCRIPT_VAI = HB_TAG ('V','a','i','i'), + + /*5.2*/ HB_SCRIPT_AVESTAN = HB_TAG ('A','v','s','t'), + /*5.2*/ HB_SCRIPT_BAMUM = HB_TAG ('B','a','m','u'), + /*5.2*/ HB_SCRIPT_EGYPTIAN_HIEROGLYPHS = HB_TAG ('E','g','y','p'), + /*5.2*/ HB_SCRIPT_IMPERIAL_ARAMAIC = HB_TAG ('A','r','m','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PAHLAVI = HB_TAG ('P','h','l','i'), + /*5.2*/ HB_SCRIPT_INSCRIPTIONAL_PARTHIAN = HB_TAG ('P','r','t','i'), + /*5.2*/ HB_SCRIPT_JAVANESE = HB_TAG ('J','a','v','a'), + /*5.2*/ HB_SCRIPT_KAITHI = HB_TAG ('K','t','h','i'), + /*5.2*/ HB_SCRIPT_LISU = HB_TAG ('L','i','s','u'), + /*5.2*/ HB_SCRIPT_MEETEI_MAYEK = HB_TAG ('M','t','e','i'), + /*5.2*/ HB_SCRIPT_OLD_SOUTH_ARABIAN = HB_TAG ('S','a','r','b'), + /*5.2*/ HB_SCRIPT_OLD_TURKIC = HB_TAG ('O','r','k','h'), + /*5.2*/ HB_SCRIPT_SAMARITAN = HB_TAG ('S','a','m','r'), + /*5.2*/ HB_SCRIPT_TAI_THAM = HB_TAG ('L','a','n','a'), + /*5.2*/ HB_SCRIPT_TAI_VIET = HB_TAG ('T','a','v','t'), + + /*6.0*/ HB_SCRIPT_BATAK = HB_TAG ('B','a','t','k'), + /*6.0*/ HB_SCRIPT_BRAHMI = HB_TAG ('B','r','a','h'), + /*6.0*/ HB_SCRIPT_MANDAIC = HB_TAG ('M','a','n','d'), + + /*6.1*/ HB_SCRIPT_CHAKMA = HB_TAG ('C','a','k','m'), + /*6.1*/ HB_SCRIPT_MEROITIC_CURSIVE = HB_TAG ('M','e','r','c'), + /*6.1*/ HB_SCRIPT_MEROITIC_HIEROGLYPHS = HB_TAG ('M','e','r','o'), + /*6.1*/ HB_SCRIPT_MIAO = HB_TAG ('P','l','r','d'), + /*6.1*/ HB_SCRIPT_SHARADA = HB_TAG ('S','h','r','d'), + /*6.1*/ HB_SCRIPT_SORA_SOMPENG = HB_TAG ('S','o','r','a'), + /*6.1*/ HB_SCRIPT_TAKRI = HB_TAG ('T','a','k','r'), + + /* + * Since: 0.9.30 + */ + /*7.0*/ HB_SCRIPT_BASSA_VAH = HB_TAG ('B','a','s','s'), + /*7.0*/ HB_SCRIPT_CAUCASIAN_ALBANIAN = HB_TAG ('A','g','h','b'), + /*7.0*/ HB_SCRIPT_DUPLOYAN = HB_TAG ('D','u','p','l'), + /*7.0*/ HB_SCRIPT_ELBASAN = HB_TAG ('E','l','b','a'), + /*7.0*/ HB_SCRIPT_GRANTHA = HB_TAG ('G','r','a','n'), + /*7.0*/ HB_SCRIPT_KHOJKI = HB_TAG ('K','h','o','j'), + /*7.0*/ HB_SCRIPT_KHUDAWADI = HB_TAG ('S','i','n','d'), + /*7.0*/ HB_SCRIPT_LINEAR_A = HB_TAG ('L','i','n','a'), + /*7.0*/ HB_SCRIPT_MAHAJANI = HB_TAG ('M','a','h','j'), + /*7.0*/ HB_SCRIPT_MANICHAEAN = HB_TAG ('M','a','n','i'), + /*7.0*/ HB_SCRIPT_MENDE_KIKAKUI = HB_TAG ('M','e','n','d'), + /*7.0*/ HB_SCRIPT_MODI = HB_TAG ('M','o','d','i'), + /*7.0*/ HB_SCRIPT_MRO = HB_TAG ('M','r','o','o'), + /*7.0*/ HB_SCRIPT_NABATAEAN = HB_TAG ('N','b','a','t'), + /*7.0*/ HB_SCRIPT_OLD_NORTH_ARABIAN = HB_TAG ('N','a','r','b'), + /*7.0*/ HB_SCRIPT_OLD_PERMIC = HB_TAG ('P','e','r','m'), + /*7.0*/ HB_SCRIPT_PAHAWH_HMONG = HB_TAG ('H','m','n','g'), + /*7.0*/ HB_SCRIPT_PALMYRENE = HB_TAG ('P','a','l','m'), + /*7.0*/ HB_SCRIPT_PAU_CIN_HAU = HB_TAG ('P','a','u','c'), + /*7.0*/ HB_SCRIPT_PSALTER_PAHLAVI = HB_TAG ('P','h','l','p'), + /*7.0*/ HB_SCRIPT_SIDDHAM = HB_TAG ('S','i','d','d'), + /*7.0*/ HB_SCRIPT_TIRHUTA = HB_TAG ('T','i','r','h'), + /*7.0*/ HB_SCRIPT_WARANG_CITI = HB_TAG ('W','a','r','a'), + + /*8.0*/ HB_SCRIPT_AHOM = HB_TAG ('A','h','o','m'), + /*8.0*/ HB_SCRIPT_ANATOLIAN_HIEROGLYPHS = HB_TAG ('H','l','u','w'), + /*8.0*/ HB_SCRIPT_HATRAN = HB_TAG ('H','a','t','r'), + /*8.0*/ HB_SCRIPT_MULTANI = HB_TAG ('M','u','l','t'), + /*8.0*/ HB_SCRIPT_OLD_HUNGARIAN = HB_TAG ('H','u','n','g'), + /*8.0*/ HB_SCRIPT_SIGNWRITING = HB_TAG ('S','g','n','w'), + + /* No script set. */ + HB_SCRIPT_INVALID = HB_TAG_NONE, + + /* Dummy values to ensure any hb_tag_t value can be passed/stored as hb_script_t + * without risking undefined behavior. Include both a signed and unsigned max, + * since technically enums are int, and indeed, hb_script_t ends up being signed. + * See this thread for technicalities: + * + * http://lists.freedesktop.org/archives/harfbuzz/2014-March/004150.html + */ + _HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/ + _HB_SCRIPT_MAX_VALUE_SIGNED = HB_TAG_MAX_SIGNED /*< skip >*/ + +} hb_script_t; + + +/* Script functions */ + +hb_script_t +hb_script_from_iso15924_tag (hb_tag_t tag); + +/* sugar for tag_from_string() then script_from_iso15924_tag */ +/* len=-1 means s is NUL-terminated */ +hb_script_t +hb_script_from_string (const char *s, int len); + +hb_tag_t +hb_script_to_iso15924_tag (hb_script_t script); + +hb_direction_t +hb_script_get_horizontal_direction (hb_script_t script); + + +/* User data */ + +typedef struct hb_user_data_key_t { + /*< private >*/ + char unused; +} hb_user_data_key_t; + +typedef void (*hb_destroy_func_t) (void *user_data); + + +HB_END_DECLS + +#endif /* HB_COMMON_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-coretext.cc b/3rdparty/harfbuzz-1.0.6/hb-coretext.cc new file mode 100644 index 0000000000..13ba5d94ef --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-coretext.cc @@ -0,0 +1,1219 @@ +/* + * Copyright © 2012,2013 Mozilla Foundation. + * Copyright © 2012,2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Mozilla Author(s): Jonathan Kew + * Google Author(s): Behdad Esfahbod + */ + +#define HB_SHAPER coretext +#define hb_coretext_shaper_face_data_t CGFont +#include "hb-shaper-impl-private.hh" + +#include "hb-coretext.h" + + +#ifndef HB_DEBUG_CORETEXT +#define HB_DEBUG_CORETEXT (HB_DEBUG+0) +#endif + + +static void +release_table_data (void *user_data) +{ + CFDataRef cf_data = reinterpret_cast (user_data); + CFRelease(cf_data); +} + +static hb_blob_t * +reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) +{ + CGFontRef cg_font = reinterpret_cast (user_data); + CFDataRef cf_data = CGFontCopyTableForTag (cg_font, tag); + if (unlikely (!cf_data)) + return NULL; + + const char *data = reinterpret_cast (CFDataGetBytePtr (cf_data)); + const size_t length = CFDataGetLength (cf_data); + if (!data || !length) + return NULL; + + return hb_blob_create (data, length, HB_MEMORY_MODE_READONLY, + reinterpret_cast (const_cast<__CFData *> (cf_data)), + release_table_data); +} + +hb_face_t * +hb_coretext_face_create (CGFontRef cg_font) +{ + return hb_face_create_for_tables (reference_table, CGFontRetain (cg_font), (hb_destroy_func_t) CGFontRelease); +} + + +HB_SHAPER_DATA_ENSURE_DECLARE(coretext, face) +HB_SHAPER_DATA_ENSURE_DECLARE(coretext, font) + + +/* + * shaper face data + */ + +static void +release_data (void *info, const void *data, size_t size) +{ + assert (hb_blob_get_length ((hb_blob_t *) info) == size && + hb_blob_get_data ((hb_blob_t *) info, NULL) == data); + + hb_blob_destroy ((hb_blob_t *) info); +} + +hb_coretext_shaper_face_data_t * +_hb_coretext_shaper_face_data_create (hb_face_t *face) +{ + hb_coretext_shaper_face_data_t *data = NULL; + + if (face->destroy == (hb_destroy_func_t) CGFontRelease) + { + data = CGFontRetain ((CGFontRef) face->user_data); + } + else + { + hb_blob_t *blob = hb_face_reference_blob (face); + unsigned int blob_length; + const char *blob_data = hb_blob_get_data (blob, &blob_length); + if (unlikely (!blob_length)) + DEBUG_MSG (CORETEXT, face, "Face has empty blob"); + + CGDataProviderRef provider = CGDataProviderCreateWithData (blob, blob_data, blob_length, &release_data); + if (likely (provider)) + { + data = CGFontCreateWithDataProvider (provider); + CGDataProviderRelease (provider); + } + } + + if (unlikely (!data)) { + DEBUG_MSG (CORETEXT, face, "Face CGFontCreateWithDataProvider() failed"); + } + + return data; +} + +void +_hb_coretext_shaper_face_data_destroy (hb_coretext_shaper_face_data_t *data) +{ + CFRelease (data); +} + +/* + * Since: 0.9.10 + */ +CGFontRef +hb_coretext_face_get_cg_font (hb_face_t *face) +{ + if (unlikely (!hb_coretext_shaper_face_data_ensure (face))) return NULL; + hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + return face_data; +} + + +/* + * shaper font data + */ + +struct hb_coretext_shaper_font_data_t { + CTFontRef ct_font; + CGFloat x_mult, y_mult; /* From CT space to HB space. */ +}; + +hb_coretext_shaper_font_data_t * +_hb_coretext_shaper_font_data_create (hb_font_t *font) +{ + if (unlikely (!hb_coretext_shaper_face_data_ensure (font->face))) return NULL; + + hb_coretext_shaper_font_data_t *data = (hb_coretext_shaper_font_data_t *) calloc (1, sizeof (hb_coretext_shaper_font_data_t)); + if (unlikely (!data)) + return NULL; + + hb_face_t *face = font->face; + hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + + /* Choose a CoreText font size and calculate multipliers to convert to HarfBuzz space. */ + /* TODO: use upem instead of 36? */ + CGFloat font_size = 36.; /* Default... */ + /* No idea if the following is even a good idea. */ + if (font->y_ppem) + font_size = font->y_ppem; + + if (font_size < 0) + font_size = -font_size; + data->x_mult = (CGFloat) font->x_scale / font_size; + data->y_mult = (CGFloat) font->y_scale / font_size; + data->ct_font = CTFontCreateWithGraphicsFont (face_data, font_size, NULL, NULL); + if (unlikely (!data->ct_font)) { + DEBUG_MSG (CORETEXT, font, "Font CTFontCreateWithGraphicsFont() failed"); + free (data); + return NULL; + } + + return data; +} + +void +_hb_coretext_shaper_font_data_destroy (hb_coretext_shaper_font_data_t *data) +{ + CFRelease (data->ct_font); + free (data); +} + + +/* + * shaper shape_plan data + */ + +struct hb_coretext_shaper_shape_plan_data_t {}; + +hb_coretext_shaper_shape_plan_data_t * +_hb_coretext_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, + const hb_feature_t *user_features HB_UNUSED, + unsigned int num_user_features HB_UNUSED) +{ + return (hb_coretext_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; +} + +void +_hb_coretext_shaper_shape_plan_data_destroy (hb_coretext_shaper_shape_plan_data_t *data HB_UNUSED) +{ +} + +CTFontRef +hb_coretext_font_get_ct_font (hb_font_t *font) +{ + if (unlikely (!hb_coretext_shaper_font_data_ensure (font))) return NULL; + hb_coretext_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); + return font_data->ct_font; +} + + +/* + * shaper + */ + +struct feature_record_t { + unsigned int feature; + unsigned int setting; +}; + +struct active_feature_t { + feature_record_t rec; + unsigned int order; + + static int cmp (const active_feature_t *a, const active_feature_t *b) { + return a->rec.feature < b->rec.feature ? -1 : a->rec.feature > b->rec.feature ? 1 : + a->order < b->order ? -1 : a->order > b->order ? 1 : + a->rec.setting < b->rec.setting ? -1 : a->rec.setting > b->rec.setting ? 1 : + 0; + } + bool operator== (const active_feature_t *f) { + return cmp (this, f) == 0; + } +}; + +struct feature_event_t { + unsigned int index; + bool start; + active_feature_t feature; + + static int cmp (const feature_event_t *a, const feature_event_t *b) { + return a->index < b->index ? -1 : a->index > b->index ? 1 : + a->start < b->start ? -1 : a->start > b->start ? 1 : + active_feature_t::cmp (&a->feature, &b->feature); + } +}; + +struct range_record_t { + CTFontRef font; + unsigned int index_first; /* == start */ + unsigned int index_last; /* == end - 1 */ +}; + + +/* The following enum members are added in OS X 10.8. */ +#define kAltHalfWidthTextSelector 6 +#define kAltProportionalTextSelector 5 +#define kAlternateHorizKanaOffSelector 1 +#define kAlternateHorizKanaOnSelector 0 +#define kAlternateKanaType 34 +#define kAlternateVertKanaOffSelector 3 +#define kAlternateVertKanaOnSelector 2 +#define kCaseSensitiveLayoutOffSelector 1 +#define kCaseSensitiveLayoutOnSelector 0 +#define kCaseSensitiveLayoutType 33 +#define kCaseSensitiveSpacingOffSelector 3 +#define kCaseSensitiveSpacingOnSelector 2 +#define kContextualAlternatesOffSelector 1 +#define kContextualAlternatesOnSelector 0 +#define kContextualAlternatesType 36 +#define kContextualLigaturesOffSelector 19 +#define kContextualLigaturesOnSelector 18 +#define kContextualSwashAlternatesOffSelector 5 +#define kContextualSwashAlternatesOnSelector 4 +#define kDefaultLowerCaseSelector 0 +#define kDefaultUpperCaseSelector 0 +#define kHistoricalLigaturesOffSelector 21 +#define kHistoricalLigaturesOnSelector 20 +#define kHojoCharactersSelector 12 +#define kJIS2004CharactersSelector 11 +#define kLowerCasePetiteCapsSelector 2 +#define kLowerCaseSmallCapsSelector 1 +#define kLowerCaseType 37 +#define kMathematicalGreekOffSelector 11 +#define kMathematicalGreekOnSelector 10 +#define kNLCCharactersSelector 13 +#define kQuarterWidthTextSelector 4 +#define kScientificInferiorsSelector 4 +#define kStylisticAltEightOffSelector 17 +#define kStylisticAltEightOnSelector 16 +#define kStylisticAltEighteenOffSelector 37 +#define kStylisticAltEighteenOnSelector 36 +#define kStylisticAltElevenOffSelector 23 +#define kStylisticAltElevenOnSelector 22 +#define kStylisticAltFifteenOffSelector 31 +#define kStylisticAltFifteenOnSelector 30 +#define kStylisticAltFiveOffSelector 11 +#define kStylisticAltFiveOnSelector 10 +#define kStylisticAltFourOffSelector 9 +#define kStylisticAltFourOnSelector 8 +#define kStylisticAltFourteenOffSelector 29 +#define kStylisticAltFourteenOnSelector 28 +#define kStylisticAltNineOffSelector 19 +#define kStylisticAltNineOnSelector 18 +#define kStylisticAltNineteenOffSelector 39 +#define kStylisticAltNineteenOnSelector 38 +#define kStylisticAltOneOffSelector 3 +#define kStylisticAltOneOnSelector 2 +#define kStylisticAltSevenOffSelector 15 +#define kStylisticAltSevenOnSelector 14 +#define kStylisticAltSeventeenOffSelector 35 +#define kStylisticAltSeventeenOnSelector 34 +#define kStylisticAltSixOffSelector 13 +#define kStylisticAltSixOnSelector 12 +#define kStylisticAltSixteenOffSelector 33 +#define kStylisticAltSixteenOnSelector 32 +#define kStylisticAltTenOffSelector 21 +#define kStylisticAltTenOnSelector 20 +#define kStylisticAltThirteenOffSelector 27 +#define kStylisticAltThirteenOnSelector 26 +#define kStylisticAltThreeOffSelector 7 +#define kStylisticAltThreeOnSelector 6 +#define kStylisticAltTwelveOffSelector 25 +#define kStylisticAltTwelveOnSelector 24 +#define kStylisticAltTwentyOffSelector 41 +#define kStylisticAltTwentyOnSelector 40 +#define kStylisticAltTwoOffSelector 5 +#define kStylisticAltTwoOnSelector 4 +#define kStylisticAlternativesType 35 +#define kSwashAlternatesOffSelector 3 +#define kSwashAlternatesOnSelector 2 +#define kThirdWidthTextSelector 3 +#define kTraditionalNamesCharactersSelector 14 +#define kUpperCasePetiteCapsSelector 2 +#define kUpperCaseSmallCapsSelector 1 +#define kUpperCaseType 38 + +/* Table data courtesy of Apple. */ +static const struct feature_mapping_t { + FourCharCode otFeatureTag; + uint16_t aatFeatureType; + uint16_t selectorToEnable; + uint16_t selectorToDisable; +} feature_mappings[] = { + { 'c2pc', kUpperCaseType, kUpperCasePetiteCapsSelector, kDefaultUpperCaseSelector }, + { 'c2sc', kUpperCaseType, kUpperCaseSmallCapsSelector, kDefaultUpperCaseSelector }, + { 'calt', kContextualAlternatesType, kContextualAlternatesOnSelector, kContextualAlternatesOffSelector }, + { 'case', kCaseSensitiveLayoutType, kCaseSensitiveLayoutOnSelector, kCaseSensitiveLayoutOffSelector }, + { 'clig', kLigaturesType, kContextualLigaturesOnSelector, kContextualLigaturesOffSelector }, + { 'cpsp', kCaseSensitiveLayoutType, kCaseSensitiveSpacingOnSelector, kCaseSensitiveSpacingOffSelector }, + { 'cswh', kContextualAlternatesType, kContextualSwashAlternatesOnSelector, kContextualSwashAlternatesOffSelector }, + { 'dlig', kLigaturesType, kRareLigaturesOnSelector, kRareLigaturesOffSelector }, + { 'expt', kCharacterShapeType, kExpertCharactersSelector, 16 }, + { 'frac', kFractionsType, kDiagonalFractionsSelector, kNoFractionsSelector }, + { 'fwid', kTextSpacingType, kMonospacedTextSelector, 7 }, + { 'halt', kTextSpacingType, kAltHalfWidthTextSelector, 7 }, + { 'hist', kLigaturesType, kHistoricalLigaturesOnSelector, kHistoricalLigaturesOffSelector }, + { 'hkna', kAlternateKanaType, kAlternateHorizKanaOnSelector, kAlternateHorizKanaOffSelector, }, + { 'hlig', kLigaturesType, kHistoricalLigaturesOnSelector, kHistoricalLigaturesOffSelector }, + { 'hngl', kTransliterationType, kHanjaToHangulSelector, kNoTransliterationSelector }, + { 'hojo', kCharacterShapeType, kHojoCharactersSelector, 16 }, + { 'hwid', kTextSpacingType, kHalfWidthTextSelector, 7 }, + { 'ital', kItalicCJKRomanType, kCJKItalicRomanOnSelector, kCJKItalicRomanOffSelector }, + { 'jp04', kCharacterShapeType, kJIS2004CharactersSelector, 16 }, + { 'jp78', kCharacterShapeType, kJIS1978CharactersSelector, 16 }, + { 'jp83', kCharacterShapeType, kJIS1983CharactersSelector, 16 }, + { 'jp90', kCharacterShapeType, kJIS1990CharactersSelector, 16 }, + { 'liga', kLigaturesType, kCommonLigaturesOnSelector, kCommonLigaturesOffSelector }, + { 'lnum', kNumberCaseType, kUpperCaseNumbersSelector, 2 }, + { 'mgrk', kMathematicalExtrasType, kMathematicalGreekOnSelector, kMathematicalGreekOffSelector }, + { 'nlck', kCharacterShapeType, kNLCCharactersSelector, 16 }, + { 'onum', kNumberCaseType, kLowerCaseNumbersSelector, 2 }, + { 'ordn', kVerticalPositionType, kOrdinalsSelector, kNormalPositionSelector }, + { 'palt', kTextSpacingType, kAltProportionalTextSelector, 7 }, + { 'pcap', kLowerCaseType, kLowerCasePetiteCapsSelector, kDefaultLowerCaseSelector }, + { 'pkna', kTextSpacingType, kProportionalTextSelector, 7 }, + { 'pnum', kNumberSpacingType, kProportionalNumbersSelector, 4 }, + { 'pwid', kTextSpacingType, kProportionalTextSelector, 7 }, + { 'qwid', kTextSpacingType, kQuarterWidthTextSelector, 7 }, + { 'ruby', kRubyKanaType, kRubyKanaOnSelector, kRubyKanaOffSelector }, + { 'sinf', kVerticalPositionType, kScientificInferiorsSelector, kNormalPositionSelector }, + { 'smcp', kLowerCaseType, kLowerCaseSmallCapsSelector, kDefaultLowerCaseSelector }, + { 'smpl', kCharacterShapeType, kSimplifiedCharactersSelector, 16 }, + { 'ss01', kStylisticAlternativesType, kStylisticAltOneOnSelector, kStylisticAltOneOffSelector }, + { 'ss02', kStylisticAlternativesType, kStylisticAltTwoOnSelector, kStylisticAltTwoOffSelector }, + { 'ss03', kStylisticAlternativesType, kStylisticAltThreeOnSelector, kStylisticAltThreeOffSelector }, + { 'ss04', kStylisticAlternativesType, kStylisticAltFourOnSelector, kStylisticAltFourOffSelector }, + { 'ss05', kStylisticAlternativesType, kStylisticAltFiveOnSelector, kStylisticAltFiveOffSelector }, + { 'ss06', kStylisticAlternativesType, kStylisticAltSixOnSelector, kStylisticAltSixOffSelector }, + { 'ss07', kStylisticAlternativesType, kStylisticAltSevenOnSelector, kStylisticAltSevenOffSelector }, + { 'ss08', kStylisticAlternativesType, kStylisticAltEightOnSelector, kStylisticAltEightOffSelector }, + { 'ss09', kStylisticAlternativesType, kStylisticAltNineOnSelector, kStylisticAltNineOffSelector }, + { 'ss10', kStylisticAlternativesType, kStylisticAltTenOnSelector, kStylisticAltTenOffSelector }, + { 'ss11', kStylisticAlternativesType, kStylisticAltElevenOnSelector, kStylisticAltElevenOffSelector }, + { 'ss12', kStylisticAlternativesType, kStylisticAltTwelveOnSelector, kStylisticAltTwelveOffSelector }, + { 'ss13', kStylisticAlternativesType, kStylisticAltThirteenOnSelector, kStylisticAltThirteenOffSelector }, + { 'ss14', kStylisticAlternativesType, kStylisticAltFourteenOnSelector, kStylisticAltFourteenOffSelector }, + { 'ss15', kStylisticAlternativesType, kStylisticAltFifteenOnSelector, kStylisticAltFifteenOffSelector }, + { 'ss16', kStylisticAlternativesType, kStylisticAltSixteenOnSelector, kStylisticAltSixteenOffSelector }, + { 'ss17', kStylisticAlternativesType, kStylisticAltSeventeenOnSelector, kStylisticAltSeventeenOffSelector }, + { 'ss18', kStylisticAlternativesType, kStylisticAltEighteenOnSelector, kStylisticAltEighteenOffSelector }, + { 'ss19', kStylisticAlternativesType, kStylisticAltNineteenOnSelector, kStylisticAltNineteenOffSelector }, + { 'ss20', kStylisticAlternativesType, kStylisticAltTwentyOnSelector, kStylisticAltTwentyOffSelector }, + { 'subs', kVerticalPositionType, kInferiorsSelector, kNormalPositionSelector }, + { 'sups', kVerticalPositionType, kSuperiorsSelector, kNormalPositionSelector }, + { 'swsh', kContextualAlternatesType, kSwashAlternatesOnSelector, kSwashAlternatesOffSelector }, + { 'titl', kStyleOptionsType, kTitlingCapsSelector, kNoStyleOptionsSelector }, + { 'tnam', kCharacterShapeType, kTraditionalNamesCharactersSelector, 16 }, + { 'tnum', kNumberSpacingType, kMonospacedNumbersSelector, 4 }, + { 'trad', kCharacterShapeType, kTraditionalCharactersSelector, 16 }, + { 'twid', kTextSpacingType, kThirdWidthTextSelector, 7 }, + { 'unic', kLetterCaseType, 14, 15 }, + { 'valt', kTextSpacingType, kAltProportionalTextSelector, 7 }, + { 'vert', kVerticalSubstitutionType, kSubstituteVerticalFormsOnSelector, kSubstituteVerticalFormsOffSelector }, + { 'vhal', kTextSpacingType, kAltHalfWidthTextSelector, 7 }, + { 'vkna', kAlternateKanaType, kAlternateVertKanaOnSelector, kAlternateVertKanaOffSelector }, + { 'vpal', kTextSpacingType, kAltProportionalTextSelector, 7 }, + { 'vrt2', kVerticalSubstitutionType, kSubstituteVerticalFormsOnSelector, kSubstituteVerticalFormsOffSelector }, + { 'zero', kTypographicExtrasType, kSlashedZeroOnSelector, kSlashedZeroOffSelector }, +}; + +static int +_hb_feature_mapping_cmp (const void *key_, const void *entry_) +{ + unsigned int key = * (unsigned int *) key_; + const feature_mapping_t * entry = (const feature_mapping_t *) entry_; + return key < entry->otFeatureTag ? -1 : + key > entry->otFeatureTag ? 1 : + 0; +} + +hb_bool_t +_hb_coretext_shape (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features) +{ + hb_face_t *face = font->face; + hb_coretext_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + hb_coretext_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); + + /* Attach marks to their bases, to match the 'ot' shaper. + * Adapted from hb-ot-shape:hb_form_clusters(). + * Note that this only makes us be closer to the 'ot' shaper, + * but by no means the same. For example, if there's + * B1 M1 B2 M2, and B1-B2 form a ligature, M2's cluster will + * continue pointing to B2 even though B2 was merged into B1's + * cluster... */ + { + hb_unicode_funcs_t *unicode = buffer->unicode; + unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; + for (unsigned int i = 1; i < count; i++) + if (HB_UNICODE_GENERAL_CATEGORY_IS_MARK (unicode->general_category (info[i].codepoint))) + buffer->merge_clusters (i - 1, i + 1); + } + + hb_auto_array_t feature_records; + hb_auto_array_t range_records; + + /* + * Set up features. + * (copied + modified from code from hb-uniscribe.cc) + */ + if (num_features) + { + /* Sort features by start/end events. */ + hb_auto_array_t feature_events; + for (unsigned int i = 0; i < num_features; i++) + { + const feature_mapping_t * mapping = (const feature_mapping_t *) bsearch (&features[i].tag, + feature_mappings, + ARRAY_LENGTH (feature_mappings), + sizeof (feature_mappings[0]), + _hb_feature_mapping_cmp); + if (!mapping) + continue; + + active_feature_t feature; + feature.rec.feature = mapping->aatFeatureType; + feature.rec.setting = features[i].value ? mapping->selectorToEnable : mapping->selectorToDisable; + feature.order = i; + + feature_event_t *event; + + event = feature_events.push (); + if (unlikely (!event)) + goto fail_features; + event->index = features[i].start; + event->start = true; + event->feature = feature; + + event = feature_events.push (); + if (unlikely (!event)) + goto fail_features; + event->index = features[i].end; + event->start = false; + event->feature = feature; + } + feature_events.qsort (); + /* Add a strategic final event. */ + { + active_feature_t feature; + feature.rec.feature = HB_TAG_NONE; + feature.rec.setting = 0; + feature.order = num_features + 1; + + feature_event_t *event = feature_events.push (); + if (unlikely (!event)) + goto fail_features; + event->index = 0; /* This value does magic. */ + event->start = false; + event->feature = feature; + } + + /* Scan events and save features for each range. */ + hb_auto_array_t active_features; + unsigned int last_index = 0; + for (unsigned int i = 0; i < feature_events.len; i++) + { + feature_event_t *event = &feature_events[i]; + + if (event->index != last_index) + { + /* Save a snapshot of active features and the range. */ + range_record_t *range = range_records.push (); + if (unlikely (!range)) + goto fail_features; + + if (active_features.len) + { + CFMutableArrayRef features_array = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); + + /* TODO sort and resolve conflicting features? */ + /* active_features.qsort (); */ + for (unsigned int j = 0; j < active_features.len; j++) + { + CFStringRef keys[2] = { + kCTFontFeatureTypeIdentifierKey, + kCTFontFeatureSelectorIdentifierKey + }; + CFNumberRef values[2] = { + CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &active_features[j].rec.feature), + CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &active_features[j].rec.setting) + }; + CFDictionaryRef dict = CFDictionaryCreate (kCFAllocatorDefault, + (const void **) keys, + (const void **) values, + 2, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFRelease (values[0]); + CFRelease (values[1]); + + CFArrayAppendValue (features_array, dict); + CFRelease (dict); + + } + + CFDictionaryRef attributes = CFDictionaryCreate (kCFAllocatorDefault, + (const void **) &kCTFontFeatureSettingsAttribute, + (const void **) &features_array, + 1, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFRelease (features_array); + + CTFontDescriptorRef font_desc = CTFontDescriptorCreateWithAttributes (attributes); + CFRelease (attributes); + + range->font = CTFontCreateCopyWithAttributes (font_data->ct_font, 0.0, NULL, font_desc); + CFRelease (font_desc); + } + else + { + range->font = NULL; + } + + range->index_first = last_index; + range->index_last = event->index - 1; + + last_index = event->index; + } + + if (event->start) { + active_feature_t *feature = active_features.push (); + if (unlikely (!feature)) + goto fail_features; + *feature = event->feature; + } else { + active_feature_t *feature = active_features.find (&event->feature); + if (feature) + active_features.remove (feature - active_features.array); + } + } + + if (!range_records.len) /* No active feature found. */ + goto fail_features; + } + else + { + fail_features: + num_features = 0; + } + + unsigned int scratch_size; + hb_buffer_t::scratch_buffer_t *scratch = buffer->get_scratch_buffer (&scratch_size); + +#define ALLOCATE_ARRAY(Type, name, len, on_no_room) \ + Type *name = (Type *) scratch; \ + { \ + unsigned int _consumed = DIV_CEIL ((len) * sizeof (Type), sizeof (*scratch)); \ + if (unlikely (_consumed > scratch_size)) \ + { \ + on_no_room; \ + assert (0); \ + } \ + scratch += _consumed; \ + scratch_size -= _consumed; \ + } + + ALLOCATE_ARRAY (UniChar, pchars, buffer->len * 2, /*nothing*/); + unsigned int chars_len = 0; + for (unsigned int i = 0; i < buffer->len; i++) { + hb_codepoint_t c = buffer->info[i].codepoint; + if (likely (c <= 0xFFFFu)) + pchars[chars_len++] = c; + else if (unlikely (c > 0x10FFFFu)) + pchars[chars_len++] = 0xFFFDu; + else { + pchars[chars_len++] = 0xD800u + ((c - 0x10000u) >> 10); + pchars[chars_len++] = 0xDC00u + ((c - 0x10000u) & ((1 << 10) - 1)); + } + } + + ALLOCATE_ARRAY (unsigned int, log_clusters, chars_len, /*nothing*/); + chars_len = 0; + for (unsigned int i = 0; i < buffer->len; i++) + { + hb_codepoint_t c = buffer->info[i].codepoint; + unsigned int cluster = buffer->info[i].cluster; + log_clusters[chars_len++] = cluster; + if (hb_in_range (c, 0x10000u, 0x10FFFFu)) + log_clusters[chars_len++] = cluster; /* Surrogates. */ + } + +#define FAIL(...) \ + HB_STMT_START { \ + DEBUG_MSG (CORETEXT, NULL, __VA_ARGS__); \ + ret = false; \ + goto fail; \ + } HB_STMT_END; + + bool ret = true; + CFStringRef string_ref = NULL; + CTLineRef line = NULL; + + if (0) + { +resize_and_retry: + DEBUG_MSG (CORETEXT, buffer, "Buffer resize"); + /* string_ref uses the scratch-buffer for backing store, and line references + * string_ref (via attr_string). We must release those before resizing buffer. */ + assert (string_ref); + assert (line); + CFRelease (string_ref); + CFRelease (line); + string_ref = NULL; + line = NULL; + + /* Get previous start-of-scratch-area, that we use later for readjusting + * our existing scratch arrays. */ + unsigned int old_scratch_used; + hb_buffer_t::scratch_buffer_t *old_scratch; + old_scratch = buffer->get_scratch_buffer (&old_scratch_used); + old_scratch_used = scratch - old_scratch; + + if (unlikely (!buffer->ensure (buffer->allocated * 2))) + FAIL ("Buffer resize failed"); + + /* Adjust scratch, pchars, and log_cluster arrays. This is ugly, but really the + * cleanest way to do without completely restructuring the rest of this shaper. */ + scratch = buffer->get_scratch_buffer (&scratch_size); + pchars = reinterpret_cast (((char *) scratch + ((char *) pchars - (char *) old_scratch))); + log_clusters = reinterpret_cast (((char *) scratch + ((char *) log_clusters - (char *) old_scratch))); + scratch += old_scratch_used; + scratch_size -= old_scratch_used; + } +retry: + { + string_ref = CFStringCreateWithCharactersNoCopy (NULL, + pchars, chars_len, + kCFAllocatorNull); + if (unlikely (!string_ref)) + FAIL ("CFStringCreateWithCharactersNoCopy failed"); + + /* Create an attributed string, populate it, and create a line from it, then release attributed string. */ + { + CFMutableAttributedStringRef attr_string = CFAttributedStringCreateMutable (kCFAllocatorDefault, + chars_len); + if (unlikely (!attr_string)) + FAIL ("CFAttributedStringCreateMutable failed"); + CFAttributedStringReplaceString (attr_string, CFRangeMake (0, 0), string_ref); + if (HB_DIRECTION_IS_VERTICAL (buffer->props.direction)) + { + CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len), + kCTVerticalFormsAttributeName, kCFBooleanTrue); + } + + if (buffer->props.language) + { +/* What's the iOS equivalent of this check? + * The symbols was introduced in iOS 7.0. + * At any rate, our fallback is safe and works fine. */ +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 +# define kCTLanguageAttributeName CFSTR ("NSLanguage") +#endif + CFStringRef lang = CFStringCreateWithCStringNoCopy (kCFAllocatorDefault, + hb_language_to_string (buffer->props.language), + kCFStringEncodingUTF8, + kCFAllocatorNull); + if (unlikely (!lang)) + FAIL ("CFStringCreateWithCStringNoCopy failed"); + CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len), + kCTLanguageAttributeName, lang); + CFRelease (lang); + } + CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len), + kCTFontAttributeName, font_data->ct_font); + + if (num_features) + { + unsigned int start = 0; + range_record_t *last_range = &range_records[0]; + for (unsigned int k = 0; k < chars_len; k++) + { + range_record_t *range = last_range; + while (log_clusters[k] < range->index_first) + range--; + while (log_clusters[k] > range->index_last) + range++; + if (range != last_range) + { + if (last_range->font) + CFAttributedStringSetAttribute (attr_string, CFRangeMake (start, k - start), + kCTFontAttributeName, last_range->font); + + start = k; + } + + last_range = range; + } + if (start != chars_len && last_range->font) + CFAttributedStringSetAttribute (attr_string, CFRangeMake (start, chars_len - start), + kCTFontAttributeName, last_range->font); + } + + int level = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1; + CFNumberRef level_number = CFNumberCreate (kCFAllocatorDefault, kCFNumberIntType, &level); + CFDictionaryRef options = CFDictionaryCreate (kCFAllocatorDefault, + (const void **) &kCTTypesetterOptionForcedEmbeddingLevel, + (const void **) &level_number, + 1, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + if (unlikely (!options)) + FAIL ("CFDictionaryCreate failed"); + + CTTypesetterRef typesetter = CTTypesetterCreateWithAttributedStringAndOptions (attr_string, options); + CFRelease (options); + CFRelease (attr_string); + if (unlikely (!typesetter)) + FAIL ("CTTypesetterCreateWithAttributedStringAndOptions failed"); + + line = CTTypesetterCreateLine (typesetter, CFRangeMake(0, 0)); + CFRelease (typesetter); + if (unlikely (!line)) + FAIL ("CTTypesetterCreateLine failed"); + } + + CFArrayRef glyph_runs = CTLineGetGlyphRuns (line); + unsigned int num_runs = CFArrayGetCount (glyph_runs); + DEBUG_MSG (CORETEXT, NULL, "Num runs: %d", num_runs); + + buffer->len = 0; + uint32_t status_and = ~0, status_or = 0; + double advances_so_far = 0; + /* For right-to-left runs, CoreText returns the glyphs positioned such that + * any trailing whitespace is to the left of (0,0). Adjust coordinate system + * to fix for that. Test with any RTL string with trailing spaces. + * https://code.google.com/p/chromium/issues/detail?id=469028 + */ + if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) + { + advances_so_far -= CTLineGetTrailingWhitespaceWidth (line); + if (HB_DIRECTION_IS_VERTICAL (buffer->props.direction)) + advances_so_far = -advances_so_far; + } + + const CFRange range_all = CFRangeMake (0, 0); + + for (unsigned int i = 0; i < num_runs; i++) + { + CTRunRef run = static_cast(CFArrayGetValueAtIndex (glyph_runs, i)); + CTRunStatus run_status = CTRunGetStatus (run); + status_or |= run_status; + status_and &= run_status; + DEBUG_MSG (CORETEXT, run, "CTRunStatus: %x", run_status); + double run_advance = CTRunGetTypographicBounds (run, range_all, NULL, NULL, NULL); + if (HB_DIRECTION_IS_VERTICAL (buffer->props.direction)) + run_advance = -run_advance; + DEBUG_MSG (CORETEXT, run, "Run advance: %g", run_advance); + + /* CoreText does automatic font fallback (AKA "cascading") for characters + * not supported by the requested font, and provides no way to turn it off, + * so we must detect if the returned run uses a font other than the requested + * one and fill in the buffer with .notdef glyphs instead of random glyph + * indices from a different font. + */ + CFDictionaryRef attributes = CTRunGetAttributes (run); + CTFontRef run_ct_font = static_cast(CFDictionaryGetValue (attributes, kCTFontAttributeName)); + if (!CFEqual (run_ct_font, font_data->ct_font)) + { + /* The run doesn't use our main font instance. We have to figure out + * whether font fallback happened, or this is just CoreText giving us + * another CTFont using the same underlying CGFont. CoreText seems + * to do that in a variety of situations, one of which being vertical + * text, but also perhaps for caching reasons. + * + * First, see if it uses any of our subfonts created to set font features... + * + * Next, compare the CGFont to the one we used to create our fonts. + * Even this doesn't work all the time. + * + * Finally, we compare PS names, which I don't think are unique... + * + * Looks like if we really want to be sure here we have to modify the + * font to change the name table, similar to what we do in the uniscribe + * backend. + * + * However, even that wouldn't work if we were passed in the CGFont to + * begin with. + * + * Webkit uses a slightly different approach: it installs LastResort + * as fallback chain, and then checks PS name of used font against + * LastResort. That one is safe for any font except for LastResort, + * as opposed to ours, which can fail if we are using any uninstalled + * font that has the same name as an installed font. + * + * See: http://github.com/behdad/harfbuzz/pull/36 + */ + bool matched = false; + for (unsigned int i = 0; i < range_records.len; i++) + if (range_records[i].font && CFEqual (run_ct_font, range_records[i].font)) + { + matched = true; + break; + } + if (!matched) + { + CGFontRef run_cg_font = CTFontCopyGraphicsFont (run_ct_font, 0); + if (run_cg_font) + { + matched = CFEqual (run_cg_font, face_data); + CFRelease (run_cg_font); + } + } + if (!matched) + { + CFStringRef font_ps_name = CTFontCopyName (font_data->ct_font, kCTFontPostScriptNameKey); + CFStringRef run_ps_name = CTFontCopyName (run_ct_font, kCTFontPostScriptNameKey); + CFComparisonResult result = CFStringCompare (run_ps_name, font_ps_name, 0); + CFRelease (run_ps_name); + CFRelease (font_ps_name); + if (result == kCFCompareEqualTo) + matched = true; + } + if (!matched) + { + CFRange range = CTRunGetStringRange (run); + DEBUG_MSG (CORETEXT, run, "Run used fallback font: %ld..%ld", + range.location, range.location + range.length); + if (!buffer->ensure_inplace (buffer->len + range.length)) + goto resize_and_retry; + hb_glyph_info_t *info = buffer->info + buffer->len; + + hb_codepoint_t notdef = 0; + hb_direction_t dir = buffer->props.direction; + hb_position_t x_advance, y_advance, x_offset, y_offset; + hb_font_get_glyph_advance_for_direction (font, notdef, dir, &x_advance, &y_advance); + hb_font_get_glyph_origin_for_direction (font, notdef, dir, &x_offset, &y_offset); + hb_position_t advance = x_advance + y_advance; + x_offset = -x_offset; + y_offset = -y_offset; + + unsigned int old_len = buffer->len; + for (CFIndex j = range.location; j < range.location + range.length; j++) + { + UniChar ch = CFStringGetCharacterAtIndex (string_ref, j); + if (hb_in_range (ch, 0xDC00u, 0xDFFFu) && range.location < j) + { + ch = CFStringGetCharacterAtIndex (string_ref, j - 1); + if (hb_in_range (ch, 0xD800u, 0xDBFFu)) + /* This is the second of a surrogate pair. Don't need .notdef + * for this one. */ + continue; + } + if (buffer->unicode->is_default_ignorable (ch)) + continue; + + info->codepoint = notdef; + info->cluster = log_clusters[j]; + + info->mask = advance; + info->var1.i32 = x_offset; + info->var2.i32 = y_offset; + + info++; + buffer->len++; + } + if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction)) + buffer->reverse_range (old_len, buffer->len); + advances_so_far += run_advance; + continue; + } + } + + unsigned int num_glyphs = CTRunGetGlyphCount (run); + if (num_glyphs == 0) + continue; + + if (!buffer->ensure_inplace (buffer->len + num_glyphs)) + goto resize_and_retry; + + hb_glyph_info_t *run_info = buffer->info + buffer->len; + + /* Testing used to indicate that CTRunGetGlyphsPtr, etc (almost?) always + * succeed, and so copying data to our own buffer will be rare. Reports + * have it that this changed in OS X 10.10 Yosemite, and NULL is returned + * frequently. At any rate, we can test that codepath by setting USE_PTR + * to false. */ + +#define USE_PTR true + +#define SCRATCH_SAVE() \ + unsigned int scratch_size_saved = scratch_size; \ + hb_buffer_t::scratch_buffer_t *scratch_saved = scratch + +#define SCRATCH_RESTORE() \ + scratch_size = scratch_size_saved; \ + scratch = scratch_saved; + + { /* Setup glyphs */ + SCRATCH_SAVE(); + const CGGlyph* glyphs = USE_PTR ? CTRunGetGlyphsPtr (run) : NULL; + if (!glyphs) { + ALLOCATE_ARRAY (CGGlyph, glyph_buf, num_glyphs, goto resize_and_retry); + CTRunGetGlyphs (run, range_all, glyph_buf); + glyphs = glyph_buf; + } + const CFIndex* string_indices = USE_PTR ? CTRunGetStringIndicesPtr (run) : NULL; + if (!string_indices) { + ALLOCATE_ARRAY (CFIndex, index_buf, num_glyphs, goto resize_and_retry); + CTRunGetStringIndices (run, range_all, index_buf); + string_indices = index_buf; + } + hb_glyph_info_t *info = run_info; + for (unsigned int j = 0; j < num_glyphs; j++) + { + info->codepoint = glyphs[j]; + info->cluster = log_clusters[string_indices[j]]; + info++; + } + SCRATCH_RESTORE(); + } + { + /* Setup positions. + * Note that CoreText does not return advances for glyphs. As such, + * for all but last glyph, we use the delta position to next glyph as + * advance (in the advance direction only), and for last glyph we set + * whatever is needed to make the whole run's advance add up. */ + SCRATCH_SAVE(); + const CGPoint* positions = USE_PTR ? CTRunGetPositionsPtr (run) : NULL; + if (!positions) { + ALLOCATE_ARRAY (CGPoint, position_buf, num_glyphs, goto resize_and_retry); + CTRunGetPositions (run, range_all, position_buf); + positions = position_buf; + } + hb_glyph_info_t *info = run_info; + CGFloat x_mult = font_data->x_mult, y_mult = font_data->y_mult; + if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction)) + { + hb_position_t x_offset = (positions[0].x - advances_so_far) * x_mult; + for (unsigned int j = 0; j < num_glyphs; j++) + { + double advance; + if (likely (j + 1 < num_glyphs)) + advance = positions[j + 1].x - positions[j].x; + else /* last glyph */ + advance = run_advance - (positions[j].x - positions[0].x); + info->mask = advance * x_mult; + info->var1.i32 = x_offset; + info->var2.i32 = positions[j].y * y_mult; + info++; + } + } + else + { + hb_position_t y_offset = (positions[0].y - advances_so_far) * y_mult; + for (unsigned int j = 0; j < num_glyphs; j++) + { + double advance; + if (likely (j + 1 < num_glyphs)) + advance = positions[j + 1].y - positions[j].y; + else /* last glyph */ + advance = run_advance - (positions[j].y - positions[0].y); + info->mask = advance * y_mult; + info->var1.i32 = positions[j].x * x_mult; + info->var2.i32 = y_offset; + info++; + } + } + SCRATCH_RESTORE(); + advances_so_far += run_advance; + } +#undef SCRATCH_RESTORE +#undef SCRATCH_SAVE +#undef USE_PTR +#undef ALLOCATE_ARRAY + + buffer->len += num_glyphs; + } + + /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel, + * or if it does, it doesn't resepct it. So we get runs with wrong + * directions. As such, disable the assert... It wouldn't crash, but + * cursoring will be off... + * + * http://crbug.com/419769 + */ + if (0) + { + /* Make sure all runs had the expected direction. */ + bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); + assert (bool (status_and & kCTRunStatusRightToLeft) == backward); + assert (bool (status_or & kCTRunStatusRightToLeft) == backward); + } + + buffer->clear_positions (); + + unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; + hb_glyph_position_t *pos = buffer->pos; + if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction)) + for (unsigned int i = 0; i < count; i++) + { + pos->x_advance = info->mask; + pos->x_offset = info->var1.i32; + pos->y_offset = info->var2.i32; + info++, pos++; + } + else + for (unsigned int i = 0; i < count; i++) + { + pos->y_advance = info->mask; + pos->x_offset = info->var1.i32; + pos->y_offset = info->var2.i32; + info++, pos++; + } + + /* Fix up clusters so that we never return out-of-order indices; + * if core text has reordered glyphs, we'll merge them to the + * beginning of the reordered cluster. CoreText is nice enough + * to tell us whenever it has produced nonmonotonic results... + * Note that we assume the input clusters were nonmonotonic to + * begin with. + * + * This does *not* mean we'll form the same clusters as Uniscribe + * or the native OT backend, only that the cluster indices will be + * monotonic in the output buffer. */ + if (count > 1 && (status_or & kCTRunStatusNonMonotonic)) + { + hb_glyph_info_t *info = buffer->info; + if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) + { + unsigned int cluster = info[count - 1].cluster; + for (unsigned int i = count - 1; i > 0; i--) + { + cluster = MIN (cluster, info[i - 1].cluster); + info[i - 1].cluster = cluster; + } + } + else + { + unsigned int cluster = info[0].cluster; + for (unsigned int i = 1; i < count; i++) + { + cluster = MIN (cluster, info[i].cluster); + info[i].cluster = cluster; + } + } + } + } + +#undef FAIL + +fail: + if (string_ref) + CFRelease (string_ref); + if (line) + CFRelease (line); + + for (unsigned int i = 0; i < range_records.len; i++) + if (range_records[i].font) + CFRelease (range_records[i].font); + + return ret; +} + + +/* + * AAT shaper + */ + +HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, face) +HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, font) + + +/* + * shaper face data + */ + +struct hb_coretext_aat_shaper_face_data_t {}; + +hb_coretext_aat_shaper_face_data_t * +_hb_coretext_aat_shaper_face_data_create (hb_face_t *face) +{ + hb_blob_t *mort_blob = face->reference_table (HB_CORETEXT_TAG_MORT); + /* Umm, we just reference the table to check whether it exists. + * Maybe add better API for this? */ + if (!hb_blob_get_length (mort_blob)) + { + hb_blob_destroy (mort_blob); + mort_blob = face->reference_table (HB_CORETEXT_TAG_MORX); + if (!hb_blob_get_length (mort_blob)) + { + hb_blob_destroy (mort_blob); + return NULL; + } + } + hb_blob_destroy (mort_blob); + + return hb_coretext_shaper_face_data_ensure (face) ? (hb_coretext_aat_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED : NULL; +} + +void +_hb_coretext_aat_shaper_face_data_destroy (hb_coretext_aat_shaper_face_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper font data + */ + +struct hb_coretext_aat_shaper_font_data_t {}; + +hb_coretext_aat_shaper_font_data_t * +_hb_coretext_aat_shaper_font_data_create (hb_font_t *font) +{ + return hb_coretext_shaper_font_data_ensure (font) ? (hb_coretext_aat_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED : NULL; +} + +void +_hb_coretext_aat_shaper_font_data_destroy (hb_coretext_aat_shaper_font_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper shape_plan data + */ + +struct hb_coretext_aat_shaper_shape_plan_data_t {}; + +hb_coretext_aat_shaper_shape_plan_data_t * +_hb_coretext_aat_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, + const hb_feature_t *user_features HB_UNUSED, + unsigned int num_user_features HB_UNUSED) +{ + return (hb_coretext_aat_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; +} + +void +_hb_coretext_aat_shaper_shape_plan_data_destroy (hb_coretext_aat_shaper_shape_plan_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper + */ + +hb_bool_t +_hb_coretext_aat_shape (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features) +{ + return _hb_coretext_shape (shape_plan, font, buffer, features, num_features); +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-coretext.h b/3rdparty/harfbuzz-1.0.6/hb-coretext.h new file mode 100644 index 0000000000..25267bc978 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-coretext.h @@ -0,0 +1,60 @@ +/* + * Copyright © 2012 Mozilla Foundation. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Mozilla Author(s): Jonathan Kew + */ + +#ifndef HB_CORETEXT_H +#define HB_CORETEXT_H + +#include "hb.h" + +#include +#if TARGET_OS_IPHONE +# include +# include +#else +# include +#endif + +HB_BEGIN_DECLS + + +#define HB_CORETEXT_TAG_MORT HB_TAG('m','o','r','t') +#define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x') + + +hb_face_t * +hb_coretext_face_create (CGFontRef cg_font); + + +CGFontRef +hb_coretext_face_get_cg_font (hb_face_t *face); + +CTFontRef +hb_coretext_font_get_ct_font (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_CORETEXT_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-deprecated.h b/3rdparty/harfbuzz-1.0.6/hb-deprecated.h new file mode 100644 index 0000000000..30ae4b1caf --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-deprecated.h @@ -0,0 +1,51 @@ +/* + * Copyright © 2013 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include instead." +#endif + +#ifndef HB_DEPRECATED_H +#define HB_DEPRECATED_H + +#include "hb-common.h" +#include "hb-unicode.h" +#include "hb-font.h" + +HB_BEGIN_DECLS + +#ifndef HB_DISABLE_DEPRECATED + +#define HB_SCRIPT_CANADIAN_ABORIGINAL HB_SCRIPT_CANADIAN_SYLLABICS + +#define HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_DEFAULT +#define HB_BUFFER_SERIALIZE_FLAGS_DEFAULT HB_BUFFER_SERIALIZE_FLAG_DEFAULT + +#endif + +HB_END_DECLS + +#endif /* HB_DEPRECATED_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-face-private.hh b/3rdparty/harfbuzz-1.0.6/hb-face-private.hh new file mode 100644 index 0000000000..c4266fff4f --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-face-private.hh @@ -0,0 +1,107 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_FACE_PRIVATE_HH +#define HB_FACE_PRIVATE_HH + +#include "hb-private.hh" + +#include "hb-object-private.hh" +#include "hb-shaper-private.hh" +#include "hb-shape-plan-private.hh" + + +/* + * hb_face_t + */ + +struct hb_face_t { + hb_object_header_t header; + ASSERT_POD (); + + hb_bool_t immutable; + + hb_reference_table_func_t reference_table_func; + void *user_data; + hb_destroy_func_t destroy; + + unsigned int index; + mutable unsigned int upem; + mutable unsigned int num_glyphs; + + struct hb_shaper_data_t shaper_data; + + struct plan_node_t { + hb_shape_plan_t *shape_plan; + plan_node_t *next; + } *shape_plans; + + + inline hb_blob_t *reference_table (hb_tag_t tag) const + { + hb_blob_t *blob; + + if (unlikely (!reference_table_func)) + return hb_blob_get_empty (); + + blob = reference_table_func (/*XXX*/const_cast (this), tag, user_data); + if (unlikely (!blob)) + return hb_blob_get_empty (); + + return blob; + } + + inline HB_PURE_FUNC unsigned int get_upem (void) const + { + if (unlikely (!upem)) + load_upem (); + return upem; + } + + inline unsigned int get_num_glyphs (void) const + { + if (unlikely (num_glyphs == (unsigned int) -1)) + load_num_glyphs (); + return num_glyphs; + } + + private: + HB_INTERNAL void load_upem (void) const; + HB_INTERNAL void load_num_glyphs (void) const; +}; + +extern HB_INTERNAL const hb_face_t _hb_face_nil; + +#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS +#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, face); +#include "hb-shaper-list.hh" +#undef HB_SHAPER_IMPLEMENT +#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS + + +#endif /* HB_FACE_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-face.cc b/3rdparty/harfbuzz-1.0.6/hb-face.cc new file mode 100644 index 0000000000..9effc41c88 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-face.cc @@ -0,0 +1,481 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-private.hh" + +#include "hb-ot-layout-private.hh" + +#include "hb-font-private.hh" +#include "hb-open-file-private.hh" +#include "hb-ot-head-table.hh" +#include "hb-ot-maxp-table.hh" + +#include "hb-cache-private.hh" + +#include + + +/* + * hb_face_t + */ + +const hb_face_t _hb_face_nil = { + HB_OBJECT_HEADER_STATIC, + + true, /* immutable */ + + NULL, /* reference_table_func */ + NULL, /* user_data */ + NULL, /* destroy */ + + 0, /* index */ + 1000, /* upem */ + 0, /* num_glyphs */ + + { +#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID, +#include "hb-shaper-list.hh" +#undef HB_SHAPER_IMPLEMENT + }, + + NULL, /* shape_plans */ +}; + + +/** + * hb_face_create_for_tables: + * @reference_table_func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Return value: (transfer full) + * + * Since: 0.9.2 + **/ +hb_face_t * +hb_face_create_for_tables (hb_reference_table_func_t reference_table_func, + void *user_data, + hb_destroy_func_t destroy) +{ + hb_face_t *face; + + if (!reference_table_func || !(face = hb_object_create ())) { + if (destroy) + destroy (user_data); + return hb_face_get_empty (); + } + + face->reference_table_func = reference_table_func; + face->user_data = user_data; + face->destroy = destroy; + + face->upem = 0; + face->num_glyphs = (unsigned int) -1; + + return face; +} + + +typedef struct hb_face_for_data_closure_t { + hb_blob_t *blob; + unsigned int index; +} hb_face_for_data_closure_t; + +static hb_face_for_data_closure_t * +_hb_face_for_data_closure_create (hb_blob_t *blob, unsigned int index) +{ + hb_face_for_data_closure_t *closure; + + closure = (hb_face_for_data_closure_t *) calloc (1, sizeof (hb_face_for_data_closure_t)); + if (unlikely (!closure)) + return NULL; + + closure->blob = blob; + closure->index = index; + + return closure; +} + +static void +_hb_face_for_data_closure_destroy (hb_face_for_data_closure_t *closure) +{ + hb_blob_destroy (closure->blob); + free (closure); +} + +static hb_blob_t * +_hb_face_for_data_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) +{ + hb_face_for_data_closure_t *data = (hb_face_for_data_closure_t *) user_data; + + if (tag == HB_TAG_NONE) + return hb_blob_reference (data->blob); + + const OT::OpenTypeFontFile &ot_file = *OT::Sanitizer::lock_instance (data->blob); + const OT::OpenTypeFontFace &ot_face = ot_file.get_face (data->index); + + const OT::OpenTypeTable &table = ot_face.get_table_by_tag (tag); + + hb_blob_t *blob = hb_blob_create_sub_blob (data->blob, table.offset, table.length); + + return blob; +} + +/** + * hb_face_create: (Xconstructor) + * @blob: + * @index: + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_face_t * +hb_face_create (hb_blob_t *blob, + unsigned int index) +{ + hb_face_t *face; + + if (unlikely (!blob)) + blob = hb_blob_get_empty (); + + hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (OT::Sanitizer::sanitize (hb_blob_reference (blob)), index); + + if (unlikely (!closure)) + return hb_face_get_empty (); + + face = hb_face_create_for_tables (_hb_face_for_data_reference_table, + closure, + (hb_destroy_func_t) _hb_face_for_data_closure_destroy); + + hb_face_set_index (face, index); + + return face; +} + +/** + * hb_face_get_empty: + * + * + * + * Return value: (transfer full) + * + * Since: 0.9.2 + **/ +hb_face_t * +hb_face_get_empty (void) +{ + return const_cast (&_hb_face_nil); +} + + +/** + * hb_face_reference: (skip) + * @face: a face. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_face_t * +hb_face_reference (hb_face_t *face) +{ + return hb_object_reference (face); +} + +/** + * hb_face_destroy: (skip) + * @face: a face. + * + * + * + * Since: 0.9.2 + **/ +void +hb_face_destroy (hb_face_t *face) +{ + if (!hb_object_destroy (face)) return; + + for (hb_face_t::plan_node_t *node = face->shape_plans; node; ) + { + hb_face_t::plan_node_t *next = node->next; + hb_shape_plan_destroy (node->shape_plan); + free (node); + node = next; + } + +#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, face); +#include "hb-shaper-list.hh" +#undef HB_SHAPER_IMPLEMENT + + if (face->destroy) + face->destroy (face->user_data); + + free (face); +} + +/** + * hb_face_set_user_data: (skip) + * @face: a face. + * @key: + * @data: + * @destroy: + * @replace: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_face_set_user_data (hb_face_t *face, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + return hb_object_set_user_data (face, key, data, destroy, replace); +} + +/** + * hb_face_get_user_data: (skip) + * @face: a face. + * @key: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +void * +hb_face_get_user_data (hb_face_t *face, + hb_user_data_key_t *key) +{ + return hb_object_get_user_data (face, key); +} + +/** + * hb_face_make_immutable: + * @face: a face. + * + * + * + * Since: 0.9.2 + **/ +void +hb_face_make_immutable (hb_face_t *face) +{ + if (unlikely (hb_object_is_inert (face))) + return; + + face->immutable = true; +} + +/** + * hb_face_is_immutable: + * @face: a face. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_face_is_immutable (hb_face_t *face) +{ + return face->immutable; +} + + +/** + * hb_face_reference_table: + * @face: a face. + * @tag: + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_blob_t * +hb_face_reference_table (hb_face_t *face, + hb_tag_t tag) +{ + return face->reference_table (tag); +} + +/** + * hb_face_reference_blob: + * @face: a face. + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_blob_t * +hb_face_reference_blob (hb_face_t *face) +{ + return face->reference_table (HB_TAG_NONE); +} + +/** + * hb_face_set_index: + * @face: a face. + * @index: + * + * + * + * Since: 0.9.2 + **/ +void +hb_face_set_index (hb_face_t *face, + unsigned int index) +{ + if (face->immutable) + return; + + face->index = index; +} + +/** + * hb_face_get_index: + * @face: a face. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +unsigned int +hb_face_get_index (hb_face_t *face) +{ + return face->index; +} + +/** + * hb_face_set_upem: + * @face: a face. + * @upem: + * + * + * + * Since: 0.9.2 + **/ +void +hb_face_set_upem (hb_face_t *face, + unsigned int upem) +{ + if (face->immutable) + return; + + face->upem = upem; +} + +/** + * hb_face_get_upem: + * @face: a face. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +unsigned int +hb_face_get_upem (hb_face_t *face) +{ + return face->get_upem (); +} + +void +hb_face_t::load_upem (void) const +{ + hb_blob_t *head_blob = OT::Sanitizer::sanitize (reference_table (HB_OT_TAG_head)); + const OT::head *head_table = OT::Sanitizer::lock_instance (head_blob); + upem = head_table->get_upem (); + hb_blob_destroy (head_blob); +} + +/** + * hb_face_set_glyph_count: + * @face: a face. + * @glyph_count: + * + * + * + * Since: 0.9.7 + **/ +void +hb_face_set_glyph_count (hb_face_t *face, + unsigned int glyph_count) +{ + if (face->immutable) + return; + + face->num_glyphs = glyph_count; +} + +/** + * hb_face_get_glyph_count: + * @face: a face. + * + * + * + * Return value: + * + * Since: 0.9.7 + **/ +unsigned int +hb_face_get_glyph_count (hb_face_t *face) +{ + return face->get_num_glyphs (); +} + +void +hb_face_t::load_num_glyphs (void) const +{ + hb_blob_t *maxp_blob = OT::Sanitizer::sanitize (reference_table (HB_OT_TAG_maxp)); + const OT::maxp *maxp_table = OT::Sanitizer::lock_instance (maxp_blob); + num_glyphs = maxp_table->get_num_glyphs (); + hb_blob_destroy (maxp_blob); +} + + diff --git a/3rdparty/harfbuzz-1.0.6/hb-face.h b/3rdparty/harfbuzz-1.0.6/hb-face.h new file mode 100644 index 0000000000..f682c468de --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-face.h @@ -0,0 +1,117 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include instead." +#endif + +#ifndef HB_FACE_H +#define HB_FACE_H + +#include "hb-common.h" +#include "hb-blob.h" + +HB_BEGIN_DECLS + + +/* + * hb_face_t + */ + +typedef struct hb_face_t hb_face_t; + +hb_face_t * +hb_face_create (hb_blob_t *blob, + unsigned int index); + +typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data); + +/* calls destroy() when not needing user_data anymore */ +hb_face_t * +hb_face_create_for_tables (hb_reference_table_func_t reference_table_func, + void *user_data, + hb_destroy_func_t destroy); + +hb_face_t * +hb_face_get_empty (void); + +hb_face_t * +hb_face_reference (hb_face_t *face); + +void +hb_face_destroy (hb_face_t *face); + +hb_bool_t +hb_face_set_user_data (hb_face_t *face, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +void * +hb_face_get_user_data (hb_face_t *face, + hb_user_data_key_t *key); + +void +hb_face_make_immutable (hb_face_t *face); + +hb_bool_t +hb_face_is_immutable (hb_face_t *face); + + +hb_blob_t * +hb_face_reference_table (hb_face_t *face, + hb_tag_t tag); + +hb_blob_t * +hb_face_reference_blob (hb_face_t *face); + +void +hb_face_set_index (hb_face_t *face, + unsigned int index); + +unsigned int +hb_face_get_index (hb_face_t *face); + +void +hb_face_set_upem (hb_face_t *face, + unsigned int upem); + +unsigned int +hb_face_get_upem (hb_face_t *face); + +void +hb_face_set_glyph_count (hb_face_t *face, + unsigned int glyph_count); + +unsigned int +hb_face_get_glyph_count (hb_face_t *face); + + +HB_END_DECLS + +#endif /* HB_FACE_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-fallback-shape.cc b/3rdparty/harfbuzz-1.0.6/hb-fallback-shape.cc new file mode 100644 index 0000000000..9d061a9e84 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-fallback-shape.cc @@ -0,0 +1,141 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#define HB_SHAPER fallback +#include "hb-shaper-impl-private.hh" + + +/* + * shaper face data + */ + +struct hb_fallback_shaper_face_data_t {}; + +hb_fallback_shaper_face_data_t * +_hb_fallback_shaper_face_data_create (hb_face_t *face HB_UNUSED) +{ + return (hb_fallback_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED; +} + +void +_hb_fallback_shaper_face_data_destroy (hb_fallback_shaper_face_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper font data + */ + +struct hb_fallback_shaper_font_data_t {}; + +hb_fallback_shaper_font_data_t * +_hb_fallback_shaper_font_data_create (hb_font_t *font HB_UNUSED) +{ + return (hb_fallback_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED; +} + +void +_hb_fallback_shaper_font_data_destroy (hb_fallback_shaper_font_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper shape_plan data + */ + +struct hb_fallback_shaper_shape_plan_data_t {}; + +hb_fallback_shaper_shape_plan_data_t * +_hb_fallback_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, + const hb_feature_t *user_features HB_UNUSED, + unsigned int num_user_features HB_UNUSED) +{ + return (hb_fallback_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; +} + +void +_hb_fallback_shaper_shape_plan_data_destroy (hb_fallback_shaper_shape_plan_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper + */ + +hb_bool_t +_hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features HB_UNUSED, + unsigned int num_features HB_UNUSED) +{ + /* TODO + * + * - Apply fallback kern. + * - Handle Variation Selectors? + * - Apply normalization? + * + * This will make the fallback shaper into a dumb "TrueType" + * shaper which many people unfortunately still request. + */ + + hb_codepoint_t space; + bool has_space = font->get_glyph (' ', 0, &space); + + buffer->clear_positions (); + + hb_direction_t direction = buffer->props.direction; + hb_unicode_funcs_t *unicode = buffer->unicode; + unsigned int count = buffer->len; + hb_glyph_info_t *info = buffer->info; + hb_glyph_position_t *pos = buffer->pos; + for (unsigned int i = 0; i < count; i++) + { + if (has_space && unicode->is_default_ignorable (info[i].codepoint)) { + info[i].codepoint = space; + pos[i].x_advance = 0; + pos[i].y_advance = 0; + continue; + } + font->get_glyph (info[i].codepoint, 0, &info[i].codepoint); + font->get_glyph_advance_for_direction (info[i].codepoint, + direction, + &pos[i].x_advance, + &pos[i].y_advance); + font->subtract_glyph_origin_for_direction (info[i].codepoint, + direction, + &pos[i].x_offset, + &pos[i].y_offset); + } + + if (HB_DIRECTION_IS_BACKWARD (direction)) + hb_buffer_reverse (buffer); + + return true; +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-font-private.hh b/3rdparty/harfbuzz-1.0.6/hb-font-private.hh new file mode 100644 index 0000000000..c05499d4c2 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-font-private.hh @@ -0,0 +1,415 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_FONT_PRIVATE_HH +#define HB_FONT_PRIVATE_HH + +#include "hb-private.hh" + +#include "hb-object-private.hh" +#include "hb-face-private.hh" +#include "hb-shaper-private.hh" + + + +/* + * hb_font_funcs_t + */ + +#define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \ + HB_FONT_FUNC_IMPLEMENT (glyph) \ + HB_FONT_FUNC_IMPLEMENT (glyph_h_advance) \ + HB_FONT_FUNC_IMPLEMENT (glyph_v_advance) \ + HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \ + HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \ + HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \ + HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning) \ + HB_FONT_FUNC_IMPLEMENT (glyph_extents) \ + HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \ + HB_FONT_FUNC_IMPLEMENT (glyph_name) \ + HB_FONT_FUNC_IMPLEMENT (glyph_from_name) \ + /* ^--- Add new callbacks here */ + +struct hb_font_funcs_t { + hb_object_header_t header; + ASSERT_POD (); + + hb_bool_t immutable; + + /* Don't access these directly. Call hb_font_get_*() instead. */ + + struct { +#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name; + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } get; + + struct { +#define HB_FONT_FUNC_IMPLEMENT(name) void *name; + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } user_data; + + struct { +#define HB_FONT_FUNC_IMPLEMENT(name) hb_destroy_func_t name; + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } destroy; +}; + + + +/* + * hb_font_t + */ + +struct hb_font_t { + hb_object_header_t header; + ASSERT_POD (); + + hb_bool_t immutable; + + hb_font_t *parent; + hb_face_t *face; + + int x_scale; + int y_scale; + + unsigned int x_ppem; + unsigned int y_ppem; + + hb_font_funcs_t *klass; + void *user_data; + hb_destroy_func_t destroy; + + struct hb_shaper_data_t shaper_data; + + + /* Convert from font-space to user-space */ + inline hb_position_t em_scale_x (int16_t v) { return em_scale (v, this->x_scale); } + inline hb_position_t em_scale_y (int16_t v) { return em_scale (v, this->y_scale); } + + /* Convert from parent-font user-space to our user-space */ + inline hb_position_t parent_scale_x_distance (hb_position_t v) { + if (unlikely (parent && parent->x_scale != x_scale)) + return (hb_position_t) (v * (int64_t) this->x_scale / this->parent->x_scale); + return v; + } + inline hb_position_t parent_scale_y_distance (hb_position_t v) { + if (unlikely (parent && parent->y_scale != y_scale)) + return (hb_position_t) (v * (int64_t) this->y_scale / this->parent->y_scale); + return v; + } + inline hb_position_t parent_scale_x_position (hb_position_t v) { + return parent_scale_x_distance (v); + } + inline hb_position_t parent_scale_y_position (hb_position_t v) { + return parent_scale_y_distance (v); + } + + inline void parent_scale_distance (hb_position_t *x, hb_position_t *y) { + *x = parent_scale_x_distance (*x); + *y = parent_scale_y_distance (*y); + } + inline void parent_scale_position (hb_position_t *x, hb_position_t *y) { + *x = parent_scale_x_position (*x); + *y = parent_scale_y_position (*y); + } + + + /* Public getters */ + + inline hb_bool_t has_glyph (hb_codepoint_t unicode) + { + hb_codepoint_t glyph; + return get_glyph (unicode, 0, &glyph); + } + + inline hb_bool_t get_glyph (hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) + { + *glyph = 0; + return klass->get.glyph (this, user_data, + unicode, variation_selector, glyph, + klass->user_data.glyph); + } + + inline hb_position_t get_glyph_h_advance (hb_codepoint_t glyph) + { + return klass->get.glyph_h_advance (this, user_data, + glyph, + klass->user_data.glyph_h_advance); + } + + inline hb_position_t get_glyph_v_advance (hb_codepoint_t glyph) + { + return klass->get.glyph_v_advance (this, user_data, + glyph, + klass->user_data.glyph_v_advance); + } + + inline hb_bool_t get_glyph_h_origin (hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y) + { + *x = *y = 0; + return klass->get.glyph_h_origin (this, user_data, + glyph, x, y, + klass->user_data.glyph_h_origin); + } + + inline hb_bool_t get_glyph_v_origin (hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y) + { + *x = *y = 0; + return klass->get.glyph_v_origin (this, user_data, + glyph, x, y, + klass->user_data.glyph_v_origin); + } + + inline hb_position_t get_glyph_h_kerning (hb_codepoint_t left_glyph, hb_codepoint_t right_glyph) + { + return klass->get.glyph_h_kerning (this, user_data, + left_glyph, right_glyph, + klass->user_data.glyph_h_kerning); + } + + inline hb_position_t get_glyph_v_kerning (hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph) + { + return klass->get.glyph_v_kerning (this, user_data, + top_glyph, bottom_glyph, + klass->user_data.glyph_v_kerning); + } + + inline hb_bool_t get_glyph_extents (hb_codepoint_t glyph, + hb_glyph_extents_t *extents) + { + memset (extents, 0, sizeof (*extents)); + return klass->get.glyph_extents (this, user_data, + glyph, + extents, + klass->user_data.glyph_extents); + } + + inline hb_bool_t get_glyph_contour_point (hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y) + { + *x = *y = 0; + return klass->get.glyph_contour_point (this, user_data, + glyph, point_index, + x, y, + klass->user_data.glyph_contour_point); + } + + inline hb_bool_t get_glyph_name (hb_codepoint_t glyph, + char *name, unsigned int size) + { + if (size) *name = '\0'; + return klass->get.glyph_name (this, user_data, + glyph, + name, size, + klass->user_data.glyph_name); + } + + inline hb_bool_t get_glyph_from_name (const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph) + { + *glyph = 0; + if (len == -1) len = strlen (name); + return klass->get.glyph_from_name (this, user_data, + name, len, + glyph, + klass->user_data.glyph_from_name); + } + + + /* A bit higher-level, and with fallback */ + + inline void get_glyph_advance_for_direction (hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) + { + if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) { + *x = get_glyph_h_advance (glyph); + *y = 0; + } else { + *x = 0; + *y = get_glyph_v_advance (glyph); + } + } + + /* Internal only */ + inline void guess_v_origin_minus_h_origin (hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y) + { + *x = get_glyph_h_advance (glyph) / 2; + + /* TODO use font_metrics.ascent */ + *y = y_scale; + } + + inline void get_glyph_origin_for_direction (hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) + { + if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) + { + if (!get_glyph_h_origin (glyph, x, y) && + get_glyph_v_origin (glyph, x, y)) + { + hb_position_t dx, dy; + guess_v_origin_minus_h_origin (glyph, &dx, &dy); + *x -= dx; *y -= dy; + } + } + else + { + if (!get_glyph_v_origin (glyph, x, y) && + get_glyph_h_origin (glyph, x, y)) + { + hb_position_t dx, dy; + guess_v_origin_minus_h_origin (glyph, &dx, &dy); + *x += dx; *y += dy; + } + } + } + + inline void add_glyph_origin_for_direction (hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) + { + hb_position_t origin_x, origin_y; + + get_glyph_origin_for_direction (glyph, direction, &origin_x, &origin_y); + + *x += origin_x; + *y += origin_y; + } + + inline void subtract_glyph_origin_for_direction (hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) + { + hb_position_t origin_x, origin_y; + + get_glyph_origin_for_direction (glyph, direction, &origin_x, &origin_y); + + *x -= origin_x; + *y -= origin_y; + } + + inline void get_glyph_kerning_for_direction (hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) + { + if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) { + *x = get_glyph_h_kerning (first_glyph, second_glyph); + *y = 0; + } else { + *x = 0; + *y = get_glyph_v_kerning (first_glyph, second_glyph); + } + } + + inline hb_bool_t get_glyph_extents_for_origin (hb_codepoint_t glyph, + hb_direction_t direction, + hb_glyph_extents_t *extents) + { + hb_bool_t ret = get_glyph_extents (glyph, extents); + + if (ret) + subtract_glyph_origin_for_direction (glyph, direction, &extents->x_bearing, &extents->y_bearing); + + return ret; + } + + inline hb_bool_t get_glyph_contour_point_for_origin (hb_codepoint_t glyph, unsigned int point_index, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) + { + hb_bool_t ret = get_glyph_contour_point (glyph, point_index, x, y); + + if (ret) + subtract_glyph_origin_for_direction (glyph, direction, x, y); + + return ret; + } + + /* Generates gidDDD if glyph has no name. */ + inline void + glyph_to_string (hb_codepoint_t glyph, + char *s, unsigned int size) + { + if (get_glyph_name (glyph, s, size)) return; + + if (size && snprintf (s, size, "gid%u", glyph) < 0) + *s = '\0'; + } + + /* Parses gidDDD and uniUUUU strings automatically. */ + inline hb_bool_t + glyph_from_string (const char *s, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph) + { + if (get_glyph_from_name (s, len, glyph)) return true; + + if (len == -1) len = strlen (s); + + /* Straight glyph index. */ + if (hb_codepoint_parse (s, len, 10, glyph)) + return true; + + if (len > 3) + { + /* gidDDD syntax for glyph indices. */ + if (0 == strncmp (s, "gid", 3) && + hb_codepoint_parse (s + 3, len - 3, 10, glyph)) + return true; + + /* uniUUUU and other Unicode character indices. */ + hb_codepoint_t unichar; + if (0 == strncmp (s, "uni", 3) && + hb_codepoint_parse (s + 3, len - 3, 16, &unichar) && + get_glyph (unichar, 0, glyph)) + return true; + } + + return false; + } + + private: + inline hb_position_t em_scale (int16_t v, int scale) { return (hb_position_t) (v * (int64_t) scale / face->get_upem ()); } +}; + +#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS +#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, font); +#include "hb-shaper-list.hh" +#undef HB_SHAPER_IMPLEMENT +#undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS + + +#endif /* HB_FONT_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-font.cc b/3rdparty/harfbuzz-1.0.6/hb-font.cc new file mode 100644 index 0000000000..6a69cae313 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-font.cc @@ -0,0 +1,1266 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-private.hh" + +#include "hb-ot-layout-private.hh" + +#include "hb-font-private.hh" +#include "hb-open-file-private.hh" +#include "hb-ot-head-table.hh" +#include "hb-ot-maxp-table.hh" + +#include "hb-cache-private.hh" + +#include + + +/* + * hb_font_funcs_t + */ + +static hb_bool_t +hb_font_get_glyph_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t unicode, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) +{ + if (font->parent) + return font->parent->get_glyph (unicode, variation_selector, glyph); + + *glyph = 0; + return false; +} + +static hb_position_t +hb_font_get_glyph_h_advance_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + if (font->parent) + return font->parent_scale_x_distance (font->parent->get_glyph_h_advance (glyph)); + + return font->x_scale; +} + +static hb_position_t +hb_font_get_glyph_v_advance_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + if (font->parent) + return font->parent_scale_y_distance (font->parent->get_glyph_v_advance (glyph)); + + return font->y_scale; +} + +static hb_bool_t +hb_font_get_glyph_h_origin_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + if (font->parent) { + hb_bool_t ret = font->parent->get_glyph_h_origin (glyph, x, y); + if (ret) + font->parent_scale_position (x, y); + return ret; + } + + *x = *y = 0; + return false; +} + +static hb_bool_t +hb_font_get_glyph_v_origin_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + if (font->parent) { + hb_bool_t ret = font->parent->get_glyph_v_origin (glyph, x, y); + if (ret) + font->parent_scale_position (x, y); + return ret; + } + + *x = *y = 0; + return false; +} + +static hb_position_t +hb_font_get_glyph_h_kerning_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t left_glyph, + hb_codepoint_t right_glyph, + void *user_data HB_UNUSED) +{ + if (font->parent) + return font->parent_scale_x_distance (font->parent->get_glyph_h_kerning (left_glyph, right_glyph)); + + return 0; +} + +static hb_position_t +hb_font_get_glyph_v_kerning_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t top_glyph, + hb_codepoint_t bottom_glyph, + void *user_data HB_UNUSED) +{ + if (font->parent) + return font->parent_scale_y_distance (font->parent->get_glyph_v_kerning (top_glyph, bottom_glyph)); + + return 0; +} + +static hb_bool_t +hb_font_get_glyph_extents_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data HB_UNUSED) +{ + if (font->parent) { + hb_bool_t ret = font->parent->get_glyph_extents (glyph, extents); + if (ret) { + font->parent_scale_position (&extents->x_bearing, &extents->y_bearing); + font->parent_scale_distance (&extents->width, &extents->height); + } + return ret; + } + + memset (extents, 0, sizeof (*extents)); + return false; +} + +static hb_bool_t +hb_font_get_glyph_contour_point_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + unsigned int point_index, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + if (font->parent) { + hb_bool_t ret = font->parent->get_glyph_contour_point (glyph, point_index, x, y); + if (ret) + font->parent_scale_position (x, y); + return ret; + } + + *x = *y = 0; + return false; +} + +static hb_bool_t +hb_font_get_glyph_name_nil (hb_font_t *font, + void *font_data HB_UNUSED, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data HB_UNUSED) +{ + if (font->parent) + return font->parent->get_glyph_name (glyph, name, size); + + if (size) *name = '\0'; + return false; +} + +static hb_bool_t +hb_font_get_glyph_from_name_nil (hb_font_t *font, + void *font_data HB_UNUSED, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) +{ + if (font->parent) + return font->parent->get_glyph_from_name (name, len, glyph); + + *glyph = 0; + return false; +} + + +static const hb_font_funcs_t _hb_font_funcs_nil = { + HB_OBJECT_HEADER_STATIC, + + true, /* immutable */ + + { +#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } +}; + + +/** + * hb_font_funcs_create: (Xconstructor) + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_font_funcs_t * +hb_font_funcs_create (void) +{ + hb_font_funcs_t *ffuncs; + + if (!(ffuncs = hb_object_create ())) + return hb_font_funcs_get_empty (); + + ffuncs->get = _hb_font_funcs_nil.get; + + return ffuncs; +} + +/** + * hb_font_funcs_get_empty: + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_font_funcs_t * +hb_font_funcs_get_empty (void) +{ + return const_cast (&_hb_font_funcs_nil); +} + +/** + * hb_font_funcs_reference: (skip) + * @ffuncs: font functions. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_font_funcs_t * +hb_font_funcs_reference (hb_font_funcs_t *ffuncs) +{ + return hb_object_reference (ffuncs); +} + +/** + * hb_font_funcs_destroy: (skip) + * @ffuncs: font functions. + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_destroy (hb_font_funcs_t *ffuncs) +{ + if (!hb_object_destroy (ffuncs)) return; + +#define HB_FONT_FUNC_IMPLEMENT(name) if (ffuncs->destroy.name) \ + ffuncs->destroy.name (ffuncs->user_data.name); + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + + free (ffuncs); +} + +/** + * hb_font_funcs_set_user_data: (skip) + * @ffuncs: font functions. + * @key: + * @data: + * @destroy: + * @replace: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + return hb_object_set_user_data (ffuncs, key, data, destroy, replace); +} + +/** + * hb_font_funcs_get_user_data: (skip) + * @ffuncs: font functions. + * @key: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +void * +hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key) +{ + return hb_object_get_user_data (ffuncs, key); +} + + +/** + * hb_font_funcs_make_immutable: + * @ffuncs: font functions. + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs) +{ + if (unlikely (hb_object_is_inert (ffuncs))) + return; + + ffuncs->immutable = true; +} + +/** + * hb_font_funcs_is_immutable: + * @ffuncs: font functions. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs) +{ + return ffuncs->immutable; +} + + +#define HB_FONT_FUNC_IMPLEMENT(name) \ + \ +void \ +hb_font_funcs_set_##name##_func (hb_font_funcs_t *ffuncs, \ + hb_font_get_##name##_func_t func, \ + void *user_data, \ + hb_destroy_func_t destroy) \ +{ \ + if (ffuncs->immutable) { \ + if (destroy) \ + destroy (user_data); \ + return; \ + } \ + \ + if (ffuncs->destroy.name) \ + ffuncs->destroy.name (ffuncs->user_data.name); \ + \ + if (func) { \ + ffuncs->get.name = func; \ + ffuncs->user_data.name = user_data; \ + ffuncs->destroy.name = destroy; \ + } else { \ + ffuncs->get.name = hb_font_get_##name##_nil; \ + ffuncs->user_data.name = NULL; \ + ffuncs->destroy.name = NULL; \ + } \ +} + +HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + + +/* Public getters */ + +/** + * hb_font_get_glyph: + * @font: a font. + * @unicode: + * @variation_selector: + * @glyph: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) +{ + return font->get_glyph (unicode, variation_selector, glyph); +} + +/** + * hb_font_get_glyph_h_advance: + * @font: a font. + * @glyph: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_position_t +hb_font_get_glyph_h_advance (hb_font_t *font, + hb_codepoint_t glyph) +{ + return font->get_glyph_h_advance (glyph); +} + +/** + * hb_font_get_glyph_v_advance: + * @font: a font. + * @glyph: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_position_t +hb_font_get_glyph_v_advance (hb_font_t *font, + hb_codepoint_t glyph) +{ + return font->get_glyph_v_advance (glyph); +} + +/** + * hb_font_get_glyph_h_origin: + * @font: a font. + * @glyph: + * @x: (out): + * @y: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_h_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y) +{ + return font->get_glyph_h_origin (glyph, x, y); +} + +/** + * hb_font_get_glyph_v_origin: + * @font: a font. + * @glyph: + * @x: (out): + * @y: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_v_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y) +{ + return font->get_glyph_v_origin (glyph, x, y); +} + +/** + * hb_font_get_glyph_h_kerning: + * @font: a font. + * @left_glyph: + * @right_glyph: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_position_t +hb_font_get_glyph_h_kerning (hb_font_t *font, + hb_codepoint_t left_glyph, hb_codepoint_t right_glyph) +{ + return font->get_glyph_h_kerning (left_glyph, right_glyph); +} + +/** + * hb_font_get_glyph_v_kerning: + * @font: a font. + * @top_glyph: + * @bottom_glyph: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_position_t +hb_font_get_glyph_v_kerning (hb_font_t *font, + hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph) +{ + return font->get_glyph_v_kerning (top_glyph, bottom_glyph); +} + +/** + * hb_font_get_glyph_extents: + * @font: a font. + * @glyph: + * @extents: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_extents (hb_font_t *font, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents) +{ + return font->get_glyph_extents (glyph, extents); +} + +/** + * hb_font_get_glyph_contour_point: + * @font: a font. + * @glyph: + * @point_index: + * @x: (out): + * @y: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_contour_point (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y) +{ + return font->get_glyph_contour_point (glyph, point_index, x, y); +} + +/** + * hb_font_get_glyph_name: + * @font: a font. + * @glyph: + * @name: (array length=size): + * @size: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_name (hb_font_t *font, + hb_codepoint_t glyph, + char *name, unsigned int size) +{ + return font->get_glyph_name (glyph, name, size); +} + +/** + * hb_font_get_glyph_from_name: + * @font: a font. + * @name: (array length=len): + * @len: + * @glyph: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_from_name (hb_font_t *font, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph) +{ + return font->get_glyph_from_name (name, len, glyph); +} + + +/* A bit higher-level, and with fallback */ + +/** + * hb_font_get_glyph_advance_for_direction: + * @font: a font. + * @glyph: + * @direction: + * @x: (out): + * @y: (out): + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_get_glyph_advance_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) +{ + return font->get_glyph_advance_for_direction (glyph, direction, x, y); +} + +/** + * hb_font_get_glyph_origin_for_direction: + * @font: a font. + * @glyph: + * @direction: + * @x: (out): + * @y: (out): + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_get_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) +{ + return font->get_glyph_origin_for_direction (glyph, direction, x, y); +} + +/** + * hb_font_add_glyph_origin_for_direction: + * @font: a font. + * @glyph: + * @direction: + * @x: (out): + * @y: (out): + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_add_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) +{ + return font->add_glyph_origin_for_direction (glyph, direction, x, y); +} + +/** + * hb_font_subtract_glyph_origin_for_direction: + * @font: a font. + * @glyph: + * @direction: + * @x: (out): + * @y: (out): + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) +{ + return font->subtract_glyph_origin_for_direction (glyph, direction, x, y); +} + +/** + * hb_font_get_glyph_kerning_for_direction: + * @font: a font. + * @first_glyph: + * @second_glyph: + * @direction: + * @x: (out): + * @y: (out): + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_get_glyph_kerning_for_direction (hb_font_t *font, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) +{ + return font->get_glyph_kerning_for_direction (first_glyph, second_glyph, direction, x, y); +} + +/** + * hb_font_get_glyph_extents_for_origin: + * @font: a font. + * @glyph: + * @direction: + * @extents: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_extents_for_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_glyph_extents_t *extents) +{ + return font->get_glyph_extents_for_origin (glyph, direction, extents); +} + +/** + * hb_font_get_glyph_contour_point_for_origin: + * @font: a font. + * @glyph: + * @point_index: + * @direction: + * @x: (out): + * @y: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y) +{ + return font->get_glyph_contour_point_for_origin (glyph, point_index, direction, x, y); +} + +/* Generates gidDDD if glyph has no name. */ +/** + * hb_font_glyph_to_string: + * @font: a font. + * @glyph: + * @s: (array length=size): + * @size: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_glyph_to_string (hb_font_t *font, + hb_codepoint_t glyph, + char *s, unsigned int size) +{ + font->glyph_to_string (glyph, s, size); +} + +/* Parses gidDDD and uniUUUU strings automatically. */ +/** + * hb_font_glyph_from_string: + * @font: a font. + * @s: (array length=len) (element-type uint8_t): + * @len: + * @glyph: (out): + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_glyph_from_string (hb_font_t *font, + const char *s, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph) +{ + return font->glyph_from_string (s, len, glyph); +} + + +/* + * hb_font_t + */ + +/** + * hb_font_create: (Xconstructor) + * @face: a face. + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_font_t * +hb_font_create (hb_face_t *face) +{ + hb_font_t *font; + + if (unlikely (!face)) + face = hb_face_get_empty (); + if (!(font = hb_object_create ())) + return hb_font_get_empty (); + + hb_face_make_immutable (face); + font->face = hb_face_reference (face); + font->klass = hb_font_funcs_get_empty (); + + font->x_scale = font->y_scale = hb_face_get_upem (face); + + return font; +} + +/** + * hb_font_create_sub_font: + * @parent: parent font. + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_font_t * +hb_font_create_sub_font (hb_font_t *parent) +{ + if (unlikely (!parent)) + parent = hb_font_get_empty (); + + hb_font_t *font = hb_font_create (parent->face); + + if (unlikely (hb_object_is_inert (font))) + return font; + + font->parent = hb_font_reference (parent); + + font->x_scale = parent->x_scale; + font->y_scale = parent->y_scale; + font->x_ppem = parent->x_ppem; + font->y_ppem = parent->y_ppem; + + return font; +} + +/** + * hb_font_get_empty: + * + * + * + * Return value: (transfer full) + * + * Since: 0.9.2 + **/ +hb_font_t * +hb_font_get_empty (void) +{ + static const hb_font_t _hb_font_nil = { + HB_OBJECT_HEADER_STATIC, + + true, /* immutable */ + + NULL, /* parent */ + const_cast (&_hb_face_nil), + + 0, /* x_scale */ + 0, /* y_scale */ + + 0, /* x_ppem */ + 0, /* y_ppem */ + + const_cast (&_hb_font_funcs_nil), /* klass */ + NULL, /* user_data */ + NULL, /* destroy */ + + { +#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID, +#include "hb-shaper-list.hh" +#undef HB_SHAPER_IMPLEMENT + } + }; + + return const_cast (&_hb_font_nil); +} + +/** + * hb_font_reference: (skip) + * @font: a font. + * + * + * + * Return value: (transfer full): + * + * Since: 0.9.2 + **/ +hb_font_t * +hb_font_reference (hb_font_t *font) +{ + return hb_object_reference (font); +} + +/** + * hb_font_destroy: (skip) + * @font: a font. + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_destroy (hb_font_t *font) +{ + if (!hb_object_destroy (font)) return; + +#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, font); +#include "hb-shaper-list.hh" +#undef HB_SHAPER_IMPLEMENT + + if (font->destroy) + font->destroy (font->user_data); + + hb_font_destroy (font->parent); + hb_face_destroy (font->face); + hb_font_funcs_destroy (font->klass); + + free (font); +} + +/** + * hb_font_set_user_data: (skip) + * @font: a font. + * @key: + * @data: + * @destroy: + * @replace: + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_set_user_data (hb_font_t *font, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + return hb_object_set_user_data (font, key, data, destroy, replace); +} + +/** + * hb_font_get_user_data: (skip) + * @font: a font. + * @key: + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +void * +hb_font_get_user_data (hb_font_t *font, + hb_user_data_key_t *key) +{ + return hb_object_get_user_data (font, key); +} + +/** + * hb_font_make_immutable: + * @font: a font. + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_make_immutable (hb_font_t *font) +{ + if (unlikely (hb_object_is_inert (font))) + return; + + if (font->parent) + hb_font_make_immutable (font->parent); + + font->immutable = true; +} + +/** + * hb_font_is_immutable: + * @font: a font. + * + * + * + * Return value: + * + * Since: 0.9.2 + **/ +hb_bool_t +hb_font_is_immutable (hb_font_t *font) +{ + return font->immutable; +} + +/** + * hb_font_set_parent: + * @font: a font. + * @parent: new parent. + * + * Sets parent font of @font. + * + * Since: 1.0.5 + **/ +void +hb_font_set_parent (hb_font_t *font, + hb_font_t *parent) +{ + if (font->immutable) + return; + + if (!parent) + parent = hb_font_get_empty (); + + hb_font_t *old = font->parent; + + font->parent = hb_font_reference (parent); + + hb_font_destroy (old); +} + +/** + * hb_font_get_parent: + * @font: a font. + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +hb_font_t * +hb_font_get_parent (hb_font_t *font) +{ + return font->parent; +} + +/** + * hb_font_get_face: + * @font: a font. + * + * + * + * Return value: (transfer none): + * + * Since: 0.9.2 + **/ +hb_face_t * +hb_font_get_face (hb_font_t *font) +{ + return font->face; +} + + +/** + * hb_font_set_funcs: + * @font: a font. + * @klass: (closure font_data) (destroy destroy) (scope notified): + * @font_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_set_funcs (hb_font_t *font, + hb_font_funcs_t *klass, + void *font_data, + hb_destroy_func_t destroy) +{ + if (font->immutable) { + if (destroy) + destroy (font_data); + return; + } + + if (font->destroy) + font->destroy (font->user_data); + + if (!klass) + klass = hb_font_funcs_get_empty (); + + hb_font_funcs_reference (klass); + hb_font_funcs_destroy (font->klass); + font->klass = klass; + font->user_data = font_data; + font->destroy = destroy; +} + +/** + * hb_font_set_funcs_data: + * @font: a font. + * @font_data: (destroy destroy) (scope notified): + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_set_funcs_data (hb_font_t *font, + void *font_data, + hb_destroy_func_t destroy) +{ + /* Destroy user_data? */ + if (font->immutable) { + if (destroy) + destroy (font_data); + return; + } + + if (font->destroy) + font->destroy (font->user_data); + + font->user_data = font_data; + font->destroy = destroy; +} + + +/** + * hb_font_set_scale: + * @font: a font. + * @x_scale: + * @y_scale: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_set_scale (hb_font_t *font, + int x_scale, + int y_scale) +{ + if (font->immutable) + return; + + font->x_scale = x_scale; + font->y_scale = y_scale; +} + +/** + * hb_font_get_scale: + * @font: a font. + * @x_scale: (out): + * @y_scale: (out): + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_get_scale (hb_font_t *font, + int *x_scale, + int *y_scale) +{ + if (x_scale) *x_scale = font->x_scale; + if (y_scale) *y_scale = font->y_scale; +} + +/** + * hb_font_set_ppem: + * @font: a font. + * @x_ppem: + * @y_ppem: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_set_ppem (hb_font_t *font, + unsigned int x_ppem, + unsigned int y_ppem) +{ + if (font->immutable) + return; + + font->x_ppem = x_ppem; + font->y_ppem = y_ppem; +} + +/** + * hb_font_get_ppem: + * @font: a font. + * @x_ppem: (out): + * @y_ppem: (out): + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_get_ppem (hb_font_t *font, + unsigned int *x_ppem, + unsigned int *y_ppem) +{ + if (x_ppem) *x_ppem = font->x_ppem; + if (y_ppem) *y_ppem = font->y_ppem; +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-font.h b/3rdparty/harfbuzz-1.0.6/hb-font.h new file mode 100644 index 0000000000..fb4a0eab5a --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-font.h @@ -0,0 +1,512 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include instead." +#endif + +#ifndef HB_FONT_H +#define HB_FONT_H + +#include "hb-common.h" +#include "hb-face.h" + +HB_BEGIN_DECLS + + +typedef struct hb_font_t hb_font_t; + + +/* + * hb_font_funcs_t + */ + +typedef struct hb_font_funcs_t hb_font_funcs_t; + +hb_font_funcs_t * +hb_font_funcs_create (void); + +hb_font_funcs_t * +hb_font_funcs_get_empty (void); + +hb_font_funcs_t * +hb_font_funcs_reference (hb_font_funcs_t *ffuncs); + +void +hb_font_funcs_destroy (hb_font_funcs_t *ffuncs); + +hb_bool_t +hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +void * +hb_font_funcs_get_user_data (hb_font_funcs_t *ffuncs, + hb_user_data_key_t *key); + + +void +hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs); + +hb_bool_t +hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); + + +/* glyph extents */ + +/* Note that height is negative in coordinate systems that grow up. */ +typedef struct hb_glyph_extents_t +{ + hb_position_t x_bearing; /* left side of glyph from origin. */ + hb_position_t y_bearing; /* top side of glyph from origin. */ + hb_position_t width; /* distance from left to right side. */ + hb_position_t height; /* distance from top to bottom side. */ +} hb_glyph_extents_t; + + +/* func types */ + +typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data); + + +typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + void *user_data); +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t; +typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; + +typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y, + void *user_data); +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t; +typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t; + +typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + void *user_data); +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t; +typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t; + + +typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y, + void *user_data); + + +typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data); +typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data); + + +/* func setters */ + +/** + * hb_font_funcs_set_glyph_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_advance_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_advance_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_origin_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_origin_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_h_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_h_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_v_kerning_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_v_kerning_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_extents_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_extents_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_contour_point_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_contour_point_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + +/** + * hb_font_funcs_set_glyph_from_name_func: + * @ffuncs: font functions. + * @func: (closure user_data) (destroy destroy) (scope notified): + * @user_data: + * @destroy: + * + * + * + * Since: 0.9.2 + **/ +void +hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs, + hb_font_get_glyph_from_name_func_t func, + void *user_data, hb_destroy_func_t destroy); + + +/* func dispatch */ + +hb_bool_t +hb_font_get_glyph (hb_font_t *font, + hb_codepoint_t unicode, hb_codepoint_t variation_selector, + hb_codepoint_t *glyph); + +hb_position_t +hb_font_get_glyph_h_advance (hb_font_t *font, + hb_codepoint_t glyph); +hb_position_t +hb_font_get_glyph_v_advance (hb_font_t *font, + hb_codepoint_t glyph); + +hb_bool_t +hb_font_get_glyph_h_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); +hb_bool_t +hb_font_get_glyph_v_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_position_t *x, hb_position_t *y); + +hb_position_t +hb_font_get_glyph_h_kerning (hb_font_t *font, + hb_codepoint_t left_glyph, hb_codepoint_t right_glyph); +hb_position_t +hb_font_get_glyph_v_kerning (hb_font_t *font, + hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph); + +hb_bool_t +hb_font_get_glyph_extents (hb_font_t *font, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents); + +hb_bool_t +hb_font_get_glyph_contour_point (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_position_t *x, hb_position_t *y); + +hb_bool_t +hb_font_get_glyph_name (hb_font_t *font, + hb_codepoint_t glyph, + char *name, unsigned int size); +hb_bool_t +hb_font_get_glyph_from_name (hb_font_t *font, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* high-level funcs, with fallback */ + +void +hb_font_get_glyph_advance_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +void +hb_font_get_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +void +hb_font_add_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); +void +hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +void +hb_font_get_glyph_kerning_for_direction (hb_font_t *font, + hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +hb_bool_t +hb_font_get_glyph_extents_for_origin (hb_font_t *font, + hb_codepoint_t glyph, + hb_direction_t direction, + hb_glyph_extents_t *extents); + +hb_bool_t +hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, + hb_codepoint_t glyph, unsigned int point_index, + hb_direction_t direction, + hb_position_t *x, hb_position_t *y); + +/* Generates gidDDD if glyph has no name. */ +void +hb_font_glyph_to_string (hb_font_t *font, + hb_codepoint_t glyph, + char *s, unsigned int size); +/* Parses gidDDD and uniUUUU strings automatically. */ +hb_bool_t +hb_font_glyph_from_string (hb_font_t *font, + const char *s, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph); + + +/* + * hb_font_t + */ + +/* Fonts are very light-weight objects */ + +hb_font_t * +hb_font_create (hb_face_t *face); + +hb_font_t * +hb_font_create_sub_font (hb_font_t *parent); + +hb_font_t * +hb_font_get_empty (void); + +hb_font_t * +hb_font_reference (hb_font_t *font); + +void +hb_font_destroy (hb_font_t *font); + +hb_bool_t +hb_font_set_user_data (hb_font_t *font, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + +void * +hb_font_get_user_data (hb_font_t *font, + hb_user_data_key_t *key); + +void +hb_font_make_immutable (hb_font_t *font); + +hb_bool_t +hb_font_is_immutable (hb_font_t *font); + +void +hb_font_set_parent (hb_font_t *font, + hb_font_t *parent); + +hb_font_t * +hb_font_get_parent (hb_font_t *font); + +hb_face_t * +hb_font_get_face (hb_font_t *font); + + +void +hb_font_set_funcs (hb_font_t *font, + hb_font_funcs_t *klass, + void *font_data, + hb_destroy_func_t destroy); + +/* Be *very* careful with this function! */ +void +hb_font_set_funcs_data (hb_font_t *font, + void *font_data, + hb_destroy_func_t destroy); + + +void +hb_font_set_scale (hb_font_t *font, + int x_scale, + int y_scale); + +void +hb_font_get_scale (hb_font_t *font, + int *x_scale, + int *y_scale); + +/* + * A zero value means "no hinting in that direction" + */ +void +hb_font_set_ppem (hb_font_t *font, + unsigned int x_ppem, + unsigned int y_ppem); + +void +hb_font_get_ppem (hb_font_t *font, + unsigned int *x_ppem, + unsigned int *y_ppem); + + +HB_END_DECLS + +#endif /* HB_FONT_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ft.cc b/3rdparty/harfbuzz-1.0.6/hb-ft.cc new file mode 100644 index 0000000000..2b11882961 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ft.cc @@ -0,0 +1,650 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2009 Keith Stribley + * Copyright © 2015 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-private.hh" + +#include "hb-ft.h" + +#include "hb-font-private.hh" + +#include FT_ADVANCES_H +#include FT_TRUETYPE_TABLES_H + + + +#ifndef HB_DEBUG_FT +#define HB_DEBUG_FT (HB_DEBUG+0) +#endif + + +/* TODO: + * + * In general, this file does a fine job of what it's supposed to do. + * There are, however, things that need more work: + * + * - I remember seeing FT_Get_Advance() without the NO_HINTING flag to be buggy. + * Have not investigated. + * + * - FreeType works in 26.6 mode. Clients can decide to use that mode, and everything + * would work fine. However, we also abuse this API for performing in font-space, + * but don't pass the correct flags to FreeType. We just abuse the no-hinting mode + * for that, such that no rounding etc happens. As such, we don't set ppem, and + * pass NO_HINTING as load_flags. Would be much better to use NO_SCALE, and scale + * ourselves, like we do in uniscribe, etc. + * + * - We don't handle / allow for emboldening / obliqueing. + * + * - In the future, we should add constructors to create fonts in font space? + * + * - FT_Load_Glyph() is exteremely costly. Do something about it? + */ + + +struct hb_ft_font_t +{ + FT_Face ft_face; + int load_flags; + bool unref; /* Whether to destroy ft_face when done. */ +}; + +static hb_ft_font_t * +_hb_ft_font_create (FT_Face ft_face, bool unref) +{ + hb_ft_font_t *ft_font = (hb_ft_font_t *) calloc (1, sizeof (hb_ft_font_t)); + + if (unlikely (!ft_font)) + return NULL; + + ft_font->ft_face = ft_face; + ft_font->unref = unref; + + ft_font->load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING; + + return ft_font; +} + +static void +_hb_ft_font_destroy (hb_ft_font_t *ft_font) +{ + if (ft_font->unref) + FT_Done_Face (ft_font->ft_face); + + free (ft_font); +} + +/** + * hb_ft_font_set_load_flags: + * @font: + * @load_flags: + * + * + * + * Since: 1.0.5 + **/ +void +hb_ft_font_set_load_flags (hb_font_t *font, int load_flags) +{ + if (font->immutable) + return; + + if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy) + return; + + hb_ft_font_t *ft_font = (hb_ft_font_t *) font->user_data; + + ft_font->load_flags = load_flags; +} + +/** + * hb_ft_font_get_load_flags: + * @font: + * + * + * + * Return value: + * Since: 1.0.5 + **/ +int +hb_ft_font_get_load_flags (hb_font_t *font) +{ + if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy) + return 0; + + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data; + + return ft_font->load_flags; +} + +FT_Face +hb_ft_font_get_face (hb_font_t *font) +{ + if (font->destroy != (hb_destroy_func_t) _hb_ft_font_destroy) + return NULL; + + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font->user_data; + + return ft_font->ft_face; +} + + + +static hb_bool_t +hb_ft_get_glyph (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t unicode, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) + +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + unsigned int g; + + if (likely (!variation_selector)) + g = FT_Get_Char_Index (ft_font->ft_face, unicode); + else + g = FT_Face_GetCharVariantIndex (ft_font->ft_face, unicode, variation_selector); + + if (unlikely (!g)) + return false; + + *glyph = g; + return true; +} + +static hb_position_t +hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Fixed v; + + if (unlikely (FT_Get_Advance (ft_font->ft_face, glyph, ft_font->load_flags, &v))) + return 0; + + if (font->x_scale < 0) + v = -v; + + return (v + (1<<9)) >> 10; +} + +static hb_position_t +hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Fixed v; + + if (unlikely (FT_Get_Advance (ft_font->ft_face, glyph, ft_font->load_flags | FT_LOAD_VERTICAL_LAYOUT, &v))) + return 0; + + if (font->y_scale < 0) + v = -v; + + /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates + * have a Y growing upward. Hence the extra negation. */ + return (-v + (1<<9)) >> 10; +} + +static hb_bool_t +hb_ft_get_glyph_h_origin (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t glyph HB_UNUSED, + hb_position_t *x HB_UNUSED, + hb_position_t *y HB_UNUSED, + void *user_data HB_UNUSED) +{ + /* We always work in the horizontal coordinates. */ + return true; +} + +static hb_bool_t +hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Face ft_face = ft_font->ft_face; + + if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) + return false; + + /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates + * have a Y growing upward. Hence the extra negation. */ + *x = ft_face->glyph->metrics.horiBearingX - ft_face->glyph->metrics.vertBearingX; + *y = ft_face->glyph->metrics.horiBearingY - (-ft_face->glyph->metrics.vertBearingY); + + if (font->x_scale < 0) + *x = -*x; + if (font->y_scale < 0) + *y = -*y; + + return true; +} + +static hb_position_t +hb_ft_get_glyph_h_kerning (hb_font_t *font, + void *font_data, + hb_codepoint_t left_glyph, + hb_codepoint_t right_glyph, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Vector kerningv; + + FT_Kerning_Mode mode = font->x_ppem ? FT_KERNING_DEFAULT : FT_KERNING_UNFITTED; + if (FT_Get_Kerning (ft_font->ft_face, left_glyph, right_glyph, mode, &kerningv)) + return 0; + + return kerningv.x; +} + +static hb_position_t +hb_ft_get_glyph_v_kerning (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t top_glyph HB_UNUSED, + hb_codepoint_t bottom_glyph HB_UNUSED, + void *user_data HB_UNUSED) +{ + /* FreeType API doesn't support vertical kerning */ + return 0; +} + +static hb_bool_t +hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Face ft_face = ft_font->ft_face; + + if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) + return false; + + extents->x_bearing = ft_face->glyph->metrics.horiBearingX; + extents->y_bearing = ft_face->glyph->metrics.horiBearingY; + extents->width = ft_face->glyph->metrics.width; + extents->height = -ft_face->glyph->metrics.height; + return true; +} + +static hb_bool_t +hb_ft_get_glyph_contour_point (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + unsigned int point_index, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Face ft_face = ft_font->ft_face; + + if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) + return false; + + if (unlikely (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE)) + return false; + + if (unlikely (point_index >= (unsigned int) ft_face->glyph->outline.n_points)) + return false; + + *x = ft_face->glyph->outline.points[point_index].x; + *y = ft_face->glyph->outline.points[point_index].y; + + return true; +} + +static hb_bool_t +hb_ft_get_glyph_name (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + + hb_bool_t ret = !FT_Get_Glyph_Name (ft_font->ft_face, glyph, name, size); + if (ret && (size && !*name)) + ret = false; + + return ret; +} + +static hb_bool_t +hb_ft_get_glyph_from_name (hb_font_t *font HB_UNUSED, + void *font_data, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) +{ + const hb_ft_font_t *ft_font = (const hb_ft_font_t *) font_data; + FT_Face ft_face = ft_font->ft_face; + + if (len < 0) + *glyph = FT_Get_Name_Index (ft_face, (FT_String *) name); + else { + /* Make a nul-terminated version. */ + char buf[128]; + len = MIN (len, (int) sizeof (buf) - 1); + strncpy (buf, name, len); + buf[len] = '\0'; + *glyph = FT_Get_Name_Index (ft_face, buf); + } + + if (*glyph == 0) + { + /* Check whether the given name was actually the name of glyph 0. */ + char buf[128]; + if (!FT_Get_Glyph_Name(ft_face, 0, buf, sizeof (buf)) && + len < 0 ? !strcmp (buf, name) : !strncmp (buf, name, len)) + return true; + } + + return *glyph != 0; +} + + +static void +_hb_ft_font_set_funcs (hb_font_t *font, FT_Face ft_face, bool unref) +{ + static const hb_font_funcs_t ft_ffuncs = { + HB_OBJECT_HEADER_STATIC, + + true, /* immutable */ + + { +#define HB_FONT_FUNC_IMPLEMENT(name) hb_ft_get_##name, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } + }; + + hb_font_set_funcs (font, + const_cast (&ft_ffuncs), + _hb_ft_font_create (ft_face, unref), + (hb_destroy_func_t) _hb_ft_font_destroy); +} + + +static hb_blob_t * +reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) +{ + FT_Face ft_face = (FT_Face) user_data; + FT_Byte *buffer; + FT_ULong length = 0; + FT_Error error; + + /* Note: FreeType like HarfBuzz uses the NONE tag for fetching the entire blob */ + + error = FT_Load_Sfnt_Table (ft_face, tag, 0, NULL, &length); + if (error) + return NULL; + + buffer = (FT_Byte *) malloc (length); + if (buffer == NULL) + return NULL; + + error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length); + if (error) + return NULL; + + return hb_blob_create ((const char *) buffer, length, + HB_MEMORY_MODE_WRITABLE, + buffer, free); +} + +/** + * hb_ft_face_create: + * @ft_face: (destroy destroy) (scope notified): + * @destroy: + * + * + * + * Return value: (transfer full): + * Since: 0.9.2 + **/ +hb_face_t * +hb_ft_face_create (FT_Face ft_face, + hb_destroy_func_t destroy) +{ + hb_face_t *face; + + if (ft_face->stream->read == NULL) { + hb_blob_t *blob; + + blob = hb_blob_create ((const char *) ft_face->stream->base, + (unsigned int) ft_face->stream->size, + HB_MEMORY_MODE_READONLY, + ft_face, destroy); + face = hb_face_create (blob, ft_face->face_index); + hb_blob_destroy (blob); + } else { + face = hb_face_create_for_tables (reference_table, ft_face, destroy); + } + + hb_face_set_index (face, ft_face->face_index); + hb_face_set_upem (face, ft_face->units_per_EM); + + return face; +} + +/** + * hb_ft_face_create_referenced: + * @ft_face: + * + * + * + * Return value: (transfer full): + * Since: 0.9.38 + **/ +hb_face_t * +hb_ft_face_create_referenced (FT_Face ft_face) +{ + FT_Reference_Face (ft_face); + return hb_ft_face_create (ft_face, (hb_destroy_func_t) FT_Done_Face); +} + +static void +hb_ft_face_finalize (FT_Face ft_face) +{ + hb_face_destroy ((hb_face_t *) ft_face->generic.data); +} + +/** + * hb_ft_face_create_cached: + * @ft_face: + * + * + * + * Return value: (transfer full): + * Since: 0.9.2 + **/ +hb_face_t * +hb_ft_face_create_cached (FT_Face ft_face) +{ + if (unlikely (!ft_face->generic.data || ft_face->generic.finalizer != (FT_Generic_Finalizer) hb_ft_face_finalize)) + { + if (ft_face->generic.finalizer) + ft_face->generic.finalizer (ft_face); + + ft_face->generic.data = hb_ft_face_create (ft_face, NULL); + ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize; + } + + return hb_face_reference ((hb_face_t *) ft_face->generic.data); +} + + +/** + * hb_ft_font_create: + * @ft_face: (destroy destroy) (scope notified): + * @destroy: + * + * + * + * Return value: (transfer full): + * Since: 0.9.2 + **/ +hb_font_t * +hb_ft_font_create (FT_Face ft_face, + hb_destroy_func_t destroy) +{ + hb_font_t *font; + hb_face_t *face; + + face = hb_ft_face_create (ft_face, destroy); + font = hb_font_create (face); + hb_face_destroy (face); + _hb_ft_font_set_funcs (font, ft_face, false); + hb_font_set_scale (font, + (int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16), + (int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16)); +#if 0 /* hb-ft works in no-hinting model */ + hb_font_set_ppem (font, + ft_face->size->metrics.x_ppem, + ft_face->size->metrics.y_ppem); +#endif + + return font; +} + +/** + * hb_ft_font_create_referenced: + * @ft_face: + * + * + * + * Return value: (transfer full): + * Since: 0.9.38 + **/ +hb_font_t * +hb_ft_font_create_referenced (FT_Face ft_face) +{ + FT_Reference_Face (ft_face); + return hb_ft_font_create (ft_face, (hb_destroy_func_t) FT_Done_Face); +} + + +/* Thread-safe, lock-free, FT_Library */ + +static FT_Library ft_library; + +#ifdef HB_USE_ATEXIT +static +void free_ft_library (void) +{ + FT_Done_FreeType (ft_library); +} +#endif + +static FT_Library +get_ft_library (void) +{ +retry: + FT_Library library = (FT_Library) hb_atomic_ptr_get (&ft_library); + + if (unlikely (!library)) + { + /* Not found; allocate one. */ + if (FT_Init_FreeType (&library)) + return NULL; + + if (!hb_atomic_ptr_cmpexch (&ft_library, NULL, library)) { + FT_Done_FreeType (library); + goto retry; + } + +#ifdef HB_USE_ATEXIT + atexit (free_ft_library); /* First person registers atexit() callback. */ +#endif + } + + return library; +} + +static void +_release_blob (FT_Face ft_face) +{ + hb_blob_destroy ((hb_blob_t *) ft_face->generic.data); +} + +void +hb_ft_font_set_funcs (hb_font_t *font) +{ + hb_blob_t *blob = hb_face_reference_blob (font->face); + unsigned int blob_length; + const char *blob_data = hb_blob_get_data (blob, &blob_length); + if (unlikely (!blob_length)) + DEBUG_MSG (FT, font, "Font face has empty blob"); + + FT_Face ft_face = NULL; + FT_Error err = FT_New_Memory_Face (get_ft_library (), + (const FT_Byte *) blob_data, + blob_length, + hb_face_get_index (font->face), + &ft_face); + + if (unlikely (err)) { + hb_blob_destroy (blob); + DEBUG_MSG (FT, font, "Font face FT_New_Memory_Face() failed"); + return; + } + + FT_Select_Charmap (ft_face, FT_ENCODING_UNICODE); + + FT_Set_Char_Size (ft_face, + abs (font->x_scale), abs (font->y_scale), + 0, 0); +#if 0 + font->x_ppem * 72 * 64 / font->x_scale, + font->y_ppem * 72 * 64 / font->y_scale); +#endif + if (font->x_scale < 0 || font->y_scale < 0) + { + FT_Matrix matrix = { font->x_scale < 0 ? -1 : +1, 0, + 0, font->y_scale < 0 ? -1 : +1}; + FT_Set_Transform (ft_face, &matrix, NULL); + } + + ft_face->generic.data = blob; + ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob; + + _hb_ft_font_set_funcs (font, ft_face, true); + hb_ft_font_set_load_flags (font, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING); +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-ft.h b/3rdparty/harfbuzz-1.0.6/hb-ft.h new file mode 100644 index 0000000000..4bbc826580 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ft.h @@ -0,0 +1,126 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2015 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_FT_H +#define HB_FT_H + +#include "hb.h" + +#include +#include FT_FREETYPE_H + +HB_BEGIN_DECLS + +/* + * Note: FreeType is not thread-safe. + * Hence, these functions are not either. + */ + +/* + * hb-face from ft-face. + */ + +/* This one creates a new hb-face for given ft-face. + * When the returned hb-face is destroyed, the destroy + * callback is called (if not NULL), with the ft-face passed + * to it. + * + * The client is responsible to make sure that ft-face is + * destroyed after hb-face is destroyed. + * + * Most often you don't want this function. You should use either + * hb_ft_face_create_cached(), or hb_ft_face_create_referenced(). + * In particular, if you are going to pass NULL as destroy, you + * probably should use (the more recent) hb_ft_face_create_referenced() + * instead. + */ +hb_face_t * +hb_ft_face_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* This version is like hb_ft_face_create(), except that it caches + * the hb-face using the generic pointer of the ft-face. This means + * that subsequent calls to this function with the same ft-face will + * return the same hb-face (correctly referenced). + * + * Client is still responsible for making sure that ft-face is destroyed + * after hb-face is. + */ +hb_face_t * +hb_ft_face_create_cached (FT_Face ft_face); + +/* This version is like hb_ft_face_create(), except that it calls + * FT_Reference_Face() on ft-face, as such keeping ft-face alive + * as long as the hb-face is. + * + * This is the most convenient version to use. Use it unless you have + * very good reasons not to. + */ +hb_face_t * +hb_ft_face_create_referenced (FT_Face ft_face); + + +/* + * hb-font from ft-face. + */ + +/* + * Note: + * + * Set face size on ft-face before creating hb-font from it. + * Otherwise hb-ft would NOT pick up the font size correctly. + */ + +/* See notes on hb_ft_face_create(). Same issues re lifecycle-management + * apply here. Use hb_ft_font_create_referenced() if you can. */ +hb_font_t * +hb_ft_font_create (FT_Face ft_face, + hb_destroy_func_t destroy); + +/* See notes on hb_ft_face_create_referenced() re lifecycle-management + * issues. */ +hb_font_t * +hb_ft_font_create_referenced (FT_Face ft_face); + +FT_Face +hb_ft_font_get_face (hb_font_t *font); + +void +hb_ft_font_set_load_flags (hb_font_t *font, int load_flags); + +int +hb_ft_font_get_load_flags (hb_font_t *font); + +/* Makes an hb_font_t use FreeType internally to implement font functions. */ +void +hb_ft_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_FT_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-glib.cc b/3rdparty/harfbuzz-1.0.6/hb-glib.cc new file mode 100644 index 0000000000..7dbd83d296 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-glib.cc @@ -0,0 +1,398 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-private.hh" + +#include "hb-glib.h" + +#include "hb-unicode-private.hh" + + +#if !GLIB_CHECK_VERSION(2,29,14) +static const hb_script_t +glib_script_to_script[] = +{ + HB_SCRIPT_COMMON, + HB_SCRIPT_INHERITED, + HB_SCRIPT_ARABIC, + HB_SCRIPT_ARMENIAN, + HB_SCRIPT_BENGALI, + HB_SCRIPT_BOPOMOFO, + HB_SCRIPT_CHEROKEE, + HB_SCRIPT_COPTIC, + HB_SCRIPT_CYRILLIC, + HB_SCRIPT_DESERET, + HB_SCRIPT_DEVANAGARI, + HB_SCRIPT_ETHIOPIC, + HB_SCRIPT_GEORGIAN, + HB_SCRIPT_GOTHIC, + HB_SCRIPT_GREEK, + HB_SCRIPT_GUJARATI, + HB_SCRIPT_GURMUKHI, + HB_SCRIPT_HAN, + HB_SCRIPT_HANGUL, + HB_SCRIPT_HEBREW, + HB_SCRIPT_HIRAGANA, + HB_SCRIPT_KANNADA, + HB_SCRIPT_KATAKANA, + HB_SCRIPT_KHMER, + HB_SCRIPT_LAO, + HB_SCRIPT_LATIN, + HB_SCRIPT_MALAYALAM, + HB_SCRIPT_MONGOLIAN, + HB_SCRIPT_MYANMAR, + HB_SCRIPT_OGHAM, + HB_SCRIPT_OLD_ITALIC, + HB_SCRIPT_ORIYA, + HB_SCRIPT_RUNIC, + HB_SCRIPT_SINHALA, + HB_SCRIPT_SYRIAC, + HB_SCRIPT_TAMIL, + HB_SCRIPT_TELUGU, + HB_SCRIPT_THAANA, + HB_SCRIPT_THAI, + HB_SCRIPT_TIBETAN, + HB_SCRIPT_CANADIAN_SYLLABICS, + HB_SCRIPT_YI, + HB_SCRIPT_TAGALOG, + HB_SCRIPT_HANUNOO, + HB_SCRIPT_BUHID, + HB_SCRIPT_TAGBANWA, + + /* Unicode-4.0 additions */ + HB_SCRIPT_BRAILLE, + HB_SCRIPT_CYPRIOT, + HB_SCRIPT_LIMBU, + HB_SCRIPT_OSMANYA, + HB_SCRIPT_SHAVIAN, + HB_SCRIPT_LINEAR_B, + HB_SCRIPT_TAI_LE, + HB_SCRIPT_UGARITIC, + + /* Unicode-4.1 additions */ + HB_SCRIPT_NEW_TAI_LUE, + HB_SCRIPT_BUGINESE, + HB_SCRIPT_GLAGOLITIC, + HB_SCRIPT_TIFINAGH, + HB_SCRIPT_SYLOTI_NAGRI, + HB_SCRIPT_OLD_PERSIAN, + HB_SCRIPT_KHAROSHTHI, + + /* Unicode-5.0 additions */ + HB_SCRIPT_UNKNOWN, + HB_SCRIPT_BALINESE, + HB_SCRIPT_CUNEIFORM, + HB_SCRIPT_PHOENICIAN, + HB_SCRIPT_PHAGS_PA, + HB_SCRIPT_NKO, + + /* Unicode-5.1 additions */ + HB_SCRIPT_KAYAH_LI, + HB_SCRIPT_LEPCHA, + HB_SCRIPT_REJANG, + HB_SCRIPT_SUNDANESE, + HB_SCRIPT_SAURASHTRA, + HB_SCRIPT_CHAM, + HB_SCRIPT_OL_CHIKI, + HB_SCRIPT_VAI, + HB_SCRIPT_CARIAN, + HB_SCRIPT_LYCIAN, + HB_SCRIPT_LYDIAN, + + /* Unicode-5.2 additions */ + HB_SCRIPT_AVESTAN, + HB_SCRIPT_BAMUM, + HB_SCRIPT_EGYPTIAN_HIEROGLYPHS, + HB_SCRIPT_IMPERIAL_ARAMAIC, + HB_SCRIPT_INSCRIPTIONAL_PAHLAVI, + HB_SCRIPT_INSCRIPTIONAL_PARTHIAN, + HB_SCRIPT_JAVANESE, + HB_SCRIPT_KAITHI, + HB_SCRIPT_TAI_THAM, + HB_SCRIPT_LISU, + HB_SCRIPT_MEETEI_MAYEK, + HB_SCRIPT_OLD_SOUTH_ARABIAN, + HB_SCRIPT_OLD_TURKIC, + HB_SCRIPT_SAMARITAN, + HB_SCRIPT_TAI_VIET, + + /* Unicode-6.0 additions */ + HB_SCRIPT_BATAK, + HB_SCRIPT_BRAHMI, + HB_SCRIPT_MANDAIC, + + /* Unicode-6.1 additions */ + HB_SCRIPT_CHAKMA, + HB_SCRIPT_MEROITIC_CURSIVE, + HB_SCRIPT_MEROITIC_HIEROGLYPHS, + HB_SCRIPT_MIAO, + HB_SCRIPT_SHARADA, + HB_SCRIPT_SORA_SOMPENG, + HB_SCRIPT_TAKRI +}; +#endif + +hb_script_t +hb_glib_script_to_script (GUnicodeScript script) +{ +#if GLIB_CHECK_VERSION(2,29,14) + return (hb_script_t) g_unicode_script_to_iso15924 (script); +#else + if (likely ((unsigned int) script < ARRAY_LENGTH (glib_script_to_script))) + return glib_script_to_script[script]; + + if (unlikely (script == G_UNICODE_SCRIPT_INVALID_CODE)) + return HB_SCRIPT_INVALID; + + return HB_SCRIPT_UNKNOWN; +#endif +} + +GUnicodeScript +hb_glib_script_from_script (hb_script_t script) +{ +#if GLIB_CHECK_VERSION(2,29,14) + return g_unicode_script_from_iso15924 (script); +#else + unsigned int count = ARRAY_LENGTH (glib_script_to_script); + for (unsigned int i = 0; i < count; i++) + if (glib_script_to_script[i] == script) + return (GUnicodeScript) i; + + if (unlikely (script == HB_SCRIPT_INVALID)) + return G_UNICODE_SCRIPT_INVALID_CODE; + + return G_UNICODE_SCRIPT_UNKNOWN; +#endif +} + + +static hb_unicode_combining_class_t +hb_glib_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) + +{ + return (hb_unicode_combining_class_t) g_unichar_combining_class (unicode); +} + +static unsigned int +hb_glib_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) +{ + return g_unichar_iswide (unicode) ? 2 : 1; +} + +static hb_unicode_general_category_t +hb_glib_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) + +{ + /* hb_unicode_general_category_t and GUnicodeType are identical */ + return (hb_unicode_general_category_t) g_unichar_type (unicode); +} + +static hb_codepoint_t +hb_glib_unicode_mirroring (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) +{ + g_unichar_get_mirror_char (unicode, &unicode); + return unicode; +} + +static hb_script_t +hb_glib_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) +{ + return hb_glib_script_to_script (g_unichar_get_script (unicode)); +} + +static hb_bool_t +hb_glib_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab, + void *user_data HB_UNUSED) +{ +#if GLIB_CHECK_VERSION(2,29,12) + return g_unichar_compose (a, b, ab); +#endif + + /* We don't ifdef-out the fallback code such that compiler always + * sees it and makes sure it's compilable. */ + + gchar utf8[12]; + gchar *normalized; + int len; + hb_bool_t ret; + + len = g_unichar_to_utf8 (a, utf8); + len += g_unichar_to_utf8 (b, utf8 + len); + normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFC); + len = g_utf8_strlen (normalized, -1); + if (unlikely (!len)) + return false; + + if (len == 1) { + *ab = g_utf8_get_char (normalized); + ret = true; + } else { + ret = false; + } + + g_free (normalized); + return ret; +} + +static hb_bool_t +hb_glib_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b, + void *user_data HB_UNUSED) +{ +#if GLIB_CHECK_VERSION(2,29,12) + return g_unichar_decompose (ab, a, b); +#endif + + /* We don't ifdef-out the fallback code such that compiler always + * sees it and makes sure it's compilable. */ + + gchar utf8[6]; + gchar *normalized; + int len; + hb_bool_t ret; + + len = g_unichar_to_utf8 (ab, utf8); + normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFD); + len = g_utf8_strlen (normalized, -1); + if (unlikely (!len)) + return false; + + if (len == 1) { + *a = g_utf8_get_char (normalized); + *b = 0; + ret = *a != ab; + } else if (len == 2) { + *a = g_utf8_get_char (normalized); + *b = g_utf8_get_char (g_utf8_next_char (normalized)); + /* Here's the ugly part: if ab decomposes to a single character and + * that character decomposes again, we have to detect that and undo + * the second part :-(. */ + gchar *recomposed = g_utf8_normalize (normalized, -1, G_NORMALIZE_NFC); + hb_codepoint_t c = g_utf8_get_char (recomposed); + if (c != ab && c != *a) { + *a = c; + *b = 0; + } + g_free (recomposed); + ret = true; + } else { + /* If decomposed to more than two characters, take the last one, + * and recompose the rest to get the first component. */ + gchar *end = g_utf8_offset_to_pointer (normalized, len - 1); + gchar *recomposed; + *b = g_utf8_get_char (end); + recomposed = g_utf8_normalize (normalized, end - normalized, G_NORMALIZE_NFC); + /* We expect that recomposed has exactly one character now. */ + *a = g_utf8_get_char (recomposed); + g_free (recomposed); + ret = true; + } + + g_free (normalized); + return ret; +} + +static unsigned int +hb_glib_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t u, + hb_codepoint_t *decomposed, + void *user_data HB_UNUSED) +{ +#if GLIB_CHECK_VERSION(2,29,12) + return g_unichar_fully_decompose (u, true, decomposed, HB_UNICODE_MAX_DECOMPOSITION_LEN); +#endif + + /* If the user doesn't have GLib >= 2.29.12 we have to perform + * a round trip to UTF-8 and the associated memory management dance. */ + gchar utf8[6]; + gchar *utf8_decomposed, *c; + gsize utf8_len, utf8_decomposed_len, i; + + /* Convert @u to UTF-8 and normalise it in NFKD mode. This performs the compatibility decomposition. */ + utf8_len = g_unichar_to_utf8 (u, utf8); + utf8_decomposed = g_utf8_normalize (utf8, utf8_len, G_NORMALIZE_NFKD); + utf8_decomposed_len = g_utf8_strlen (utf8_decomposed, -1); + + assert (utf8_decomposed_len <= HB_UNICODE_MAX_DECOMPOSITION_LEN); + + for (i = 0, c = utf8_decomposed; i < utf8_decomposed_len; i++, c = g_utf8_next_char (c)) + *decomposed++ = g_utf8_get_char (c); + + g_free (utf8_decomposed); + + return utf8_decomposed_len; +} + +hb_unicode_funcs_t * +hb_glib_get_unicode_funcs (void) +{ + static const hb_unicode_funcs_t _hb_glib_unicode_funcs = { + HB_OBJECT_HEADER_STATIC, + + NULL, /* parent */ + true, /* immutable */ + { +#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_glib_unicode_##name, + HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_UNICODE_FUNC_IMPLEMENT + } + }; + + return const_cast (&_hb_glib_unicode_funcs); +} + +/** + * Since: 0.9.38 + **/ +hb_blob_t * +hb_glib_blob_create (GBytes *gbytes) +{ + gsize size = 0; + gconstpointer data = g_bytes_get_data (gbytes, &size); + return hb_blob_create ((const char *) data, + size, + HB_MEMORY_MODE_READONLY, + g_bytes_ref (gbytes), + (hb_destroy_func_t) g_bytes_unref); +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-glib.h b/3rdparty/harfbuzz-1.0.6/hb-glib.h new file mode 100644 index 0000000000..1a8f42ea52 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-glib.h @@ -0,0 +1,55 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GLIB_H +#define HB_GLIB_H + +#include "hb.h" + +#include + +HB_BEGIN_DECLS + + +hb_script_t +hb_glib_script_to_script (GUnicodeScript script); + +GUnicodeScript +hb_glib_script_from_script (hb_script_t script); + + +hb_unicode_funcs_t * +hb_glib_get_unicode_funcs (void); + +hb_blob_t * +hb_glib_blob_create (GBytes *gbytes); + + +HB_END_DECLS + +#endif /* HB_GLIB_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-gobject-structs.cc b/3rdparty/harfbuzz-1.0.6/hb-gobject-structs.cc new file mode 100644 index 0000000000..6bd63368b6 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-gobject-structs.cc @@ -0,0 +1,80 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-private.hh" + +/* g++ didn't like older gtype.h gcc-only code path. */ +#include +#if !GLIB_CHECK_VERSION(2,29,16) +#undef __GNUC__ +#undef __GNUC_MINOR__ +#define __GNUC__ 2 +#define __GNUC_MINOR__ 6 +#endif + +#include "hb-gobject.h" + +#define HB_DEFINE_BOXED_TYPE(name,copy_func,free_func) \ +GType \ +hb_gobject_##name##_get_type (void) \ +{ \ + static gsize type_id = 0; \ + if (g_once_init_enter (&type_id)) { \ + GType id = g_boxed_type_register_static (g_intern_static_string ("hb_" #name "_t"), \ + (GBoxedCopyFunc) copy_func, \ + (GBoxedFreeFunc) free_func); \ + g_once_init_leave (&type_id, id); \ + } \ + return type_id; \ +} + +#define HB_DEFINE_OBJECT_TYPE(name) \ + HB_DEFINE_BOXED_TYPE (name, hb_##name##_reference, hb_##name##_destroy); + +#define HB_DEFINE_VALUE_TYPE(name) \ + static hb_##name##_t *_hb_##name##_reference (const hb_##name##_t *l) \ + { \ + hb_##name##_t *c = (hb_##name##_t *) calloc (1, sizeof (hb_##name##_t)); \ + if (unlikely (!c)) return NULL; \ + *c = *l; \ + return c; \ + } \ + static void _hb_##name##_destroy (hb_##name##_t *l) { free (l); } \ + HB_DEFINE_BOXED_TYPE (name, _hb_##name##_reference, _hb_##name##_destroy); + +HB_DEFINE_OBJECT_TYPE (buffer) +HB_DEFINE_OBJECT_TYPE (blob) +HB_DEFINE_OBJECT_TYPE (face) +HB_DEFINE_OBJECT_TYPE (font) +HB_DEFINE_OBJECT_TYPE (font_funcs) +HB_DEFINE_OBJECT_TYPE (set) +HB_DEFINE_OBJECT_TYPE (shape_plan) +HB_DEFINE_OBJECT_TYPE (unicode_funcs) +HB_DEFINE_VALUE_TYPE (feature) +HB_DEFINE_VALUE_TYPE (glyph_info) +HB_DEFINE_VALUE_TYPE (glyph_position) +HB_DEFINE_VALUE_TYPE (segment_properties) +HB_DEFINE_VALUE_TYPE (user_data_key) diff --git a/3rdparty/harfbuzz-1.0.6/hb-gobject-structs.h b/3rdparty/harfbuzz-1.0.6/hb-gobject-structs.h new file mode 100644 index 0000000000..0a0387dce3 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-gobject-structs.h @@ -0,0 +1,105 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H_IN +#error "Include instead." +#endif + +#ifndef HB_GOBJECT_STRUCTS_H +#define HB_GOBJECT_STRUCTS_H + +#include "hb.h" + +#include + +HB_BEGIN_DECLS + + +/* Object types */ + +/** + * Since: 0.9.2 + **/ +GType hb_gobject_blob_get_type (void); +#define HB_GOBJECT_TYPE_BLOB (hb_gobject_blob_get_type ()) + +/** + * Since: 0.9.2 + **/ +GType hb_gobject_buffer_get_type (void); +#define HB_GOBJECT_TYPE_BUFFER (hb_gobject_buffer_get_type ()) + +/** + * Since: 0.9.2 + **/ +GType hb_gobject_face_get_type (void); +#define HB_GOBJECT_TYPE_FACE (hb_gobject_face_get_type ()) + +/** + * Since: 0.9.2 + **/ +GType hb_gobject_font_get_type (void); +#define HB_GOBJECT_TYPE_FONT (hb_gobject_font_get_type ()) + +/** + * Since: 0.9.2 + **/ +GType hb_gobject_font_funcs_get_type (void); +#define HB_GOBJECT_TYPE_FONT_FUNCS (hb_gobject_font_funcs_get_type ()) + +GType hb_gobject_set_get_type (void); +#define HB_GOBJECT_TYPE_SET (hb_gobject_set_get_type ()) + +GType hb_gobject_shape_plan_get_type (void); +#define HB_GOBJECT_TYPE_SHAPE_PLAN (hb_gobject_shape_plan_get_type ()) + +/** + * Since: 0.9.2 + **/ +GType hb_gobject_unicode_funcs_get_type (void); +#define HB_GOBJECT_TYPE_UNICODE_FUNCS (hb_gobject_unicode_funcs_get_type ()) + +/* Value types */ + +GType hb_gobject_feature_get_type (void); +#define HB_GOBJECT_TYPE_FEATURE (hb_gobject_feature_get_type ()) + +GType hb_gobject_glyph_info_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_INFO (hb_gobject_glyph_info_get_type ()) + +GType hb_gobject_glyph_position_get_type (void); +#define HB_GOBJECT_TYPE_GLYPH_POSITION (hb_gobject_glyph_position_get_type ()) + +GType hb_gobject_segment_properties_get_type (void); +#define HB_GOBJECT_TYPE_SEGMENT_PROPERTIES (hb_gobject_segment_properties_get_type ()) + +GType hb_gobject_user_data_key_get_type (void); +#define HB_GOBJECT_TYPE_USER_DATA_KEY (hb_gobject_user_data_key_get_type ()) + + +HB_END_DECLS + +#endif /* HB_GOBJECT_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-gobject.h b/3rdparty/harfbuzz-1.0.6/hb-gobject.h new file mode 100644 index 0000000000..ea1bd25df8 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-gobject.h @@ -0,0 +1,40 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_GOBJECT_H +#define HB_GOBJECT_H +#define HB_GOBJECT_H_IN + +#include "hb.h" + +#include "hb-gobject-enums.h" +#include "hb-gobject-structs.h" + +HB_BEGIN_DECLS +HB_END_DECLS + +#undef HB_GOBJECT_H_IN +#endif /* HB_GOBJECT_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-graphite2.cc b/3rdparty/harfbuzz-1.0.6/hb-graphite2.cc new file mode 100644 index 0000000000..cd694c1406 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-graphite2.cc @@ -0,0 +1,409 @@ +/* + * Copyright © 2011 Martin Hosken + * Copyright © 2011 SIL International + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#define HB_SHAPER graphite2 +#define hb_graphite2_shaper_font_data_t gr_font +#include "hb-shaper-impl-private.hh" + +#include "hb-graphite2.h" + +#include + + +HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, face) +HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, font) + + +/* + * shaper face data + */ + +typedef struct hb_graphite2_tablelist_t { + struct hb_graphite2_tablelist_t *next; + hb_blob_t *blob; + unsigned int tag; +} hb_graphite2_tablelist_t; + +struct hb_graphite2_shaper_face_data_t { + hb_face_t *face; + gr_face *grface; + hb_graphite2_tablelist_t *tlist; +}; + +static const void *hb_graphite2_get_table (const void *data, unsigned int tag, size_t *len) +{ + hb_graphite2_shaper_face_data_t *face_data = (hb_graphite2_shaper_face_data_t *) data; + hb_graphite2_tablelist_t *tlist = face_data->tlist; + + hb_blob_t *blob = NULL; + + for (hb_graphite2_tablelist_t *p = tlist; p; p = p->next) + if (p->tag == tag) { + blob = p->blob; + break; + } + + if (unlikely (!blob)) + { + blob = face_data->face->reference_table (tag); + + hb_graphite2_tablelist_t *p = (hb_graphite2_tablelist_t *) calloc (1, sizeof (hb_graphite2_tablelist_t)); + if (unlikely (!p)) { + hb_blob_destroy (blob); + return NULL; + } + p->blob = blob; + p->tag = tag; + + /* TODO Not thread-safe, but fairly harmless. + * We can do the double-chcked pointer cmpexch thing here. */ + p->next = face_data->tlist; + face_data->tlist = p; + } + + unsigned int tlen; + const char *d = hb_blob_get_data (blob, &tlen); + *len = tlen; + return d; +} + +hb_graphite2_shaper_face_data_t * +_hb_graphite2_shaper_face_data_create (hb_face_t *face) +{ + hb_blob_t *silf_blob = face->reference_table (HB_GRAPHITE2_TAG_SILF); + /* Umm, we just reference the table to check whether it exists. + * Maybe add better API for this? */ + if (!hb_blob_get_length (silf_blob)) + { + hb_blob_destroy (silf_blob); + return NULL; + } + hb_blob_destroy (silf_blob); + + hb_graphite2_shaper_face_data_t *data = (hb_graphite2_shaper_face_data_t *) calloc (1, sizeof (hb_graphite2_shaper_face_data_t)); + if (unlikely (!data)) + return NULL; + + data->face = face; + data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_preloadAll); + + if (unlikely (!data->grface)) { + free (data); + return NULL; + } + + return data; +} + +void +_hb_graphite2_shaper_face_data_destroy (hb_graphite2_shaper_face_data_t *data) +{ + hb_graphite2_tablelist_t *tlist = data->tlist; + + while (tlist) + { + hb_graphite2_tablelist_t *old = tlist; + hb_blob_destroy (tlist->blob); + tlist = tlist->next; + free (old); + } + + gr_face_destroy (data->grface); + + free (data); +} + +/* + * Since: 0.9.10 + */ +gr_face * +hb_graphite2_face_get_gr_face (hb_face_t *face) +{ + if (unlikely (!hb_graphite2_shaper_face_data_ensure (face))) return NULL; + return HB_SHAPER_DATA_GET (face)->grface; +} + + +/* + * shaper font data + */ + +static float hb_graphite2_get_advance (const void *hb_font, unsigned short gid) +{ + return ((hb_font_t *) hb_font)->get_glyph_h_advance (gid); +} + +hb_graphite2_shaper_font_data_t * +_hb_graphite2_shaper_font_data_create (hb_font_t *font) +{ + if (unlikely (!hb_graphite2_shaper_face_data_ensure (font->face))) return NULL; + + hb_face_t *face = font->face; + hb_graphite2_shaper_face_data_t *face_data = HB_SHAPER_DATA_GET (face); + + return gr_make_font_with_advance_fn (font->x_scale, font, &hb_graphite2_get_advance, face_data->grface); +} + +void +_hb_graphite2_shaper_font_data_destroy (hb_graphite2_shaper_font_data_t *data) +{ + gr_font_destroy (data); +} + +/* + * Since: 0.9.10 + */ +gr_font * +hb_graphite2_font_get_gr_font (hb_font_t *font) +{ + if (unlikely (!hb_graphite2_shaper_font_data_ensure (font))) return NULL; + return HB_SHAPER_DATA_GET (font); +} + + +/* + * shaper shape_plan data + */ + +struct hb_graphite2_shaper_shape_plan_data_t {}; + +hb_graphite2_shaper_shape_plan_data_t * +_hb_graphite2_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED, + const hb_feature_t *user_features HB_UNUSED, + unsigned int num_user_features HB_UNUSED) +{ + return (hb_graphite2_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED; +} + +void +_hb_graphite2_shaper_shape_plan_data_destroy (hb_graphite2_shaper_shape_plan_data_t *data HB_UNUSED) +{ +} + + +/* + * shaper + */ + +struct hb_graphite2_cluster_t { + unsigned int base_char; + unsigned int num_chars; + unsigned int base_glyph; + unsigned int num_glyphs; + unsigned int cluster; +}; + +hb_bool_t +_hb_graphite2_shape (hb_shape_plan_t *shape_plan, + hb_font_t *font, + hb_buffer_t *buffer, + const hb_feature_t *features, + unsigned int num_features) +{ + hb_face_t *face = font->face; + gr_face *grface = HB_SHAPER_DATA_GET (face)->grface; + gr_font *grfont = HB_SHAPER_DATA_GET (font); + + const char *lang = hb_language_to_string (hb_buffer_get_language (buffer)); + const char *lang_end = lang ? strchr (lang, '-') : NULL; + int lang_len = lang_end ? lang_end - lang : -1; + gr_feature_val *feats = gr_face_featureval_for_lang (grface, lang ? hb_tag_from_string (lang, lang_len) : 0); + + for (unsigned int i = 0; i < num_features; i++) + { + const gr_feature_ref *fref = gr_face_find_fref (grface, features[i].tag); + if (fref) + gr_fref_set_feature_value (fref, features[i].value, feats); + } + + gr_segment *seg = NULL; + const gr_slot *is; + unsigned int ci = 0, ic = 0; + float curradvx = 0., curradvy = 0.; + + unsigned int scratch_size; + hb_buffer_t::scratch_buffer_t *scratch = buffer->get_scratch_buffer (&scratch_size); + + uint32_t *chars = (uint32_t *) scratch; + + for (unsigned int i = 0; i < buffer->len; ++i) + chars[i] = buffer->info[i].codepoint; + + /* TODO ensure_native_direction. */ + + hb_tag_t script_tag[2]; + hb_ot_tags_from_script (hb_buffer_get_script (buffer), &script_tag[0], &script_tag[1]); + + seg = gr_make_seg (grfont, grface, + script_tag[1] == HB_TAG_NONE ? script_tag[0] : script_tag[1], + feats, + gr_utf32, chars, buffer->len, + 2 | (hb_buffer_get_direction (buffer) == HB_DIRECTION_RTL ? 1 : 0)); + + if (unlikely (!seg)) { + if (feats) gr_featureval_destroy (feats); + return false; + } + + unsigned int glyph_count = gr_seg_n_slots (seg); + if (unlikely (!glyph_count)) { + if (feats) gr_featureval_destroy (feats); + gr_seg_destroy (seg); + buffer->len = 0; + return true; + } + + buffer->ensure (glyph_count); + scratch = buffer->get_scratch_buffer (&scratch_size); + while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scratch)) + + DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size) + { + if (unlikely (!buffer->ensure (buffer->allocated * 2))) + { + if (feats) gr_featureval_destroy (feats); + gr_seg_destroy (seg); + return false; + } + scratch = buffer->get_scratch_buffer (&scratch_size); + } + +#define ALLOCATE_ARRAY(Type, name, len) \ + Type *name = (Type *) scratch; \ + { \ + unsigned int _consumed = DIV_CEIL ((len) * sizeof (Type), sizeof (*scratch)); \ + assert (_consumed <= scratch_size); \ + scratch += _consumed; \ + scratch_size -= _consumed; \ + } + + ALLOCATE_ARRAY (hb_graphite2_cluster_t, clusters, buffer->len); + ALLOCATE_ARRAY (hb_codepoint_t, gids, glyph_count); + +#undef ALLOCATE_ARRAY + + memset (clusters, 0, sizeof (clusters[0]) * buffer->len); + + hb_codepoint_t *pg = gids; + clusters[0].cluster = buffer->info[0].cluster; + for (is = gr_seg_first_slot (seg), ic = 0; is; is = gr_slot_next_in_segment (is), ic++) + { + unsigned int before = gr_slot_before (is); + unsigned int after = gr_slot_after (is); + *pg = gr_slot_gid (is); + pg++; + while (clusters[ci].base_char > before && ci) + { + clusters[ci-1].num_chars += clusters[ci].num_chars; + clusters[ci-1].num_glyphs += clusters[ci].num_glyphs; + ci--; + } + + if (gr_slot_can_insert_before (is) && clusters[ci].num_chars && before >= clusters[ci].base_char + clusters[ci].num_chars) + { + hb_graphite2_cluster_t *c = clusters + ci + 1; + c->base_char = clusters[ci].base_char + clusters[ci].num_chars; + c->cluster = buffer->info[c->base_char].cluster; + c->num_chars = before - c->base_char; + c->base_glyph = ic; + c->num_glyphs = 0; + ci++; + } + clusters[ci].num_glyphs++; + + if (clusters[ci].base_char + clusters[ci].num_chars < after + 1) + clusters[ci].num_chars = after + 1 - clusters[ci].base_char; + } + ci++; + + for (unsigned int i = 0; i < ci; ++i) + { + for (unsigned int j = 0; j < clusters[i].num_glyphs; ++j) + { + hb_glyph_info_t *info = &buffer->info[clusters[i].base_glyph + j]; + info->codepoint = gids[clusters[i].base_glyph + j]; + info->cluster = clusters[i].cluster; + } + } + buffer->len = glyph_count; + + /* Positioning. */ + if (!HB_DIRECTION_IS_BACKWARD(buffer->props.direction)) + { + hb_glyph_position_t *pPos; + for (pPos = hb_buffer_get_glyph_positions (buffer, NULL), is = gr_seg_first_slot (seg); + is; pPos++, is = gr_slot_next_in_segment (is)) + { + pPos->x_offset = gr_slot_origin_X (is) - curradvx; + pPos->y_offset = gr_slot_origin_Y (is) - curradvy; + pPos->x_advance = gr_slot_advance_X (is, grface, grfont); + pPos->y_advance = gr_slot_advance_Y (is, grface, grfont); + curradvx += pPos->x_advance; + curradvy += pPos->y_advance; + } + pPos[-1].x_advance += gr_seg_advance_X(seg) - curradvx; + } + else + { + hb_glyph_position_t *pPos = hb_buffer_get_glyph_positions (buffer, NULL) + buffer->len - 1; + const hb_glyph_info_t *info = buffer->info + buffer->len - 1; + const hb_glyph_info_t *tinfo; + const gr_slot *tis; + int currclus = -1; + float clusx = 0., clusy = 0.; + for (is = gr_seg_last_slot (seg); is; pPos--, info--, is = gr_slot_prev_in_segment (is)) + { + if (info->cluster != currclus) + { + curradvx += clusx; + curradvy += clusy; + currclus = info->cluster; + clusx = 0.; + clusy = 0.; + for (tis = is, tinfo = info; tis && tinfo->cluster == currclus; tis = gr_slot_prev_in_segment (tis), tinfo--) + { + clusx += gr_slot_advance_X (tis, grface, grfont); + clusy += gr_slot_advance_Y (tis, grface, grfont); + } + curradvx += clusx; + curradvy += clusy; + } + pPos->x_advance = gr_slot_advance_X (is, grface, grfont); + pPos->y_advance = gr_slot_advance_Y (is, grface, grfont); + curradvx -= pPos->x_advance; + curradvy -= pPos->y_advance; + pPos->x_offset = gr_slot_origin_X (is) - curradvx; + pPos->y_offset = gr_slot_origin_Y (is) - curradvy; + } + hb_buffer_reverse_clusters (buffer); + } + + if (feats) gr_featureval_destroy (feats); + gr_seg_destroy (seg); + + return true; +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-graphite2.h b/3rdparty/harfbuzz-1.0.6/hb-graphite2.h new file mode 100644 index 0000000000..3eae54acbd --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-graphite2.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2011 Martin Hosken + * Copyright (C) 2011 SIL International + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifndef HB_GRAPHITE2_H +#define HB_GRAPHITE2_H + +#include "hb.h" + +#include + +HB_BEGIN_DECLS + + +#define HB_GRAPHITE2_TAG_SILF HB_TAG('S','i','l','f') + + +gr_face * +hb_graphite2_face_get_gr_face (hb_face_t *face); + +gr_font * +hb_graphite2_font_get_gr_font (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_GRAPHITE2_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-icu.cc b/3rdparty/harfbuzz-1.0.6/hb-icu.cc new file mode 100644 index 0000000000..24cec9d726 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-icu.cc @@ -0,0 +1,370 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2009 Keith Stribley + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#include "hb-private.hh" + +#include "hb-icu.h" + +#include "hb-unicode-private.hh" + +#include +#include +#include +#include + + +hb_script_t +hb_icu_script_to_script (UScriptCode script) +{ + if (unlikely (script == USCRIPT_INVALID_CODE)) + return HB_SCRIPT_INVALID; + + return hb_script_from_string (uscript_getShortName (script), -1); +} + +UScriptCode +hb_icu_script_from_script (hb_script_t script) +{ + if (unlikely (script == HB_SCRIPT_INVALID)) + return USCRIPT_INVALID_CODE; + + for (unsigned int i = 0; i < USCRIPT_CODE_LIMIT; i++) + if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script)) + return (UScriptCode) i; + + return USCRIPT_UNKNOWN; +} + + +static hb_unicode_combining_class_t +hb_icu_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) + +{ + return (hb_unicode_combining_class_t) u_getCombiningClass (unicode); +} + +static unsigned int +hb_icu_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) +{ + switch (u_getIntPropertyValue(unicode, UCHAR_EAST_ASIAN_WIDTH)) + { + case U_EA_WIDE: + case U_EA_FULLWIDTH: + return 2; + case U_EA_NEUTRAL: + case U_EA_AMBIGUOUS: + case U_EA_HALFWIDTH: + case U_EA_NARROW: + return 1; + } + return 1; +} + +static hb_unicode_general_category_t +hb_icu_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) +{ + switch (u_getIntPropertyValue(unicode, UCHAR_GENERAL_CATEGORY)) + { + case U_UNASSIGNED: return HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED; + + case U_UPPERCASE_LETTER: return HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER; + case U_LOWERCASE_LETTER: return HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER; + case U_TITLECASE_LETTER: return HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER; + case U_MODIFIER_LETTER: return HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER; + case U_OTHER_LETTER: return HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER; + + case U_NON_SPACING_MARK: return HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK; + case U_ENCLOSING_MARK: return HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK; + case U_COMBINING_SPACING_MARK: return HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK; + + case U_DECIMAL_DIGIT_NUMBER: return HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER; + case U_LETTER_NUMBER: return HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER; + case U_OTHER_NUMBER: return HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER; + + case U_SPACE_SEPARATOR: return HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR; + case U_LINE_SEPARATOR: return HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR; + case U_PARAGRAPH_SEPARATOR: return HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR; + + case U_CONTROL_CHAR: return HB_UNICODE_GENERAL_CATEGORY_CONTROL; + case U_FORMAT_CHAR: return HB_UNICODE_GENERAL_CATEGORY_FORMAT; + case U_PRIVATE_USE_CHAR: return HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE; + case U_SURROGATE: return HB_UNICODE_GENERAL_CATEGORY_SURROGATE; + + + case U_DASH_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION; + case U_START_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION; + case U_END_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION; + case U_CONNECTOR_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION; + case U_OTHER_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION; + + case U_MATH_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL; + case U_CURRENCY_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL; + case U_MODIFIER_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL; + case U_OTHER_SYMBOL: return HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL; + + case U_INITIAL_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION; + case U_FINAL_PUNCTUATION: return HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION; + } + + return HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED; +} + +static hb_codepoint_t +hb_icu_unicode_mirroring (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) +{ + return u_charMirror(unicode); +} + +static hb_script_t +hb_icu_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t unicode, + void *user_data HB_UNUSED) +{ + UErrorCode status = U_ZERO_ERROR; + UScriptCode scriptCode = uscript_getScript(unicode, &status); + + if (unlikely (U_FAILURE (status))) + return HB_SCRIPT_UNKNOWN; + + return hb_icu_script_to_script (scriptCode); +} + +#if U_ICU_VERSION_MAJOR_NUM >= 49 +static const UNormalizer2 *normalizer; +#endif + +static hb_bool_t +hb_icu_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t a, + hb_codepoint_t b, + hb_codepoint_t *ab, + void *user_data HB_UNUSED) +{ +#if U_ICU_VERSION_MAJOR_NUM >= 49 + { + UChar32 ret = unorm2_composePair (normalizer, a, b); + if (ret < 0) return false; + *ab = ret; + return true; + } +#endif + + /* We don't ifdef-out the fallback code such that compiler always + * sees it and makes sure it's compilable. */ + + UChar utf16[4], normalized[5]; + unsigned int len; + hb_bool_t ret, err; + UErrorCode icu_err; + + len = 0; + err = false; + U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), a, err); + if (err) return false; + U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), b, err); + if (err) return false; + + icu_err = U_ZERO_ERROR; + len = unorm_normalize (utf16, len, UNORM_NFC, 0, normalized, ARRAY_LENGTH (normalized), &icu_err); + if (U_FAILURE (icu_err)) + return false; + if (u_countChar32 (normalized, len) == 1) { + U16_GET_UNSAFE (normalized, 0, *ab); + ret = true; + } else { + ret = false; + } + + return ret; +} + +static hb_bool_t +hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t ab, + hb_codepoint_t *a, + hb_codepoint_t *b, + void *user_data HB_UNUSED) +{ +#if U_ICU_VERSION_MAJOR_NUM >= 49 + { + UChar decomposed[4]; + int len; + UErrorCode icu_err = U_ZERO_ERROR; + len = unorm2_getRawDecomposition (normalizer, ab, decomposed, + ARRAY_LENGTH (decomposed), &icu_err); + if (U_FAILURE (icu_err) || len < 0) return false; + + len = u_countChar32 (decomposed, len); + if (len == 1) { + U16_GET_UNSAFE (decomposed, 0, *a); + *b = 0; + return *a != ab; + } else if (len == 2) { + len =0; + U16_NEXT_UNSAFE (decomposed, len, *a); + U16_NEXT_UNSAFE (decomposed, len, *b); + } + return true; + } +#endif + + /* We don't ifdef-out the fallback code such that compiler always + * sees it and makes sure it's compilable. */ + + UChar utf16[2], normalized[2 * HB_UNICODE_MAX_DECOMPOSITION_LEN + 1]; + unsigned int len; + hb_bool_t ret, err; + UErrorCode icu_err; + + /* This function is a monster! Maybe it wasn't a good idea adding a + * pairwise decompose API... */ + /* Watchout for the dragons. Err, watchout for macros changing len. */ + + len = 0; + err = false; + U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), ab, err); + if (err) return false; + + icu_err = U_ZERO_ERROR; + len = unorm_normalize (utf16, len, UNORM_NFD, 0, normalized, ARRAY_LENGTH (normalized), &icu_err); + if (U_FAILURE (icu_err)) + return false; + + len = u_countChar32 (normalized, len); + + if (len == 1) { + U16_GET_UNSAFE (normalized, 0, *a); + *b = 0; + ret = *a != ab; + } else if (len == 2) { + len =0; + U16_NEXT_UNSAFE (normalized, len, *a); + U16_NEXT_UNSAFE (normalized, len, *b); + + /* Here's the ugly part: if ab decomposes to a single character and + * that character decomposes again, we have to detect that and undo + * the second part :-(. */ + UChar recomposed[20]; + icu_err = U_ZERO_ERROR; + unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err); + if (U_FAILURE (icu_err)) + return false; + hb_codepoint_t c; + U16_GET_UNSAFE (recomposed, 0, c); + if (c != *a && c != ab) { + *a = c; + *b = 0; + } + ret = true; + } else { + /* If decomposed to more than two characters, take the last one, + * and recompose the rest to get the first component. */ + U16_PREV_UNSAFE (normalized, len, *b); /* Changes len in-place. */ + UChar recomposed[18 * 2]; + icu_err = U_ZERO_ERROR; + len = unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err); + if (U_FAILURE (icu_err)) + return false; + /* We expect that recomposed has exactly one character now. */ + if (unlikely (u_countChar32 (recomposed, len) != 1)) + return false; + U16_GET_UNSAFE (recomposed, 0, *a); + ret = true; + } + + return ret; +} + +static unsigned int +hb_icu_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED, + hb_codepoint_t u, + hb_codepoint_t *decomposed, + void *user_data HB_UNUSED) +{ + UChar utf16[2], normalized[2 * HB_UNICODE_MAX_DECOMPOSITION_LEN + 1]; + unsigned int len; + int32_t utf32_len; + hb_bool_t err; + UErrorCode icu_err; + + /* Copy @u into a UTF-16 array to be passed to ICU. */ + len = 0; + err = false; + U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), u, err); + if (err) + return 0; + + /* Normalise the codepoint using NFKD mode. */ + icu_err = U_ZERO_ERROR; + len = unorm_normalize (utf16, len, UNORM_NFKD, 0, normalized, ARRAY_LENGTH (normalized), &icu_err); + if (icu_err) + return 0; + + /* Convert the decomposed form from UTF-16 to UTF-32. */ + icu_err = U_ZERO_ERROR; + u_strToUTF32 ((UChar32*) decomposed, HB_UNICODE_MAX_DECOMPOSITION_LEN, &utf32_len, normalized, len, &icu_err); + if (icu_err) + return 0; + + return utf32_len; +} + + +hb_unicode_funcs_t * +hb_icu_get_unicode_funcs (void) +{ + static const hb_unicode_funcs_t _hb_icu_unicode_funcs = { + HB_OBJECT_HEADER_STATIC, + + NULL, /* parent */ + true, /* immutable */ + { +#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_icu_unicode_##name, + HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_UNICODE_FUNC_IMPLEMENT + } + }; + +#if U_ICU_VERSION_MAJOR_NUM >= 49 + if (!hb_atomic_ptr_get (&normalizer)) { + UErrorCode icu_err = U_ZERO_ERROR; + /* We ignore failure in getNFCInstace(). */ + (void) hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err)); + } +#endif + return const_cast (&_hb_icu_unicode_funcs); +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-icu.h b/3rdparty/harfbuzz-1.0.6/hb-icu.h new file mode 100644 index 0000000000..f2f35f0f2c --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-icu.h @@ -0,0 +1,52 @@ +/* + * Copyright © 2009 Red Hat, Inc. + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_ICU_H +#define HB_ICU_H + +#include "hb.h" + +#include + +HB_BEGIN_DECLS + + +hb_script_t +hb_icu_script_to_script (UScriptCode script); + +UScriptCode +hb_icu_script_from_script (hb_script_t script); + + +hb_unicode_funcs_t * +hb_icu_get_unicode_funcs (void); + + +HB_END_DECLS + +#endif /* HB_ICU_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-mutex-private.hh b/3rdparty/harfbuzz-1.0.6/hb-mutex-private.hh new file mode 100644 index 0000000000..ed2703571c --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-mutex-private.hh @@ -0,0 +1,141 @@ +/* + * Copyright © 2007 Chris Wilson + * Copyright © 2009,2010 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Contributor(s): + * Chris Wilson + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_MUTEX_PRIVATE_HH +#define HB_MUTEX_PRIVATE_HH + +#include "hb-private.hh" + + +/* mutex */ + +/* We need external help for these */ + +#if defined(HB_MUTEX_IMPL_INIT) \ + && defined(hb_mutex_impl_init) \ + && defined(hb_mutex_impl_lock) \ + && defined(hb_mutex_impl_unlock) \ + && defined(hb_mutex_impl_finish) + +/* Defined externally, i.e. in config.h; must have typedef'ed hb_mutex_impl_t as well. */ + + +#elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__)) + +#include +typedef CRITICAL_SECTION hb_mutex_impl_t; +#define HB_MUTEX_IMPL_INIT {0} +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) +#define hb_mutex_impl_init(M) InitializeCriticalSectionEx (M, 0, 0) +#else +#define hb_mutex_impl_init(M) InitializeCriticalSection (M) +#endif +#define hb_mutex_impl_lock(M) EnterCriticalSection (M) +#define hb_mutex_impl_unlock(M) LeaveCriticalSection (M) +#define hb_mutex_impl_finish(M) DeleteCriticalSection (M) + + +#elif !defined(HB_NO_MT) && (defined(HAVE_PTHREAD) || defined(__APPLE__)) + +#include +typedef pthread_mutex_t hb_mutex_impl_t; +#define HB_MUTEX_IMPL_INIT PTHREAD_MUTEX_INITIALIZER +#define hb_mutex_impl_init(M) pthread_mutex_init (M, NULL) +#define hb_mutex_impl_lock(M) pthread_mutex_lock (M) +#define hb_mutex_impl_unlock(M) pthread_mutex_unlock (M) +#define hb_mutex_impl_finish(M) pthread_mutex_destroy (M) + + +#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) + +#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD) +# include +# define HB_SCHED_YIELD() sched_yield () +#else +# define HB_SCHED_YIELD() HB_STMT_START {} HB_STMT_END +#endif + +/* This actually is not a totally awful implementation. */ +typedef volatile int hb_mutex_impl_t; +#define HB_MUTEX_IMPL_INIT 0 +#define hb_mutex_impl_init(M) *(M) = 0 +#define hb_mutex_impl_lock(M) HB_STMT_START { while (__sync_lock_test_and_set((M), 1)) HB_SCHED_YIELD (); } HB_STMT_END +#define hb_mutex_impl_unlock(M) __sync_lock_release (M) +#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END + + +#elif !defined(HB_NO_MT) + +#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD) +# include +# define HB_SCHED_YIELD() sched_yield () +#else +# define HB_SCHED_YIELD() HB_STMT_START {} HB_STMT_END +#endif + +#define HB_MUTEX_INT_NIL 1 /* Warn that fallback implementation is in use. */ +typedef volatile int hb_mutex_impl_t; +#define HB_MUTEX_IMPL_INIT 0 +#define hb_mutex_impl_init(M) *(M) = 0 +#define hb_mutex_impl_lock(M) HB_STMT_START { while (*(M)) HB_SCHED_YIELD (); (*(M))++; } HB_STMT_END +#define hb_mutex_impl_unlock(M) (*(M))--; +#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END + + +#else /* HB_NO_MT */ + +typedef int hb_mutex_impl_t; +#define HB_MUTEX_IMPL_INIT 0 +#define hb_mutex_impl_init(M) HB_STMT_START {} HB_STMT_END +#define hb_mutex_impl_lock(M) HB_STMT_START {} HB_STMT_END +#define hb_mutex_impl_unlock(M) HB_STMT_START {} HB_STMT_END +#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END + + +#endif + + +#define HB_MUTEX_INIT {HB_MUTEX_IMPL_INIT} + +struct hb_mutex_t +{ + /* TODO Add tracing. */ + + hb_mutex_impl_t m; + + inline void init (void) { hb_mutex_impl_init (&m); } + inline void lock (void) { hb_mutex_impl_lock (&m); } + inline void unlock (void) { hb_mutex_impl_unlock (&m); } + inline void finish (void) { hb_mutex_impl_finish (&m); } +}; + + +#endif /* HB_MUTEX_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-object-private.hh b/3rdparty/harfbuzz-1.0.6/hb-object-private.hh new file mode 100644 index 0000000000..6b73ff92d0 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-object-private.hh @@ -0,0 +1,202 @@ +/* + * Copyright © 2007 Chris Wilson + * Copyright © 2009,2010 Red Hat, Inc. + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Contributor(s): + * Chris Wilson + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OBJECT_PRIVATE_HH +#define HB_OBJECT_PRIVATE_HH + +#include "hb-private.hh" + +#include "hb-atomic-private.hh" +#include "hb-mutex-private.hh" + + +/* Debug */ + +#ifndef HB_DEBUG_OBJECT +#define HB_DEBUG_OBJECT (HB_DEBUG+0) +#endif + + +/* reference_count */ + +#define HB_REFERENCE_COUNT_INERT_VALUE -1 +#define HB_REFERENCE_COUNT_POISON_VALUE -0x0000DEAD +#define HB_REFERENCE_COUNT_INIT {HB_ATOMIC_INT_INIT(HB_REFERENCE_COUNT_INERT_VALUE)} + +struct hb_reference_count_t +{ + hb_atomic_int_t ref_count; + + inline void init (int v) { ref_count.set_unsafe (v); } + inline int get_unsafe (void) const { return ref_count.get_unsafe (); } + inline int inc (void) { return ref_count.inc (); } + inline int dec (void) { return ref_count.dec (); } + inline void finish (void) { ref_count.set_unsafe (HB_REFERENCE_COUNT_POISON_VALUE); } + + inline bool is_inert (void) const { return ref_count.get_unsafe () == HB_REFERENCE_COUNT_INERT_VALUE; } + inline bool is_valid (void) const { return ref_count.get_unsafe () > 0; } +}; + + +/* user_data */ + +#define HB_USER_DATA_ARRAY_INIT {HB_MUTEX_INIT, HB_LOCKABLE_SET_INIT} +struct hb_user_data_array_t +{ + struct hb_user_data_item_t { + hb_user_data_key_t *key; + void *data; + hb_destroy_func_t destroy; + + inline bool operator == (hb_user_data_key_t *other_key) const { return key == other_key; } + inline bool operator == (hb_user_data_item_t &other) const { return key == other.key; } + + void finish (void) { if (destroy) destroy (data); } + }; + + hb_mutex_t lock; + hb_lockable_set_t items; + + inline void init (void) { lock.init (); items.init (); } + + HB_INTERNAL bool set (hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace); + + HB_INTERNAL void *get (hb_user_data_key_t *key); + + inline void finish (void) { items.finish (lock); lock.finish (); } +}; + + +/* object_header */ + +struct hb_object_header_t +{ + hb_reference_count_t ref_count; + hb_user_data_array_t user_data; + +#define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INIT, HB_USER_DATA_ARRAY_INIT} + + private: + ASSERT_POD (); +}; + + +/* object */ + +template +static inline void hb_object_trace (const Type *obj, const char *function) +{ + DEBUG_MSG (OBJECT, (void *) obj, + "%s refcount=%d", + function, + obj ? obj->header.ref_count.get_unsafe () : 0); +} + +template +static inline Type *hb_object_create (void) +{ + Type *obj = (Type *) calloc (1, sizeof (Type)); + + if (unlikely (!obj)) + return obj; + + hb_object_init (obj); + hb_object_trace (obj, HB_FUNC); + return obj; +} +template +static inline void hb_object_init (Type *obj) +{ + obj->header.ref_count.init (1); + obj->header.user_data.init (); +} +template +static inline bool hb_object_is_inert (const Type *obj) +{ + return unlikely (obj->header.ref_count.is_inert ()); +} +template +static inline bool hb_object_is_valid (const Type *obj) +{ + return likely (obj->header.ref_count.is_valid ()); +} +template +static inline Type *hb_object_reference (Type *obj) +{ + hb_object_trace (obj, HB_FUNC); + if (unlikely (!obj || hb_object_is_inert (obj))) + return obj; + assert (hb_object_is_valid (obj)); + obj->header.ref_count.inc (); + return obj; +} +template +static inline bool hb_object_destroy (Type *obj) +{ + hb_object_trace (obj, HB_FUNC); + if (unlikely (!obj || hb_object_is_inert (obj))) + return false; + assert (hb_object_is_valid (obj)); + if (obj->header.ref_count.dec () != 1) + return false; + + obj->header.ref_count.finish (); /* Do this before user_data */ + obj->header.user_data.finish (); + return true; +} +template +static inline bool hb_object_set_user_data (Type *obj, + hb_user_data_key_t *key, + void * data, + hb_destroy_func_t destroy, + hb_bool_t replace) +{ + if (unlikely (!obj || hb_object_is_inert (obj))) + return false; + assert (hb_object_is_valid (obj)); + return obj->header.user_data.set (key, data, destroy, replace); +} + +template +static inline void *hb_object_get_user_data (Type *obj, + hb_user_data_key_t *key) +{ + if (unlikely (!obj || hb_object_is_inert (obj))) + return NULL; + assert (hb_object_is_valid (obj)); + return obj->header.user_data.get (key); +} + + +#endif /* HB_OBJECT_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-open-file-private.hh b/3rdparty/harfbuzz-1.0.6/hb-open-file-private.hh new file mode 100644 index 0000000000..152230a0e5 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-open-file-private.hh @@ -0,0 +1,268 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OPEN_FILE_PRIVATE_HH +#define HB_OPEN_FILE_PRIVATE_HH + +#include "hb-open-type-private.hh" + + +namespace OT { + + +/* + * + * The OpenType Font File + * + */ + + +/* + * Organization of an OpenType Font + */ + +struct OpenTypeFontFile; +struct OffsetTable; +struct TTCHeader; + + +typedef struct TableRecord +{ + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + Tag tag; /* 4-byte identifier. */ + CheckSum checkSum; /* CheckSum for this table. */ + ULONG offset; /* Offset from beginning of TrueType font + * file. */ + ULONG length; /* Length of this table. */ + public: + DEFINE_SIZE_STATIC (16); +} OpenTypeTable; + +typedef struct OffsetTable +{ + friend struct OpenTypeFontFile; + + inline unsigned int get_table_count (void) const + { return numTables; } + inline const TableRecord& get_table (unsigned int i) const + { + if (unlikely (i >= numTables)) return Null(TableRecord); + return tables[i]; + } + inline bool find_table_index (hb_tag_t tag, unsigned int *table_index) const + { + Tag t; + t.set (tag); + unsigned int count = numTables; + for (unsigned int i = 0; i < count; i++) + { + if (t == tables[i].tag) + { + if (table_index) *table_index = i; + return true; + } + } + if (table_index) *table_index = Index::NOT_FOUND_INDEX; + return false; + } + inline const TableRecord& get_table_by_tag (hb_tag_t tag) const + { + unsigned int table_index; + find_table_index (tag, &table_index); + return get_table (table_index); + } + + public: + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && c->check_array (tables, TableRecord::static_size, numTables)); + } + + protected: + Tag sfnt_version; /* '\0\001\0\00' if TrueType / 'OTTO' if CFF */ + USHORT numTables; /* Number of tables. */ + USHORT searchRangeZ; /* (Maximum power of 2 <= numTables) x 16 */ + USHORT entrySelectorZ; /* Log2(maximum power of 2 <= numTables). */ + USHORT rangeShiftZ; /* NumTables x 16-searchRange. */ + TableRecord tables[VAR]; /* TableRecord entries. numTables items */ + public: + DEFINE_SIZE_ARRAY (12, tables); +} OpenTypeFontFace; + + +/* + * TrueType Collections + */ + +struct TTCHeaderVersion1 +{ + friend struct TTCHeader; + + inline unsigned int get_face_count (void) const { return table.len; } + inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+table[i]; } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (table.sanitize (c, this)); + } + + protected: + Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ + FixedVersion version; /* Version of the TTC Header (1.0), + * 0x00010000u */ + ArrayOf, ULONG> + table; /* Array of offsets to the OffsetTable for each font + * from the beginning of the file */ + public: + DEFINE_SIZE_ARRAY (12, table); +}; + +struct TTCHeader +{ + friend struct OpenTypeFontFile; + + private: + + inline unsigned int get_face_count (void) const + { + switch (u.header.version.major) { + case 2: /* version 2 is compatible with version 1 */ + case 1: return u.version1.get_face_count (); + default:return 0; + } + } + inline const OpenTypeFontFace& get_face (unsigned int i) const + { + switch (u.header.version.major) { + case 2: /* version 2 is compatible with version 1 */ + case 1: return u.version1.get_face (i); + default:return Null(OpenTypeFontFace); + } + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!u.header.version.sanitize (c))) return_trace (false); + switch (u.header.version.major) { + case 2: /* version 2 is compatible with version 1 */ + case 1: return_trace (u.version1.sanitize (c)); + default:return_trace (true); + } + } + + protected: + union { + struct { + Tag ttcTag; /* TrueType Collection ID string: 'ttcf' */ + FixedVersion version; /* Version of the TTC Header (1.0 or 2.0), + * 0x00010000u or 0x00020000u */ + } header; + TTCHeaderVersion1 version1; + } u; +}; + + +/* + * OpenType Font File + */ + +struct OpenTypeFontFile +{ + static const hb_tag_t tableTag = HB_TAG ('_','_','_','_'); /* Sanitizer needs this. */ + + static const hb_tag_t CFFTag = HB_TAG ('O','T','T','O'); /* OpenType with Postscript outlines */ + static const hb_tag_t TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 ); /* OpenType with TrueType outlines */ + static const hb_tag_t TTCTag = HB_TAG ('t','t','c','f'); /* TrueType Collection */ + static const hb_tag_t TrueTag = HB_TAG ('t','r','u','e'); /* Obsolete Apple TrueType */ + static const hb_tag_t Typ1Tag = HB_TAG ('t','y','p','1'); /* Obsolete Apple Type1 font in SFNT container */ + + inline hb_tag_t get_tag (void) const { return u.tag; } + + inline unsigned int get_face_count (void) const + { + switch (u.tag) { + case CFFTag: /* All the non-collection tags */ + case TrueTag: + case Typ1Tag: + case TrueTypeTag: return 1; + case TTCTag: return u.ttcHeader.get_face_count (); + default: return 0; + } + } + inline const OpenTypeFontFace& get_face (unsigned int i) const + { + switch (u.tag) { + /* Note: for non-collection SFNT data we ignore index. This is because + * Apple dfont container is a container of SFNT's. So each SFNT is a + * non-TTC, but the index is more than zero. */ + case CFFTag: /* All the non-collection tags */ + case TrueTag: + case Typ1Tag: + case TrueTypeTag: return u.fontFace; + case TTCTag: return u.ttcHeader.get_face (i); + default: return Null(OpenTypeFontFace); + } + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!u.tag.sanitize (c))) return_trace (false); + switch (u.tag) { + case CFFTag: /* All the non-collection tags */ + case TrueTag: + case Typ1Tag: + case TrueTypeTag: return_trace (u.fontFace.sanitize (c)); + case TTCTag: return_trace (u.ttcHeader.sanitize (c)); + default: return_trace (true); + } + } + + protected: + union { + Tag tag; /* 4-byte identifier. */ + OpenTypeFontFace fontFace; + TTCHeader ttcHeader; + } u; + public: + DEFINE_SIZE_UNION (4, tag); +}; + + +} /* namespace OT */ + + +#endif /* HB_OPEN_FILE_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-open-type-private.hh b/3rdparty/harfbuzz-1.0.6/hb-open-type-private.hh new file mode 100644 index 0000000000..f053502ded --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-open-type-private.hh @@ -0,0 +1,1046 @@ +/* + * Copyright © 2007,2008,2009,2010 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OPEN_TYPE_PRIVATE_HH +#define HB_OPEN_TYPE_PRIVATE_HH + +#include "hb-private.hh" + + +namespace OT { + + + +/* + * Casts + */ + +/* Cast to struct T, reference to reference */ +template +static inline const Type& CastR(const TObject &X) +{ return reinterpret_cast (X); } +template +static inline Type& CastR(TObject &X) +{ return reinterpret_cast (X); } + +/* Cast to struct T, pointer to pointer */ +template +static inline const Type* CastP(const TObject *X) +{ return reinterpret_cast (X); } +template +static inline Type* CastP(TObject *X) +{ return reinterpret_cast (X); } + +/* StructAtOffset(P,Ofs) returns the struct T& that is placed at memory + * location pointed to by P plus Ofs bytes. */ +template +static inline const Type& StructAtOffset(const void *P, unsigned int offset) +{ return * reinterpret_cast ((const char *) P + offset); } +template +static inline Type& StructAtOffset(void *P, unsigned int offset) +{ return * reinterpret_cast ((char *) P + offset); } + +/* StructAfter(X) returns the struct T& that is placed after X. + * Works with X of variable size also. X must implement get_size() */ +template +static inline const Type& StructAfter(const TObject &X) +{ return StructAtOffset(&X, X.get_size()); } +template +static inline Type& StructAfter(TObject &X) +{ return StructAtOffset(&X, X.get_size()); } + + + +/* + * Size checking + */ + +/* Check _assertion in a method environment */ +#define _DEFINE_INSTANCE_ASSERTION1(_line, _assertion) \ + inline void _instance_assertion_on_line_##_line (void) const \ + { \ + ASSERT_STATIC (_assertion); \ + ASSERT_INSTANCE_POD (*this); /* Make sure it's POD. */ \ + } +# define _DEFINE_INSTANCE_ASSERTION0(_line, _assertion) _DEFINE_INSTANCE_ASSERTION1 (_line, _assertion) +# define DEFINE_INSTANCE_ASSERTION(_assertion) _DEFINE_INSTANCE_ASSERTION0 (__LINE__, _assertion) + +/* Check that _code compiles in a method environment */ +#define _DEFINE_COMPILES_ASSERTION1(_line, _code) \ + inline void _compiles_assertion_on_line_##_line (void) const \ + { _code; } +# define _DEFINE_COMPILES_ASSERTION0(_line, _code) _DEFINE_COMPILES_ASSERTION1 (_line, _code) +# define DEFINE_COMPILES_ASSERTION(_code) _DEFINE_COMPILES_ASSERTION0 (__LINE__, _code) + + +#define DEFINE_SIZE_STATIC(size) \ + DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size)); \ + static const unsigned int static_size = (size); \ + static const unsigned int min_size = (size) + +/* Size signifying variable-sized array */ +#define VAR 1 + +#define DEFINE_SIZE_UNION(size, _member) \ + DEFINE_INSTANCE_ASSERTION (this->u._member.static_size == (size)); \ + static const unsigned int min_size = (size) + +#define DEFINE_SIZE_MIN(size) \ + DEFINE_INSTANCE_ASSERTION (sizeof (*this) >= (size)); \ + static const unsigned int min_size = (size) + +#define DEFINE_SIZE_ARRAY(size, array) \ + DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (array[0])); \ + DEFINE_COMPILES_ASSERTION ((void) array[0].static_size) \ + static const unsigned int min_size = (size) + +#define DEFINE_SIZE_ARRAY2(size, array1, array2) \ + DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \ + DEFINE_COMPILES_ASSERTION ((void) array1[0].static_size; (void) array2[0].static_size) \ + static const unsigned int min_size = (size) + + + +/* + * Null objects + */ + +/* Global nul-content Null pool. Enlarge as necessary. */ +/* TODO This really should be a extern HB_INTERNAL and defined somewhere... */ +static const void *_NullPool[(256+8) / sizeof (void *)]; + +/* Generic nul-content Null objects. */ +template +static inline const Type& Null (void) { + ASSERT_STATIC (sizeof (Type) <= sizeof (_NullPool)); + return *CastP (_NullPool); +} + +/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */ +#define DEFINE_NULL_DATA(Type, data) \ +static const char _Null##Type[sizeof (Type) + 1] = data; /* +1 is for nul-termination in data */ \ +template <> \ +/*static*/ inline const Type& Null (void) { \ + return *CastP (_Null##Type); \ +} /* The following line really exists such that we end in a place needing semicolon */ \ +ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type)) + +/* Accessor macro. */ +#define Null(Type) Null() + + +/* + * Dispatch + */ + +template +struct hb_dispatch_context_t +{ + static const unsigned int max_debug_depth = MaxDebugDepth; + typedef Return return_t; + template + inline bool may_dispatch (const T *obj, const F *format) { return true; } + static return_t no_dispatch_return_value (void) { return Context::default_return_value (); } +}; + + +/* + * Sanitize + */ + +#ifndef HB_DEBUG_SANITIZE +#define HB_DEBUG_SANITIZE (HB_DEBUG+0) +#endif + + +#define TRACE_SANITIZE(this) \ + hb_auto_trace_t trace \ + (&c->debug_depth, c->get_name (), this, HB_FUNC, \ + ""); + +/* This limits sanitizing time on really broken fonts. */ +#ifndef HB_SANITIZE_MAX_EDITS +#define HB_SANITIZE_MAX_EDITS 100 +#endif + +struct hb_sanitize_context_t : + hb_dispatch_context_t +{ + inline hb_sanitize_context_t (void) : + debug_depth (0), + start (NULL), end (NULL), + writable (false), edit_count (0), + blob (NULL) {} + + inline const char *get_name (void) { return "SANITIZE"; } + template + inline bool may_dispatch (const T *obj, const F *format) + { return format->sanitize (this); } + template + inline return_t dispatch (const T &obj) { return obj.sanitize (this); } + static return_t default_return_value (void) { return true; } + static return_t no_dispatch_return_value (void) { return false; } + bool stop_sublookup_iteration (const return_t r) const { return !r; } + + inline void init (hb_blob_t *b) + { + this->blob = hb_blob_reference (b); + this->writable = false; + } + + inline void start_processing (void) + { + this->start = hb_blob_get_data (this->blob, NULL); + this->end = this->start + hb_blob_get_length (this->blob); + assert (this->start <= this->end); /* Must not overflow. */ + this->edit_count = 0; + this->debug_depth = 0; + + DEBUG_MSG_LEVEL (SANITIZE, start, 0, +1, + "start [%p..%p] (%lu bytes)", + this->start, this->end, + (unsigned long) (this->end - this->start)); + } + + inline void end_processing (void) + { + DEBUG_MSG_LEVEL (SANITIZE, this->start, 0, -1, + "end [%p..%p] %u edit requests", + this->start, this->end, this->edit_count); + + hb_blob_destroy (this->blob); + this->blob = NULL; + this->start = this->end = NULL; + } + + inline bool check_range (const void *base, unsigned int len) const + { + const char *p = (const char *) base; + bool ok = this->start <= p && p <= this->end && (unsigned int) (this->end - p) >= len; + + DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, + "check_range [%p..%p] (%d bytes) in [%p..%p] -> %s", + p, p + len, len, + this->start, this->end, + ok ? "OK" : "OUT-OF-RANGE"); + + return likely (ok); + } + + inline bool check_array (const void *base, unsigned int record_size, unsigned int len) const + { + const char *p = (const char *) base; + bool overflows = _hb_unsigned_int_mul_overflows (len, record_size); + unsigned int array_size = record_size * len; + bool ok = !overflows && this->check_range (base, array_size); + + DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, + "check_array [%p..%p] (%d*%d=%d bytes) in [%p..%p] -> %s", + p, p + (record_size * len), record_size, len, (unsigned int) array_size, + this->start, this->end, + overflows ? "OVERFLOWS" : ok ? "OK" : "OUT-OF-RANGE"); + + return likely (ok); + } + + template + inline bool check_struct (const Type *obj) const + { + return likely (this->check_range (obj, obj->min_size)); + } + + inline bool may_edit (const void *base HB_UNUSED, unsigned int len HB_UNUSED) + { + if (this->edit_count >= HB_SANITIZE_MAX_EDITS) + return false; + + const char *p = (const char *) base; + this->edit_count++; + + DEBUG_MSG_LEVEL (SANITIZE, p, this->debug_depth+1, 0, + "may_edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s", + this->edit_count, + p, p + len, len, + this->start, this->end, + this->writable ? "GRANTED" : "DENIED"); + + return this->writable; + } + + template + inline bool try_set (const Type *obj, const ValueType &v) { + if (this->may_edit (obj, obj->static_size)) { + const_cast (obj)->set (v); + return true; + } + return false; + } + + mutable unsigned int debug_depth; + const char *start, *end; + bool writable; + unsigned int edit_count; + hb_blob_t *blob; +}; + + + +/* Template to sanitize an object. */ +template +struct Sanitizer +{ + static hb_blob_t *sanitize (hb_blob_t *blob) { + hb_sanitize_context_t c[1]; + bool sane; + + /* TODO is_sane() stuff */ + + c->init (blob); + + retry: + DEBUG_MSG_FUNC (SANITIZE, c->start, "start"); + + c->start_processing (); + + if (unlikely (!c->start)) { + c->end_processing (); + return blob; + } + + Type *t = CastP (const_cast (c->start)); + + sane = t->sanitize (c); + if (sane) { + if (c->edit_count) { + DEBUG_MSG_FUNC (SANITIZE, c->start, "passed first round with %d edits; going for second round", c->edit_count); + + /* sanitize again to ensure no toe-stepping */ + c->edit_count = 0; + sane = t->sanitize (c); + if (c->edit_count) { + DEBUG_MSG_FUNC (SANITIZE, c->start, "requested %d edits in second round; FAILLING", c->edit_count); + sane = false; + } + } + } else { + unsigned int edit_count = c->edit_count; + if (edit_count && !c->writable) { + c->start = hb_blob_get_data_writable (blob, NULL); + c->end = c->start + hb_blob_get_length (blob); + + if (c->start) { + c->writable = true; + /* ok, we made it writable by relocating. try again */ + DEBUG_MSG_FUNC (SANITIZE, c->start, "retry"); + goto retry; + } + } + } + + c->end_processing (); + + DEBUG_MSG_FUNC (SANITIZE, c->start, sane ? "PASSED" : "FAILED"); + if (sane) + return blob; + else { + hb_blob_destroy (blob); + return hb_blob_get_empty (); + } + } + + static const Type* lock_instance (hb_blob_t *blob) { + hb_blob_make_immutable (blob); + const char *base = hb_blob_get_data (blob, NULL); + return unlikely (!base) ? &Null(Type) : CastP (base); + } +}; + + + +/* + * Serialize + */ + +#ifndef HB_DEBUG_SERIALIZE +#define HB_DEBUG_SERIALIZE (HB_DEBUG+0) +#endif + + +#define TRACE_SERIALIZE(this) \ + hb_auto_trace_t trace \ + (&c->debug_depth, "SERIALIZE", c, HB_FUNC, \ + ""); + + +struct hb_serialize_context_t +{ + inline hb_serialize_context_t (void *start_, unsigned int size) + { + this->start = (char *) start_; + this->end = this->start + size; + + this->ran_out_of_room = false; + this->head = this->start; + this->debug_depth = 0; + } + + template + inline Type *start_serialize (void) + { + DEBUG_MSG_LEVEL (SERIALIZE, this->start, 0, +1, + "start [%p..%p] (%lu bytes)", + this->start, this->end, + (unsigned long) (this->end - this->start)); + + return start_embed (); + } + + inline void end_serialize (void) + { + DEBUG_MSG_LEVEL (SERIALIZE, this->start, 0, -1, + "end [%p..%p] serialized %d bytes; %s", + this->start, this->end, + (int) (this->head - this->start), + this->ran_out_of_room ? "RAN OUT OF ROOM" : "did not ran out of room"); + + } + + template + inline Type *copy (void) + { + assert (!this->ran_out_of_room); + unsigned int len = this->head - this->start; + void *p = malloc (len); + if (p) + memcpy (p, this->start, len); + return reinterpret_cast (p); + } + + template + inline Type *allocate_size (unsigned int size) + { + if (unlikely (this->ran_out_of_room || this->end - this->head < ptrdiff_t (size))) { + this->ran_out_of_room = true; + return NULL; + } + memset (this->head, 0, size); + char *ret = this->head; + this->head += size; + return reinterpret_cast (ret); + } + + template + inline Type *allocate_min (void) + { + return this->allocate_size (Type::min_size); + } + + template + inline Type *start_embed (void) + { + Type *ret = reinterpret_cast (this->head); + return ret; + } + + template + inline Type *embed (const Type &obj) + { + unsigned int size = obj.get_size (); + Type *ret = this->allocate_size (size); + if (unlikely (!ret)) return NULL; + memcpy (ret, obj, size); + return ret; + } + + template + inline Type *extend_min (Type &obj) + { + unsigned int size = obj.min_size; + assert (this->start <= (char *) &obj && (char *) &obj <= this->head && (char *) &obj + size >= this->head); + if (unlikely (!this->allocate_size (((char *) &obj) + size - this->head))) return NULL; + return reinterpret_cast (&obj); + } + + template + inline Type *extend (Type &obj) + { + unsigned int size = obj.get_size (); + assert (this->start < (char *) &obj && (char *) &obj <= this->head && (char *) &obj + size >= this->head); + if (unlikely (!this->allocate_size (((char *) &obj) + size - this->head))) return NULL; + return reinterpret_cast (&obj); + } + + inline void truncate (void *new_head) + { + assert (this->start < new_head && new_head <= this->head); + this->head = (char *) new_head; + } + + unsigned int debug_depth; + char *start, *end, *head; + bool ran_out_of_room; +}; + +template +struct Supplier +{ + inline Supplier (const Type *array, unsigned int len_) + { + head = array; + len = len_; + } + inline const Type operator [] (unsigned int i) const + { + if (unlikely (i >= len)) return Type (); + return head[i]; + } + + inline void advance (unsigned int count) + { + if (unlikely (count > len)) + count = len; + len -= count; + head += count; + } + + private: + inline Supplier (const Supplier &); /* Disallow copy */ + inline Supplier& operator= (const Supplier &); /* Disallow copy */ + + unsigned int len; + const Type *head; +}; + + + + +/* + * + * The OpenType Font File: Data Types + */ + + +/* "The following data types are used in the OpenType font file. + * All OpenType fonts use Motorola-style byte ordering (Big Endian):" */ + +/* + * Int types + */ + + +template struct BEInt; + +template +struct BEInt +{ + public: + inline void set (Type V) + { + v = V; + } + inline operator Type (void) const + { + return v; + } + private: uint8_t v; +}; +template +struct BEInt +{ + public: + inline void set (Type V) + { + v[0] = (V >> 8) & 0xFF; + v[1] = (V ) & 0xFF; + } + inline operator Type (void) const + { + return (v[0] << 8) + + (v[1] ); + } + private: uint8_t v[2]; +}; +template +struct BEInt +{ + public: + inline void set (Type V) + { + v[0] = (V >> 16) & 0xFF; + v[1] = (V >> 8) & 0xFF; + v[2] = (V ) & 0xFF; + } + inline operator Type (void) const + { + return (v[0] << 16) + + (v[1] << 8) + + (v[2] ); + } + private: uint8_t v[3]; +}; +template +struct BEInt +{ + public: + inline void set (Type V) + { + v[0] = (V >> 24) & 0xFF; + v[1] = (V >> 16) & 0xFF; + v[2] = (V >> 8) & 0xFF; + v[3] = (V ) & 0xFF; + } + inline operator Type (void) const + { + return (v[0] << 24) + + (v[1] << 16) + + (v[2] << 8) + + (v[3] ); + } + private: uint8_t v[4]; +}; + +/* Integer types in big-endian order and no alignment requirement */ +template +struct IntType +{ + inline void set (Type i) { v.set (i); } + inline operator Type(void) const { return v; } + inline bool operator == (const IntType &o) const { return (Type) v == (Type) o.v; } + inline bool operator != (const IntType &o) const { return !(*this == o); } + static inline int cmp (const IntType *a, const IntType *b) { return b->cmp (*a); } + inline int cmp (Type a) const + { + Type b = v; + if (sizeof (Type) < sizeof (int)) + return (int) a - (int) b; + else + return a < b ? -1 : a == b ? 0 : +1; + } + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (likely (c->check_struct (this))); + } + protected: + BEInt v; + public: + DEFINE_SIZE_STATIC (Size); +}; + +typedef IntType BYTE; /* 8-bit unsigned integer. */ +typedef IntType USHORT; /* 16-bit unsigned integer. */ +typedef IntType SHORT; /* 16-bit signed integer. */ +typedef IntType ULONG; /* 32-bit unsigned integer. */ +typedef IntType LONG; /* 32-bit signed integer. */ +typedef IntType UINT24; /* 24-bit unsigned integer. */ + +/* 16-bit signed integer (SHORT) that describes a quantity in FUnits. */ +typedef SHORT FWORD; + +/* 16-bit unsigned integer (USHORT) that describes a quantity in FUnits. */ +typedef USHORT UFWORD; + +/* Date represented in number of seconds since 12:00 midnight, January 1, + * 1904. The value is represented as a signed 64-bit integer. */ +struct LONGDATETIME +{ + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (likely (c->check_struct (this))); + } + protected: + LONG major; + ULONG minor; + public: + DEFINE_SIZE_STATIC (8); +}; + +/* Array of four uint8s (length = 32 bits) used to identify a script, language + * system, feature, or baseline */ +struct Tag : ULONG +{ + /* What the char* converters return is NOT nul-terminated. Print using "%.4s" */ + inline operator const char* (void) const { return reinterpret_cast (&this->v); } + inline operator char* (void) { return reinterpret_cast (&this->v); } + public: + DEFINE_SIZE_STATIC (4); +}; +DEFINE_NULL_DATA (Tag, " "); + +/* Glyph index number, same as uint16 (length = 16 bits) */ +struct GlyphID : USHORT { + static inline int cmp (const GlyphID *a, const GlyphID *b) { return b->USHORT::cmp (*a); } + inline int cmp (hb_codepoint_t a) const { return (int) a - (int) *this; } +}; + +/* Script/language-system/feature index */ +struct Index : USHORT { + static const unsigned int NOT_FOUND_INDEX = 0xFFFFu; +}; +DEFINE_NULL_DATA (Index, "\xff\xff"); + +/* Offset, Null offset = 0 */ +template +struct Offset : Type +{ + inline bool is_null (void) const { return 0 == *this; } + public: + DEFINE_SIZE_STATIC (sizeof(Type)); +}; + + +/* CheckSum */ +struct CheckSum : ULONG +{ + /* This is reference implementation from the spec. */ + static inline uint32_t CalcTableChecksum (const ULONG *Table, uint32_t Length) + { + uint32_t Sum = 0L; + const ULONG *EndPtr = Table+((Length+3) & ~3) / ULONG::static_size; + + while (Table < EndPtr) + Sum += *Table++; + return Sum; + } + + /* Note: data should be 4byte aligned and have 4byte padding at the end. */ + inline void set_for_data (const void *data, unsigned int length) + { set (CalcTableChecksum ((const ULONG *) data, length)); } + + public: + DEFINE_SIZE_STATIC (4); +}; + + +/* + * Version Numbers + */ + +struct FixedVersion +{ + inline uint32_t to_int (void) const { return (major << 16) + minor; } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + USHORT major; + USHORT minor; + public: + DEFINE_SIZE_STATIC (4); +}; + + + +/* + * Template subclasses of Offset that do the dereferencing. + * Use: (base+offset) + */ + +template +struct OffsetTo : Offset +{ + inline const Type& operator () (const void *base) const + { + unsigned int offset = *this; + if (unlikely (!offset)) return Null(Type); + return StructAtOffset (base, offset); + } + + inline Type& serialize (hb_serialize_context_t *c, const void *base) + { + Type *t = c->start_embed (); + this->set ((char *) t - (char *) base); /* TODO(serialize) Overflow? */ + return *t; + } + + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { + TRACE_SANITIZE (this); + if (unlikely (!c->check_struct (this))) return_trace (false); + unsigned int offset = *this; + if (unlikely (!offset)) return_trace (true); + const Type &obj = StructAtOffset (base, offset); + return_trace (likely (obj.sanitize (c)) || neuter (c)); + } + template + inline bool sanitize (hb_sanitize_context_t *c, const void *base, T user_data) const + { + TRACE_SANITIZE (this); + if (unlikely (!c->check_struct (this))) return_trace (false); + unsigned int offset = *this; + if (unlikely (!offset)) return_trace (true); + const Type &obj = StructAtOffset (base, offset); + return_trace (likely (obj.sanitize (c, user_data)) || neuter (c)); + } + + /* Set the offset to Null */ + inline bool neuter (hb_sanitize_context_t *c) const { + return c->try_set (this, 0); + } + DEFINE_SIZE_STATIC (sizeof(OffsetType)); +}; +template +static inline const Type& operator + (const Base &base, const OffsetTo &offset) { return offset (base); } +template +static inline Type& operator + (Base &base, OffsetTo &offset) { return offset (base); } + + +/* + * Array Types + */ + +/* An array with a number of elements. */ +template +struct ArrayOf +{ + const Type *sub_array (unsigned int start_offset, unsigned int *pcount /* IN/OUT */) const + { + unsigned int count = len; + if (unlikely (start_offset > count)) + count = 0; + else + count -= start_offset; + count = MIN (count, *pcount); + *pcount = count; + return array + start_offset; + } + + inline const Type& operator [] (unsigned int i) const + { + if (unlikely (i >= len)) return Null(Type); + return array[i]; + } + inline Type& operator [] (unsigned int i) + { + return array[i]; + } + inline unsigned int get_size (void) const + { return len.static_size + len * Type::static_size; } + + inline bool serialize (hb_serialize_context_t *c, + unsigned int items_len) + { + TRACE_SERIALIZE (this); + if (unlikely (!c->extend_min (*this))) return_trace (false); + len.set (items_len); /* TODO(serialize) Overflow? */ + if (unlikely (!c->extend (*this))) return_trace (false); + return_trace (true); + } + + inline bool serialize (hb_serialize_context_t *c, + Supplier &items, + unsigned int items_len) + { + TRACE_SERIALIZE (this); + if (unlikely (!serialize (c, items_len))) return_trace (false); + for (unsigned int i = 0; i < items_len; i++) + array[i] = items[i]; + items.advance (items_len); + return_trace (true); + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!sanitize_shallow (c))) return_trace (false); + + /* Note: for structs that do not reference other structs, + * we do not need to call their sanitize() as we already did + * a bound check on the aggregate array size. We just include + * a small unreachable expression to make sure the structs + * pointed to do have a simple sanitize(), ie. they do not + * reference other structs via offsets. + */ + (void) (false && array[0].sanitize (c)); + + return_trace (true); + } + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { + TRACE_SANITIZE (this); + if (unlikely (!sanitize_shallow (c))) return_trace (false); + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) + if (unlikely (!array[i].sanitize (c, base))) + return_trace (false); + return_trace (true); + } + template + inline bool sanitize (hb_sanitize_context_t *c, const void *base, T user_data) const + { + TRACE_SANITIZE (this); + if (unlikely (!sanitize_shallow (c))) return_trace (false); + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) + if (unlikely (!array[i].sanitize (c, base, user_data))) + return_trace (false); + return_trace (true); + } + + template + inline int lsearch (const SearchType &x) const + { + unsigned int count = len; + for (unsigned int i = 0; i < count; i++) + if (!this->array[i].cmp (x)) + return i; + return -1; + } + + private: + inline bool sanitize_shallow (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && c->check_array (array, Type::static_size, len)); + } + + public: + LenType len; + Type array[VAR]; + public: + DEFINE_SIZE_ARRAY (sizeof (LenType), array); +}; + +/* Array of Offset's */ +template +struct OffsetArrayOf : ArrayOf > {}; + +/* Array of offsets relative to the beginning of the array itself. */ +template +struct OffsetListOf : OffsetArrayOf +{ + inline const Type& operator [] (unsigned int i) const + { + if (unlikely (i >= this->len)) return Null(Type); + return this+this->array[i]; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (OffsetArrayOf::sanitize (c, this)); + } + template + inline bool sanitize (hb_sanitize_context_t *c, T user_data) const + { + TRACE_SANITIZE (this); + return_trace (OffsetArrayOf::sanitize (c, this, user_data)); + } +}; + + +/* An array starting at second element. */ +template +struct HeadlessArrayOf +{ + inline const Type& operator [] (unsigned int i) const + { + if (unlikely (i >= len || !i)) return Null(Type); + return array[i-1]; + } + inline unsigned int get_size (void) const + { return len.static_size + (len ? len - 1 : 0) * Type::static_size; } + + inline bool serialize (hb_serialize_context_t *c, + Supplier &items, + unsigned int items_len) + { + TRACE_SERIALIZE (this); + if (unlikely (!c->extend_min (*this))) return_trace (false); + len.set (items_len); /* TODO(serialize) Overflow? */ + if (unlikely (!items_len)) return_trace (true); + if (unlikely (!c->extend (*this))) return_trace (false); + for (unsigned int i = 0; i < items_len - 1; i++) + array[i] = items[i]; + items.advance (items_len - 1); + return_trace (true); + } + + inline bool sanitize_shallow (hb_sanitize_context_t *c) const + { + return c->check_struct (this) + && c->check_array (this, Type::static_size, len); + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!sanitize_shallow (c))) return_trace (false); + + /* Note: for structs that do not reference other structs, + * we do not need to call their sanitize() as we already did + * a bound check on the aggregate array size. We just include + * a small unreachable expression to make sure the structs + * pointed to do have a simple sanitize(), ie. they do not + * reference other structs via offsets. + */ + (void) (false && array[0].sanitize (c)); + + return_trace (true); + } + + LenType len; + Type array[VAR]; + public: + DEFINE_SIZE_ARRAY (sizeof (LenType), array); +}; + + +/* An array with sorted elements. Supports binary searching. */ +template +struct SortedArrayOf : ArrayOf +{ + template + inline int bsearch (const SearchType &x) const + { + /* Hand-coded bsearch here since this is in the hot inner loop. */ + int min = 0, max = (int) this->len - 1; + while (min <= max) + { + int mid = (min + max) / 2; + int c = this->array[mid].cmp (x); + if (c < 0) + max = mid - 1; + else if (c > 0) + min = mid + 1; + else + return mid; + } + return -1; + } +}; + + +} /* namespace OT */ + + +#endif /* HB_OPEN_TYPE_PRIVATE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-cmap-table.hh b/3rdparty/harfbuzz-1.0.6/hb-ot-cmap-table.hh new file mode 100644 index 0000000000..c9161f0ef4 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-cmap-table.hh @@ -0,0 +1,528 @@ +/* + * Copyright © 2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_CMAP_TABLE_HH +#define HB_OT_CMAP_TABLE_HH + +#include "hb-open-type-private.hh" + + +namespace OT { + + +/* + * cmap -- Character To Glyph Index Mapping Table + */ + +#define HB_OT_TAG_cmap HB_TAG('c','m','a','p') + + +struct CmapSubtableFormat0 +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + hb_codepoint_t gid = codepoint < 256 ? glyphIdArray[codepoint] : 0; + if (!gid) + return false; + *glyph = gid; + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + protected: + USHORT format; /* Format number is set to 0. */ + USHORT lengthZ; /* Byte length of this subtable. */ + USHORT languageZ; /* Ignore. */ + BYTE glyphIdArray[256];/* An array that maps character + * code to glyph index values. */ + public: + DEFINE_SIZE_STATIC (6 + 256); +}; + +struct CmapSubtableFormat4 +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + unsigned int segCount; + const USHORT *endCount; + const USHORT *startCount; + const USHORT *idDelta; + const USHORT *idRangeOffset; + const USHORT *glyphIdArray; + unsigned int glyphIdArrayLength; + + segCount = this->segCountX2 / 2; + endCount = this->values; + startCount = endCount + segCount + 1; + idDelta = startCount + segCount; + idRangeOffset = idDelta + segCount; + glyphIdArray = idRangeOffset + segCount; + glyphIdArrayLength = (this->length - 16 - 8 * segCount) / 2; + + /* Custom two-array bsearch. */ + int min = 0, max = (int) segCount - 1; + unsigned int i; + while (min <= max) + { + int mid = (min + max) / 2; + if (codepoint < startCount[mid]) + max = mid - 1; + else if (codepoint > endCount[mid]) + min = mid + 1; + else + { + i = mid; + goto found; + } + } + return false; + + found: + hb_codepoint_t gid; + unsigned int rangeOffset = idRangeOffset[i]; + if (rangeOffset == 0) + gid = codepoint + idDelta[i]; + else + { + /* Somebody has been smoking... */ + unsigned int index = rangeOffset / 2 + (codepoint - startCount[i]) + i - segCount; + if (unlikely (index >= glyphIdArrayLength)) + return false; + gid = glyphIdArray[index]; + if (unlikely (!gid)) + return false; + gid += idDelta[i]; + } + + *glyph = gid & 0xFFFFu; + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!c->check_struct (this))) + return_trace (false); + + if (unlikely (!c->check_range (this, length))) + { + /* Some broken fonts have too long of a "length" value. + * If that is the case, just change the value to truncate + * the subtable at the end of the blob. */ + uint16_t new_length = (uint16_t) MIN ((uintptr_t) 65535, + (uintptr_t) (c->end - + (char *) this)); + if (!c->try_set (&length, new_length)) + return_trace (false); + } + + return_trace (16 + 4 * (unsigned int) segCountX2 <= length); + } + + protected: + USHORT format; /* Format number is set to 4. */ + USHORT length; /* This is the length in bytes of the + * subtable. */ + USHORT languageZ; /* Ignore. */ + USHORT segCountX2; /* 2 x segCount. */ + USHORT searchRangeZ; /* 2 * (2**floor(log2(segCount))) */ + USHORT entrySelectorZ; /* log2(searchRange/2) */ + USHORT rangeShiftZ; /* 2 x segCount - searchRange */ + + USHORT values[VAR]; +#if 0 + USHORT endCount[segCount]; /* End characterCode for each segment, + * last=0xFFFFu. */ + USHORT reservedPad; /* Set to 0. */ + USHORT startCount[segCount]; /* Start character code for each segment. */ + SHORT idDelta[segCount]; /* Delta for all character codes in segment. */ + USHORT idRangeOffset[segCount];/* Offsets into glyphIdArray or 0 */ + USHORT glyphIdArray[VAR]; /* Glyph index array (arbitrary length) */ +#endif + + public: + DEFINE_SIZE_ARRAY (14, values); +}; + +struct CmapSubtableLongGroup +{ + friend struct CmapSubtableFormat12; + friend struct CmapSubtableFormat13; + + int cmp (hb_codepoint_t codepoint) const + { + if (codepoint < startCharCode) return -1; + if (codepoint > endCharCode) return +1; + return 0; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + private: + ULONG startCharCode; /* First character code in this group. */ + ULONG endCharCode; /* Last character code in this group. */ + ULONG glyphID; /* Glyph index; interpretation depends on + * subtable format. */ + public: + DEFINE_SIZE_STATIC (12); +}; + +template +struct CmapSubtableTrimmed +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + /* Rely on our implicit array bound-checking. */ + hb_codepoint_t gid = glyphIdArray[codepoint - startCharCode]; + if (!gid) + return false; + *glyph = gid; + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && glyphIdArray.sanitize (c)); + } + + protected: + UINT formatReserved; /* Subtable format and (maybe) padding. */ + UINT lengthZ; /* Byte length of this subtable. */ + UINT languageZ; /* Ignore. */ + UINT startCharCode; /* First character code covered. */ + ArrayOf + glyphIdArray; /* Array of glyph index values for character + * codes in the range. */ + public: + DEFINE_SIZE_ARRAY (5 * sizeof (UINT), glyphIdArray); +}; + +struct CmapSubtableFormat6 : CmapSubtableTrimmed {}; +struct CmapSubtableFormat10 : CmapSubtableTrimmed {}; + +template +struct CmapSubtableLongSegmented +{ + inline bool get_glyph (hb_codepoint_t codepoint, hb_codepoint_t *glyph) const + { + int i = groups.bsearch (codepoint); + if (i == -1) + return false; + *glyph = T::group_get_glyph (groups[i], codepoint); + return true; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && groups.sanitize (c)); + } + + protected: + USHORT format; /* Subtable format; set to 12. */ + USHORT reservedZ; /* Reserved; set to 0. */ + ULONG lengthZ; /* Byte length of this subtable. */ + ULONG languageZ; /* Ignore. */ + SortedArrayOf + groups; /* Groupings. */ + public: + DEFINE_SIZE_ARRAY (16, groups); +}; + +struct CmapSubtableFormat12 : CmapSubtableLongSegmented +{ + static inline hb_codepoint_t group_get_glyph (const CmapSubtableLongGroup &group, + hb_codepoint_t u) + { return group.glyphID + (u - group.startCharCode); } +}; + +struct CmapSubtableFormat13 : CmapSubtableLongSegmented +{ + static inline hb_codepoint_t group_get_glyph (const CmapSubtableLongGroup &group, + hb_codepoint_t u HB_UNUSED) + { return group.glyphID; } +}; + +typedef enum +{ + GLYPH_VARIANT_NOT_FOUND = 0, + GLYPH_VARIANT_FOUND = 1, + GLYPH_VARIANT_USE_DEFAULT = 2 +} glyph_variant_t; + +struct UnicodeValueRange +{ + inline int cmp (const hb_codepoint_t &codepoint) const + { + if (codepoint < startUnicodeValue) return -1; + if (codepoint > startUnicodeValue + additionalCount) return +1; + return 0; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + UINT24 startUnicodeValue; /* First value in this range. */ + BYTE additionalCount; /* Number of additional values in this + * range. */ + public: + DEFINE_SIZE_STATIC (4); +}; + +typedef SortedArrayOf DefaultUVS; + +struct UVSMapping +{ + inline int cmp (const hb_codepoint_t &codepoint) const + { + return unicodeValue.cmp (codepoint); + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + UINT24 unicodeValue; /* Base Unicode value of the UVS */ + GlyphID glyphID; /* Glyph ID of the UVS */ + public: + DEFINE_SIZE_STATIC (5); +}; + +typedef SortedArrayOf NonDefaultUVS; + +struct VariationSelectorRecord +{ + inline glyph_variant_t get_glyph (hb_codepoint_t codepoint, + hb_codepoint_t *glyph, + const void *base) const + { + int i; + const DefaultUVS &defaults = base+defaultUVS; + i = defaults.bsearch (codepoint); + if (i != -1) + return GLYPH_VARIANT_USE_DEFAULT; + const NonDefaultUVS &nonDefaults = base+nonDefaultUVS; + i = nonDefaults.bsearch (codepoint); + if (i != -1) + { + *glyph = nonDefaults[i].glyphID; + return GLYPH_VARIANT_FOUND; + } + return GLYPH_VARIANT_NOT_FOUND; + } + + inline int cmp (const hb_codepoint_t &variation_selector) const + { + return varSelector.cmp (variation_selector); + } + + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && + defaultUVS.sanitize (c, base) && + nonDefaultUVS.sanitize (c, base)); + } + + UINT24 varSelector; /* Variation selector. */ + OffsetTo + defaultUVS; /* Offset to Default UVS Table. May be 0. */ + OffsetTo + nonDefaultUVS; /* Offset to Non-Default UVS Table. May be 0. */ + public: + DEFINE_SIZE_STATIC (11); +}; + +struct CmapSubtableFormat14 +{ + inline glyph_variant_t get_glyph_variant (hb_codepoint_t codepoint, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) const + { + return record[record.bsearch(variation_selector)].get_glyph (codepoint, glyph, this); + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && + record.sanitize (c, this)); + } + + protected: + USHORT format; /* Format number is set to 0. */ + ULONG lengthZ; /* Byte length of this subtable. */ + SortedArrayOf + record; /* Variation selector records; sorted + * in increasing order of `varSelector'. */ + public: + DEFINE_SIZE_ARRAY (10, record); +}; + +struct CmapSubtable +{ + /* Note: We intentionally do NOT implement subtable formats 2 and 8. */ + + inline bool get_glyph (hb_codepoint_t codepoint, + hb_codepoint_t *glyph) const + { + switch (u.format) { + case 0: return u.format0 .get_glyph(codepoint, glyph); + case 4: return u.format4 .get_glyph(codepoint, glyph); + case 6: return u.format6 .get_glyph(codepoint, glyph); + case 10: return u.format10.get_glyph(codepoint, glyph); + case 12: return u.format12.get_glyph(codepoint, glyph); + case 13: return u.format13.get_glyph(codepoint, glyph); + case 14: + default: return false; + } + } + + inline glyph_variant_t get_glyph_variant (hb_codepoint_t codepoint, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) const + { + switch (u.format) { + case 14: return u.format14.get_glyph_variant(codepoint, variation_selector, glyph); + default: return GLYPH_VARIANT_NOT_FOUND; + } + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (!u.format.sanitize (c)) return_trace (false); + switch (u.format) { + case 0: return_trace (u.format0 .sanitize (c)); + case 4: return_trace (u.format4 .sanitize (c)); + case 6: return_trace (u.format6 .sanitize (c)); + case 10: return_trace (u.format10.sanitize (c)); + case 12: return_trace (u.format12.sanitize (c)); + case 13: return_trace (u.format13.sanitize (c)); + case 14: return_trace (u.format14.sanitize (c)); + default:return_trace (true); + } + } + + protected: + union { + USHORT format; /* Format identifier */ + CmapSubtableFormat0 format0; + CmapSubtableFormat4 format4; + CmapSubtableFormat6 format6; + CmapSubtableFormat10 format10; + CmapSubtableFormat12 format12; + CmapSubtableFormat13 format13; + CmapSubtableFormat14 format14; + } u; + public: + DEFINE_SIZE_UNION (2, format); +}; + + +struct EncodingRecord +{ + inline int cmp (const EncodingRecord &other) const + { + int ret; + ret = platformID.cmp (other.platformID); + if (ret) return ret; + ret = encodingID.cmp (other.encodingID); + if (ret) return ret; + return 0; + } + + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && + subtable.sanitize (c, base)); + } + + USHORT platformID; /* Platform ID. */ + USHORT encodingID; /* Platform-specific encoding ID. */ + OffsetTo + subtable; /* Byte offset from beginning of table to the subtable for this encoding. */ + public: + DEFINE_SIZE_STATIC (8); +}; + +struct cmap +{ + static const hb_tag_t tableTag = HB_OT_TAG_cmap; + + inline const CmapSubtable *find_subtable (unsigned int platform_id, + unsigned int encoding_id) const + { + EncodingRecord key; + key.platformID.set (platform_id); + key.encodingID.set (encoding_id); + + /* Note: We can use bsearch, but since it has no performance + * implications, we use lsearch and as such accept fonts with + * unsorted subtable list. */ + int result = encodingRecord./*bsearch*/lsearch (key); + if (result == -1 || !encodingRecord[result].subtable) + return NULL; + + return &(this+encodingRecord[result].subtable); + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && + likely (version == 0) && + encodingRecord.sanitize (c, this)); + } + + USHORT version; /* Table version number (0). */ + SortedArrayOf + encodingRecord; /* Encoding tables. */ + public: + DEFINE_SIZE_ARRAY (4, encodingRecord); +}; + + +} /* namespace OT */ + + +#endif /* HB_OT_CMAP_TABLE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-font.cc b/3rdparty/harfbuzz-1.0.6/hb-ot-font.cc new file mode 100644 index 0000000000..69d2503abb --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-font.cc @@ -0,0 +1,434 @@ +/* + * Copyright © 2011,2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod, Roozbeh Pournader + */ + +#include "hb-private.hh" + +#include "hb-ot.h" + +#include "hb-font-private.hh" + +#include "hb-ot-cmap-table.hh" +#include "hb-ot-glyf-table.hh" +#include "hb-ot-head-table.hh" +#include "hb-ot-hhea-table.hh" +#include "hb-ot-hmtx-table.hh" + + +struct hb_ot_face_metrics_accelerator_t +{ + unsigned int num_metrics; + unsigned int num_advances; + unsigned int default_advance; + const OT::_mtx *table; + hb_blob_t *blob; + + inline void init (hb_face_t *face, + hb_tag_t _hea_tag, hb_tag_t _mtx_tag, + unsigned int default_advance_) + { + this->default_advance = default_advance_; + this->num_metrics = face->get_num_glyphs (); + + hb_blob_t *_hea_blob = OT::Sanitizer::sanitize (face->reference_table (_hea_tag)); + const OT::_hea *_hea = OT::Sanitizer::lock_instance (_hea_blob); + this->num_advances = _hea->numberOfLongMetrics; + hb_blob_destroy (_hea_blob); + + this->blob = OT::Sanitizer::sanitize (face->reference_table (_mtx_tag)); + if (unlikely (!this->num_advances || + 2 * (this->num_advances + this->num_metrics) > hb_blob_get_length (this->blob))) + { + this->num_metrics = this->num_advances = 0; + hb_blob_destroy (this->blob); + this->blob = hb_blob_get_empty (); + } + this->table = OT::Sanitizer::lock_instance (this->blob); + } + + inline void fini (void) + { + hb_blob_destroy (this->blob); + } + + inline unsigned int get_advance (hb_codepoint_t glyph) const + { + if (unlikely (glyph >= this->num_metrics)) + { + /* If this->num_metrics is zero, it means we don't have the metrics table + * for this direction: return default advance. Otherwise, it means that the + * glyph index is out of bound: return zero. */ + if (this->num_metrics) + return 0; + else + return this->default_advance; + } + + if (glyph >= this->num_advances) + glyph = this->num_advances - 1; + + return this->table->longMetric[glyph].advance; + } +}; + +struct hb_ot_face_glyf_accelerator_t +{ + bool short_offset; + unsigned int num_glyphs; + const OT::loca *loca; + const OT::glyf *glyf; + hb_blob_t *loca_blob; + hb_blob_t *glyf_blob; + unsigned int glyf_len; + + inline void init (hb_face_t *face) + { + hb_blob_t *head_blob = OT::Sanitizer::sanitize (face->reference_table (HB_OT_TAG_head)); + const OT::head *head = OT::Sanitizer::lock_instance (head_blob); + if ((unsigned int) head->indexToLocFormat > 1 || head->glyphDataFormat != 0) + { + /* Unknown format. Leave num_glyphs=0, that takes care of disabling us. */ + hb_blob_destroy (head_blob); + return; + } + this->short_offset = 0 == head->indexToLocFormat; + hb_blob_destroy (head_blob); + + this->loca_blob = OT::Sanitizer::sanitize (face->reference_table (HB_OT_TAG_loca)); + this->loca = OT::Sanitizer::lock_instance (this->loca_blob); + this->glyf_blob = OT::Sanitizer::sanitize (face->reference_table (HB_OT_TAG_glyf)); + this->glyf = OT::Sanitizer::lock_instance (this->glyf_blob); + + this->num_glyphs = MAX (1u, hb_blob_get_length (this->loca_blob) / (this->short_offset ? 2 : 4)) - 1; + this->glyf_len = hb_blob_get_length (this->glyf_blob); + } + + inline void fini (void) + { + hb_blob_destroy (this->loca_blob); + hb_blob_destroy (this->glyf_blob); + } + + inline bool get_extents (hb_codepoint_t glyph, + hb_glyph_extents_t *extents) const + { + if (unlikely (glyph >= this->num_glyphs)) + return false; + + unsigned int start_offset, end_offset; + if (this->short_offset) + { + start_offset = 2 * this->loca->u.shortsZ[glyph]; + end_offset = 2 * this->loca->u.shortsZ[glyph + 1]; + } + else + { + start_offset = this->loca->u.longsZ[glyph]; + end_offset = this->loca->u.longsZ[glyph + 1]; + } + + if (start_offset > end_offset || end_offset > this->glyf_len) + return false; + + if (end_offset - start_offset < OT::glyfGlyphHeader::static_size) + return true; /* Empty glyph; zero extents. */ + + const OT::glyfGlyphHeader &glyph_header = OT::StructAtOffset (this->glyf, start_offset); + + extents->x_bearing = MIN (glyph_header.xMin, glyph_header.xMax); + extents->y_bearing = MAX (glyph_header.yMin, glyph_header.yMax); + extents->width = MAX (glyph_header.xMin, glyph_header.xMax) - extents->x_bearing; + extents->height = MIN (glyph_header.yMin, glyph_header.yMax) - extents->y_bearing; + + return true; + } +}; + +struct hb_ot_face_cmap_accelerator_t +{ + const OT::CmapSubtable *table; + const OT::CmapSubtable *uvs_table; + hb_blob_t *blob; + + inline void init (hb_face_t *face) + { + this->blob = OT::Sanitizer::sanitize (face->reference_table (HB_OT_TAG_cmap)); + const OT::cmap *cmap = OT::Sanitizer::lock_instance (this->blob); + const OT::CmapSubtable *subtable = NULL; + const OT::CmapSubtable *subtable_uvs = NULL; + + /* 32-bit subtables. */ + if (!subtable) subtable = cmap->find_subtable (3, 10); + if (!subtable) subtable = cmap->find_subtable (0, 6); + if (!subtable) subtable = cmap->find_subtable (0, 4); + /* 16-bit subtables. */ + if (!subtable) subtable = cmap->find_subtable (3, 1); + if (!subtable) subtable = cmap->find_subtable (0, 3); + if (!subtable) subtable = cmap->find_subtable (0, 2); + if (!subtable) subtable = cmap->find_subtable (0, 1); + if (!subtable) subtable = cmap->find_subtable (0, 0); + if (!subtable) subtable = cmap->find_subtable (3, 0); + /* Meh. */ + if (!subtable) subtable = &OT::Null(OT::CmapSubtable); + + /* UVS subtable. */ + if (!subtable_uvs) subtable_uvs = cmap->find_subtable (0, 5); + /* Meh. */ + if (!subtable_uvs) subtable_uvs = &OT::Null(OT::CmapSubtable); + + this->table = subtable; + this->uvs_table = subtable_uvs; + } + + inline void fini (void) + { + hb_blob_destroy (this->blob); + } + + inline bool get_glyph (hb_codepoint_t unicode, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph) const + { + if (unlikely (variation_selector)) + { + switch (this->uvs_table->get_glyph_variant (unicode, + variation_selector, + glyph)) + { + case OT::GLYPH_VARIANT_NOT_FOUND: return false; + case OT::GLYPH_VARIANT_FOUND: return true; + case OT::GLYPH_VARIANT_USE_DEFAULT: break; + } + } + + return this->table->get_glyph (unicode, glyph); + } +}; + + +struct hb_ot_font_t +{ + hb_ot_face_cmap_accelerator_t cmap; + hb_ot_face_metrics_accelerator_t h_metrics; + hb_ot_face_metrics_accelerator_t v_metrics; + hb_ot_face_glyf_accelerator_t glyf; +}; + + +static hb_ot_font_t * +_hb_ot_font_create (hb_face_t *face) +{ + hb_ot_font_t *ot_font = (hb_ot_font_t *) calloc (1, sizeof (hb_ot_font_t)); + + if (unlikely (!ot_font)) + return NULL; + + unsigned int upem = face->get_upem (); + + ot_font->cmap.init (face); + ot_font->h_metrics.init (face, HB_OT_TAG_hhea, HB_OT_TAG_hmtx, upem>>1); + ot_font->v_metrics.init (face, HB_OT_TAG_vhea, HB_OT_TAG_vmtx, upem); /* TODO Can we do this lazily? */ + ot_font->glyf.init (face); + + return ot_font; +} + +static void +_hb_ot_font_destroy (hb_ot_font_t *ot_font) +{ + ot_font->cmap.fini (); + ot_font->h_metrics.fini (); + ot_font->v_metrics.fini (); + ot_font->glyf.fini (); + + free (ot_font); +} + + +static hb_bool_t +hb_ot_get_glyph (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t unicode, + hb_codepoint_t variation_selector, + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) + +{ + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; + return ot_font->cmap.get_glyph (unicode, variation_selector, glyph); +} + +static hb_position_t +hb_ot_get_glyph_h_advance (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; + return font->em_scale_x (ot_font->h_metrics.get_advance (glyph)); +} + +static hb_position_t +hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + void *user_data HB_UNUSED) +{ + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; + return font->em_scale_y (-(int) ot_font->v_metrics.get_advance (glyph)); +} + +static hb_bool_t +hb_ot_get_glyph_h_origin (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t glyph HB_UNUSED, + hb_position_t *x HB_UNUSED, + hb_position_t *y HB_UNUSED, + void *user_data HB_UNUSED) +{ + /* We always work in the horizontal coordinates. */ + return true; +} + +static hb_bool_t +hb_ot_get_glyph_v_origin (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + +static hb_position_t +hb_ot_get_glyph_h_kerning (hb_font_t *font, + void *font_data, + hb_codepoint_t left_glyph, + hb_codepoint_t right_glyph, + void *user_data HB_UNUSED) +{ + /* TODO */ + return 0; +} + +static hb_position_t +hb_ot_get_glyph_v_kerning (hb_font_t *font HB_UNUSED, + void *font_data HB_UNUSED, + hb_codepoint_t top_glyph HB_UNUSED, + hb_codepoint_t bottom_glyph HB_UNUSED, + void *user_data HB_UNUSED) +{ + /* OpenType doesn't have vertical-kerning other than GPOS. */ + return 0; +} + +static hb_bool_t +hb_ot_get_glyph_extents (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + hb_glyph_extents_t *extents, + void *user_data HB_UNUSED) +{ + const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data; + bool ret = ot_font->glyf.get_extents (glyph, extents); + extents->x_bearing = font->em_scale_x (extents->x_bearing); + extents->y_bearing = font->em_scale_y (extents->y_bearing); + extents->width = font->em_scale_x (extents->width); + extents->height = font->em_scale_y (extents->height); + return ret; +} + +static hb_bool_t +hb_ot_get_glyph_contour_point (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + unsigned int point_index, + hb_position_t *x, + hb_position_t *y, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + +static hb_bool_t +hb_ot_get_glyph_name (hb_font_t *font HB_UNUSED, + void *font_data, + hb_codepoint_t glyph, + char *name, unsigned int size, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + +static hb_bool_t +hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED, + void *font_data, + const char *name, int len, /* -1 means nul-terminated */ + hb_codepoint_t *glyph, + void *user_data HB_UNUSED) +{ + /* TODO */ + return false; +} + + +static hb_font_funcs_t * +_hb_ot_get_font_funcs (void) +{ + static const hb_font_funcs_t ot_ffuncs = { + HB_OBJECT_HEADER_STATIC, + + true, /* immutable */ + + { +#define HB_FONT_FUNC_IMPLEMENT(name) hb_ot_get_##name, + HB_FONT_FUNCS_IMPLEMENT_CALLBACKS +#undef HB_FONT_FUNC_IMPLEMENT + } + }; + + return const_cast (&ot_ffuncs); +} + + +/** + * Since: 0.9.28 + **/ +void +hb_ot_font_set_funcs (hb_font_t *font) +{ + hb_ot_font_t *ot_font = _hb_ot_font_create (font->face); + if (unlikely (!ot_font)) + return; + + hb_font_set_funcs (font, + _hb_ot_get_font_funcs (), + ot_font, + (hb_destroy_func_t) _hb_ot_font_destroy); +} diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-font.h b/3rdparty/harfbuzz-1.0.6/hb-ot-font.h new file mode 100644 index 0000000000..b9947a16bc --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-font.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2014 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod, Roozbeh Pournader + */ + +#ifndef HB_OT_H_IN +#error "Include instead." +#endif + +#ifndef HB_OT_FONT_H +#define HB_OT_FONT_H + +#include "hb.h" + +HB_BEGIN_DECLS + + +void +hb_ot_font_set_funcs (hb_font_t *font); + + +HB_END_DECLS + +#endif /* HB_OT_FONT_H */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-glyf-table.hh b/3rdparty/harfbuzz-1.0.6/hb-ot-glyf-table.hh new file mode 100644 index 0000000000..9e5af6d10d --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-glyf-table.hh @@ -0,0 +1,104 @@ +/* + * Copyright © 2015 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_GLYF_TABLE_HH +#define HB_OT_GLYF_TABLE_HH + +#include "hb-open-type-private.hh" + + +namespace OT { + + +/* + * loca -- Index to Location + */ + +#define HB_OT_TAG_loca HB_TAG('l','o','c','a') + + +struct loca +{ + static const hb_tag_t tableTag = HB_OT_TAG_loca; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (true); + } + + public: + union { + USHORT shortsZ[VAR]; /* Location offset divided by 2. */ + ULONG longsZ[VAR]; /* Location offset. */ + } u; + DEFINE_SIZE_ARRAY (0, u.longsZ); +}; + + +/* + * glyf -- TrueType Glyph Data + */ + +#define HB_OT_TAG_glyf HB_TAG('g','l','y','f') + + +struct glyf +{ + static const hb_tag_t tableTag = HB_OT_TAG_glyf; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + /* We don't check for anything specific here. The users of the + * struct do all the hard work... */ + return_trace (true); + } + + public: + BYTE dataX[VAR]; /* Glyphs data. */ + + DEFINE_SIZE_ARRAY (0, dataX); +}; + +struct glyfGlyphHeader +{ + SHORT numberOfContours; /* If the number of contours is + * greater than or equal to zero, + * this is a simple glyph; if negative, + * this is a composite glyph. */ + SHORT xMin; /* Minimum x for coordinate data. */ + SHORT yMin; /* Minimum y for coordinate data. */ + SHORT xMax; /* Maximum x for coordinate data. */ + SHORT yMax; /* Maximum y for coordinate data. */ + + DEFINE_SIZE_STATIC (10); +}; + +} /* namespace OT */ + + +#endif /* HB_OT_GLYF_TABLE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-head-table.hh b/3rdparty/harfbuzz-1.0.6/hb-ot-head-table.hh new file mode 100644 index 0000000000..fc351cfb48 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-head-table.hh @@ -0,0 +1,152 @@ +/* + * Copyright © 2010 Red Hat, Inc. + * Copyright © 2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_HEAD_TABLE_HH +#define HB_OT_HEAD_TABLE_HH + +#include "hb-open-type-private.hh" + + +namespace OT { + + +/* + * head -- Font Header + */ + +#define HB_OT_TAG_head HB_TAG('h','e','a','d') + +struct head +{ + static const hb_tag_t tableTag = HB_OT_TAG_head; + + inline unsigned int get_upem (void) const + { + unsigned int upem = unitsPerEm; + /* If no valid head table found, assume 1000, which matches typical Type1 usage. */ + return 16 <= upem && upem <= 16384 ? upem : 1000; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && likely (version.major == 1)); + } + + protected: + FixedVersion version; /* Version of the head table--currently + * 0x00010000u for version 1.0. */ + FixedVersion fontRevision; /* Set by font manufacturer. */ + ULONG checkSumAdjustment; /* To compute: set it to 0, sum the + * entire font as ULONG, then store + * 0xB1B0AFBAu - sum. */ + ULONG magicNumber; /* Set to 0x5F0F3CF5u. */ + USHORT flags; /* Bit 0: Baseline for font at y=0; + * Bit 1: Left sidebearing point at x=0; + * Bit 2: Instructions may depend on point size; + * Bit 3: Force ppem to integer values for all + * internal scaler math; may use fractional + * ppem sizes if this bit is clear; + * Bit 4: Instructions may alter advance width + * (the advance widths might not scale linearly); + + * Bits 5-10: These should be set according to + * Apple's specification. However, they are not + * implemented in OpenType. + * Bit 5: This bit should be set in fonts that are + * intended to e laid out vertically, and in + * which the glyphs have been drawn such that an + * x-coordinate of 0 corresponds to the desired + * vertical baseline. + * Bit 6: This bit must be set to zero. + * Bit 7: This bit should be set if the font + * requires layout for correct linguistic + * rendering (e.g. Arabic fonts). + * Bit 8: This bit should be set for a GX font + * which has one or more metamorphosis effects + * designated as happening by default. + * Bit 9: This bit should be set if the font + * contains any strong right-to-left glyphs. + * Bit 10: This bit should be set if the font + * contains Indic-style rearrangement effects. + + * Bit 11: Font data is 'lossless,' as a result + * of having been compressed and decompressed + * with the Agfa MicroType Express engine. + * Bit 12: Font converted (produce compatible metrics) + * Bit 13: Font optimized for ClearType™. + * Note, fonts that rely on embedded bitmaps (EBDT) + * for rendering should not be considered optimized + * for ClearType, and therefore should keep this bit + * cleared. + * Bit 14: Last Resort font. If set, indicates that + * the glyphs encoded in the cmap subtables are simply + * generic symbolic representations of code point + * ranges and don’t truly represent support for those + * code points. If unset, indicates that the glyphs + * encoded in the cmap subtables represent proper + * support for those code points. + * Bit 15: Reserved, set to 0. */ + USHORT unitsPerEm; /* Valid range is from 16 to 16384. This value + * should be a power of 2 for fonts that have + * TrueType outlines. */ + LONGDATETIME created; /* Number of seconds since 12:00 midnight, + January 1, 1904. 64-bit integer */ + LONGDATETIME modified; /* Number of seconds since 12:00 midnight, + January 1, 1904. 64-bit integer */ + SHORT xMin; /* For all glyph bounding boxes. */ + SHORT yMin; /* For all glyph bounding boxes. */ + SHORT xMax; /* For all glyph bounding boxes. */ + SHORT yMax; /* For all glyph bounding boxes. */ + USHORT macStyle; /* Bit 0: Bold (if set to 1); + * Bit 1: Italic (if set to 1) + * Bit 2: Underline (if set to 1) + * Bit 3: Outline (if set to 1) + * Bit 4: Shadow (if set to 1) + * Bit 5: Condensed (if set to 1) + * Bit 6: Extended (if set to 1) + * Bits 7-15: Reserved (set to 0). */ + USHORT lowestRecPPEM; /* Smallest readable size in pixels. */ + SHORT fontDirectionHint; /* Deprecated (Set to 2). + * 0: Fully mixed directional glyphs; + * 1: Only strongly left to right; + * 2: Like 1 but also contains neutrals; + * -1: Only strongly right to left; + * -2: Like -1 but also contains neutrals. */ + public: + SHORT indexToLocFormat; /* 0 for short offsets, 1 for long. */ + SHORT glyphDataFormat; /* 0 for current format. */ + + DEFINE_SIZE_STATIC (54); +}; + + +} /* namespace OT */ + + +#endif /* HB_OT_HEAD_TABLE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-hhea-table.hh b/3rdparty/harfbuzz-1.0.6/hb-ot-hhea-table.hh new file mode 100644 index 0000000000..24114534a7 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-hhea-table.hh @@ -0,0 +1,103 @@ +/* + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_HHEA_TABLE_HH +#define HB_OT_HHEA_TABLE_HH + +#include "hb-open-type-private.hh" + + +namespace OT { + + +/* + * hhea -- The Horizontal Header Table + * vhea -- The Vertical Header Table + */ + +#define HB_OT_TAG_hhea HB_TAG('h','h','e','a') +#define HB_OT_TAG_vhea HB_TAG('v','h','e','a') + + +struct _hea +{ + static const hb_tag_t tableTag = HB_TAG('_','h','e','a'); + + static const hb_tag_t hheaTag = HB_OT_TAG_hhea; + static const hb_tag_t vheaTag = HB_OT_TAG_vhea; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && likely (version.major == 1)); + } + + public: + FixedVersion version; /* 0x00010000u for version 1.0. */ + FWORD ascender; /* Typographic ascent. */ + FWORD descender; /* Typographic descent. */ + FWORD lineGap; /* Typographic line gap. */ + UFWORD advanceMax; /* Maximum advance width/height value in + * metrics table. */ + FWORD minLeadingBearing; /* Minimum left/top sidebearing value in + * metrics table. */ + FWORD minTrailingBearing; /* Minimum right/bottom sidebearing value; + * calculated as Min(aw - lsb - + * (xMax - xMin)) for horizontal. */ + FWORD maxExtent; /* horizontal: Max(lsb + (xMax - xMin)), + * vertical: minLeadingBearing+(yMax-yMin). */ + SHORT caretSlopeRise; /* Used to calculate the slope of the + * cursor (rise/run); 1 for vertical caret, + * 0 for horizontal.*/ + SHORT caretSlopeRun; /* 0 for vertical caret, 1 for horizontal. */ + SHORT caretOffset; /* The amount by which a slanted + * highlight on a glyph needs + * to be shifted to produce the + * best appearance. Set to 0 for + * non-slanted fonts. */ + SHORT reserved1; /* Set to 0. */ + SHORT reserved2; /* Set to 0. */ + SHORT reserved3; /* Set to 0. */ + SHORT reserved4; /* Set to 0. */ + SHORT metricDataFormat; /* 0 for current format. */ + USHORT numberOfLongMetrics; /* Number of LongMetric entries in metric + * table. */ + public: + DEFINE_SIZE_STATIC (36); +}; + +struct hhea : _hea { + static const hb_tag_t tableTag = HB_OT_TAG_hhea; +}; +struct vhea : _hea { + static const hb_tag_t tableTag = HB_OT_TAG_vhea; +}; + + +} /* namespace OT */ + + +#endif /* HB_OT_HHEA_TABLE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-hmtx-table.hh b/3rdparty/harfbuzz-1.0.6/hb-ot-hmtx-table.hh new file mode 100644 index 0000000000..49056e6769 --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-hmtx-table.hh @@ -0,0 +1,104 @@ +/* + * Copyright © 2011,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_HMTX_TABLE_HH +#define HB_OT_HMTX_TABLE_HH + +#include "hb-open-type-private.hh" + + +namespace OT { + + +/* + * hmtx -- The Horizontal Metrics Table + * vmtx -- The Vertical Metrics Table + */ + +#define HB_OT_TAG_hmtx HB_TAG('h','m','t','x') +#define HB_OT_TAG_vmtx HB_TAG('v','m','t','x') + + +struct LongMetric +{ + USHORT advance; /* Advance width/height. */ + SHORT lsb; /* Leading (left/top) side bearing. */ + public: + DEFINE_SIZE_STATIC (4); +}; + +struct _mtx +{ + static const hb_tag_t tableTag = HB_TAG('_','m','t','x'); + + static const hb_tag_t hmtxTag = HB_OT_TAG_hmtx; + static const hb_tag_t vmtxTag = HB_OT_TAG_vmtx; + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + /* We don't check for anything specific here. The users of the + * struct do all the hard work... */ + return_trace (true); + } + + public: + LongMetric longMetric[VAR]; /* Paired advance width and leading + * bearing values for each glyph. The + * value numOfHMetrics comes from + * the 'hhea' table. If the font is + * monospaced, only one entry need + * be in the array, but that entry is + * required. The last entry applies to + * all subsequent glyphs. */ + SHORT leadingBearingX[VAR]; /* Here the advance is assumed + * to be the same as the advance + * for the last entry above. The + * number of entries in this array is + * derived from numGlyphs (from 'maxp' + * table) minus numberOfLongMetrics. + * This generally is used with a run + * of monospaced glyphs (e.g., Kanji + * fonts or Courier fonts). Only one + * run is allowed and it must be at + * the end. This allows a monospaced + * font to vary the side bearing + * values for each glyph. */ + public: + DEFINE_SIZE_ARRAY2 (0, longMetric, leadingBearingX); +}; + +struct hmtx : _mtx { + static const hb_tag_t tableTag = HB_OT_TAG_hmtx; +}; +struct vmtx : _mtx { + static const hb_tag_t tableTag = HB_OT_TAG_vmtx; +}; + +} /* namespace OT */ + + +#endif /* HB_OT_HMTX_TABLE_HH */ diff --git a/3rdparty/harfbuzz-1.0.6/hb-ot-layout-common-private.hh b/3rdparty/harfbuzz-1.0.6/hb-ot-layout-common-private.hh new file mode 100644 index 0000000000..ea61f5c1bd --- /dev/null +++ b/3rdparty/harfbuzz-1.0.6/hb-ot-layout-common-private.hh @@ -0,0 +1,1224 @@ +/* + * Copyright © 2007,2008,2009 Red Hat, Inc. + * Copyright © 2010,2012 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Red Hat Author(s): Behdad Esfahbod + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_OT_LAYOUT_COMMON_PRIVATE_HH +#define HB_OT_LAYOUT_COMMON_PRIVATE_HH + +#include "hb-ot-layout-private.hh" +#include "hb-open-type-private.hh" +#include "hb-set-private.hh" + + +namespace OT { + + +#define TRACE_DISPATCH(this, format) \ + hb_auto_trace_t trace \ + (&c->debug_depth, c->get_name (), this, HB_FUNC, \ + "format %d", (int) format); + + +#define NOT_COVERED ((unsigned int) -1) +#define MAX_NESTING_LEVEL 6 +#define MAX_CONTEXT_LENGTH 64 + + + +/* + * + * OpenType Layout Common Table Formats + * + */ + + +/* + * Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList + */ + +template +struct Record +{ + inline int cmp (hb_tag_t a) const { + return tag.cmp (a); + } + + struct sanitize_closure_t { + hb_tag_t tag; + const void *list_base; + }; + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const + { + TRACE_SANITIZE (this); + const sanitize_closure_t closure = {tag, base}; + return_trace (c->check_struct (this) && offset.sanitize (c, base, &closure)); + } + + Tag tag; /* 4-byte Tag identifier */ + OffsetTo + offset; /* Offset from beginning of object holding + * the Record */ + public: + DEFINE_SIZE_STATIC (6); +}; + +template +struct RecordArrayOf : SortedArrayOf > { + inline const Tag& get_tag (unsigned int i) const + { + /* We cheat slightly and don't define separate Null objects + * for Record types. Instead, we return the correct Null(Tag) + * here. */ + if (unlikely (i >= this->len)) return Null(Tag); + return (*this)[i].tag; + } + inline unsigned int get_tags (unsigned int start_offset, + unsigned int *record_count /* IN/OUT */, + hb_tag_t *record_tags /* OUT */) const + { + if (record_count) { + const Record *arr = this->sub_array (start_offset, record_count); + unsigned int count = *record_count; + for (unsigned int i = 0; i < count; i++) + record_tags[i] = arr[i].tag; + } + return this->len; + } + inline bool find_index (hb_tag_t tag, unsigned int *index) const + { + /* If we want to allow non-sorted data, we can lsearch(). */ + int i = this->/*lsearch*/bsearch (tag); + if (i != -1) { + if (index) *index = i; + return true; + } else { + if (index) *index = Index::NOT_FOUND_INDEX; + return false; + } + } +}; + +template +struct RecordListOf : RecordArrayOf +{ + inline const Type& operator [] (unsigned int i) const + { return this+RecordArrayOf::operator [](i).offset; } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (RecordArrayOf::sanitize (c, this)); + } +}; + + +struct RangeRecord +{ + inline int cmp (hb_codepoint_t g) const { + return g < start ? -1 : g <= end ? 0 : +1 ; + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this)); + } + + inline bool intersects (const hb_set_t *glyphs) const { + return glyphs->intersects (start, end); + } + + template + inline void add_coverage (set_t *glyphs) const { + glyphs->add_range (start, end); + } + + GlyphID start; /* First GlyphID in the range */ + GlyphID end; /* Last GlyphID in the range */ + USHORT value; /* Value */ + public: + DEFINE_SIZE_STATIC (6); +}; +DEFINE_NULL_DATA (RangeRecord, "\000\001"); + + +struct IndexArray : ArrayOf +{ + inline unsigned int get_indexes (unsigned int start_offset, + unsigned int *_count /* IN/OUT */, + unsigned int *_indexes /* OUT */) const + { + if (_count) { + const USHORT *arr = this->sub_array (start_offset, _count); + unsigned int count = *_count; + for (unsigned int i = 0; i < count; i++) + _indexes[i] = arr[i]; + } + return this->len; + } +}; + + +struct Script; +struct LangSys; +struct Feature; + + +struct LangSys +{ + inline unsigned int get_feature_count (void) const + { return featureIndex.len; } + inline hb_tag_t get_feature_index (unsigned int i) const + { return featureIndex[i]; } + inline unsigned int get_feature_indexes (unsigned int start_offset, + unsigned int *feature_count /* IN/OUT */, + unsigned int *feature_indexes /* OUT */) const + { return featureIndex.get_indexes (start_offset, feature_count, feature_indexes); } + + inline bool has_required_feature (void) const { return reqFeatureIndex != 0xFFFFu; } + inline unsigned int get_required_feature_index (void) const + { + if (reqFeatureIndex == 0xFFFFu) + return Index::NOT_FOUND_INDEX; + return reqFeatureIndex;; + } + + inline bool sanitize (hb_sanitize_context_t *c, + const Record::sanitize_closure_t * = NULL) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && featureIndex.sanitize (c)); + } + + Offset<> lookupOrderZ; /* = Null (reserved for an offset to a + * reordering table) */ + USHORT reqFeatureIndex;/* Index of a feature required for this + * language system--if no required features + * = 0xFFFFu */ + IndexArray featureIndex; /* Array of indices into the FeatureList */ + public: + DEFINE_SIZE_ARRAY (6, featureIndex); +}; +DEFINE_NULL_DATA (LangSys, "\0\0\xFF\xFF"); + + +struct Script +{ + inline unsigned int get_lang_sys_count (void) const + { return langSys.len; } + inline const Tag& get_lang_sys_tag (unsigned int i) const + { return langSys.get_tag (i); } + inline unsigned int get_lang_sys_tags (unsigned int start_offset, + unsigned int *lang_sys_count /* IN/OUT */, + hb_tag_t *lang_sys_tags /* OUT */) const + { return langSys.get_tags (start_offset, lang_sys_count, lang_sys_tags); } + inline const LangSys& get_lang_sys (unsigned int i) const + { + if (i == Index::NOT_FOUND_INDEX) return get_default_lang_sys (); + return this+langSys[i].offset; + } + inline bool find_lang_sys_index (hb_tag_t tag, unsigned int *index) const + { return langSys.find_index (tag, index); } + + inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; } + inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; } + + inline bool sanitize (hb_sanitize_context_t *c, + const Record + + +

SDL NACL Test

+

Status: NO-STATUS

+ +
+ + diff --git a/3rdparty/sdl2-2.0.4/test/nacl/manifest.json b/3rdparty/sdl2-2.0.4/test/nacl/manifest.json new file mode 100644 index 0000000000..df6772b4c4 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/nacl/manifest.json @@ -0,0 +1,22 @@ +{ + "name": "SDL testgles2", + "version": "33.0.1750.117", + "minimum_chrome_version": "33.0.1750.117", + "manifest_version": 2, + "description": "testgles2", + "offline_enabled": true, + "icons": { + "128": "icon128.png" + }, + "app": { + "background": { + "scripts": ["background.js"] + } + }, + "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMN716Qyu0l2EHNFqIJVqVysFcTR6urqhaGGqW4UK7slBaURz9+Sb1b4Ot5P1uQNE5c+CTU5Vu61wpqmSqMMxqHLWdPPMh8uRlyctsb2cxWwG6XoGSvpX29NsQVUFXd4v2tkJm3G9t+V0X8TYskrvWQmnyOW8OEIDvrBhUEfFxWQIDAQAB", + "oauth2": { + "client_id": "903965034255.apps.googleusercontent.com", + "scopes": ["https://www.googleapis.com/auth/drive"] + }, + "permissions": [] +} diff --git a/3rdparty/sdl2-2.0.0/test/picture.xbm b/3rdparty/sdl2-2.0.4/test/picture.xbm similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/picture.xbm rename to 3rdparty/sdl2-2.0.4/test/picture.xbm diff --git a/3rdparty/sdl2-2.0.0/test/relative_mode.markdown b/3rdparty/sdl2-2.0.4/test/relative_mode.markdown similarity index 90% rename from 3rdparty/sdl2-2.0.0/test/relative_mode.markdown rename to 3rdparty/sdl2-2.0.4/test/relative_mode.markdown index 9ae88aa1c0..5b2ed61850 100644 --- a/3rdparty/sdl2-2.0.0/test/relative_mode.markdown +++ b/3rdparty/sdl2-2.0.4/test/relative_mode.markdown @@ -37,9 +37,11 @@ Code int main(int argc, char *argv[]) { + SDL_Window *win; + SDL_Init(SDL_INIT_VIDEO); - SDL_Window *win = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0); + win = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0); SDL_SetRelativeMouseMode(SDL_TRUE); while (1) diff --git a/3rdparty/sdl2-2.0.0/test/sample.bmp b/3rdparty/sdl2-2.0.4/test/sample.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/sample.bmp rename to 3rdparty/sdl2-2.0.4/test/sample.bmp diff --git a/3rdparty/sdl2-2.0.0/test/sample.wav b/3rdparty/sdl2-2.0.4/test/sample.wav similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/sample.wav rename to 3rdparty/sdl2-2.0.4/test/sample.wav diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p01_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p01_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p01_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p01_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p01_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p01_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p01_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p01_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p01_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p01_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p01_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p01_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p02_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p02_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p02_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p02_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p02_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p02_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p02_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p02_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p02_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p02_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p02_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p02_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p03_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p03_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p03_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p03_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p03_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p03_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p03_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p03_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p04_shape1.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p04_shape1.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p04_shape1.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p04_shape1.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p04_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p04_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p04_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p04_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p04_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p04_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p04_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p04_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p04_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p04_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p04_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p04_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p05_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p05_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p05_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p05_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p06_shape1alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p06_shape1alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p06_shape1alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p06_shape1alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p06_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p06_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p06_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p06_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p06_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p06_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p06_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p06_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p06_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p06_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p06_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p06_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p07_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p07_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p07_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p07_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p07_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p07_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p07_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p07_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p07_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p07_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p07_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p07_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p08_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p08_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p08_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p08_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p08_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p08_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p08_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p08_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p08_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p08_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p08_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p08_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p09_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p09_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p09_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p09_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p09_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p09_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p09_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p09_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p09_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p09_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p09_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p09_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p10_shape1.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p10_shape1.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p10_shape1.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p10_shape1.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p10_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p10_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p10_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p10_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p10_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p10_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p10_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p10_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p10_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p10_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p10_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p10_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p11_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p11_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p11_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p11_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p11_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p11_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p11_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p11_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p11_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p11_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p11_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p11_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p12_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p12_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p12_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p12_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p12_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p12_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p12_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p12_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p13_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p13_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p13_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p13_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p13_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p13_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p13_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p13_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p13_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p13_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p13_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p13_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p14_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p14_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p14_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p14_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p14_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p14_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p14_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p14_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p15_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p15_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p15_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p15_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p15_shape32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p15_shape32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p15_shape32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p15_shape32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p15_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p15_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p15_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p15_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p16_shape1.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p16_shape1.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p16_shape1.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p16_shape1.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p16_shape24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p16_shape24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p16_shape24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p16_shape24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/p16_shape8.bmp b/3rdparty/sdl2-2.0.4/test/shapes/p16_shape8.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/p16_shape8.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/p16_shape8.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/trollface_24.bmp b/3rdparty/sdl2-2.0.4/test/shapes/trollface_24.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/trollface_24.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/trollface_24.bmp diff --git a/3rdparty/sdl2-2.0.0/test/shapes/trollface_32alpha.bmp b/3rdparty/sdl2-2.0.4/test/shapes/trollface_32alpha.bmp similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/shapes/trollface_32alpha.bmp rename to 3rdparty/sdl2-2.0.4/test/shapes/trollface_32alpha.bmp diff --git a/3rdparty/sdl2-2.0.0/test/testatomic.c b/3rdparty/sdl2-2.0.4/test/testatomic.c similarity index 82% rename from 3rdparty/sdl2-2.0.0/test/testatomic.c rename to 3rdparty/sdl2-2.0.4/test/testatomic.c index be60a611be..41cc9ab1b3 100644 --- a/3rdparty/sdl2-2.0.0/test/testatomic.c +++ b/3rdparty/sdl2-2.0.4/test/testatomic.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -12,9 +12,6 @@ #include #include "SDL.h" -#include "SDL_atomic.h" -#include "SDL_assert.h" -#include "SDL_cpuinfo.h" /* Absolutely basic tests just to see if we get the expected value @@ -45,39 +42,39 @@ void RunBasicTest() SDL_atomic_t v; SDL_bool tfret = SDL_FALSE; - printf("\nspin lock---------------------------------------\n\n"); + SDL_Log("\nspin lock---------------------------------------\n\n"); SDL_AtomicLock(&lock); - printf("AtomicLock lock=%d\n", lock); + SDL_Log("AtomicLock lock=%d\n", lock); SDL_AtomicUnlock(&lock); - printf("AtomicUnlock lock=%d\n", lock); + SDL_Log("AtomicUnlock lock=%d\n", lock); - printf("\natomic -----------------------------------------\n\n"); + SDL_Log("\natomic -----------------------------------------\n\n"); SDL_AtomicSet(&v, 0); - tfret = SDL_AtomicSet(&v, 10) == 0; - printf("AtomicSet(10) tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); - tfret = SDL_AtomicAdd(&v, 10) == 10; - printf("AtomicAdd(10) tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = SDL_AtomicSet(&v, 10) == 0 ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicSet(10) tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = SDL_AtomicAdd(&v, 10) == 10 ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicAdd(10) tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); SDL_AtomicSet(&v, 0); SDL_AtomicIncRef(&v); - tfret = (SDL_AtomicGet(&v) == 1); - printf("AtomicIncRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = (SDL_AtomicGet(&v) == 1) ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicIncRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); SDL_AtomicIncRef(&v); - tfret = (SDL_AtomicGet(&v) == 2); - printf("AtomicIncRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); - tfret = (SDL_AtomicDecRef(&v) == SDL_FALSE); - printf("AtomicDecRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); - tfret = (SDL_AtomicDecRef(&v) == SDL_TRUE); - printf("AtomicDecRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = (SDL_AtomicGet(&v) == 2) ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicIncRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = (SDL_AtomicDecRef(&v) == SDL_FALSE) ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicDecRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = (SDL_AtomicDecRef(&v) == SDL_TRUE) ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicDecRef() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); SDL_AtomicSet(&v, 10); - tfret = (SDL_AtomicCAS(&v, 0, 20) == SDL_FALSE); - printf("AtomicCAS() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = (SDL_AtomicCAS(&v, 0, 20) == SDL_FALSE) ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicCAS() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); value = SDL_AtomicGet(&v); - tfret = (SDL_AtomicCAS(&v, value, 20) == SDL_TRUE); - printf("AtomicCAS() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); + tfret = (SDL_AtomicCAS(&v, value, 20) == SDL_TRUE) ? SDL_TRUE : SDL_FALSE; + SDL_Log("AtomicCAS() tfret=%s val=%d\n", tf(tfret), SDL_AtomicGet(&v)); } /**************************************************************************/ @@ -120,7 +117,7 @@ static int adder(void* junk) { unsigned long N=NInter; - printf("Thread subtracting %d %lu times\n",CountInc,N); + SDL_Log("Thread subtracting %d %lu times\n",CountInc,N); while (N--) { SDL_AtomicAdd(&good, -CountInc); bad-=CountInc; @@ -152,7 +149,7 @@ void runAdder(void) end = SDL_GetTicks(); - printf("Finished in %f sec\n", (end - start) / 1000.f); + SDL_Log("Finished in %f sec\n", (end - start) / 1000.f); } static @@ -161,28 +158,28 @@ void RunEpicTest() int b; atomicValue v; - printf("\nepic test---------------------------------------\n\n"); + SDL_Log("\nepic test---------------------------------------\n\n"); - printf("Size asserted to be >= 32-bit\n"); + SDL_Log("Size asserted to be >= 32-bit\n"); SDL_assert(sizeof(atomicValue)>=4); - printf("Check static initializer\n"); + SDL_Log("Check static initializer\n"); v=SDL_AtomicGet(&good); SDL_assert(v==42); SDL_assert(bad==42); - printf("Test negative values\n"); + SDL_Log("Test negative values\n"); SDL_AtomicSet(&good, -5); v=SDL_AtomicGet(&good); SDL_assert(v==-5); - printf("Verify maximum value\n"); + SDL_Log("Verify maximum value\n"); SDL_AtomicSet(&good, CountTo); v=SDL_AtomicGet(&good); SDL_assert(v==CountTo); - printf("Test compare and exchange\n"); + SDL_Log("Test compare and exchange\n"); b=SDL_AtomicCAS(&good, 500, 43); SDL_assert(!b); /* no swap since CountTo!=500 */ @@ -194,7 +191,7 @@ void RunEpicTest() v=SDL_AtomicGet(&good); SDL_assert(v==44); - printf("Test Add\n"); + SDL_Log("Test Add\n"); v=SDL_AtomicAdd(&good, 1); SDL_assert(v==44); @@ -206,7 +203,7 @@ void RunEpicTest() v=SDL_AtomicGet(&good); SDL_assert(v==55); - printf("Test Add (Negative values)\n"); + SDL_Log("Test Add (Negative values)\n"); v=SDL_AtomicAdd(&good, -20); SDL_assert(v==55); @@ -223,7 +220,7 @@ void RunEpicTest() v=SDL_AtomicGet(&good); SDL_assert(v==15); - printf("Reset before count down test\n"); + SDL_Log("Reset before count down test\n"); SDL_AtomicSet(&good, CountTo); v=SDL_AtomicGet(&good); SDL_assert(v==CountTo); @@ -231,11 +228,11 @@ void RunEpicTest() bad=CountTo; SDL_assert(bad==CountTo); - printf("Counting down from %d, Expect %d remaining\n",CountTo,Expect); + SDL_Log("Counting down from %d, Expect %d remaining\n",CountTo,Expect); runAdder(); v=SDL_AtomicGet(&good); - printf("Atomic %d Non-Atomic %d\n",v,bad); + SDL_Log("Atomic %d Non-Atomic %d\n",v,bad); SDL_assert(v==Expect); SDL_assert(bad!=Expect); } @@ -306,6 +303,7 @@ static void InitEventQueue(SDL_EventQueue *queue) #ifdef TEST_SPINLOCK_FIFO queue->lock = 0; SDL_AtomicSet(&queue->rwcount, 0); + SDL_AtomicSet(&queue->watcher, 0); #endif queue->active = SDL_TRUE; } @@ -429,7 +427,7 @@ static SDL_bool EnqueueEvent_Mutex(SDL_EventQueue *queue, const SDL_Event *event } else if (delta < 0) { /* We ran into an old queue entry, which means it still needs to be dequeued */ } else { - printf("ERROR: mutex failed!\n"); + SDL_Log("ERROR: mutex failed!\n"); } SDL_UnlockMutex(queue->mutex); @@ -462,7 +460,7 @@ static SDL_bool DequeueEvent_Mutex(SDL_EventQueue *queue, SDL_Event *event) } else if (delta < 0) { /* We ran into an old queue entry, which means we've hit empty */ } else { - printf("ERROR: mutex failed!\n"); + SDL_Log("ERROR: mutex failed!\n"); } SDL_UnlockMutex(queue->mutex); @@ -598,9 +596,11 @@ static void RunFIFOTest(SDL_bool lock_free) Uint32 start, end; int i, j; int grand_total; + char textBuffer[1024]; + int len; - printf("\nFIFO test---------------------------------------\n\n"); - printf("Mode: %s\n", lock_free ? "LockFree" : "Mutex"); + SDL_Log("\nFIFO test---------------------------------------\n\n"); + SDL_Log("Mode: %s\n", lock_free ? "LockFree" : "Mutex"); readersDone = SDL_CreateSemaphore(0); writersDone = SDL_CreateSemaphore(0); @@ -622,7 +622,7 @@ static void RunFIFOTest(SDL_bool lock_free) #endif /* Start the readers first */ - printf("Starting %d readers\n", NUM_READERS); + SDL_Log("Starting %d readers\n", NUM_READERS); SDL_zero(readerData); SDL_AtomicSet(&readersRunning, NUM_READERS); for (i = 0; i < NUM_READERS; ++i) { @@ -634,7 +634,7 @@ static void RunFIFOTest(SDL_bool lock_free) } /* Start up the writers */ - printf("Starting %d writers\n", NUM_WRITERS); + SDL_Log("Starting %d writers\n", NUM_WRITERS); SDL_zero(writerData); SDL_AtomicSet(&writersRunning, NUM_WRITERS); for (i = 0; i < NUM_WRITERS; ++i) { @@ -668,16 +668,16 @@ static void RunFIFOTest(SDL_bool lock_free) SDL_DestroyMutex(queue.mutex); } - printf("Finished in %f sec\n", (end - start) / 1000.f); + SDL_Log("Finished in %f sec\n", (end - start) / 1000.f); - printf("\n"); + SDL_Log("\n"); for (i = 0; i < NUM_WRITERS; ++i) { - printf("Writer %d wrote %d events, had %d waits\n", i, EVENTS_PER_WRITER, writerData[i].waits); + SDL_Log("Writer %d wrote %d events, had %d waits\n", i, EVENTS_PER_WRITER, writerData[i].waits); } - printf("Writers wrote %d total events\n", NUM_WRITERS*EVENTS_PER_WRITER); + SDL_Log("Writers wrote %d total events\n", NUM_WRITERS*EVENTS_PER_WRITER); /* Print a breakdown of which readers read messages from which writer */ - printf("\n"); + SDL_Log("\n"); grand_total = 0; for (i = 0; i < NUM_READERS; ++i) { int total = 0; @@ -685,17 +685,21 @@ static void RunFIFOTest(SDL_bool lock_free) total += readerData[i].counters[j]; } grand_total += total; - printf("Reader %d read %d events, had %d waits\n", i, total, readerData[i].waits); - printf(" { "); + SDL_Log("Reader %d read %d events, had %d waits\n", i, total, readerData[i].waits); + SDL_snprintf(textBuffer, sizeof(textBuffer), " { "); for (j = 0; j < NUM_WRITERS; ++j) { if (j > 0) { - printf(", "); + len = SDL_strlen(textBuffer); + SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, ", "); } - printf("%d", readerData[i].counters[j]); + len = SDL_strlen(textBuffer); + SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, "%d", readerData[i].counters[j]); } - printf(" }\n"); + len = SDL_strlen(textBuffer); + SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, " }\n"); + SDL_Log("%s", textBuffer); } - printf("Readers read %d total events\n", grand_total); + SDL_Log("Readers read %d total events\n", grand_total); } /* End FIFO test */ @@ -704,6 +708,9 @@ static void RunFIFOTest(SDL_bool lock_free) int main(int argc, char *argv[]) { + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + RunBasicTest(); RunEpicTest(); /* This test is really slow, so don't run it by default */ diff --git a/3rdparty/sdl2-2.0.4/test/testaudiohotplug.c b/3rdparty/sdl2-2.0.4/test/testaudiohotplug.c new file mode 100644 index 0000000000..e13868ec2e --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testaudiohotplug.c @@ -0,0 +1,183 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Program to test hotplugging of audio devices */ + +#include "SDL_config.h" + +#include +#include + +#if HAVE_SIGNAL_H +#include +#endif + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#include "SDL.h" + +static SDL_AudioSpec spec; +static Uint8 *sound = NULL; /* Pointer to wave data */ +static Uint32 soundlen = 0; /* Length of wave data */ + +static int posindex = 0; +static Uint32 positions[64]; + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDL_Quit(); + exit(rc); +} + +void SDLCALL +fillerup(void *_pos, Uint8 * stream, int len) +{ + Uint32 pos = *((Uint32 *) _pos); + Uint8 *waveptr; + int waveleft; + + /* Set up the pointers */ + waveptr = sound + pos; + waveleft = soundlen - pos; + + /* Go! */ + while (waveleft <= len) { + SDL_memcpy(stream, waveptr, waveleft); + stream += waveleft; + len -= waveleft; + waveptr = sound; + waveleft = soundlen; + pos = 0; + } + SDL_memcpy(stream, waveptr, len); + pos += len; + *((Uint32 *) _pos) = pos; +} + +static int done = 0; +void +poked(int sig) +{ + done = 1; +} + +static void +iteration() +{ + SDL_Event e; + SDL_AudioDeviceID dev; + while (SDL_PollEvent(&e)) { + if (e.type == SDL_QUIT) { + done = 1; + } else if (e.type == SDL_AUDIODEVICEADDED) { + const char *name = SDL_GetAudioDeviceName(e.adevice.which, 0); + SDL_Log("New %s audio device: %s\n", e.adevice.iscapture ? "capture" : "output", name); + if (!e.adevice.iscapture) { + positions[posindex] = 0; + spec.userdata = &positions[posindex++]; + spec.callback = fillerup; + dev = SDL_OpenAudioDevice(name, 0, &spec, NULL, 0); + if (!dev) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open '%s': %s\n", name, SDL_GetError()); + } else { + SDL_Log("Opened '%s' as %u\n", name, (unsigned int) dev); + SDL_PauseAudioDevice(dev, 0); + } + } + } else if (e.type == SDL_AUDIODEVICEREMOVED) { + dev = (SDL_AudioDeviceID) e.adevice.which; + SDL_Log("%s device %u removed.\n", e.adevice.iscapture ? "capture" : "output", (unsigned int) dev); + SDL_CloseAudioDevice(dev); + } + } +} + +#ifdef __EMSCRIPTEN__ +void +loop() +{ + if(done) + emscripten_cancel_main_loop(); + else + iteration(); +} +#endif + +int +main(int argc, char *argv[]) +{ + int i; + char filename[4096]; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Load the SDL library */ + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + + /* Some targets (Mac CoreAudio) need an event queue for audio hotplug, so make and immediately hide a window. */ + SDL_MinimizeWindow(SDL_CreateWindow("testaudiohotplug", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0)); + + if (argc > 1) { + SDL_strlcpy(filename, argv[1], sizeof(filename)); + } else { + SDL_strlcpy(filename, "sample.wav", sizeof(filename)); + } + /* Load the wave file into memory */ + if (SDL_LoadWAV(filename, &spec, &sound, &soundlen) == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", filename, SDL_GetError()); + quit(1); + } + +#if HAVE_SIGNAL_H + /* Set the signals */ +#ifdef SIGHUP + signal(SIGHUP, poked); +#endif + signal(SIGINT, poked); +#ifdef SIGQUIT + signal(SIGQUIT, poked); +#endif + signal(SIGTERM, poked); +#endif /* HAVE_SIGNAL_H */ + + /* Show the list of available drivers */ + SDL_Log("Available audio drivers:"); + for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) { + SDL_Log("%i: %s", i, SDL_GetAudioDriver(i)); + } + + SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver()); + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + SDL_Delay(100); + iteration(); + } +#endif + + /* Clean up on signal */ + SDL_FreeWAV(sound); + SDL_Quit(); + return (0); +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.4/test/testaudioinfo.c b/3rdparty/sdl2-2.0.4/test/testaudioinfo.c new file mode 100644 index 0000000000..53bf0f5e2f --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testaudioinfo.c @@ -0,0 +1,70 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +#include +#include "SDL.h" + +static void +print_devices(int iscapture) +{ + const char *typestr = ((iscapture) ? "capture" : "output"); + int n = SDL_GetNumAudioDevices(iscapture); + + SDL_Log("%s devices:\n", typestr); + + if (n == -1) + SDL_Log(" Driver can't detect specific %s devices.\n\n", typestr); + else if (n == 0) + SDL_Log(" No %s devices found.\n\n", typestr); + else { + int i; + for (i = 0; i < n; i++) { + SDL_Log(" %s\n", SDL_GetAudioDeviceName(i, iscapture)); + } + SDL_Log("\n"); + } +} + +int +main(int argc, char **argv) +{ + int n; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Load the SDL library */ + if (SDL_Init(SDL_INIT_AUDIO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + + /* Print available audio drivers */ + n = SDL_GetNumAudioDrivers(); + if (n == 0) { + SDL_Log("No built-in audio drivers\n\n"); + } else { + int i; + SDL_Log("Built-in audio drivers:\n"); + for (i = 0; i < n; ++i) { + SDL_Log(" %s\n", SDL_GetAudioDriver(i)); + } + SDL_Log("\n"); + } + + SDL_Log("Using audio driver: %s\n\n", SDL_GetCurrentAudioDriver()); + + print_devices(0); + print_devices(1); + + SDL_Quit(); + return 0; +} diff --git a/3rdparty/sdl2-2.0.0/test/testautomation.c b/3rdparty/sdl2-2.0.4/test/testautomation.c similarity index 89% rename from 3rdparty/sdl2-2.0.0/test/testautomation.c rename to 3rdparty/sdl2-2.0.4/test/testautomation.c index 5eea7ec6f4..eea74b3b86 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -62,7 +62,7 @@ main(int argc, char *argv[]) } else if (SDL_strcasecmp(argv[i], "--execKey") == 0) { if (argv[i + 1]) { - SDL_sscanf(argv[i + 1], "%llu", (long long unsigned int *)&userExecKey); + SDL_sscanf(argv[i + 1], "%"SDL_PRIu64, (long long unsigned int *)&userExecKey); consumed = 2; } } @@ -80,8 +80,7 @@ main(int argc, char *argv[]) } } if (consumed < 0) { - fprintf(stderr, - "Usage: %s %s [--iterations #] [--execKey #] [--seed string] [--filter suite_name|test_name]\n", + SDL_Log("Usage: %s %s [--iterations #] [--execKey #] [--seed string] [--filter suite_name|test_name]\n", argv[0], SDLTest_CommonUsage(state)); quit(1); } @@ -114,12 +113,8 @@ main(int argc, char *argv[]) } /* Clean up */ - if (userRunSeed != NULL) { - SDL_free(userRunSeed); - } - if (filter != NULL) { - SDL_free(filter); - } + SDL_free(userRunSeed); + SDL_free(filter); /* Shutdown everything */ quit(result); diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_audio.c b/3rdparty/sdl2-2.0.4/test/testautomation_audio.c similarity index 77% rename from 3rdparty/sdl2-2.0.0/test/testautomation_audio.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_audio.c index 90b08acbdc..bef838dde0 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_audio.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_audio.c @@ -3,6 +3,9 @@ * New/updated tests: aschiffler at ferzkopp dot net */ +/* quiet windows compiler warnings */ +#define _CRT_SECURE_NO_WARNINGS + #include #include @@ -25,11 +28,29 @@ _audioSetUp(void *arg) } } +void +_audioTearDown(void *arg) +{ + /* Remove a possibly created file from SDL disk writer audio driver; ignore errors */ + remove("sdlaudio.raw"); + + SDLTest_AssertPass("Cleanup of test files completed"); +} + + +/* Global counter for callback invocation */ +int _audio_testCallbackCounter; + +/* Global accumulator for total callback length */ +int _audio_testCallbackLength; + /* Test callback function */ void _audio_testCallback(void *userdata, Uint8 *stream, int len) { - /* TODO: add tracking if callback was called */ + /* track that callback was called */ + _audio_testCallbackCounter++; + _audio_testCallbackLength += len; } @@ -38,8 +59,8 @@ void _audio_testCallback(void *userdata, Uint8 *stream, int len) /** * \brief Stop and restart audio subsystem * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitSubSystem - * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitSubSystem + * \sa https://wiki.libsdl.org/SDL_QuitSubSystem + * \sa https://wiki.libsdl.org/SDL_InitSubSystem */ int audio_quitInitAudioSubSystem() { @@ -56,8 +77,8 @@ int audio_quitInitAudioSubSystem() /** * \brief Start and stop audio directly * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitAudio - * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitAudio + * \sa https://wiki.libsdl.org/SDL_InitAudio + * \sa https://wiki.libsdl.org/SDL_QuitAudio */ int audio_initQuitAudio() { @@ -71,13 +92,13 @@ int audio_initQuitAudio() /* Loop over all available audio drivers */ iMax = SDL_GetNumAudioDrivers(); - SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers"); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); for (i = 0; i < iMax; i++) { audioDriver = SDL_GetAudioDriver(i); SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); - SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); + SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); /* Call Init */ result = SDL_AudioInit(audioDriver); @@ -110,15 +131,104 @@ int audio_initQuitAudio() /** * \brief Start, open, close and stop audio * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_InitAudio - * \sa http://wiki.libsdl.org/moin.cgi/SDL_OpenAudio - * \sa http://wiki.libsdl.org/moin.cgi/SDL_CloseAudio - * \sa http://wiki.libsdl.org/moin.cgi/SDL_QuitAudio + * \sa https://wiki.libsdl.org/SDL_InitAudio + * \sa https://wiki.libsdl.org/SDL_OpenAudio + * \sa https://wiki.libsdl.org/SDL_CloseAudio + * \sa https://wiki.libsdl.org/SDL_QuitAudio */ int audio_initOpenCloseQuitAudio() +{ + int result, expectedResult; + int i, iMax, j, k; + const char* audioDriver; + SDL_AudioSpec desired; + + /* Stop SDL audio subsystem */ + SDL_QuitSubSystem( SDL_INIT_AUDIO ); + SDLTest_AssertPass("Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)"); + + /* Loop over all available audio drivers */ + iMax = SDL_GetNumAudioDrivers(); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); + SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); + for (i = 0; i < iMax; i++) { + audioDriver = SDL_GetAudioDriver(i); + SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); + SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); + SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); + + /* Change specs */ + for (j = 0; j < 2; j++) { + + /* Call Init */ + result = SDL_AudioInit(audioDriver); + SDLTest_AssertPass("Call to SDL_AudioInit('%s')", audioDriver); + SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0 got: %d", result); + + /* Set spec */ + SDL_memset(&desired, 0, sizeof(desired)); + switch (j) { + case 0: + /* Set standard desired spec */ + desired.freq = 22050; + desired.format = AUDIO_S16SYS; + desired.channels = 2; + desired.samples = 4096; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + + case 1: + /* Set custom desired spec */ + desired.freq = 48000; + desired.format = AUDIO_F32SYS; + desired.channels = 2; + desired.samples = 2048; + desired.callback = _audio_testCallback; + desired.userdata = NULL; + break; + } + + /* Call Open (maybe multiple times) */ + for (k=0; k <= j; k++) { + result = SDL_OpenAudio(&desired, NULL); + SDLTest_AssertPass("Call to SDL_OpenAudio(desired_spec_%d, NULL), call %d", j, k+1); + expectedResult = (k==0) ? 0 : -1; + SDLTest_AssertCheck(result == expectedResult, "Verify return value; expected: %d, got: %d", expectedResult, result); + } + + /* Call Close (maybe multiple times) */ + for (k=0; k <= j; k++) { + SDL_CloseAudio(); + SDLTest_AssertPass("Call to SDL_CloseAudio(), call %d", k+1); + } + + /* Call Quit (maybe multiple times) */ + for (k=0; k <= j; k++) { + SDL_AudioQuit(); + SDLTest_AssertPass("Call to SDL_AudioQuit(), call %d", k+1); + } + + } /* spec loop */ + } /* driver loop */ + + /* Restart audio again */ + _audioSetUp(NULL); + + return TEST_COMPLETED; +} + +/** + * \brief Pause and unpause audio + * + * \sa https://wiki.libsdl.org/SDL_PauseAudio + */ +int audio_pauseUnpauseAudio() { int result; - int i, iMax, j; + int i, iMax, j, k, l; + int totalDelay; + int pause_on; + int originalCounter; const char* audioDriver; SDL_AudioSpec desired; @@ -128,13 +238,13 @@ int audio_initOpenCloseQuitAudio() /* Loop over all available audio drivers */ iMax = SDL_GetNumAudioDrivers(); - SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers"); + SDLTest_AssertPass("Call to SDL_GetNumAudioDrivers()"); SDLTest_AssertCheck(iMax > 0, "Validate number of audio drivers; expected: >0 got: %d", iMax); for (i = 0; i < iMax; i++) { audioDriver = SDL_GetAudioDriver(i); SDLTest_AssertPass("Call to SDL_GetAudioDriver(%d)", i); SDLTest_AssertCheck(audioDriver != NULL, "Audio driver name is not NULL"); - SDLTest_AssertCheck(SDL_strlen(audioDriver) > 0, "Audio driver name is not empty; got: %s", audioDriver); + SDLTest_AssertCheck(audioDriver[0] != '\0', "Audio driver name is not empty; got: %s", audioDriver); /* Change specs */ for (j = 0; j < 2; j++) { @@ -172,9 +282,47 @@ int audio_initOpenCloseQuitAudio() SDLTest_AssertPass("Call to SDL_OpenAudio(desired_spec_%d, NULL)", j); SDLTest_AssertCheck(result == 0, "Verify return value; expected: 0 got: %d", result); + /* Start and stop audio multiple times */ + for (l=0; l<3; l++) { + SDLTest_Log("Pause/Unpause iteration: %d", l+1); + + /* Reset callback counters */ + _audio_testCallbackCounter = 0; + _audio_testCallbackLength = 0; + + /* Un-pause audio to start playing (maybe multiple times) */ + pause_on = 0; + for (k=0; k <= j; k++) { + SDL_PauseAudio(pause_on); + SDLTest_AssertPass("Call to SDL_PauseAudio(%d), call %d", pause_on, k+1); + } + + /* Wait for callback */ + totalDelay = 0; + do { + SDL_Delay(10); + totalDelay += 10; + } + while (_audio_testCallbackCounter == 0 && totalDelay < 1000); + SDLTest_AssertCheck(_audio_testCallbackCounter > 0, "Verify callback counter; expected: >0 got: %d", _audio_testCallbackCounter); + SDLTest_AssertCheck(_audio_testCallbackLength > 0, "Verify callback length; expected: >0 got: %d", _audio_testCallbackLength); + + /* Pause audio to stop playing (maybe multiple times) */ + for (k=0; k <= j; k++) { + pause_on = (k==0) ? 1 : SDLTest_RandomIntegerInRange(99, 9999); + SDL_PauseAudio(pause_on); + SDLTest_AssertPass("Call to SDL_PauseAudio(%d), call %d", pause_on, k+1); + } + + /* Ensure callback is not called again */ + originalCounter = _audio_testCallbackCounter; + SDL_Delay(totalDelay + 10); + SDLTest_AssertCheck(originalCounter == _audio_testCallbackCounter, "Verify callback counter; expected: %d, got: %d", originalCounter, _audio_testCallbackCounter); + } + /* Call Close */ - SDL_CloseAudio(); - SDLTest_AssertPass("Call to SDL_CloseAudio()"); + SDL_CloseAudio(); + SDLTest_AssertPass("Call to SDL_CloseAudio()"); /* Call Quit */ SDL_AudioQuit(); @@ -183,8 +331,8 @@ int audio_initOpenCloseQuitAudio() } /* spec loop */ } /* driver loop */ - /* Restart audio again */ - _audioSetUp(NULL); + /* Restart audio again */ + _audioSetUp(NULL); return TEST_COMPLETED; } @@ -192,8 +340,8 @@ int audio_initOpenCloseQuitAudio() /** * \brief Enumerate and name available audio devices (output and capture). * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName + * \sa https://wiki.libsdl.org/SDL_GetNumAudioDevices + * \sa https://wiki.libsdl.org/SDL_GetAudioDeviceName */ int audio_enumerateAndNameAudioDevices() { @@ -226,14 +374,14 @@ int audio_enumerateAndNameAudioDevices() SDLTest_AssertPass("Call to SDL_GetAudioDeviceName(%i, %i)", i, t); SDLTest_AssertCheck(name != NULL, "Verify result from SDL_GetAudioDeviceName(%i, %i) is not NULL", i, t); if (name != NULL) { - SDLTest_AssertCheck(SDL_strlen(name)>0, "verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'", i, t, name); + SDLTest_AssertCheck(name[0] != '\0', "verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'", i, t, name); if (t==1) { /* Also try non-zero type */ tt = t + SDLTest_RandomIntegerInRange(1,10); nameAgain = SDL_GetAudioDeviceName(i, tt); SDLTest_AssertCheck(nameAgain != NULL, "Verify result from SDL_GetAudioDeviceName(%i, %i) is not NULL", i, tt); if (nameAgain != NULL) { - SDLTest_AssertCheck(SDL_strlen(nameAgain)>0, "Verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'", i, tt, nameAgain); + SDLTest_AssertCheck(nameAgain[0] != '\0', "Verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'", i, tt, nameAgain); SDLTest_AssertCheck(SDL_strcmp(name, nameAgain)==0, "Verify SDL_GetAudioDeviceName(%i, %i) and SDL_GetAudioDeviceName(%i %i) return the same string", i, t, i, tt); @@ -250,8 +398,8 @@ int audio_enumerateAndNameAudioDevices() /** * \brief Negative tests around enumeration and naming of audio devices. * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDevices - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDeviceName + * \sa https://wiki.libsdl.org/SDL_GetNumAudioDevices + * \sa https://wiki.libsdl.org/SDL_GetAudioDeviceName */ int audio_enumerateAndNameAudioDevicesNegativeTests() { @@ -297,8 +445,8 @@ int audio_enumerateAndNameAudioDevicesNegativeTests() /** * \brief Checks available audio driver names. * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetNumAudioDrivers - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioDriver + * \sa https://wiki.libsdl.org/SDL_GetNumAudioDrivers + * \sa https://wiki.libsdl.org/SDL_GetAudioDriver */ int audio_printAudioDrivers() { @@ -318,7 +466,7 @@ int audio_printAudioDrivers() SDLTest_AssertPass("Call to SDL_GetAudioDriver(%i)", i); SDLTest_AssertCheck(name != NULL, "Verify returned name is not NULL"); if (name != NULL) { - SDLTest_AssertCheck(SDL_strlen(name)>0, "Verify returned name is not empty, got: '%s'", name); + SDLTest_AssertCheck(name[0] != '\0', "Verify returned name is not empty, got: '%s'", name); } } } @@ -330,7 +478,7 @@ int audio_printAudioDrivers() /** * \brief Checks current audio driver name with initialized audio. * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetCurrentAudioDriver + * \sa https://wiki.libsdl.org/SDL_GetCurrentAudioDriver */ int audio_printCurrentAudioDriver() { @@ -339,7 +487,7 @@ int audio_printCurrentAudioDriver() SDLTest_AssertPass("Call to SDL_GetCurrentAudioDriver()"); SDLTest_AssertCheck(name != NULL, "Verify returned name is not NULL"); if (name != NULL) { - SDLTest_AssertCheck(SDL_strlen(name)>0, "Verify returned name is not empty, got: '%s'", name); + SDLTest_AssertCheck(name[0] != '\0', "Verify returned name is not empty, got: '%s'", name); } return TEST_COMPLETED; @@ -362,7 +510,7 @@ int _audioFrequencies[] = { 11025, 22050, 44100, 48000 }; /** * \brief Builds various audio conversion structures * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_BuildAudioCVT + * \sa https://wiki.libsdl.org/SDL_BuildAudioCVT */ int audio_buildAudioCVT() { @@ -412,7 +560,7 @@ int audio_buildAudioCVT() i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); SDLTest_AssertCheck(result == 0 || result == 1, "Verify result value; expected: 0 or 1, got: %i", result); if (result<0) { - SDLTest_LogError(SDL_GetError()); + SDLTest_LogError("%s", SDL_GetError()); } else { SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult); } @@ -426,7 +574,7 @@ int audio_buildAudioCVT() /** * \brief Checkes calls with invalid input to SDL_BuildAudioCVT * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_BuildAudioCVT + * \sa https://wiki.libsdl.org/SDL_BuildAudioCVT */ int audio_buildAudioCVTNegative() { @@ -502,14 +650,14 @@ int audio_buildAudioCVTNegative() SDL_strlcat(message, " spec2.freq", 256); spec2.freq = 0; } - SDLTest_Log(message); + SDLTest_Log("%s", message); result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq, spec2.format, spec2.channels, spec2.freq); SDLTest_AssertPass("Call to SDL_BuildAudioCVT(spec1 ==> spec2)"); SDLTest_AssertCheck(result == -1, "Verify result value; expected: -1, got: %i", result); error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL && SDL_strlen(error)>0, "Validate that error message was not NULL or empty"); + SDLTest_AssertCheck(error != NULL && error[0] != '\0', "Validate that error message was not NULL or empty"); } SDL_ClearError(); @@ -521,7 +669,7 @@ int audio_buildAudioCVTNegative() /** * \brief Checks current audio status. * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioStatus + * \sa https://wiki.libsdl.org/SDL_GetAudioStatus */ int audio_getAudioStatus() { @@ -542,7 +690,7 @@ int audio_getAudioStatus() /** * \brief Opens, checks current audio status, and closes a device. * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_GetAudioStatus + * \sa https://wiki.libsdl.org/SDL_GetAudioStatus */ int audio_openCloseAndGetAudioStatus() { @@ -600,8 +748,8 @@ int audio_openCloseAndGetAudioStatus() /** * \brief Locks and unlocks open audio device. * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_LockAudioDevice - * \sa http://wiki.libsdl.org/moin.cgi/SDL_UnlockAudioDevice + * \sa https://wiki.libsdl.org/SDL_LockAudioDevice + * \sa https://wiki.libsdl.org/SDL_UnlockAudioDevice */ int audio_lockUnlockOpenAudioDevice() { @@ -643,7 +791,7 @@ int audio_lockUnlockOpenAudioDevice() SDL_Delay(10); SDLTest_Log("Simulate callback processing - delay"); - /* Unlock again*/ + /* Unlock again */ SDL_UnlockAudioDevice(id); SDLTest_AssertPass("SDL_UnlockAudioDevice(%i)", id); @@ -663,8 +811,8 @@ int audio_lockUnlockOpenAudioDevice() /** * \brief Convert audio using various conversion structures * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_BuildAudioCVT - * \sa http://wiki.libsdl.org/moin.cgi/SDL_ConvertAudio + * \sa https://wiki.libsdl.org/SDL_BuildAudioCVT + * \sa https://wiki.libsdl.org/SDL_ConvertAudio */ int audio_convertAudio() { @@ -688,7 +836,7 @@ int audio_convertAudio() if (c & 4) { SDL_strlcat(message, " Frequencies", 128); } - SDLTest_Log(message); + SDLTest_Log("%s", message); /* All source conversions with random conversion targets */ for (i = 0; i < _numAudioFormats; i++) { for (j = 0; j < _numAudioChannels; j++) { @@ -725,7 +873,7 @@ int audio_convertAudio() i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq); SDLTest_AssertCheck(result == 1, "Verify result value; expected: 1, got: %i", result); if (result != 1) { - SDLTest_LogError(SDL_GetError()); + SDLTest_LogError("%s", SDL_GetError()); } else { SDLTest_AssertCheck(cvt.len_mult > 0, "Verify that cvt.len_mult value; expected: >0, got: %i", cvt.len_mult); if (cvt.len_mult < 1) return TEST_ABORTED; @@ -747,11 +895,9 @@ int audio_convertAudio() SDLTest_AssertCheck(cvt.len_ratio > 0.0, "Verify conversion length ratio; expected: >0; got: %f", cvt.len_ratio); /* Free converted buffer */ - if (cvt.buf != NULL) { SDL_free(cvt.buf); cvt.buf = NULL; - } - } + } } } } @@ -764,7 +910,7 @@ int audio_convertAudio() /** * \brief Opens, checks current connected status, and closes a device. * - * \sa http://wiki.libsdl.org/moin.cgi/SDL_AudioDeviceConnected + * \sa https://wiki.libsdl.org/SDL_AudioDeviceConnected */ int audio_openCloseAudioDeviceConnected() { @@ -867,23 +1013,20 @@ static const SDLTest_TestCaseReference audioTest11 = static const SDLTest_TestCaseReference audioTest12 = { (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, "audio_quitInitAudioSubSystem", "Quit and re-init audio subsystem.", TEST_ENABLED }; -/* TODO: enable when bugs 1343 and 1396 are fixed. */ -/* For debugging, test case can be run manually using --filter audio_initQuitAudio */ - static const SDLTest_TestCaseReference audioTest13 = - { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_DISABLED }; - -/* TODO: enable when bugs 1343 and 1396 are fixed. */ -/* For debugging, test case can be run manually using --filter audio_initOpenCloseQuitAudio */ + { (SDLTest_TestCaseFp)audio_initQuitAudio, "audio_initQuitAudio", "Init and quit audio drivers directly.", TEST_ENABLED }; static const SDLTest_TestCaseReference audioTest14 = - { (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, "audio_initOpenCloseQuitAudio", "Cycle through init, open, close and quit with various audio specs.", TEST_DISABLED }; + { (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, "audio_initOpenCloseQuitAudio", "Cycle through init, open, close and quit with various audio specs.", TEST_ENABLED }; + +static const SDLTest_TestCaseReference audioTest15 = + { (SDLTest_TestCaseFp)audio_pauseUnpauseAudio, "audio_pauseUnpauseAudio", "Pause and Unpause audio for various audio specs while testing callback.", TEST_ENABLED }; /* Sequence of Audio test cases */ static const SDLTest_TestCaseReference *audioTests[] = { &audioTest1, &audioTest2, &audioTest3, &audioTest4, &audioTest5, &audioTest6, &audioTest7, &audioTest8, &audioTest9, &audioTest10, &audioTest11, - &audioTest12, &audioTest13, &audioTest14, NULL + &audioTest12, &audioTest13, &audioTest14, &audioTest15, NULL }; /* Audio test suite (global) */ @@ -891,5 +1034,5 @@ SDLTest_TestSuiteReference audioTestSuite = { "Audio", _audioSetUp, audioTests, - NULL + _audioTearDown }; diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_clipboard.c b/3rdparty/sdl2-2.0.4/test/testautomation_clipboard.c similarity index 95% rename from 3rdparty/sdl2-2.0.0/test/testautomation_clipboard.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_clipboard.c index 92aec7d03c..f943ffee79 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_clipboard.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_clipboard.c @@ -41,7 +41,7 @@ clipboard_testGetClipboardText(void *arg) charResult = SDL_GetClipboardText(); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); - if (charResult) SDL_free(charResult); + SDL_free(charResult); return TEST_COMPLETED; } @@ -69,8 +69,8 @@ clipboard_testSetClipboardText(void *arg) textRef, text); /* Cleanup */ - if (textRef) SDL_free(textRef); - if (text) SDL_free(text); + SDL_free(textRef); + SDL_free(text); return TEST_COMPLETED; } @@ -103,6 +103,7 @@ clipboard_testClipboardTextFunctions(void *arg) intResult); charResult = SDL_GetClipboardText(); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); + SDL_free(charResult); boolResult = SDL_HasClipboardText(); SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); SDLTest_AssertCheck( @@ -118,7 +119,7 @@ clipboard_testClipboardTextFunctions(void *arg) charResult != NULL, "Verify SDL_GetClipboardText did not return NULL"); SDLTest_AssertCheck( - SDL_strlen(charResult) == 0, + charResult[0] == '\0', "Verify SDL_GetClipboardText returned string with length 0, got length %i", SDL_strlen(charResult)); intResult = SDL_SetClipboardText((const char *)text); @@ -137,6 +138,7 @@ clipboard_testClipboardTextFunctions(void *arg) boolResult == SDL_TRUE, "Verify SDL_HasClipboardText returned SDL_TRUE, got %s", (boolResult) ? "SDL_TRUE" : "SDL_FALSE"); + SDL_free(charResult); charResult = SDL_GetClipboardText(); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); SDLTest_AssertCheck( @@ -145,9 +147,9 @@ clipboard_testClipboardTextFunctions(void *arg) textRef, charResult); /* Cleanup */ - if (textRef) SDL_free(textRef); - if (text) SDL_free(text); - if (charResult) SDL_free(charResult); + SDL_free(textRef); + SDL_free(text); + SDL_free(charResult); return TEST_COMPLETED; } diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_events.c b/3rdparty/sdl2-2.0.4/test/testautomation_events.c similarity index 94% rename from 3rdparty/sdl2-2.0.0/test/testautomation_events.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_events.c index 638607e761..f9eb5bb9e8 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_events.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_events.c @@ -58,7 +58,7 @@ events_pushPumpAndPollUserevent(void *arg) event1.user.data1 = (void *)&_userdataValue1; event1.user.data2 = (void *)&_userdataValue2; - /* Push a user event onto the queue and force queue update*/ + /* Push a user event onto the queue and force queue update */ SDL_PushEvent(&event1); SDLTest_AssertPass("Call to SDL_PushEvent()"); SDL_PumpEvents(); @@ -101,7 +101,7 @@ events_addDelEventWatch(void *arg) SDL_AddEventWatch(_events_sampleNullEventFilter, NULL); SDLTest_AssertPass("Call to SDL_AddEventWatch()"); - /* Push a user event onto the queue and force queue update*/ + /* Push a user event onto the queue and force queue update */ SDL_PushEvent(&event); SDLTest_AssertPass("Call to SDL_PushEvent()"); SDL_PumpEvents(); @@ -112,7 +112,7 @@ events_addDelEventWatch(void *arg) SDL_DelEventWatch(_events_sampleNullEventFilter, NULL); SDLTest_AssertPass("Call to SDL_DelEventWatch()"); - /* Push a user event onto the queue and force queue update*/ + /* Push a user event onto the queue and force queue update */ _eventFilterCalled = 0; SDL_PushEvent(&event); SDLTest_AssertPass("Call to SDL_PushEvent()"); @@ -152,7 +152,7 @@ events_addDelEventWatchWithUserdata(void *arg) SDL_AddEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); SDLTest_AssertPass("Call to SDL_AddEventWatch()"); - /* Push a user event onto the queue and force queue update*/ + /* Push a user event onto the queue and force queue update */ SDL_PushEvent(&event); SDLTest_AssertPass("Call to SDL_PushEvent()"); SDL_PumpEvents(); @@ -163,7 +163,7 @@ events_addDelEventWatchWithUserdata(void *arg) SDL_DelEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue); SDLTest_AssertPass("Call to SDL_DelEventWatch()"); - /* Push a user event onto the queue and force queue update*/ + /* Push a user event onto the queue and force queue update */ _eventFilterCalled = 0; SDL_PushEvent(&event); SDLTest_AssertPass("Call to SDL_PushEvent()"); diff --git a/3rdparty/sdl2-2.0.4/test/testautomation_hints.c b/3rdparty/sdl2-2.0.4/test/testautomation_hints.c new file mode 100644 index 0000000000..a6beb88d76 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testautomation_hints.c @@ -0,0 +1,168 @@ +/** + * Hints test suite + */ + +#include + +#include "SDL.h" +#include "SDL_test.h" + + +const int _numHintsEnum = 25; +char* _HintsEnum[] = + { + SDL_HINT_ACCELEROMETER_AS_JOYSTICK, + SDL_HINT_FRAMEBUFFER_ACCELERATION, + SDL_HINT_GAMECONTROLLERCONFIG, + SDL_HINT_GRAB_KEYBOARD, + SDL_HINT_IDLE_TIMER_DISABLED, + SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, + SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, + SDL_HINT_MOUSE_RELATIVE_MODE_WARP, + SDL_HINT_ORIENTATIONS, + SDL_HINT_RENDER_DIRECT3D_THREADSAFE, + SDL_HINT_RENDER_DRIVER, + SDL_HINT_RENDER_OPENGL_SHADERS, + SDL_HINT_RENDER_SCALE_QUALITY, + SDL_HINT_RENDER_VSYNC, + SDL_HINT_TIMER_RESOLUTION, + SDL_HINT_VIDEO_ALLOW_SCREENSAVER, + SDL_HINT_VIDEO_HIGHDPI_DISABLED, + SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES, + SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, + SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT, + SDL_HINT_VIDEO_WIN_D3DCOMPILER, + SDL_HINT_VIDEO_X11_XINERAMA, + SDL_HINT_VIDEO_X11_XRANDR, + SDL_HINT_VIDEO_X11_XVIDMODE, + SDL_HINT_XINPUT_ENABLED, + }; +char* _HintsVerbose[] = + { + "SDL_HINT_ACCELEROMETER_AS_JOYSTICK", + "SDL_HINT_FRAMEBUFFER_ACCELERATION", + "SDL_HINT_GAMECONTROLLERCONFIG", + "SDL_HINT_GRAB_KEYBOARD", + "SDL_HINT_IDLE_TIMER_DISABLED", + "SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS", + "SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK", + "SDL_HINT_MOUSE_RELATIVE_MODE_WARP", + "SDL_HINT_ORIENTATIONS", + "SDL_HINT_RENDER_DIRECT3D_THREADSAFE", + "SDL_HINT_RENDER_DRIVER", + "SDL_HINT_RENDER_OPENGL_SHADERS", + "SDL_HINT_RENDER_SCALE_QUALITY", + "SDL_HINT_RENDER_VSYNC", + "SDL_HINT_TIMER_RESOLUTION", + "SDL_HINT_VIDEO_ALLOW_SCREENSAVER", + "SDL_HINT_VIDEO_HIGHDPI_DISABLED", + "SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES", + "SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS", + "SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT", + "SDL_HINT_VIDEO_WIN_D3DCOMPILER", + "SDL_HINT_VIDEO_X11_XINERAMA", + "SDL_HINT_VIDEO_X11_XRANDR", + "SDL_HINT_VIDEO_X11_XVIDMODE", + "SDL_HINT_XINPUT_ENABLED" + }; + + +/* Test case functions */ + +/** + * @brief Call to SDL_GetHint + */ +int +hints_getHint(void *arg) +{ + char *result1; + char *result2; + int i; + + for (i=0; i<_numHintsEnum; i++) { + result1 = (char *)SDL_GetHint((char*)_HintsEnum[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s) - using define definition", (char*)_HintsEnum[i]); + result2 = (char *)SDL_GetHint((char *)_HintsVerbose[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s) - using string definition", (char*)_HintsVerbose[i]); + SDLTest_AssertCheck( + (result1 == NULL && result2 == NULL) || (SDL_strcmp(result1, result2) == 0), + "Verify returned values are equal; got: result1='%s' result2='%s", + (result1 == NULL) ? "null" : result1, + (result2 == NULL) ? "null" : result2); + } + + return TEST_COMPLETED; +} + +/** + * @brief Call to SDL_SetHint + */ +int +hints_setHint(void *arg) +{ + char *originalValue; + char *value; + char *testValue; + SDL_bool result; + int i, j; + + /* Create random values to set */ + value = SDLTest_RandomAsciiStringOfSize(10); + + for (i=0; i<_numHintsEnum; i++) { + /* Capture current value */ + originalValue = (char *)SDL_GetHint((char*)_HintsEnum[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s)", (char*)_HintsEnum[i]); + + /* Set value (twice) */ + for (j=1; j<=2; j++) { + result = SDL_SetHint((char*)_HintsEnum[i], value); + SDLTest_AssertPass("Call to SDL_SetHint(%s, %s) (iteration %i)", (char*)_HintsEnum[i], value, j); + SDLTest_AssertCheck( + result == SDL_TRUE || result == SDL_FALSE, + "Verify valid result was returned, got: %i", + (int)result); + testValue = (char *)SDL_GetHint((char*)_HintsEnum[i]); + SDLTest_AssertPass("Call to SDL_GetHint(%s) - using string definition", (char*)_HintsVerbose[i]); + SDLTest_AssertCheck( + (SDL_strcmp(value, testValue) == 0), + "Verify returned value equals set value; got: testValue='%s' value='%s", + (testValue == NULL) ? "null" : testValue, + value); + } + + /* Reset original value */ + result = SDL_SetHint((char*)_HintsEnum[i], originalValue); + SDLTest_AssertPass("Call to SDL_SetHint(%s, originalValue)", (char*)_HintsEnum[i]); + SDLTest_AssertCheck( + result == SDL_TRUE || result == SDL_FALSE, + "Verify valid result was returned, got: %i", + (int)result); + } + + SDL_free(value); + + return TEST_COMPLETED; +} + +/* ================= Test References ================== */ + +/* Hints test cases */ +static const SDLTest_TestCaseReference hintsTest1 = + { (SDLTest_TestCaseFp)hints_getHint, "hints_getHint", "Call to SDL_GetHint", TEST_ENABLED }; + +static const SDLTest_TestCaseReference hintsTest2 = + { (SDLTest_TestCaseFp)hints_setHint, "hints_setHint", "Call to SDL_SetHint", TEST_ENABLED }; + +/* Sequence of Hints test cases */ +static const SDLTest_TestCaseReference *hintsTests[] = { + &hintsTest1, &hintsTest2, NULL +}; + +/* Hints test suite (global) */ +SDLTest_TestSuiteReference hintsTestSuite = { + "Hints", + NULL, + hintsTests, + NULL +}; diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_keyboard.c b/3rdparty/sdl2-2.0.4/test/testautomation_keyboard.c similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/testautomation_keyboard.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_keyboard.c diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_main.c b/3rdparty/sdl2-2.0.4/test/testautomation_main.c similarity index 91% rename from 3rdparty/sdl2-2.0.0/test/testautomation_main.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_main.c index f695903c27..ef8f19e9e7 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_main.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_main.c @@ -1,7 +1,7 @@ /** * Automated SDL subsystems management test. * - * Written by Jrgen Tjern "jorgenpt" + * Written by J�rgen Tjern� "jorgenpt" * * Released under Public Domain. */ @@ -10,7 +10,7 @@ #include "SDL_test.h" -/*! +/* ! * \brief Tests SDL_Init() and SDL_Quit() of Joystick and Haptic subsystems * \sa * http://wiki.libsdl.org/moin.cgi/SDL_Init @@ -38,7 +38,7 @@ static int main_testInitQuitJoystickHaptic (void *arg) #endif } -/*! +/* ! * \brief Tests SDL_InitSubSystem() and SDL_QuitSubSystem() * \sa * http://wiki.libsdl.org/moin.cgi/SDL_Init @@ -79,16 +79,16 @@ static int main_testImpliedJoystickInit (void *arg) #else int initialized_system; - // First initialize the controller + /* First initialize the controller */ SDLTest_AssertCheck( (SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, "SDL_WasInit() before init should be false for joystick & controller" ); SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, "SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)" ); - // Then make sure this implicitly initialized the joystick subsystem + /* Then make sure this implicitly initialized the joystick subsystem */ initialized_system = SDL_WasInit(joy_and_controller); SDLTest_AssertCheck( (initialized_system & joy_and_controller) == joy_and_controller, "SDL_WasInit() should be true for joystick & controller (%x)", initialized_system ); - // Then quit the controller, and make sure that implicitly also quits the - // joystick subsystem + /* Then quit the controller, and make sure that implicitly also quits the */ + /* joystick subsystem */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); initialized_system = SDL_WasInit(joy_and_controller); SDLTest_AssertCheck( (initialized_system & joy_and_controller) == 0, "SDL_WasInit() should be false for joystick & controller (%x)", initialized_system ); @@ -104,17 +104,17 @@ static int main_testImpliedJoystickQuit (void *arg) #else int initialized_system; - // First initialize the controller and the joystick (explicitly) + /* First initialize the controller and the joystick (explicitly) */ SDLTest_AssertCheck( (SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, "SDL_WasInit() before init should be false for joystick & controller" ); SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_JOYSTICK) == 0, "SDL_InitSubSystem(SDL_INIT_JOYSTICK)" ); SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, "SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)" ); - // Then make sure they're both initialized properly + /* Then make sure they're both initialized properly */ initialized_system = SDL_WasInit(joy_and_controller); SDLTest_AssertCheck( (initialized_system & joy_and_controller) == joy_and_controller, "SDL_WasInit() should be true for joystick & controller (%x)", initialized_system ); - // Then quit the controller, and make sure that it does NOT quit the - // explicitly initialized joystick subsystem. + /* Then quit the controller, and make sure that it does NOT quit the */ + /* explicitly initialized joystick subsystem. */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); initialized_system = SDL_WasInit(joy_and_controller); SDLTest_AssertCheck( (initialized_system & joy_and_controller) == SDL_INIT_JOYSTICK, "SDL_WasInit() should be false for joystick & controller (%x)", initialized_system ); diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_mouse.c b/3rdparty/sdl2-2.0.4/test/testautomation_mouse.c similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/testautomation_mouse.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_mouse.c diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_pixels.c b/3rdparty/sdl2-2.0.4/test/testautomation_pixels.c similarity index 96% rename from 3rdparty/sdl2-2.0.0/test/testautomation_pixels.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_pixels.c index 48f9838c86..7b88caaa9d 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_pixels.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_pixels.c @@ -79,14 +79,16 @@ char* _RGBPixelFormatsVerbose[] = }; /* Definition of all Non-RGB formats used to test pixel conversions */ -const int _numNonRGBPixelFormats = 5; +const int _numNonRGBPixelFormats = 7; Uint32 _nonRGBPixelFormats[] = { SDL_PIXELFORMAT_YV12, SDL_PIXELFORMAT_IYUV, SDL_PIXELFORMAT_YUY2, SDL_PIXELFORMAT_UYVY, - SDL_PIXELFORMAT_YVYU + SDL_PIXELFORMAT_YVYU, + SDL_PIXELFORMAT_NV12, + SDL_PIXELFORMAT_NV21 }; char* _nonRGBPixelFormatsVerbose[] = { @@ -94,7 +96,9 @@ char* _nonRGBPixelFormatsVerbose[] = "SDL_PIXELFORMAT_IYUV", "SDL_PIXELFORMAT_YUY2", "SDL_PIXELFORMAT_UYVY", - "SDL_PIXELFORMAT_YVYU" + "SDL_PIXELFORMAT_YVYU", + "SDL_PIXELFORMAT_NV12", + "SDL_PIXELFORMAT_NV21" }; /* Definition of some invalid formats for negative tests */ @@ -242,7 +246,7 @@ pixels_getPixelFormatName(void *arg) SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); + SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0, "Verify result text; expected: %s, got %s", unknownFormat, result); } @@ -257,7 +261,7 @@ pixels_getPixelFormatName(void *arg) SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); + SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0, "Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result); } @@ -273,7 +277,7 @@ pixels_getPixelFormatName(void *arg) SDLTest_AssertPass("Call to SDL_GetPixelFormatName()"); SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty"); + SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty"); SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0, "Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result); } @@ -290,14 +294,14 @@ pixels_getPixelFormatName(void *arg) SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%u)", format); SDLTest_AssertCheck(result != NULL, "Verify result is not NULL"); if (result != NULL) { - SDLTest_AssertCheck(SDL_strlen(result) > 0, + SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty; got: %s", result); SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0, "Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result); } error = SDL_GetError(); SDLTest_AssertPass("Call to SDL_GetError()"); - SDLTest_AssertCheck(error != NULL && SDL_strlen(error) == 0, "Validate that error message is empty"); + SDLTest_AssertCheck(error == NULL || error[0] == '\0', "Validate that error message is empty"); } return TEST_COMPLETED; @@ -411,7 +415,7 @@ pixels_calcGammaRamp(void *arg) int changed; Uint16 magic = 0xbeef; - /* Allocate temp ramp array and fill with some value*/ + /* Allocate temp ramp array and fill with some value */ ramp = (Uint16 *)SDL_malloc(256 * sizeof(Uint16)); SDLTest_AssertCheck(ramp != NULL, "Validate temp ramp array could be allocated"); if (ramp == NULL) return TEST_ABORTED; diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_platform.c b/3rdparty/sdl2-2.0.4/test/testautomation_platform.c similarity index 88% rename from 3rdparty/sdl2-2.0.0/test/testautomation_platform.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_platform.c index 5ed2abad11..5211a4a70c 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_platform.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_platform.c @@ -34,16 +34,16 @@ int platform_testTypes(void *arg) int ret; ret = _compareSizeOfType( sizeof(Uint8), 1 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected 1", sizeof(Uint8) ); + SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected 1", (unsigned long)sizeof(Uint8) ); ret = _compareSizeOfType( sizeof(Uint16), 2 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", sizeof(Uint16) ); + SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", (unsigned long)sizeof(Uint16) ); ret = _compareSizeOfType( sizeof(Uint32), 4 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", sizeof(Uint32) ); + SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", (unsigned long)sizeof(Uint32) ); ret = _compareSizeOfType( sizeof(Uint64), 8 ); - SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", sizeof(Uint64) ); + SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", (unsigned long)sizeof(Uint64) ); return TEST_COMPLETED; } @@ -92,17 +92,13 @@ int platform_testEndianessAndSwap(void *arg) /* Test 64 swap. */ SDLTest_AssertCheck( SDL_Swap64(value64) == swapped64, -#ifdef _MSC_VER - "SDL_Swap64(): 64 bit swapped: 0x%I64X => 0x%I64X", -#else - "SDL_Swap64(): 64 bit swapped: 0x%llX => 0x%llX", -#endif + "SDL_Swap64(): 64 bit swapped: 0x%"SDL_PRIX64" => 0x%"SDL_PRIX64, value64, SDL_Swap64(value64) ); return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_GetXYZ() functions * \sa * http://wiki.libsdl.org/moin.cgi/SDL_GetPlatform @@ -151,7 +147,7 @@ int platform_testGetFunctions (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_HasXYZ() functions * \sa * http://wiki.libsdl.org/moin.cgi/SDL_Has3DNow @@ -163,12 +159,13 @@ int platform_testGetFunctions (void *arg) * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE3 * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE41 * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE42 + * http://wiki.libsdl.org/moin.cgi/SDL_HasAVX */ int platform_testHasFunctions (void *arg) { int ret; - // TODO: independently determine and compare values as well + /* TODO: independently determine and compare values as well */ ret = SDL_HasRDTSC(); SDLTest_AssertPass("SDL_HasRDTSC()"); @@ -197,10 +194,13 @@ int platform_testHasFunctions (void *arg) ret = SDL_HasSSE42(); SDLTest_AssertPass("SDL_HasSSE42()"); + ret = SDL_HasAVX(); + SDLTest_AssertPass("SDL_HasAVX()"); + return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_GetVersion * \sa * http://wiki.libsdl.org/moin.cgi/SDL_GetVersion @@ -225,7 +225,7 @@ int platform_testGetVersion(void *arg) } -/*! +/* ! * \brief Tests SDL_VERSION macro */ int platform_testSDLVersion(void *arg) @@ -248,7 +248,7 @@ int platform_testSDLVersion(void *arg) } -/*! +/* ! * \brief Tests default SDL_Init */ int platform_testDefaultInit(void *arg) @@ -270,7 +270,7 @@ int platform_testDefaultInit(void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_Get/Set/ClearError * \sa * http://wiki.libsdl.org/moin.cgi/SDL_GetError @@ -279,6 +279,7 @@ int platform_testDefaultInit(void *arg) */ int platform_testGetSetClearError(void *arg) { + int result; const char *testError = "Testing"; char *lastError; int len; @@ -297,8 +298,9 @@ int platform_testGetSetClearError(void *arg) "SDL_GetError(): no message expected, len: %i", len); } - SDL_SetError("%s", testError); + result = SDL_SetError("%s", testError); SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); lastError = (char *)SDL_GetError(); SDLTest_AssertCheck(lastError != NULL, "SDL_GetError() != NULL"); @@ -315,26 +317,28 @@ int platform_testGetSetClearError(void *arg) lastError); } - // Clean up + /* Clean up */ SDL_ClearError(); SDLTest_AssertPass("SDL_ClearError()"); return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_SetError with empty input * \sa * http://wiki.libsdl.org/moin.cgi/SDL_SetError */ int platform_testSetErrorEmptyInput(void *arg) { + int result; const char *testError = ""; char *lastError; int len; - SDL_SetError("%s", testError); + result = SDL_SetError("%s", testError); SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); lastError = (char *)SDL_GetError(); SDLTest_AssertCheck(lastError != NULL, "SDL_GetError() != NULL"); @@ -351,32 +355,34 @@ int platform_testSetErrorEmptyInput(void *arg) lastError); } - // Clean up + /* Clean up */ SDL_ClearError(); SDLTest_AssertPass("SDL_ClearError()"); return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_SetError with invalid input * \sa * http://wiki.libsdl.org/moin.cgi/SDL_SetError */ int platform_testSetErrorInvalidInput(void *arg) { - const char *testError = NULL; + int result; + const char *invalidError = NULL; const char *probeError = "Testing"; char *lastError; int len; - // Reset + /* Reset */ SDL_ClearError(); SDLTest_AssertPass("SDL_ClearError()"); - // Check for no-op - SDL_SetError(testError); + /* Check for no-op */ + result = SDL_SetError(invalidError); SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); lastError = (char *)SDL_GetError(); SDLTest_AssertCheck(lastError != NULL, "SDL_GetError() != NULL"); @@ -385,20 +391,37 @@ int platform_testSetErrorInvalidInput(void *arg) len = SDL_strlen(lastError); SDLTest_AssertCheck(len == 0, "SDL_GetError(): expected message len 0, was len: %i", - 0, len); - SDLTest_AssertCheck(SDL_strcmp(lastError, "") == 0, - "SDL_GetError(): expected message '', was message: '%s'", - lastError); } - // Set - SDL_SetError(probeError); - SDLTest_AssertPass("SDL_SetError()"); + /* Set */ + result = SDL_SetError(probeError); + SDLTest_AssertPass("SDL_SetError('%s')", probeError); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + + /* Check for no-op */ + result = SDL_SetError(invalidError); + SDLTest_AssertPass("SDL_SetError(NULL)"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); + lastError = (char *)SDL_GetError(); + SDLTest_AssertCheck(lastError != NULL, + "SDL_GetError() != NULL"); + if (lastError != NULL) + { + len = SDL_strlen(lastError); + SDLTest_AssertCheck(len == 0, + "SDL_GetError(): expected message len 0, was len: %i", + len); + } - // Check for no-op - SDL_SetError(testError); + /* Reset */ + SDL_ClearError(); + SDLTest_AssertPass("SDL_ClearError()"); + + /* Set and check */ + result = SDL_SetError(probeError); SDLTest_AssertPass("SDL_SetError()"); + SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result); lastError = (char *)SDL_GetError(); SDLTest_AssertCheck(lastError != NULL, "SDL_GetError() != NULL"); @@ -414,15 +437,15 @@ int platform_testSetErrorInvalidInput(void *arg) probeError, lastError); } - - // Clean up + + /* Clean up */ SDL_ClearError(); SDLTest_AssertPass("SDL_ClearError()"); return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_GetPowerInfo * \sa * http://wiki.libsdl.org/moin.cgi/SDL_GetPowerInfo @@ -472,7 +495,7 @@ int platform_testGetPowerInfo(void *arg) pct); } - // Partial return value variations + /* Partial return value variations */ stateAgain = SDL_GetPowerInfo(&secsAgain, NULL); SDLTest_AssertCheck( state==stateAgain, diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_rect.c b/3rdparty/sdl2-2.0.4/test/testautomation_rect.c similarity index 97% rename from 3rdparty/sdl2-2.0.0/test/testautomation_rect.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_rect.c index 77a7347e6a..abf19f593d 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_rect.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_rect.c @@ -12,7 +12,7 @@ /* Helper functions */ -/*! +/* ! * \brief Private helper to check SDL_IntersectRectAndLine results */ void _validateIntersectRectAndLineResults( @@ -39,7 +39,7 @@ void _validateIntersectRectAndLineResults( /* Test case functions */ -/*! +/* ! * \brief Tests SDL_IntersectRectAndLine() clipping cases * * \sa @@ -110,7 +110,7 @@ rect_testIntersectRectAndLine (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_IntersectRectAndLine() non-clipping case line inside * * \sa @@ -177,7 +177,7 @@ rect_testIntersectRectAndLineInside (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_IntersectRectAndLine() non-clipping cases outside * * \sa @@ -232,7 +232,7 @@ rect_testIntersectRectAndLineOutside (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_IntersectRectAndLine() with empty rectangle * * \sa @@ -267,7 +267,7 @@ rect_testIntersectRectAndLineEmpty (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Negative tests against SDL_IntersectRectAndLine() with invalid parameters * * \sa @@ -302,7 +302,7 @@ rect_testIntersectRectAndLineParam (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Private helper to check SDL_HasIntersection results */ void _validateHasIntersectionResults( @@ -325,7 +325,7 @@ void _validateHasIntersectionResults( refRectB->x, refRectB->y, refRectB->w, refRectB->h); } -/*! +/* ! * \brief Private helper to check SDL_IntersectRect results */ void _validateIntersectRectResults( @@ -344,7 +344,7 @@ void _validateIntersectRectResults( } } -/*! +/* ! * \brief Private helper to check SDL_UnionRect results */ void _validateUnionRectResults( @@ -367,7 +367,7 @@ void _validateUnionRectResults( expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h); } -/*! +/* ! * \brief Private helper to check SDL_RectEmpty results */ void _validateRectEmptyResults( @@ -385,7 +385,7 @@ void _validateRectEmptyResults( refRect->x, refRect->y, refRect->w, refRect->h); } -/*! +/* ! * \brief Private helper to check SDL_RectEquals results */ void _validateRectEqualsResults( @@ -408,7 +408,7 @@ void _validateRectEqualsResults( refRectB->x, refRectB->y, refRectB->w, refRectB->h); } -/*! +/* ! * \brief Tests SDL_IntersectRect() with B fully inside A * * \sa @@ -423,7 +423,7 @@ int rect_testIntersectRectInside (void *arg) SDL_Rect result; SDL_bool intersection; - // rectB fully contained in rectA + /* rectB fully contained in rectA */ refRectB.x = 0; refRectB.y = 0; refRectB.w = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); @@ -436,7 +436,7 @@ int rect_testIntersectRectInside (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_IntersectRect() with B fully outside A * * \sa @@ -451,7 +451,7 @@ int rect_testIntersectRectOutside (void *arg) SDL_Rect result; SDL_bool intersection; - // rectB fully outside of rectA + /* rectB fully outside of rectA */ refRectB.x = refRectA.x + refRectA.w + SDLTest_RandomIntegerInRange(1, 10); refRectB.y = refRectA.y + refRectA.h + SDLTest_RandomIntegerInRange(1, 10); refRectB.w = refRectA.w; @@ -464,7 +464,7 @@ int rect_testIntersectRectOutside (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_IntersectRect() with B partially intersecting A * * \sa @@ -480,7 +480,7 @@ int rect_testIntersectRectPartial (void *arg) SDL_Rect expectedResult; SDL_bool intersection; - // rectB partially contained in rectA + /* rectB partially contained in rectA */ refRectB.x = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); refRectB.y = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1); refRectB.w = refRectA.w; @@ -494,7 +494,7 @@ int rect_testIntersectRectPartial (void *arg) intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - // rectB right edge + /* rectB right edge */ refRectB.x = rectA.w - 1; refRectB.y = rectA.y; refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1); @@ -508,7 +508,7 @@ int rect_testIntersectRectPartial (void *arg) intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - // rectB left edge + /* rectB left edge */ refRectB.x = 1 - rectA.w; refRectB.y = rectA.y; refRectB.w = refRectA.w; @@ -522,7 +522,7 @@ int rect_testIntersectRectPartial (void *arg) intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - // rectB bottom edge + /* rectB bottom edge */ refRectB.x = rectA.x; refRectB.y = rectA.h - 1; refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1); @@ -536,7 +536,7 @@ int rect_testIntersectRectPartial (void *arg) intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult); - // rectB top edge + /* rectB top edge */ refRectB.x = rectA.x; refRectB.y = 1 - rectA.h; refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1); @@ -553,7 +553,7 @@ int rect_testIntersectRectPartial (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_IntersectRect() with 1x1 pixel sized rectangles * * \sa @@ -569,7 +569,7 @@ int rect_testIntersectRectPoint (void *arg) SDL_bool intersection; int offsetX, offsetY; - // intersecting pixels + /* intersecting pixels */ refRectA.x = SDLTest_RandomIntegerInRange(1, 100); refRectA.y = SDLTest_RandomIntegerInRange(1, 100); refRectB.x = refRectA.x; @@ -579,7 +579,7 @@ int rect_testIntersectRectPoint (void *arg) intersection = SDL_IntersectRect(&rectA, &rectB, &result); _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectA); - // non-intersecting pixels cases + /* non-intersecting pixels cases */ for (offsetX = -1; offsetX <= 1; offsetX++) { for (offsetY = -1; offsetY <= 1; offsetY++) { if (offsetX != 0 || offsetY != 0) { @@ -600,7 +600,7 @@ int rect_testIntersectRectPoint (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_IntersectRect() with empty rectangles * * \sa @@ -616,7 +616,7 @@ int rect_testIntersectRectEmpty (void *arg) SDL_bool intersection; SDL_bool empty; - // Rect A empty + /* Rect A empty */ result.w = SDLTest_RandomIntegerInRange(1, 100); result.h = SDLTest_RandomIntegerInRange(1, 100); refRectA.x = SDLTest_RandomIntegerInRange(1, 100); @@ -633,7 +633,7 @@ int rect_testIntersectRectEmpty (void *arg) empty = (SDL_bool)SDL_RectEmpty(&result); SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); - // Rect B empty + /* Rect B empty */ result.w = SDLTest_RandomIntegerInRange(1, 100); result.h = SDLTest_RandomIntegerInRange(1, 100); refRectA.x = SDLTest_RandomIntegerInRange(1, 100); @@ -650,7 +650,7 @@ int rect_testIntersectRectEmpty (void *arg) empty = (SDL_bool)SDL_RectEmpty(&result); SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE"); - // Rect A and B empty + /* Rect A and B empty */ result.w = SDLTest_RandomIntegerInRange(1, 100); result.h = SDLTest_RandomIntegerInRange(1, 100); refRectA.x = SDLTest_RandomIntegerInRange(1, 100); @@ -672,7 +672,7 @@ int rect_testIntersectRectEmpty (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Negative tests against SDL_IntersectRect() with invalid parameters * * \sa @@ -685,7 +685,7 @@ int rect_testIntersectRectParam(void *arg) SDL_Rect result; SDL_bool intersection; - // invalid parameter combinations + /* invalid parameter combinations */ intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, &result); SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); intersection = SDL_IntersectRect(&rectA, (SDL_Rect *)NULL, &result); @@ -702,7 +702,7 @@ int rect_testIntersectRectParam(void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_HasIntersection() with B fully inside A * * \sa @@ -716,7 +716,7 @@ int rect_testHasIntersectionInside (void *arg) SDL_Rect rectB; SDL_bool intersection; - // rectB fully contained in rectA + /* rectB fully contained in rectA */ refRectB.x = 0; refRectB.y = 0; refRectB.w = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); @@ -729,7 +729,7 @@ int rect_testHasIntersectionInside (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_HasIntersection() with B fully outside A * * \sa @@ -743,7 +743,7 @@ int rect_testHasIntersectionOutside (void *arg) SDL_Rect rectB; SDL_bool intersection; - // rectB fully outside of rectA + /* rectB fully outside of rectA */ refRectB.x = refRectA.x + refRectA.w + SDLTest_RandomIntegerInRange(1, 10); refRectB.y = refRectA.y + refRectA.h + SDLTest_RandomIntegerInRange(1, 10); refRectB.w = refRectA.w; @@ -756,7 +756,7 @@ int rect_testHasIntersectionOutside (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_HasIntersection() with B partially intersecting A * * \sa @@ -770,7 +770,7 @@ int rect_testHasIntersectionPartial (void *arg) SDL_Rect rectB; SDL_bool intersection; - // rectB partially contained in rectA + /* rectB partially contained in rectA */ refRectB.x = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); refRectB.y = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1); refRectB.w = refRectA.w; @@ -780,7 +780,7 @@ int rect_testHasIntersectionPartial (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - // rectB right edge + /* rectB right edge */ refRectB.x = rectA.w - 1; refRectB.y = rectA.y; refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1); @@ -790,7 +790,7 @@ int rect_testHasIntersectionPartial (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - // rectB left edge + /* rectB left edge */ refRectB.x = 1 - rectA.w; refRectB.y = rectA.y; refRectB.w = refRectA.w; @@ -800,7 +800,7 @@ int rect_testHasIntersectionPartial (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - // rectB bottom edge + /* rectB bottom edge */ refRectB.x = rectA.x; refRectB.y = rectA.h - 1; refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1); @@ -810,7 +810,7 @@ int rect_testHasIntersectionPartial (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - // rectB top edge + /* rectB top edge */ refRectB.x = rectA.x; refRectB.y = 1 - rectA.h; refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1); @@ -823,7 +823,7 @@ int rect_testHasIntersectionPartial (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_HasIntersection() with 1x1 pixel sized rectangles * * \sa @@ -838,7 +838,7 @@ int rect_testHasIntersectionPoint (void *arg) SDL_bool intersection; int offsetX, offsetY; - // intersecting pixels + /* intersecting pixels */ refRectA.x = SDLTest_RandomIntegerInRange(1, 100); refRectA.y = SDLTest_RandomIntegerInRange(1, 100); refRectB.x = refRectA.x; @@ -848,7 +848,7 @@ int rect_testHasIntersectionPoint (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); - // non-intersecting pixels cases + /* non-intersecting pixels cases */ for (offsetX = -1; offsetX <= 1; offsetX++) { for (offsetY = -1; offsetY <= 1; offsetY++) { if (offsetX != 0 || offsetY != 0) { @@ -869,7 +869,7 @@ int rect_testHasIntersectionPoint (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Tests SDL_HasIntersection() with empty rectangles * * \sa @@ -883,7 +883,7 @@ int rect_testHasIntersectionEmpty (void *arg) SDL_Rect rectB; SDL_bool intersection; - // Rect A empty + /* Rect A empty */ refRectA.x = SDLTest_RandomIntegerInRange(1, 100); refRectA.y = SDLTest_RandomIntegerInRange(1, 100); refRectA.w = SDLTest_RandomIntegerInRange(1, 100); @@ -896,7 +896,7 @@ int rect_testHasIntersectionEmpty (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); - // Rect B empty + /* Rect B empty */ refRectA.x = SDLTest_RandomIntegerInRange(1, 100); refRectA.y = SDLTest_RandomIntegerInRange(1, 100); refRectA.w = SDLTest_RandomIntegerInRange(1, 100); @@ -909,7 +909,7 @@ int rect_testHasIntersectionEmpty (void *arg) intersection = SDL_HasIntersection(&rectA, &rectB); _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); - // Rect A and B empty + /* Rect A and B empty */ refRectA.x = SDLTest_RandomIntegerInRange(1, 100); refRectA.y = SDLTest_RandomIntegerInRange(1, 100); refRectA.w = SDLTest_RandomIntegerInRange(1, 100); @@ -927,7 +927,7 @@ int rect_testHasIntersectionEmpty (void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Negative tests against SDL_HasIntersection() with invalid parameters * * \sa @@ -939,7 +939,7 @@ int rect_testHasIntersectionParam(void *arg) SDL_Rect rectB; SDL_bool intersection; - // invalid parameter combinations + /* invalid parameter combinations */ intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB); SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL"); intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL); @@ -950,7 +950,7 @@ int rect_testHasIntersectionParam(void *arg) return TEST_COMPLETED; } -/*! +/* ! * \brief Test SDL_EnclosePoints() without clipping * * \sa @@ -969,7 +969,7 @@ int rect_testEnclosePoints(void *arg) int minx = 0, maxx = 0, miny = 0, maxy = 0; int i; - // Create input data, tracking result + /* Create input data, tracking result */ for (i=0; itype == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); @@ -352,11 +352,11 @@ rwops_testFileWrite(void) SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"w+\") succeeded"); SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in write mode does not return NULL"); - // Bail out if NULL + /* Bail out if NULL */ if (rw == NULL) return TEST_ABORTED; /* Check type */ -#if defined(ANDROID) +#if defined(__ANDROID__) SDLTest_AssertCheck( rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE, "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type); @@ -560,7 +560,7 @@ rwops_testCompareRWFromMemWithRWFromFile(void) /* Compare */ SDLTest_AssertCheck(rv_mem == rv_file, "Verify returned read blocks matches for mem and file reads; got: rv_mem=%d rv_file=%d", rv_mem, rv_file); - SDLTest_AssertCheck(sv_mem == sv_file, "Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%llu sv_file=%llu", sv_mem, sv_file); + SDLTest_AssertCheck(sv_mem == sv_file, "Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%"SDL_PRIu64" sv_file=%"SDL_PRIu64, sv_mem, sv_file); SDLTest_AssertCheck(buffer_mem[slen] == 0, "Verify mem buffer termination; expected: 0, got: %d", buffer_mem[slen]); SDLTest_AssertCheck(buffer_file[slen] == 0, "Verify file buffer termination; expected: 0, got: %d", buffer_file[slen]); SDLTest_AssertCheck( @@ -642,53 +642,53 @@ rwops_testFileWriteReadEndian(void) SDLTest_AssertPass("Call to SDL_RWFromFile(..,\"w+\")"); SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFile in write mode does not return NULL"); - // Bail out if NULL + /* Bail out if NULL */ if (rw == NULL) return TEST_ABORTED; /* Write test data */ objectsWritten = SDL_WriteBE16(rw, BE16value); - SDLTest_AssertPass("Call to SDL_WriteBE16"); + SDLTest_AssertPass("Call to SDL_WriteBE16()"); SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteBE32(rw, BE32value); - SDLTest_AssertPass("Call to SDL_WriteBE32"); + SDLTest_AssertPass("Call to SDL_WriteBE32()"); SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteBE64(rw, BE64value); - SDLTest_AssertPass("Call to SDL_WriteBE64"); + SDLTest_AssertPass("Call to SDL_WriteBE64()"); SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteLE16(rw, LE16value); - SDLTest_AssertPass("Call to SDL_WriteLE16"); + SDLTest_AssertPass("Call to SDL_WriteLE16()"); SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteLE32(rw, LE32value); - SDLTest_AssertPass("Call to SDL_WriteLE32"); + SDLTest_AssertPass("Call to SDL_WriteLE32()"); SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); objectsWritten = SDL_WriteLE64(rw, LE64value); - SDLTest_AssertPass("Call to SDL_WriteLE64"); + SDLTest_AssertPass("Call to SDL_WriteLE64()"); SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten); /* Test seek to start */ result = SDL_RWseek( rw, 0, RW_SEEK_SET ); SDLTest_AssertPass("Call to SDL_RWseek succeeded"); - SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %i", result); + SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %"SDL_PRIs64, result); /* Read test data */ BE16test = SDL_ReadBE16(rw); - SDLTest_AssertPass("Call to SDL_ReadBE16"); + SDLTest_AssertPass("Call to SDL_ReadBE16()"); SDLTest_AssertCheck(BE16test == BE16value, "Validate return value from SDL_ReadBE16, expected: %hu, got: %hu", BE16value, BE16test); BE32test = SDL_ReadBE32(rw); - SDLTest_AssertPass("Call to SDL_ReadBE32"); + SDLTest_AssertPass("Call to SDL_ReadBE32()"); SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %u, got: %u", BE32value, BE32test); BE64test = SDL_ReadBE64(rw); - SDLTest_AssertPass("Call to SDL_ReadBE64"); - SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %llu, got: %llu", BE64value, BE64test); + SDLTest_AssertPass("Call to SDL_ReadBE64()"); + SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %"SDL_PRIu64", got: %"SDL_PRIu64, BE64value, BE64test); LE16test = SDL_ReadLE16(rw); - SDLTest_AssertPass("Call to SDL_ReadLE16"); + SDLTest_AssertPass("Call to SDL_ReadLE16()"); SDLTest_AssertCheck(LE16test == LE16value, "Validate return value from SDL_ReadLE16, expected: %hu, got: %hu", LE16value, LE16test); LE32test = SDL_ReadLE32(rw); - SDLTest_AssertPass("Call to SDL_ReadLE32"); + SDLTest_AssertPass("Call to SDL_ReadLE32()"); SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %u, got: %u", LE32value, LE32test); LE64test = SDL_ReadLE64(rw); - SDLTest_AssertPass("Call to SDL_ReadLE64"); - SDLTest_AssertCheck(LE64test == LE64value, "Validate return value from SDL_ReadLE64, expected: %llu, got: %llu", LE64value, LE64test); + SDLTest_AssertPass("Call to SDL_ReadLE64()"); + SDLTest_AssertCheck(LE64test == LE64value, "Validate return value from SDL_ReadLE64, expected: %"SDL_PRIu64", got: %"SDL_PRIu64, LE64value, LE64test); /* Close handle */ cresult = SDL_RWclose(rw); diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_sdltest.c b/3rdparty/sdl2-2.0.4/test/testautomation_sdltest.c similarity index 87% rename from 3rdparty/sdl2-2.0.0/test/testautomation_sdltest.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_sdltest.c index e0d921b49c..ec1da8a50e 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_sdltest.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_sdltest.c @@ -21,6 +21,39 @@ /* Test case functions */ +/* Forward declarations for internal harness functions */ +extern char *SDLTest_GenerateRunSeed(const int length); + +/** + * @brief Calls to SDLTest_GenerateRunSeed() + */ +int +sdltest_generateRunSeed(void *arg) +{ + char* result; + int i, l; + + for (i = 1; i <= 10; i += 3) { + result = SDLTest_GenerateRunSeed((const int)i); + SDLTest_AssertPass("Call to SDLTest_GenerateRunSeed()"); + SDLTest_AssertCheck(result != NULL, "Verify returned value is not NULL"); + if (result != NULL) { + l = SDL_strlen(result); + SDLTest_AssertCheck(l == i, "Verify length of returned value is %d, got: %d", i, l); + SDL_free(result); + } + } + + /* Negative cases */ + for (i = -2; i <= 0; i++) { + result = SDLTest_GenerateRunSeed((const int)i); + SDLTest_AssertPass("Call to SDLTest_GenerateRunSeed()"); + SDLTest_AssertCheck(result == NULL, "Verify returned value is not NULL"); + } + + return TEST_COMPLETED; +} + /** * @brief Calls to SDLTest_GetFuzzerInvocationCount() */ @@ -60,35 +93,35 @@ sdltest_randomNumber(void *arg) result = (Sint64)SDLTest_RandomUint8(); umax = (1 << 8) - 1; SDLTest_AssertPass("Call to SDLTest_RandomUint8"); - SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%llu], got: %lld", umax, result); + SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%"SDL_PRIu64"], got: %"SDL_PRIs64, umax, result); result = (Sint64)SDLTest_RandomSint8(); min = 0 - (1 << 7); max = (1 << 7) - 1; SDLTest_AssertPass("Call to SDLTest_RandomSint8"); - SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result); + SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result); result = (Sint64)SDLTest_RandomUint16(); umax = (1 << 16) - 1; SDLTest_AssertPass("Call to SDLTest_RandomUint16"); - SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%llu], got: %lld", umax, result); + SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%"SDL_PRIu64"], got: %"SDL_PRIs64, umax, result); result = (Sint64)SDLTest_RandomSint16(); min = 0 - (1 << 15); max = (1 << 15) - 1; SDLTest_AssertPass("Call to SDLTest_RandomSint16"); - SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result); + SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result); result = (Sint64)SDLTest_RandomUint32(); umax = ((Uint64)1 << 32) - 1; SDLTest_AssertPass("Call to SDLTest_RandomUint32"); - SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%llu], got: %lld", umax, result); + SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, "Verify result value, expected: [0,%"SDL_PRIu64"], got: %"SDL_PRIs64, umax, result); result = (Sint64)SDLTest_RandomSint32(); min = 0 - ((Sint64)1 << 31); max = ((Sint64)1 << 31) - 1; SDLTest_AssertPass("Call to SDLTest_RandomSint32"); - SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result); + SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%"SDL_PRIs64",%"SDL_PRIs64"], got: %"SDL_PRIs64, min, max, result); uresult = SDLTest_RandomUint64(); SDLTest_AssertPass("Call to SDLTest_RandomUint64"); @@ -133,83 +166,83 @@ sdltest_randomBoundaryNumberUint8(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 0xff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 255, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters (1,255,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters (1,255,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xfe, SDL_FALSE) returns 0xff (no error) */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 254, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 0xff, - "Validate result value for parameters (0,254,SDL_FALSE); expected: 0xff, got: %lld", uresult); + "Validate result value for parameters (0,254,SDL_FALSE); expected: 0xff, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xff, SDL_FALSE) returns 0 (sets error) */ uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 255, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters(0,255,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters(0,255,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -243,83 +276,83 @@ sdltest_randomBoundaryNumberUint16(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 0xffff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 0xffff, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters (1,0xffff,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters (1,0xffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xfffe, SDL_FALSE) returns 0xffff (no error) */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xfffe, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 0xffff, - "Validate result value for parameters (0,0xfffe,SDL_FALSE); expected: 0xffff, got: %lld", uresult); + "Validate result value for parameters (0,0xfffe,SDL_FALSE); expected: 0xffff, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xffff, SDL_FALSE) returns 0 (sets error) */ uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xffff, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters(0,0xffff,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters(0,0xffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -353,83 +386,83 @@ sdltest_randomBoundaryNumberUint32(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 0xffffffff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 0xffffffff, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters (1,0xffffffff,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters (1,0xffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xfffffffe, SDL_FALSE) returns 0xffffffff (no error) */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xfffffffe, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 0xffffffff, - "Validate result value for parameters (0,0xfffffffe,SDL_FALSE); expected: 0xffffffff, got: %lld", uresult); + "Validate result value for parameters (0,0xfffffffe,SDL_FALSE); expected: 0xffffffff, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xffffffff, SDL_FALSE) returns 0 (sets error) */ uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xffffffff, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters(0,0xffffffff,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters(0,0xffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -463,83 +496,83 @@ sdltest_randomBoundaryNumberUint64(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 0 || uresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 100, - "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult); + "Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, uresult); /* RandomUintXBoundaryValue(1, 0xffffffffffffffff, SDL_FALSE) returns 0 (no error) */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, (Uint64)0xffffffffffffffffULL, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters (1,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters (1,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xfffffffffffffffe, SDL_FALSE) returns 0xffffffffffffffff (no error) */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xfffffffffffffffeULL, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == (Uint64)0xffffffffffffffffULL, - "Validate result value for parameters (0,0xfffffffffffffffe,SDL_FALSE); expected: 0xffffffffffffffff, got: %lld", uresult); + "Validate result value for parameters (0,0xfffffffffffffffe,SDL_FALSE); expected: 0xffffffffffffffff, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomUintXBoundaryValue(0, 0xffffffffffffffff, SDL_FALSE) returns 0 (sets error) */ uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xffffffffffffffffULL, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue"); SDLTest_AssertCheck( uresult == 0, - "Validate result value for parameters(0,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %lld", uresult); + "Validate result value for parameters(0,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %"SDL_PRIs64, uresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -573,83 +606,83 @@ sdltest_randomBoundaryNumberSint8(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(SCHAR_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == SCHAR_MIN, - "Validate result value for parameters (SCHAR_MIN + 1,SCHAR_MAX,SDL_FALSE); expected: %d, got: %lld", SCHAR_MIN, sresult); + "Validate result value for parameters (SCHAR_MIN + 1,SCHAR_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SCHAR_MIN, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX - 1, SDL_FALSE) returns SCHAR_MAX (no error) */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX -1, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == SCHAR_MAX, - "Validate result value for parameters (SCHAR_MIN,SCHAR_MAX - 1,SDL_FALSE); expected: %d, got: %lld", SCHAR_MAX, sresult); + "Validate result value for parameters (SCHAR_MIN,SCHAR_MAX - 1,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SCHAR_MAX, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (sets error) */ sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue"); SDLTest_AssertCheck( sresult == SCHAR_MIN, - "Validate result value for parameters(SCHAR_MIN,SCHAR_MAX,SDL_FALSE); expected: %d, got: %lld", SCHAR_MIN, sresult); + "Validate result value for parameters(SCHAR_MIN,SCHAR_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SCHAR_MIN, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -683,83 +716,83 @@ sdltest_randomBoundaryNumberSint16(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(SHRT_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE) returns SHRT_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == SHRT_MIN, - "Validate result value for parameters (SHRT_MIN+1,SHRT_MAX,SDL_FALSE); expected: %d, got: %lld", SHRT_MIN, sresult); + "Validate result value for parameters (SHRT_MIN+1,SHRT_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SHRT_MIN, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE) returns SHRT_MAX (no error) */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == SHRT_MAX, - "Validate result value for parameters (SHRT_MIN,SHRT_MAX - 1,SDL_FALSE); expected: %d, got: %lld", SHRT_MAX, sresult); + "Validate result value for parameters (SHRT_MIN,SHRT_MAX - 1,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SHRT_MAX, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE) returns 0 (sets error) */ sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue"); SDLTest_AssertCheck( sresult == SHRT_MIN, - "Validate result value for parameters(SHRT_MIN,SHRT_MAX,SDL_FALSE); expected: %d, got: %lld", SHRT_MIN, sresult); + "Validate result value for parameters(SHRT_MIN,SHRT_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, SHRT_MIN, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -800,83 +833,83 @@ sdltest_randomBoundaryNumberSint32(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(LONG_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE) returns LONG_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == long_min, - "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %d, got: %lld", long_min, sresult); + "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, long_min, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX - 1, SDL_FALSE) returns LONG_MAX (no error) */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max - 1, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == long_max, - "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %d, got: %lld", long_max, sresult); + "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, long_max, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX, SDL_FALSE) returns 0 (sets error) */ sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue"); SDLTest_AssertCheck( sresult == long_min, - "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %d, got: %lld", long_min, sresult); + "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, long_min, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -910,83 +943,83 @@ sdltest_randomBoundaryNumberSint64(void *arg) SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10, - "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult); + "Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 11, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11, - "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult); + "Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 12, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12, - "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult); + "Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 13, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13, - "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult); + "Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 20, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(20, 10, SDL_TRUE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20, - "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult); + "Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(1, 20, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 0 || sresult == 21, - "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult); + "Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(LLONG_MIN, 99, SDL_FALSE) returns 100 */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN, 99, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == 100, - "Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult); + "Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %"SDL_PRIs64, sresult); /* RandomSintXBoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE) returns LLONG_MIN (no error) */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == LLONG_MIN, - "Validate result value for parameters (LLONG_MIN+1,LLONG_MAX,SDL_FALSE); expected: %lld, got: %lld", LLONG_MIN, sresult); + "Validate result value for parameters (LLONG_MIN+1,LLONG_MAX,SDL_FALSE); expected: %"SDL_PRIs64", got: %"SDL_PRIs64, LLONG_MIN, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX - 1, SDL_FALSE) returns LLONG_MAX (no error) */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN, LLONG_MAX - 1, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == LLONG_MAX, - "Validate result value for parameters (LLONG_MIN,LLONG_MAX - 1,SDL_FALSE); expected: %lld, got: %lld", LLONG_MAX, sresult); + "Validate result value for parameters (LLONG_MIN,LLONG_MAX - 1,SDL_FALSE); expected: %"SDL_PRIs64", got: %"SDL_PRIs64, LLONG_MAX, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); - SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set"); + SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set"); /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX, SDL_FALSE) returns 0 (sets error) */ sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN, LLONG_MAX, SDL_FALSE); SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue"); SDLTest_AssertCheck( sresult == LLONG_MIN, - "Validate result value for parameters(LLONG_MIN,LLONG_MAX,SDL_FALSE); expected: %lld, got: %lld", LLONG_MIN, sresult); + "Validate result value for parameters(LLONG_MIN,LLONG_MAX,SDL_FALSE); expected: %"SDL_PRIs64", got: %"SDL_PRIs64, LLONG_MIN, sresult); lastError = (char *)SDL_GetError(); SDLTest_AssertPass("SDL_GetError()"); SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0, @@ -1043,7 +1076,7 @@ sdltest_randomIntegerInRange(void *arg) max = 0; result = SDLTest_RandomIntegerInRange(min, max); SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(0,0)"); - SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %d", min, max, result); + SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %d", result); /* Swapped min-max */ min = (Sint32)SDLTest_RandomSint16(); @@ -1263,11 +1296,14 @@ static const SDLTest_TestCaseReference sdltestTest13 = static const SDLTest_TestCaseReference sdltestTest14 = { (SDLTest_TestCaseFp)sdltest_randomAsciiStringOfSize, "sdltest_randomAsciiStringOfSize", "Calls to fixed size ASCII string generator", TEST_ENABLED }; +static const SDLTest_TestCaseReference sdltestTest15 = + { (SDLTest_TestCaseFp)sdltest_generateRunSeed, "sdltest_generateRunSeed", "Checks internal harness function SDLTest_GenerateRunSeed", TEST_ENABLED }; + /* Sequence of SDL_test test cases */ static const SDLTest_TestCaseReference *sdltestTests[] = { &sdltestTest1, &sdltestTest2, &sdltestTest3, &sdltestTest4, &sdltestTest5, &sdltestTest6, &sdltestTest7, &sdltestTest8, &sdltestTest9, &sdltestTest10, &sdltestTest11, &sdltestTest12, - &sdltestTest13, &sdltestTest14, NULL + &sdltestTest13, &sdltestTest14, &sdltestTest15, NULL }; /* SDL_test test suite (global) */ diff --git a/3rdparty/sdl2-2.0.4/test/testautomation_stdlib.c b/3rdparty/sdl2-2.0.4/test/testautomation_stdlib.c new file mode 100644 index 0000000000..89245fdcb6 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testautomation_stdlib.c @@ -0,0 +1,279 @@ +/** + * Standard C library routine test suite + */ + +#include + +#include "SDL.h" +#include "SDL_test.h" + + +/* Test case functions */ + +/** + * @brief Call to SDL_strlcpy + */ +#undef SDL_strlcpy +int +stdlib_strlcpy(void *arg) +{ + size_t result; + char text[1024]; + const char *expected; + + result = SDL_strlcpy(text, "foo", sizeof(text)); + expected = "foo"; + SDLTest_AssertPass("Call to SDL_strlcpy(\"foo\")"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_strlcpy(text, "foo", 2); + expected = "f"; + SDLTest_AssertPass("Call to SDL_strlcpy(\"foo\") with buffer size 2"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == 3, "Check result value, expected: 3, got: %d", result); + + return TEST_COMPLETED; +} + +/** + * @brief Call to SDL_snprintf + */ +#undef SDL_snprintf +int +stdlib_snprintf(void *arg) +{ + int result; + char text[1024]; + const char *expected; + + result = SDL_snprintf(text, sizeof(text), "%s", "foo"); + expected = "foo"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%s\", \"foo\")"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, 2, "%s", "foo"); + expected = "f"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%s\", \"foo\") with buffer size 2"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == 3, "Check result value, expected: 3, got: %d", result); + + result = SDL_snprintf(NULL, 0, "%s", "foo"); + SDLTest_AssertCheck(result == 3, "Check result value, expected: 3, got: %d", result); + + result = SDL_snprintf(text, sizeof(text), "%f", 1.0); + expected = "1.000000"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%f\", 1.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%.f", 1.0); + expected = "1"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%.f\", 1.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%#.f", 1.0); + expected = "1."; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%#.f\", 1.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%f", 1.0 + 1.0 / 3.0); + expected = "1.333333"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%+f", 1.0 + 1.0 / 3.0); + expected = "+1.333333"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%+f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%.2f", 1.0 + 1.0 / 3.0); + expected = "1.33"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%.2f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: %s, got: %s", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%6.2f", 1.0 + 1.0 / 3.0); + expected = " 1.33"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%6.2f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, sizeof(text), "%06.2f", 1.0 + 1.0 / 3.0); + expected = "001.33"; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%06.2f\", 1.0 + 1.0 / 3.0)"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text); + SDLTest_AssertCheck(result == SDL_strlen(text), "Check result value, expected: %d, got: %d", SDL_strlen(text), result); + + result = SDL_snprintf(text, 5, "%06.2f", 1.0 + 1.0 / 3.0); + expected = "001."; + SDLTest_AssertPass("Call to SDL_snprintf(\"%%06.2f\", 1.0 + 1.0 / 3.0) with buffer size 5"); + SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text); + SDLTest_AssertCheck(result == 6, "Check result value, expected: 6, got: %d", result); + + return TEST_COMPLETED; +} + +/** + * @brief Call to SDL_getenv and SDL_setenv + */ +int +stdlib_getsetenv(void *arg) +{ + const int nameLen = 16; + char name[17]; + int counter; + int result; + char * value1; + char * value2; + char * expected; + int overwrite; + char * text; + + /* Create a random name. This tests SDL_getenv, since we need to */ + /* make sure the variable is not set yet (it shouldn't). */ + do { + for(counter = 0; counter < nameLen; counter++) { + name[counter] = (char)SDLTest_RandomIntegerInRange(65, 90); + } + name[nameLen] = '\0'; + + text = SDL_getenv(name); + SDLTest_AssertPass("Call to SDL_getenv('%s')", name); + if (text != NULL) { + SDLTest_Log("Expected: NULL, Got: '%s' (%i)", text, SDL_strlen(text)); + } + } while (text != NULL); + + /* Create random values to set */ + value1 = SDLTest_RandomAsciiStringOfSize(10); + value2 = SDLTest_RandomAsciiStringOfSize(10); + + /* Set value 1 without overwrite */ + overwrite = 0; + expected = value1; + result = SDL_setenv(name, value1, overwrite); + SDLTest_AssertPass("Call to SDL_setenv('%s','%s', %i)", name, value1, overwrite); + SDLTest_AssertCheck(result == 0, "Check result, expected: 0, got: %i", result); + + /* Check value */ + text = SDL_getenv(name); + SDLTest_AssertPass("Call to SDL_getenv('%s')", name); + SDLTest_AssertCheck(text != NULL, "Verify returned text is not NULL"); + if (text != NULL) { + SDLTest_AssertCheck( + SDL_strcmp(text, expected) == 0, + "Verify returned text, expected: %s, got: %s", + expected, + text); + } + + /* Set value 2 with overwrite */ + overwrite = 1; + expected = value2; + result = SDL_setenv(name, value2, overwrite); + SDLTest_AssertPass("Call to SDL_setenv('%s','%s', %i)", name, value2, overwrite); + SDLTest_AssertCheck(result == 0, "Check result, expected: 0, got: %i", result); + + /* Check value */ + text = SDL_getenv(name); + SDLTest_AssertPass("Call to SDL_getenv('%s')", name); + SDLTest_AssertCheck(text != NULL, "Verify returned text is not NULL"); + if (text != NULL) { + SDLTest_AssertCheck( + SDL_strcmp(text, expected) == 0, + "Verify returned text, expected: %s, got: %s", + expected, + text); + } + + /* Set value 1 without overwrite */ + overwrite = 0; + expected = value2; + result = SDL_setenv(name, value1, overwrite); + SDLTest_AssertPass("Call to SDL_setenv('%s','%s', %i)", name, value1, overwrite); + SDLTest_AssertCheck(result == 0, "Check result, expected: 0, got: %i", result); + + /* Check value */ + text = SDL_getenv(name); + SDLTest_AssertPass("Call to SDL_getenv('%s')", name); + SDLTest_AssertCheck(text != NULL, "Verify returned text is not NULL"); + if (text != NULL) { + SDLTest_AssertCheck( + SDL_strcmp(text, expected) == 0, + "Verify returned text, expected: %s, got: %s", + expected, + text); + } + + /* Set value 1 without overwrite */ + overwrite = 1; + expected = value1; + result = SDL_setenv(name, value1, overwrite); + SDLTest_AssertPass("Call to SDL_setenv('%s','%s', %i)", name, value1, overwrite); + SDLTest_AssertCheck(result == 0, "Check result, expected: 0, got: %i", result); + + /* Check value */ + text = SDL_getenv(name); + SDLTest_AssertPass("Call to SDL_getenv('%s')", name); + SDLTest_AssertCheck(text != NULL, "Verify returned text is not NULL"); + if (text != NULL) { + SDLTest_AssertCheck( + SDL_strcmp(text, expected) == 0, + "Verify returned text, expected: %s, got: %s", + expected, + text); + } + + /* Negative cases */ + for (overwrite=0; overwrite <= 1; overwrite++) { + result = SDL_setenv(NULL, value1, overwrite); + SDLTest_AssertPass("Call to SDL_setenv(NULL,'%s', %i)", value1, overwrite); + SDLTest_AssertCheck(result == -1, "Check result, expected: -1, got: %i", result); + result = SDL_setenv("", value1, overwrite); + SDLTest_AssertPass("Call to SDL_setenv('','%s', %i)", value1, overwrite); + SDLTest_AssertCheck(result == -1, "Check result, expected: -1, got: %i", result); + result = SDL_setenv("=", value1, overwrite); + SDLTest_AssertPass("Call to SDL_setenv('=','%s', %i)", value1, overwrite); + SDLTest_AssertCheck(result == -1, "Check result, expected: -1, got: %i", result); + result = SDL_setenv(name, NULL, overwrite); + SDLTest_AssertPass("Call to SDL_setenv('%s', NULL, %i)", name, overwrite); + SDLTest_AssertCheck(result == -1, "Check result, expected: -1, got: %i", result); + } + + /* Clean up */ + SDL_free(value1); + SDL_free(value2); + + return TEST_COMPLETED; +} + +/* ================= Test References ================== */ + +/* Standard C routine test cases */ +static const SDLTest_TestCaseReference stdlibTest1 = + { (SDLTest_TestCaseFp)stdlib_strlcpy, "stdlib_strlcpy", "Call to SDL_strlcpy", TEST_ENABLED }; + +static const SDLTest_TestCaseReference stdlibTest2 = + { (SDLTest_TestCaseFp)stdlib_snprintf, "stdlib_snprintf", "Call to SDL_snprintf", TEST_ENABLED }; + +static const SDLTest_TestCaseReference stdlibTest3 = + { (SDLTest_TestCaseFp)stdlib_getsetenv, "stdlib_getsetenv", "Call to SDL_getenv and SDL_setenv", TEST_ENABLED }; + +/* Sequence of Standard C routine test cases */ +static const SDLTest_TestCaseReference *stdlibTests[] = { + &stdlibTest1, &stdlibTest2, &stdlibTest3, NULL +}; + +/* Timer test suite (global) */ +SDLTest_TestSuiteReference stdlibTestSuite = { + "Stdlib", + NULL, + stdlibTests, + NULL +}; diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_suites.h b/3rdparty/sdl2-2.0.4/test/testautomation_suites.h similarity index 92% rename from 3rdparty/sdl2-2.0.0/test/testautomation_suites.h rename to 3rdparty/sdl2-2.0.4/test/testautomation_suites.h index 695681b13b..b5f921e3da 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_suites.h +++ b/3rdparty/sdl2-2.0.4/test/testautomation_suites.h @@ -8,7 +8,7 @@ #include "SDL_test.h" -// Test collections +/* Test collections */ extern SDLTest_TestSuiteReference audioTestSuite; extern SDLTest_TestSuiteReference clipboardTestSuite; extern SDLTest_TestSuiteReference eventsTestSuite; @@ -26,8 +26,9 @@ extern SDLTest_TestSuiteReference surfaceTestSuite; extern SDLTest_TestSuiteReference syswmTestSuite; extern SDLTest_TestSuiteReference timerTestSuite; extern SDLTest_TestSuiteReference videoTestSuite; +extern SDLTest_TestSuiteReference hintsTestSuite; -// All test suites +/* All test suites */ SDLTest_TestSuiteReference *testSuites[] = { &audioTestSuite, &clipboardTestSuite, @@ -46,6 +47,7 @@ SDLTest_TestSuiteReference *testSuites[] = { &syswmTestSuite, &timerTestSuite, &videoTestSuite, + &hintsTestSuite, NULL }; diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_surface.c b/3rdparty/sdl2-2.0.4/test/testautomation_surface.c similarity index 93% rename from 3rdparty/sdl2-2.0.0/test/testautomation_surface.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_surface.c index 3f6c56c9af..ca41d4a0cd 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_surface.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_surface.c @@ -8,11 +8,18 @@ #define _CRT_NONSTDC_NO_DEPRECATE #include +#ifndef _MSC_VER +#include +#endif #include #include "SDL.h" #include "SDL_test.h" +#ifdef __MACOSX__ +#include /* For unlink() */ +#endif + /* ================= Test Case Implementation ================== */ /* Shared test surface */ @@ -63,14 +70,10 @@ _surfaceSetUp(void *arg) void _surfaceTearDown(void *arg) { - if (referenceSurface != NULL) { - SDL_FreeSurface(referenceSurface); - referenceSurface = NULL; - } - if (testSurface != NULL) { - SDL_FreeSurface(testSurface); - testSurface = NULL; - } + SDL_FreeSurface(referenceSurface); + referenceSurface = NULL; + SDL_FreeSurface(testSurface); + testSurface = NULL; } /** @@ -193,10 +196,8 @@ void _testBlitBlendMode(int mode) SDLTest_AssertCheck(checkFailCount4 == 0, "Validate results from calls to SDL_SetSurfaceBlendMode, expected: 0, got: %i", checkFailCount4); /* Clean up */ - if (face != NULL) { - SDL_FreeSurface(face); - face = NULL; - } + SDL_FreeSurface(face); + face = NULL; } /* Helper to check that a file exists */ @@ -250,19 +251,15 @@ surface_testSaveLoadBitmap(void *arg) unlink(sampleFilename); /* Clean up */ - if (face != NULL) { SDL_FreeSurface(face); face = NULL; - } - if (rface != NULL) { SDL_FreeSurface(rface); rface = NULL; - } return TEST_COMPLETED; } -/*! +/* ! * Tests surface conversion. */ int @@ -294,20 +291,16 @@ surface_testSurfaceConversion(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (face != NULL) { - SDL_FreeSurface( face ); - face = NULL; - } - if (rface != NULL) { - SDL_FreeSurface( rface ); - rface = NULL; - } + SDL_FreeSurface(face); + face = NULL; + SDL_FreeSurface(rface); + rface = NULL; return TEST_COMPLETED; } -/*! +/* ! * Tests surface conversion across all pixel formats. */ int @@ -360,8 +353,6 @@ surface_testCompleteSurfaceConversion(void *arg) for ( i = 0; i < SDL_arraysize(pixel_formats); ++i ) { for ( j = 0; j < SDL_arraysize(pixel_formats); ++j ) { - /*printf("Converting %s -> %s\n", SDL_GetPixelFormatName(pixel_formats[i]), SDL_GetPixelFormatName(pixel_formats[j]));*/ - fmt1 = SDL_AllocFormat(pixel_formats[i]); SDL_assert(fmt1 != NULL); cvt1 = SDL_ConvertSurface(face, fmt1, 0); @@ -429,9 +420,7 @@ surface_testBlit(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; } @@ -454,9 +443,7 @@ surface_testBlitColorMod(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; } @@ -479,9 +466,7 @@ surface_testBlitAlphaMod(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; } @@ -505,9 +490,7 @@ surface_testBlitBlendNone(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; } @@ -530,9 +513,7 @@ surface_testBlitBlendBlend(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; } @@ -555,9 +536,7 @@ surface_testBlitBlendAdd(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; } @@ -580,9 +559,7 @@ surface_testBlitBlendMod(void *arg) SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface( compareSurface ); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; } @@ -605,9 +582,7 @@ surface_testBlitBlendLoop(void *arg) { SDLTest_AssertCheck(ret == 0, "Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i", ret); /* Clean up. */ - if (compareSurface != NULL) { - SDL_FreeSurface(compareSurface); - } + SDL_FreeSurface(compareSurface); return TEST_COMPLETED; @@ -642,7 +617,7 @@ static const SDLTest_TestCaseReference surfaceTest8 = /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest9 = - { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blittin routines with verious blending modes", TEST_DISABLED}; + { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, "surface_testBlitBlendLoop", "Test blitting routines with various blending modes", TEST_DISABLED}; /* TODO: rewrite test case, define new test data and re-enable; current implementation fails */ static const SDLTest_TestCaseReference surfaceTest10 = diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_syswm.c b/3rdparty/sdl2-2.0.4/test/testautomation_syswm.c similarity index 96% rename from 3rdparty/sdl2-2.0.0/test/testautomation_syswm.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_syswm.c index 3e368f63ea..d9fd982b37 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_syswm.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_syswm.c @@ -32,7 +32,7 @@ syswm_getWindowWMInfo(void *arg) /* Make call */ result = SDL_GetWindowWMInfo(window, &info); - SDLTest_AssertPass("Call to SDL_GetWindowWMInfo"); + SDLTest_AssertPass("Call to SDL_GetWindowWMInfo()"); SDLTest_Log((result == SDL_TRUE) ? "Got window information" : "Couldn't get window information"); SDL_DestroyWindow(window); diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_timer.c b/3rdparty/sdl2-2.0.4/test/testautomation_timer.c similarity index 98% rename from 3rdparty/sdl2-2.0.0/test/testautomation_timer.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_timer.c index ddf6a5f299..6d73856ee2 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_timer.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_timer.c @@ -42,7 +42,7 @@ timer_getPerformanceCounter(void *arg) result = SDL_GetPerformanceCounter(); SDLTest_AssertPass("Call to SDL_GetPerformanceCounter()"); - SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %lu", result); + SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %"SDL_PRIu64, result); return TEST_COMPLETED; } @@ -57,7 +57,7 @@ timer_getPerformanceFrequency(void *arg) result = SDL_GetPerformanceFrequency(); SDLTest_AssertPass("Call to SDL_GetPerformanceFrequency()"); - SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %lu", result); + SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %"SDL_PRIu64, result); return TEST_COMPLETED; } diff --git a/3rdparty/sdl2-2.0.0/test/testautomation_video.c b/3rdparty/sdl2-2.0.4/test/testautomation_video.c similarity index 98% rename from 3rdparty/sdl2-2.0.0/test/testautomation_video.c rename to 3rdparty/sdl2-2.0.4/test/testautomation_video.c index 46061090e6..7b86cfba90 100644 --- a/3rdparty/sdl2-2.0.0/test/testautomation_video.c +++ b/3rdparty/sdl2-2.0.4/test/testautomation_video.c @@ -51,7 +51,7 @@ void _destroyVideoSuiteTestWindow(SDL_Window *window) if (window != NULL) { SDL_DestroyWindow(window); window = NULL; - SDLTest_AssertPass("Call to SDL_DestroyWindow"); + SDLTest_AssertPass("Call to SDL_DestroyWindow()"); } } @@ -342,7 +342,7 @@ video_getWindowFlags(void *arg) window = _createVideoSuiteTestWindow(title); if (window != NULL) { actualFlags = SDL_GetWindowFlags(window); - SDLTest_AssertPass("Call to SDL_GetWindowFlags"); + SDLTest_AssertPass("Call to SDL_GetWindowFlags()"); SDLTest_AssertCheck((flags & actualFlags) == flags, "Verify returned value has flags %d set, got: %d", flags, actualFlags); } @@ -364,7 +364,7 @@ video_getNumDisplayModes(void *arg) /* Get number of displays */ displayNum = SDL_GetNumVideoDisplays(); - SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays"); + SDLTest_AssertPass("Call to SDL_GetNumVideoDisplays()"); /* Make call for each display */ for (i=0; i= 0.0 && result <= 1.0, "Validate range of result value; expected: [0.0, 1.0], got: %f", result); } @@ -541,7 +541,6 @@ video_getWindowBrightnessNegative(void *arg) { const char *invalidWindowError = "Invalid window"; char *lastError; - const char* title = "video_getWindowBrightnessNegative Test Window"; float result; /* Call against invalid window */ @@ -583,7 +582,7 @@ video_getWindowDisplayMode(void *arg) window = _createVideoSuiteTestWindow(title); if (window != NULL) { result = SDL_GetWindowDisplayMode(window, &mode); - SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode"); + SDLTest_AssertPass("Call to SDL_GetWindowDisplayMode()"); SDLTest_AssertCheck(result == 0, "Validate result value; expected: 0, got: %d", result); SDLTest_AssertCheck(mode.w > 0, "Validate mode.w content; expected: >0, got: %d", mode.w); SDLTest_AssertCheck(mode.h > 0, "Validate mode.h content; expected: >0, got: %d", mode.h); @@ -728,7 +727,6 @@ video_getWindowGammaRamp(void *arg) int video_getWindowGammaRampNegative(void *arg) { - const char* title = "video_getWindowGammaRampNegative Test Window"; Uint16 red[256]; Uint16 green[256]; Uint16 blue[256]; @@ -740,7 +738,7 @@ video_getWindowGammaRampNegative(void *arg) /* Call against invalid window */ result = SDL_GetWindowGammaRamp(NULL, red, green, blue); SDLTest_AssertPass("Call to SDL_GetWindowGammaRamp(window=NULL,r,g,b)"); - SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %f", result); + SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %i", result); _checkInvalidWindowError(); return TEST_COMPLETED; @@ -876,7 +874,7 @@ video_getWindowId(void *arg) /* Clean up */ _destroyVideoSuiteTestWindow(window); - /* Get window from ID for closed window*/ + /* Get window from ID for closed window */ result = SDL_GetWindowFromID(id); SDLTest_AssertPass("Call to SDL_GetWindowID(%d/closed_window)", id); SDLTest_AssertCheck(result == NULL, "Verify result is NULL"); @@ -1524,10 +1522,10 @@ video_getSetWindowData(void *arg) const char *referenceName2 = "TestName2"; const char *name2 = "TestName2"; int datasize; - char *referenceUserdata; - char *userdata; - char *referenceUserdata2; - char *userdata2; + char *referenceUserdata = NULL; + char *userdata = NULL; + char *referenceUserdata2 = NULL; + char *userdata2 = NULL; char *result; int iteration; @@ -1619,7 +1617,7 @@ video_getSetWindowData(void *arg) /* Set data with NULL to clear */ result = (char *)SDL_SetWindowData(window, name, NULL); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name, userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); @@ -1627,7 +1625,7 @@ video_getSetWindowData(void *arg) /* Set data with NULL to clear again */ result = (char *)SDL_SetWindowData(window, name, NULL); - SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name, userdata); + SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name); SDLTest_AssertCheck(result == NULL, "Validate that result is NULL"); SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name); SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata); @@ -1714,10 +1712,10 @@ video_getSetWindowData(void *arg) _destroyVideoSuiteTestWindow(window); cleanup: - if (referenceUserdata != NULL) SDL_free(referenceUserdata); - if (referenceUserdata2 != NULL) SDL_free(referenceUserdata2); - if (userdata != NULL) SDL_free(userdata); - if (userdata2 != NULL) SDL_free(userdata2); + SDL_free(referenceUserdata); + SDL_free(referenceUserdata2); + SDL_free(userdata); + SDL_free(userdata2); return returnValue; } diff --git a/3rdparty/sdl2-2.0.4/test/testdisplayinfo.c b/3rdparty/sdl2-2.0.4/test/testdisplayinfo.c new file mode 100644 index 0000000000..c228eb6b2d --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testdisplayinfo.c @@ -0,0 +1,89 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Program to test querying of display info */ + +#include "SDL.h" + +#include +#include + +static void +print_mode(const char *prefix, const SDL_DisplayMode *mode) +{ + if (!mode) + return; + + SDL_Log("%s: fmt=%s w=%d h=%d refresh=%d\n", + prefix, SDL_GetPixelFormatName(mode->format), + mode->w, mode->h, mode->refresh_rate); +} + +int +main(int argc, char *argv[]) +{ + SDL_DisplayMode mode; + int num_displays, dpy; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Load the SDL library */ + if (SDL_Init(SDL_INIT_VIDEO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return 1; + } + + SDL_Log("Using video target '%s'.\n", SDL_GetCurrentVideoDriver()); + num_displays = SDL_GetNumVideoDisplays(); + + SDL_Log("See %d displays.\n", num_displays); + + for (dpy = 0; dpy < num_displays; dpy++) { + const int num_modes = SDL_GetNumDisplayModes(dpy); + SDL_Rect rect = { 0, 0, 0, 0 }; + int m; + + SDL_GetDisplayBounds(dpy, &rect); + SDL_Log("%d: \"%s\" (%dx%d, (%d, %d)), %d modes.\n", dpy, SDL_GetDisplayName(dpy), rect.w, rect.h, rect.x, rect.y, num_modes); + + if (SDL_GetCurrentDisplayMode(dpy, &mode) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, " CURRENT: failed to query (%s)\n", SDL_GetError()); + } else { + print_mode("CURRENT", &mode); + } + + if (SDL_GetDesktopDisplayMode(dpy, &mode) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, " DESKTOP: failed to query (%s)\n", SDL_GetError()); + } else { + print_mode("DESKTOP", &mode); + } + + for (m = 0; m < num_modes; m++) { + if (SDL_GetDisplayMode(dpy, m, &mode) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, " MODE %d: failed to query (%s)\n", m, SDL_GetError()); + } else { + char prefix[64]; + SDL_snprintf(prefix, sizeof (prefix), " MODE %d", m); + print_mode(prefix, &mode); + } + } + + SDL_Log("\n"); + } + + SDL_Quit(); + return 0; +} + +/* vi: set ts=4 sw=4 expandtab: */ + diff --git a/3rdparty/sdl2-2.0.0/test/testdraw2.c b/3rdparty/sdl2-2.0.4/test/testdraw2.c similarity index 87% rename from 3rdparty/sdl2-2.0.0/test/testdraw2.c rename to 3rdparty/sdl2-2.0.4/test/testdraw2.c index a4509fe749..77bd8c1fe6 100644 --- a/3rdparty/sdl2-2.0.0/test/testdraw2.c +++ b/3rdparty/sdl2-2.0.4/test/testdraw2.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -16,6 +16,10 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#endif + #include "SDL_test_common.h" #define NUM_OBJECTS 100 @@ -29,6 +33,8 @@ static int current_alpha = 255; static int current_color = 255; static SDL_BlendMode blendMode = SDL_BLENDMODE_NONE; +int done; + void DrawPoints(SDL_Renderer * renderer) { @@ -169,13 +175,45 @@ DrawRects(SDL_Renderer * renderer) } } +void +loop() +{ + int i; + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + for (i = 0; i < state->num_windows; ++i) { + SDL_Renderer *renderer = state->renderers[i]; + if (state->windows[i] == NULL) + continue; + SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); + SDL_RenderClear(renderer); + + DrawRects(renderer); + DrawLines(renderer); + DrawPoints(renderer); + + SDL_RenderPresent(renderer); + } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + int main(int argc, char *argv[]) { - int i, done; - SDL_Event event; + int i; Uint32 then, now, frames; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + /* Initialize parameters */ num_objects = NUM_OBJECTS; @@ -218,8 +256,7 @@ main(int argc, char *argv[]) } } if (consumed < 0) { - fprintf(stderr, - "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n", + SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n", argv[0], SDLTest_CommonUsage(state)); return 1; } @@ -243,24 +280,16 @@ main(int argc, char *argv[]) frames = 0; then = SDL_GetTicks(); done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else while (!done) { - /* Check for events */ ++frames; - while (SDL_PollEvent(&event)) { - SDLTest_CommonEvent(state, &event, &done); + loop(); } - for (i = 0; i < state->num_windows; ++i) { - SDL_Renderer *renderer = state->renderers[i]; - SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); - SDL_RenderClear(renderer); +#endif - DrawRects(renderer); - DrawLines(renderer); - DrawPoints(renderer); - - SDL_RenderPresent(renderer); - } - } SDLTest_CommonQuit(state); @@ -268,7 +297,7 @@ main(int argc, char *argv[]) now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); - printf("%2.2f frames per second\n", fps); + SDL_Log("%2.2f frames per second\n", fps); } return 0; } diff --git a/3rdparty/sdl2-2.0.4/test/testdrawchessboard.c b/3rdparty/sdl2-2.0.4/test/testdrawchessboard.c new file mode 100644 index 0000000000..f2a1469d47 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testdrawchessboard.c @@ -0,0 +1,135 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. + + This file is created by : Nitin Jain (nitin.j4@samsung.com) +*/ + +/* Sample program: Draw a Chess Board by using SDL_CreateSoftwareRenderer API */ + +#include +#include + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#include "SDL.h" + +SDL_Window *window; +SDL_Renderer *renderer; +int done; + +void +DrawChessBoard(SDL_Renderer * renderer) +{ + int row = 0,column = 0,x = 0; + SDL_Rect rect, darea; + + /* Get the Size of drawing surface */ + SDL_RenderGetViewport(renderer, &darea); + + for( ; row < 8; row++) + { + column = row%2; + x = column; + for( ; column < 4+(row%2); column++) + { + SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF); + + rect.w = darea.w/8; + rect.h = darea.h/8; + rect.x = x * rect.w; + rect.y = row * rect.h; + x = x + 2; + SDL_RenderFillRect(renderer, &rect); + } + } +} + +void +loop() +{ + SDL_Event e; + while (SDL_PollEvent(&e)) { + if (e.type == SDL_QUIT) { + done = 1; +#ifdef __EMSCRIPTEN__ + emscripten_cancel_main_loop(); +#endif + return; + } + + if ((e.type == SDL_KEYDOWN) && (e.key.keysym.sym == SDLK_ESCAPE)) { + done = 1; +#ifdef __EMSCRIPTEN__ + emscripten_cancel_main_loop(); +#endif + return; + } + } + + DrawChessBoard(renderer); + + /* Got everything on rendering surface, + now Update the drawing image on window screen */ + SDL_UpdateWindowSurface(window); +} + +int +main(int argc, char *argv[]) +{ + SDL_Surface *surface; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize SDL */ + if(SDL_Init(SDL_INIT_VIDEO) != 0) + { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init fail : %s\n", SDL_GetError()); + return 1; + } + + + /* Create window and renderer for given surface */ + window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN); + if(!window) + { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n",SDL_GetError()); + return 1; + } + surface = SDL_GetWindowSurface(window); + renderer = SDL_CreateSoftwareRenderer(surface); + if(!renderer) + { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError()); + return 1; + } + + /* Clear the rendering surface with the specified color */ + SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); + SDL_RenderClear(renderer); + + + /* Draw the Image on rendering surface */ + done = 0; +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + loop(); + } +#endif + + SDL_Quit(); + return 0; +} + diff --git a/3rdparty/sdl2-2.0.4/test/testdropfile.c b/3rdparty/sdl2-2.0.4/test/testdropfile.c new file mode 100644 index 0000000000..b7f215ee81 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testdropfile.c @@ -0,0 +1,93 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +#include +#include + +#include "SDL_test_common.h" + +static SDLTest_CommonState *state; + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDLTest_CommonQuit(state); + exit(rc); +} + +int +main(int argc, char *argv[]) +{ + int i, done; + SDL_Event event; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + /* needed voodoo to allow app to launch via OS X Finder */ + if (SDL_strncmp(argv[i], "-psn", 4)==0) { + consumed = 1; + } + if (consumed == 0) { + consumed = -1; + } + if (consumed < 0) { + SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); + quit(1); + } + i += consumed; + } + if (!SDLTest_CommonInit(state)) { + quit(2); + } + + for (i = 0; i < state->num_windows; ++i) { + SDL_Renderer *renderer = state->renderers[i]; + SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); + SDL_RenderClear(renderer); + SDL_RenderPresent(renderer); + } + + SDL_EventState(SDL_DROPFILE, SDL_ENABLE); + + /* Main render loop */ + done = 0; + while (!done) { + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + + if (event.type == SDL_DROPFILE) { + char *dropped_filedir = event.drop.file; + SDL_Log("File dropped on window: %s", dropped_filedir); + SDL_free(dropped_filedir); + } + } + } + + quit(0); + /* keep the compiler happy ... */ + return(0); +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.4/test/testerror.c b/3rdparty/sdl2-2.0.4/test/testerror.c new file mode 100644 index 0000000000..b5fa3fbc08 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testerror.c @@ -0,0 +1,77 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple test of the SDL threading code and error handling */ + +#include +#include +#include + +#include "SDL.h" + +static int alive = 0; + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDL_Quit(); + exit(rc); +} + +int SDLCALL +ThreadFunc(void *data) +{ + /* Set the child thread error string */ + SDL_SetError("Thread %s (%lu) had a problem: %s", + (char *) data, SDL_ThreadID(), "nevermind"); + while (alive) { + SDL_Log("Thread '%s' is alive!\n", (char *) data); + SDL_Delay(1 * 1000); + } + SDL_Log("Child thread error string: %s\n", SDL_GetError()); + return (0); +} + +int +main(int argc, char *argv[]) +{ + SDL_Thread *thread; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Load the SDL library */ + if (SDL_Init(0) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + + /* Set the error value for the main thread */ + SDL_SetError("No worries"); + + alive = 1; + thread = SDL_CreateThread(ThreadFunc, NULL, "#1"); + if (thread == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread: %s\n", SDL_GetError()); + quit(1); + } + SDL_Delay(5 * 1000); + SDL_Log("Waiting for thread #1\n"); + alive = 0; + SDL_WaitThread(thread, NULL); + + SDL_Log("Main thread error string: %s\n", SDL_GetError()); + + SDL_Quit(); + return (0); +} diff --git a/3rdparty/sdl2-2.0.0/test/testfile.c b/3rdparty/sdl2-2.0.4/test/testfile.c similarity index 95% rename from 3rdparty/sdl2-2.0.0/test/testfile.c rename to 3rdparty/sdl2-2.0.4/test/testfile.c index d82d0eb7c4..b45795f630 100644 --- a/3rdparty/sdl2-2.0.0/test/testfile.c +++ b/3rdparty/sdl2-2.0.4/test/testfile.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -12,7 +12,7 @@ /* sanity tests on SDL_rwops.c (usefull for alternative implementations of stdio rwops) */ -// quiet windows compiler warnings +/* quiet windows compiler warnings */ #define _CRT_NONSTDC_NO_WARNINGS #include @@ -22,7 +22,6 @@ #endif #include "SDL.h" -#include "SDL_endian.h" #include @@ -44,7 +43,6 @@ static void cleanup(void) { - unlink(FBASENAME1); unlink(FBASENAME2); } @@ -52,8 +50,7 @@ cleanup(void) static void rwops_error_quit(unsigned line, SDL_RWops * rwops) { - - printf("testfile.c(%d): failed\n", line); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "testfile.c(%d): failed\n", line); if (rwops) { rwops->close(rwops); /* This calls SDL_FreeRW(rwops); */ } @@ -71,6 +68,9 @@ main(int argc, char *argv[]) SDL_RWops *rwops = NULL; char test_buf[30]; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + cleanup(); /* test 1 : basic argument test: all those calls to SDL_RWFromFile should fail */ @@ -90,7 +90,7 @@ main(int argc, char *argv[]) rwops = SDL_RWFromFile("something", NULL); if (rwops) RWOP_ERR_QUIT(rwops); - printf("test1 OK\n"); + SDL_Log("test1 OK\n"); /* test 2 : check that inexistent file is not successfully opened/created when required */ /* modes : r, r+ imply that file MUST exist @@ -123,7 +123,7 @@ main(int argc, char *argv[]) RWOP_ERR_QUIT(rwops); rwops->close(rwops); unlink(FBASENAME2); - printf("test2 OK\n"); + SDL_Log("test2 OK\n"); /* test 3 : creation, writing , reading, seeking, test : w mode, r mode, w+ mode @@ -201,7 +201,7 @@ main(int argc, char *argv[]) if (SDL_memcmp(test_buf, "12345678901234567890", 20)) RWOP_ERR_QUIT(rwops); rwops->close(rwops); - printf("test3 OK\n"); + SDL_Log("test3 OK\n"); /* test 4: same in r+ mode */ rwops = SDL_RWFromFile(FBASENAME1, "rb+"); /* write + read + file must exists, no truncation */ @@ -236,7 +236,7 @@ main(int argc, char *argv[]) if (SDL_memcmp(test_buf, "12345678901234567890", 20)) RWOP_ERR_QUIT(rwops); rwops->close(rwops); - printf("test4 OK\n"); + SDL_Log("test4 OK\n"); /* test5 : append mode */ rwops = SDL_RWFromFile(FBASENAME1, "ab+"); /* write + read + append */ @@ -277,7 +277,7 @@ main(int argc, char *argv[]) if (SDL_memcmp(test_buf, "123456789012345678901234567123", 30)) RWOP_ERR_QUIT(rwops); rwops->close(rwops); - printf("test5 OK\n"); + SDL_Log("test5 OK\n"); cleanup(); return 0; /* all ok */ } diff --git a/3rdparty/sdl2-2.0.4/test/testfilesystem.c b/3rdparty/sdl2-2.0.4/test/testfilesystem.c new file mode 100644 index 0000000000..abd301c0e0 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testfilesystem.c @@ -0,0 +1,52 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +/* Simple test of filesystem functions. */ + +#include +#include "SDL.h" + +int +main(int argc, char *argv[]) +{ + char *base_path; + char *pref_path; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (SDL_Init(0) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init() failed: %s\n", SDL_GetError()); + return 1; + } + + base_path = SDL_GetBasePath(); + if(base_path == NULL){ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find base path: %s\n", + SDL_GetError()); + return 0; + } + + SDL_Log("base path: '%s'\n", base_path); + SDL_free(base_path); + + pref_path = SDL_GetPrefPath("libsdl", "testfilesystem"); + if(pref_path == NULL){ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find pref path: %s\n", + SDL_GetError()); + return 0; + } + SDL_Log("pref path: '%s'\n", pref_path); + SDL_free(pref_path); + + SDL_Quit(); + return 0; +} diff --git a/3rdparty/sdl2-2.0.4/test/testgamecontroller.c b/3rdparty/sdl2-2.0.4/test/testgamecontroller.c new file mode 100644 index 0000000000..ec1dfd3229 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testgamecontroller.c @@ -0,0 +1,348 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple program to test the SDL game controller routines */ + +#include +#include +#include + +#include "SDL.h" + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#ifndef SDL_JOYSTICK_DISABLED + +#ifdef __IPHONEOS__ +#define SCREEN_WIDTH 480 +#define SCREEN_HEIGHT 320 +#else +#define SCREEN_WIDTH 512 +#define SCREEN_HEIGHT 317 +#endif + +/* This is indexed by SDL_GameControllerButton. */ +static const struct { int x; int y; } button_positions[] = { + {387, 167}, /* A */ + {431, 132}, /* B */ + {342, 132}, /* X */ + {389, 101}, /* Y */ + {174, 132}, /* BACK */ + {233, 132}, /* GUIDE */ + {289, 132}, /* START */ + {75, 154}, /* LEFTSTICK */ + {305, 230}, /* RIGHTSTICK */ + {77, 40}, /* LEFTSHOULDER */ + {396, 36}, /* RIGHTSHOULDER */ + {154, 188}, /* DPAD_UP */ + {154, 249}, /* DPAD_DOWN */ + {116, 217}, /* DPAD_LEFT */ + {186, 217}, /* DPAD_RIGHT */ +}; + +/* This is indexed by SDL_GameControllerAxis. */ +static const struct { int x; int y; double angle; } axis_positions[] = { + {75, 154, 0.0}, /* LEFTX */ + {75, 154, 90.0}, /* LEFTY */ + {305, 230, 0.0}, /* RIGHTX */ + {305, 230, 90.0}, /* RIGHTY */ + {91, 0, 90.0}, /* TRIGGERLEFT */ + {375, 0, 90.0}, /* TRIGGERRIGHT */ +}; + +SDL_Renderer *screen = NULL; +SDL_bool retval = SDL_FALSE; +SDL_bool done = SDL_FALSE; +SDL_Texture *background, *button, *axis; + +static SDL_Texture * +LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) +{ + SDL_Surface *temp = NULL; + SDL_Texture *texture = NULL; + + temp = SDL_LoadBMP(file); + if (temp == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError()); + } else { + /* Set transparent pixel as the pixel at (0,0) */ + if (transparent) { + if (temp->format->BytesPerPixel == 1) { + SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *)temp->pixels); + } else { + SDL_assert(!temp->format->palette); + SDL_assert(temp->format->BitsPerPixel == 24); + SDL_SetColorKey(temp, SDL_TRUE, (*(Uint32 *)temp->pixels) & 0x00FFFFFF); + } + } + + texture = SDL_CreateTextureFromSurface(renderer, temp); + if (!texture) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); + } + } + if (temp) { + SDL_FreeSurface(temp); + } + return texture; +} + +void +loop(void *arg) +{ + SDL_Event event; + int i; + SDL_GameController *gamecontroller = (SDL_GameController *)arg; + + /* blank screen, set up for drawing this frame. */ + SDL_SetRenderDrawColor(screen, 0xFF, 0xFF, 0xFF, SDL_ALPHA_OPAQUE); + SDL_RenderClear(screen); + SDL_RenderCopy(screen, background, NULL, NULL); + + while (SDL_PollEvent(&event)) { + switch (event.type) { + case SDL_KEYDOWN: + if (event.key.keysym.sym != SDLK_ESCAPE) { + break; + } + /* Fall through to signal quit */ + case SDL_QUIT: + done = SDL_TRUE; + break; + default: + break; + } + } + + /* Update visual controller state */ + for (i = 0; i < SDL_CONTROLLER_BUTTON_MAX; ++i) { + if (SDL_GameControllerGetButton(gamecontroller, (SDL_GameControllerButton)i) == SDL_PRESSED) { + const SDL_Rect dst = { button_positions[i].x, button_positions[i].y, 50, 50 }; + SDL_RenderCopyEx(screen, button, NULL, &dst, 0, NULL, 0); + } + } + + for (i = 0; i < SDL_CONTROLLER_AXIS_MAX; ++i) { + const Sint16 deadzone = 8000; /* !!! FIXME: real deadzone */ + const Sint16 value = SDL_GameControllerGetAxis(gamecontroller, (SDL_GameControllerAxis)(i)); + if (value < -deadzone) { + const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 }; + const double angle = axis_positions[i].angle; + SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, 0); + } else if (value > deadzone) { + const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 }; + const double angle = axis_positions[i].angle + 180.0; + SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, 0); + } + } + + SDL_RenderPresent(screen); + + if (!SDL_GameControllerGetAttached(gamecontroller)) { + done = SDL_TRUE; + retval = SDL_TRUE; /* keep going, wait for reattach. */ + } + +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +SDL_bool +WatchGameController(SDL_GameController * gamecontroller) +{ + const char *name = SDL_GameControllerName(gamecontroller); + const char *basetitle = "Game Controller Test: "; + const size_t titlelen = SDL_strlen(basetitle) + SDL_strlen(name) + 1; + char *title = (char *)SDL_malloc(titlelen); + SDL_Window *window = NULL; + + retval = SDL_FALSE; + done = SDL_FALSE; + + if (title) { + SDL_snprintf(title, titlelen, "%s%s", basetitle, name); + } + + /* Create a window to display controller state */ + window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, + SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH, + SCREEN_HEIGHT, 0); + if (window == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); + return SDL_FALSE; + } + + screen = SDL_CreateRenderer(window, -1, 0); + if (screen == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); + SDL_DestroyWindow(window); + return SDL_FALSE; + } + + SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0x00, SDL_ALPHA_OPAQUE); + SDL_RenderClear(screen); + SDL_RenderPresent(screen); + SDL_RaiseWindow(window); + + /* scale for platforms that don't give you the window size you asked for. */ + SDL_RenderSetLogicalSize(screen, SCREEN_WIDTH, SCREEN_HEIGHT); + + background = LoadTexture(screen, "controllermap.bmp", SDL_FALSE); + button = LoadTexture(screen, "button.bmp", SDL_TRUE); + axis = LoadTexture(screen, "axis.bmp", SDL_TRUE); + + if (!background || !button || !axis) { + SDL_DestroyRenderer(screen); + SDL_DestroyWindow(window); + return SDL_FALSE; + } + SDL_SetTextureColorMod(button, 10, 255, 21); + SDL_SetTextureColorMod(axis, 10, 255, 21); + + /* !!! FIXME: */ + /*SDL_RenderSetLogicalSize(screen, background->w, background->h);*/ + + /* Print info about the controller we are watching */ + SDL_Log("Watching controller %s\n", name ? name : "Unknown Controller"); + + /* Loop, getting controller events! */ +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop_arg(loop, gamecontroller, 0, 1); +#else + while (!done) { + loop(gamecontroller); + } +#endif + + SDL_DestroyRenderer(screen); + screen = NULL; + background = NULL; + button = NULL; + axis = NULL; + SDL_DestroyWindow(window); + return retval; +} + +int +main(int argc, char *argv[]) +{ + int i; + int nController = 0; + int retcode = 0; + char guid[64]; + SDL_GameController *gamecontroller; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize SDL (Note: video is required to start event loop) */ + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER ) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return 1; + } + + SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); + + /* Print information about the controller */ + for (i = 0; i < SDL_NumJoysticks(); ++i) { + const char *name; + const char *description; + + SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(i), + guid, sizeof (guid)); + + if ( SDL_IsGameController(i) ) + { + nController++; + name = SDL_GameControllerNameForIndex(i); + description = "Controller"; + } else { + name = SDL_JoystickNameForIndex(i); + description = "Joystick"; + } + SDL_Log("%s %d: %s (guid %s)\n", description, i, name ? name : "Unknown", guid); + } + SDL_Log("There are %d game controller(s) attached (%d joystick(s))\n", nController, SDL_NumJoysticks()); + + if (argv[1]) { + SDL_bool reportederror = SDL_FALSE; + SDL_bool keepGoing = SDL_TRUE; + SDL_Event event; + int device = atoi(argv[1]); + if (device >= SDL_NumJoysticks()) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%i is an invalid joystick index.\n", device); + retcode = 1; + } else { + SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(device), + guid, sizeof (guid)); + SDL_Log("Attempting to open device %i, guid %s\n", device, guid); + gamecontroller = SDL_GameControllerOpen(device); + + if (gamecontroller != NULL) { + SDL_assert(SDL_GameControllerFromInstanceID(SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(gamecontroller))) == gamecontroller); + } + + while (keepGoing) { + if (gamecontroller == NULL) { + if (!reportederror) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open gamecontroller %d: %s\n", device, SDL_GetError()); + retcode = 1; + keepGoing = SDL_FALSE; + reportederror = SDL_TRUE; + } + } else { + reportederror = SDL_FALSE; + keepGoing = WatchGameController(gamecontroller); + SDL_GameControllerClose(gamecontroller); + } + + gamecontroller = NULL; + if (keepGoing) { + SDL_Log("Waiting for attach\n"); + } + while (keepGoing) { + SDL_WaitEvent(&event); + if ((event.type == SDL_QUIT) || (event.type == SDL_FINGERDOWN) + || (event.type == SDL_MOUSEBUTTONDOWN)) { + keepGoing = SDL_FALSE; + } else if (event.type == SDL_CONTROLLERDEVICEADDED) { + gamecontroller = SDL_GameControllerOpen(event.cdevice.which); + if (gamecontroller != NULL) { + SDL_assert(SDL_GameControllerFromInstanceID(SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(gamecontroller))) == gamecontroller); + } + break; + } + } + } + } + } + + SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER); + + return retcode; +} + +#else + +int +main(int argc, char *argv[]) +{ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Joystick support.\n"); + exit(1); +} + +#endif diff --git a/3rdparty/sdl2-2.0.4/test/testgesture.c b/3rdparty/sdl2-2.0.4/test/testgesture.c new file mode 100644 index 0000000000..a289ce133a --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testgesture.c @@ -0,0 +1,310 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +/* Usage: + * Spacebar to begin recording a gesture on all touches. + * s to save all touches into "./gestureSave" + * l to load all touches from "./gestureSave" + */ + +#include "SDL.h" +#include /* for exit() */ + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#define WIDTH 640 +#define HEIGHT 480 +#define BPP 4 +#define DEPTH 32 + +/* MUST BE A POWER OF 2! */ +#define EVENT_BUF_SIZE 256 + + +#define VERBOSE 0 + +static SDL_Event events[EVENT_BUF_SIZE]; +static int eventWrite; + + +static int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF}; + +SDL_Surface *screen; +SDL_Window *window; +SDL_bool quitting = SDL_FALSE; + +typedef struct { + float x,y; +} Point; + +typedef struct { + float ang,r; + Point p; +} Knob; + +static Knob knob; + +void setpix(SDL_Surface *screen, float _x, float _y, unsigned int col) +{ + Uint32 *pixmem32; + Uint32 colour; + Uint8 r,g,b; + int x = (int)_x; + int y = (int)_y; + float a; + + if(x < 0 || x >= screen->w) return; + if(y < 0 || y >= screen->h) return; + + pixmem32 = (Uint32*) screen->pixels + y*screen->pitch/BPP + x; + + SDL_memcpy(&colour,pixmem32,screen->format->BytesPerPixel); + + SDL_GetRGB(colour,screen->format,&r,&g,&b); + /* r = 0;g = 0; b = 0; */ + a = (float)((col>>24)&0xFF); + if(a == 0) a = 0xFF; /* Hack, to make things easier. */ + a /= 0xFF; + r = (Uint8)(r*(1-a) + ((col>>16)&0xFF)*(a)); + g = (Uint8)(g*(1-a) + ((col>> 8)&0xFF)*(a)); + b = (Uint8)(b*(1-a) + ((col>> 0)&0xFF)*(a)); + colour = SDL_MapRGB( screen->format,r, g, b); + + + *pixmem32 = colour; +} + +void drawLine(SDL_Surface *screen,float x0,float y0,float x1,float y1,unsigned int col) { + float t; + for(t=0;t<1;t+=(float)(1.f/SDL_max(SDL_fabs(x0-x1),SDL_fabs(y0-y1)))) + setpix(screen,x1+t*(x0-x1),y1+t*(y0-y1),col); +} + +void drawCircle(SDL_Surface* screen,float x,float y,float r,unsigned int c) +{ + float tx,ty; + float xr; + for(ty = (float)-SDL_fabs(r);ty <= (float)SDL_fabs((int)r);ty++) { + xr = (float)SDL_sqrt(r*r - ty*ty); + if(r > 0) { /* r > 0 ==> filled circle */ + for(tx=-xr+.5f;tx<=xr-.5;tx++) { + setpix(screen,x+tx,y+ty,c); + } + } + else { + setpix(screen,x-xr+.5f,y+ty,c); + setpix(screen,x+xr-.5f,y+ty,c); + } + } +} + +void drawKnob(SDL_Surface* screen,Knob k) { + drawCircle(screen,k.p.x*screen->w,k.p.y*screen->h,k.r*screen->w,0xFFFFFF); + drawCircle(screen,(k.p.x+k.r/2*SDL_cosf(k.ang))*screen->w, + (k.p.y+k.r/2*SDL_sinf(k.ang))*screen->h,k.r/4*screen->w,0); +} + +void DrawScreen(SDL_Surface* screen, SDL_Window* window) +{ + int i; +#if 1 + SDL_FillRect(screen, NULL, 0); +#else + int x, y; + for(y = 0;y < screen->h;y++) + for(x = 0;x < screen->w;x++) + setpix(screen,(float)x,(float)y,((x%255)<<16) + ((y%255)<<8) + (x+y)%255); +#endif + + /* draw Touch History */ + for(i = eventWrite; i < eventWrite+EVENT_BUF_SIZE; ++i) { + const SDL_Event *event = &events[i&(EVENT_BUF_SIZE-1)]; + float age = (float)(i - eventWrite) / EVENT_BUF_SIZE; + float x, y; + unsigned int c, col; + + if(event->type == SDL_FINGERMOTION || + event->type == SDL_FINGERDOWN || + event->type == SDL_FINGERUP) { + x = event->tfinger.x; + y = event->tfinger.y; + + /* draw the touch: */ + c = colors[event->tfinger.fingerId%7]; + col = ((unsigned int)(c*(.1+.85))) | (unsigned int)(0xFF*age)<<24; + + if(event->type == SDL_FINGERMOTION) + drawCircle(screen,x*screen->w,y*screen->h,5,col); + else if(event->type == SDL_FINGERDOWN) + drawCircle(screen,x*screen->w,y*screen->h,-10,col); + } + } + + if(knob.p.x > 0) + drawKnob(screen,knob); + + SDL_UpdateWindowSurface(window); +} + +/* Returns a new SDL_Window if window is NULL or window if not. */ +SDL_Window* initWindow(SDL_Window *window, int width,int height) +{ + if (!window) { + window = SDL_CreateWindow("Gesture Test", + SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, + width, height, SDL_WINDOW_RESIZABLE); + } + return window; +} + +void loop() +{ + SDL_Event event; + SDL_RWops *stream; + + while(SDL_PollEvent(&event)) + { + /* Record _all_ events */ + events[eventWrite & (EVENT_BUF_SIZE-1)] = event; + eventWrite++; + + switch (event.type) + { + case SDL_QUIT: + quitting = SDL_TRUE; + break; + case SDL_KEYDOWN: + switch (event.key.keysym.sym) + { + case SDLK_i: + { + int i; + for (i = 0; i < SDL_GetNumTouchDevices(); ++i) { + SDL_TouchID id = SDL_GetTouchDevice(i); + SDL_Log("Fingers Down on device %"SDL_PRIs64": %d", id, SDL_GetNumTouchFingers(id)); + } + break; + } + case SDLK_SPACE: + SDL_RecordGesture(-1); + break; + case SDLK_s: + stream = SDL_RWFromFile("gestureSave", "w"); + SDL_Log("Wrote %i templates", SDL_SaveAllDollarTemplates(stream)); + SDL_RWclose(stream); + break; + case SDLK_l: + stream = SDL_RWFromFile("gestureSave", "r"); + SDL_Log("Loaded: %i", SDL_LoadDollarTemplates(-1, stream)); + SDL_RWclose(stream); + break; + case SDLK_ESCAPE: + quitting = SDL_TRUE; + break; + } + break; + case SDL_WINDOWEVENT: + if (event.window.event == SDL_WINDOWEVENT_RESIZED) { + if (!(window = initWindow(window, event.window.data1, event.window.data2)) || + !(screen = SDL_GetWindowSurface(window))) + { + SDL_Quit(); + exit(1); + } + } + break; + case SDL_FINGERMOTION: +#if VERBOSE + SDL_Log("Finger: %"SDL_PRIs64",x: %f, y: %f",event.tfinger.fingerId, + event.tfinger.x,event.tfinger.y); +#endif + break; + case SDL_FINGERDOWN: +#if VERBOSE + SDL_Log("Finger: %"SDL_PRIs64" down - x: %f, y: %f", + event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); +#endif + break; + case SDL_FINGERUP: +#if VERBOSE + SDL_Log("Finger: %"SDL_PRIs64" up - x: %f, y: %f", + event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); +#endif + break; + case SDL_MULTIGESTURE: +#if VERBOSE + SDL_Log("Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f", + event.mgesture.x, + event.mgesture.y, + event.mgesture.dTheta, + event.mgesture.dDist); + SDL_Log("MG: numDownTouch = %i",event.mgesture.numFingers); +#endif + knob.p.x = event.mgesture.x; + knob.p.y = event.mgesture.y; + knob.ang += event.mgesture.dTheta; + knob.r += event.mgesture.dDist; + break; + case SDL_DOLLARGESTURE: + SDL_Log("Gesture %"SDL_PRIs64" performed, error: %f", + event.dgesture.gestureId, + event.dgesture.error); + break; + case SDL_DOLLARRECORD: + SDL_Log("Recorded gesture: %"SDL_PRIs64"",event.dgesture.gestureId); + break; + } + } + DrawScreen(screen, window); + +#ifdef __EMSCRIPTEN__ + if (quitting) { + emscripten_cancel_main_loop(); + } +#endif +} + +int main(int argc, char* argv[]) +{ + window = NULL; + screen = NULL; + quitting = SDL_FALSE; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* gesture variables */ + knob.r = .1f; + knob.ang = 0; + + if (SDL_Init(SDL_INIT_VIDEO) < 0 ) return 1; + + if (!(window = initWindow(window, WIDTH, HEIGHT)) || + !(screen = SDL_GetWindowSurface(window))) + { + SDL_Quit(); + return 1; + } + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while(!quitting) { + loop(); + } +#endif + + SDL_Quit(); + return 0; +} + diff --git a/3rdparty/sdl2-2.0.4/test/testgl2.c b/3rdparty/sdl2-2.0.4/test/testgl2.c new file mode 100644 index 0000000000..74147f9fb9 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testgl2.c @@ -0,0 +1,416 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +#include +#include +#include +#include + +#include "SDL_test_common.h" + +#ifdef __MACOS__ +#define HAVE_OPENGL +#endif + +#ifdef HAVE_OPENGL + +#include "SDL_opengl.h" + +typedef struct GL_Context +{ +#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#include "../src/render/opengl/SDL_glfuncs.h" +#undef SDL_PROC +} GL_Context; + + +/* Undefine this if you want a flat cube instead of a rainbow cube */ +#define SHADED_CUBE + +static SDLTest_CommonState *state; +static SDL_GLContext context; +static GL_Context ctx; + +static int LoadContext(GL_Context * data) +{ +#if SDL_VIDEO_DRIVER_UIKIT +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_ANDROID +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_PANDORA +#define __SDL_NOGETPROCADDR__ +#endif + +#if defined __SDL_NOGETPROCADDR__ +#define SDL_PROC(ret,func,params) data->func=func; +#else +#define SDL_PROC(ret,func,params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if ( ! data->func ) { \ + return SDL_SetError("Couldn't load GL function %s: %s\n", #func, SDL_GetError()); \ + } \ + } while ( 0 ); +#endif /* __SDL_NOGETPROCADDR__ */ + +#include "../src/render/opengl/SDL_glfuncs.h" +#undef SDL_PROC + return 0; +} + + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + if (context) { + /* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */ + SDL_GL_DeleteContext(context); + } + SDLTest_CommonQuit(state); + exit(rc); +} + +static void +Render() +{ + static float color[8][3] = { + {1.0, 1.0, 0.0}, + {1.0, 0.0, 0.0}, + {0.0, 0.0, 0.0}, + {0.0, 1.0, 0.0}, + {0.0, 1.0, 1.0}, + {1.0, 1.0, 1.0}, + {1.0, 0.0, 1.0}, + {0.0, 0.0, 1.0} + }; + static float cube[8][3] = { + {0.5, 0.5, -0.5}, + {0.5, -0.5, -0.5}, + {-0.5, -0.5, -0.5}, + {-0.5, 0.5, -0.5}, + {-0.5, 0.5, 0.5}, + {0.5, 0.5, 0.5}, + {0.5, -0.5, 0.5}, + {-0.5, -0.5, 0.5} + }; + + /* Do our drawing, too. */ + ctx.glClearColor(0.0, 0.0, 0.0, 1.0); + ctx.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + ctx.glBegin(GL_QUADS); + +#ifdef SHADED_CUBE + ctx.glColor3fv(color[0]); + ctx.glVertex3fv(cube[0]); + ctx.glColor3fv(color[1]); + ctx.glVertex3fv(cube[1]); + ctx.glColor3fv(color[2]); + ctx.glVertex3fv(cube[2]); + ctx.glColor3fv(color[3]); + ctx.glVertex3fv(cube[3]); + + ctx.glColor3fv(color[3]); + ctx.glVertex3fv(cube[3]); + ctx.glColor3fv(color[4]); + ctx.glVertex3fv(cube[4]); + ctx.glColor3fv(color[7]); + ctx.glVertex3fv(cube[7]); + ctx.glColor3fv(color[2]); + ctx.glVertex3fv(cube[2]); + + ctx.glColor3fv(color[0]); + ctx.glVertex3fv(cube[0]); + ctx.glColor3fv(color[5]); + ctx.glVertex3fv(cube[5]); + ctx.glColor3fv(color[6]); + ctx.glVertex3fv(cube[6]); + ctx.glColor3fv(color[1]); + ctx.glVertex3fv(cube[1]); + + ctx.glColor3fv(color[5]); + ctx.glVertex3fv(cube[5]); + ctx.glColor3fv(color[4]); + ctx.glVertex3fv(cube[4]); + ctx.glColor3fv(color[7]); + ctx.glVertex3fv(cube[7]); + ctx.glColor3fv(color[6]); + ctx.glVertex3fv(cube[6]); + + ctx.glColor3fv(color[5]); + ctx.glVertex3fv(cube[5]); + ctx.glColor3fv(color[0]); + ctx.glVertex3fv(cube[0]); + ctx.glColor3fv(color[3]); + ctx.glVertex3fv(cube[3]); + ctx.glColor3fv(color[4]); + ctx.glVertex3fv(cube[4]); + + ctx.glColor3fv(color[6]); + ctx.glVertex3fv(cube[6]); + ctx.glColor3fv(color[1]); + ctx.glVertex3fv(cube[1]); + ctx.glColor3fv(color[2]); + ctx.glVertex3fv(cube[2]); + ctx.glColor3fv(color[7]); + ctx.glVertex3fv(cube[7]); +#else /* flat cube */ + ctx.glColor3f(1.0, 0.0, 0.0); + ctx.glVertex3fv(cube[0]); + ctx.glVertex3fv(cube[1]); + ctx.glVertex3fv(cube[2]); + ctx.glVertex3fv(cube[3]); + + ctx.glColor3f(0.0, 1.0, 0.0); + ctx.glVertex3fv(cube[3]); + ctx.glVertex3fv(cube[4]); + ctx.glVertex3fv(cube[7]); + ctx.glVertex3fv(cube[2]); + + ctx.glColor3f(0.0, 0.0, 1.0); + ctx.glVertex3fv(cube[0]); + ctx.glVertex3fv(cube[5]); + ctx.glVertex3fv(cube[6]); + ctx.glVertex3fv(cube[1]); + + ctx.glColor3f(0.0, 1.0, 1.0); + ctx.glVertex3fv(cube[5]); + ctx.glVertex3fv(cube[4]); + ctx.glVertex3fv(cube[7]); + ctx.glVertex3fv(cube[6]); + + ctx.glColor3f(1.0, 1.0, 0.0); + ctx.glVertex3fv(cube[5]); + ctx.glVertex3fv(cube[0]); + ctx.glVertex3fv(cube[3]); + ctx.glVertex3fv(cube[4]); + + ctx.glColor3f(1.0, 0.0, 1.0); + ctx.glVertex3fv(cube[6]); + ctx.glVertex3fv(cube[1]); + ctx.glVertex3fv(cube[2]); + ctx.glVertex3fv(cube[7]); +#endif /* SHADED_CUBE */ + + ctx.glEnd(); + + ctx.glMatrixMode(GL_MODELVIEW); + ctx.glRotatef(5.0, 1.0, 1.0, 1.0); +} + +int +main(int argc, char *argv[]) +{ + int fsaa, accel; + int value; + int i, done; + SDL_DisplayMode mode; + SDL_Event event; + Uint32 then, now, frames; + int status; + int dw, dh; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize parameters */ + fsaa = 0; + accel = -1; + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + if (consumed == 0) { + if (SDL_strcasecmp(argv[i], "--fsaa") == 0 && i+1 < argc) { + fsaa = atoi(argv[i+1]); + consumed = 2; + } else if (SDL_strcasecmp(argv[i], "--accel") == 0 && i+1 < argc) { + accel = atoi(argv[i+1]); + consumed = 2; + } else { + consumed = -1; + } + } + if (consumed < 0) { + SDL_Log("Usage: %s %s [--fsaa n] [--accel n]\n", argv[0], + SDLTest_CommonUsage(state)); + quit(1); + } + i += consumed; + } + + /* Set OpenGL parameters */ + state->window_flags |= SDL_WINDOW_OPENGL; + state->gl_red_size = 5; + state->gl_green_size = 5; + state->gl_blue_size = 5; + state->gl_depth_size = 16; + state->gl_double_buffer = 1; + if (fsaa) { + state->gl_multisamplebuffers = 1; + state->gl_multisamplesamples = fsaa; + } + if (accel >= 0) { + state->gl_accelerated = accel; + } + + if (!SDLTest_CommonInit(state)) { + quit(2); + } + + /* Create OpenGL context */ + context = SDL_GL_CreateContext(state->windows[0]); + if (!context) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_GL_CreateContext(): %s\n", SDL_GetError()); + quit(2); + } + + /* Important: call this *after* creating the context */ + if (LoadContext(&ctx) < 0) { + SDL_Log("Could not load GL functions\n"); + quit(2); + return 0; + } + + if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) { + /* try late-swap-tearing first. If not supported, try normal vsync. */ + if (SDL_GL_SetSwapInterval(-1) == -1) { + SDL_GL_SetSwapInterval(1); + } + } else { + SDL_GL_SetSwapInterval(0); /* disable vsync. */ + } + + SDL_GetCurrentDisplayMode(0, &mode); + SDL_Log("Screen BPP : %d\n", SDL_BITSPERPIXEL(mode.format)); + SDL_Log("Swap Interval : %d\n", SDL_GL_GetSwapInterval()); + SDL_GetWindowSize(state->windows[0], &dw, &dh); + SDL_Log("Window Size : %d,%d\n", dw, dh); + SDL_GL_GetDrawableSize(state->windows[0], &dw, &dh); + SDL_Log("Draw Size : %d,%d\n", dw, dh); + SDL_Log("\n"); + SDL_Log("Vendor : %s\n", ctx.glGetString(GL_VENDOR)); + SDL_Log("Renderer : %s\n", ctx.glGetString(GL_RENDERER)); + SDL_Log("Version : %s\n", ctx.glGetString(GL_VERSION)); + SDL_Log("Extensions : %s\n", ctx.glGetString(GL_EXTENSIONS)); + SDL_Log("\n"); + + status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_RED_SIZE: %s\n", SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_GREEN_SIZE: %s\n", SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_BLUE_SIZE: %s\n", SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", 16, value); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_DEPTH_SIZE: %s\n", SDL_GetError()); + } + if (fsaa) { + status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value); + if (!status) { + SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); + if (!status) { + SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, + value); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", + SDL_GetError()); + } + } + if (accel >= 0) { + status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value); + if (!status) { + SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested %d, got %d\n", accel, + value); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", + SDL_GetError()); + } + } + + /* Set rendering settings */ + ctx.glMatrixMode(GL_PROJECTION); + ctx.glLoadIdentity(); + ctx.glOrtho(-2.0, 2.0, -2.0, 2.0, -20.0, 20.0); + ctx.glMatrixMode(GL_MODELVIEW); + ctx.glLoadIdentity(); + ctx.glEnable(GL_DEPTH_TEST); + ctx.glDepthFunc(GL_LESS); + ctx.glShadeModel(GL_SMOOTH); + + /* Main render loop */ + frames = 0; + then = SDL_GetTicks(); + done = 0; + while (!done) { + /* Check for events */ + ++frames; + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + for (i = 0; i < state->num_windows; ++i) { + int w, h; + if (state->windows[i] == NULL) + continue; + SDL_GL_MakeCurrent(state->windows[i], context); + SDL_GL_GetDrawableSize(state->windows[i], &w, &h); + ctx.glViewport(0, 0, w, h); + Render(); + SDL_GL_SwapWindow(state->windows[i]); + } + } + + /* Print out some timing information */ + now = SDL_GetTicks(); + if (now > then) { + SDL_Log("%2.2f frames per second\n", + ((double) frames * 1000) / (now - then)); + } + quit(0); + return 0; +} + +#else /* HAVE_OPENGL */ + +int +main(int argc, char *argv[]) +{ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No OpenGL support on this system\n"); + return 1; +} + +#endif /* HAVE_OPENGL */ diff --git a/3rdparty/sdl2-2.0.0/test/testgles.c b/3rdparty/sdl2-2.0.4/test/testgles.c similarity index 76% rename from 3rdparty/sdl2-2.0.0/test/testgles.c rename to 3rdparty/sdl2-2.0.4/test/testgles.c index 41312a8bba..291661a09d 100644 --- a/3rdparty/sdl2-2.0.0/test/testgles.c +++ b/3rdparty/sdl2-2.0.4/test/testgles.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -110,6 +110,9 @@ main(int argc, char *argv[]) Uint32 then, now, frames; int status; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + /* Initialize parameters */ fsaa = 0; accel = 0; @@ -143,7 +146,7 @@ main(int argc, char *argv[]) } } if (consumed < 0) { - fprintf(stderr, "Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0], + SDL_Log("Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0], SDLTest_CommonUsage(state)); quit(1); } @@ -156,6 +159,9 @@ main(int argc, char *argv[]) state->gl_green_size = 5; state->gl_blue_size = 5; state->gl_depth_size = depth; + state->gl_major_version = 1; + state->gl_minor_version = 1; + state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES; if (fsaa) { state->gl_multisamplebuffers=1; state->gl_multisamplesamples=fsaa; @@ -169,7 +175,7 @@ main(int argc, char *argv[]) context = SDL_calloc(state->num_windows, sizeof(context)); if (context == NULL) { - fprintf(stderr, "Out of memory!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } @@ -177,7 +183,7 @@ main(int argc, char *argv[]) for (i = 0; i < state->num_windows; i++) { context[i] = SDL_GL_CreateContext(state->windows[i]); if (!context[i]) { - fprintf(stderr, "SDL_GL_CreateContext(): %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_GL_CreateContext(): %s\n", SDL_GetError()); quit(2); } } @@ -189,65 +195,65 @@ main(int argc, char *argv[]) } SDL_GetCurrentDisplayMode(0, &mode); - printf("Screen bpp: %d\n", SDL_BITSPERPIXEL(mode.format)); - printf("\n"); - printf("Vendor : %s\n", glGetString(GL_VENDOR)); - printf("Renderer : %s\n", glGetString(GL_RENDERER)); - printf("Version : %s\n", glGetString(GL_VERSION)); - printf("Extensions : %s\n", glGetString(GL_EXTENSIONS)); - printf("\n"); + SDL_Log("Screen bpp: %d\n", SDL_BITSPERPIXEL(mode.format)); + SDL_Log("\n"); + SDL_Log("Vendor : %s\n", glGetString(GL_VENDOR)); + SDL_Log("Renderer : %s\n", glGetString(GL_RENDERER)); + SDL_Log("Version : %s\n", glGetString(GL_VERSION)); + SDL_Log("Extensions : %s\n", glGetString(GL_EXTENSIONS)); + SDL_Log("\n"); status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); if (!status) { - printf("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); + SDL_Log("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); } else { - fprintf(stderr, "Failed to get SDL_GL_RED_SIZE: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_RED_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); if (!status) { - printf("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); + SDL_Log("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); } else { - fprintf(stderr, "Failed to get SDL_GL_GREEN_SIZE: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_GREEN_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); if (!status) { - printf("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); + SDL_Log("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); } else { - fprintf(stderr, "Failed to get SDL_GL_BLUE_SIZE: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_BLUE_SIZE: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); if (!status) { - printf("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value); + SDL_Log("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value); } else { - fprintf(stderr, "Failed to get SDL_GL_DEPTH_SIZE: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_DEPTH_SIZE: %s\n", SDL_GetError()); } if (fsaa) { status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value); if (!status) { - printf("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); + SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); } else { - fprintf(stderr, "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", SDL_GetError()); } status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); if (!status) { - printf("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, + SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, value); } else { - fprintf(stderr, "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", SDL_GetError()); } } if (accel) { status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value); if (!status) { - printf("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); + SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); } else { - fprintf(stderr, "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", SDL_GetError()); } } @@ -258,7 +264,7 @@ main(int argc, char *argv[]) status = SDL_GL_MakeCurrent(state->windows[i], context[i]); if (status) { - printf("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); /* Continue for next window */ continue; @@ -292,7 +298,7 @@ main(int argc, char *argv[]) if (event.window.windowID == SDL_GetWindowID(state->windows[i])) { status = SDL_GL_MakeCurrent(state->windows[i], context[i]); if (status) { - printf("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); break; } /* Change view port to the new window dimensions */ @@ -309,9 +315,11 @@ main(int argc, char *argv[]) SDLTest_CommonEvent(state, &event, &done); } for (i = 0; i < state->num_windows; ++i) { + if (state->windows[i] == NULL) + continue; status = SDL_GL_MakeCurrent(state->windows[i], context[i]); if (status) { - printf("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); /* Continue for next window */ continue; @@ -324,10 +332,12 @@ main(int argc, char *argv[]) /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { - printf("%2.2f frames per second\n", + SDL_Log("%2.2f frames per second\n", ((double) frames * 1000) / (now - then)); } +#if !defined(__ANDROID__) quit(0); +#endif return 0; } @@ -336,7 +346,7 @@ main(int argc, char *argv[]) int main(int argc, char *argv[]) { - printf("No OpenGL ES support on this system\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No OpenGL ES support on this system\n"); return 1; } diff --git a/3rdparty/sdl2-2.0.4/test/testgles2.c b/3rdparty/sdl2-2.0.4/test/testgles2.c new file mode 100644 index 0000000000..af5962ba48 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testgles2.c @@ -0,0 +1,731 @@ +/* + Copyright (r) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +#include +#include +#include +#include + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#include "SDL_test_common.h" + +#if defined(__IPHONEOS__) || defined(__ANDROID__) || defined(__EMSCRIPTEN__) || defined(__NACL__) +#define HAVE_OPENGLES2 +#endif + +#ifdef HAVE_OPENGLES2 + +#include "SDL_opengles2.h" + +typedef struct GLES2_Context +{ +#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; +#include "../src/render/opengles2/SDL_gles2funcs.h" +#undef SDL_PROC +} GLES2_Context; + + +static SDLTest_CommonState *state; +static SDL_GLContext *context = NULL; +static int depth = 16; +static GLES2_Context ctx; + +static int LoadContext(GLES2_Context * data) +{ +#if SDL_VIDEO_DRIVER_UIKIT +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_ANDROID +#define __SDL_NOGETPROCADDR__ +#elif SDL_VIDEO_DRIVER_PANDORA +#define __SDL_NOGETPROCADDR__ +#endif + +#if defined __SDL_NOGETPROCADDR__ +#define SDL_PROC(ret,func,params) data->func=func; +#else +#define SDL_PROC(ret,func,params) \ + do { \ + data->func = SDL_GL_GetProcAddress(#func); \ + if ( ! data->func ) { \ + return SDL_SetError("Couldn't load GLES2 function %s: %s\n", #func, SDL_GetError()); \ + } \ + } while ( 0 ); +#endif /* __SDL_NOGETPROCADDR__ */ + +#include "../src/render/opengles2/SDL_gles2funcs.h" +#undef SDL_PROC + return 0; +} + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + int i; + + if (context != NULL) { + for (i = 0; i < state->num_windows; i++) { + if (context[i]) { + SDL_GL_DeleteContext(context[i]); + } + } + + SDL_free(context); + } + + SDLTest_CommonQuit(state); + exit(rc); +} + +#define GL_CHECK(x) \ + x; \ + { \ + GLenum glError = ctx.glGetError(); \ + if(glError != GL_NO_ERROR) { \ + SDL_Log("glGetError() = %i (0x%.8x) at line %i\n", glError, glError, __LINE__); \ + quit(1); \ + } \ + } + +/* + * Simulates desktop's glRotatef. The matrix is returned in column-major + * order. + */ +static void +rotate_matrix(float angle, float x, float y, float z, float *r) +{ + float radians, c, s, c1, u[3], length; + int i, j; + + radians = (float)(angle * M_PI) / 180.0f; + + c = SDL_cosf(radians); + s = SDL_sinf(radians); + + c1 = 1.0f - SDL_cosf(radians); + + length = (float)SDL_sqrt(x * x + y * y + z * z); + + u[0] = x / length; + u[1] = y / length; + u[2] = z / length; + + for (i = 0; i < 16; i++) { + r[i] = 0.0; + } + + r[15] = 1.0; + + for (i = 0; i < 3; i++) { + r[i * 4 + (i + 1) % 3] = u[(i + 2) % 3] * s; + r[i * 4 + (i + 2) % 3] = -u[(i + 1) % 3] * s; + } + + for (i = 0; i < 3; i++) { + for (j = 0; j < 3; j++) { + r[i * 4 + j] += c1 * u[i] * u[j] + (i == j ? c : 0.0f); + } + } +} + +/* + * Simulates gluPerspectiveMatrix + */ +static void +perspective_matrix(float fovy, float aspect, float znear, float zfar, float *r) +{ + int i; + float f; + + f = 1.0f/SDL_tanf(fovy * 0.5f); + + for (i = 0; i < 16; i++) { + r[i] = 0.0; + } + + r[0] = f / aspect; + r[5] = f; + r[10] = (znear + zfar) / (znear - zfar); + r[11] = -1.0f; + r[14] = (2.0f * znear * zfar) / (znear - zfar); + r[15] = 0.0f; +} + +/* + * Multiplies lhs by rhs and writes out to r. All matrices are 4x4 and column + * major. In-place multiplication is supported. + */ +static void +multiply_matrix(float *lhs, float *rhs, float *r) +{ + int i, j, k; + float tmp[16]; + + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + tmp[j * 4 + i] = 0.0; + + for (k = 0; k < 4; k++) { + tmp[j * 4 + i] += lhs[k * 4 + i] * rhs[j * 4 + k]; + } + } + } + + for (i = 0; i < 16; i++) { + r[i] = tmp[i]; + } +} + +/* + * Create shader, load in source, compile, dump debug as necessary. + * + * shader: Pointer to return created shader ID. + * source: Passed-in shader source code. + * shader_type: Passed to GL, e.g. GL_VERTEX_SHADER. + */ +void +process_shader(GLuint *shader, const char * source, GLint shader_type) +{ + GLint status = GL_FALSE; + const char *shaders[1] = { NULL }; + char buffer[1024]; + GLsizei length; + + /* Create shader and load into GL. */ + *shader = GL_CHECK(ctx.glCreateShader(shader_type)); + + shaders[0] = source; + + GL_CHECK(ctx.glShaderSource(*shader, 1, shaders, NULL)); + + /* Clean up shader source. */ + shaders[0] = NULL; + + /* Try compiling the shader. */ + GL_CHECK(ctx.glCompileShader(*shader)); + GL_CHECK(ctx.glGetShaderiv(*shader, GL_COMPILE_STATUS, &status)); + + /* Dump debug info (source and log) if compilation failed. */ + if(status != GL_TRUE) { + ctx.glGetProgramInfoLog(*shader, sizeof(buffer), &length, &buffer[0]); + buffer[length] = '\0'; + SDL_Log("Shader compilation failed: %s", buffer);fflush(stderr); + quit(-1); + } +} + +/* 3D data. Vertex range -0.5..0.5 in all axes. +* Z -0.5 is near, 0.5 is far. */ +const float _vertices[] = +{ + /* Front face. */ + /* Bottom left */ + -0.5, 0.5, -0.5, + 0.5, -0.5, -0.5, + -0.5, -0.5, -0.5, + /* Top right */ + -0.5, 0.5, -0.5, + 0.5, 0.5, -0.5, + 0.5, -0.5, -0.5, + /* Left face */ + /* Bottom left */ + -0.5, 0.5, 0.5, + -0.5, -0.5, -0.5, + -0.5, -0.5, 0.5, + /* Top right */ + -0.5, 0.5, 0.5, + -0.5, 0.5, -0.5, + -0.5, -0.5, -0.5, + /* Top face */ + /* Bottom left */ + -0.5, 0.5, 0.5, + 0.5, 0.5, -0.5, + -0.5, 0.5, -0.5, + /* Top right */ + -0.5, 0.5, 0.5, + 0.5, 0.5, 0.5, + 0.5, 0.5, -0.5, + /* Right face */ + /* Bottom left */ + 0.5, 0.5, -0.5, + 0.5, -0.5, 0.5, + 0.5, -0.5, -0.5, + /* Top right */ + 0.5, 0.5, -0.5, + 0.5, 0.5, 0.5, + 0.5, -0.5, 0.5, + /* Back face */ + /* Bottom left */ + 0.5, 0.5, 0.5, + -0.5, -0.5, 0.5, + 0.5, -0.5, 0.5, + /* Top right */ + 0.5, 0.5, 0.5, + -0.5, 0.5, 0.5, + -0.5, -0.5, 0.5, + /* Bottom face */ + /* Bottom left */ + -0.5, -0.5, -0.5, + 0.5, -0.5, 0.5, + -0.5, -0.5, 0.5, + /* Top right */ + -0.5, -0.5, -0.5, + 0.5, -0.5, -0.5, + 0.5, -0.5, 0.5, +}; + +const float _colors[] = +{ + /* Front face */ + /* Bottom left */ + 1.0, 0.0, 0.0, /* red */ + 0.0, 0.0, 1.0, /* blue */ + 0.0, 1.0, 0.0, /* green */ + /* Top right */ + 1.0, 0.0, 0.0, /* red */ + 1.0, 1.0, 0.0, /* yellow */ + 0.0, 0.0, 1.0, /* blue */ + /* Left face */ + /* Bottom left */ + 1.0, 1.0, 1.0, /* white */ + 0.0, 1.0, 0.0, /* green */ + 0.0, 1.0, 1.0, /* cyan */ + /* Top right */ + 1.0, 1.0, 1.0, /* white */ + 1.0, 0.0, 0.0, /* red */ + 0.0, 1.0, 0.0, /* green */ + /* Top face */ + /* Bottom left */ + 1.0, 1.0, 1.0, /* white */ + 1.0, 1.0, 0.0, /* yellow */ + 1.0, 0.0, 0.0, /* red */ + /* Top right */ + 1.0, 1.0, 1.0, /* white */ + 0.0, 0.0, 0.0, /* black */ + 1.0, 1.0, 0.0, /* yellow */ + /* Right face */ + /* Bottom left */ + 1.0, 1.0, 0.0, /* yellow */ + 1.0, 0.0, 1.0, /* magenta */ + 0.0, 0.0, 1.0, /* blue */ + /* Top right */ + 1.0, 1.0, 0.0, /* yellow */ + 0.0, 0.0, 0.0, /* black */ + 1.0, 0.0, 1.0, /* magenta */ + /* Back face */ + /* Bottom left */ + 0.0, 0.0, 0.0, /* black */ + 0.0, 1.0, 1.0, /* cyan */ + 1.0, 0.0, 1.0, /* magenta */ + /* Top right */ + 0.0, 0.0, 0.0, /* black */ + 1.0, 1.0, 1.0, /* white */ + 0.0, 1.0, 1.0, /* cyan */ + /* Bottom face */ + /* Bottom left */ + 0.0, 1.0, 0.0, /* green */ + 1.0, 0.0, 1.0, /* magenta */ + 0.0, 1.0, 1.0, /* cyan */ + /* Top right */ + 0.0, 1.0, 0.0, /* green */ + 0.0, 0.0, 1.0, /* blue */ + 1.0, 0.0, 1.0, /* magenta */ +}; + +const char* _shader_vert_src = +" attribute vec4 av4position; " +" attribute vec3 av3color; " +" uniform mat4 mvp; " +" varying vec3 vv3color; " +" void main() { " +" vv3color = av3color; " +" gl_Position = mvp * av4position; " +" } "; + +const char* _shader_frag_src = +" precision lowp float; " +" varying vec3 vv3color; " +" void main() { " +" gl_FragColor = vec4(vv3color, 1.0); " +" } "; + +typedef struct shader_data +{ + GLuint shader_program, shader_frag, shader_vert; + + GLint attr_position; + GLint attr_color, attr_mvp; + + int angle_x, angle_y, angle_z; + +} shader_data; + +static void +Render(unsigned int width, unsigned int height, shader_data* data) +{ + float matrix_rotate[16], matrix_modelview[16], matrix_perspective[16], matrix_mvp[16]; + + /* + * Do some rotation with Euler angles. It is not a fixed axis as + * quaterions would be, but the effect is cool. + */ + rotate_matrix((float)data->angle_x, 1.0f, 0.0f, 0.0f, matrix_modelview); + rotate_matrix((float)data->angle_y, 0.0f, 1.0f, 0.0f, matrix_rotate); + + multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview); + + rotate_matrix((float)data->angle_z, 0.0f, 1.0f, 0.0f, matrix_rotate); + + multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview); + + /* Pull the camera back from the cube */ + matrix_modelview[14] -= 2.5; + + perspective_matrix(45.0f, (float)width/height, 0.01f, 100.0f, matrix_perspective); + multiply_matrix(matrix_perspective, matrix_modelview, matrix_mvp); + + GL_CHECK(ctx.glUniformMatrix4fv(data->attr_mvp, 1, GL_FALSE, matrix_mvp)); + + data->angle_x += 3; + data->angle_y += 2; + data->angle_z += 1; + + if(data->angle_x >= 360) data->angle_x -= 360; + if(data->angle_x < 0) data->angle_x += 360; + if(data->angle_y >= 360) data->angle_y -= 360; + if(data->angle_y < 0) data->angle_y += 360; + if(data->angle_z >= 360) data->angle_z -= 360; + if(data->angle_z < 0) data->angle_z += 360; + + GL_CHECK(ctx.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)); + GL_CHECK(ctx.glDrawArrays(GL_TRIANGLES, 0, 36)); +} + +int done; +Uint32 frames; +shader_data *datas; + +void loop() +{ + SDL_Event event; + int i; + int status; + + /* Check for events */ + ++frames; + while (SDL_PollEvent(&event) && !done) { + switch (event.type) { + case SDL_WINDOWEVENT: + switch (event.window.event) { + case SDL_WINDOWEVENT_RESIZED: + for (i = 0; i < state->num_windows; ++i) { + if (event.window.windowID == SDL_GetWindowID(state->windows[i])) { + int w, h; + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + break; + } + /* Change view port to the new window dimensions */ + SDL_GL_GetDrawableSize(state->windows[i], &w, &h); + ctx.glViewport(0, 0, w, h); + state->window_w = event.window.data1; + state->window_h = event.window.data2; + /* Update window content */ + Render(event.window.data1, event.window.data2, &datas[i]); + SDL_GL_SwapWindow(state->windows[i]); + break; + } + } + break; + } + } + SDLTest_CommonEvent(state, &event, &done); + } + if (!done) { + for (i = 0; i < state->num_windows; ++i) { + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + + /* Continue for next window */ + continue; + } + Render(state->window_w, state->window_h, &datas[i]); + SDL_GL_SwapWindow(state->windows[i]); + } + } +#ifdef __EMSCRIPTEN__ + else { + emscripten_cancel_main_loop(); + } +#endif +} + +int +main(int argc, char *argv[]) +{ + int fsaa, accel; + int value; + int i; + SDL_DisplayMode mode; + Uint32 then, now; + int status; + shader_data *data; + + /* Initialize parameters */ + fsaa = 0; + accel = 0; + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + if (consumed == 0) { + if (SDL_strcasecmp(argv[i], "--fsaa") == 0) { + ++fsaa; + consumed = 1; + } else if (SDL_strcasecmp(argv[i], "--accel") == 0) { + ++accel; + consumed = 1; + } else if (SDL_strcasecmp(argv[i], "--zdepth") == 0) { + i++; + if (!argv[i]) { + consumed = -1; + } else { + depth = SDL_atoi(argv[i]); + consumed = 1; + } + } else { + consumed = -1; + } + } + if (consumed < 0) { + SDL_Log ("Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0], + SDLTest_CommonUsage(state)); + quit(1); + } + i += consumed; + } + + /* Set OpenGL parameters */ + state->window_flags |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS; + state->gl_red_size = 5; + state->gl_green_size = 5; + state->gl_blue_size = 5; + state->gl_depth_size = depth; + state->gl_major_version = 2; + state->gl_minor_version = 0; + state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES; + + if (fsaa) { + state->gl_multisamplebuffers=1; + state->gl_multisamplesamples=fsaa; + } + if (accel) { + state->gl_accelerated=1; + } + if (!SDLTest_CommonInit(state)) { + quit(2); + return 0; + } + + context = SDL_calloc(state->num_windows, sizeof(context)); + if (context == NULL) { + SDL_Log("Out of memory!\n"); + quit(2); + } + + /* Create OpenGL ES contexts */ + for (i = 0; i < state->num_windows; i++) { + context[i] = SDL_GL_CreateContext(state->windows[i]); + if (!context[i]) { + SDL_Log("SDL_GL_CreateContext(): %s\n", SDL_GetError()); + quit(2); + } + } + + /* Important: call this *after* creating the context */ + if (LoadContext(&ctx) < 0) { + SDL_Log("Could not load GLES2 functions\n"); + quit(2); + return 0; + } + + + + if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) { + SDL_GL_SetSwapInterval(1); + } else { + SDL_GL_SetSwapInterval(0); + } + + SDL_GetCurrentDisplayMode(0, &mode); + SDL_Log("Screen bpp: %d\n", SDL_BITSPERPIXEL(mode.format)); + SDL_Log("\n"); + SDL_Log("Vendor : %s\n", ctx.glGetString(GL_VENDOR)); + SDL_Log("Renderer : %s\n", ctx.glGetString(GL_RENDERER)); + SDL_Log("Version : %s\n", ctx.glGetString(GL_VERSION)); + SDL_Log("Extensions : %s\n", ctx.glGetString(GL_EXTENSIONS)); + SDL_Log("\n"); + + status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_RED_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_Log( "Failed to get SDL_GL_RED_SIZE: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_GREEN_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_Log( "Failed to get SDL_GL_GREEN_SIZE: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_BLUE_SIZE: requested %d, got %d\n", 5, value); + } else { + SDL_Log( "Failed to get SDL_GL_BLUE_SIZE: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value); + if (!status) { + SDL_Log("SDL_GL_DEPTH_SIZE: requested %d, got %d\n", depth, value); + } else { + SDL_Log( "Failed to get SDL_GL_DEPTH_SIZE: %s\n", + SDL_GetError()); + } + if (fsaa) { + status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value); + if (!status) { + SDL_Log("SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value); + } else { + SDL_Log( "Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\n", + SDL_GetError()); + } + status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value); + if (!status) { + SDL_Log("SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, + value); + } else { + SDL_Log( "Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\n", + SDL_GetError()); + } + } + if (accel) { + status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value); + if (!status) { + SDL_Log("SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\n", value); + } else { + SDL_Log( "Failed to get SDL_GL_ACCELERATED_VISUAL: %s\n", + SDL_GetError()); + } + } + + datas = SDL_calloc(state->num_windows, sizeof(shader_data)); + + /* Set rendering settings for each context */ + for (i = 0; i < state->num_windows; ++i) { + + int w, h; + status = SDL_GL_MakeCurrent(state->windows[i], context[i]); + if (status) { + SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError()); + + /* Continue for next window */ + continue; + } + SDL_GL_GetDrawableSize(state->windows[i], &w, &h); + ctx.glViewport(0, 0, w, h); + + data = &datas[i]; + data->angle_x = 0; data->angle_y = 0; data->angle_z = 0; + + /* Shader Initialization */ + process_shader(&data->shader_vert, _shader_vert_src, GL_VERTEX_SHADER); + process_shader(&data->shader_frag, _shader_frag_src, GL_FRAGMENT_SHADER); + + /* Create shader_program (ready to attach shaders) */ + data->shader_program = GL_CHECK(ctx.glCreateProgram()); + + /* Attach shaders and link shader_program */ + GL_CHECK(ctx.glAttachShader(data->shader_program, data->shader_vert)); + GL_CHECK(ctx.glAttachShader(data->shader_program, data->shader_frag)); + GL_CHECK(ctx.glLinkProgram(data->shader_program)); + + /* Get attribute locations of non-fixed attributes like color and texture coordinates. */ + data->attr_position = GL_CHECK(ctx.glGetAttribLocation(data->shader_program, "av4position")); + data->attr_color = GL_CHECK(ctx.glGetAttribLocation(data->shader_program, "av3color")); + + /* Get uniform locations */ + data->attr_mvp = GL_CHECK(ctx.glGetUniformLocation(data->shader_program, "mvp")); + + GL_CHECK(ctx.glUseProgram(data->shader_program)); + + /* Enable attributes for position, color and texture coordinates etc. */ + GL_CHECK(ctx.glEnableVertexAttribArray(data->attr_position)); + GL_CHECK(ctx.glEnableVertexAttribArray(data->attr_color)); + + /* Populate attributes for position, color and texture coordinates etc. */ + GL_CHECK(ctx.glVertexAttribPointer(data->attr_position, 3, GL_FLOAT, GL_FALSE, 0, _vertices)); + GL_CHECK(ctx.glVertexAttribPointer(data->attr_color, 3, GL_FLOAT, GL_FALSE, 0, _colors)); + + GL_CHECK(ctx.glEnable(GL_CULL_FACE)); + GL_CHECK(ctx.glEnable(GL_DEPTH_TEST)); + } + + /* Main render loop */ + frames = 0; + then = SDL_GetTicks(); + done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + loop(); + } +#endif + + /* Print out some timing information */ + now = SDL_GetTicks(); + if (now > then) { + SDL_Log("%2.2f frames per second\n", + ((double) frames * 1000) / (now - then)); + } +#if !defined(__ANDROID__) && !defined(__NACL__) + quit(0); +#endif + return 0; +} + +#else /* HAVE_OPENGLES2 */ + +int +main(int argc, char *argv[]) +{ + SDL_Log("No OpenGL ES support on this system\n"); + return 1; +} + +#endif /* HAVE_OPENGLES2 */ + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.4/test/testhaptic.c b/3rdparty/sdl2-2.0.4/test/testhaptic.c new file mode 100644 index 0000000000..bffe4467de --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testhaptic.c @@ -0,0 +1,369 @@ +/* +Copyright (c) 2008, Edgar Simo Serra +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the Simple Directmedia Layer (SDL) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * includes + */ +#include +#include /* strstr */ +#include /* isdigit */ + +#include "SDL.h" + +#ifndef SDL_HAPTIC_DISABLED + +static SDL_Haptic *haptic; + + +/* + * prototypes + */ +static void abort_execution(void); +static void HapticPrintSupported(SDL_Haptic * haptic); + + +/** + * @brief The entry point of this force feedback demo. + * @param[in] argc Number of arguments. + * @param[in] argv Array of argc arguments. + */ +int +main(int argc, char **argv) +{ + int i; + char *name; + int index; + SDL_HapticEffect efx[9]; + int id[9]; + int nefx; + unsigned int supported; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + name = NULL; + index = -1; + if (argc > 1) { + name = argv[1]; + if ((strcmp(name, "--help") == 0) || (strcmp(name, "-h") == 0)) { + SDL_Log("USAGE: %s [device]\n" + "If device is a two-digit number it'll use it as an index, otherwise\n" + "it'll use it as if it were part of the device's name.\n", + argv[0]); + return 0; + } + + i = strlen(name); + if ((i < 3) && isdigit(name[0]) && ((i == 1) || isdigit(name[1]))) { + index = atoi(name); + name = NULL; + } + } + + /* Initialize the force feedbackness */ + SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_JOYSTICK | + SDL_INIT_HAPTIC); + SDL_Log("%d Haptic devices detected.\n", SDL_NumHaptics()); + if (SDL_NumHaptics() > 0) { + /* We'll just use index or the first force feedback device found */ + if (name == NULL) { + i = (index != -1) ? index : 0; + } + /* Try to find matching device */ + else { + for (i = 0; i < SDL_NumHaptics(); i++) { + if (strstr(SDL_HapticName(i), name) != NULL) + break; + } + + if (i >= SDL_NumHaptics()) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to find device matching '%s', aborting.\n", + name); + return 1; + } + } + + haptic = SDL_HapticOpen(i); + if (haptic == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n", + SDL_GetError()); + return 1; + } + SDL_Log("Device: %s\n", SDL_HapticName(i)); + HapticPrintSupported(haptic); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Haptic devices found!\n"); + return 1; + } + + /* We only want force feedback errors. */ + SDL_ClearError(); + + /* Create effects. */ + memset(&efx, 0, sizeof(efx)); + nefx = 0; + supported = SDL_HapticQuery(haptic); + + SDL_Log("\nUploading effects\n"); + /* First we'll try a SINE effect. */ + if (supported & SDL_HAPTIC_SINE) { + SDL_Log(" effect %d: Sine Wave\n", nefx); + efx[nefx].type = SDL_HAPTIC_SINE; + efx[nefx].periodic.period = 1000; + efx[nefx].periodic.magnitude = -0x2000; /* Negative magnitude and ... */ + efx[nefx].periodic.phase = 18000; /* ... 180 degrees phase shift => cancel eachother */ + efx[nefx].periodic.length = 5000; + efx[nefx].periodic.attack_length = 1000; + efx[nefx].periodic.fade_length = 1000; + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + /* Now we'll try a SAWTOOTHUP */ + if (supported & SDL_HAPTIC_SAWTOOTHUP) { + SDL_Log(" effect %d: Sawtooth Up\n", nefx); + efx[nefx].type = SDL_HAPTIC_SAWTOOTHUP; + efx[nefx].periodic.period = 500; + efx[nefx].periodic.magnitude = 0x5000; + efx[nefx].periodic.length = 5000; + efx[nefx].periodic.attack_length = 1000; + efx[nefx].periodic.fade_length = 1000; + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + + /* Now the classical constant effect. */ + if (supported & SDL_HAPTIC_CONSTANT) { + SDL_Log(" effect %d: Constant Force\n", nefx); + efx[nefx].type = SDL_HAPTIC_CONSTANT; + efx[nefx].constant.direction.type = SDL_HAPTIC_POLAR; + efx[nefx].constant.direction.dir[0] = 20000; /* Force comes from the south-west. */ + efx[nefx].constant.length = 5000; + efx[nefx].constant.level = 0x6000; + efx[nefx].constant.attack_length = 1000; + efx[nefx].constant.fade_length = 1000; + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + + /* The cute spring effect. */ + if (supported & SDL_HAPTIC_SPRING) { + SDL_Log(" effect %d: Condition Spring\n", nefx); + efx[nefx].type = SDL_HAPTIC_SPRING; + efx[nefx].condition.length = 5000; + for (i = 0; i < SDL_HapticNumAxes(haptic); i++) { + efx[nefx].condition.right_sat[i] = 0xFFFF; + efx[nefx].condition.left_sat[i] = 0xFFFF; + efx[nefx].condition.right_coeff[i] = 0x2000; + efx[nefx].condition.left_coeff[i] = 0x2000; + efx[nefx].condition.center[i] = 0x1000; /* Displace the center for it to move. */ + } + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + /* The interesting damper effect. */ + if (supported & SDL_HAPTIC_DAMPER) { + SDL_Log(" effect %d: Condition Damper\n", nefx); + efx[nefx].type = SDL_HAPTIC_DAMPER; + efx[nefx].condition.length = 5000; + for (i = 0; i < SDL_HapticNumAxes(haptic); i++) { + efx[nefx].condition.right_sat[i] = 0xFFFF; + efx[nefx].condition.left_sat[i] = 0xFFFF; + efx[nefx].condition.right_coeff[i] = 0x2000; + efx[nefx].condition.left_coeff[i] = 0x2000; + } + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + /* The pretty awesome inertia effect. */ + if (supported & SDL_HAPTIC_INERTIA) { + SDL_Log(" effect %d: Condition Inertia\n", nefx); + efx[nefx].type = SDL_HAPTIC_INERTIA; + efx[nefx].condition.length = 5000; + for (i = 0; i < SDL_HapticNumAxes(haptic); i++) { + efx[nefx].condition.right_sat[i] = 0xFFFF; + efx[nefx].condition.left_sat[i] = 0xFFFF; + efx[nefx].condition.right_coeff[i] = 0x2000; + efx[nefx].condition.left_coeff[i] = 0x2000; + efx[nefx].condition.deadband[i] = 0x1000; /* 1/16th of axis-range around the center is 'dead'. */ + } + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + /* The hot friction effect. */ + if (supported & SDL_HAPTIC_FRICTION) { + SDL_Log(" effect %d: Condition Friction\n", nefx); + efx[nefx].type = SDL_HAPTIC_FRICTION; + efx[nefx].condition.length = 5000; + for (i = 0; i < SDL_HapticNumAxes(haptic); i++) { + efx[nefx].condition.right_sat[i] = 0xFFFF; + efx[nefx].condition.left_sat[i] = 0xFFFF; + efx[nefx].condition.right_coeff[i] = 0x2000; + efx[nefx].condition.left_coeff[i] = 0x2000; + } + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + + /* Now we'll try a ramp effect */ + if (supported & SDL_HAPTIC_RAMP) { + SDL_Log(" effect %d: Ramp\n", nefx); + efx[nefx].type = SDL_HAPTIC_RAMP; + efx[nefx].ramp.direction.type = SDL_HAPTIC_CARTESIAN; + efx[nefx].ramp.direction.dir[0] = 1; /* Force comes from */ + efx[nefx].ramp.direction.dir[1] = -1; /* the north-east. */ + efx[nefx].ramp.length = 5000; + efx[nefx].ramp.start = 0x4000; + efx[nefx].ramp.end = -0x4000; + efx[nefx].ramp.attack_length = 1000; + efx[nefx].ramp.fade_length = 1000; + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + + /* Finally we'll try a left/right effect. */ + if (supported & SDL_HAPTIC_LEFTRIGHT) { + SDL_Log(" effect %d: Left/Right\n", nefx); + efx[nefx].type = SDL_HAPTIC_LEFTRIGHT; + efx[nefx].leftright.length = 5000; + efx[nefx].leftright.large_magnitude = 0x3000; + efx[nefx].leftright.small_magnitude = 0xFFFF; + id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]); + if (id[nefx] < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "UPLOADING EFFECT ERROR: %s\n", SDL_GetError()); + abort_execution(); + } + nefx++; + } + + + SDL_Log + ("\nNow playing effects for 5 seconds each with 1 second delay between\n"); + for (i = 0; i < nefx; i++) { + SDL_Log(" Playing effect %d\n", i); + SDL_HapticRunEffect(haptic, id[i], 1); + SDL_Delay(6000); /* Effects only have length 5000 */ + } + + /* Quit */ + if (haptic != NULL) + SDL_HapticClose(haptic); + SDL_Quit(); + + return 0; +} + + +/* + * Cleans up a bit. + */ +static void +abort_execution(void) +{ + SDL_Log("\nAborting program execution.\n"); + + SDL_HapticClose(haptic); + SDL_Quit(); + + exit(1); +} + + +/* + * Displays information about the haptic device. + */ +static void +HapticPrintSupported(SDL_Haptic * haptic) +{ + unsigned int supported; + + supported = SDL_HapticQuery(haptic); + SDL_Log(" Supported effects [%d effects, %d playing]:\n", + SDL_HapticNumEffects(haptic), SDL_HapticNumEffectsPlaying(haptic)); + if (supported & SDL_HAPTIC_CONSTANT) + SDL_Log(" constant\n"); + if (supported & SDL_HAPTIC_SINE) + SDL_Log(" sine\n"); + /* !!! FIXME: put this back when we have more bits in 2.1 */ + /* if (supported & SDL_HAPTIC_SQUARE) + SDL_Log(" square\n"); */ + if (supported & SDL_HAPTIC_TRIANGLE) + SDL_Log(" triangle\n"); + if (supported & SDL_HAPTIC_SAWTOOTHUP) + SDL_Log(" sawtoothup\n"); + if (supported & SDL_HAPTIC_SAWTOOTHDOWN) + SDL_Log(" sawtoothdown\n"); + if (supported & SDL_HAPTIC_RAMP) + SDL_Log(" ramp\n"); + if (supported & SDL_HAPTIC_FRICTION) + SDL_Log(" friction\n"); + if (supported & SDL_HAPTIC_SPRING) + SDL_Log(" spring\n"); + if (supported & SDL_HAPTIC_DAMPER) + SDL_Log(" damper\n"); + if (supported & SDL_HAPTIC_INERTIA) + SDL_Log(" inertia\n"); + if (supported & SDL_HAPTIC_CUSTOM) + SDL_Log(" custom\n"); + if (supported & SDL_HAPTIC_LEFTRIGHT) + SDL_Log(" left/right\n"); + SDL_Log(" Supported capabilities:\n"); + if (supported & SDL_HAPTIC_GAIN) + SDL_Log(" gain\n"); + if (supported & SDL_HAPTIC_AUTOCENTER) + SDL_Log(" autocenter\n"); + if (supported & SDL_HAPTIC_STATUS) + SDL_Log(" status\n"); +} + +#else + +int +main(int argc, char *argv[]) +{ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Haptic support.\n"); + exit(1); +} + +#endif diff --git a/3rdparty/sdl2-2.0.4/test/testhittesting.c b/3rdparty/sdl2-2.0.4/test/testhittesting.c new file mode 100644 index 0000000000..5e32be42d0 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testhittesting.c @@ -0,0 +1,134 @@ +#include +#include "SDL.h" + +/* !!! FIXME: rewrite this to be wired in to test framework. */ + +#define RESIZE_BORDER 20 + +const SDL_Rect drag_areas[] = { + { 20, 20, 100, 100 }, + { 200, 70, 100, 100 }, + { 400, 90, 100, 100 } +}; + +static const SDL_Rect *areas = drag_areas; +static int numareas = SDL_arraysize(drag_areas); + +static SDL_HitTestResult +hitTest(SDL_Window *window, const SDL_Point *pt, void *data) +{ + int i; + int w, h; + + for (i = 0; i < numareas; i++) { + if (SDL_PointInRect(pt, &areas[i])) { + SDL_Log("HIT-TEST: DRAGGABLE\n"); + return SDL_HITTEST_DRAGGABLE; + } + } + + SDL_GetWindowSize(window, &w, &h); + + #define REPORT_RESIZE_HIT(name) { \ + SDL_Log("HIT-TEST: RESIZE_" #name "\n"); \ + return SDL_HITTEST_RESIZE_##name; \ + } + + if (pt->x < RESIZE_BORDER && pt->y < RESIZE_BORDER) { + REPORT_RESIZE_HIT(TOPLEFT); + } else if (pt->x > RESIZE_BORDER && pt->x < w - RESIZE_BORDER && pt->y < RESIZE_BORDER) { + REPORT_RESIZE_HIT(TOP); + } else if (pt->x > w - RESIZE_BORDER && pt->y < RESIZE_BORDER) { + REPORT_RESIZE_HIT(TOPRIGHT); + } else if (pt->x > w - RESIZE_BORDER && pt->y > RESIZE_BORDER && pt->y < h - RESIZE_BORDER) { + REPORT_RESIZE_HIT(RIGHT); + } else if (pt->x > w - RESIZE_BORDER && pt->y > h - RESIZE_BORDER) { + REPORT_RESIZE_HIT(BOTTOMRIGHT); + } else if (pt->x < w - RESIZE_BORDER && pt->x > RESIZE_BORDER && pt->y > h - RESIZE_BORDER) { + REPORT_RESIZE_HIT(BOTTOM); + } else if (pt->x < RESIZE_BORDER && pt->y > h - RESIZE_BORDER) { + REPORT_RESIZE_HIT(BOTTOMLEFT); + } else if (pt->x < RESIZE_BORDER && pt->y < h - RESIZE_BORDER && pt->y > RESIZE_BORDER) { + REPORT_RESIZE_HIT(LEFT); + } + + SDL_Log("HIT-TEST: NORMAL\n"); + return SDL_HITTEST_NORMAL; +} + + +int main(int argc, char **argv) +{ + int done = 0; + SDL_Window *window; + SDL_Renderer *renderer; + + /* !!! FIXME: check for errors. */ + SDL_Init(SDL_INIT_VIDEO); + window = SDL_CreateWindow("Drag the red boxes", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE); + renderer = SDL_CreateRenderer(window, -1, 0); + + if (SDL_SetWindowHitTest(window, hitTest, NULL) == -1) { + SDL_Log("Enabling hit-testing failed!\n"); + SDL_Quit(); + return 1; + } + + while (!done) + { + SDL_Event e; + int nothing_to_do = 1; + + SDL_SetRenderDrawColor(renderer, 0, 0, 127, 255); + SDL_RenderClear(renderer); + SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); + SDL_RenderFillRects(renderer, areas, SDL_arraysize(drag_areas)); + SDL_RenderPresent(renderer); + + while (SDL_PollEvent(&e)) { + nothing_to_do = 0; + + switch (e.type) + { + case SDL_MOUSEBUTTONDOWN: + SDL_Log("button down!\n"); + break; + + case SDL_MOUSEBUTTONUP: + SDL_Log("button up!\n"); + break; + + case SDL_WINDOWEVENT: + if (e.window.event == SDL_WINDOWEVENT_MOVED) { + SDL_Log("Window event moved to (%d, %d)!\n", (int) e.window.data1, (int) e.window.data2); + } + break; + + case SDL_KEYDOWN: + if (e.key.keysym.sym == SDLK_ESCAPE) { + done = 1; + } else if (e.key.keysym.sym == SDLK_x) { + if (!areas) { + areas = drag_areas; + numareas = SDL_arraysize(drag_areas); + } else { + areas = NULL; + numareas = 0; + } + } + break; + + case SDL_QUIT: + done = 1; + break; + } + } + + if (nothing_to_do) { + SDL_Delay(50); + } + } + + SDL_Quit(); + return 0; +} diff --git a/3rdparty/sdl2-2.0.4/test/testhotplug.c b/3rdparty/sdl2-2.0.4/test/testhotplug.c new file mode 100644 index 0000000000..1fa9637548 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testhotplug.c @@ -0,0 +1,162 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple program to test the SDL joystick hotplugging */ + +#include +#include +#include + +#include "SDL.h" + +#if !defined SDL_JOYSTICK_DISABLED && !defined SDL_HAPTIC_DISABLED + +int +main(int argc, char *argv[]) +{ + SDL_Joystick *joystick = NULL; + SDL_Haptic *haptic = NULL; + SDL_JoystickID instance = -1; + SDL_bool keepGoing = SDL_TRUE; + int i; + SDL_bool enable_haptic = SDL_TRUE; + Uint32 init_subsystems = SDL_INIT_VIDEO | SDL_INIT_JOYSTICK; + + for (i = 1; i < argc; ++i) { + if (SDL_strcasecmp(argv[i], "--nohaptic") == 0) { + enable_haptic = SDL_FALSE; + } + } + + if(enable_haptic) { + init_subsystems |= SDL_INIT_HAPTIC; + } + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); + + /* Initialize SDL (Note: video is required to start event loop) */ + if (SDL_Init(init_subsystems) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + exit(1); + } + + /* + //SDL_CreateWindow("Dummy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 128, 128, 0); + */ + + SDL_Log("There are %d joysticks at startup\n", SDL_NumJoysticks()); + if (enable_haptic) + SDL_Log("There are %d haptic devices at startup\n", SDL_NumHaptics()); + + while(keepGoing) + { + SDL_Event event; + while(SDL_PollEvent(&event)) + { + switch(event.type) + { + case SDL_QUIT: + keepGoing = SDL_FALSE; + break; + case SDL_JOYDEVICEADDED: + if (joystick != NULL) + { + SDL_Log("Only one joystick supported by this test\n"); + } + else + { + joystick = SDL_JoystickOpen(event.jdevice.which); + instance = SDL_JoystickInstanceID(joystick); + SDL_Log("Joy Added : %d : %s\n", event.jdevice.which, SDL_JoystickName(joystick)); + if (enable_haptic) + { + if (SDL_JoystickIsHaptic(joystick)) + { + haptic = SDL_HapticOpenFromJoystick(joystick); + if (haptic) + { + SDL_Log("Joy Haptic Opened\n"); + if (SDL_HapticRumbleInit( haptic ) != 0) + { + SDL_Log("Could not init Rumble!: %s\n", SDL_GetError()); + SDL_HapticClose(haptic); + haptic = NULL; + } + } else { + SDL_Log("Joy haptic open FAILED!: %s\n", SDL_GetError()); + } + } + else + { + SDL_Log("No haptic found\n"); + } + } + } + break; + case SDL_JOYDEVICEREMOVED: + if (instance == event.jdevice.which) + { + SDL_Log("Joy Removed: %d\n", event.jdevice.which); + instance = -1; + if(enable_haptic && haptic) + { + SDL_HapticClose(haptic); + haptic = NULL; + } + SDL_JoystickClose(joystick); + joystick = NULL; + } else { + SDL_Log("Unknown joystick diconnected\n"); + } + break; + case SDL_JOYAXISMOTION: +/* +// SDL_Log("Axis Move: %d\n", event.jaxis.axis); +*/ + if (enable_haptic) + SDL_HapticRumblePlay(haptic, 0.25, 250); + break; + case SDL_JOYBUTTONDOWN: + SDL_Log("Button Press: %d\n", event.jbutton.button); + if(enable_haptic && haptic) + { + SDL_HapticRumblePlay(haptic, 0.25, 250); + } + if (event.jbutton.button == 0) { + SDL_Log("Exiting due to button press of button 0\n"); + keepGoing = SDL_FALSE; + } + break; + case SDL_JOYBUTTONUP: + SDL_Log("Button Release: %d\n", event.jbutton.button); + break; + } + } + } + + SDL_Quit(); + + return 0; +} +#else + +int +main(int argc, char *argv[]) +{ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Joystick and haptic support.\n"); + return 1; +} + +#endif diff --git a/3rdparty/sdl2-2.0.0/test/testiconv.c b/3rdparty/sdl2-2.0.4/test/testiconv.c similarity index 81% rename from 3rdparty/sdl2-2.0.0/test/testiconv.c rename to 3rdparty/sdl2-2.0.4/test/testiconv.c index d2081995d5..79efec8aaa 100644 --- a/3rdparty/sdl2-2.0.0/test/testiconv.c +++ b/3rdparty/sdl2-2.0.4/test/testiconv.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -49,12 +49,15 @@ main(int argc, char *argv[]) FILE *file; int errors = 0; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + if (!argv[1]) { argv[1] = "utf8.txt"; } file = fopen(argv[1], "rb"); if (!file) { - fprintf(stderr, "Unable to open %s\n", argv[1]); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to open %s\n", argv[1]); return (1); } @@ -69,15 +72,11 @@ main(int argc, char *argv[]) test[0] = SDL_iconv_string(formats[i], "UCS-4", ucs4, len); test[1] = SDL_iconv_string("UCS-4", formats[i], test[0], len); if (!test[1] || SDL_memcmp(test[1], ucs4, len) != 0) { - fprintf(stderr, "FAIL: %s\n", formats[i]); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "FAIL: %s\n", formats[i]); ++errors; } - if (test[0]) { - SDL_free(test[0]); - } - if (test[1]) { - SDL_free(test[1]); - } + SDL_free(test[0]); + SDL_free(test[1]); } test[0] = SDL_iconv_string("UTF-8", "UCS-4", ucs4, len); SDL_free(ucs4); diff --git a/3rdparty/sdl2-2.0.0/test/testime.c b/3rdparty/sdl2-2.0.4/test/testime.c similarity index 89% rename from 3rdparty/sdl2-2.0.0/test/testime.c rename to 3rdparty/sdl2-2.0.4/test/testime.c index ce9f02b1f5..d6e7ea1f26 100644 --- a/3rdparty/sdl2-2.0.0/test/testime.c +++ b/3rdparty/sdl2-2.0.4/test/testime.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -80,7 +80,7 @@ char *utf8_advance(char *p, size_t distance) void usage() { - printf("usage: testime [--font fontfile]\n"); + SDL_Log("usage: testime [--font fontfile]\n"); exit(0); } @@ -135,7 +135,7 @@ void _Redraw(SDL_Renderer * renderer) { markedRect.w = textRect.w - w; if (markedRect.w < 0) { - // Stop text input because we cannot hold any more characters + /* Stop text input because we cannot hold any more characters */ SDL_StopTextInput(); return; } @@ -196,6 +196,8 @@ void Redraw() { int i; for (i = 0; i < state->num_windows; ++i) { SDL_Renderer *renderer = state->renderers[i]; + if (state->windows[i] == NULL) + continue; SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0); SDL_RenderClear(renderer); @@ -210,6 +212,9 @@ int main(int argc, char *argv[]) { SDL_Event event; const char *fontname = DEFAULT_FONT; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { @@ -251,12 +256,12 @@ int main(int argc, char *argv[]) { font = TTF_OpenFont(fontname, DEFAULT_PTSIZE); if (! font) { - fprintf(stderr, "Failed to find font: %s\n", TTF_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to find font: %s\n", TTF_GetError()); exit(-1); } #endif - printf("Using font: %s\n", fontname); + SDL_Log("Using font: %s\n", fontname); atexit(SDL_Quit); InitInput(); @@ -284,7 +289,7 @@ int main(int argc, char *argv[]) { break; case SDLK_BACKSPACE: { - int textlen=SDL_strlen(text); + size_t textlen = SDL_strlen(text); do { if (textlen==0) @@ -321,33 +326,32 @@ int main(int argc, char *argv[]) { break; } - fprintf(stderr, - "Keyboard: scancode 0x%08X = %s, keycode 0x%08X = %s\n", + SDL_Log("Keyboard: scancode 0x%08X = %s, keycode 0x%08X = %s\n", event.key.keysym.scancode, SDL_GetScancodeName(event.key.keysym.scancode), event.key.keysym.sym, SDL_GetKeyName(event.key.keysym.sym)); break; case SDL_TEXTINPUT: - if (SDL_strlen(event.text.text) == 0 || event.text.text[0] == '\n' || + if (event.text.text[0] == '\0' || event.text.text[0] == '\n' || markedRect.w < 0) break; - fprintf(stderr, "Keyboard: text input \"%s\"\n", event.text.text); + SDL_Log("Keyboard: text input \"%s\"\n", event.text.text); if (SDL_strlen(text) + SDL_strlen(event.text.text) < sizeof(text)) SDL_strlcat(text, event.text.text, sizeof(text)); - fprintf(stderr, "text inputed: %s\n", text); + SDL_Log("text inputed: %s\n", text); - // After text inputed, we can clear up markedText because it - // is committed + /* After text inputed, we can clear up markedText because it */ + /* is committed */ markedText[0] = 0; Redraw(); break; case SDL_TEXTEDITING: - fprintf(stderr, "text editing \"%s\", selected range (%d, %d)\n", + SDL_Log("text editing \"%s\", selected range (%d, %d)\n", event.edit.text, event.edit.start, event.edit.length); strcpy(markedText, event.edit.text); diff --git a/3rdparty/sdl2-2.0.4/test/testintersections.c b/3rdparty/sdl2-2.0.4/test/testintersections.c new file mode 100644 index 0000000000..82aae63388 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testintersections.c @@ -0,0 +1,363 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple program: draw as many random objects on the screen as possible */ + +#include +#include +#include + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#include "SDL_test_common.h" + +#define SWAP(typ,a,b) do{typ t=a;a=b;b=t;}while(0) +#define NUM_OBJECTS 100 + +static SDLTest_CommonState *state; +static int num_objects; +static SDL_bool cycle_color; +static SDL_bool cycle_alpha; +static int cycle_direction = 1; +static int current_alpha = 255; +static int current_color = 255; +static SDL_BlendMode blendMode = SDL_BLENDMODE_NONE; + +int mouse_begin_x = -1, mouse_begin_y = -1; +int done; + +void +DrawPoints(SDL_Renderer * renderer) +{ + int i; + int x, y; + SDL_Rect viewport; + + /* Query the sizes */ + SDL_RenderGetViewport(renderer, &viewport); + + for (i = 0; i < num_objects * 4; ++i) { + /* Cycle the color and alpha, if desired */ + if (cycle_color) { + current_color += cycle_direction; + if (current_color < 0) { + current_color = 0; + cycle_direction = -cycle_direction; + } + if (current_color > 255) { + current_color = 255; + cycle_direction = -cycle_direction; + } + } + if (cycle_alpha) { + current_alpha += cycle_direction; + if (current_alpha < 0) { + current_alpha = 0; + cycle_direction = -cycle_direction; + } + if (current_alpha > 255) { + current_alpha = 255; + cycle_direction = -cycle_direction; + } + } + SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color, + (Uint8) current_color, (Uint8) current_alpha); + + x = rand() % viewport.w; + y = rand() % viewport.h; + SDL_RenderDrawPoint(renderer, x, y); + } +} + +#define MAX_LINES 16 +int num_lines = 0; +SDL_Rect lines[MAX_LINES]; +static int +add_line(int x1, int y1, int x2, int y2) +{ + if (num_lines >= MAX_LINES) + return 0; + if ((x1 == x2) && (y1 == y2)) + return 0; + + SDL_Log("adding line (%d, %d), (%d, %d)\n", x1, y1, x2, y2); + lines[num_lines].x = x1; + lines[num_lines].y = y1; + lines[num_lines].w = x2; + lines[num_lines].h = y2; + + return ++num_lines; +} + + +void +DrawLines(SDL_Renderer * renderer) +{ + int i; + SDL_Rect viewport; + + /* Query the sizes */ + SDL_RenderGetViewport(renderer, &viewport); + + SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); + + for (i = 0; i < num_lines; ++i) { + if (i == -1) { + SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1); + SDL_RenderDrawLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0); + SDL_RenderDrawLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2); + SDL_RenderDrawLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1); + } else { + SDL_RenderDrawLine(renderer, lines[i].x, lines[i].y, lines[i].w, lines[i].h); + } + } +} + +#define MAX_RECTS 16 +int num_rects = 0; +SDL_Rect rects[MAX_RECTS]; +static int +add_rect(int x1, int y1, int x2, int y2) +{ + if (num_rects >= MAX_RECTS) + return 0; + if ((x1 == x2) || (y1 == y2)) + return 0; + + if (x1 > x2) + SWAP(int, x1, x2); + if (y1 > y2) + SWAP(int, y1, y2); + + SDL_Log("adding rect (%d, %d), (%d, %d) [%dx%d]\n", x1, y1, x2, y2, + x2 - x1, y2 - y1); + + rects[num_rects].x = x1; + rects[num_rects].y = y1; + rects[num_rects].w = x2 - x1; + rects[num_rects].h = y2 - y1; + + return ++num_rects; +} + +static void +DrawRects(SDL_Renderer * renderer) +{ + SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255); + SDL_RenderFillRects(renderer, rects, num_rects); +} + +static void +DrawRectLineIntersections(SDL_Renderer * renderer) +{ + int i, j; + + SDL_SetRenderDrawColor(renderer, 0, 255, 55, 255); + + for (i = 0; i < num_rects; i++) + for (j = 0; j < num_lines; j++) { + int x1, y1, x2, y2; + SDL_Rect r; + + r = rects[i]; + x1 = lines[j].x; + y1 = lines[j].y; + x2 = lines[j].w; + y2 = lines[j].h; + + if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) { + SDL_RenderDrawLine(renderer, x1, y1, x2, y2); + } + } +} + +static void +DrawRectRectIntersections(SDL_Renderer * renderer) +{ + int i, j; + + SDL_SetRenderDrawColor(renderer, 255, 200, 0, 255); + + for (i = 0; i < num_rects; i++) + for (j = i + 1; j < num_rects; j++) { + SDL_Rect r; + if (SDL_IntersectRect(&rects[i], &rects[j], &r)) { + SDL_RenderFillRect(renderer, &r); + } + } +} + +void +loop() +{ + int i; + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + switch (event.type) { + case SDL_MOUSEBUTTONDOWN: + mouse_begin_x = event.button.x; + mouse_begin_y = event.button.y; + break; + case SDL_MOUSEBUTTONUP: + if (event.button.button == 3) + add_line(mouse_begin_x, mouse_begin_y, event.button.x, + event.button.y); + if (event.button.button == 1) + add_rect(mouse_begin_x, mouse_begin_y, event.button.x, + event.button.y); + break; + case SDL_KEYDOWN: + switch (event.key.keysym.sym) { + case 'l': + if (event.key.keysym.mod & KMOD_SHIFT) + num_lines = 0; + else + add_line(rand() % 640, rand() % 480, rand() % 640, + rand() % 480); + break; + case 'r': + if (event.key.keysym.mod & KMOD_SHIFT) + num_rects = 0; + else + add_rect(rand() % 640, rand() % 480, rand() % 640, + rand() % 480); + break; + } + break; + default: + break; + } + } + for (i = 0; i < state->num_windows; ++i) { + SDL_Renderer *renderer = state->renderers[i]; + if (state->windows[i] == NULL) + continue; + SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); + SDL_RenderClear(renderer); + + DrawRects(renderer); + DrawPoints(renderer); + DrawRectRectIntersections(renderer); + DrawLines(renderer); + DrawRectLineIntersections(renderer); + + SDL_RenderPresent(renderer); + } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +int +main(int argc, char *argv[]) +{ + int i; + Uint32 then, now, frames; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize parameters */ + num_objects = NUM_OBJECTS; + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + if (consumed == 0) { + consumed = -1; + if (SDL_strcasecmp(argv[i], "--blend") == 0) { + if (argv[i + 1]) { + if (SDL_strcasecmp(argv[i + 1], "none") == 0) { + blendMode = SDL_BLENDMODE_NONE; + consumed = 2; + } else if (SDL_strcasecmp(argv[i + 1], "blend") == 0) { + blendMode = SDL_BLENDMODE_BLEND; + consumed = 2; + } else if (SDL_strcasecmp(argv[i + 1], "add") == 0) { + blendMode = SDL_BLENDMODE_ADD; + consumed = 2; + } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) { + blendMode = SDL_BLENDMODE_MOD; + consumed = 2; + } + } + } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) { + cycle_color = SDL_TRUE; + consumed = 1; + } else if (SDL_strcasecmp(argv[i], "--cyclealpha") == 0) { + cycle_alpha = SDL_TRUE; + consumed = 1; + } else if (SDL_isdigit(*argv[i])) { + num_objects = SDL_atoi(argv[i]); + consumed = 1; + } + } + if (consumed < 0) { + SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n", + argv[0], SDLTest_CommonUsage(state)); + return 1; + } + i += consumed; + } + if (!SDLTest_CommonInit(state)) { + return 2; + } + + /* Create the windows and initialize the renderers */ + for (i = 0; i < state->num_windows; ++i) { + SDL_Renderer *renderer = state->renderers[i]; + SDL_SetRenderDrawBlendMode(renderer, blendMode); + SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); + SDL_RenderClear(renderer); + } + + srand(time(NULL)); + + /* Main render loop */ + frames = 0; + then = SDL_GetTicks(); + done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + ++frames; + loop(); + } +#endif + + SDLTest_CommonQuit(state); + + /* Print out some timing information */ + now = SDL_GetTicks(); + if (now > then) { + double fps = ((double) frames * 1000) / (now - then); + SDL_Log("%2.2f frames per second\n", fps); + } + return 0; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.4/test/testjoystick.c b/3rdparty/sdl2-2.0.4/test/testjoystick.c new file mode 100644 index 0000000000..bed27212e1 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testjoystick.c @@ -0,0 +1,346 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple program to test the SDL joystick routines */ + +#include +#include +#include + +#include "SDL.h" + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#ifndef SDL_JOYSTICK_DISABLED + +#ifdef __IPHONEOS__ +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 480 +#else +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 +#endif + +SDL_Renderer *screen = NULL; +SDL_bool retval = SDL_FALSE; +SDL_bool done = SDL_FALSE; + +static void +DrawRect(SDL_Renderer *r, const int x, const int y, const int w, const int h) +{ + const SDL_Rect area = { x, y, w, h }; + SDL_RenderFillRect(r, &area); +} + +void +loop(void *arg) +{ + SDL_Event event; + int i; + SDL_Joystick *joystick = (SDL_Joystick *)arg; + + /* blank screen, set up for drawing this frame. */ + SDL_SetRenderDrawColor(screen, 0x0, 0x0, 0x0, SDL_ALPHA_OPAQUE); + SDL_RenderClear(screen); + + while (SDL_PollEvent(&event)) { + switch (event.type) { + + case SDL_JOYDEVICEREMOVED: + SDL_Log("Joystick device %d removed.\n", (int) event.jdevice.which); + SDL_Log("Our instance ID is %d\n", (int) SDL_JoystickInstanceID(joystick)); + break; + + case SDL_JOYAXISMOTION: + SDL_Log("Joystick %d axis %d value: %d\n", + event.jaxis.which, + event.jaxis.axis, event.jaxis.value); + break; + case SDL_JOYHATMOTION: + SDL_Log("Joystick %d hat %d value:", + event.jhat.which, event.jhat.hat); + if (event.jhat.value == SDL_HAT_CENTERED) + SDL_Log(" centered"); + if (event.jhat.value & SDL_HAT_UP) + SDL_Log(" up"); + if (event.jhat.value & SDL_HAT_RIGHT) + SDL_Log(" right"); + if (event.jhat.value & SDL_HAT_DOWN) + SDL_Log(" down"); + if (event.jhat.value & SDL_HAT_LEFT) + SDL_Log(" left"); + SDL_Log("\n"); + break; + case SDL_JOYBALLMOTION: + SDL_Log("Joystick %d ball %d delta: (%d,%d)\n", + event.jball.which, + event.jball.ball, event.jball.xrel, event.jball.yrel); + break; + case SDL_JOYBUTTONDOWN: + SDL_Log("Joystick %d button %d down\n", + event.jbutton.which, event.jbutton.button); + break; + case SDL_JOYBUTTONUP: + SDL_Log("Joystick %d button %d up\n", + event.jbutton.which, event.jbutton.button); + break; + case SDL_KEYDOWN: + if ((event.key.keysym.sym != SDLK_ESCAPE) && + (event.key.keysym.sym != SDLK_AC_BACK)) { + break; + } + /* Fall through to signal quit */ + case SDL_FINGERDOWN: + case SDL_MOUSEBUTTONDOWN: + case SDL_QUIT: + done = SDL_TRUE; + break; + default: + break; + } + } + /* Update visual joystick state */ + SDL_SetRenderDrawColor(screen, 0x00, 0xFF, 0x00, SDL_ALPHA_OPAQUE); + for (i = 0; i < SDL_JoystickNumButtons(joystick); ++i) { + if (SDL_JoystickGetButton(joystick, i) == SDL_PRESSED) { + DrawRect(screen, (i%20) * 34, SCREEN_HEIGHT - 68 + (i/20) * 34, 32, 32); + } + } + + SDL_SetRenderDrawColor(screen, 0xFF, 0x00, 0x00, SDL_ALPHA_OPAQUE); + for (i = 0; i < SDL_JoystickNumAxes(joystick); ++i) { + /* Draw the X/Y axis */ + int x, y; + x = (((int) SDL_JoystickGetAxis(joystick, i)) + 32768); + x *= SCREEN_WIDTH; + x /= 65535; + if (x < 0) { + x = 0; + } else if (x > (SCREEN_WIDTH - 16)) { + x = SCREEN_WIDTH - 16; + } + ++i; + if (i < SDL_JoystickNumAxes(joystick)) { + y = (((int) SDL_JoystickGetAxis(joystick, i)) + 32768); + } else { + y = 32768; + } + y *= SCREEN_HEIGHT; + y /= 65535; + if (y < 0) { + y = 0; + } else if (y > (SCREEN_HEIGHT - 16)) { + y = SCREEN_HEIGHT - 16; + } + + DrawRect(screen, x, y, 16, 16); + } + + SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0xFF, SDL_ALPHA_OPAQUE); + for (i = 0; i < SDL_JoystickNumHats(joystick); ++i) { + /* Derive the new position */ + int x = SCREEN_WIDTH/2; + int y = SCREEN_HEIGHT/2; + const Uint8 hat_pos = SDL_JoystickGetHat(joystick, i); + + if (hat_pos & SDL_HAT_UP) { + y = 0; + } else if (hat_pos & SDL_HAT_DOWN) { + y = SCREEN_HEIGHT-8; + } + + if (hat_pos & SDL_HAT_LEFT) { + x = 0; + } else if (hat_pos & SDL_HAT_RIGHT) { + x = SCREEN_WIDTH-8; + } + + DrawRect(screen, x, y, 8, 8); + } + + SDL_RenderPresent(screen); + + if (SDL_JoystickGetAttached( joystick ) == 0) { + done = SDL_TRUE; + retval = SDL_TRUE; /* keep going, wait for reattach. */ + } + +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +static SDL_bool +WatchJoystick(SDL_Joystick * joystick) +{ + SDL_Window *window = NULL; + const char *name = NULL; + + retval = SDL_FALSE; + done = SDL_FALSE; + + /* Create a window to display joystick axis position */ + window = SDL_CreateWindow("Joystick Test", SDL_WINDOWPOS_CENTERED, + SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH, + SCREEN_HEIGHT, 0); + if (window == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); + return SDL_FALSE; + } + + screen = SDL_CreateRenderer(window, -1, 0); + if (screen == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); + SDL_DestroyWindow(window); + return SDL_FALSE; + } + + SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0x00, SDL_ALPHA_OPAQUE); + SDL_RenderClear(screen); + SDL_RenderPresent(screen); + SDL_RaiseWindow(window); + + /* Print info about the joystick we are watching */ + name = SDL_JoystickName(joystick); + SDL_Log("Watching joystick %d: (%s)\n", SDL_JoystickInstanceID(joystick), + name ? name : "Unknown Joystick"); + SDL_Log("Joystick has %d axes, %d hats, %d balls, and %d buttons\n", + SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick), + SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick)); + + /* Loop, getting joystick events! */ +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop_arg(loop, joystick, 0, 1); +#else + while (!done) { + loop(joystick); + } +#endif + + SDL_DestroyRenderer(screen); + screen = NULL; + SDL_DestroyWindow(window); + return retval; +} + +int +main(int argc, char *argv[]) +{ + const char *name; + int i; + SDL_Joystick *joystick; + + SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0"); + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize SDL (Note: video is required to start event loop) */ + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + exit(1); + } + + /* Print information about the joysticks */ + SDL_Log("There are %d joysticks attached\n", SDL_NumJoysticks()); + for (i = 0; i < SDL_NumJoysticks(); ++i) { + name = SDL_JoystickNameForIndex(i); + SDL_Log("Joystick %d: %s\n", i, name ? name : "Unknown Joystick"); + joystick = SDL_JoystickOpen(i); + if (joystick == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_JoystickOpen(%d) failed: %s\n", i, + SDL_GetError()); + } else { + char guid[64]; + SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joystick)) == joystick); + SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick), + guid, sizeof (guid)); + SDL_Log(" axes: %d\n", SDL_JoystickNumAxes(joystick)); + SDL_Log(" balls: %d\n", SDL_JoystickNumBalls(joystick)); + SDL_Log(" hats: %d\n", SDL_JoystickNumHats(joystick)); + SDL_Log(" buttons: %d\n", SDL_JoystickNumButtons(joystick)); + SDL_Log("instance id: %d\n", SDL_JoystickInstanceID(joystick)); + SDL_Log(" guid: %s\n", guid); + SDL_JoystickClose(joystick); + } + } + +#if defined(__ANDROID__) || defined(__IPHONEOS__) + if (SDL_NumJoysticks() > 0) { +#else + if (argv[1]) { +#endif + SDL_bool reportederror = SDL_FALSE; + SDL_bool keepGoing = SDL_TRUE; + SDL_Event event; + int device; +#if defined(__ANDROID__) || defined(__IPHONEOS__) + device = 0; +#else + device = atoi(argv[1]); +#endif + joystick = SDL_JoystickOpen(device); + if (joystick != NULL) { + SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joystick)) == joystick); + } + + while ( keepGoing ) { + if (joystick == NULL) { + if ( !reportederror ) { + SDL_Log("Couldn't open joystick %d: %s\n", device, SDL_GetError()); + keepGoing = SDL_FALSE; + reportederror = SDL_TRUE; + } + } else { + reportederror = SDL_FALSE; + keepGoing = WatchJoystick(joystick); + SDL_JoystickClose(joystick); + } + + joystick = NULL; + if (keepGoing) { + SDL_Log("Waiting for attach\n"); + } + while (keepGoing) { + SDL_WaitEvent(&event); + if ((event.type == SDL_QUIT) || (event.type == SDL_FINGERDOWN) + || (event.type == SDL_MOUSEBUTTONDOWN)) { + keepGoing = SDL_FALSE; + } else if (event.type == SDL_JOYDEVICEADDED) { + joystick = SDL_JoystickOpen(device); + if (joystick != NULL) { + SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joystick)) == joystick); + } + break; + } + } + } + } + SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); + + return 0; +} + +#else + +int +main(int argc, char *argv[]) +{ + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Joystick support.\n"); + exit(1); +} + +#endif diff --git a/3rdparty/sdl2-2.0.4/test/testkeys.c b/3rdparty/sdl2-2.0.4/test/testkeys.c new file mode 100644 index 0000000000..aea496caaf --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testkeys.c @@ -0,0 +1,40 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Print out all the scancodes we have, just to verify them */ + +#include +#include +#include +#include + +#include "SDL.h" + +int +main(int argc, char *argv[]) +{ + SDL_Scancode scancode; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (SDL_Init(SDL_INIT_VIDEO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + exit(1); + } + for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) { + SDL_Log("Scancode #%d, \"%s\"\n", scancode, + SDL_GetScancodeName(scancode)); + } + SDL_Quit(); + return (0); +} diff --git a/3rdparty/sdl2-2.0.4/test/testloadso.c b/3rdparty/sdl2-2.0.4/test/testloadso.c new file mode 100644 index 0000000000..fb87fbed7a --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testloadso.c @@ -0,0 +1,82 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Test program to test dynamic loading with the loadso subsystem. +*/ + +#include +#include +#include + +#include "SDL.h" + +typedef int (*fntype) (const char *); + +int +main(int argc, char *argv[]) +{ + int retval = 0; + int hello = 0; + const char *libname = NULL; + const char *symname = NULL; + void *lib = NULL; + fntype fn = NULL; + + if (argc != 3) { + const char *app = argv[0]; + SDL_Log("USAGE: %s \n", app); + SDL_Log(" %s --hello \n", app); + return 1; + } + + /* Initialize SDL */ + if (SDL_Init(0) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return 2; + } + + if (strcmp(argv[1], "--hello") == 0) { + hello = 1; + libname = argv[2]; + symname = "puts"; + } else { + libname = argv[1]; + symname = argv[2]; + } + + lib = SDL_LoadObject(libname); + if (lib == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadObject('%s') failed: %s\n", + libname, SDL_GetError()); + retval = 3; + } else { + fn = (fntype) SDL_LoadFunction(lib, symname); + if (fn == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadFunction('%s') failed: %s\n", + symname, SDL_GetError()); + retval = 4; + } else { + SDL_Log("Found %s in %s at %p\n", symname, libname, fn); + if (hello) { + SDL_Log("Calling function...\n"); + fflush(stdout); + fn(" HELLO, WORLD!\n"); + SDL_Log("...apparently, we survived. :)\n"); + SDL_Log("Unloading library...\n"); + fflush(stdout); + } + } + SDL_UnloadObject(lib); + } + SDL_Quit(); + return retval; +} diff --git a/3rdparty/sdl2-2.0.4/test/testlock.c b/3rdparty/sdl2-2.0.4/test/testlock.c new file mode 100644 index 0000000000..1106ec3bf0 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testlock.c @@ -0,0 +1,126 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Test the thread and mutex locking functions + Also exercises the system's signal/thread interaction +*/ + +#include +#include +#include /* for atexit() */ + +#include "SDL.h" + +static SDL_mutex *mutex = NULL; +static SDL_threadID mainthread; +static SDL_Thread *threads[6]; +static volatile int doterminate = 0; + +/* + * SDL_Quit() shouldn't be used with atexit() directly because + * calling conventions may differ... + */ +static void +SDL_Quit_Wrapper(void) +{ + SDL_Quit(); +} + +void +printid(void) +{ + SDL_Log("Process %lu: exiting\n", SDL_ThreadID()); +} + +void +terminate(int sig) +{ + signal(SIGINT, terminate); + doterminate = 1; +} + +void +closemutex(int sig) +{ + SDL_threadID id = SDL_ThreadID(); + int i; + SDL_Log("Process %lu: Cleaning up...\n", id == mainthread ? 0 : id); + doterminate = 1; + for (i = 0; i < 6; ++i) + SDL_WaitThread(threads[i], NULL); + SDL_DestroyMutex(mutex); + exit(sig); +} + +int SDLCALL +Run(void *data) +{ + if (SDL_ThreadID() == mainthread) + signal(SIGTERM, closemutex); + while (!doterminate) { + SDL_Log("Process %lu ready to work\n", SDL_ThreadID()); + if (SDL_LockMutex(mutex) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't lock mutex: %s", SDL_GetError()); + exit(1); + } + SDL_Log("Process %lu, working!\n", SDL_ThreadID()); + SDL_Delay(1 * 1000); + SDL_Log("Process %lu, done!\n", SDL_ThreadID()); + if (SDL_UnlockMutex(mutex) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't unlock mutex: %s", SDL_GetError()); + exit(1); + } + /* If this sleep isn't done, then threads may starve */ + SDL_Delay(10); + } + if (SDL_ThreadID() == mainthread && doterminate) { + SDL_Log("Process %lu: raising SIGTERM\n", SDL_ThreadID()); + raise(SIGTERM); + } + return (0); +} + +int +main(int argc, char *argv[]) +{ + int i; + int maxproc = 6; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Load the SDL library */ + if (SDL_Init(0) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError()); + exit(1); + } + atexit(SDL_Quit_Wrapper); + + if ((mutex = SDL_CreateMutex()) == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create mutex: %s\n", SDL_GetError()); + exit(1); + } + + mainthread = SDL_ThreadID(); + SDL_Log("Main thread: %lu\n", mainthread); + atexit(printid); + for (i = 0; i < maxproc; ++i) { + char name[64]; + SDL_snprintf(name, sizeof (name), "Worker%d", i); + if ((threads[i] = SDL_CreateThread(Run, name, NULL)) == NULL) + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread!\n"); + } + signal(SIGINT, terminate); + Run(NULL); + + return (0); /* Never reached */ +} diff --git a/3rdparty/sdl2-2.0.4/test/testmessage.c b/3rdparty/sdl2-2.0.4/test/testmessage.c new file mode 100644 index 0000000000..91968c322c --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testmessage.c @@ -0,0 +1,193 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple test of the SDL MessageBox API */ + +#include +#include +#include + +#include "SDL.h" + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDL_Quit(); + exit(rc); +} + +static int +button_messagebox(void *eventNumber) +{ + const SDL_MessageBoxButtonData buttons[] = { + { + SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, + 0, + "OK" + },{ + SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, + 1, + "Cancel" + }, + }; + + SDL_MessageBoxData data = { + SDL_MESSAGEBOX_INFORMATION, + NULL, /* no parent window */ + "Custom MessageBox", + "This is a custom messagebox", + 2, + buttons, + NULL /* Default color scheme */ + }; + + int button = -1; + int success = 0; + if (eventNumber) { + data.message = "This is a custom messagebox from a background thread."; + } + + success = SDL_ShowMessageBox(&data, &button); + if (success == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); + if (eventNumber) { + SDL_UserEvent event; + event.type = (intptr_t)eventNumber; + SDL_PushEvent((SDL_Event*)&event); + return 1; + } else { + quit(2); + } + } + SDL_Log("Pressed button: %d, %s\n", button, button == -1 ? "[closed]" : button == 1 ? "Cancel" : "OK"); + + if (eventNumber) { + SDL_UserEvent event; + event.type = (intptr_t)eventNumber; + SDL_PushEvent((SDL_Event*)&event); + } + + return 0; +} + +int +main(int argc, char *argv[]) +{ + int success; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "Simple MessageBox", + "This is a simple error MessageBox", + NULL); + if (success == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); + quit(1); + } + + success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "Simple MessageBox", + "This is a simple MessageBox with a newline:\r\nHello world!", + NULL); + if (success == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); + quit(1); + } + + /* Google says this is Traditional Chinese for "beef with broccoli" */ + success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "UTF-8 Simple MessageBox", + "Unicode text: '牛肉西蘭花' ...", + NULL); + if (success == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); + quit(1); + } + + /* Google says this is Traditional Chinese for "beef with broccoli" */ + success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "UTF-8 Simple MessageBox", + "Unicode text and newline:\r\n'牛肉西蘭花'\n'牛肉西蘭花'", + NULL); + if (success == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); + quit(1); + } + + /* Google says this is Traditional Chinese for "beef with broccoli" */ + success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "牛肉西蘭花", + "Unicode text in the title.", + NULL); + if (success == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); + quit(1); + } + + button_messagebox(NULL); + + /* Test showing a message box from a background thread. + + On Mac OS X, the video subsystem needs to be initialized for this + to work, since the message box events are dispatched by the Cocoa + subsystem on the main thread. + */ + if (SDL_Init(SDL_INIT_VIDEO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL video subsystem: %s\n", SDL_GetError()); + return (1); + } + { + int status = 0; + SDL_Event event; + intptr_t eventNumber = SDL_RegisterEvents(1); + SDL_Thread* thread = SDL_CreateThread(&button_messagebox, "MessageBox", (void*)eventNumber); + + while (SDL_WaitEvent(&event)) + { + if (event.type == eventNumber) { + break; + } + } + + SDL_WaitThread(thread, &status); + + SDL_Log("Message box thread return %i\n", status); + } + + /* Test showing a message box with a parent window */ + { + SDL_Event event; + SDL_Window *window = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0); + + success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, + "Simple MessageBox", + "This is a simple error MessageBox with a parent window", + window); + if (success == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s\n", SDL_GetError()); + quit(1); + } + + while (SDL_WaitEvent(&event)) + { + if (event.type == SDL_QUIT || event.type == SDL_KEYUP) { + break; + } + } + } + + SDL_Quit(); + return (0); +} diff --git a/3rdparty/sdl2-2.0.4/test/testmultiaudio.c b/3rdparty/sdl2-2.0.4/test/testmultiaudio.c new file mode 100644 index 0000000000..117ef2696c --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testmultiaudio.c @@ -0,0 +1,200 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +#include "SDL.h" + +#include /* for fflush() and stdout */ + +#ifdef __EMSCRIPTEN__ +#include +#endif + +static SDL_AudioSpec spec; +static Uint8 *sound = NULL; /* Pointer to wave data */ +static Uint32 soundlen = 0; /* Length of wave data */ + +typedef struct +{ + SDL_AudioDeviceID dev; + int soundpos; + volatile int done; +} callback_data; + +callback_data cbd[64]; + +void SDLCALL +play_through_once(void *arg, Uint8 * stream, int len) +{ + callback_data *cbd = (callback_data *) arg; + Uint8 *waveptr = sound + cbd->soundpos; + int waveleft = soundlen - cbd->soundpos; + int cpy = len; + if (cpy > waveleft) + cpy = waveleft; + + SDL_memcpy(stream, waveptr, cpy); + len -= cpy; + cbd->soundpos += cpy; + if (len > 0) { + stream += cpy; + SDL_memset(stream, spec.silence, len); + cbd->done++; + } +} + +void +loop() +{ + if(cbd[0].done) { +#ifdef __EMSCRIPTEN__ + emscripten_cancel_main_loop(); +#endif + SDL_PauseAudioDevice(cbd[0].dev, 1); + SDL_CloseAudioDevice(cbd[0].dev); + SDL_FreeWAV(sound); + SDL_Quit(); + } +} + +static void +test_multi_audio(int devcount) +{ + int keep_going = 1; + int i; + +#ifdef __ANDROID__ + SDL_Event event; + + /* Create a Window to get fully initialized event processing for testing pause on Android. */ + SDL_CreateWindow("testmultiaudio", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 320, 240, 0); +#endif + + if (devcount > 64) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Too many devices (%d), clamping to 64...\n", + devcount); + devcount = 64; + } + + spec.callback = play_through_once; + + for (i = 0; i < devcount; i++) { + const char *devname = SDL_GetAudioDeviceName(i, 0); + SDL_Log("playing on device #%d: ('%s')...", i, devname); + fflush(stdout); + + SDL_memset(&cbd[0], '\0', sizeof(callback_data)); + spec.userdata = &cbd[0]; + cbd[0].dev = SDL_OpenAudioDevice(devname, 0, &spec, NULL, 0); + if (cbd[0].dev == 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Open device failed: %s\n", SDL_GetError()); + } else { + SDL_PauseAudioDevice(cbd[0].dev, 0); +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!cbd[0].done) + { + #ifdef __ANDROID__ + /* Empty queue, some application events would prevent pause. */ + while (SDL_PollEvent(&event)){} + #endif + SDL_Delay(100); + } + SDL_PauseAudioDevice(cbd[0].dev, 1); +#endif + SDL_Log("done.\n"); + SDL_CloseAudioDevice(cbd[0].dev); + } + } + + SDL_memset(cbd, '\0', sizeof(cbd)); + + SDL_Log("playing on all devices...\n"); + for (i = 0; i < devcount; i++) { + const char *devname = SDL_GetAudioDeviceName(i, 0); + spec.userdata = &cbd[i]; + cbd[i].dev = SDL_OpenAudioDevice(devname, 0, &spec, NULL, 0); + if (cbd[i].dev == 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Open device %d failed: %s\n", i, SDL_GetError()); + } + } + + for (i = 0; i < devcount; i++) { + if (cbd[i].dev) { + SDL_PauseAudioDevice(cbd[i].dev, 0); + } + } + + while (keep_going) { + keep_going = 0; + for (i = 0; i < devcount; i++) { + if ((cbd[i].dev) && (!cbd[i].done)) { + keep_going = 1; + } + } + #ifdef __ANDROID__ + /* Empty queue, some application events would prevent pause. */ + while (SDL_PollEvent(&event)){} + #endif + + SDL_Delay(100); + } + +#ifndef __EMSCRIPTEN__ + for (i = 0; i < devcount; i++) { + if (cbd[i].dev) { + SDL_PauseAudioDevice(cbd[i].dev, 1); + SDL_CloseAudioDevice(cbd[i].dev); + } + } + + SDL_Log("All done!\n"); +#endif +} + + +int +main(int argc, char **argv) +{ + int devcount = 0; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Load the SDL library */ + if (SDL_Init(SDL_INIT_AUDIO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + + SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver()); + + devcount = SDL_GetNumAudioDevices(0); + if (devcount < 1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Don't see any specific audio devices!\n"); + } else { + if (argv[1] == NULL) { + argv[1] = "sample.wav"; + } + + /* Load the wave file into memory */ + if (SDL_LoadWAV(argv[1], &spec, &sound, &soundlen) == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", argv[1], + SDL_GetError()); + } else { + test_multi_audio(devcount); + SDL_FreeWAV(sound); + } + } + + SDL_Quit(); + return 0; +} diff --git a/3rdparty/sdl2-2.0.0/test/testnative.c b/3rdparty/sdl2-2.0.4/test/testnative.c similarity index 85% rename from 3rdparty/sdl2-2.0.0/test/testnative.c rename to 3rdparty/sdl2-2.0.4/test/testnative.c index 63cba29c3a..049c4c83e9 100644 --- a/3rdparty/sdl2-2.0.0/test/testnative.c +++ b/3rdparty/sdl2-2.0.4/test/testnative.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -58,7 +58,7 @@ LoadSprite(SDL_Renderer *renderer, char *file) /* Load the sprite image */ temp = SDL_LoadBMP(file); if (temp == NULL) { - fprintf(stderr, "Couldn't load %s: %s", file, SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError()); return 0; } @@ -70,7 +70,7 @@ LoadSprite(SDL_Renderer *renderer, char *file) /* Create textures from the image */ sprite = SDL_CreateTextureFromSurface(renderer, temp); if (!sprite) { - fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_FreeSurface(temp); return 0; } @@ -131,8 +131,11 @@ main(int argc, char *argv[]) int sprite_w, sprite_h; SDL_Event event; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + if (SDL_VideoInit(NULL) < 0) { - fprintf(stderr, "Couldn't initialize SDL video: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL video: %s\n", SDL_GetError()); exit(1); } @@ -146,19 +149,19 @@ main(int argc, char *argv[]) } } if (!factory) { - fprintf(stderr, "Couldn't find native window code for %s driver\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't find native window code for %s driver\n", driver); quit(2); } - printf("Creating native window for %s driver\n", driver); + SDL_Log("Creating native window for %s driver\n", driver); native_window = factory->CreateNativeWindow(WINDOW_W, WINDOW_H); if (!native_window) { - fprintf(stderr, "Couldn't create native window\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create native window\n"); quit(3); } window = SDL_CreateWindowFrom(native_window); if (!window) { - fprintf(stderr, "Couldn't create SDL window: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create SDL window: %s\n", SDL_GetError()); quit(4); } SDL_SetWindowTitle(window, "SDL Native Window Test"); @@ -166,7 +169,7 @@ main(int argc, char *argv[]) /* Create the renderer */ renderer = SDL_CreateRenderer(window, -1, 0); if (!renderer) { - fprintf(stderr, "Couldn't create renderer: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s\n", SDL_GetError()); quit(5); } @@ -185,7 +188,7 @@ main(int argc, char *argv[]) positions = (SDL_Rect *) SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect)); velocities = (SDL_Rect *) SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect)); if (!positions || !velocities) { - fprintf(stderr, "Out of memory!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } srand(time(NULL)); diff --git a/3rdparty/sdl2-2.0.0/test/testnative.h b/3rdparty/sdl2-2.0.4/test/testnative.h similarity index 95% rename from 3rdparty/sdl2-2.0.0/test/testnative.h rename to 3rdparty/sdl2-2.0.4/test/testnative.h index 275c0d616d..ed2bf7e52c 100644 --- a/3rdparty/sdl2-2.0.0/test/testnative.h +++ b/3rdparty/sdl2-2.0.4/test/testnative.h @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2011 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/3rdparty/sdl2-2.0.0/test/testnativecocoa.m b/3rdparty/sdl2-2.0.4/test/testnativecocoa.m similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/testnativecocoa.m rename to 3rdparty/sdl2-2.0.4/test/testnativecocoa.m diff --git a/3rdparty/sdl2-2.0.0/test/testnativew32.c b/3rdparty/sdl2-2.0.4/test/testnativew32.c similarity index 97% rename from 3rdparty/sdl2-2.0.0/test/testnativew32.c rename to 3rdparty/sdl2-2.0.4/test/testnativew32.c index 2cb57ddebf..aaea267d26 100644 --- a/3rdparty/sdl2-2.0.0/test/testnativew32.c +++ b/3rdparty/sdl2-2.0.4/test/testnativew32.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/3rdparty/sdl2-2.0.0/test/testnativex11.c b/3rdparty/sdl2-2.0.4/test/testnativex11.c similarity index 94% rename from 3rdparty/sdl2-2.0.0/test/testnativex11.c rename to 3rdparty/sdl2-2.0.4/test/testnativex11.c index 9f4150c493..69fa37bbf1 100644 --- a/3rdparty/sdl2-2.0.0/test/testnativex11.c +++ b/3rdparty/sdl2-2.0.4/test/testnativex11.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/3rdparty/sdl2-2.0.4/test/testoverlay2.c b/3rdparty/sdl2-2.0.4/test/testoverlay2.c new file mode 100644 index 0000000000..453f0f443a --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testoverlay2.c @@ -0,0 +1,511 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +/******************************************************************************** + * * + * Test of the overlay used for moved pictures, test more closed to real life. * + * Running trojan moose :) Coded by Mike Gorchak. * + * * + ********************************************************************************/ + +#include +#include +#include + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#include "SDL.h" + +#define MOOSEPIC_W 64 +#define MOOSEPIC_H 88 + +#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) +#define MOOSEFRAMES_COUNT 10 + +SDL_Color MooseColors[84] = { + {49, 49, 49} + , {66, 24, 0} + , {66, 33, 0} + , {66, 66, 66} + , + {66, 115, 49} + , {74, 33, 0} + , {74, 41, 16} + , {82, 33, 8} + , + {82, 41, 8} + , {82, 49, 16} + , {82, 82, 82} + , {90, 41, 8} + , + {90, 41, 16} + , {90, 57, 24} + , {99, 49, 16} + , {99, 66, 24} + , + {99, 66, 33} + , {99, 74, 33} + , {107, 57, 24} + , {107, 82, 41} + , + {115, 57, 33} + , {115, 66, 33} + , {115, 66, 41} + , {115, 74, 0} + , + {115, 90, 49} + , {115, 115, 115} + , {123, 82, 0} + , {123, 99, 57} + , + {132, 66, 41} + , {132, 74, 41} + , {132, 90, 8} + , {132, 99, 33} + , + {132, 99, 66} + , {132, 107, 66} + , {140, 74, 49} + , {140, 99, 16} + , + {140, 107, 74} + , {140, 115, 74} + , {148, 107, 24} + , {148, 115, 82} + , + {148, 123, 74} + , {148, 123, 90} + , {156, 115, 33} + , {156, 115, 90} + , + {156, 123, 82} + , {156, 132, 82} + , {156, 132, 99} + , {156, 156, 156} + , + {165, 123, 49} + , {165, 123, 90} + , {165, 132, 82} + , {165, 132, 90} + , + {165, 132, 99} + , {165, 140, 90} + , {173, 132, 57} + , {173, 132, 99} + , + {173, 140, 107} + , {173, 140, 115} + , {173, 148, 99} + , {173, 173, 173} + , + {181, 140, 74} + , {181, 148, 115} + , {181, 148, 123} + , {181, 156, 107} + , + {189, 148, 123} + , {189, 156, 82} + , {189, 156, 123} + , {189, 156, 132} + , + {189, 189, 189} + , {198, 156, 123} + , {198, 165, 132} + , {206, 165, 99} + , + {206, 165, 132} + , {206, 173, 140} + , {206, 206, 206} + , {214, 173, 115} + , + {214, 173, 140} + , {222, 181, 148} + , {222, 189, 132} + , {222, 189, 156} + , + {222, 222, 222} + , {231, 198, 165} + , {231, 231, 231} + , {239, 206, 173} +}; + +Uint8 MooseFrame[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE*2]; +SDL_Texture *MooseTexture; +SDL_Rect displayrect; +int window_w; +int window_h; +SDL_Window *window; +SDL_Renderer *renderer; +int paused = 0; +int i; +SDL_bool done = SDL_FALSE; +Uint32 pixel_format = SDL_PIXELFORMAT_YV12; +int fpsdelay; + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDL_Quit(); + exit(rc); +} + +/* All RGB2YUV conversion code and some other parts of code has been taken from testoverlay.c */ + +/* NOTE: These RGB conversion functions are not intended for speed, + only as examples. +*/ + +void +RGBtoYUV(Uint8 * rgb, int *yuv, int monochrome, int luminance) +{ + if (monochrome) { +#if 1 /* these are the two formulas that I found on the FourCC site... */ + yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]); + yuv[1] = 128; + yuv[2] = 128; +#else + yuv[0] = (int)(0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16; + yuv[1] = 128; + yuv[2] = 128; +#endif + } else { +#if 1 /* these are the two formulas that I found on the FourCC site... */ + yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]); + yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128); + yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128); +#else + yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16; + yuv[1] = 128 - (0.148 * rgb[0]) - (0.291 * rgb[1]) + (0.439 * rgb[2]); + yuv[2] = 128 + (0.439 * rgb[0]) - (0.368 * rgb[1]) - (0.071 * rgb[2]); +#endif + } + + if (luminance != 100) { + yuv[0] = yuv[0] * luminance / 100; + if (yuv[0] > 255) + yuv[0] = 255; + } +} + +void +ConvertRGBtoYV12(Uint8 *rgb, Uint8 *out, int w, int h, + int monochrome, int luminance) +{ + int x, y; + int yuv[3]; + Uint8 *op[3]; + + op[0] = out; + op[1] = op[0] + w*h; + op[2] = op[1] + w*h/4; + for (y = 0; y < h; ++y) { + for (x = 0; x < w; ++x) { + RGBtoYUV(rgb, yuv, monochrome, luminance); + *(op[0]++) = yuv[0]; + if (x % 2 == 0 && y % 2 == 0) { + *(op[1]++) = yuv[2]; + *(op[2]++) = yuv[1]; + } + rgb += 3; + } + } +} + +void +ConvertRGBtoNV12(Uint8 *rgb, Uint8 *out, int w, int h, + int monochrome, int luminance) +{ + int x, y; + int yuv[3]; + Uint8 *op[2]; + + op[0] = out; + op[1] = op[0] + w*h; + for (y = 0; y < h; ++y) { + for (x = 0; x < w; ++x) { + RGBtoYUV(rgb, yuv, monochrome, luminance); + *(op[0]++) = yuv[0]; + if (x % 2 == 0 && y % 2 == 0) { + *(op[1]++) = yuv[1]; + *(op[1]++) = yuv[2]; + } + rgb += 3; + } + } +} + +static void +PrintUsage(char *argv0) +{ + SDL_Log("Usage: %s [arg] [arg] [arg] ...\n", argv0); + SDL_Log("\n"); + SDL_Log("Where 'arg' is any of the following options:\n"); + SDL_Log("\n"); + SDL_Log(" -fps \n"); + SDL_Log(" -nodelay\n"); + SDL_Log(" -format (one of the: YV12, IYUV, YUY2, UYVY, YVYU)\n"); + SDL_Log(" -scale (initial scale of the overlay)\n"); + SDL_Log(" -help (shows this help)\n"); + SDL_Log("\n"); + SDL_Log("Press ESC to exit, or SPACE to freeze the movie while application running.\n"); + SDL_Log("\n"); +} + +void +loop() +{ + SDL_Event event; + + while (SDL_PollEvent(&event)) { + switch (event.type) { + case SDL_WINDOWEVENT: + if (event.window.event == SDL_WINDOWEVENT_RESIZED) { + SDL_RenderSetViewport(renderer, NULL); + displayrect.w = window_w = event.window.data1; + displayrect.h = window_h = event.window.data2; + } + break; + case SDL_MOUSEBUTTONDOWN: + displayrect.x = event.button.x - window_w / 2; + displayrect.y = event.button.y - window_h / 2; + break; + case SDL_MOUSEMOTION: + if (event.motion.state) { + displayrect.x = event.motion.x - window_w / 2; + displayrect.y = event.motion.y - window_h / 2; + } + break; + case SDL_KEYDOWN: + if (event.key.keysym.sym == SDLK_SPACE) { + paused = !paused; + break; + } + if (event.key.keysym.sym != SDLK_ESCAPE) { + break; + } + case SDL_QUIT: + done = SDL_TRUE; + break; + } + } + +#ifndef __EMSCRIPTEN__ + SDL_Delay(fpsdelay); +#endif + + if (!paused) { + i = (i + 1) % MOOSEFRAMES_COUNT; + + SDL_UpdateTexture(MooseTexture, NULL, MooseFrame[i], MOOSEPIC_W*SDL_BYTESPERPIXEL(pixel_format)); + } + SDL_RenderClear(renderer); + SDL_RenderCopy(renderer, MooseTexture, NULL, &displayrect); + SDL_RenderPresent(renderer); + +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +int +main(int argc, char **argv) +{ + Uint8 *RawMooseData; + SDL_RWops *handle; + SDL_Window *window; + int j; + int fps = 12; + int fpsdelay; + int nodelay = 0; +#ifdef TEST_NV12 + Uint32 pixel_format = SDL_PIXELFORMAT_NV12; +#else + Uint32 pixel_format = SDL_PIXELFORMAT_YV12; +#endif + int scale = 5; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (SDL_Init(SDL_INIT_VIDEO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return 3; + } + + while (argc > 1) { + if (strcmp(argv[1], "-fps") == 0) { + if (argv[2]) { + fps = atoi(argv[2]); + if (fps == 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, + "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); + quit(10); + } + if ((fps < 0) || (fps > 1000)) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, + "The -fps option must be in range from 1 to 1000, default is 12.\n"); + quit(10); + } + argv += 2; + argc -= 2; + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, + "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); + quit(10); + } + } else if (strcmp(argv[1], "-nodelay") == 0) { + nodelay = 1; + argv += 1; + argc -= 1; + } else if (strcmp(argv[1], "-scale") == 0) { + if (argv[2]) { + scale = atoi(argv[2]); + if (scale == 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, + "The -scale option requires an argument [from 1 to 50], default is 5.\n"); + quit(10); + } + if ((scale < 0) || (scale > 50)) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, + "The -scale option must be in range from 1 to 50, default is 5.\n"); + quit(10); + } + argv += 2; + argc -= 2; + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, + "The -fps option requires an argument [from 1 to 1000], default is 12.\n"); + quit(10); + } + } else if ((strcmp(argv[1], "-help") == 0) + || (strcmp(argv[1], "-h") == 0)) { + PrintUsage(argv[0]); + quit(0); + } else { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unrecognized option: %s.\n", argv[1]); + quit(10); + } + break; + } + + RawMooseData = (Uint8 *) malloc(MOOSEFRAME_SIZE * MOOSEFRAMES_COUNT); + if (RawMooseData == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't allocate memory for movie !\n"); + free(RawMooseData); + quit(1); + } + + /* load the trojan moose images */ + handle = SDL_RWFromFile("moose.dat", "rb"); + if (handle == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !\n"); + free(RawMooseData); + quit(2); + } + + SDL_RWread(handle, RawMooseData, MOOSEFRAME_SIZE, MOOSEFRAMES_COUNT); + + SDL_RWclose(handle); + + /* Create the window and renderer */ + window_w = MOOSEPIC_W * scale; + window_h = MOOSEPIC_H * scale; + window = SDL_CreateWindow("Happy Moose", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + window_w, window_h, + SDL_WINDOW_RESIZABLE); + if (!window) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create window: %s\n", SDL_GetError()); + free(RawMooseData); + quit(4); + } + + renderer = SDL_CreateRenderer(window, -1, 0); + if (!renderer) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create renderer: %s\n", SDL_GetError()); + free(RawMooseData); + quit(4); + } + + MooseTexture = SDL_CreateTexture(renderer, pixel_format, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H); + if (!MooseTexture) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError()); + free(RawMooseData); + quit(5); + } + /* Uncomment this to check vertex color with a YUV texture */ + /* SDL_SetTextureColorMod(MooseTexture, 0xff, 0x80, 0x80); */ + + for (i = 0; i < MOOSEFRAMES_COUNT; i++) { + Uint8 MooseFrameRGB[MOOSEFRAME_SIZE*3]; + Uint8 *rgb; + Uint8 *frame; + + rgb = MooseFrameRGB; + frame = RawMooseData + i * MOOSEFRAME_SIZE; + for (j = 0; j < MOOSEFRAME_SIZE; ++j) { + rgb[0] = MooseColors[frame[j]].r; + rgb[1] = MooseColors[frame[j]].g; + rgb[2] = MooseColors[frame[j]].b; + rgb += 3; + } + switch (pixel_format) { + case SDL_PIXELFORMAT_YV12: + ConvertRGBtoYV12(MooseFrameRGB, MooseFrame[i], MOOSEPIC_W, MOOSEPIC_H, 0, 100); + break; + case SDL_PIXELFORMAT_NV12: + ConvertRGBtoNV12(MooseFrameRGB, MooseFrame[i], MOOSEPIC_W, MOOSEPIC_H, 0, 100); + break; + default: + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unsupported pixel format\n"); + break; + } + } + + free(RawMooseData); + + /* set the start frame */ + i = 0; + if (nodelay) { + fpsdelay = 0; + } else { + fpsdelay = 1000 / fps; + } + + displayrect.x = 0; + displayrect.y = 0; + displayrect.w = window_w; + displayrect.h = window_h; + + /* Ignore key up events, they don't even get filtered */ + SDL_EventState(SDL_KEYUP, SDL_IGNORE); + + /* Loop, waiting for QUIT or RESIZE */ +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, nodelay ? 0 : fps, 1); +#else + while (!done) { + loop(); + } +#endif + + SDL_DestroyRenderer(renderer); + quit(0); + return 0; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.4/test/testplatform.c b/3rdparty/sdl2-2.0.4/test/testplatform.c new file mode 100644 index 0000000000..14acac4b11 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testplatform.c @@ -0,0 +1,204 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +#include + +#include "SDL.h" + +/* + * Watcom C flags these as Warning 201: "Unreachable code" if you just + * compare them directly, so we push it through a function to keep the + * compiler quiet. --ryan. + */ +static int +badsize(size_t sizeoftype, size_t hardcodetype) +{ + return sizeoftype != hardcodetype; +} + +int +TestTypes(SDL_bool verbose) +{ + int error = 0; + + if (badsize(sizeof(Uint8), 1)) { + if (verbose) + SDL_Log("sizeof(Uint8) != 1, instead = %u\n", + (unsigned int)sizeof(Uint8)); + ++error; + } + if (badsize(sizeof(Uint16), 2)) { + if (verbose) + SDL_Log("sizeof(Uint16) != 2, instead = %u\n", + (unsigned int)sizeof(Uint16)); + ++error; + } + if (badsize(sizeof(Uint32), 4)) { + if (verbose) + SDL_Log("sizeof(Uint32) != 4, instead = %u\n", + (unsigned int)sizeof(Uint32)); + ++error; + } + if (badsize(sizeof(Uint64), 8)) { + if (verbose) + SDL_Log("sizeof(Uint64) != 8, instead = %u\n", + (unsigned int)sizeof(Uint64)); + ++error; + } + if (verbose && !error) + SDL_Log("All data types are the expected size.\n"); + + return (error ? 1 : 0); +} + +int +TestEndian(SDL_bool verbose) +{ + int error = 0; + Uint16 value = 0x1234; + int real_byteorder; + Uint16 value16 = 0xCDAB; + Uint16 swapped16 = 0xABCD; + Uint32 value32 = 0xEFBEADDE; + Uint32 swapped32 = 0xDEADBEEF; + Uint64 value64, swapped64; + + value64 = 0xEFBEADDE; + value64 <<= 32; + value64 |= 0xCDAB3412; + swapped64 = 0x1234ABCD; + swapped64 <<= 32; + swapped64 |= 0xDEADBEEF; + + if (verbose) { + SDL_Log("Detected a %s endian machine.\n", + (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? "little" : "big"); + } + if ((*((char *) &value) >> 4) == 0x1) { + real_byteorder = SDL_BIG_ENDIAN; + } else { + real_byteorder = SDL_LIL_ENDIAN; + } + if (real_byteorder != SDL_BYTEORDER) { + if (verbose) { + SDL_Log("Actually a %s endian machine!\n", + (real_byteorder == SDL_LIL_ENDIAN) ? "little" : "big"); + } + ++error; + } + if (verbose) { + SDL_Log("Value 16 = 0x%X, swapped = 0x%X\n", value16, + SDL_Swap16(value16)); + } + if (SDL_Swap16(value16) != swapped16) { + if (verbose) { + SDL_Log("16 bit value swapped incorrectly!\n"); + } + ++error; + } + if (verbose) { + SDL_Log("Value 32 = 0x%X, swapped = 0x%X\n", value32, + SDL_Swap32(value32)); + } + if (SDL_Swap32(value32) != swapped32) { + if (verbose) { + SDL_Log("32 bit value swapped incorrectly!\n"); + } + ++error; + } + if (verbose) { + SDL_Log("Value 64 = 0x%"SDL_PRIX64", swapped = 0x%"SDL_PRIX64"\n", value64, + SDL_Swap64(value64)); + } + if (SDL_Swap64(value64) != swapped64) { + if (verbose) { + SDL_Log("64 bit value swapped incorrectly!\n"); + } + ++error; + } + return (error ? 1 : 0); +} + + +int +TestCPUInfo(SDL_bool verbose) +{ + if (verbose) { + SDL_Log("CPU count: %d\n", SDL_GetCPUCount()); + SDL_Log("CPU cache line size: %d\n", SDL_GetCPUCacheLineSize()); + SDL_Log("RDTSC %s\n", SDL_HasRDTSC()? "detected" : "not detected"); + SDL_Log("AltiVec %s\n", SDL_HasAltiVec()? "detected" : "not detected"); + SDL_Log("MMX %s\n", SDL_HasMMX()? "detected" : "not detected"); + SDL_Log("3DNow! %s\n", SDL_Has3DNow()? "detected" : "not detected"); + SDL_Log("SSE %s\n", SDL_HasSSE()? "detected" : "not detected"); + SDL_Log("SSE2 %s\n", SDL_HasSSE2()? "detected" : "not detected"); + SDL_Log("SSE3 %s\n", SDL_HasSSE3()? "detected" : "not detected"); + SDL_Log("SSE4.1 %s\n", SDL_HasSSE41()? "detected" : "not detected"); + SDL_Log("SSE4.2 %s\n", SDL_HasSSE42()? "detected" : "not detected"); + SDL_Log("AVX %s\n", SDL_HasAVX()? "detected" : "not detected"); + SDL_Log("System RAM %d MB\n", SDL_GetSystemRAM()); + } + return (0); +} + +int +TestAssertions(SDL_bool verbose) +{ + SDL_assert(1); + SDL_assert_release(1); + SDL_assert_paranoid(1); + SDL_assert(0 || 1); + SDL_assert_release(0 || 1); + SDL_assert_paranoid(0 || 1); + +#if 0 /* enable this to test assertion failures. */ + SDL_assert_release(1 == 2); + SDL_assert_release(5 < 4); + SDL_assert_release(0 && "This is a test"); +#endif + + { + const SDL_AssertData *item = SDL_GetAssertionReport(); + while (item) { + SDL_Log("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n", + item->condition, item->function, item->filename, + item->linenum, item->trigger_count, + item->always_ignore ? "yes" : "no"); + item = item->next; + } + } + return (0); +} + +int +main(int argc, char *argv[]) +{ + SDL_bool verbose = SDL_TRUE; + int status = 0; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (argv[1] && (SDL_strcmp(argv[1], "-q") == 0)) { + verbose = SDL_FALSE; + } + if (verbose) { + SDL_Log("This system is running %s\n", SDL_GetPlatform()); + } + + status += TestTypes(verbose); + status += TestEndian(verbose); + status += TestCPUInfo(verbose); + status += TestAssertions(verbose); + + return status; +} diff --git a/3rdparty/sdl2-2.0.4/test/testpower.c b/3rdparty/sdl2-2.0.4/test/testpower.c new file mode 100644 index 0000000000..300d21a24d --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testpower.c @@ -0,0 +1,80 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +/* Simple test of power subsystem. */ + +#include +#include "SDL.h" + +static void +report_power(void) +{ + int seconds, percent; + const SDL_PowerState state = SDL_GetPowerInfo(&seconds, &percent); + char *statestr = NULL; + + SDL_Log("SDL-reported power info...\n"); + switch (state) { + case SDL_POWERSTATE_UNKNOWN: + statestr = "Unknown"; + break; + case SDL_POWERSTATE_ON_BATTERY: + statestr = "On battery"; + break; + case SDL_POWERSTATE_NO_BATTERY: + statestr = "No battery"; + break; + case SDL_POWERSTATE_CHARGING: + statestr = "Charging"; + break; + case SDL_POWERSTATE_CHARGED: + statestr = "Charged"; + break; + default: + statestr = "!!API ERROR!!"; + break; + } + + SDL_Log("State: %s\n", statestr); + + if (percent == -1) { + SDL_Log("Percent left: unknown\n"); + } else { + SDL_Log("Percent left: %d%%\n", percent); + } + + if (seconds == -1) { + SDL_Log("Time left: unknown\n"); + } else { + SDL_Log("Time left: %d minutes, %d seconds\n", (int) (seconds / 60), + (int) (seconds % 60)); + } +} + + +int +main(int argc, char *argv[]) +{ + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (SDL_Init(0) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init() failed: %s\n", SDL_GetError()); + return 1; + } + + report_power(); + + SDL_Quit(); + return 0; +} + +/* end of testpower.c ... */ diff --git a/3rdparty/sdl2-2.0.4/test/testrelative.c b/3rdparty/sdl2-2.0.4/test/testrelative.c new file mode 100644 index 0000000000..59d23f6388 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testrelative.c @@ -0,0 +1,126 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple program: Test relative mouse motion */ + +#include +#include +#include + +#include "SDL_test_common.h" + +#ifdef __EMSCRIPTEN__ +#include +#endif + +static SDLTest_CommonState *state; +int i, done; +SDL_Rect rect; +SDL_Event event; + +static void +DrawRects(SDL_Renderer * renderer, SDL_Rect * rect) +{ + SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); + SDL_RenderFillRect(renderer, rect); +} + +static void +loop(){ + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + switch(event.type) { + case SDL_MOUSEMOTION: + { + rect.x += event.motion.xrel; + rect.y += event.motion.yrel; + } + break; + } + } + for (i = 0; i < state->num_windows; ++i) { + SDL_Rect viewport; + SDL_Renderer *renderer = state->renderers[i]; + if (state->windows[i] == NULL) + continue; + SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF); + SDL_RenderClear(renderer); + + /* Wrap the cursor rectangle at the screen edges to keep it visible */ + SDL_RenderGetViewport(renderer, &viewport); + if (rect.x < viewport.x) rect.x += viewport.w; + if (rect.y < viewport.y) rect.y += viewport.h; + if (rect.x > viewport.x + viewport.w) rect.x -= viewport.w; + if (rect.y > viewport.y + viewport.h) rect.y -= viewport.h; + + DrawRects(renderer, &rect); + + SDL_RenderPresent(renderer); + } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +int +main(int argc, char *argv[]) +{ + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + for (i = 1; i < argc; ++i) { + SDLTest_CommonArg(state, i); + } + if (!SDLTest_CommonInit(state)) { + return 2; + } + + /* Create the windows and initialize the renderers */ + for (i = 0; i < state->num_windows; ++i) { + SDL_Renderer *renderer = state->renderers[i]; + SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE); + SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); + SDL_RenderClear(renderer); + } + + srand((unsigned int)time(NULL)); + if(SDL_SetRelativeMouseMode(SDL_TRUE) < 0) { + return 3; + }; + + rect.x = DEFAULT_WINDOW_WIDTH / 2; + rect.y = DEFAULT_WINDOW_HEIGHT / 2; + rect.w = 10; + rect.h = 10; + /* Main render loop */ + done = 0; +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + loop(); + } +#endif + SDLTest_CommonQuit(state); + return 0; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.0/test/testrendercopyex.c b/3rdparty/sdl2-2.0.4/test/testrendercopyex.c similarity index 82% rename from 3rdparty/sdl2-2.0.0/test/testrendercopyex.c rename to 3rdparty/sdl2-2.0.4/test/testrendercopyex.c index 6dd59c0ac2..856abf7d0b 100644 --- a/3rdparty/sdl2-2.0.0/test/testrendercopyex.c +++ b/3rdparty/sdl2-2.0.4/test/testrendercopyex.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -15,6 +15,10 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#endif + #include "SDL_test_common.h" @@ -29,6 +33,9 @@ typedef struct { int scale_direction; } DrawState; +DrawState *drawstates; +int done; + /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) @@ -46,7 +53,7 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) /* Load the sprite image */ temp = SDL_LoadBMP(file); if (temp == NULL) { - fprintf(stderr, "Couldn't load %s: %s", file, SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError()); return NULL; } @@ -77,7 +84,7 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) /* Create textures from the image */ texture = SDL_CreateTextureFromSurface(renderer, temp); if (!texture) { - fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_FreeSurface(temp); return NULL; } @@ -127,18 +134,41 @@ Draw(DrawState *s) /* Update the screen! */ SDL_RenderPresent(s->renderer); - //SDL_Delay(10); + /* SDL_Delay(10); */ +} + +void loop() +{ + int i; + SDL_Event event; + + /* Check for events */ + + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + for (i = 0; i < state->num_windows; ++i) { + if (state->windows[i] == NULL) + continue; + Draw(&drawstates[i]); + } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif } int main(int argc, char *argv[]) { - DrawState *drawstates; - int i, done; - SDL_Event event; + int i; int frames; Uint32 then, now; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { @@ -149,7 +179,7 @@ main(int argc, char *argv[]) consumed = SDLTest_CommonArg(state, i); if (consumed == 0) { - fprintf(stderr, "Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); + SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); return 1; } i += consumed; @@ -178,22 +208,20 @@ main(int argc, char *argv[]) frames = 0; then = SDL_GetTicks(); done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else while (!done) { - /* Check for events */ ++frames; - while (SDL_PollEvent(&event)) { - SDLTest_CommonEvent(state, &event, &done); - } - for (i = 0; i < state->num_windows; ++i) { - Draw(&drawstates[i]); + loop(); } - } - +#endif /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); - printf("%2.2f frames per second\n", fps); + SDL_Log("%2.2f frames per second\n", fps); } SDL_stack_free(drawstates); diff --git a/3rdparty/sdl2-2.0.0/test/testrendertarget.c b/3rdparty/sdl2-2.0.4/test/testrendertarget.c similarity index 84% rename from 3rdparty/sdl2-2.0.0/test/testrendertarget.c rename to 3rdparty/sdl2-2.0.4/test/testrendertarget.c index bc31048251..c5e1dce05b 100644 --- a/3rdparty/sdl2-2.0.0/test/testrendertarget.c +++ b/3rdparty/sdl2-2.0.4/test/testrendertarget.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -15,6 +15,10 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#endif + #include "SDL_test_common.h" @@ -29,6 +33,10 @@ typedef struct { int scale_direction; } DrawState; +DrawState *drawstates; +int done; +SDL_bool test_composite = SDL_FALSE; + /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) @@ -46,7 +54,7 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) /* Load the sprite image */ temp = SDL_LoadBMP(file); if (temp == NULL) { - fprintf(stderr, "Couldn't load %s: %s", file, SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError()); return NULL; } @@ -77,7 +85,7 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) /* Create textures from the image */ texture = SDL_CreateTextureFromSurface(renderer, temp); if (!texture) { - fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_FreeSurface(temp); return NULL; } @@ -87,7 +95,7 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) return texture; } -void +SDL_bool DrawComposite(DrawState *s) { SDL_Rect viewport, R; @@ -114,7 +122,7 @@ DrawComposite(DrawState *s) SDL_RenderCopy(s->renderer, A, NULL, NULL); SDL_RenderReadPixels(s->renderer, NULL, SDL_PIXELFORMAT_ARGB8888, &P, sizeof(P)); - printf("Blended pixel: 0x%8.8X\n", P); + SDL_Log("Blended pixel: 0x%8.8X\n", P); SDL_DestroyTexture(A); SDL_DestroyTexture(B); @@ -167,9 +175,10 @@ DrawComposite(DrawState *s) /* Update the screen! */ SDL_RenderPresent(s->renderer); + return SDL_TRUE; } -void +SDL_bool Draw(DrawState *s) { SDL_Rect viewport; @@ -178,6 +187,10 @@ Draw(DrawState *s) SDL_RenderGetViewport(s->renderer, &viewport); target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h); + if (!target) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create render target texture: %s\n", SDL_GetError()); + return SDL_FALSE; + } SDL_SetRenderTarget(s->renderer, target); /* Draw the background */ @@ -206,17 +219,44 @@ Draw(DrawState *s) /* Update the screen! */ SDL_RenderPresent(s->renderer); + return SDL_TRUE; +} + +void +loop() +{ + int i; + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + for (i = 0; i < state->num_windows; ++i) { + if (state->windows[i] == NULL) + continue; + if (test_composite) { + if (!DrawComposite(&drawstates[i])) done = 1; + } else { + if (!Draw(&drawstates[i])) done = 1; + } + } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif } int main(int argc, char *argv[]) { - DrawState *drawstates; - int i, done; - SDL_Event event; + int i; int frames; Uint32 then, now; - SDL_bool test_composite = SDL_FALSE; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); @@ -235,8 +275,7 @@ main(int argc, char *argv[]) } } if (consumed < 0) { - fprintf(stderr, - "Usage: %s %s [--composite]\n", + SDL_Log("Usage: %s %s [--composite]\n", argv[0], SDLTest_CommonUsage(state)); quit(1); } @@ -270,26 +309,21 @@ main(int argc, char *argv[]) frames = 0; then = SDL_GetTicks(); done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else while (!done) { - /* Check for events */ ++frames; - while (SDL_PollEvent(&event)) { - SDLTest_CommonEvent(state, &event, &done); - } - for (i = 0; i < state->num_windows; ++i) { - if (test_composite) { - DrawComposite(&drawstates[i]); - } else { - Draw(&drawstates[i]); - } - } + loop(); } +#endif /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); - printf("%2.2f frames per second\n", fps); + SDL_Log("%2.2f frames per second\n", fps); } SDL_stack_free(drawstates); diff --git a/3rdparty/sdl2-2.0.4/test/testresample.c b/3rdparty/sdl2-2.0.4/test/testresample.c new file mode 100644 index 0000000000..0e92bbe11a --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testresample.c @@ -0,0 +1,118 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +#include "SDL.h" + +int +main(int argc, char **argv) +{ + SDL_AudioSpec spec; + SDL_AudioCVT cvt; + Uint32 len = 0; + Uint8 *data = NULL; + int cvtfreq = 0; + int bitsize = 0; + int blockalign = 0; + int avgbytes = 0; + SDL_RWops *io = NULL; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (argc != 4) { + SDL_Log("USAGE: %s in.wav out.wav newfreq\n", argv[0]); + return 1; + } + + cvtfreq = SDL_atoi(argv[3]); + + if (SDL_Init(SDL_INIT_AUDIO) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init() failed: %s\n", SDL_GetError()); + return 2; + } + + if (SDL_LoadWAV(argv[1], &spec, &data, &len) == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "failed to load %s: %s\n", argv[1], SDL_GetError()); + SDL_Quit(); + return 3; + } + + if (SDL_BuildAudioCVT(&cvt, spec.format, spec.channels, spec.freq, + spec.format, spec.channels, cvtfreq) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "failed to build CVT: %s\n", SDL_GetError()); + SDL_FreeWAV(data); + SDL_Quit(); + return 4; + } + + cvt.len = len; + cvt.buf = (Uint8 *) SDL_malloc(len * cvt.len_mult); + if (cvt.buf == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory.\n"); + SDL_FreeWAV(data); + SDL_Quit(); + return 5; + } + SDL_memcpy(cvt.buf, data, len); + + if (SDL_ConvertAudio(&cvt) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Conversion failed: %s\n", SDL_GetError()); + SDL_free(cvt.buf); + SDL_FreeWAV(data); + SDL_Quit(); + return 6; + } + + /* write out a WAV header... */ + io = SDL_RWFromFile(argv[2], "wb"); + if (io == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "fopen('%s') failed: %s\n", argv[2], SDL_GetError()); + SDL_free(cvt.buf); + SDL_FreeWAV(data); + SDL_Quit(); + return 7; + } + + bitsize = SDL_AUDIO_BITSIZE(spec.format); + blockalign = (bitsize / 8) * spec.channels; + avgbytes = cvtfreq * blockalign; + + SDL_WriteLE32(io, 0x46464952); /* RIFF */ + SDL_WriteLE32(io, len * cvt.len_mult + 36); + SDL_WriteLE32(io, 0x45564157); /* WAVE */ + SDL_WriteLE32(io, 0x20746D66); /* fmt */ + SDL_WriteLE32(io, 16); /* chunk size */ + SDL_WriteLE16(io, 1); /* uncompressed */ + SDL_WriteLE16(io, spec.channels); /* channels */ + SDL_WriteLE32(io, cvtfreq); /* sample rate */ + SDL_WriteLE32(io, avgbytes); /* average bytes per second */ + SDL_WriteLE16(io, blockalign); /* block align */ + SDL_WriteLE16(io, bitsize); /* significant bits per sample */ + SDL_WriteLE32(io, 0x61746164); /* data */ + SDL_WriteLE32(io, cvt.len_cvt); /* size */ + SDL_RWwrite(io, cvt.buf, cvt.len_cvt, 1); + + if (SDL_RWclose(io) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "fclose('%s') failed: %s\n", argv[2], SDL_GetError()); + SDL_free(cvt.buf); + SDL_FreeWAV(data); + SDL_Quit(); + return 8; + } /* if */ + + SDL_free(cvt.buf); + SDL_FreeWAV(data); + SDL_Quit(); + return 0; +} /* main */ + +/* end of testresample.c ... */ diff --git a/3rdparty/sdl2-2.0.0/test/testrumble.c b/3rdparty/sdl2-2.0.4/test/testrumble.c similarity index 77% rename from 3rdparty/sdl2-2.0.0/test/testrumble.c rename to 3rdparty/sdl2-2.0.4/test/testrumble.c index e5b5424d46..ea7466d2da 100644 --- a/3rdparty/sdl2-2.0.0/test/testrumble.c +++ b/3rdparty/sdl2-2.0.4/test/testrumble.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -26,7 +26,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * includes */ #include -#include /* printf */ #include /* strstr */ #include /* isdigit */ @@ -34,8 +33,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #ifndef SDL_HAPTIC_DISABLED -#include "SDL_haptic.h" - static SDL_Haptic *haptic; @@ -51,12 +48,15 @@ main(int argc, char **argv) char *name; int index; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + name = NULL; index = -1; if (argc > 1) { name = argv[1]; if ((strcmp(name, "--help") == 0) || (strcmp(name, "-h") == 0)) { - printf("USAGE: %s [device]\n" + SDL_Log("USAGE: %s [device]\n" "If device is a two-digit number it'll use it as an index, otherwise\n" "it'll use it as if it were part of the device's name.\n", argv[0]); @@ -73,7 +73,7 @@ main(int argc, char **argv) /* Initialize the force feedbackness */ SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC); - printf("%d Haptic devices detected.\n", SDL_NumHaptics()); + SDL_Log("%d Haptic devices detected.\n", SDL_NumHaptics()); if (SDL_NumHaptics() > 0) { /* We'll just use index or the first force feedback device found */ if (name == NULL) { @@ -87,7 +87,7 @@ main(int argc, char **argv) } if (i >= SDL_NumHaptics()) { - printf("Unable to find device matching '%s', aborting.\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to find device matching '%s', aborting.\n", name); return 1; } @@ -95,13 +95,13 @@ main(int argc, char **argv) haptic = SDL_HapticOpen(i); if (haptic == NULL) { - printf("Unable to create the haptic device: %s\n", + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n", SDL_GetError()); return 1; } - printf("Device: %s\n", SDL_HapticName(i)); + SDL_Log("Device: %s\n", SDL_HapticName(i)); } else { - printf("No Haptic devices found!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Haptic devices found!\n"); return 1; } @@ -109,25 +109,25 @@ main(int argc, char **argv) SDL_ClearError(); if (SDL_HapticRumbleSupported(haptic) == SDL_FALSE) { - printf("\nRumble not supported!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Rumble not supported!\n"); return 1; } if (SDL_HapticRumbleInit(haptic) != 0) { - printf("\nFailed to initialize rumble: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to initialize rumble: %s\n", SDL_GetError()); return 1; } - printf("Playing 2 second rumble at 0.5 magnitude.\n"); + SDL_Log("Playing 2 second rumble at 0.5 magnitude.\n"); if (SDL_HapticRumblePlay(haptic, 0.5, 5000) != 0) { - printf("\nFailed to play rumble: %s\n", SDL_GetError() ); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError() ); return 1; } SDL_Delay(2000); - printf("Stopping rumble.\n"); + SDL_Log("Stopping rumble.\n"); SDL_HapticRumbleStop(haptic); SDL_Delay(2000); - printf("Playing 2 second rumble at 0.3 magnitude.\n"); + SDL_Log("Playing 2 second rumble at 0.3 magnitude.\n"); if (SDL_HapticRumblePlay(haptic, 0.3f, 5000) != 0) { - printf("\nFailed to play rumble: %s\n", SDL_GetError() ); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to play rumble: %s\n", SDL_GetError() ); return 1; } SDL_Delay(2000); @@ -145,7 +145,7 @@ main(int argc, char **argv) int main(int argc, char *argv[]) { - fprintf(stderr, "SDL compiled without Haptic support.\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL compiled without Haptic support.\n"); exit(1); } diff --git a/3rdparty/sdl2-2.0.0/test/testscale.c b/3rdparty/sdl2-2.0.4/test/testscale.c similarity index 81% rename from 3rdparty/sdl2-2.0.0/test/testscale.c rename to 3rdparty/sdl2-2.0.4/test/testscale.c index 0f0096c6e2..9f5fdbff10 100644 --- a/3rdparty/sdl2-2.0.0/test/testscale.c +++ b/3rdparty/sdl2-2.0.4/test/testscale.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -15,6 +15,10 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#endif + #include "SDL_test_common.h" #define WINDOW_WIDTH 640 @@ -31,6 +35,9 @@ typedef struct { int scale_direction; } DrawState; +DrawState *drawstates; +int done; + /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) @@ -48,7 +55,7 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) /* Load the sprite image */ temp = SDL_LoadBMP(file); if (temp == NULL) { - fprintf(stderr, "Couldn't load %s: %s", file, SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError()); return NULL; } @@ -79,7 +86,7 @@ LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent) /* Create textures from the image */ texture = SDL_CreateTextureFromSurface(renderer, temp); if (!texture) { - fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_FreeSurface(temp); return NULL; } @@ -120,15 +127,38 @@ Draw(DrawState *s) SDL_RenderPresent(s->renderer); } +void +loop() +{ + int i; + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + for (i = 0; i < state->num_windows; ++i) { + if (state->windows[i] == NULL) + continue; + Draw(&drawstates[i]); + } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + int main(int argc, char *argv[]) { - DrawState *drawstates; - int i, done; - SDL_Event event; + int i; int frames; Uint32 then, now; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + /* Initialize test framework */ state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { @@ -139,7 +169,7 @@ main(int argc, char *argv[]) consumed = SDLTest_CommonArg(state, i); if (consumed == 0) { - fprintf(stderr, "Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); + SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); return 1; } i += consumed; @@ -168,22 +198,21 @@ main(int argc, char *argv[]) frames = 0; then = SDL_GetTicks(); done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else while (!done) { - /* Check for events */ ++frames; - while (SDL_PollEvent(&event)) { - SDLTest_CommonEvent(state, &event, &done); - } - for (i = 0; i < state->num_windows; ++i) { - Draw(&drawstates[i]); - } + loop(); } +#endif /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); - printf("%2.2f frames per second\n", fps); + SDL_Log("%2.2f frames per second\n", fps); } SDL_stack_free(drawstates); diff --git a/3rdparty/sdl2-2.0.4/test/testsem.c b/3rdparty/sdl2-2.0.4/test/testsem.c new file mode 100644 index 0000000000..b8d3b27491 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testsem.c @@ -0,0 +1,130 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple test of the SDL semaphore code */ + +#include +#include +#include + +#include "SDL.h" + +#define NUM_THREADS 10 + +static SDL_sem *sem; +int alive = 1; + +int SDLCALL +ThreadFunc(void *data) +{ + int threadnum = (int) (uintptr_t) data; + while (alive) { + SDL_SemWait(sem); + SDL_Log("Thread number %d has got the semaphore (value = %d)!\n", + threadnum, SDL_SemValue(sem)); + SDL_Delay(200); + SDL_SemPost(sem); + SDL_Log("Thread number %d has released the semaphore (value = %d)!\n", + threadnum, SDL_SemValue(sem)); + SDL_Delay(1); /* For the scheduler */ + } + SDL_Log("Thread number %d exiting.\n", threadnum); + return 0; +} + +static void +killed(int sig) +{ + alive = 0; +} + +static void +TestWaitTimeout(void) +{ + Uint32 start_ticks; + Uint32 end_ticks; + Uint32 duration; + int retval; + + sem = SDL_CreateSemaphore(0); + SDL_Log("Waiting 2 seconds on semaphore\n"); + + start_ticks = SDL_GetTicks(); + retval = SDL_SemWaitTimeout(sem, 2000); + end_ticks = SDL_GetTicks(); + + duration = end_ticks - start_ticks; + + /* Accept a little offset in the effective wait */ + if (duration > 1900 && duration < 2050) + SDL_Log("Wait done.\n"); + else + SDL_Log("Wait took %d milliseconds\n", duration); + + /* Check to make sure the return value indicates timed out */ + if (retval != SDL_MUTEX_TIMEDOUT) + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_SemWaitTimeout returned: %d; expected: %d\n", retval, SDL_MUTEX_TIMEDOUT); +} + +int +main(int argc, char **argv) +{ + SDL_Thread *threads[NUM_THREADS]; + uintptr_t i; + int init_sem; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (argc < 2) { + SDL_Log("Usage: %s init_value\n", argv[0]); + return (1); + } + + /* Load the SDL library */ + if (SDL_Init(0) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + signal(SIGTERM, killed); + signal(SIGINT, killed); + + init_sem = atoi(argv[1]); + sem = SDL_CreateSemaphore(init_sem); + + SDL_Log("Running %d threads, semaphore value = %d\n", NUM_THREADS, + init_sem); + /* Create all the threads */ + for (i = 0; i < NUM_THREADS; ++i) { + char name[64]; + SDL_snprintf(name, sizeof (name), "Thread%u", (unsigned int) i); + threads[i] = SDL_CreateThread(ThreadFunc, name, (void *) i); + } + + /* Wait 10 seconds */ + SDL_Delay(10 * 1000); + + /* Wait for all threads to finish */ + SDL_Log("Waiting for threads to finish\n"); + alive = 0; + for (i = 0; i < NUM_THREADS; ++i) { + SDL_WaitThread(threads[i], NULL); + } + SDL_Log("Finished waiting for threads\n"); + + SDL_DestroySemaphore(sem); + + TestWaitTimeout(); + + SDL_Quit(); + return (0); +} diff --git a/3rdparty/sdl2-2.0.0/test/testshader.c b/3rdparty/sdl2-2.0.4/test/testshader.c similarity index 80% rename from 3rdparty/sdl2-2.0.0/test/testshader.c rename to 3rdparty/sdl2-2.0.4/test/testshader.c index 376b445e79..fc6da29875 100644 --- a/3rdparty/sdl2-2.0.0/test/testshader.c +++ b/3rdparty/sdl2-2.0.4/test/testshader.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -11,7 +11,6 @@ */ /* This is a simple example of using GLSL shaders with SDL */ -#include /* for printf() */ #include "SDL.h" #ifdef HAVE_OPENGL @@ -139,7 +138,7 @@ static SDL_bool CompileShader(GLhandleARB shader, const char *source) glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); info = SDL_stack_alloc(char, length+1); glGetInfoLogARB(shader, length, NULL, info); - fprintf(stderr, "Failed to compile shader:\n%s\n%s", source, info); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to compile shader:\n%s\n%s", source, info); SDL_stack_free(info); return SDL_FALSE; @@ -188,7 +187,7 @@ static SDL_bool CompileShaderProgram(ShaderData *data) } glUseProgramObjectARB(0); - return (glGetError() == GL_NO_ERROR); + return (glGetError() == GL_NO_ERROR) ? SDL_TRUE : SDL_FALSE; } static void DestroyShaderProgram(ShaderData *data) @@ -245,7 +244,7 @@ static SDL_bool InitShaders() /* Compile all the shaders */ for (i = 0; i < NUM_SHADERS; ++i) { if (!CompileShaderProgram(&shaders[i])) { - fprintf(stderr, "Unable to compile shader!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to compile shader!\n"); return SDL_FALSE; } } @@ -333,19 +332,19 @@ SDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord) } /* A general OpenGL initialization function. Sets all of the initial parameters. */ -void InitGL(int Width, int Height) // We call this right after our OpenGL window is created. +void InitGL(int Width, int Height) /* We call this right after our OpenGL window is created. */ { GLdouble aspect; glViewport(0, 0, Width, Height); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // This Will Clear The Background Color To Black - glClearDepth(1.0); // Enables Clearing Of The Depth Buffer - glDepthFunc(GL_LESS); // The Type Of Depth Test To Do - glEnable(GL_DEPTH_TEST); // Enables Depth Testing - glShadeModel(GL_SMOOTH); // Enables Smooth Color Shading + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); /* This Will Clear The Background Color To Black */ + glClearDepth(1.0); /* Enables Clearing Of The Depth Buffer */ + glDepthFunc(GL_LESS); /* The Type Of Depth Test To Do */ + glEnable(GL_DEPTH_TEST); /* Enables Depth Testing */ + glShadeModel(GL_SMOOTH); /* Enables Smooth Color Shading */ glMatrixMode(GL_PROJECTION); - glLoadIdentity(); // Reset The Projection Matrix + glLoadIdentity(); /* Reset The Projection Matrix */ aspect = (GLdouble)Width / Height; glOrtho(-3.0, 3.0, -3.0 / aspect, 3.0 / aspect, 0.0, 1.0); @@ -364,29 +363,29 @@ void DrawGLScene(SDL_Window *window, GLuint texture, GLfloat * texcoord) MAXY }; - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer - glLoadIdentity(); // Reset The View + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Clear The Screen And The Depth Buffer */ + glLoadIdentity(); /* Reset The View */ - glTranslatef(-1.5f,0.0f,0.0f); // Move Left 1.5 Units + glTranslatef(-1.5f,0.0f,0.0f); /* Move Left 1.5 Units */ - // draw a triangle (in smooth coloring mode) - glBegin(GL_POLYGON); // start drawing a polygon - glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red - glVertex3f( 0.0f, 1.0f, 0.0f); // Top - glColor3f(0.0f,1.0f,0.0f); // Set The Color To Green - glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right - glColor3f(0.0f,0.0f,1.0f); // Set The Color To Blue - glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left - glEnd(); // we're done with the polygon (smooth color interpolation) + /* draw a triangle (in smooth coloring mode) */ + glBegin(GL_POLYGON); /* start drawing a polygon */ + glColor3f(1.0f,0.0f,0.0f); /* Set The Color To Red */ + glVertex3f( 0.0f, 1.0f, 0.0f); /* Top */ + glColor3f(0.0f,1.0f,0.0f); /* Set The Color To Green */ + glVertex3f( 1.0f,-1.0f, 0.0f); /* Bottom Right */ + glColor3f(0.0f,0.0f,1.0f); /* Set The Color To Blue */ + glVertex3f(-1.0f,-1.0f, 0.0f); /* Bottom Left */ + glEnd(); /* we're done with the polygon (smooth color interpolation) */ - glTranslatef(3.0f,0.0f,0.0f); // Move Right 3 Units + glTranslatef(3.0f,0.0f,0.0f); /* Move Right 3 Units */ - // Enable blending + /* Enable blending */ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - // draw a textured square (quadrilateral) + /* draw a textured square (quadrilateral) */ glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); glColor3f(1.0f,1.0f,1.0f); @@ -394,23 +393,23 @@ void DrawGLScene(SDL_Window *window, GLuint texture, GLfloat * texcoord) glUseProgramObjectARB(shaders[current_shader].program); } - glBegin(GL_QUADS); // start drawing a polygon (4 sided) + glBegin(GL_QUADS); /* start drawing a polygon (4 sided) */ glTexCoord2f(texcoord[MINX], texcoord[MINY]); - glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left + glVertex3f(-1.0f, 1.0f, 0.0f); /* Top Left */ glTexCoord2f(texcoord[MAXX], texcoord[MINY]); - glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right + glVertex3f( 1.0f, 1.0f, 0.0f); /* Top Right */ glTexCoord2f(texcoord[MAXX], texcoord[MAXY]); - glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right + glVertex3f( 1.0f,-1.0f, 0.0f); /* Bottom Right */ glTexCoord2f(texcoord[MINX], texcoord[MAXY]); - glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left - glEnd(); // done with the polygon + glVertex3f(-1.0f,-1.0f, 0.0f); /* Bottom Left */ + glEnd(); /* done with the polygon */ if (shaders_supported) { glUseProgramObjectARB(0); } glDisable(GL_TEXTURE_2D); - // swap buffers to display, since we're double buffered. + /* swap buffers to display, since we're double buffered. */ SDL_GL_SwapWindow(window); } @@ -422,29 +421,32 @@ int main(int argc, char **argv) GLuint texture; GLfloat texcoords[4]; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + /* Initialize SDL for video output */ if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { - fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to initialize SDL: %s\n", SDL_GetError()); exit(1); } /* Create a 640x480 OpenGL screen */ window = SDL_CreateWindow( "Shader Demo", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_OPENGL ); if ( !window ) { - fprintf(stderr, "Unable to create OpenGL window: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create OpenGL window: %s\n", SDL_GetError()); SDL_Quit(); exit(2); } if ( !SDL_GL_CreateContext(window)) { - fprintf(stderr, "Unable to create OpenGL context: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create OpenGL context: %s\n", SDL_GetError()); SDL_Quit(); exit(2); } surface = SDL_LoadBMP("icon.bmp"); if ( ! surface ) { - fprintf(stderr, "Unable to load icon.bmp: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to load icon.bmp: %s\n", SDL_GetError()); SDL_Quit(); exit(3); } @@ -454,9 +456,9 @@ int main(int argc, char **argv) /* Loop, drawing and checking events */ InitGL(640, 480); if (InitShaders()) { - printf("Shaders supported, press SPACE to cycle them.\n"); + SDL_Log("Shaders supported, press SPACE to cycle them.\n"); } else { - printf("Shaders not supported!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Shaders not supported!\n"); } done = 0; while ( ! done ) { @@ -489,7 +491,7 @@ int main(int argc, char **argv) int main(int argc, char *argv[]) { - printf("No OpenGL support on this system\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No OpenGL support on this system\n"); return 1; } diff --git a/3rdparty/sdl2-2.0.4/test/testshape.c b/3rdparty/sdl2-2.0.4/test/testshape.c new file mode 100644 index 0000000000..00750a9708 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testshape.c @@ -0,0 +1,201 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +#include +#include +#include +#include "SDL.h" +#include "SDL_shape.h" + +#define SHAPED_WINDOW_X 150 +#define SHAPED_WINDOW_Y 150 +#define SHAPED_WINDOW_DIMENSION 640 + +typedef struct LoadedPicture { + SDL_Surface *surface; + SDL_Texture *texture; + SDL_WindowShapeMode mode; + const char* name; +} LoadedPicture; + +void render(SDL_Renderer *renderer,SDL_Texture *texture,SDL_Rect texture_dimensions) +{ + /* Clear render-target to blue. */ + SDL_SetRenderDrawColor(renderer,0x00,0x00,0xff,0xff); + SDL_RenderClear(renderer); + + /* Render the texture. */ + SDL_RenderCopy(renderer,texture,&texture_dimensions,&texture_dimensions); + + SDL_RenderPresent(renderer); +} + +int main(int argc,char** argv) +{ + Uint8 num_pictures; + LoadedPicture* pictures; + int i, j; + SDL_PixelFormat* format = NULL; + SDL_Window *window; + SDL_Renderer *renderer; + SDL_Color black = {0,0,0,0xff}; + SDL_Event event; + int event_pending = 0; + int should_exit = 0; + unsigned int current_picture; + int button_down; + Uint32 pixelFormat = 0; + int access = 0; + SDL_Rect texture_dimensions; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if(argc < 2) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Shape requires at least one bitmap file as argument."); + exit(-1); + } + + if(SDL_VideoInit(NULL) == -1) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not initialize SDL video."); + exit(-2); + } + + num_pictures = argc - 1; + pictures = (LoadedPicture *)SDL_malloc(sizeof(LoadedPicture)*num_pictures); + for(i=0;iformat; + if(SDL_ISPIXELFORMAT_ALPHA(format->format)) { + pictures[i].mode.mode = ShapeModeBinarizeAlpha; + pictures[i].mode.parameters.binarizationCutoff = 255; + } + else { + pictures[i].mode.mode = ShapeModeColorKey; + pictures[i].mode.parameters.colorKey = black; + } + } + + window = SDL_CreateShapedWindow("SDL_Shape test", + SHAPED_WINDOW_X, SHAPED_WINDOW_Y, + SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION, + 0); + SDL_SetWindowPosition(window, SHAPED_WINDOW_X, SHAPED_WINDOW_Y); + if(window == NULL) { + for(i=0;i= num_pictures) + current_picture = 0; + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Changing to shaped bmp: %s", pictures[current_picture].name); + SDL_QueryTexture(pictures[current_picture].texture,(Uint32 *)&pixelFormat,(int *)&access,&texture_dimensions.w,&texture_dimensions.h); + SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h); + SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode); + } + if(event.type == SDL_QUIT) + should_exit = 1; + event_pending = 0; + } + render(renderer,pictures[current_picture].texture,texture_dimensions); + SDL_Delay(10); + } + + /* Free the textures. */ + for(i=0;i + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -15,6 +15,10 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#endif + #include "SDL_test.h" #include "SDL_test_common.h" @@ -38,19 +42,15 @@ static SDL_BlendMode blendMode = SDL_BLENDMODE_BLEND; /* -1: infinite random moves (default); >=0: enables N deterministic moves */ static int iterations = -1; +int done; + /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) { - if (sprites) { - SDL_free(sprites); - } - if (positions) { - SDL_free(positions); - } - if (velocities) { - SDL_free(velocities); - } + SDL_free(sprites); + SDL_free(positions); + SDL_free(velocities); SDLTest_CommonQuit(state); exit(rc); } @@ -64,7 +64,7 @@ LoadSprite(const char *file) /* Load the sprite image */ temp = SDL_LoadBMP(file); if (temp == NULL) { - fprintf(stderr, "Couldn't load %s: %s", file, SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError()); return (-1); } sprite_w = temp->w; @@ -95,7 +95,7 @@ LoadSprite(const char *file) SDL_Renderer *renderer = state->renderers[i]; sprites[i] = SDL_CreateTextureFromSurface(renderer, temp); if (!sprites[i]) { - fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_FreeSurface(temp); return (-1); } @@ -203,13 +203,13 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) velocity = &velocities[i]; position->x += velocity->x; if ((position->x < 0) || (position->x >= (viewport.w - sprite_w))) { - velocity->x = -velocity->x; - position->x += velocity->x; + velocity->x = -velocity->x; + position->x += velocity->x; } position->y += velocity->y; if ((position->y < 0) || (position->y >= (viewport.h - sprite_h))) { - velocity->y = -velocity->y; - position->y += velocity->y; + velocity->y = -velocity->y; + position->y += velocity->y; } } @@ -227,7 +227,7 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) /* Draw sprites */ for (i = 0; i < num_sprites; ++i) { position = &positions[i]; - + /* Blit the sprite onto the screen */ SDL_RenderCopy(renderer, sprite, NULL, position); } @@ -236,13 +236,34 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) SDL_RenderPresent(renderer); } +void +loop() +{ + int i; + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + for (i = 0; i < state->num_windows; ++i) { + if (state->windows[i] == NULL) + continue; + MoveSprites(state->renderers[i], sprites[i]); + } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + int main(int argc, char *argv[]) { - int i, done; - SDL_Event event; + int i; Uint32 then, now, frames; - Uint64 seed; + Uint64 seed; const char *icon = "icon.bmp"; /* Initialize parameters */ @@ -254,8 +275,6 @@ main(int argc, char *argv[]) return 1; } - state->window_flags |= SDL_WINDOW_RESIZABLE; - for (i = 1; i < argc;) { int consumed; @@ -299,8 +318,7 @@ main(int argc, char *argv[]) } } if (consumed < 0) { - fprintf(stderr, - "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha] [--iterations N] [num_sprites] [icon.bmp]\n", + SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha] [--iterations N] [num_sprites] [icon.bmp]\n", argv[0], SDLTest_CommonUsage(state)); quit(1); } @@ -314,7 +332,7 @@ main(int argc, char *argv[]) sprites = (SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites)); if (!sprites) { - fprintf(stderr, "Out of memory!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } for (i = 0; i < state->num_windows; ++i) { @@ -330,7 +348,7 @@ main(int argc, char *argv[]) positions = (SDL_Rect *) SDL_malloc(num_sprites * sizeof(SDL_Rect)); velocities = (SDL_Rect *) SDL_malloc(num_sprites * sizeof(SDL_Rect)); if (!positions || !velocities) { - fprintf(stderr, "Out of memory!\n"); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n"); quit(2); } @@ -360,22 +378,21 @@ main(int argc, char *argv[]) frames = 0; then = SDL_GetTicks(); done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else while (!done) { - /* Check for events */ ++frames; - while (SDL_PollEvent(&event)) { - SDLTest_CommonEvent(state, &event, &done); - } - for (i = 0; i < state->num_windows; ++i) { - MoveSprites(state->renderers[i], sprites[i]); - } + loop(); } +#endif /* Print out some timing information */ now = SDL_GetTicks(); if (now > then) { double fps = ((double) frames * 1000) / (now - then); - printf("%2.2f frames per second\n", fps); + SDL_Log("%2.2f frames per second\n", fps); } quit(0); return 0; diff --git a/3rdparty/sdl2-2.0.0/test/testspriteminimal.c b/3rdparty/sdl2-2.0.4/test/testspriteminimal.c similarity index 82% rename from 3rdparty/sdl2-2.0.0/test/testspriteminimal.c rename to 3rdparty/sdl2-2.0.4/test/testspriteminimal.c index 6f3ac25c04..05f97309c0 100644 --- a/3rdparty/sdl2-2.0.0/test/testspriteminimal.c +++ b/3rdparty/sdl2-2.0.4/test/testspriteminimal.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -15,6 +15,10 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#endif + #include "SDL.h" #define WINDOW_WIDTH 640 @@ -27,6 +31,9 @@ static SDL_Rect positions[NUM_SPRITES]; static SDL_Rect velocities[NUM_SPRITES]; static int sprite_w, sprite_h; +SDL_Renderer *renderer; +int done; + /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) @@ -42,7 +49,7 @@ LoadSprite(char *file, SDL_Renderer *renderer) /* Load the sprite image */ temp = SDL_LoadBMP(file); if (temp == NULL) { - fprintf(stderr, "Couldn't load %s: %s\n", file, SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", file, SDL_GetError()); return (-1); } sprite_w = temp->w; @@ -73,7 +80,7 @@ LoadSprite(char *file, SDL_Renderer *renderer) /* Create textures from the image */ sprite = SDL_CreateTextureFromSurface(renderer, temp); if (!sprite) { - fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_FreeSurface(temp); return (-1); } @@ -118,13 +125,33 @@ MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite) SDL_RenderPresent(renderer); } +void loop() +{ + SDL_Event event; + + /* Check for events */ + while (SDL_PollEvent(&event)) { + if (event.type == SDL_QUIT || event.type == SDL_KEYDOWN) { + done = 1; + } + } + MoveSprites(renderer, sprite); +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + int main(int argc, char *argv[]) { SDL_Window *window; - SDL_Renderer *renderer; - int i, done; - SDL_Event event; + int i; + + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); if (SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_HEIGHT, 0, &window, &renderer) < 0) { quit(2); @@ -151,16 +178,14 @@ main(int argc, char *argv[]) /* Main render loop */ done = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else while (!done) { - /* Check for events */ - while (SDL_PollEvent(&event)) { - if (event.type == SDL_QUIT || event.type == SDL_KEYDOWN) { - done = 1; - } - } - MoveSprites(renderer, sprite); + loop(); } - +#endif quit(0); return 0; /* to prevent compiler warning */ diff --git a/3rdparty/sdl2-2.0.4/test/teststreaming.c b/3rdparty/sdl2-2.0.4/test/teststreaming.c new file mode 100644 index 0000000000..86cc13917b --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/teststreaming.c @@ -0,0 +1,190 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +/******************************************************************************** + * * + * Running moose :) Coded by Mike Gorchak. * + * * + ********************************************************************************/ + +#include +#include + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#include "SDL.h" + +#define MOOSEPIC_W 64 +#define MOOSEPIC_H 88 + +#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H) +#define MOOSEFRAMES_COUNT 10 + +SDL_Color MooseColors[84] = { + {49, 49, 49, 255}, {66, 24, 0, 255}, {66, 33, 0, 255}, {66, 66, 66, 255}, + {66, 115, 49, 255}, {74, 33, 0, 255}, {74, 41, 16, 255}, {82, 33, 8, 255}, + {82, 41, 8, 255}, {82, 49, 16, 255}, {82, 82, 82, 255}, {90, 41, 8, 255}, + {90, 41, 16, 255}, {90, 57, 24, 255}, {99, 49, 16, 255}, {99, 66, 24, 255}, + {99, 66, 33, 255}, {99, 74, 33, 255}, {107, 57, 24, 255}, {107, 82, 41, 255}, + {115, 57, 33, 255}, {115, 66, 33, 255}, {115, 66, 41, 255}, {115, 74, 0, 255}, + {115, 90, 49, 255}, {115, 115, 115, 255}, {123, 82, 0, 255}, {123, 99, 57, 255}, + {132, 66, 41, 255}, {132, 74, 41, 255}, {132, 90, 8, 255}, {132, 99, 33, 255}, + {132, 99, 66, 255}, {132, 107, 66, 255}, {140, 74, 49, 255}, {140, 99, 16, 255}, + {140, 107, 74, 255}, {140, 115, 74, 255}, {148, 107, 24, 255}, {148, 115, 82, 255}, + {148, 123, 74, 255}, {148, 123, 90, 255}, {156, 115, 33, 255}, {156, 115, 90, 255}, + {156, 123, 82, 255}, {156, 132, 82, 255}, {156, 132, 99, 255}, {156, 156, 156, 255}, + {165, 123, 49, 255}, {165, 123, 90, 255}, {165, 132, 82, 255}, {165, 132, 90, 255}, + {165, 132, 99, 255}, {165, 140, 90, 255}, {173, 132, 57, 255}, {173, 132, 99, 255}, + {173, 140, 107, 255}, {173, 140, 115, 255}, {173, 148, 99, 255}, {173, 173, 173, 255}, + {181, 140, 74, 255}, {181, 148, 115, 255}, {181, 148, 123, 255}, {181, 156, 107, 255}, + {189, 148, 123, 255}, {189, 156, 82, 255}, {189, 156, 123, 255}, {189, 156, 132, 255}, + {189, 189, 189, 255}, {198, 156, 123, 255}, {198, 165, 132, 255}, {206, 165, 99, 255}, + {206, 165, 132, 255}, {206, 173, 140, 255}, {206, 206, 206, 255}, {214, 173, 115, 255}, + {214, 173, 140, 255}, {222, 181, 148, 255}, {222, 189, 132, 255}, {222, 189, 156, 255}, + {222, 222, 222, 255}, {231, 198, 165, 255}, {231, 231, 231, 255}, {239, 206, 173, 255} +}; + +Uint8 MooseFrames[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE]; + +SDL_Renderer *renderer; +int frame; +SDL_Texture *MooseTexture; +SDL_bool done = SDL_FALSE; + +void quit(int rc) +{ + SDL_Quit(); + exit(rc); +} + +void UpdateTexture(SDL_Texture *texture, int frame) +{ + SDL_Color *color; + Uint8 *src; + Uint32 *dst; + int row, col; + void *pixels; + int pitch; + + if (SDL_LockTexture(texture, NULL, &pixels, &pitch) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't lock texture: %s\n", SDL_GetError()); + quit(5); + } + src = MooseFrames[frame]; + for (row = 0; row < MOOSEPIC_H; ++row) { + dst = (Uint32*)((Uint8*)pixels + row * pitch); + for (col = 0; col < MOOSEPIC_W; ++col) { + color = &MooseColors[*src++]; + *dst++ = (0xFF000000|(color->r<<16)|(color->g<<8)|color->b); + } + } + SDL_UnlockTexture(texture); +} + +void +loop() +{ + SDL_Event event; + + while (SDL_PollEvent(&event)) { + switch (event.type) { + case SDL_KEYDOWN: + if (event.key.keysym.sym == SDLK_ESCAPE) { + done = SDL_TRUE; + } + break; + case SDL_QUIT: + done = SDL_TRUE; + break; + } + } + + frame = (frame + 1) % MOOSEFRAMES_COUNT; + UpdateTexture(MooseTexture, frame); + + SDL_RenderClear(renderer); + SDL_RenderCopy(renderer, MooseTexture, NULL, NULL); + SDL_RenderPresent(renderer); + +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +int +main(int argc, char **argv) +{ + SDL_Window *window; + SDL_RWops *handle; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (SDL_Init(SDL_INIT_VIDEO) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return 1; + } + + /* load the moose images */ + handle = SDL_RWFromFile("moose.dat", "rb"); + if (handle == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !\n"); + quit(2); + } + SDL_RWread(handle, MooseFrames, MOOSEFRAME_SIZE, MOOSEFRAMES_COUNT); + SDL_RWclose(handle); + + + /* Create the window and renderer */ + window = SDL_CreateWindow("Happy Moose", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + MOOSEPIC_W*4, MOOSEPIC_H*4, + SDL_WINDOW_RESIZABLE); + if (!window) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create window: %s\n", SDL_GetError()); + quit(3); + } + + renderer = SDL_CreateRenderer(window, -1, 0); + if (!renderer) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create renderer: %s\n", SDL_GetError()); + quit(4); + } + + MooseTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H); + if (!MooseTexture) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError()); + quit(5); + } + + /* Loop, waiting for QUIT or the escape key */ + frame = 0; + +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + loop(); + } +#endif + + SDL_DestroyRenderer(renderer); + + quit(0); + return 0; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.4/test/testthread.c b/3rdparty/sdl2-2.0.4/test/testthread.c new file mode 100644 index 0000000000..90e2c60c58 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testthread.c @@ -0,0 +1,98 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Simple test of the SDL threading code */ + +#include +#include +#include + +#include "SDL.h" + +static SDL_TLSID tls; +static int alive = 0; + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDL_Quit(); + exit(rc); +} + +int SDLCALL +ThreadFunc(void *data) +{ + SDL_TLSSet(tls, "baby thread", NULL); + SDL_Log("Started thread %s: My thread id is %lu, thread data = %s\n", + (char *) data, SDL_ThreadID(), (const char *)SDL_TLSGet(tls)); + while (alive) { + SDL_Log("Thread '%s' is alive!\n", (char *) data); + SDL_Delay(1 * 1000); + } + SDL_Log("Thread '%s' exiting!\n", (char *) data); + return (0); +} + +static void +killed(int sig) +{ + SDL_Log("Killed with SIGTERM, waiting 5 seconds to exit\n"); + SDL_Delay(5 * 1000); + alive = 0; + quit(0); +} + +int +main(int argc, char *argv[]) +{ + SDL_Thread *thread; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + /* Load the SDL library */ + if (SDL_Init(0) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + + tls = SDL_TLSCreate(); + SDL_assert(tls); + SDL_TLSSet(tls, "main thread", NULL); + SDL_Log("Main thread data initially: %s\n", (const char *)SDL_TLSGet(tls)); + + alive = 1; + thread = SDL_CreateThread(ThreadFunc, "One", "#1"); + if (thread == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread: %s\n", SDL_GetError()); + quit(1); + } + SDL_Delay(5 * 1000); + SDL_Log("Waiting for thread #1\n"); + alive = 0; + SDL_WaitThread(thread, NULL); + + SDL_Log("Main thread data finally: %s\n", (const char *)SDL_TLSGet(tls)); + + alive = 1; + signal(SIGTERM, killed); + thread = SDL_CreateThread(ThreadFunc, "Two", "#2"); + if (thread == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread: %s\n", SDL_GetError()); + quit(1); + } + raise(SIGTERM); + + SDL_Quit(); /* Never reached */ + return (0); /* Never reached */ +} diff --git a/3rdparty/sdl2-2.0.4/test/testtimer.c b/3rdparty/sdl2-2.0.4/test/testtimer.c new file mode 100644 index 0000000000..32b7490982 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testtimer.c @@ -0,0 +1,122 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Test program to check the resolution of the SDL timer on the current + platform +*/ + +#include +#include + +#include "SDL.h" + +#define DEFAULT_RESOLUTION 1 + +static int ticks = 0; + +static Uint32 SDLCALL +ticktock(Uint32 interval, void *param) +{ + ++ticks; + return (interval); +} + +static Uint32 SDLCALL +callback(Uint32 interval, void *param) +{ + SDL_Log("Timer %d : param = %d\n", interval, (int) (uintptr_t) param); + return interval; +} + +int +main(int argc, char *argv[]) +{ + int i, desired; + SDL_TimerID t1, t2, t3; + Uint32 start32, now32; + Uint64 start, now; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + if (SDL_Init(SDL_INIT_TIMER) < 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); + return (1); + } + + /* Start the timer */ + desired = 0; + if (argv[1]) { + desired = atoi(argv[1]); + } + if (desired == 0) { + desired = DEFAULT_RESOLUTION; + } + t1 = SDL_AddTimer(desired, ticktock, NULL); + + /* Wait 10 seconds */ + SDL_Log("Waiting 10 seconds\n"); + SDL_Delay(10 * 1000); + + /* Stop the timer */ + SDL_RemoveTimer(t1); + + /* Print the results */ + if (ticks) { + SDL_Log("Timer resolution: desired = %d ms, actual = %f ms\n", + desired, (double) (10 * 1000) / ticks); + } + + /* Test multiple timers */ + SDL_Log("Testing multiple timers...\n"); + t1 = SDL_AddTimer(100, callback, (void *) 1); + if (!t1) + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Could not create timer 1: %s\n", SDL_GetError()); + t2 = SDL_AddTimer(50, callback, (void *) 2); + if (!t2) + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Could not create timer 2: %s\n", SDL_GetError()); + t3 = SDL_AddTimer(233, callback, (void *) 3); + if (!t3) + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Could not create timer 3: %s\n", SDL_GetError()); + + /* Wait 10 seconds */ + SDL_Log("Waiting 10 seconds\n"); + SDL_Delay(10 * 1000); + + SDL_Log("Removing timer 1 and waiting 5 more seconds\n"); + SDL_RemoveTimer(t1); + + SDL_Delay(5 * 1000); + + SDL_RemoveTimer(t2); + SDL_RemoveTimer(t3); + + start = SDL_GetPerformanceCounter(); + for (i = 0; i < 1000000; ++i) { + ticktock(0, NULL); + } + now = SDL_GetPerformanceCounter(); + SDL_Log("1 million iterations of ticktock took %f ms\n", (double)((now - start)*1000) / SDL_GetPerformanceFrequency()); + + SDL_Log("Performance counter frequency: %"SDL_PRIu64"\n", (unsigned long long) SDL_GetPerformanceFrequency()); + start32 = SDL_GetTicks(); + start = SDL_GetPerformanceCounter(); + SDL_Delay(1000); + now = SDL_GetPerformanceCounter(); + now32 = SDL_GetTicks(); + SDL_Log("Delay 1 second = %d ms in ticks, %f ms according to performance counter\n", (now32-start32), (double)((now - start)*1000) / SDL_GetPerformanceFrequency()); + + SDL_Quit(); + return (0); +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.4/test/testver.c b/3rdparty/sdl2-2.0.4/test/testver.c new file mode 100644 index 0000000000..f0e3bcf3c2 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testver.c @@ -0,0 +1,47 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ + +/* Test program to compare the compile-time version of SDL with the linked + version of SDL +*/ + +#include +#include + +#include "SDL.h" +#include "SDL_revision.h" + +int +main(int argc, char *argv[]) +{ + SDL_version compiled; + SDL_version linked; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + +#if SDL_VERSION_ATLEAST(2, 0, 0) + SDL_Log("Compiled with SDL 2.0 or newer\n"); +#else + SDL_Log("Compiled with SDL older than 2.0\n"); +#endif + SDL_VERSION(&compiled); + SDL_Log("Compiled version: %d.%d.%d.%d (%s)\n", + compiled.major, compiled.minor, compiled.patch, + SDL_REVISION_NUMBER, SDL_REVISION); + SDL_GetVersion(&linked); + SDL_Log("Linked version: %d.%d.%d.%d (%s)\n", + linked.major, linked.minor, linked.patch, + SDL_GetRevisionNumber(), SDL_GetRevision()); + SDL_Quit(); + return (0); +} diff --git a/3rdparty/sdl2-2.0.4/test/testviewport.c b/3rdparty/sdl2-2.0.4/test/testviewport.c new file mode 100644 index 0000000000..7ed4e6ec35 --- /dev/null +++ b/3rdparty/sdl2-2.0.4/test/testviewport.c @@ -0,0 +1,217 @@ +/* + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely. +*/ +/* Simple program: Check viewports */ + +#include +#include +#include + +#ifdef __EMSCRIPTEN__ +#include +#endif + +#include "SDL_test.h" +#include "SDL_test_common.h" + + +static SDLTest_CommonState *state; + +SDL_Rect viewport; +int done, j; +SDL_bool use_target = SDL_FALSE; +#ifdef __EMSCRIPTEN__ +Uint32 wait_start; +#endif + +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDLTest_CommonQuit(state); + exit(rc); +} + +void +DrawOnViewport(SDL_Renderer * renderer, SDL_Rect viewport) +{ + SDL_Rect rect; + + /* Set the viewport */ + SDL_RenderSetViewport(renderer, &viewport); + + /* Draw a gray background */ + SDL_SetRenderDrawColor(renderer, 0x80, 0x80, 0x80, 0xFF); + SDL_RenderClear(renderer); + + /* Test inside points */ + SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xF, 0xFF); + SDL_RenderDrawPoint(renderer, viewport.h/2 + 10, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 - 10, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 - 10); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 + 10); + + /* Test horizontal and vertical lines */ + SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); + SDL_RenderDrawLine(renderer, 1, 0, viewport.w-2, 0); + SDL_RenderDrawLine(renderer, 1, viewport.h-1, viewport.w-2, viewport.h-1); + SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h-2); + SDL_RenderDrawLine(renderer, viewport.w-1, 1, viewport.w-1, viewport.h-2); + + /* Test diagonal lines */ + SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0xFF, 0xFF); + SDL_RenderDrawLine(renderer, 0, 0, + viewport.w-1, viewport.h-1); + SDL_RenderDrawLine(renderer, viewport.w-1, 0, + 0, viewport.h-1); + + /* Test outside points */ + SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xF, 0xFF); + SDL_RenderDrawPoint(renderer, viewport.h/2 + viewport.h, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 - viewport.h, viewport.w/2); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 - viewport.w); + SDL_RenderDrawPoint(renderer, viewport.h/2 , viewport.w/2 + viewport.w); + + /* Add a box at the top */ + rect.w = 8; + rect.h = 8; + rect.x = (viewport.w - rect.w) / 2; + rect.y = 0; + SDL_RenderFillRect(renderer, &rect); +} + +void +loop() +{ +#ifdef __EMSCRIPTEN__ + /* Avoid using delays */ + if(SDL_GetTicks() - wait_start < 1000) + return; + wait_start = SDL_GetTicks(); +#endif + SDL_Event event; + int i; + /* Check for events */ + while (SDL_PollEvent(&event)) { + SDLTest_CommonEvent(state, &event, &done); + } + + /* Move a viewport box in steps around the screen */ + viewport.x = j * 100; + viewport.y = viewport.x; + viewport.w = 100 + j * 50; + viewport.h = 100 + j * 50; + j = (j + 1) % 4; + SDL_Log("Current Viewport x=%i y=%i w=%i h=%i", viewport.x, viewport.y, viewport.w, viewport.h); + + for (i = 0; i < state->num_windows; ++i) { + if (state->windows[i] == NULL) + continue; + + /* Draw using viewport */ + DrawOnViewport(state->renderers[i], viewport); + + /* Update the screen! */ + if (use_target) { + SDL_SetRenderTarget(state->renderers[i], NULL); + SDL_RenderCopy(state->renderers[i], state->targets[i], NULL, NULL); + SDL_RenderPresent(state->renderers[i]); + SDL_SetRenderTarget(state->renderers[i], state->targets[i]); + } else { + SDL_RenderPresent(state->renderers[i]); + } + } + +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +int +main(int argc, char *argv[]) +{ + int i; + Uint32 then, now, frames; + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + if (consumed == 0) { + consumed = -1; + if (SDL_strcasecmp(argv[i], "--target") == 0) { + use_target = SDL_TRUE; + consumed = 1; + } + } + if (consumed < 0) { + SDL_Log("Usage: %s %s [--target]\n", + argv[0], SDLTest_CommonUsage(state)); + quit(1); + } + i += consumed; + } + if (!SDLTest_CommonInit(state)) { + quit(2); + } + + if (use_target) { + int w, h; + + for (i = 0; i < state->num_windows; ++i) { + SDL_GetWindowSize(state->windows[i], &w, &h); + state->targets[i] = SDL_CreateTexture(state->renderers[i], SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h); + SDL_SetRenderTarget(state->renderers[i], state->targets[i]); + } + } + + for (i = 0; i < state->num_windows; ++i) { + SDL_Renderer *renderer = state->renderers[i]; + SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF); + SDL_RenderClear(renderer); + } + + /* Main render loop */ + frames = 0; + then = SDL_GetTicks(); + done = 0; + j = 0; + +#ifdef __EMSCRIPTEN__ + wait_start = SDL_GetTicks(); + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + ++frames; + loop(); + SDL_Delay(1000); + } +#endif + + /* Print out some timing information */ + now = SDL_GetTicks(); + if (now > then) { + double fps = ((double) frames * 1000) / (now - then); + SDL_Log("%2.2f frames per second\n", fps); + } + quit(0); + return 0; +} + +/* vi: set ts=4 sw=4 expandtab: */ diff --git a/3rdparty/sdl2-2.0.0/test/testwm2.c b/3rdparty/sdl2-2.0.4/test/testwm2.c similarity index 81% rename from 3rdparty/sdl2-2.0.0/test/testwm2.c rename to 3rdparty/sdl2-2.0.4/test/testwm2.c index efe6ea4dd1..94ba513bed 100644 --- a/3rdparty/sdl2-2.0.0/test/testwm2.c +++ b/3rdparty/sdl2-2.0.4/test/testwm2.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -13,22 +13,16 @@ #include #include +#ifdef __EMSCRIPTEN__ +#include +#endif + #include "SDL_test_common.h" static SDLTest_CommonState *state; +int done; -/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ -static void -quit(int rc) -{ - SDLTest_CommonQuit(state); - exit(rc); -} - -int -main(int argc, char *argv[]) -{ - static const char *cursorNames[] = { +static const char *cursorNames[] = { "arrow", "ibeam", "wait", @@ -41,41 +35,22 @@ main(int argc, char *argv[]) "sizeALL", "NO", "hand", - }; - - int i, done; - SDL_Event event; - int system_cursor = -1; - SDL_Cursor *cursor = NULL; - - SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS); - - /* Initialize test framework */ - state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); - if (!state) { - return 1; - } - state->skip_renderer = SDL_TRUE; - for (i = 1; i < argc;) { - int consumed; +}; +int system_cursor = -1; +SDL_Cursor *cursor = NULL; - consumed = SDLTest_CommonArg(state, i); - if (consumed == 0) { - consumed = -1; - } - if (consumed < 0) { - fprintf(stderr, "Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); - quit(1); - } - i += consumed; - } - if (!SDLTest_CommonInit(state)) { - quit(2); - } +/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ +static void +quit(int rc) +{ + SDLTest_CommonQuit(state); + exit(rc); +} - /* Main render loop */ - done = 0; - while (!done) { +void +loop() +{ + SDL_Event event; /* Check for events */ while (SDL_PollEvent(&event)) { SDLTest_CommonEvent(state, &event, &done); @@ -84,7 +59,7 @@ main(int argc, char *argv[]) if (event.window.event == SDL_WINDOWEVENT_RESIZED) { SDL_Window *window = SDL_GetWindowFromID(event.window.windowID); if (window) { - printf("Window %d resized to %dx%d\n", + SDL_Log("Window %d resized to %dx%d\n", event.window.windowID, event.window.data1, event.window.data2); @@ -93,7 +68,7 @@ main(int argc, char *argv[]) if (event.window.event == SDL_WINDOWEVENT_MOVED) { SDL_Window *window = SDL_GetWindowFromID(event.window.windowID); if (window) { - printf("Window %d moved to %d,%d (display %s)\n", + SDL_Log("Window %d moved to %d,%d (display %s)\n", event.window.windowID, event.window.data1, event.window.data2, @@ -125,11 +100,59 @@ main(int argc, char *argv[]) } } } +#ifdef __EMSCRIPTEN__ + if (done) { + emscripten_cancel_main_loop(); + } +#endif +} + +int +main(int argc, char *argv[]) +{ + int i; + + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + + SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS); + + /* Initialize test framework */ + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); + if (!state) { + return 1; + } + state->skip_renderer = SDL_TRUE; + for (i = 1; i < argc;) { + int consumed; + + consumed = SDLTest_CommonArg(state, i); + if (consumed == 0) { + consumed = -1; + } + if (consumed < 0) { + SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); + quit(1); + } + i += consumed; + } + if (!SDLTest_CommonInit(state)) { + quit(2); + } + + /* Main render loop */ + done = 0; +#ifdef __EMSCRIPTEN__ + emscripten_set_main_loop(loop, 0, 1); +#else + while (!done) { + loop(); } +#endif SDL_FreeCursor(cursor); quit(0); - // keep the compiler happy ... + /* keep the compiler happy ... */ return(0); } diff --git a/3rdparty/sdl2-2.0.0/test/torturethread.c b/3rdparty/sdl2-2.0.4/test/torturethread.c similarity index 76% rename from 3rdparty/sdl2-2.0.0/test/torturethread.c rename to 3rdparty/sdl2-2.0.4/test/torturethread.c index 795b60b935..5719a71950 100644 --- a/3rdparty/sdl2-2.0.0/test/torturethread.c +++ b/3rdparty/sdl2-2.0.4/test/torturethread.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1997-2013 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -18,7 +18,6 @@ #include #include "SDL.h" -#include "SDL_thread.h" #define NUMTHREADS 10 @@ -36,7 +35,7 @@ int SDLCALL SubThreadFunc(void *data) { while (!*(int volatile *) data) { - ; /*SDL_Delay(10); *//* do nothing */ + ; /* SDL_Delay(10); *//* do nothing */ } return 0; } @@ -49,7 +48,7 @@ ThreadFunc(void *data) int i; int tid = (int) (uintptr_t) data; - fprintf(stderr, "Creating Thread %d\n", tid); + SDL_Log("Creating Thread %d\n", tid); for (i = 0; i < NUMTHREADS; i++) { char name[64]; @@ -58,18 +57,18 @@ ThreadFunc(void *data) sub_threads[i] = SDL_CreateThread(SubThreadFunc, name, &flags[i]); } - printf("Thread '%d' waiting for signal\n", tid); + SDL_Log("Thread '%d' waiting for signal\n", tid); while (time_for_threads_to_die[tid] != 1) { ; /* do nothing */ } - printf("Thread '%d' sending signals to subthreads\n", tid); + SDL_Log("Thread '%d' sending signals to subthreads\n", tid); for (i = 0; i < NUMTHREADS; i++) { flags[i] = 1; SDL_WaitThread(sub_threads[i], NULL); } - printf("Thread '%d' exiting!\n", tid); + SDL_Log("Thread '%d' exiting!\n", tid); return 0; } @@ -80,9 +79,12 @@ main(int argc, char *argv[]) SDL_Thread *threads[NUMTHREADS]; int i; + /* Enable standard application logging */ + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + /* Load the SDL library */ if (SDL_Init(0) < 0) { - fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError()); return (1); } @@ -94,7 +96,7 @@ main(int argc, char *argv[]) threads[i] = SDL_CreateThread(ThreadFunc, name, (void*) (uintptr_t) i); if (threads[i] == NULL) { - fprintf(stderr, "Couldn't create thread: %s\n", SDL_GetError()); + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create thread: %s\n", SDL_GetError()); quit(1); } } diff --git a/3rdparty/sdl2-2.0.0/test/utf8.txt b/3rdparty/sdl2-2.0.4/test/utf8.txt similarity index 100% rename from 3rdparty/sdl2-2.0.0/test/utf8.txt rename to 3rdparty/sdl2-2.0.4/test/utf8.txt diff --git a/3rdparty/untz/src/native/android/UntzSystem.cpp b/3rdparty/untz/src/native/android/UntzSystem.cpp index 1729d9cda9..1025bea99b 100644 --- a/3rdparty/untz/src/native/android/UntzSystem.cpp +++ b/3rdparty/untz/src/native/android/UntzSystem.cpp @@ -152,9 +152,9 @@ void PlaybackThread::run() bool isPlaying = true; // Set the playback rate -// int error = env->CallNonvirtualIntMethod(track, audioTrackClass, setPlaybackRateMethod, mpSystemData->mSampleRate); -// if(error != 0) -// __android_log_write(ANDROID_LOG_ERROR, "UntzJNI", "Failed to set playback rate"); + int error = env->CallNonvirtualIntMethod(track, audioTrackClass, setPlaybackRateMethod, mpSystemData->mSampleRate); + if(error != 0) + __android_log_write(ANDROID_LOG_ERROR, "UntzJNI", "Failed to set playback rate"); // Get our buffer jarray buffer = env->NewByteArray(bufferSizeInBytes); @@ -306,8 +306,26 @@ UInt32 System::getSampleRate() return d->mSampleRate; } +// This function was left empty so this implementation may +// need refactoring void System::setSampleRate(UInt32 sampleRate) { + //__android_log_write(ANDROID_LOG_VERBOSE, "UntzJNI", "setSampleRate"); + + AndroidSystemData *d = (AndroidSystemData*)mpData; + d->mSampleRate = sampleRate; + + // set up audio thread. + d->mpAudioThread = PlaybackThread::getInstance(); + d->mpAudioThread->deleteInstance (); + d->mpAudioThread = PlaybackThread::getInstance(); + + //__android_log_write(ANDROID_LOG_VERBOSE, "UntzJNI", "getInstance2"); + // FIXME: set up audio thread. + d->mpAudioThread->setData(d); + d->mpAudioThread->start(); + + //__android_log_write(ANDROID_LOG_VERBOSE, "UntzJNI", "start"); } void System::setVolume(float volume) diff --git a/ant/libmoai/jni/Android.mk b/ant/libmoai/jni/Android.mk index 0c7866da9f..0cf01a3d53 100644 --- a/ant/libmoai/jni/Android.mk +++ b/ant/libmoai/jni/Android.mk @@ -32,6 +32,7 @@ MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/expat-2.1.0/amiga MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/expat-2.1.0/lib MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/expat-2.1.0/xmlwf + MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/kissfft MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/jansson-2.7/src MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/lua-5.1.3/src MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/ooid-0.99 @@ -42,6 +43,7 @@ MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/zlib-1.2.3 MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-contrib.mk + MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-kissfft.mk MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-expat.mk MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-json.mk MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-lua.mk @@ -114,6 +116,12 @@ MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/zl-crypto.mk MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/moai-crypto.mk + #--------------------------------------------------------------# + # DELTADNA + + MY_HEADER_SEARCH_PATHS += + MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/moai-deltadna.mk + #--------------------------------------------------------------# # FACEBOOK diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 47a192c5fb..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,6 +0,0 @@ -shallow_clone: true -clone_depth: 2 - -build_script: bin\ci-windows.bat - -test: off diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 342d35a567..0000000000 --- a/circle.yml +++ /dev/null @@ -1,3 +0,0 @@ -test: - override: - - bash ./bin/ci-osx.sh diff --git a/cmake/libmoai/moai-android/CMakeLists.txt b/cmake/libmoai/moai-android/CMakeLists.txt index 1e97314efc..63a78b96b2 100644 --- a/cmake/libmoai/moai-android/CMakeLists.txt +++ b/cmake/libmoai/moai-android/CMakeLists.txt @@ -10,6 +10,7 @@ add_subdirectory(moai-android-adcolony) add_subdirectory(moai-android-amazon-billing) add_subdirectory(moai-android-chartboost) add_subdirectory(moai-android-crittercism) +add_subdirectory(moai-android-deltadna) add_subdirectory(moai-android-facebook) add_subdirectory(moai-android-flurry) add_subdirectory(moai-android-fortumo) diff --git a/cmake/libmoai/moai-android/moai-android-deltadna/CMakeLists.txt b/cmake/libmoai/moai-android/moai-android-deltadna/CMakeLists.txt new file mode 100644 index 0000000000..74b9db20f8 --- /dev/null +++ b/cmake/libmoai/moai-android/moai-android-deltadna/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required ( VERSION 2.8.11 ) +project ( moai-android-deltadna ) + +android_module("moai-android-deltadna" "deltadna-v3.3.6" "deltadna") diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md diff --git a/docs/new-sdk-integration.txt b/docs/new-sdk-integration.txt new file mode 100644 index 0000000000..816d329c7f --- /dev/null +++ b/docs/new-sdk-integration.txt @@ -0,0 +1,193 @@ +Adding a new SDK into MOAI + +* Replace text within <> * +** Case sensitive ** + +1. Download SDK + +2. Create the SDK folder in 3rdparty-android. e.g. 3rdparty-android/-v + + - Copy SDK libs into a folder inside the SDK folder. e.g. 3rdparty-android/-v/libs + + - Create manifest_declarations.xml and/or manifest_permissions.xml inside 3rdparty-android/ for SDK permissions + +3. Add SDK name into android-studio/MoaiSDK/settings.gradle. e.g. : + +4. Create SDK folder in android-studio/MoaiSDK/ + + - Create AndroidManifest.xml: + + + - Create build.gradle and add SDK libs to compile under dependencies and filepath to source files: + apply plugin: 'com.android.library' + + android { + compileSdkVersion 22 + buildToolsVersion "22.0.1" + + defaultConfig { + minSdkVersion 17 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs += '../../../src/moai-android-' + } + } + } + + repositories { + mavenCentral() + } + + dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:22.1.1' + compile files('../../../3rdparty-android/-v/libs/') + compile project(':core') + } + + - Create proguard-rules.pro + +5. Define macro in src/host-modules/aku_modules_android_config.h: + + #ifndef AKU_WITH_ANDROID_ + #define AKU_WITH_ANDROID_ 1 + #endif + +6. Modify src/host-modules/aku_modules_android.cpp and add calls to SDK AKU functions: + + #if AKU_WITH_ANDROID_ + AKUAndroidAppFinalize (); + #endif + + ... + + #if AKU_WITH_ANDROID_ + AKUAndroidAppInitialize (); + #endif + + ... + + #if AKU_WITH_ANDROID_ + AKUAndroidContextInitialize (); + #endif + +7. Modify src/host-modules/aku_modules_android.h and include SDK host.h file: + + #if AKU_WITH_ANDROID_ + #include /host.h> + #endif + +8. Create host.h and host.cpp in src/moai-android- with aku function declarations and implementations + +9. Create MOAIAndroid.h and .cpp in src/moai-android- + +10. Create src/moai-android-/com/moaisdk//Moai.java + +11. Add SDK java package name to sExternalClasses in src/moai-android/com/moaisdk/core/Moai.java + +12. Add SDK Android project name in util/android-studio/Moai/settings.gradle: include :moai- + +13. Create AndroidManifest.xml in util/android-studio/Moai/moai-: + + + +14. Create build.gradle in util/android-studio/Moai/moai- and reference SDK lib and source directories: + + apply plugin: 'com.android.library' + + android { + compileSdkVersion 22 + buildToolsVersion "22.0.1" + + defaultConfig { + minSdkVersion 17 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs += '@MOAI_SDK_HOME@src/moai-android-' + } + } + } + + repositories { + mavenCentral() + } + + dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:22.1.1' + compile files('@MOAI_SDK_HOME@3rdparty-android/-v/libs/') + compile project(':moai-core') + } + +15. Create util/android-studio/Moai/moai-/proguard-rules.pro + +16. Modify util/ant-host/config.lua: + + = { + lib = MOAI_SDK_HOME .. '3rdparty-android/-v', + src = MOAI_SDK_HOME .. 'src/moai-android-', + }, + +17. Modify util/ant-libmoai/config.lua: + + ---------------------------------------------------------------- + = { + + PREPROCESSOR_FLAG = 'AKU_WITH_ANDROID_', + NAMESPACE = 'com.moaisdk.', + + HEADER_SEARCH_PATHS = { + }, + + MAKE = { + '$(MOAI_SDK_HOME)/util/ant-libmoai/modules/moai-.mk', + }, + + JAVA = { + MOAI_SDK_HOME .. '3rdparty-android/-v', + MOAI_SDK_HOME .. 'src/moai-android-', + }, + + STATIC_LIBRARIES = 'libmoai-', + }, + +18. Create util/ant-libmoai/modules/moai-.mk: + + #================================================================# + # Copyright (c) 2010-2011 Zipline Games, Inc. + # All Rights Reserved. + # http://getmoai.com + #================================================================# + + include $(CLEAR_VARS) + + LOCAL_MODULE := moai- + LOCAL_ARM_MODE := $(MY_ARM_MODE) + LOCAL_CFLAGS := $(MY_LOCAL_CFLAGS) -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h -fvisibility=hidden + + LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) + LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/moai-android-/*.cpp) + + include $(BUILD_STATIC_LIBRARY) diff --git a/host-templates/ios/Moai Template/host-ios b/host-templates/ios/Moai Template/host-ios deleted file mode 120000 index f68551db7a..0000000000 --- a/host-templates/ios/Moai Template/host-ios +++ /dev/null @@ -1 +0,0 @@ -../../../src/host-ios/ \ No newline at end of file diff --git a/host-templates/ios/Moai Template/host-modules b/host-templates/ios/Moai Template/host-modules deleted file mode 120000 index 3a98247584..0000000000 --- a/host-templates/ios/Moai Template/host-modules +++ /dev/null @@ -1 +0,0 @@ -../../../src/host-modules/ \ No newline at end of file diff --git a/host-templates/ios/Moai Template/libmoai b/host-templates/ios/Moai Template/libmoai deleted file mode 120000 index e85bb5ec93..0000000000 --- a/host-templates/ios/Moai Template/libmoai +++ /dev/null @@ -1 +0,0 @@ -../../../lib/ios/ \ No newline at end of file diff --git a/host-templates/osx/Moai Template/app/host-modules b/host-templates/osx/Moai Template/app/host-modules deleted file mode 120000 index 5ad7f37b50..0000000000 --- a/host-templates/osx/Moai Template/app/host-modules +++ /dev/null @@ -1 +0,0 @@ -../../../../src/host-modules/ \ No newline at end of file diff --git a/host-templates/osx/Moai Template/app/host-sdl b/host-templates/osx/Moai Template/app/host-sdl deleted file mode 120000 index ad247f0b7a..0000000000 --- a/host-templates/osx/Moai Template/app/host-sdl +++ /dev/null @@ -1 +0,0 @@ -../../../../src/host-sdl \ No newline at end of file diff --git a/host-templates/osx/Moai Template/lib b/host-templates/osx/Moai Template/lib deleted file mode 120000 index 861b842f28..0000000000 --- a/host-templates/osx/Moai Template/lib +++ /dev/null @@ -1 +0,0 @@ -../../../lib/osx/ \ No newline at end of file diff --git a/hosts/.gitignore b/hosts/.gitignore deleted file mode 100644 index 43be095789..0000000000 --- a/hosts/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -android/ -html/ -osx/ -ios/ -linux/ -windows/ \ No newline at end of file diff --git a/regression-samples/particles-pex-plugin/Smoke.pex b/regression-samples/particles-pex-plugin/Smoke.pex new file mode 100644 index 0000000000..03f6a7fa03 --- /dev/null +++ b/regression-samples/particles-pex-plugin/Smoke.pex @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/regression-samples/particles-pex-plugin/Smoke.png b/regression-samples/particles-pex-plugin/Smoke.png new file mode 100644 index 0000000000..953011666c Binary files /dev/null and b/regression-samples/particles-pex-plugin/Smoke.png differ diff --git a/regression-samples/particles-pex-plugin/Spark.pex b/regression-samples/particles-pex-plugin/Spark.pex new file mode 100644 index 0000000000..d35389315a --- /dev/null +++ b/regression-samples/particles-pex-plugin/Spark.pex @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/regression-samples/particles-pex-plugin/Spark.png b/regression-samples/particles-pex-plugin/Spark.png new file mode 100644 index 0000000000..92a640553a Binary files /dev/null and b/regression-samples/particles-pex-plugin/Spark.png differ diff --git a/regression-samples/particles-pex-plugin/cloudlet.png b/regression-samples/particles-pex-plugin/cloudlet.png new file mode 100644 index 0000000000..376d8a2c28 Binary files /dev/null and b/regression-samples/particles-pex-plugin/cloudlet.png differ diff --git a/regression-samples/particles-pex-plugin/deathBlossomCharge.pex b/regression-samples/particles-pex-plugin/deathBlossomCharge.pex new file mode 100644 index 0000000000..f4172e0089 --- /dev/null +++ b/regression-samples/particles-pex-plugin/deathBlossomCharge.pex @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/regression-samples/particles-pex-plugin/main.lua b/regression-samples/particles-pex-plugin/main.lua new file mode 100644 index 0000000000..7ca9dd56b8 --- /dev/null +++ b/regression-samples/particles-pex-plugin/main.lua @@ -0,0 +1,56 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +print ( "hello, moai!" ) + + +viewport = MOAIViewport.new () +viewport:setSize ( 640, 480 ) +viewport:setScale ( 640, 480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + +MOAISim.openWindow ( "cathead", 640, 480 ) + +particleName = 'smoke.pex' + +local plugin = MOAIParticlePexPlugin.load( particleName ) +local maxParticles = plugin:getMaxParticles () +local blendsrc, blenddst = plugin:getBlendMode () +local minLifespan, maxLifespan = plugin:getLifespan () +local duration = plugin:getDuration () + +system = MOAIParticleSystem.new () +system._duration = duration +system._lifespan = maxLifespan +system:reserveParticles ( maxParticles , plugin:getSize() ) +system:reserveSprites ( maxParticles ) +system:reserveStates ( 1 ) +system:setBlendMode ( blendsrc, blenddst ) + +local state = MOAIParticleState.new () +state:setTerm ( minLifespan, maxLifespan ) +state:setPlugin( plugin ) +system:setState ( 1, state ) + +emitter = MOAIParticleTimedEmitter.new() +emitter:setSystem ( system ) +emitter:setEmission ( plugin:getEmission () ) +emitter:setFrequency ( plugin:getFrequency () ) +emitter:setRect ( -1, -1, 1, 1 ) + +local deck = MOAIGfxQuad2D.new() +deck:setTexture( plugin:getTextureName() ) +deck:setRect( -0.5, -0.5, 0.5, 0.5 ) -- HACK: Currently for scaling we need to set the deck's rect to 1x1 +system:setDeck( deck ) + +system:start () +emitter:start () + +layer:insertProp ( system ) + diff --git a/bin/run-scripts/run.bat b/regression-samples/particles-pex-plugin/run.bat similarity index 100% rename from bin/run-scripts/run.bat rename to regression-samples/particles-pex-plugin/run.bat diff --git a/bin/run-scripts/run.sh b/regression-samples/particles-pex-plugin/run.sh similarity index 100% rename from bin/run-scripts/run.sh rename to regression-samples/particles-pex-plugin/run.sh diff --git a/regression-samples/quad-list-deck shaders/main.lua b/regression-samples/quad-list-deck shaders/main.lua new file mode 100644 index 0000000000..7b14e9eb16 --- /dev/null +++ b/regression-samples/quad-list-deck shaders/main.lua @@ -0,0 +1,363 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAIDebugLines.setStyle ( MOAIDebugLines.PROP_MODEL_BOUNDS, 2, 1, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.PROP_WORLD_BOUNDS, 1, 0.5, 0.5, 0.5 ) + +-- just for readability +local RECT_XMIN = 1 +local RECT_YMIN = 2 +local RECT_XMAX = 3 +local RECT_YMAX = 4 + +local sprites = {} +local frames = {} +local shaders = {} + +-- the vertex shader +local vsh = [[ +attribute vec4 position; +attribute vec2 uv; +attribute vec4 color; +varying vec4 colorVarying; +varying vec2 uvVarying; + +void main () +{ + gl_Position = position; + uvVarying = uv; + colorVarying = color; +} +]] + + +-- the fragment shader +local fsh = [[ +#ifdef GL_ES +precision highp float; +#endif + +varying MEDP vec4 colorVarying; +varying vec2 uvVarying; +uniform sampler2D sampler; +uniform MEDP float colorMultiplier; + +void main() +{ + vec4 color = texture2D ( sampler, uvVarying ) * colorVarying; + gl_FragColor = vec4(color.rgb * colorMultiplier, color.a); +} +]] + +function getShader(materialId) + if shaders[materialId] then + return shaders[materialId] + end + + local program = MOAIShaderProgram.new () + + program:reserveUniforms ( 1 ) + program:declareUniformFloat ( 1, 'colorMultiplier', 1.5) + + program:setVertexAttribute ( 1, 'position' ) + program:setVertexAttribute ( 2, 'uv' ) + program:setVertexAttribute ( 3, 'color' ) + + program:load ( vsh, fsh ) + + local shader = MOAIShader.new () + shader:setProgram ( program ) + + shaders[materialId] = shader + + return shader +end + +function loadAsset(basename) + json = MOAIJsonParser.decode ( MOAIFileSystem.loadFile ( basename .. '.json' )) + assert ( json ) + + -- chunksize is the *maximum* size of an image tile. + -- image tiles are laid out left to right and top to bottom, and all tiles chunksize + -- *unless* they are along the right or bottom of the image *and* the image isn't + -- an even multiple of chunksize + local CHUNK_BLEED_MARGIN = json.chunkBleedMargin or 0 + local CHUNKSIZE = json.chunckSize and (json.chunkSize - 2 * CHUNK_BLEED_MARGIN) or 512 + + -- image width and height. we only need these to detect the edge case when the image + -- size is not a clean multiple of chunksize and the border tiles are therefore + -- smaller than chunksize + local WIDTH = json.width + local HEIGHT = json.height + + local ANCHOR_X = json.anchor and json.anchor.x or 0 + local ANCHOR_Y = json.anchor and json.anchor.y or 0 + + local uvRects = {} + local screenRects = {} + local materialIDs = {} + + for i, tile in ipairs ( json.tiles ) do + + local tileObj = { + uvRects = {}, + screenRects = {}, + chunks = {}, + shaderParams = {}, + left = 0, + top = 0, + } + + local cropRect = tile.cropRect + local padRect = tile.paddingRect + + local xOff = ANCHOR_X + cropRect [ RECT_XMIN ] - padRect [ RECT_XMIN ] + local yOff = ANCHOR_Y + cropRect [ RECT_YMIN ] - padRect [ RECT_YMIN ] + + local screenSub, screenSubWidth, screenSubHeight = MOAIGfxQuadListDeck2D.subdivideRect ( + + CHUNKSIZE, + CHUNKSIZE, + + cropRect [ RECT_XMIN ], + cropRect [ RECT_YMIN ], + cropRect [ RECT_XMAX ], + cropRect [ RECT_YMAX ] + ) + + table.insert ( sprites, { + base = #materialIDs + 1, + size = #screenSub, + }) + + for i, screenRect in ipairs ( screenSub ) do + + print ( screenRect [ RECT_XMIN ], screenRect [ RECT_YMIN ], screenRect [ RECT_XMAX ], screenRect [ RECT_YMAX ]) + + local xChunk = math.floor ( screenRect [ RECT_XMIN ] / CHUNKSIZE ) + local yChunk = math.floor ( screenRect [ RECT_YMIN ] / CHUNKSIZE ) + + -- left, top coordinates of the tile in image space + local xTile = xChunk * CHUNKSIZE + local yTile = yChunk * CHUNKSIZE + + -- and here's the magic: if we're in a right or bottom tile, the dimensions of the *texture* + -- may not be chunksize, so when we bring the rect into UV space we'll need to divide through + -- by the actual tile dimensions and not chunksize + local chunkWidth = (( WIDTH - xTile ) < CHUNKSIZE ) and ( WIDTH - xTile ) or CHUNKSIZE + local chunkHeight = (( HEIGHT - yTile ) < CHUNKSIZE ) and ( HEIGHT - yTile ) or CHUNKSIZE + + -- to get the UV coordinates, just divide through by the actual chunk dimensions + local uvRect = { + [ RECT_XMIN ] = ( screenRect [ RECT_XMIN ] - xTile + CHUNK_BLEED_MARGIN) / chunkWidth, + [ RECT_YMIN ] = ( screenRect [ RECT_YMIN ] - yTile + CHUNK_BLEED_MARGIN) / chunkHeight, + [ RECT_XMAX ] = ( screenRect [ RECT_XMAX ] - xTile - CHUNK_BLEED_MARGIN) / chunkWidth, + [ RECT_YMAX ] = ( screenRect [ RECT_YMAX ] - yTile - CHUNK_BLEED_MARGIN) / chunkHeight, + } + + screenRect [ RECT_XMIN ] = screenRect [ RECT_XMIN ] - xOff + screenRect [ RECT_YMIN ] = screenRect [ RECT_YMIN ] - yOff + screenRect [ RECT_XMAX ] = screenRect [ RECT_XMAX ] - xOff + screenRect [ RECT_YMAX ] = screenRect [ RECT_YMAX ] - yOff + + screenRect [ RECT_YMIN ] = screenRect [ RECT_YMIN ] * -1 + screenRect [ RECT_YMAX ] = screenRect [ RECT_YMAX ] * -1 + + local WIDTH_IN_CHUNKS = math.ceil ( json.width / CHUNKSIZE ) + local materialID = ( xChunk + ( yChunk * WIDTH_IN_CHUNKS )) + 1 + + tileObj.shaderParams[materialID] = { + xOrg = xTile - cropRect[ RECT_XMIN ] - CHUNK_BLEED_MARGIN, + yOrg = yTile - cropRect[ RECT_YMIN ] - CHUNK_BLEED_MARGIN, + width = cropRect[ RECT_XMAX ] - cropRect[ RECT_XMIN ] - 2 * CHUNK_BLEED_MARGIN, + height = cropRect[ RECT_YMAX ] - cropRect[ RECT_YMIN ] - 2 * CHUNK_BLEED_MARGIN, + chunkWidth = chunkWidth, + chunkHeight = chunkHeight, + defaultChunkSize = CHUNKSIZE + } + + table.insert(tileObj.uvRects, uvRect) + -- print("inserting uvRect", MOAIJsonParser.encode(uvRect)) + table.insert(tileObj.screenRects, screenRect) + -- print("inserting screenRect", MOAIJsonParser.encode(screenRect)) + if not (screenRect [ RECT_XMAX] - screenRect [ RECT_XMIN] <= 0 + or screenRect [ RECT_YMAX] - screenRect [ RECT_YMIN] <= 0 ) then + table.insert(tileObj.chunks, materialID - 1) + -- print("inserting chunk", materialID - 1) + end + + table.insert ( uvRects, uvRect ) + table.insert ( screenRects, screenRect ) + table.insert ( materialIDs, materialID ) + end + table.insert(frames, tileObj) + end + + gfxQuadListDeck = MOAIGfxQuadListDeck2D.new () + + -- we're going to init the textures with filenames to enable reloading and + -- prevent caching of image data + gfxQuadListDeck:reserveMaterials ( 2 ) + + local loadAsBitmap = function ( filename ) + + local image = MOAIImage.new () + image:load ( filename ) + image:resize ( 128, 128 ) + image:simpleThreshold ( 1, 1, 1, 0.5 ) + image:convert ( MOAIImage.COLOR_FMT_A_1 ) + return image + end + + local maxCols = math.ceil(json.width / CHUNKSIZE) + local maxRows = math.ceil(json.height / CHUNKSIZE) + + local fileCount = maxCols * maxRows + + local extension = ".png" + -- reload the images one by one and generate bitmaps from their alpha + -- ideally, these will be pre-generated and stored alongside the png's + for i=1, fileCount do + + local zeroBasedIdx = i - 1 + local imageFilename = basename .. "." .. zeroBasedIdx .. extension + + -- Make sure the file exists! If it does not, MOAITexture.load fails silently. + assert(MOAIFileSystem.checkFileExists(imageFilename), "Texture._loadChunk: missing file '" .. imageFilename .. "'") + print("load", imageFilename) + gfxQuadListDeck:setTexture ( i, imageFilename ) + gfxQuadListDeck:setHitMask ( i, loadAsBitmap ( imageFilename )) + gfxQuadListDeck:setHitMaskThreshold ( i, 0, 0, 0, 1 ) + end + + local totalRects = #materialIDs + + gfxQuadListDeck:reserveUVQuads ( totalRects) + gfxQuadListDeck:reserveQuads ( totalRects ) + gfxQuadListDeck:reservePairs ( totalRects ) + + for i = 1, totalRects do + + local uvRect = uvRects [ i ] + local screenRect = screenRects [ i ] + + print ( 'uv rect', i, uvRect [ RECT_XMIN ], uvRect [ RECT_YMIN ], uvRect [ RECT_XMAX ], uvRect [ RECT_YMAX ]) + print ( 'screen rect', i, " --", screenRect [ RECT_XMIN ], screenRect [ RECT_YMIN ], screenRect [ RECT_XMAX ], screenRect [ RECT_YMAX ]) + + gfxQuadListDeck:setUVRect ( i, + uvRect [ RECT_XMIN ], + uvRect [ RECT_YMIN ], + uvRect [ RECT_XMAX ], + uvRect [ RECT_YMAX ] + ) + + gfxQuadListDeck:setRect ( i, + screenRect [ RECT_XMIN ], + screenRect [ RECT_YMIN ], + screenRect [ RECT_XMAX ], + screenRect [ RECT_YMAX ] + ) + + gfxQuadListDeck:setPair ( i, i, i, materialIDs [ i ]) + end + + gfxQuadListDeck:reserveLists ( #sprites ) + for i, sprite in ipairs ( sprites ) do + gfxQuadListDeck:setList ( i, sprite.base, sprite.size ) + end + + ---------------------------------------------------------------- + + prop = MOAIProp2D.new () + prop:setDeck ( gfxQuadListDeck ) + prop:setHitGranularity ( MOAIProp.HIT_TEST_FINE ) + layer:insertProp ( prop ) + + return prop +end + +function setFrame(index) + local shaderParams = frames[index].shaderParams + if shaderParams then + for materialId, param in pairs(shaderParams) do + + prop:setShader(materialId, getShader(materialId)) + end + end + prop:setIndex ( index ) + label:setString ( tostring(index) ) +end + +index = 1 + +function onMouseEvent ( down, delta ) + + if down == true then + + local x, y = MOAIInputMgr.device.pointer:getLoc () + x, y = layer:wndToWorld ( x, y ) + -- if prop:inside ( x, y ) then + + if delta > 0 then + index = ( index % #sprites ) + 1 + elseif delta < 0 then + index = index - 1 + index = index <= 0 and #sprites or index + end + + setFrame(index) + + -- end + end +end + +MOAIInputMgr.device.mouseLeft:setCallback ( function ( down ) onMouseEvent ( down, 1 ) end ) +MOAIInputMgr.device.mouseRight:setCallback ( function ( down ) onMouseEvent ( down, -1 ) end ) + +MOAISim.openWindow ( "test", 320, 480 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 320, 480 ) +viewport:setScale ( 320, 480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + + +font = MOAIFont.new () +font:loadFromTTF ( 'r/arial-rounded.TTF' ) + +label = MOAITextLabel.new () +label:setString ( '' ) +label:setFont ( font ) +label:setTextSize ( 32 ) +label:setYFlip ( true ) +label:setAlignment ( MOAITextBox.CENTER_JUSTIFY, MOAITextBox.BASELINE_JUSTIFY ) +label:setLoc ( 0, -220 ) +layer:insertProp ( label ) + +-- animation with horizontal tiles in texture files +loadAsset('r/running_julius') + +-- animation with vertical tiles in texture files +-- loadAsset('r/worry_bear_run_left') + +-- single frame smallest than the tile size +--loadAsset('r/worry_bear_idle') + +-- single, small rectangle (smaller than chunk size) +--loadAsset('r/rect') + +-- single, large rectangle (bigger than chunk size, uses non-square blocks) +-- a 720x720 image, with a 512 input chunkSize, will be cut in 4 pieces (from top left to bottom right) +-- the conditioner works like this: 720 % 512 = 208. What's the nearest upper pow2 for 208? 256 +-- 512x512 256x512 +-- 512x256 256x256 +-- loadAsset('r/rect2'):setScl ( .25, .25 ) + +setFrame(1) + diff --git a/regression-samples/quad-list-deck shaders/r/arial-rounded.TTF b/regression-samples/quad-list-deck shaders/r/arial-rounded.TTF new file mode 100644 index 0000000000..20b92a27d7 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/arial-rounded.TTF differ diff --git a/regression-samples/quad-list-deck shaders/r/rect.0.png b/regression-samples/quad-list-deck shaders/r/rect.0.png new file mode 100644 index 0000000000..80bbbfc781 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/rect.0.png differ diff --git a/regression-samples/quad-list-deck shaders/r/rect.json b/regression-samples/quad-list-deck shaders/r/rect.json new file mode 100644 index 0000000000..5bc2923867 --- /dev/null +++ b/regression-samples/quad-list-deck shaders/r/rect.json @@ -0,0 +1,28 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 86, + "height": 32, + "opaque": true, + "pvr": false, + "sizeMB": 0.0078125, + "tiles": [ + { + "cropRect": [ + 0, + 0, + 61, + 29 + ], + "paddingRect": [ + 2, + 2, + 3, + 3 + ] + } + ], + "video": false, + "width": 64 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck shaders/r/rect2.0.png b/regression-samples/quad-list-deck shaders/r/rect2.0.png new file mode 100644 index 0000000000..642d01132a Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/rect2.0.png differ diff --git a/regression-samples/quad-list-deck shaders/r/rect2.1.png b/regression-samples/quad-list-deck shaders/r/rect2.1.png new file mode 100644 index 0000000000..6bb3699d09 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/rect2.1.png differ diff --git a/regression-samples/quad-list-deck shaders/r/rect2.2.png b/regression-samples/quad-list-deck shaders/r/rect2.2.png new file mode 100644 index 0000000000..d49885a5d7 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/rect2.2.png differ diff --git a/regression-samples/quad-list-deck shaders/r/rect2.3.png b/regression-samples/quad-list-deck shaders/r/rect2.3.png new file mode 100644 index 0000000000..c62bcacc25 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/rect2.3.png differ diff --git a/regression-samples/quad-list-deck shaders/r/rect2.json b/regression-samples/quad-list-deck shaders/r/rect2.json new file mode 100644 index 0000000000..840bd6be34 --- /dev/null +++ b/regression-samples/quad-list-deck shaders/r/rect2.json @@ -0,0 +1,32 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 87, + "height": 768, + "opaque": true, + "pvr": false, + "sizeMB": 2.25, + "tiles": [ + { + "cropRect": [ + 0, + 0, + 720, + 720 + ], + "paddingRect": [ + 0, + 0, + 0, + 0 + ] + } + ], + "anchor": { + "x": 360, + "y": 360 + }, + "video": false, + "width": 768 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck shaders/r/running_julius.0.png b/regression-samples/quad-list-deck shaders/r/running_julius.0.png new file mode 100644 index 0000000000..bc25b7ba58 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/running_julius.0.png differ diff --git a/regression-samples/quad-list-deck shaders/r/running_julius.1.png b/regression-samples/quad-list-deck shaders/r/running_julius.1.png new file mode 100644 index 0000000000..b4becaa84f Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/running_julius.1.png differ diff --git a/regression-samples/quad-list-deck shaders/r/running_julius.2.png b/regression-samples/quad-list-deck shaders/r/running_julius.2.png new file mode 100644 index 0000000000..cd417f44da Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/running_julius.2.png differ diff --git a/regression-samples/quad-list-deck shaders/r/running_julius.json b/regression-samples/quad-list-deck shaders/r/running_julius.json new file mode 100644 index 0000000000..3fbc29646f --- /dev/null +++ b/regression-samples/quad-list-deck shaders/r/running_julius.json @@ -0,0 +1,277 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "anchor": { + "x": 77, + "y": 121 + }, + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 87, + "framesPerSecond": 24.0, + "height": 512, + "opaque": false, + "origin": { + "x": 512, + "y": 464 + }, + "pvr": false, + "shotgunVersion": 1, + "sizeMB": 3.0, + "tiles": [ + { + "cropRect": [ + 1, + 1, + 151, + 239 + ], + "paddingRect": [ + 4, + 2, + 7, + 3 + ] + }, + { + "cropRect": [ + 152, + 1, + 302, + 227 + ], + "paddingRect": [ + 4, + 14, + 7, + 3 + ] + }, + { + "cropRect": [ + 442, + 1, + 591, + 216 + ], + "paddingRect": [ + 5, + 25, + 7, + 3 + ] + }, + { + "cropRect": [ + 1073, + 1, + 1200, + 211 + ], + "paddingRect": [ + 16, + 30, + 18, + 3 + ] + }, + { + "cropRect": [ + 720, + 240, + 833, + 451 + ], + "paddingRect": [ + 19, + 29, + 29, + 3 + ] + }, + { + "cropRect": [ + 1201, + 1, + 1314, + 235 + ], + "paddingRect": [ + 17, + 6, + 31, + 3 + ] + }, + { + "cropRect": [ + 843, + 1, + 958, + 238 + ], + "paddingRect": [ + 17, + 3, + 29, + 3 + ] + }, + { + "cropRect": [ + 135, + 240, + 251, + 480 + ], + "paddingRect": [ + 17, + 0, + 28, + 3 + ] + }, + { + "cropRect": [ + 252, + 240, + 366, + 479 + ], + "paddingRect": [ + 19, + 1, + 28, + 3 + ] + }, + { + "cropRect": [ + 959, + 1, + 1072, + 239 + ], + "paddingRect": [ + 19, + 2, + 29, + 3 + ] + }, + { + "cropRect": [ + 367, + 240, + 484, + 466 + ], + "paddingRect": [ + 18, + 14, + 26, + 3 + ] + }, + { + "cropRect": [ + 1315, + 1, + 1431, + 216 + ], + "paddingRect": [ + 21, + 25, + 24, + 3 + ] + }, + { + "cropRect": [ + 485, + 240, + 603, + 450 + ], + "paddingRect": [ + 20, + 30, + 23, + 3 + ] + }, + { + "cropRect": [ + 604, + 240, + 719, + 451 + ], + "paddingRect": [ + 19, + 29, + 27, + 3 + ] + }, + { + "cropRect": [ + 722, + 1, + 842, + 235 + ], + "paddingRect": [ + 17, + 6, + 24, + 3 + ] + }, + { + "cropRect": [ + 592, + 1, + 721, + 238 + ], + "paddingRect": [ + 15, + 3, + 17, + 3 + ] + }, + { + "cropRect": [ + 1, + 240, + 134, + 480 + ], + "paddingRect": [ + 14, + 0, + 14, + 3 + ] + }, + { + "cropRect": [ + 303, + 1, + 441, + 239 + ], + "paddingRect": [ + 11, + 2, + 12, + 3 + ] + } + ], + "video": false, + "videoFramerate": 24.0, + "width": 1536 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_idle.0.png b/regression-samples/quad-list-deck shaders/r/worry_bear_idle.0.png new file mode 100644 index 0000000000..4137b01640 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/worry_bear_idle.0.png differ diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_idle.json b/regression-samples/quad-list-deck shaders/r/worry_bear_idle.json new file mode 100644 index 0000000000..7b7de647b1 --- /dev/null +++ b/regression-samples/quad-list-deck shaders/r/worry_bear_idle.json @@ -0,0 +1,39 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "anchor": { + "x": 121, + "y": 141 + }, + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 54, + "framesPerSecond": 24.0, + "height": 256, + "opaque": false, + "origin": { + "x": 622, + "y": 467 + }, + "pvr": false, + "shotgunVersion": 3, + "sizeMB": 0.25, + "tiles": [ + { + "cropRect": [ + 0, + 0, + 154, + 234 + ], + "paddingRect": [ + 44, + 25, + 45, + 3 + ] + } + ], + "video": false, + "videoFramerate": 24.0, + "width": 256 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.0.png b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.0.png new file mode 100644 index 0000000000..e9ea306121 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.0.png differ diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.1.png b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.1.png new file mode 100644 index 0000000000..6cae7af970 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.1.png differ diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.2.png b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.2.png new file mode 100644 index 0000000000..2c6224e080 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.2.png differ diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.3.png b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.3.png new file mode 100644 index 0000000000..d837b9ea36 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.3.png differ diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.4.png b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.4.png new file mode 100644 index 0000000000..bb35305e93 Binary files /dev/null and b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.4.png differ diff --git a/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.json b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.json new file mode 100644 index 0000000000..8c6036e5a9 --- /dev/null +++ b/regression-samples/quad-list-deck shaders/r/worry_bear_run_left.json @@ -0,0 +1,249 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "anchor": { + "x": 121, + "y": 141 + }, + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 78, + "framesPerSecond": 24.0, + "height": 1536, + "opaque": false, + "origin": { + "x": 622, + "y": 467 + }, + "pvr": false, + "shotgunVersion": 2, + "sizeMB": 3.0, + "tiles": [ + { + "cropRect": [ + 1, + 1245, + 125, + 1497 + ], + "paddingRect": [ + 49, + 7, + 70, + 3 + ] + }, + { + "cropRect": [ + 133, + 985, + 261, + 1243 + ], + "paddingRect": [ + 45, + 0, + 70, + 4 + ] + }, + { + "cropRect": [ + 1, + 733, + 138, + 982 + ], + "paddingRect": [ + 42, + 8, + 64, + 5 + ] + }, + { + "cropRect": [ + 1, + 241, + 152, + 484 + ], + "paddingRect": [ + 37, + 15, + 55, + 4 + ] + }, + { + "cropRect": [ + 1, + 1, + 158, + 238 + ], + "paddingRect": [ + 34, + 22, + 52, + 3 + ] + }, + { + "cropRect": [ + 161, + 1, + 316, + 240 + ], + "paddingRect": [ + 34, + 22, + 54, + 1 + ] + }, + { + "cropRect": [ + 153, + 241, + 304, + 482 + ], + "paddingRect": [ + 34, + 21, + 58, + 0 + ] + }, + { + "cropRect": [ + 245, + 1245, + 352, + 1491 + ], + "paddingRect": [ + 65, + 14, + 71, + 2 + ] + }, + { + "cropRect": [ + 129, + 1245, + 242, + 1496 + ], + "paddingRect": [ + 60, + 7, + 70, + 4 + ] + }, + { + "cropRect": [ + 1, + 985, + 132, + 1242 + ], + "paddingRect": [ + 47, + 0, + 65, + 5 + ] + }, + { + "cropRect": [ + 141, + 733, + 275, + 983 + ], + "paddingRect": [ + 47, + 8, + 62, + 4 + ] + }, + { + "cropRect": [ + 1, + 485, + 143, + 729 + ], + "paddingRect": [ + 41, + 15, + 60, + 3 + ] + }, + { + "cropRect": [ + 145, + 485, + 289, + 723 + ], + "paddingRect": [ + 38, + 22, + 61, + 2 + ] + }, + { + "cropRect": [ + 265, + 985, + 402, + 1224 + ], + "paddingRect": [ + 42, + 22, + 64, + 1 + ] + }, + { + "cropRect": [ + 277, + 733, + 406, + 974 + ], + "paddingRect": [ + 47, + 21, + 67, + 0 + ] + }, + { + "cropRect": [ + 293, + 485, + 401, + 732 + ], + "paddingRect": [ + 64, + 14, + 71, + 1 + ] + } + ], + "video": false, + "videoFramerate": 24.0, + "width": 512 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck/main.lua b/regression-samples/quad-list-deck/main.lua new file mode 100644 index 0000000000..8ea8a6ea32 --- /dev/null +++ b/regression-samples/quad-list-deck/main.lua @@ -0,0 +1,258 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAIDebugLines.setStyle ( MOAIDebugLines.PROP_MODEL_BOUNDS, 2, 1, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.PROP_WORLD_BOUNDS, 1, 0.5, 0.5, 0.5 ) + +-- just for readability +local RECT_XMIN = 1 +local RECT_YMIN = 2 +local RECT_XMAX = 3 +local RECT_YMAX = 4 + +local sprites = {} + +function loadAsset(basename) + json = MOAIJsonParser.decode ( MOAIFileSystem.loadFile ( basename .. '.json' )) + assert ( json ) + + -- if I understand things correctly, chunksize is the *maximum* size of an image tile. + -- image tiles are laid out left to right and top to bottom, and all tiles chunksize + -- *unless* they are along the right or bottom of the image *and* the image isn't + -- an even multiple of chunksize + local CHUNKSIZE = json.chunkSize + + -- image width and height. we only need these to detect the edge case when the image + -- size is not a clean multiple of chunksize and the border tiles are therefore + -- smaller than chunksize + local WIDTH = json.width + local HEIGHT = json.height + + local ANCHOR_X = json.anchor and json.anchor.x or 0 + local ANCHOR_Y = json.anchor and json.anchor.y or 0 + + local uvRects = {} + local screenRects = {} + local materialIDs = {} + + for i, tile in ipairs ( json.tiles ) do + + local cropRect = tile.cropRect + local padRect = tile.paddingRect + + local xOff = ANCHOR_X + cropRect [ RECT_XMIN ] - padRect [ RECT_XMIN ] + local yOff = ANCHOR_Y + cropRect [ RECT_YMIN ] - padRect [ RECT_YMIN ] + + local screenSub, screenSubWidth, screenSubHeight = MOAIGfxQuadListDeck2D.subdivideRect ( + + CHUNKSIZE, + CHUNKSIZE, + + cropRect [ RECT_XMIN ], + cropRect [ RECT_YMIN ], + cropRect [ RECT_XMAX ], + cropRect [ RECT_YMAX ] + ) + + table.insert ( sprites, { + base = #materialIDs + 1, + size = #screenSub, + }) + + for i, screenRect in ipairs ( screenSub ) do + + print ( screenRect [ RECT_XMIN ], screenRect [ RECT_YMIN ], screenRect [ RECT_XMAX ], screenRect [ RECT_YMAX ]) + + local xChunk = math.floor ( screenRect [ RECT_XMIN ] / CHUNKSIZE ) + local yChunk = math.floor ( screenRect [ RECT_YMIN ] / CHUNKSIZE ) + + -- left, top coordinates of the tile in image space + local xTile = xChunk * CHUNKSIZE + local yTile = yChunk * CHUNKSIZE + + -- and here's the magic: if we're in a right or bottom tile, the dimensions of the *texture* + -- may not be chunksize, so when we bring the rect into UV space we'll need to divide through + -- by the actual tile dimensions and not chunksize + local chunkWidth = (( WIDTH - xTile ) < CHUNKSIZE ) and ( WIDTH - xTile ) or CHUNKSIZE + local chunkHeight = (( HEIGHT - yTile ) < CHUNKSIZE ) and ( HEIGHT - yTile ) or CHUNKSIZE + + -- to get the UV coordinates, just divide through by the actual chunk dimensions + local uvRect = { + [ RECT_XMIN ] = ( screenRect [ RECT_XMIN ] - xTile ) / chunkWidth, + [ RECT_YMIN ] = ( screenRect [ RECT_YMIN ] - yTile ) / chunkHeight, + [ RECT_XMAX ] = ( screenRect [ RECT_XMAX ] - xTile ) / chunkWidth, + [ RECT_YMAX ] = ( screenRect [ RECT_YMAX ] - yTile ) / chunkHeight, + } + + screenRect [ RECT_XMIN ] = screenRect [ RECT_XMIN ] - xOff + screenRect [ RECT_YMIN ] = screenRect [ RECT_YMIN ] - yOff + screenRect [ RECT_XMAX ] = screenRect [ RECT_XMAX ] - xOff + screenRect [ RECT_YMAX ] = screenRect [ RECT_YMAX ] - yOff + + screenRect [ RECT_YMIN ] = screenRect [ RECT_YMIN ] * -1 + screenRect [ RECT_YMAX ] = screenRect [ RECT_YMAX ] * -1 + + local WIDTH_IN_CHUNKS = math.ceil ( json.width / CHUNKSIZE ) + local materialID = ( xChunk + ( yChunk * WIDTH_IN_CHUNKS )) + 1 + + table.insert ( uvRects, uvRect ) + table.insert ( screenRects, screenRect ) + table.insert ( materialIDs, materialID ) + end + end + + gfxQuadListDeck = MOAIGfxQuadListDeck2D.new () + + -- we're going to init the textures with filenames to enable reloading and + -- prevent caching of image data + gfxQuadListDeck:reserveMaterials ( 2 ) + + local loadAsBitmap = function ( filename ) + + local image = MOAIImage.new () + image:load ( filename ) + image:resize ( 128, 128 ) + image:simpleThreshold ( 1, 1, 1, 0.5 ) + image:convert ( MOAIImage.COLOR_FMT_A_1 ) + return image + end + + local maxCols = math.ceil(json.width / CHUNKSIZE) + local maxRows = math.ceil(json.height / CHUNKSIZE) + + local fileCount = maxCols * maxRows + + local extension = ".png" + -- reload the images one by one and generate bitmaps from their alpha + -- ideally, these will be pre-generated and stored alongside the png's + for i=1, fileCount do + + local zeroBasedIdx = i - 1 + local imageFilename = basename .. "." .. zeroBasedIdx .. extension + + -- Make sure the file exists! If it does not, MOAITexture.load fails silently. + assert(MOAIFileSystem.checkFileExists(imageFilename), "Texture._loadChunk: missing file '" .. imageFilename .. "'") + print("load", imageFilename) + gfxQuadListDeck:setTexture ( i, imageFilename ) + gfxQuadListDeck:setHitMask ( i, loadAsBitmap ( imageFilename )) + gfxQuadListDeck:setHitMaskThreshold ( i, 0, 0, 0, 1 ) + end + + local totalRects = #materialIDs + + gfxQuadListDeck:reserveUVQuads ( totalRects) + gfxQuadListDeck:reserveQuads ( totalRects ) + gfxQuadListDeck:reservePairs ( totalRects ) + + for i = 1, totalRects do + + local uvRect = uvRects [ i ] + local screenRect = screenRects [ i ] + + print ( 'uv rect', i, uvRect [ RECT_XMIN ], uvRect [ RECT_YMIN ], uvRect [ RECT_XMAX ], uvRect [ RECT_YMAX ]) + print ( 'screen rect', i, " --", screenRect [ RECT_XMIN ], screenRect [ RECT_YMIN ], screenRect [ RECT_XMAX ], screenRect [ RECT_YMAX ]) + + gfxQuadListDeck:setUVRect ( i, + uvRect [ RECT_XMIN ], + uvRect [ RECT_YMIN ], + uvRect [ RECT_XMAX ], + uvRect [ RECT_YMAX ] + ) + + gfxQuadListDeck:setRect ( i, + screenRect [ RECT_XMIN ], + screenRect [ RECT_YMIN ], + screenRect [ RECT_XMAX ], + screenRect [ RECT_YMAX ] + ) + + gfxQuadListDeck:setPair ( i, i, i, materialIDs [ i ]) + end + + gfxQuadListDeck:reserveLists ( #sprites ) + for i, sprite in ipairs ( sprites ) do + gfxQuadListDeck:setList ( i, sprite.base, sprite.size ) + end + + ---------------------------------------------------------------- + + prop = MOAIProp2D.new () + prop:setDeck ( gfxQuadListDeck ) + prop:setHitGranularity ( MOAIProp.HIT_TEST_FINE ) + layer:insertProp ( prop ) + + return prop +end + +index = 1 + +function onMouseEvent ( down, delta ) + + if down == true then + + local x, y = MOAIInputMgr.device.pointer:getLoc () + x, y = layer:wndToWorld ( x, y ) + -- if prop:inside ( x, y ) then + + if delta > 0 then + index = ( index % #sprites ) + 1 + elseif delta < 0 then + index = index - 1 + index = index <= 0 and #sprites or index + end + + prop:setIndex ( index ) + + label:setString ( tostring(index) ) + + -- end + end +end + +MOAIInputMgr.device.mouseLeft:setCallback ( function ( down ) onMouseEvent ( down, 1 ) end ) +MOAIInputMgr.device.mouseRight:setCallback ( function ( down ) onMouseEvent ( down, -1 ) end ) + +MOAISim.openWindow ( "test", 640, 480 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 640, 480 ) +viewport:setScale ( 640, 480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + + +font = MOAIFont.new () +font:loadFromTTF ( 'r/arial-rounded.TTF' ) + +label = MOAITextLabel.new () +label:setString ( '' ) +label:setFont ( font ) +label:setTextSize ( 32 ) +label:setYFlip ( true ) +label:setAlignment ( MOAITextBox.CENTER_JUSTIFY, MOAITextBox.BASELINE_JUSTIFY ) +label:setLoc ( 0, -220 ) +layer:insertProp ( label ) + +-- animation with horizontal tiles in texture files +-- loadAsset('r/running_julius') + +-- animation with vertical tiles in texture files +-- loadAsset('r/worry_bear_run_left') + +-- single frame smallest than the tile size +-- loadAsset('r/worry_bear_idle') + +-- single, small rectangle (smaller than chunk size) +-- loadAsset('r/rect') + +-- single, large rectangle (bigger than chunk size, uses non-square blocks) +-- a 720x720 image, with a 512 input chunkSize, will be cut in 4 pieces (from top left to bottom right) +-- the conditioner works like this: 720 % 512 = 208. What's the nearest upper pow2 for 208? 256 +-- 512x512 256x512 +-- 512x256 256x256 +loadAsset('r/rect2'):setScl ( .5, .5 ) diff --git a/regression-samples/quad-list-deck/r/arial-rounded.TTF b/regression-samples/quad-list-deck/r/arial-rounded.TTF new file mode 100644 index 0000000000..20b92a27d7 Binary files /dev/null and b/regression-samples/quad-list-deck/r/arial-rounded.TTF differ diff --git a/regression-samples/quad-list-deck/r/rect.0.png b/regression-samples/quad-list-deck/r/rect.0.png new file mode 100644 index 0000000000..80bbbfc781 Binary files /dev/null and b/regression-samples/quad-list-deck/r/rect.0.png differ diff --git a/regression-samples/quad-list-deck/r/rect.json b/regression-samples/quad-list-deck/r/rect.json new file mode 100644 index 0000000000..5bc2923867 --- /dev/null +++ b/regression-samples/quad-list-deck/r/rect.json @@ -0,0 +1,28 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 86, + "height": 32, + "opaque": true, + "pvr": false, + "sizeMB": 0.0078125, + "tiles": [ + { + "cropRect": [ + 0, + 0, + 61, + 29 + ], + "paddingRect": [ + 2, + 2, + 3, + 3 + ] + } + ], + "video": false, + "width": 64 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck/r/rect2.0.png b/regression-samples/quad-list-deck/r/rect2.0.png new file mode 100644 index 0000000000..642d01132a Binary files /dev/null and b/regression-samples/quad-list-deck/r/rect2.0.png differ diff --git a/regression-samples/quad-list-deck/r/rect2.1.png b/regression-samples/quad-list-deck/r/rect2.1.png new file mode 100644 index 0000000000..6bb3699d09 Binary files /dev/null and b/regression-samples/quad-list-deck/r/rect2.1.png differ diff --git a/regression-samples/quad-list-deck/r/rect2.2.png b/regression-samples/quad-list-deck/r/rect2.2.png new file mode 100644 index 0000000000..d49885a5d7 Binary files /dev/null and b/regression-samples/quad-list-deck/r/rect2.2.png differ diff --git a/regression-samples/quad-list-deck/r/rect2.3.png b/regression-samples/quad-list-deck/r/rect2.3.png new file mode 100644 index 0000000000..c62bcacc25 Binary files /dev/null and b/regression-samples/quad-list-deck/r/rect2.3.png differ diff --git a/regression-samples/quad-list-deck/r/rect2.json b/regression-samples/quad-list-deck/r/rect2.json new file mode 100644 index 0000000000..840bd6be34 --- /dev/null +++ b/regression-samples/quad-list-deck/r/rect2.json @@ -0,0 +1,32 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 87, + "height": 768, + "opaque": true, + "pvr": false, + "sizeMB": 2.25, + "tiles": [ + { + "cropRect": [ + 0, + 0, + 720, + 720 + ], + "paddingRect": [ + 0, + 0, + 0, + 0 + ] + } + ], + "anchor": { + "x": 360, + "y": 360 + }, + "video": false, + "width": 768 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck/r/running_julius.0.png b/regression-samples/quad-list-deck/r/running_julius.0.png new file mode 100644 index 0000000000..bc25b7ba58 Binary files /dev/null and b/regression-samples/quad-list-deck/r/running_julius.0.png differ diff --git a/regression-samples/quad-list-deck/r/running_julius.1.png b/regression-samples/quad-list-deck/r/running_julius.1.png new file mode 100644 index 0000000000..b4becaa84f Binary files /dev/null and b/regression-samples/quad-list-deck/r/running_julius.1.png differ diff --git a/regression-samples/quad-list-deck/r/running_julius.2.png b/regression-samples/quad-list-deck/r/running_julius.2.png new file mode 100644 index 0000000000..cd417f44da Binary files /dev/null and b/regression-samples/quad-list-deck/r/running_julius.2.png differ diff --git a/regression-samples/quad-list-deck/r/running_julius.json b/regression-samples/quad-list-deck/r/running_julius.json new file mode 100644 index 0000000000..3fbc29646f --- /dev/null +++ b/regression-samples/quad-list-deck/r/running_julius.json @@ -0,0 +1,277 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "anchor": { + "x": 77, + "y": 121 + }, + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 87, + "framesPerSecond": 24.0, + "height": 512, + "opaque": false, + "origin": { + "x": 512, + "y": 464 + }, + "pvr": false, + "shotgunVersion": 1, + "sizeMB": 3.0, + "tiles": [ + { + "cropRect": [ + 1, + 1, + 151, + 239 + ], + "paddingRect": [ + 4, + 2, + 7, + 3 + ] + }, + { + "cropRect": [ + 152, + 1, + 302, + 227 + ], + "paddingRect": [ + 4, + 14, + 7, + 3 + ] + }, + { + "cropRect": [ + 442, + 1, + 591, + 216 + ], + "paddingRect": [ + 5, + 25, + 7, + 3 + ] + }, + { + "cropRect": [ + 1073, + 1, + 1200, + 211 + ], + "paddingRect": [ + 16, + 30, + 18, + 3 + ] + }, + { + "cropRect": [ + 720, + 240, + 833, + 451 + ], + "paddingRect": [ + 19, + 29, + 29, + 3 + ] + }, + { + "cropRect": [ + 1201, + 1, + 1314, + 235 + ], + "paddingRect": [ + 17, + 6, + 31, + 3 + ] + }, + { + "cropRect": [ + 843, + 1, + 958, + 238 + ], + "paddingRect": [ + 17, + 3, + 29, + 3 + ] + }, + { + "cropRect": [ + 135, + 240, + 251, + 480 + ], + "paddingRect": [ + 17, + 0, + 28, + 3 + ] + }, + { + "cropRect": [ + 252, + 240, + 366, + 479 + ], + "paddingRect": [ + 19, + 1, + 28, + 3 + ] + }, + { + "cropRect": [ + 959, + 1, + 1072, + 239 + ], + "paddingRect": [ + 19, + 2, + 29, + 3 + ] + }, + { + "cropRect": [ + 367, + 240, + 484, + 466 + ], + "paddingRect": [ + 18, + 14, + 26, + 3 + ] + }, + { + "cropRect": [ + 1315, + 1, + 1431, + 216 + ], + "paddingRect": [ + 21, + 25, + 24, + 3 + ] + }, + { + "cropRect": [ + 485, + 240, + 603, + 450 + ], + "paddingRect": [ + 20, + 30, + 23, + 3 + ] + }, + { + "cropRect": [ + 604, + 240, + 719, + 451 + ], + "paddingRect": [ + 19, + 29, + 27, + 3 + ] + }, + { + "cropRect": [ + 722, + 1, + 842, + 235 + ], + "paddingRect": [ + 17, + 6, + 24, + 3 + ] + }, + { + "cropRect": [ + 592, + 1, + 721, + 238 + ], + "paddingRect": [ + 15, + 3, + 17, + 3 + ] + }, + { + "cropRect": [ + 1, + 240, + 134, + 480 + ], + "paddingRect": [ + 14, + 0, + 14, + 3 + ] + }, + { + "cropRect": [ + 303, + 1, + 441, + 239 + ], + "paddingRect": [ + 11, + 2, + 12, + 3 + ] + } + ], + "video": false, + "videoFramerate": 24.0, + "width": 1536 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck/r/worry_bear_idle.0.png b/regression-samples/quad-list-deck/r/worry_bear_idle.0.png new file mode 100644 index 0000000000..4137b01640 Binary files /dev/null and b/regression-samples/quad-list-deck/r/worry_bear_idle.0.png differ diff --git a/regression-samples/quad-list-deck/r/worry_bear_idle.json b/regression-samples/quad-list-deck/r/worry_bear_idle.json new file mode 100644 index 0000000000..7b7de647b1 --- /dev/null +++ b/regression-samples/quad-list-deck/r/worry_bear_idle.json @@ -0,0 +1,39 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "anchor": { + "x": 121, + "y": 141 + }, + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 54, + "framesPerSecond": 24.0, + "height": 256, + "opaque": false, + "origin": { + "x": 622, + "y": 467 + }, + "pvr": false, + "shotgunVersion": 3, + "sizeMB": 0.25, + "tiles": [ + { + "cropRect": [ + 0, + 0, + 154, + 234 + ], + "paddingRect": [ + 44, + 25, + 45, + 3 + ] + } + ], + "video": false, + "videoFramerate": 24.0, + "width": 256 +} \ No newline at end of file diff --git a/regression-samples/quad-list-deck/r/worry_bear_run_left.0.png b/regression-samples/quad-list-deck/r/worry_bear_run_left.0.png new file mode 100644 index 0000000000..e9ea306121 Binary files /dev/null and b/regression-samples/quad-list-deck/r/worry_bear_run_left.0.png differ diff --git a/regression-samples/quad-list-deck/r/worry_bear_run_left.1.png b/regression-samples/quad-list-deck/r/worry_bear_run_left.1.png new file mode 100644 index 0000000000..6cae7af970 Binary files /dev/null and b/regression-samples/quad-list-deck/r/worry_bear_run_left.1.png differ diff --git a/regression-samples/quad-list-deck/r/worry_bear_run_left.2.png b/regression-samples/quad-list-deck/r/worry_bear_run_left.2.png new file mode 100644 index 0000000000..2c6224e080 Binary files /dev/null and b/regression-samples/quad-list-deck/r/worry_bear_run_left.2.png differ diff --git a/regression-samples/quad-list-deck/r/worry_bear_run_left.3.png b/regression-samples/quad-list-deck/r/worry_bear_run_left.3.png new file mode 100644 index 0000000000..d837b9ea36 Binary files /dev/null and b/regression-samples/quad-list-deck/r/worry_bear_run_left.3.png differ diff --git a/regression-samples/quad-list-deck/r/worry_bear_run_left.4.png b/regression-samples/quad-list-deck/r/worry_bear_run_left.4.png new file mode 100644 index 0000000000..bb35305e93 Binary files /dev/null and b/regression-samples/quad-list-deck/r/worry_bear_run_left.4.png differ diff --git a/regression-samples/quad-list-deck/r/worry_bear_run_left.json b/regression-samples/quad-list-deck/r/worry_bear_run_left.json new file mode 100644 index 0000000000..8c6036e5a9 --- /dev/null +++ b/regression-samples/quad-list-deck/r/worry_bear_run_left.json @@ -0,0 +1,249 @@ +{ + "__warning__": "DO NOT EDIT THIS FILE. This json is automatically generated and overwritten, edit preprocessor input json instead.", + "anchor": { + "x": 121, + "y": 141 + }, + "chunkBleedMargin": 0, + "chunkSize": 512, + "efficiency": 78, + "framesPerSecond": 24.0, + "height": 1536, + "opaque": false, + "origin": { + "x": 622, + "y": 467 + }, + "pvr": false, + "shotgunVersion": 2, + "sizeMB": 3.0, + "tiles": [ + { + "cropRect": [ + 1, + 1245, + 125, + 1497 + ], + "paddingRect": [ + 49, + 7, + 70, + 3 + ] + }, + { + "cropRect": [ + 133, + 985, + 261, + 1243 + ], + "paddingRect": [ + 45, + 0, + 70, + 4 + ] + }, + { + "cropRect": [ + 1, + 733, + 138, + 982 + ], + "paddingRect": [ + 42, + 8, + 64, + 5 + ] + }, + { + "cropRect": [ + 1, + 241, + 152, + 484 + ], + "paddingRect": [ + 37, + 15, + 55, + 4 + ] + }, + { + "cropRect": [ + 1, + 1, + 158, + 238 + ], + "paddingRect": [ + 34, + 22, + 52, + 3 + ] + }, + { + "cropRect": [ + 161, + 1, + 316, + 240 + ], + "paddingRect": [ + 34, + 22, + 54, + 1 + ] + }, + { + "cropRect": [ + 153, + 241, + 304, + 482 + ], + "paddingRect": [ + 34, + 21, + 58, + 0 + ] + }, + { + "cropRect": [ + 245, + 1245, + 352, + 1491 + ], + "paddingRect": [ + 65, + 14, + 71, + 2 + ] + }, + { + "cropRect": [ + 129, + 1245, + 242, + 1496 + ], + "paddingRect": [ + 60, + 7, + 70, + 4 + ] + }, + { + "cropRect": [ + 1, + 985, + 132, + 1242 + ], + "paddingRect": [ + 47, + 0, + 65, + 5 + ] + }, + { + "cropRect": [ + 141, + 733, + 275, + 983 + ], + "paddingRect": [ + 47, + 8, + 62, + 4 + ] + }, + { + "cropRect": [ + 1, + 485, + 143, + 729 + ], + "paddingRect": [ + 41, + 15, + 60, + 3 + ] + }, + { + "cropRect": [ + 145, + 485, + 289, + 723 + ], + "paddingRect": [ + 38, + 22, + 61, + 2 + ] + }, + { + "cropRect": [ + 265, + 985, + 402, + 1224 + ], + "paddingRect": [ + 42, + 22, + 64, + 1 + ] + }, + { + "cropRect": [ + 277, + 733, + 406, + 974 + ], + "paddingRect": [ + 47, + 21, + 67, + 0 + ] + }, + { + "cropRect": [ + 293, + 485, + 401, + 732 + ], + "paddingRect": [ + 64, + 14, + 71, + 1 + ] + } + ], + "video": false, + "videoFramerate": 24.0, + "width": 512 +} \ No newline at end of file diff --git a/regression-samples/script-deck/main.lua b/regression-samples/script-deck/main.lua new file mode 100644 index 0000000000..5820874032 --- /dev/null +++ b/regression-samples/script-deck/main.lua @@ -0,0 +1,23 @@ +local width, height = 320, 480 + +MOAISim.openWindow ( "test", width, height ) + +viewport = MOAIViewport.new () +viewport:setSize ( width, height ) +viewport:setScale ( width, height ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + +local r, g, b, a = 1,1,1,1 +local deck = MOAIScriptDeck.new() +deck:setRect(0, 0, width, height) +deck:setDrawCallback(function() + MOAIGfxDevice.setPenColor(r, g, b, a) + MOAIDraw.fillRect(0, 0, width, height) +end) +local prop = MOAIGraphicsProp.new() +prop:setDeck(deck) +prop:setPriority(-1) -- force background +layer:insertProp(prop) \ No newline at end of file diff --git a/samples/anim-basic/main.lua b/samples/anim-basic/main.lua index 76aa2be3fe..3fdbf604d1 100644 --- a/samples/anim-basic/main.lua +++ b/samples/anim-basic/main.lua @@ -15,21 +15,22 @@ layer:setViewport ( viewport ) MOAISim.pushRenderPass ( layer ) gfxQuad = MOAIGfxQuad2D.new () -gfxQuad:setTexture ( "moai.png" ) +gfxQuad:setTexture ( "../resources/moai.png" ) gfxQuad:setRect ( -128, -128, 128, 128 ) gfxQuad:setUVRect ( 0, 0, 1, 1 ) -local function addProp ( x, y ) +prop = MOAIProp2D.new () +prop:setDeck ( gfxQuad ) +layer:insertProp ( prop ) +prop:moveRot ( 360, 5 ) - local prop = MOAIProp2D.new () - prop:setDeck ( gfxQuad ) - layer:insertProp ( prop ) - prop:setLoc ( x, y ) - prop:moveRot ( 360, 1.5 ) -end +gfxQuad = MOAIGfxQuad2D.new () +gfxQuad:setTexture ( "../resources/test.png" ) +gfxQuad:setRect ( -128, -128, 128, 128 ) +gfxQuad:setUVRect ( 0, 0, 1, 1 ) -addProp ( 50, 50 ) -addProp ( 50, -50 ) -addProp ( -50, -50 ) -addProp ( -50, 50 ) -addProp ( 0, 0 ) +prop = MOAIProp2D.new () +prop:setDeck ( gfxQuad ) +prop:setColor ( 1, 1, 1, 0 ) +layer:insertProp ( prop ) +prop:moveRot ( -360, 5 ) diff --git a/samples/anim-basic/moai.png b/samples/anim-basic/moai.png deleted file mode 100644 index 8a9974bd65..0000000000 Binary files a/samples/anim-basic/moai.png and /dev/null differ diff --git a/samples/anim-curve-draw/main.lua b/samples/anim-curve-draw/main.lua index d560ee1df1..fde5dd53c0 100644 --- a/samples/anim-curve-draw/main.lua +++ b/samples/anim-curve-draw/main.lua @@ -38,7 +38,7 @@ local curveIndex = 1 function onDraw ( index, xOff, yOff, xFlip, yFlip ) - MOAIGfxDevice.setPenColor ( 1, 0, 0, 1 ) + MOAIGfxMgr.setPenColor ( 1, 0, 0, 1 ) MOAIDraw.drawAnimCurve ( makeCurve ( curveTypes [ curveIndex ].value ), 100 ) if curveIndex ~= prevIndex then print ( string.format ( "%i of %i: %s", curveIndex, #curveTypes, curveTypes [ curveIndex ].name )) diff --git a/samples/audio-meter/main.lua b/samples/audio-meter/main.lua new file mode 100644 index 0000000000..8de4ce79e8 --- /dev/null +++ b/samples/audio-meter/main.lua @@ -0,0 +1,103 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +SAMPLE_RATE = 44100 +WINDOW_SIZE = 1024 +WINDOW_BYTES = WINDOW_SIZE * 2 +BLEND = 0.125 + +MOAISim.openWindow ( "test", 1024, 512 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 1024, 512 ) +viewport:setScale ( 1024, 512 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +layer:setClearColor ( 1, 1, 1, 1 ) +MOAISim.pushRenderPass ( layer ) + +fourier = MOAIFourier.new () +fourier:init ( WINDOW_SIZE, true ) +fourier:setOutputType ( MOAIFourier.OUTPUT_OCTAVES, 3, 44100 ) +fourier:setWindowFunction ( MOAIFourier.HANN ) + +--for i = 1, WINDOW_SIZE do +-- print ( 'index', i, fourier:getFrequencyForIndex ( i )) +--end + +--for i = 1, fourier:countOctaves () do +-- print ( 'octave', i, fourier:getWidthOfOctave ( i )) +--end + +bands = fourier:countBands () + +octaves = MOAIByteStream.new () +octaves:open ( bands * 4 ) + +meter = MOAIByteStream.new () +meter:open ( bands * 4 ) + +for i = 1, bands do + meter:writeFloat ( 0 ) +end + +sampleStream = MOAIMemStream.new () + +onSampleBufferFull = function () + + sampleStream:seek ( 0 ) + octaves:seek ( 0 ) + + fourier:transform ( + sampleStream, + MOAIFourier.SAMPLE_S16, + false, + octaves, + MOAIFourier.SAMPLE_FLOAT + ) + + octaves:seek ( 0 ) + meter:seek ( 0 ) + + for i = 1, bands do + + local newResult = octaves:readFloat () + local oldResult = meter:readFloat () + + meter:seek ( meter:getCursor () - 4 ) + meter:writeFloat (( newResult * BLEND ) + ( oldResult * ( 1 - BLEND ))) + end + + sampleStream:seek ( 0 ) +end + +sampler = MOAIAudioSamplerCocoa.new () +sampler:init ( 44100, 1, WINDOW_SIZE ) +sampler:setStream ( sampleStream ) +sampler:setListener ( MOAIAudioSamplerCocoa.EVENT_BUFFER, onSampleBufferFull ) +sampler:start () + +startTime = MOAISim.getDeviceTime () +elapsedFrames = 0 + +onDraw = function () + + meter:seek ( 0 ) + + local span = 1024 / bands + + for i = 1, bands do + + local x = (( i - 1 ) * span ) - ( 1024 / 2 ) + local y = ( meter:readFloat () * 64 ) - 256 + + MOAIGfxMgr.setPenColor ( 1, 0, 0, 1 ) + MOAIDraw.fillRect ( x, y, x + span, -256 ) + end +end + +layer:setOverlayTable ({ onDraw }) diff --git a/samples/audio-sampler/main.lua b/samples/audio-sampler/main.lua new file mode 100644 index 0000000000..64090871e2 --- /dev/null +++ b/samples/audio-sampler/main.lua @@ -0,0 +1,60 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAISim.openWindow ( "test", 320, 480 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 320, 480 ) +viewport:setScale ( 320, -480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + +gfxQuad = MOAIGfxQuad2D.new () +gfxQuad:setTexture ( "../resources/moai.png" ) +gfxQuad:setRect ( -64, -64, 64, 64 ) +gfxQuad:setUVRect ( 0, 0, 1, 1 ) + +prop = MOAIProp2D.new () +prop:setDeck ( gfxQuad ) +layer:insertProp ( prop ) + +prop:moveRot ( 360, 1.5 ) + +stream = MOAIMemStream.new () + +sampler = MOAIAudioSamplerCocoa.new () +sampler:init () +sampler:setStream ( stream ) +sampler:start () + +function onClick ( down ) + + if down and sampler then + + sampler:stop () + sampler = nil + + stream:seek ( 0 ) + + length = stream:getLength () + + MOAIUntzSystem.initialize () + + buffer = MOAIUntzSampleBuffer.new () + buffer:prepareBuffer ( 1, length, 44100 ) + buffer:setRawData ( stream:read (), length, 1 ) + + sound = MOAIUntzSound.new () + sound:load ( buffer ) + sound:setVolume ( 1 ) + sound:setLooping ( true ) + sound:play () + end +end + +MOAIInputMgr.device.mouseLeft:setCallback ( onClick ) diff --git a/samples/audio-untz-sample/main.lua b/samples/audio-untz-sample/main.lua new file mode 100644 index 0000000000..488ebeb56a --- /dev/null +++ b/samples/audio-untz-sample/main.lua @@ -0,0 +1,85 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAISim.openWindow ( "test", 320, 480 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 320, 480 ) +viewport:setScale ( 320, -480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + +gfxQuad = MOAIGfxQuad2D.new () +gfxQuad:setTexture ( '../resources/moai.png' ) +gfxQuad:setRect ( -64, -64, 64, 64 ) +gfxQuad:setUVRect ( 0, 0, 1, 1 ) + +prop = MOAIProp2D.new () +prop:setDeck ( gfxQuad ) +layer:insertProp ( prop ) + +prop:moveRot ( 360, 1.5 ) + +writeSine = function ( stream, hz, sampleRate, length ) + + for i = 1, ( length * sampleRate ) do + local t = (( i / sampleRate ) * hz ) % 1 + local s = math.sin ( t * math.pi * 2 ) + stream:write16 ( s < 0 and ( s * 32768 ) or ( s * 32767 )) + end +end + +writeTriangle = function ( stream, hz, sampleRate, length ) + + for i = 1, ( length * sampleRate ) do + local t = (( i / sampleRate ) * hz ) % 1 + t = t < 0.5 and ( t * 2 ) or ( 1 - (( t - 0.5 ) * 2 )) + local s = ( t * 2 ) - 1 + stream:write16 ( s < 0 and ( s * 32768 ) or ( s * 32767 )) + end +end + +writeSawtooth = function ( stream, hz, sampleRate, length ) + + for i = 1, ( length * sampleRate ) do + local t = ((( i / sampleRate ) * hz ) + 0.25 ) % 1 + local s = ( t * 2 ) - 1 + stream:write16 ( s < 0 and ( s * 32768 ) or ( s * 32767 )) + end +end + +writeSquare = function ( stream, hz, sampleRate, length ) + + for i = 1, ( length * sampleRate ) do + local t = (( i / sampleRate ) * hz ) % 1 + t = t < 0.5 and 1 or -1 + local s = ( t * 2 ) - 1 + stream:write16 ( s < 0 and ( s * 32768 ) or ( s * 32767 )) + end +end + +stream = MOAIMemStream.new () +writeSine ( stream, 1000, 44100, 1 ) +writeTriangle ( stream, 1000, 44100, 1 ) +writeSawtooth ( stream, 1000, 44100, 1 ) +writeSquare ( stream, 1000, 44100, 1 ) +stream:seek ( 0 ) + +length = stream:getLength () + +MOAIUntzSystem.initialize () + +buffer = MOAIUntzSampleBuffer.new () +buffer:prepareBuffer ( 1, length, 44100 ) +buffer:setRawData ( stream:read (), length, 1 ) + +sound = MOAIUntzSound.new () +sound:load ( buffer ) +sound:setVolume ( 1 ) +sound:setLooping ( true ) +sound:play () diff --git a/samples/bezier-stepper/main.lua b/samples/bezier-stepper/main.lua new file mode 100644 index 0000000000..43a06dc6f9 --- /dev/null +++ b/samples/bezier-stepper/main.lua @@ -0,0 +1,60 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAISim.openWindow ( "test", 320, 480 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 320, 480 ) +viewport:setScale ( 320, 480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + +path = MOAIPath.new (); + +path:reserve ( 7 ) + +path:setPoint ( 1, -100, 0 ) +path:setPoint ( 2, 250, 300 ) +path:setPoint ( 3, -250, 300 ) +path:setPoint ( 4, 100, 0 ) + +path:setPoint ( 5, 350, -300 ) +path:setPoint ( 6, -350, -300 ) +path:setPoint ( 7, -100, 0 ) + +path:bless () + +stepper = MOAIPathStepper.new () +stepper:start ( path, path:getLength () / 128 ) + +local points = {} + +while stepper:more () do + local x, y = stepper:next () + table.insert ( points, { x = x, y = y }) +end + +function onDraw () + + MOAIGfxMgr.setPenColor ( 1, 0, 1, 1 ) + + local v1 = points [ 1 ] + for i = 2, #points do + local v2 = points [ i ] + MOAIDraw.drawLine ( v1.x, v1.y, v2.x, v2.y ) + v1 = v2 + end + + MOAIGfxMgr.setPenColor ( 1, 0, 0, 1 ) + + for i, v in ipairs ( points ) do + MOAIDraw.drawCircle ( v.x, v.y, 2, 8 ) + end +end + +layer:setOverlayTable ({ onDraw }) diff --git a/samples/camera-fitter-3d/main.lua b/samples/camera-fitter-3d/main.lua index c62c9d8ab9..7673e6a9dd 100644 --- a/samples/camera-fitter-3d/main.lua +++ b/samples/camera-fitter-3d/main.lua @@ -11,7 +11,7 @@ require ( 'cube' ) MOAISim.openWindow ( "test", 960, 480 ) -MOAIGfxDevice.getFrameBuffer ():setClearDepth ( true ) +MOAIGfxMgr.getFrameBuffer ():setClearDepth ( true ) XMIN = 20 XMAX = 940 diff --git a/samples/convex-hull-edit/main.lua b/samples/convex-hull-edit/main.lua new file mode 100644 index 0000000000..b35bcde22c --- /dev/null +++ b/samples/convex-hull-edit/main.lua @@ -0,0 +1,70 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAISim.openWindow ( "test", 512, 512 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 512, 512 ) +viewport:setScale ( 512, 512 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +layer:setClearColor ( 1, 1, 1, 1 ) +MOAISim.pushRenderPass ( layer ) + +drawPoints = function ( stream ) + + local total = stream:getLength () / 8 + stream:seek ( 0 ) + + MOAIGfxMgr.setPenColor ( 0, 0, 1, 1 ) + + for i = 1, total do + + local x = stream:readFloat () + local y = stream:readFloat () + + MOAIDraw.fillCircle ( x, y, 2 ) + end +end + +points = MOAIMemStream.new () +region = MOAIRegion.new () + +onDraw = function () + + drawPoints ( points ) + region:drawDebug () +end + +onMouseLeftEvent = function ( down ) + + if down then + + local x, y = layer:wndToWorld ( MOAIInputMgr.device.pointer:getLoc ()) + + points:seek ( points:getLength ()) + points:writeFloat ( x ) + points:writeFloat ( y ) + points:seek ( 0 ) + + if points:getLength () / 8 >= 3 then + region:convexHull ( points ) + end + end +end + +onMouseRightEvent = function ( down ) + if down then + points:discardAll () + region:clear () + end +end + +MOAIInputMgr.device.mouseLeft:setCallback ( onMouseLeftEvent ) +MOAIInputMgr.device.mouseRight:setCallback ( onMouseRightEvent ) + +layer:setOverlayTable ({ onDraw }) diff --git a/samples/convex-hull/main.lua b/samples/convex-hull/main.lua new file mode 100644 index 0000000000..e1c7f08a03 --- /dev/null +++ b/samples/convex-hull/main.lua @@ -0,0 +1,87 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAISim.openWindow ( "test", 512, 512 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 512, 512 ) +viewport:setScale ( 512, 512 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +layer:setClearColor ( 1, 1, 1, 1 ) +MOAISim.pushRenderPass ( layer ) + +drawPoints = function ( stream ) + + local total = stream:getLength () / 8 + stream:seek ( 0 ) + + MOAIGfxMgr.setPenColor ( 0, 0, 1, 1 ) + + for i = 1, total do + + local x = stream:readFloat () + local y = stream:readFloat () + + MOAIDraw.fillCircle ( x, y, 2 ) + end +end + +generatePoints = function ( stream, total, xMin, yMin, xMax, yMax ) + + for i = 1, total do + + local r = math.pow ( math.random (), 2 ) + local a = math.random () * math.pi * 2 + + local hw = ( xMax - xMin ) / 2 + local hh = ( yMax - yMin ) / 2 + + local x = xMin + hw + ( hw * ( math.cos ( a ) * r )) + local y = yMin + hh + ( hh * ( math.sin ( a ) * r )) + + stream:writeFloat ( x ) + stream:writeFloat ( y ) + end + + stream:seek ( 0 ) +end + +points = MOAIMemStream.new () +region = MOAIRegion.new () + +generateHull = function () + + generatePoints ( points, 100, -172, -172, 172, 172 ) + region:convexHull ( points ) +end + +onDraw = function () + + drawPoints ( points ) + region:drawDebug () +end + +onMouseLeftEvent = function ( down ) + if down then + points = MOAIMemStream.new () + generateHull () + end +end + +onMouseRightEvent = function ( down ) + if down then + generateHull () + end +end + +MOAIInputMgr.device.mouseLeft:setCallback ( onMouseLeftEvent ) +MOAIInputMgr.device.mouseRight:setCallback ( onMouseRightEvent ) + +generateHull () + +layer:setOverlayTable ({ onDraw }) diff --git a/samples/custom-log-messages/main.lua b/samples/custom-log-messages/main.lua deleted file mode 100644 index 0728b735a8..0000000000 --- a/samples/custom-log-messages/main.lua +++ /dev/null @@ -1,39 +0,0 @@ ----------------------------------------------------------------- --- Copyright (c) 2010-2011 Zipline Games, Inc. --- All Rights Reserved. --- http://getmoai.com ----------------------------------------------------------------- - -print ( "hello, moai!" ) - -MOAILogMgr.registerLogMessage ( MOAILogMgr.MOAI_FileNotFound_S, 'CUSTOM %s NOT FOUND MESSAGE', MOAILogMgr.LOG_ERROR ) -MOAILogMgr.registerLogMessage ( MOAILogMgr.MOAI_ParamTypeMismatch, 'CUSTOM PARAM TYPE MISMATCH MESSAGE', MOAILogMgr.LOG_ERROR ) -MOAILogMgr.registerLogMessage ( MOAILogMgr.MOAI_ParamTypeMismatch_DSS, 'CUSTOM PARAM TYPE MISMATCH MESSAGE [%d, %s, %s]', MOAILogMgr.LOG_ERROR ) -MOAILogMgr.registerLogMessage ( MOAILogMgr.MOAI_IndexOutOfRange_DDD, 'CUSTOM INDEX %d OUT OF RANGE [%d, %d] MESSAGE', MOAILogMgr.LOG_ERROR ) -MOAILogMgr.registerLogMessage ( MOAILogMgr.MOAINode_AttributeNotFound, 'CUSTOM ATTRIBUTE NOT FOUND MESSAGE', MOAILogMgr.LOG_ERROR ) - --- type mismatch -gfxQuad = MOAIGfxQuad2D.new () -gfxQuad:setRect ( 1, 2, 'something' ) - --- missing file -texture = MOAITexture.new () -texture:load ( 'foo.png' ) - --- create an object to test the out of range message -brushLib = MOAIGfxQuadDeck2D.new () -brushLib:reserve ( 2 ) -brushLib:setRect ( 0, 0, 0, 0, 0 ) -- error -brushLib:setRect ( 1, 0, 0, 0, 0 ) -brushLib:setRect ( 2, 0, 0, 0, 0 ) -brushLib:setRect ( 3, 0, 0, 0, 0 ) -- error - --- attributes -transform = MOAITransform.new () -transform:getAttr ( 76 ) - --- disable attribute not found message -print ( 'disabling attribute not found message...' ) -MOAILogMgr.registerLogMessage ( MOAILogMgr.MOAINode_AttributeNotFound ) -transform:getAttr ( 76 ) - diff --git a/samples/custom-log-messages/run.bat b/samples/custom-log-messages/run.bat deleted file mode 100644 index c396800225..0000000000 --- a/samples/custom-log-messages/run.bat +++ /dev/null @@ -1,24 +0,0 @@ -::----------------------------------------------------------------:: -:: Copyright (c) 2010-2011 Zipline Games, Inc. -:: All Rights Reserved. -:: http://getmoai.com -::----------------------------------------------------------------:: - -@echo off - -:: verify paths -if not exist "%MOAI_BIN%\moai.exe" ( - echo. - echo -------------------------------------------------------------------------------- - echo ERROR: The MOAI_BIN environment variable either doesn't exist or it's pointing - echo to an invalid path. Please point it at a folder containing moai.exe. - echo -------------------------------------------------------------------------------- - echo. - goto end -) - -:: run moai -"%MOAI_BIN%\moai" "main.lua" - -:end -pause \ No newline at end of file diff --git a/samples/custom-log-messages/run.sh b/samples/custom-log-messages/run.sh deleted file mode 100755 index 612def2f86..0000000000 --- a/samples/custom-log-messages/run.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -#-------------------------------------------------------------------------------------- -# Copyright (c) 2010-2013 Zipline Games, Inc. -# All Rights Reserved. -# http://getmoai.com -#-------------------------------------------------------------------------------------- - -cd `dirname $0` - -# Verify paths -if [ ! -f "$MOAI_BIN/moai" ]; then - echo "---------------------------------------------------------------------------" - echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an" - echo "invalid path. Please point it at a folder containing moai executable" - echo "---------------------------------------------------------------------------" - exit 1 -fi - -# Run moai -$MOAI_BIN/moai main.lua diff --git a/samples/deck-item-sdf/main.lua b/samples/deck-item-sdf/main.lua index 031faa8e94..1718e25a65 100644 --- a/samples/deck-item-sdf/main.lua +++ b/samples/deck-item-sdf/main.lua @@ -43,13 +43,13 @@ makeLayerWithDeckItem = function ( deck, idx, pad, viewWidth, viewHeight ) prop:setIndex ( idx ) layer:insertProp ( prop ) - return layer, width, height + return layer, prop, width, height end -- renders a deck item to a (padded) offscreen buffer then capturs and returns an image makeImageFromDeckItem = function ( deck, idx, pad ) - local layer, width, height = makeLayerWithDeckItem ( deck, idx, pad ) + local layer, prop, width, height = makeLayerWithDeckItem ( deck, idx, pad ) local frameBuffer = MOAIFrameBufferTexture.new () frameBuffer:setRenderTable ({ layer }) @@ -57,9 +57,10 @@ makeImageFromDeckItem = function ( deck, idx, pad ) frameBuffer:setClearColor ( 0, 0, 0, 0 ) MOAIRenderMgr.setBufferTable ({ frameBuffer }) - frameBuffer:grabNextFrame ( MOAIImage.new (), onGrab ) + frameBuffer.grabNextFrame ( frameBuffer, MOAIImage.new ()) while frameBuffer:isPendingGrab () do coroutine:yield () end + local image = frameBuffer:getGrabbedImage () assert ( image ) @@ -77,9 +78,13 @@ end main = function () + local texture = MOAITexture.new () + texture:load ( '../resources/moai-alpha.png' ) + while texture:getResourceState () ~= MOAITexture.STATE_READY_TO_BIND do coroutine:yield () end + -- load the deck local gfxQuad = MOAIGfxQuad2D.new () - gfxQuad:setTexture ( '../resources/moai-alpha.png' ) + gfxQuad:setTexture ( texture ) gfxQuad:setRect ( -128, -128, 128, 128 ) gfxQuad:setUVRect ( 0, 1, 1, 0 ) @@ -89,10 +94,11 @@ main = function () local hWidth, hHeight = width * 0.5, height * 0.5 gfxQuad:setRect ( -hWidth, -hHeight, hWidth, hHeight ) - local layer = makeLayerWithDeckItem ( gfxQuad, 1, 0, WIN_WIDTH, WIN_HEIGHT ) + local layer, prop = makeLayerWithDeckItem ( gfxQuad, 1, 0, WIN_WIDTH, WIN_HEIGHT ) layer:setClearColor ( 1, 1, 1, 1 ) MOAISim.pushRenderPass ( layer ) + end thread = MOAICoroutine.new () diff --git a/samples/deck-item-sdf/run.bat b/samples/deck-item-sdf/run.bat deleted file mode 100644 index c396800225..0000000000 --- a/samples/deck-item-sdf/run.bat +++ /dev/null @@ -1,24 +0,0 @@ -::----------------------------------------------------------------:: -:: Copyright (c) 2010-2011 Zipline Games, Inc. -:: All Rights Reserved. -:: http://getmoai.com -::----------------------------------------------------------------:: - -@echo off - -:: verify paths -if not exist "%MOAI_BIN%\moai.exe" ( - echo. - echo -------------------------------------------------------------------------------- - echo ERROR: The MOAI_BIN environment variable either doesn't exist or it's pointing - echo to an invalid path. Please point it at a folder containing moai.exe. - echo -------------------------------------------------------------------------------- - echo. - goto end -) - -:: run moai -"%MOAI_BIN%\moai" "main.lua" - -:end -pause \ No newline at end of file diff --git a/samples/device-clear-color/main.lua b/samples/device-clear-color/main.lua index c1fd31a53d..473f29f5b0 100644 --- a/samples/device-clear-color/main.lua +++ b/samples/device-clear-color/main.lua @@ -28,4 +28,4 @@ prop:moveRot ( 360, 1.5 ) color = MOAIColor.new () color:setColor ( 0, 0, 0, 1 ) color:seekColor ( 0, 1, 0, 1, 1.5 ) -MOAIGfxDevice.setClearColor ( color ) +MOAIGfxMgr.setClearColor ( color ) diff --git a/samples/flash-flipbook/main.lua b/samples/flash-flipbook/main.lua index 8f63dbdceb..a481b06f2c 100644 --- a/samples/flash-flipbook/main.lua +++ b/samples/flash-flipbook/main.lua @@ -132,7 +132,7 @@ layer:setViewport ( viewport ) MOAISim.pushRenderPass ( layer ) MOAISim.openWindow ( "flash", fla.width, fla.height ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) flash = parseFlash ( fla ) diff --git a/samples/font-bitmap/main.lua b/samples/font-bitmap/main.lua index 3b015fbfd9..35027e65f1 100644 --- a/samples/font-bitmap/main.lua +++ b/samples/font-bitmap/main.lua @@ -5,9 +5,9 @@ ---------------------------------------------------------------- MOAISim.openWindow ( "test", 320, 480 ) ---MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) ---MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) ---MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 320, 480 ) diff --git a/samples/font-bmfont-scaled/main.lua b/samples/font-bmfont-scaled/main.lua index 6d610ea942..98ef9ec9fb 100644 --- a/samples/font-bmfont-scaled/main.lua +++ b/samples/font-bmfont-scaled/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 320, 480 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 320, 480 ) diff --git a/samples/font-bmfont/main.lua b/samples/font-bmfont/main.lua index 51a3100358..3d4ce3fcfd 100644 --- a/samples/font-bmfont/main.lua +++ b/samples/font-bmfont/main.lua @@ -5,11 +5,11 @@ ---------------------------------------------------------------- MOAISim.openWindow ( "test", 512, 512 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 1, 0, 1 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) viewport:setScale ( 512, -512 ) diff --git a/samples/font-mipmap/main.lua b/samples/font-mipmap/main.lua index 55b3433c08..ba9a886e8b 100644 --- a/samples/font-mipmap/main.lua +++ b/samples/font-mipmap/main.lua @@ -6,7 +6,7 @@ MOAISim.openWindow ( "test", 320, 480 ) -gFrameBuffer = MOAIGfxDevice.getFrameBuffer () +gFrameBuffer = MOAIGfxMgr.getFrameBuffer () gFrameBuffer:setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () diff --git a/samples/font-ttf/main.lua b/samples/font-ttf/main.lua index 246b20f848..253e9be778 100644 --- a/samples/font-ttf/main.lua +++ b/samples/font-ttf/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 512, 512 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) diff --git a/samples/gl-frameBuffer/main.lua b/samples/gl-frameBuffer/main.lua index f33241db26..bb11c144f7 100644 --- a/samples/gl-frameBuffer/main.lua +++ b/samples/gl-frameBuffer/main.lua @@ -13,7 +13,7 @@ function initFrameBuffer () local gfxQuad = MOAIGfxQuad2D.new () gfxQuad:setTexture ( "moai.png" ) gfxQuad:setRect ( -128, -128, 128, 128 ) - gfxQuad:setUVRect ( 0, 0, 1, 1 ) + gfxQuad:setUVRect ( 1, 1, 0, 0 ) local viewport = MOAIViewport.new () viewport:setSize ( 256, 256 ) @@ -32,6 +32,7 @@ function initFrameBuffer () frameBuffer:setRenderTable ({ layer }) frameBuffer:init ( 256, 256 ) frameBuffer:setClearColor ( 1, 0, 0, 1 ) + MOAIRenderMgr.setBufferTable ({ frameBuffer }) return frameBuffer @@ -51,6 +52,7 @@ viewport:setScale ( 320, -480 ) layer = MOAILayer2D.new () layer:setViewport ( viewport ) + MOAISim.pushRenderPass ( layer ) prop = MOAIProp2D.new () diff --git a/samples/gl-geometry-writer/main.lua b/samples/gl-geometry-writer/main.lua index 2e06f511d1..03f89315f1 100644 --- a/samples/gl-geometry-writer/main.lua +++ b/samples/gl-geometry-writer/main.lua @@ -7,7 +7,7 @@ MOAIDebugLines.setStyle ( MOAIDebugLines.PROP_MODEL_BOUNDS, 2, 1, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.PROP_WORLD_BOUNDS, 1, 0.5, 0.5, 0.5 ) -frameBuffer = MOAIGfxDevice.getFrameBuffer () +frameBuffer = MOAIGfxMgr.getFrameBuffer () frameBuffer:setClearDepth ( true ) MOAISim.openWindow ( "test", 320, 480 ) diff --git a/samples/gl-loading-list/main.lua b/samples/gl-loading-list/main.lua new file mode 100644 index 0000000000..a4415bda5d --- /dev/null +++ b/samples/gl-loading-list/main.lua @@ -0,0 +1,63 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +-- this sample is only meaningful when runing in a multi-threaded host that implements +-- a separate loading display list and thread. see SDL desktop host for an example +-- of this. + +MOAISim.openWindow ( "test", 320, 480 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 320, 480 ) +viewport:setScale ( 320, -480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + +texture1 = MOAITexture.new () +texture1:load ( '../resources/moai.png' ) +texture1:scheduleForGPUCreate ( MOAIGfxMgr.LOADING_LIST ) + +texture2 = MOAITexture.new () +texture2:load ( '../resources/test.png' ) +texture2:scheduleForGPUCreate ( MOAIGfxMgr.LOADING_LIST ) + +onCreated = function ( texture ) + + print ( 'CREATED TEXTURE:', texture ) + + texture.ready = true + + if texture1.ready and texture2.ready then + + print ( 'READY' ) + + gfxQuad = MOAIGfxQuad2D.new () + gfxQuad:setTexture ( texture1 ) + gfxQuad:setRect ( -128, -128, 128, 128 ) + gfxQuad:setUVRect ( 0, 0, 1, 1 ) + + prop = MOAIProp2D.new () + prop:setDeck ( gfxQuad ) + layer:insertProp ( prop ) + prop:moveRot ( 360, 5 ) + + gfxQuad = MOAIGfxQuad2D.new () + gfxQuad:setTexture ( texture2 ) + gfxQuad:setRect ( -128, -128, 128, 128 ) + gfxQuad:setUVRect ( 0, 0, 1, 1 ) + + prop = MOAIProp2D.new () + prop:setDeck ( gfxQuad ) + prop:setColor ( 1, 1, 1, 0 ) + layer:insertProp ( prop ) + prop:moveRot ( -360, 5 ) + end +end + +texture1:setListener ( MOAITexture.GFX_EVENT_CREATED, function () onCreated ( texture1 ) end ) +texture2:setListener ( MOAITexture.GFX_EVENT_CREATED, function () onCreated ( texture2 ) end ) diff --git a/samples/gl-selection-mesh/main.lua b/samples/gl-selection-mesh/main.lua index 0d0c1804a6..4683b0b572 100644 --- a/samples/gl-selection-mesh/main.lua +++ b/samples/gl-selection-mesh/main.lua @@ -6,7 +6,7 @@ MOAISim.openWindow ( "test", 320, 480 ) -frameBuffer = MOAIGfxDevice.getFrameBuffer () +frameBuffer = MOAIGfxMgr.getFrameBuffer () frameBuffer:setClearDepth ( true ) viewport = MOAIViewport.new () diff --git a/samples/gl-shader-lighting/main.lua b/samples/gl-shader-lighting/main.lua index d206627cc6..0470faf2fc 100644 --- a/samples/gl-shader-lighting/main.lua +++ b/samples/gl-shader-lighting/main.lua @@ -187,6 +187,6 @@ local mesh = makeCube ( 128, 'moai.png' ) prop = MOAIProp.new () prop:setDeck ( mesh ) -prop:moveRot ( 360, 360, 0, 12 ) +prop:moveRot ( 360, 360, 0, 6 ) prop:setCullMode ( MOAIProp.CULL_BACK ) layer:insertProp ( prop ) \ No newline at end of file diff --git a/samples/grid-hex/main.lua b/samples/grid-hex/main.lua index bceffe6db3..48e4d07d08 100644 --- a/samples/grid-hex/main.lua +++ b/samples/grid-hex/main.lua @@ -18,11 +18,11 @@ local grid_rows = 8 local grid_columns = 8 grid = MOAIGrid.new () grid:initHexGrid ( grid_columns, grid_rows, 32 ) -grid:setRepeat ( false ) +grid:setRepeat ( true ) for c = 1, grid_columns do for r = 1, grid_rows do - grid:setTile ( c, r, ((c + r) % 4) + 1 ) + grid:setTile ( c, r, (( c + r ) % 4 ) + 1 ) end end diff --git a/samples/grid-quads/main.lua b/samples/grid-quads/main.lua index 47fd39fc33..03b4e350a5 100644 --- a/samples/grid-quads/main.lua +++ b/samples/grid-quads/main.lua @@ -16,6 +16,7 @@ MOAISim.pushRenderPass ( layer ) grid = MOAIGrid.new () grid:initDiamondGrid ( 4, 4, 128, 128 ) +grid:setRepeat ( true ) grid:setRow ( 1, 0x01, 0x02, 0x01, 0x02 ) grid:setRow ( 2, 0x03, 0x04, 0x03, 0x04 ) diff --git a/samples/image-convolve/main.lua b/samples/image-convolve/main.lua new file mode 100644 index 0000000000..e4df474b89 --- /dev/null +++ b/samples/image-convolve/main.lua @@ -0,0 +1,58 @@ +--https://en.wikipedia.org/wiki/Kernel_(image_processing) + +image = MOAIImage.new () +image:load ( '../resources/moai.png' ) + +--[[ +local kernel = { + { 1, 2, 1 }, + { 2, 4, 2 }, + { 1, 2, 1 }, +} +]]-- + +--[[ +local kernel = { + { 0, -1, 0 }, + { -1, 5, -1 }, + { 0, -1, 0 }, +} +]]-- + +--[[ +local kernel = { + { -1, -1, -1 }, + { -1, 8, -1 }, + { -1, -1, -1 }, +} +]]-- + +--local kernel = { 1, 2, 4, 8, 4, 2, 1 } + +local kernel = MOAIImage.calculateGaussianKernel ( 16 ) + +image = image:convolve ( kernel, true ) + +local width, height = image:getSize () + +local hWidth, hHeight = width / 2, height / 2 + +MOAISim.openWindow ( "test", width, height ) + +viewport = MOAIViewport.new () +viewport:setSize ( width, height ) +viewport:setScale ( width, -height ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + + +gfxQuad = MOAIGfxQuad2D.new () +gfxQuad:setTexture ( image ) +gfxQuad:setRect ( -hWidth, -hHeight, hWidth, hHeight ) +gfxQuad:setUVRect ( 0, 0, 1, 1 ) + +prop = MOAIProp2D.new () +prop:setDeck ( gfxQuad ) +layer:insertProp ( prop ) \ No newline at end of file diff --git a/samples/image-framebuffer-grab/main.lua b/samples/image-framebuffer-grab/main.lua index abd27da39f..b5f90a111d 100644 --- a/samples/image-framebuffer-grab/main.lua +++ b/samples/image-framebuffer-grab/main.lua @@ -31,7 +31,7 @@ camera:setLoc ( 0, 0, camera:getFocalLength ( 320 )) layer:setCamera ( camera ) function onStop () - MOAIRenderMgr.grabNextFrame ( MOAIImage.new(), function ( img ) img:write ( 'test.png' ) end ) + MOAIRenderMgr.grabNextFrame ( MOAIImage.new(), function ( img ) img:write ( '../temp/test.png' ) end ) end action:setListener ( MOAIAction.EVENT_STOP, onStop ) diff --git a/samples/image-paint-brush/main.lua b/samples/image-paint-brush/main.lua index 8ca76050de..578a116cfc 100644 --- a/samples/image-paint-brush/main.lua +++ b/samples/image-paint-brush/main.lua @@ -8,7 +8,7 @@ VIEW_WIDTH = 512 VIEW_HEIGHT = 512 if MOAIAppIOS then - VIEW_WIDTH, VIEW_HEIGHT = MOAIGfxDevice.getViewSize () + VIEW_WIDTH, VIEW_HEIGHT = MOAIGfxMgr.getViewSize () end minPow2 = function ( num ) diff --git a/samples/image-paint-multitexture/main.lua b/samples/image-paint-multitexture/main.lua index 04999f5cf6..2574af80c7 100644 --- a/samples/image-paint-multitexture/main.lua +++ b/samples/image-paint-multitexture/main.lua @@ -8,7 +8,7 @@ VIEW_WIDTH = 512 VIEW_HEIGHT = 512 if MOAIAppIOS then - VIEW_WIDTH, VIEW_HEIGHT = MOAIGfxDevice.getViewSize () + VIEW_WIDTH, VIEW_HEIGHT = MOAIGfxMgr.getViewSize () end minPow2 = function ( num ) diff --git a/samples/input-picking3D/main.lua b/samples/input-picking3D/main.lua index 323f7ef0a0..3568099803 100644 --- a/samples/input-picking3D/main.lua +++ b/samples/input-picking3D/main.lua @@ -16,7 +16,7 @@ dofile ( "cube.lua" ) MOAISim.openWindow ( "test", SCREEN_WIDTH, SCREEN_HEIGHT ) -frameBuffer = MOAIGfxDevice.getFrameBuffer () +frameBuffer = MOAIGfxMgr.getFrameBuffer () frameBuffer:setClearDepth ( true ) frameBuffer:setClearColor ( 0, 0, 0, 1 ) diff --git a/samples/input-text/main.lua b/samples/input-text/main.lua index 79ddbfc8da..fd716c6172 100644 --- a/samples/input-text/main.lua +++ b/samples/input-text/main.lua @@ -5,7 +5,7 @@ ---------------------------------------------------------------- MOAISim.openWindow ( "test", 480, 100 ) -MOAIGfxDevice.setClearColor ( 0.25, 0, 0.5 ) +MOAIGfxMgr.setClearColor ( 0.25, 0, 0.5 ) local viewport = MOAIViewport.new () viewport:setSize ( 480, 100 ) @@ -55,7 +55,7 @@ local cursorColor = MOAIColor.new () local cursorDeck = MOAIScriptDeck.new () cursorDeck:setRect ( 0, 0, 1, 1 ) -- dummy cursorDeck:setDrawCallback ( function ( index ) - MOAIGfxDevice.setPenColor ( cursorColor:getColor ()) + MOAIGfxMgr.setPenColor ( cursorColor:getColor ()) local cursorWidth = 2 local cursorHeight = 30 local cursorX diff --git a/samples/ios-orientation/main.lua b/samples/ios-orientation/main.lua index 6e44b8ebc7..fbd5b8595f 100644 --- a/samples/ios-orientation/main.lua +++ b/samples/ios-orientation/main.lua @@ -9,7 +9,7 @@ if MOAIEnvironment.osBrand ~= MOAIEnvironment.OS_BRAND_IOS then os.exit () end -viewWidth, viewHeight = MOAIGfxDevice.getViewSize () +viewWidth, viewHeight = MOAIGfxMgr.getViewSize () viewport = MOAIViewport.new () viewport:setSize ( viewWidth, viewHeight ) @@ -35,7 +35,7 @@ function onResize ( width, height ) print ( 'RESIZED', width, height ) end -MOAIGfxDevice.setListener ( MOAIGfxDevice.EVENT_RESIZE, onResize ) +MOAIGfxMgr.setListener ( MOAIGfxMgr.EVENT_RESIZE, onResize ) function onTap ( eventType, idx, x, y, tapCount ) diff --git a/samples/ios-screenSize/main.lua b/samples/ios-screenSize/main.lua index c4502116c3..a27f63fa7e 100644 --- a/samples/ios-screenSize/main.lua +++ b/samples/ios-screenSize/main.lua @@ -13,7 +13,7 @@ print ( "hello, iPhone!" ) print ( 'screen: ', MOAIEnvironment.screenWidth, MOAIEnvironment.screenHeight ) -viewWidth, viewHeight = MOAIGfxDevice.getViewSize () +viewWidth, viewHeight = MOAIGfxMgr.getViewSize () print ( 'view: ', viewWidth, viewHeight ) if MOAIEnvironment.iosRetinaDisplay then diff --git a/samples/ios-url-webview/main.lua b/samples/ios-url-webview/main.lua index 25c2b736bf..094bb032fc 100644 --- a/samples/ios-url-webview/main.lua +++ b/samples/ios-url-webview/main.lua @@ -9,7 +9,7 @@ if MOAIEnvironment.osBrand ~= MOAIEnvironment.OS_BRAND_IOS then os.exit () end -viewWidth, viewHeight = MOAIGfxDevice.getViewSize () +viewWidth, viewHeight = MOAIGfxMgr.getViewSize () viewport = MOAIViewport.new () viewport:setSize ( viewWidth, viewHeight ) @@ -35,7 +35,7 @@ function onResize ( width, height ) print ( 'RESIZED', width, height ) end -MOAIGfxDevice.setListener ( MOAIGfxDevice.EVENT_RESIZE, onResize ) +MOAIGfxMgr.setListener ( MOAIGfxMgr.EVENT_RESIZE, onResize ) onTouch = function ( eventType ) diff --git a/samples/particles-pex-plugin/Smoke.pex b/samples/particles-pex-plugin/Smoke.pex new file mode 100644 index 0000000000..03f6a7fa03 --- /dev/null +++ b/samples/particles-pex-plugin/Smoke.pex @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/particles-pex-plugin/Smoke.png b/samples/particles-pex-plugin/Smoke.png new file mode 100644 index 0000000000..953011666c Binary files /dev/null and b/samples/particles-pex-plugin/Smoke.png differ diff --git a/samples/particles-pex-plugin/Spark.pex b/samples/particles-pex-plugin/Spark.pex new file mode 100644 index 0000000000..d35389315a --- /dev/null +++ b/samples/particles-pex-plugin/Spark.pex @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/particles-pex-plugin/Spark.png b/samples/particles-pex-plugin/Spark.png new file mode 100644 index 0000000000..92a640553a Binary files /dev/null and b/samples/particles-pex-plugin/Spark.png differ diff --git a/samples/particles-pex-plugin/main.lua b/samples/particles-pex-plugin/main.lua index fbbc0100d7..180cdba307 100644 --- a/samples/particles-pex-plugin/main.lua +++ b/samples/particles-pex-plugin/main.lua @@ -17,40 +17,40 @@ MOAISim.pushRenderPass ( layer ) MOAISim.openWindow ( "cathead", 640, 480 ) -particleName = 'deathBlossomCharge.pex' +particleName = 'Smoke.pex' -local plugin = MOAIParticlePexPlugin.load( particleName ) +local plugin = MOAIParticlePexPlugin.load ( particleName ) local maxParticles = plugin:getMaxParticles () local blendsrc, blenddst = plugin:getBlendMode () local minLifespan, maxLifespan = plugin:getLifespan () local duration = plugin:getDuration () +local textureName = plugin:getTextureName () system = MOAIParticleSystem.new () system._duration = duration system._lifespan = maxLifespan -system:reserveParticles ( maxParticles , plugin:getSize() ) +system:reserveParticles ( maxParticles , plugin:getSize ()) system:reserveSprites ( maxParticles ) system:reserveStates ( 1 ) system:setBlendMode ( blendsrc, blenddst ) local state = MOAIParticleState.new () state:setTerm ( minLifespan, maxLifespan ) -state:setPlugin( plugin ) +state:setPlugin ( plugin ) system:setState ( 1, state ) -emitter = MOAIParticleTimedEmitter.new() +emitter = MOAIParticleTimedEmitter.new () emitter:setSystem ( system ) -emitter:setEmission ( plugin:getEmission () ) -emitter:setFrequency ( plugin:getFrequency () ) +emitter:setEmission ( plugin:getEmission ()) +emitter:setFrequency ( plugin:getFrequency ()) emitter:setRect ( -1, -1, 1, 1 ) -local deck = MOAIGfxQuad2D.new() -deck:setTexture( plugin:getTextureName() ) -deck:setRect( -0.5, -0.5, 0.5, 0.5 ) -- HACK: Currently for scaling we need to set the deck's rect to 1x1 -system:setDeck( deck ) +local deck = MOAIGfxQuad2D.new () +deck:setTexture ( textureName ) +deck:setRect ( -0.5, -0.5, 0.5, 0.5 ) -- HACK: Currently for scaling we need to set the deck's rect to 1x1 +system:setDeck ( deck ) system:start () emitter:start () layer:insertProp ( system ) - diff --git a/samples/pathfinding-vec/main.lua b/samples/pathfinding-vec/main.lua index 1c661bd158..0ea8460b22 100644 --- a/samples/pathfinding-vec/main.lua +++ b/samples/pathfinding-vec/main.lua @@ -39,7 +39,7 @@ end function onDraw ( index, xOff, yOff, xFlip, yFlip ) -- draw graph - MOAIGfxDevice.setPenColor ( 1, 1, 1, 1 ) + MOAIGfxMgr.setPenColor ( 1, 1, 1, 1 ) for i = 1, graph:getNodeCount () do local x, y = graph:getNode ( i ) @@ -54,7 +54,7 @@ function onDraw ( index, xOff, yOff, xFlip, yFlip ) end -- draw path - MOAIGfxDevice.setPenColor ( 1, 0, 0, 1 ) + MOAIGfxMgr.setPenColor ( 1, 0, 0, 1 ) local lastX, lastY for i = 1, pathFinder:getPathSize () do diff --git a/samples/resources/fonts/arial-rounded.TTF b/samples/resources/fonts/arial-rounded.TTF new file mode 100644 index 0000000000..20b92a27d7 Binary files /dev/null and b/samples/resources/fonts/arial-rounded.TTF differ diff --git a/samples/resources/tiny-x.png b/samples/resources/tiny-x.png new file mode 100644 index 0000000000..2d4ab8f850 Binary files /dev/null and b/samples/resources/tiny-x.png differ diff --git a/samples/scriptDeck/main.lua b/samples/scriptDeck/main.lua index 92b930b7a2..fe373f43da 100644 --- a/samples/scriptDeck/main.lua +++ b/samples/scriptDeck/main.lua @@ -16,11 +16,11 @@ MOAISim.pushRenderPass ( layer ) function onDraw ( index, xOff, yOff, xFlip, yFlip ) - MOAIGfxDevice.setPenColor ( 1, 0, 0, 1 ) + MOAIGfxMgr.setPenColor ( 1, 0, 0, 1 ) MOAIDraw.fillCircle ( 0, 0, 64, 32 ) - MOAIGfxDevice.setPenColor ( 1, 1, 1, 1 ) - MOAIGfxDevice.setPenWidth ( 2 ) + MOAIGfxMgr.setPenColor ( 1, 1, 1, 1 ) + MOAIGfxMgr.setPenWidth ( 2 ) MOAIDraw.drawEllipse ( 0, 0, 64, 64, 32 ) MOAIDraw.drawRay ( 0, 0, 0, 1 ) @@ -43,7 +43,7 @@ function onDraw ( index, xOff, yOff, xFlip, yFlip ) -64, 64 ) - MOAIGfxDevice.setPenColor ( 1, 1, 0, 1 ) + MOAIGfxMgr.setPenColor ( 1, 1, 0, 1 ) MOAIDraw.fillFan ( -32, -64, diff --git a/samples/textbox-auto-flip/main.lua b/samples/textbox-auto-flip/main.lua index 5629f4dda7..8cb179fbee 100644 --- a/samples/textbox-auto-flip/main.lua +++ b/samples/textbox-auto-flip/main.lua @@ -9,7 +9,7 @@ MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_GLYPHS, 1, 0.5, 0.5, 0.5, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_GLYPH_BOUNDS, 1, 1, 0, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) camera = MOAICamera2D.new () diff --git a/samples/textbox-curves/main.lua b/samples/textbox-curves/main.lua index 3404892380..98d67b9b0f 100644 --- a/samples/textbox-curves/main.lua +++ b/samples/textbox-curves/main.lua @@ -36,5 +36,5 @@ curve:setKey ( 2, 1, 16 ) textbox:reserveCurves ( 1 ) textbox:setCurve ( 1, curve ) -textbox:spool () +--textbox:spool () diff --git a/samples/textbox-escapes/main.lua b/samples/textbox-escapes/main.lua index 6129242f7d..4db5de4a4f 100644 --- a/samples/textbox-escapes/main.lua +++ b/samples/textbox-escapes/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 512, 512 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) diff --git a/samples/textbox-glyph-scale/main.lua b/samples/textbox-glyph-scale/main.lua index fa433a202f..4262432848 100644 --- a/samples/textbox-glyph-scale/main.lua +++ b/samples/textbox-glyph-scale/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 512, 512 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) diff --git a/samples/textbox-highlight/main.lua b/samples/textbox-highlight/main.lua index 6096a08fd2..21e037fc45 100644 --- a/samples/textbox-highlight/main.lua +++ b/samples/textbox-highlight/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 512, 512 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) diff --git a/samples/textbox-nested-styles/main.lua b/samples/textbox-nested-styles/main.lua index 871893fdef..94e3294ecf 100644 --- a/samples/textbox-nested-styles/main.lua +++ b/samples/textbox-nested-styles/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 512, 512 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) diff --git a/samples/textbox-newlines/main.lua b/samples/textbox-newlines/main.lua index 010684b4aa..9bf03a80e4 100644 --- a/samples/textbox-newlines/main.lua +++ b/samples/textbox-newlines/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 512, 512 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) diff --git a/samples/textbox-paging/main.lua b/samples/textbox-paging/main.lua index 44e6a186fd..d8300fe118 100644 --- a/samples/textbox-paging/main.lua +++ b/samples/textbox-paging/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 320, 480 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 320, 480 ) @@ -17,7 +17,7 @@ layer = MOAILayer2D.new () layer:setViewport ( viewport ) MOAISim.pushRenderPass ( layer ) -charcodes = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .,:;!?()&/-' +--charcodes = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .,:;!?()&/-<>' text1 = "a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" text2 = "1 2 3 4 5 6 7 8 9 0 a i e o u sa shi se su so ma mi me mu mo ta chi te tsu to ka ki ke ku ko ra ri re ru ro" @@ -29,6 +29,7 @@ textbox:setFont ( font ) textbox:setTextSize ( 16, 163 ) textbox:setRect ( -150, 100, 150, 230 ) textbox:setYFlip ( true ) +textbox:setSpeed ( 12 ) layer:insertProp ( textbox ) function page ( text ) @@ -45,7 +46,7 @@ function page ( text ) -- if there's more to spool, show the next page if textbox:more () then - + -- this shows the next page and restarts the spool action textbox:nextPage () textbox:spool () diff --git a/samples/textbox-update-style/main.lua b/samples/textbox-update-style/main.lua index 481d30a9e7..1aa0297b4b 100644 --- a/samples/textbox-update-style/main.lua +++ b/samples/textbox-update-style/main.lua @@ -6,8 +6,8 @@ MOAISim.openWindow ( "test", 512, 512 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 1, 1, 1, 1 ) -MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LAYOUT, 1, 0, 0, 1, 1 ) MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 0, 0, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 512, 512 ) diff --git a/samples/textbox/main.lua b/samples/textbox/main.lua new file mode 100644 index 0000000000..61b2df0271 --- /dev/null +++ b/samples/textbox/main.lua @@ -0,0 +1,66 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +MOAISim.openWindow ( "test", 320, 480 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX, 1, 0, 1, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LIMITS, 2, 1, 1, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_BASELINES, 1, 1, 0, 0, 1 ) +--MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_GLYPHS, 1, 0.5, 0, 0, 1 ) +--MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_GLYPH_BOUNDS, 2, 1, 1, 0, 1 ) +--MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_GLYPH_BOUNDS, 1, 1, 0, 1, 1 ) +MOAIDebugLines.setStyle ( MOAIDebugLines.TEXT_BOX_LINES_LAYOUT_BOUNDS, 1, 1, 0, 0, 1 ) + +function newStyle ( font, size, r, g, b, a ) + local style = MOAITextStyle.new () + style:setFont ( font ) + style:setSize ( size ) + style:setColor ( r or 1, g or 1, b or 1, a or 1 ) + return style; +end + +viewport = MOAIViewport.new () +viewport:setSize ( 320, 480 ) +viewport:setScale ( 320, -480 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +MOAISim.pushRenderPass ( layer ) + +--text = 'ABC\nDEF' + +--text = 'abcdefghijklmnop' +text = 'abcdefg hijklmnop qrstuv wxyz 0123456789 aaaaaa bbbbbb cccccc dddddd eeeeee' +--text = 'g\n\n\nqyjp' + +font = MOAIFont.new () +font:loadFromTTF ( '../resources/fonts/arial-rounded.TTF' ) + +label = MOAITextLabel.new () + +label:setStyle ( 'foo', newStyle ( font, 24 )) +label:setStyle ( 'bar', newStyle ( font, 32 )) +label:setStyle ( 'baz', newStyle ( font, 42 )) + +label:setString ( text ) +label:setFont ( font ) +label:setTextSize ( 32 ) +label:setLineSpacing ( 0 ) +--label:setYFlip ( true ) +--label:setRect ( -128, -128, 128, 128 ) +label:setRect ( -64, -128, 64, 128 ) +label:setRectLimits ( true, true ) +label:setAlignment ( MOAITextBox.CENTER_JUSTIFY, MOAITextBox.TOP_JUSTIFY ) +label:setOverrunRules ( MOAITextBox.OVERRUN_SPLIT_WORD, MOAITextBox.OVERRUN_MOVE_WORD ) +layer:insertProp ( label ) + +gfxQuad = MOAIGfxQuad2D.new () +gfxQuad:setTexture ( '../resources/tiny-x.png' ) +gfxQuad:setRect ( -4, -4, 4, 4 ) +gfxQuad:setUVRect ( 0, 0, 1, 1 ) + +local prop = MOAIProp2D.new () +prop:setDeck ( gfxQuad ) +layer:insertProp ( prop ) diff --git a/samples/texture-default/main.lua b/samples/texture-default/main.lua index 029e0278b5..cd089361ac 100644 --- a/samples/texture-default/main.lua +++ b/samples/texture-default/main.lua @@ -5,7 +5,7 @@ ---------------------------------------------------------------- MOAISim.openWindow ( 'test', 320, 480 ) -MOAIGfxDevice.setDefaultTexture ( 'numbers.png' ) +MOAIGfxMgr.setDefaultTexture ( 'numbers.png' ) viewport = MOAIViewport.new () viewport:setSize ( 320, 480 ) diff --git a/samples/texture-load-async/main.lua b/samples/texture-load-async/main.lua index 890a4c5d65..79dc50ffd8 100644 --- a/samples/texture-load-async/main.lua +++ b/samples/texture-load-async/main.lua @@ -6,7 +6,7 @@ MOAISim.openWindow ( 'test', 320, 480 ) -ioThread = MOAITaskThread.new () +ioThread = MOAITaskQueue.new () viewport = MOAIViewport.new () viewport:setSize ( 320, 480 ) @@ -29,4 +29,3 @@ layer:insertProp ( prop ) data = MOAIDataBuffer.new () data:loadAsync ( 'moai.png', ioThread, function () texture:load ( data ) data:clear () end ) - diff --git a/samples/texture-pvr/main.lua b/samples/texture-pvr/main.lua index 549fbd6582..7c1d62d839 100644 --- a/samples/texture-pvr/main.lua +++ b/samples/texture-pvr/main.lua @@ -64,7 +64,7 @@ prop1:setLoc ( 0, -128 ) layer:insertProp ( prop1 ) prop2 = MOAIProp2D.new () -prop2:setDeck ( texQuadFromFile ) +prop2:setDeck ( texQuadFromImage ) prop2:setLoc ( 0, 128 ) layer:insertProp ( prop2 ) diff --git a/samples/util-fourier/main.lua b/samples/util-fourier/main.lua new file mode 100644 index 0000000000..89d2d8411c --- /dev/null +++ b/samples/util-fourier/main.lua @@ -0,0 +1,117 @@ +---------------------------------------------------------------- +-- Copyright (c) 2010-2011 Zipline Games, Inc. +-- All Rights Reserved. +-- http://getmoai.com +---------------------------------------------------------------- + +-- great demo on an excellent site +-- http://madebyevan.com/dft/ +-- also fun +-- http://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/ +-- http://toxicdump.org/stuff/FourierToy.swf + +signal = MOAIMemStream.new () +transform = MOAIMemStream.new () +reconstruction = MOAIMemStream.new () + +for i = 1, 128 do + --local s = ( i >= 56 and i <= 72 ) and 1 or 0 + --signal:writeFloat ( s ) + + signal:writeFloat ( math.cos ((( i - 1 ) * math.pi * 2 ) / 128 )) +end + +fourier = MOAIFourier.new () +fourier:init ( 128 ) +fourier:setOutputType ( MOAIFourier.OUTPUT_COMPLEX ) + +signal:seek ( 0 ) +fourier:transform ( + signal, + MOAIFourier.SAMPLE_FLOAT, + false, + transform, + MOAIFourier.SAMPLE_FLOAT +) + +transformMax = 0 +transform:seek ( 0 ) +for i = 1, 128 do + local s = math.abs ( transform:readFloat ()) + transformMax = transformMax < s and s or transformMax +end + +fourier:init ( 128, true ) +fourier:setOutputType ( MOAIFourier.OUTPUT_REAL ) + +transform:seek ( 0 ) +fourier:transform ( + transform, + MOAIFourier.SAMPLE_FLOAT, + true, + reconstruction, + MOAIFourier.SAMPLE_FLOAT +) + +MOAISim.openWindow ( "test", 768, 512 ) + +viewport = MOAIViewport.new () +viewport:setSize ( 768, 512 ) +viewport:setScale ( 768, 512 ) + +layer = MOAILayer2D.new () +layer:setViewport ( viewport ) +layer:setClearColor ( 1, 1, 1, 1 ) +MOAISim.pushRenderPass ( layer ) + +drawSignal = function ( stream, yOff, yScale ) + + yScale = yScale or 1 + + MOAIGfxMgr.setPenColor ( 0, 0, 1, 1 ) + + stream:seek ( 0 ) + for i = 1, 128 do + + local s = stream:readFloat () + + local x = ( i - 64 ) * 4 + local y = ( s * yScale * 32 ) + yOff + + MOAIDraw.drawLine ( x, yOff, x, y ) + MOAIDraw.fillCircle ( x, y, 2 ) + end +end + +drawTransform = function ( stream, yOff ) + + stream:seek ( 0 ) + for i = 1, 128 do + + local offset = i < 64 and 64 or -64 + + local xR = (( i - 64 ) + offset ) * 4 + local xI = xR + 1 + + local yR = (( stream:readFloat () / transformMax ) * 64 ) + yOff + local yI = (( stream:readFloat () / transformMax ) * 64 ) + yOff + + MOAIGfxMgr.setPenColor ( 0, 1, 0, 1 ) + MOAIDraw.drawLine ( xI, yOff, xI, yI ) + MOAIDraw.fillCircle ( xI, yI, 2 ) + + MOAIGfxMgr.setPenColor ( 0, 0, 1, 1 ) + MOAIDraw.drawLine ( xR, yOff, xR, yR ) + MOAIDraw.fillCircle ( xR, yR, 2 ) + end +end + + +onDraw = function () + + drawSignal ( signal, 128 ) + drawTransform ( transform, 0 ) + drawSignal ( reconstruction, -128, 1 / 128 ) +end + +layer:setOverlayTable ({ onDraw }) diff --git a/samples/vector-circle/main.lua b/samples/vector-circle/main.lua index 4967f48a4c..f2d53b9057 100644 --- a/samples/vector-circle/main.lua +++ b/samples/vector-circle/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-region-boolean/main.lua b/samples/vector-region-boolean/main.lua index 25d0d59491..c412ab9071 100644 --- a/samples/vector-region-boolean/main.lua +++ b/samples/vector-region-boolean/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-region-colors/main.lua b/samples/vector-region-colors/main.lua index ad85901608..c4daa92753 100644 --- a/samples/vector-region-colors/main.lua +++ b/samples/vector-region-colors/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-region-debug/main.lua b/samples/vector-region-debug/main.lua index c3f4dbb746..a2882539ea 100644 --- a/samples/vector-region-debug/main.lua +++ b/samples/vector-region-debug/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-region-distance/main.lua b/samples/vector-region-distance/main.lua index 6252d8d339..d9913c23f5 100644 --- a/samples/vector-region-distance/main.lua +++ b/samples/vector-region-distance/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) @@ -52,26 +52,26 @@ function onDraw ( index, xOff, yOff, xFlip, yFlip ) region:drawDebug () - MOAIGfxDevice.setPenWidth ( 1 ) + MOAIGfxMgr.setPenWidth ( 1 ) if cursorX and regionX then - MOAIGfxDevice.setPenColor ( 0, 0, 1, 1 ) + MOAIGfxMgr.setPenColor ( 0, 0, 1, 1 ) MOAIDraw.drawLine ( cursorX, cursorY, regionX, regionY ) end if cursorX then if inside then - MOAIGfxDevice.setPenColor ( 0, 0, 1, 1 ) + MOAIGfxMgr.setPenColor ( 0, 0, 1, 1 ) MOAIDraw.fillCircle ( cursorX, cursorY, radius ) else - MOAIGfxDevice.setPenColor ( 0, 1, 0, 1 ) + MOAIGfxMgr.setPenColor ( 0, 1, 0, 1 ) MOAIDraw.fillCircle ( cursorX, cursorY, radius ) end end if regionX then - MOAIGfxDevice.setPenColor ( 1, 0, 0, 1 ) + MOAIGfxMgr.setPenColor ( 1, 0, 0, 1 ) MOAIDraw.fillCircle ( regionX, regionY, 3 ) end end diff --git a/samples/vector-region-edge/main.lua b/samples/vector-region-edge/main.lua index 5ff051acd7..e5bd1167f2 100644 --- a/samples/vector-region-edge/main.lua +++ b/samples/vector-region-edge/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-region-stroke/main.lua b/samples/vector-region-stroke/main.lua index a795327cb4..7b9e9f82f6 100644 --- a/samples/vector-region-stroke/main.lua +++ b/samples/vector-region-stroke/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-region/main.lua b/samples/vector-region/main.lua index 249bac3553..2d9efd2ffe 100644 --- a/samples/vector-region/main.lua +++ b/samples/vector-region/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-selection-mesh/main.lua b/samples/vector-selection-mesh/main.lua index ca0cb1f678..7009c6a435 100644 --- a/samples/vector-selection-mesh/main.lua +++ b/samples/vector-selection-mesh/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-shapes-3d/main.lua b/samples/vector-shapes-3d/main.lua index 8aff28ce60..8147cdbc81 100644 --- a/samples/vector-shapes-3d/main.lua +++ b/samples/vector-shapes-3d/main.lua @@ -6,7 +6,7 @@ MOAISim.openWindow ( "test", 640, 480 ) -gFrameBuffer = MOAIGfxDevice.getFrameBuffer () +gFrameBuffer = MOAIGfxMgr.getFrameBuffer () gFrameBuffer:setClearDepth ( true ) gFrameBuffer:setClearColor ( 1, 1, 1, 1 ) @@ -22,15 +22,15 @@ gCameraPivot = MOAITransform.new () gCameraSpin = MOAITransform.new () gCamera = MOAICamera.new () -gCamera:setLoc ( 0, 0, gCamera:getFocalLength ( 640 )) +gCamera:setLoc ( 0, 100, gCamera:getFocalLength ( 320 )) +gCamera:lookAt ( 0, 0, 0 ) gWorldLayer:setCamera ( gCamera ) gCameraPivot:setAttrLink ( MOAIProp2D.INHERIT_TRANSFORM, gCameraSpin, MOAIProp2D.TRANSFORM_TRAIT ) gCamera:setAttrLink ( MOAIProp2D.INHERIT_TRANSFORM, gCameraPivot, MOAIProp2D.TRANSFORM_TRAIT ) gCameraPivot:setRot ( 80, 0, 0 ) ---gCameraSpin:setRot ( 0, 0, -160 ) -gCameraSpin:moveRot ( 0, 0, -360, 5 ) +gCameraSpin:moveRot ( 0, 0, 360, 5 ) tess = MOAIVectorTesselator.new () @@ -42,72 +42,21 @@ tess:setFillColor ( 0.6, 0.75, 1.0, 1.0 ) tess:setLightVec ( -1, -1 ) tess:setLightColor ( 1, 1, 1, 1 ) -tess:setLightCurve ( MOAIEaseType.LINEAR ) -- SHARP_EASE_OUT +tess:setLightCurve ( MOAIEaseType.LINEAR ) tess:setShadowColor ( 0, 0, 0, 0.5 ) tess:setShadowCurve ( MOAIEaseType.LINEAR ) -tess:setExtrude ( 100 ) ---tess:pushRect ( -50, -50, 50, 50 ) -tess:pushEllipse ( 0, 0, 100 ) -tess:setExtrude ( 0 ) +tess:setExtrude ( 20 ) -tess:setStrokeStyle ( MOAIVectorTesselator.STROKE_EXTERIOR ) -tess:setStrokeColor ( 0.45, 0.5, 1, 1 ) -tess:setStrokeWidth ( 50 ) -tess:setJoinStyle ( MOAIVectorTesselator.JOIN_ROUND ) -tess:setCapStyle ( MOAIVectorTesselator.CAP_POINTY ) -tess:setMiterLimit ( 10 ) - ---tess:pushRect ( -50, -50, 50, 50 ) - ---tess:pushEllipse ( 0, 0, 100 ) - ---tess:pushPath ( -50, -50, 50, 50 ) ---tess:pushPath ( 50, -50, 50, 50, -50, 50, -50, -50 ) ---tess:pushPath ( 50, -50, -50, -50, -50, 50, 50, 50 ) ---tess:pushPolygon ( 50, -50, -50, -50, -50, 50, 50, 50 ) ---tess:pushPolygon ( 50, -50, 0, 50, -50, -50 ) - ---[[ tess:pushCombo () - tess:pushPolygon ( -50, -150, -150, -150, -150, -50, -50, -50 ) - tess:pushPolygon ( 50, -50, -50, -50, -50, 50, 50, 50 ) - tess:pushPolygon ( 150, 50, 50, 50, 50, 150, 150, 150 ) -tess:finish () -]]-- - ---[[ -tess:pushCombo () - tess:pushPolygon ( 50, -50, -50, -50, -50, 50, 50, 50 ) - tess:pushPolygon ( -50, 100, 50, 100, 0, 0 ) - tess:pushPolygon ( 50, -100, -50, -100, 0, 0 ) - tess:pushPolygon ( 0, 0, 100, -50, 100, 50 ) - tess:pushPolygon ( 0, 0, -100, 50, -100, -50 ) - tess:pushPolygon ( 25, -25, -25, -25, -25, 25, 25, 25 ) -tess:finish () -]]-- - ---[[ -tess:pushPolygon () - tess:pushVertex ( 175, 175 ) - tess:pushVertex ( 175, -175 ) - tess:pushVertex ( -175, -175 ) - tess:pushVertex ( -175, 175 ) - tess:pushVertex ( 75, 175 ) - tess:pushVertex ( 75, -75 ) - tess:pushVertex ( -75, -75 ) - tess:pushVertex ( -75, 75 ) - tess:pushVertex ( -25, 75 ) - tess:pushVertex ( -25, -25 ) - tess:pushVertex ( 25, -25 ) - tess:pushVertex ( 25, 125 ) - tess:pushVertex ( -125, 125 ) - tess:pushVertex ( -125, -125 ) - tess:pushVertex ( 125, -125 ) - tess:pushVertex ( 125, 175 ) + tess:pushPoly ( 50, -50, -50, -50, -50, 50, 50, 50 ) + tess:pushPoly ( -50, 100, 50, 100, 0, 0 ) + tess:pushPoly ( 50, -100, -50, -100, 0, 0 ) + tess:pushPoly ( 0, 0, 100, -50, 100, 50 ) + tess:pushPoly ( 0, 0, -100, 50, -100, -50 ) + tess:pushPoly ( 25, -25, -25, -25, -25, 25, 25, 25 ) tess:finish () -]]-- local vtxStream = MOAIMemStream.new () local idxStream = MOAIMemStream.new () diff --git a/samples/vector-shapes-extras/main.lua b/samples/vector-shapes-extras/main.lua index 7b85adf815..92a50ca286 100644 --- a/samples/vector-shapes-extras/main.lua +++ b/samples/vector-shapes-extras/main.lua @@ -55,7 +55,7 @@ color1:moveColor ( 0, 1, 0, 1, 2 ) shader:setAttrLink ( 4, color1, MOAIColor.COLOR_TRAIT ) MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-shapes/main.lua b/samples/vector-shapes/main.lua index 11c92e9c63..55ef8efc50 100644 --- a/samples/vector-shapes/main.lua +++ b/samples/vector-shapes/main.lua @@ -5,7 +5,7 @@ --============================================================== MOAISim.openWindow ( "test", 640, 480 ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( 640, 480 ) diff --git a/samples/vector-svg/main.lua b/samples/vector-svg/main.lua index 8a4413fa5b..b28e091862 100644 --- a/samples/vector-svg/main.lua +++ b/samples/vector-svg/main.lua @@ -37,7 +37,7 @@ local width = bounds.xMax - bounds.xMin local height = bounds.yMax - bounds.yMin MOAISim.openWindow ( "test", width, height ) -MOAIGfxDevice.setClearColor ( 1, 1, 1, 1 ) +MOAIGfxMgr.setClearColor ( 1, 1, 1, 1 ) viewport = MOAIViewport.new () viewport:setSize ( width, height ) diff --git a/samples/viewport-multi/main.lua b/samples/viewport-multi/main.lua index d60f1db0d5..28a0cec1e7 100644 --- a/samples/viewport-multi/main.lua +++ b/samples/viewport-multi/main.lua @@ -33,7 +33,7 @@ local function makeProp ( x, y, xs, ys, r ) return prop end -MOAIGfxDevice.getFrameBuffer ():setClearColor () -- no need to clear the surface +MOAIGfxMgr.getFrameBuffer ():setClearColor () -- no need to clear the surface local layers = {} diff --git a/src/config-default/moai_config.h b/src/config-default/moai_config.h index 58051172fe..f28b6e3446 100644 --- a/src/config-default/moai_config.h +++ b/src/config-default/moai_config.h @@ -103,20 +103,5 @@ #ifndef MOAI_WITH_VORBIS #define MOAI_WITH_VORBIS 1 #endif - - //----------------------------------------------------------------// - // graphics subsystem - - #ifndef MOAI_GFX_DUMMY - #define MOAI_GFX_DUMMY 0 - #endif - - #ifndef MOAI_GFX_FLASCC - #define MOAI_GFX_FLASCC 0 - #endif - - #ifndef MOAI_GFX_OPENGL - #define MOAI_GFX_OPENGL 1 - #endif #endif diff --git a/src/host-ios/MOAICommandThread.h b/src/host-ios/MOAICommandThread.h new file mode 100644 index 0000000000..8b5f57a06e --- /dev/null +++ b/src/host-ios/MOAICommandThread.h @@ -0,0 +1,24 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import +#import + +//================================================================// +// MOAICommandThread +//================================================================// +@interface MOAICommandThread : NSObject { +@protected +} + + @property ( atomic ) BOOL isBusy; + + //----------------------------------------------------------------// + -( void ) command :( void (^)( void ))command :( BOOL )waitDone; // calling thread will *block* until prev command is finished (if any). may optionally block until new command is finished. + -( void ) start; + -( void ) stop; + +@end diff --git a/src/host-ios/MOAICommandThread.mm b/src/host-ios/MOAICommandThread.mm new file mode 100644 index 0000000000..9b31ae802e --- /dev/null +++ b/src/host-ios/MOAICommandThread.mm @@ -0,0 +1,129 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import "MOAICommandThread.h" + +#import +#import +#import + +#import +#import +#import + +//================================================================// +// MOAICommandThread () +//================================================================// +@interface MOAICommandThread () { + + NSThread* mThread; + + NSCondition* mCommandCondition; + + void ( ^mCommand )( void ); + + BOOL mIsRunning; + BOOL mIsBusy; +} + + //----------------------------------------------------------------// + -( void ) main :( id* )argument; + +@end + +//================================================================// +// MOAICommandThread +//================================================================// +@implementation MOAICommandThread + + @synthesize isBusy = mIsBusy; + + //----------------------------------------------------------------// + -( void ) command :( void (^)( void ))command :( BOOL )waitDone { + + if ( !command ) return; + + [ mCommandCondition lock ]; + + if ( !mIsRunning ) { + + mThread = [[ NSThread alloc ] initWithTarget:self selector:@selector ( main: ) object:nil ]; + + [ mThread start ]; + + while ( !mIsRunning ) { + [ mCommandCondition wait ]; // unlock the command condition and wait for the signal + } + } + + mCommand = command; + [ mCommandCondition signal ]; + + if ( waitDone ) { + while ( mCommand ) { + [ mCommandCondition wait ]; // unlock the command condition and wait for the signal + } + } + + [ mCommandCondition unlock ]; + } + + //----------------------------------------------------------------// + -( id ) init { + + if ( self = [ super init ]) { + + mCommandCondition = [[ NSCondition alloc ] init ]; + } + return self; + } + + //----------------------------------------------------------------// + -( void ) main :( id* )argument { + + [ mCommandCondition lock ]; + + mIsRunning = YES; + [ mCommandCondition signal ]; + + while ( mIsRunning ) { + + while ( !mCommand ) { + [ mCommandCondition wait ]; // unlock the command condition and wait for the signal + } + + [ self setIsBusy:YES ]; + + mCommand (); + mCommand = 0; + + [ self setIsBusy:NO ]; + [ mCommandCondition signal ]; + } + + [ mCommandCondition unlock ]; + } + + //----------------------------------------------------------------// + -( void ) start { + + void ( ^command )( void ) = ^{ + }; + + [ self command:command :YES ]; + } + + //----------------------------------------------------------------// + -( void ) stop { + + void ( ^command )( void ) = ^{ + mIsRunning = nil; + }; + + [ self command:command :YES ]; + } + +@end diff --git a/src/host-ios/MOAIContextMgr.h b/src/host-ios/MOAIContextMgr.h new file mode 100644 index 0000000000..02276bfb47 --- /dev/null +++ b/src/host-ios/MOAIContextMgr.h @@ -0,0 +1,21 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import +#import + +//================================================================// +// MOAIContextMgr +//================================================================// +@interface MOAIContextMgr : NSObject { +@protected +} + + //----------------------------------------------------------------// + +( void ) displayListBeginPhase :( int )list; + +( void ) displayListEndPhase :( int )list; + +@end diff --git a/src/host-ios/MOAIContextMgr.mm b/src/host-ios/MOAIContextMgr.mm new file mode 100644 index 0000000000..3dbb12d49e --- /dev/null +++ b/src/host-ios/MOAIContextMgr.mm @@ -0,0 +1,61 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import "MOAIContextMgr.h" + +#import +#import +#import + +#import +#import +#import + +//================================================================// +// MOAIContextMgr () +//================================================================// +@interface MOAIContextMgr () { +} + + //----------------------------------------------------------------// + +( void ) affirmLock; + +@end + +//================================================================// +// MOAIContextMgr +//================================================================// +@implementation MOAIContextMgr + + static NSLock* sDisplayListLock; + + //----------------------------------------------------------------// + +( void ) affirmLock { + + if ( !sDisplayListLock ) { + sDisplayListLock = [[ NSLock alloc ] init ]; + } + } + + //----------------------------------------------------------------// + +( void ) displayListBeginPhase :( int )list { + + [ MOAIContextMgr affirmLock ]; + + [ sDisplayListLock lock ]; + AKUDisplayListBeginPhase ( list ); + [ sDisplayListLock unlock ]; + } + + //----------------------------------------------------------------// + +( void ) displayListEndPhase :( int )list { + + [ sDisplayListLock lock ]; + AKUDisplayListEndPhase ( list ); + [ sDisplayListLock unlock ]; + } + +@end diff --git a/src/host-ios/MOAIRenderer.h b/src/host-ios/MOAIRenderer.h new file mode 100644 index 0000000000..37203da60e --- /dev/null +++ b/src/host-ios/MOAIRenderer.h @@ -0,0 +1,37 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import +#import + +#import "MOAICommandThread.h" + +//================================================================// +// MOAIRendererProtocol +//================================================================// +@protocol MOAIRendererProtocol < NSObject > + + //----------------------------------------------------------------// + -( void ) presentFrame; + -( void ) render; + -( void ) resize :( CAEAGLLayer* )layer; + -( void ) shutdown; + +@end + +//================================================================// +// MOAIRenderer +//================================================================// +@interface MOAIRenderer : NSObject < MOAIRendererProtocol > { +@private +} + + @property ( readonly, atomic ) EAGLContext* eaglContext; + + //----------------------------------------------------------------// + -( id ) initWithLayer :( CAEAGLLayer* )layer :( int )multisample; + +@end diff --git a/src/host-ios/MOAIRenderer.mm b/src/host-ios/MOAIRenderer.mm new file mode 100644 index 0000000000..01ebadfd9e --- /dev/null +++ b/src/host-ios/MOAIRenderer.mm @@ -0,0 +1,327 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import "MOAIContextMgr.h" +#import "MOAIRenderer.h" + +#import +#import +#import + +#import +#import +#import + +//================================================================// +// MOAIRenderer () +//================================================================// +@interface MOAIRenderer () { + + GLint mWidth; + GLint mHeight; + + EAGLContext* mEAGLContext; + + GLuint mFramebuffer; + GLuint mRenderbuffer; + + GLuint mMSAAFramebuffer; + GLuint mMSAARenderBuffer; + + // this gets bound to either mFramebuffer or mMSAAFramebuffer, depending on whether multisampling is enabled + GLuint mDepthBuffer; + + BOOL mGCDetected; + BOOL mSimStarted; + int mMultisample; + + BOOL mFrameIsReady; +} + + @property ( readonly, nonatomic ) int multisample; + @property ( readonly, nonatomic ) BOOL multisampleEnabled; + + //----------------------------------------------------------------// + -( void ) bindFramebuffer; + -( void ) closeGraphicsContext; + -( void ) createContext :( CAEAGLLayer* )layer; + -( bool ) createBuffers :( CAEAGLLayer* )layer :( int )multisample; + -( void ) deleteBuffers; + -( void ) openGraphicsContext; + -( BOOL ) sizeChanged :( CAEAGLLayer* )layer; + +@end + +//================================================================// +// MOAIRenderer +//================================================================// +@implementation MOAIRenderer + + @synthesize eaglContext = mEAGLContext; + + //----------------------------------------------------------------// + -( void ) bindFramebuffer { + + if ([ self multisampleEnabled ]) { + // draw into multisample buffer + glBindFramebufferOES ( GL_FRAMEBUFFER_OES, mMSAAFramebuffer ); + } + else { + glBindFramebufferOES ( GL_FRAMEBUFFER_OES, mFramebuffer ); + } + } + + //----------------------------------------------------------------// + -( void ) closeGraphicsContext { + + if ([ EAGLContext currentContext ] == mEAGLContext ) { + [ EAGLContext setCurrentContext:nil ]; + } + } + + //----------------------------------------------------------------// + -( BOOL ) createBuffers :( CAEAGLLayer* )layer :( int )multisample { + + mMultisample = multisample; + + mWidth = 0; + mHeight = 0; + + glBindFramebufferOES ( GL_FRAMEBUFFER_OES, nil ); + + // set us up the frame buffers + glGenFramebuffersOES ( 1, &mFramebuffer ); + glBindFramebufferOES ( GL_FRAMEBUFFER_OES, mFramebuffer ); + + glGenRenderbuffersOES ( 1, &mRenderbuffer ); + glBindRenderbufferOES ( GL_RENDERBUFFER_OES, mRenderbuffer ); + [ mEAGLContext renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:( CAEAGLLayer* )layer ]; + + glGetRenderbufferParameterivOES ( GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &mWidth ); + glGetRenderbufferParameterivOES ( GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &mHeight ); + + glFramebufferRenderbufferOES ( GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, mRenderbuffer ); + + // check OK + if ( glCheckFramebufferStatusOES ( GL_FRAMEBUFFER_OES ) != GL_FRAMEBUFFER_COMPLETE_OES ) { + NSLog ( @"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES ( GL_FRAMEBUFFER_OES )); + return NO; + } + + // set us up the msaa buffers + if ([ self multisampleEnabled ]) { + + glGenFramebuffersOES ( 1 , &mMSAAFramebuffer ); + glBindFramebufferOES ( GL_FRAMEBUFFER_OES, mMSAAFramebuffer ); + + glGenRenderbuffersOES ( 1, &mMSAARenderBuffer ); + glBindRenderbufferOES ( GL_RENDERBUFFER_OES, mMSAARenderBuffer ); + + glRenderbufferStorageMultisampleAPPLE ( GL_RENDERBUFFER_OES, self.multisample, GL_RGBA4_OES, mWidth, mHeight ); + glFramebufferRenderbufferOES ( GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, mMSAARenderBuffer ); + } + + glGenRenderbuffersOES ( 1, &mDepthBuffer ); + glBindRenderbufferOES ( GL_RENDERBUFFER_OES, mDepthBuffer ); + + // set us up the depth buffer + if ([ self multisampleEnabled ]) { + glRenderbufferStorageMultisampleAPPLE ( GL_RENDERBUFFER_OES, self.multisample, GL_DEPTH_COMPONENT16_OES, mWidth, mHeight ); + } + else { + glRenderbufferStorageOES ( GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, mWidth, mHeight ); + } + + glFramebufferRenderbufferOES ( GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, mDepthBuffer ); + + // check OK + if ( glCheckFramebufferStatusOES ( GL_FRAMEBUFFER_OES ) != GL_FRAMEBUFFER_COMPLETE_OES ) { + NSLog ( @"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES ( GL_FRAMEBUFFER_OES )); + return NO; + } + + CGRect screenRect = [[ UIScreen mainScreen ] bounds ]; + CGFloat scale = [[ UIScreen mainScreen ] scale ]; + CGFloat screenWidth = screenRect.size.width * scale; + CGFloat screenHeight = screenRect.size.height * scale; + + [ self bindFramebuffer ]; + + AKUSetScreenSize ( screenWidth, screenHeight ); + AKUSetViewSize ( mWidth, mHeight ); + AKUDetectFramebuffer (); + + return YES; + } + + //----------------------------------------------------------------// + -( void ) createContext :( CAEAGLLayer* )layer { + + layer.opaque = YES; + layer.drawableProperties = @{ + kEAGLDrawablePropertyRetainedBacking:[NSNumber numberWithBool:NO], + kEAGLDrawablePropertyColorFormat:kEAGLColorFormatRGBA8, // kEAGLColorFormatRGB565 or kEAGLColorFormatRGBA8 + }; + + if ([[ UIScreen mainScreen ] respondsToSelector: @selector ( scale )]) { + CGFloat appContentScaleFactor = [[ UIScreen mainScreen ] scale ]; + if ([ layer respondsToSelector: @selector ( setContentsScale: )]) { + layer.contentsScale = appContentScaleFactor; + } + } + + mEAGLContext = [[ EAGLContext alloc ] initWithAPI:kEAGLRenderingAPIOpenGLES2 ]; + assert ( mEAGLContext ); + + [ self openGraphicsContext ]; + AKUDetectGfxContext (); + } + + //----------------------------------------------------------------// + - ( void ) deleteBuffers { + + if ( mFramebuffer ) { + glDeleteFramebuffersOES ( 1, &mFramebuffer ); + mFramebuffer = 0; + } + + if ( mRenderbuffer ) { + glDeleteRenderbuffersOES ( 1, &mRenderbuffer ); + mRenderbuffer = 0; + } + + if ( mMSAAFramebuffer ) { + glDeleteFramebuffersOES ( 1, &mMSAAFramebuffer ); + mMSAAFramebuffer = 0; + } + + if ( mMSAARenderBuffer ) { + glDeleteRenderbuffersOES ( 1, &mMSAARenderBuffer ); + mMSAARenderBuffer = 0; + } + + if ( mDepthBuffer ) { + glDeleteRenderbuffersOES ( 1, &mDepthBuffer ); + mDepthBuffer = 0; + } + } + + //----------------------------------------------------------------// + -( id ) initWithLayer :( CAEAGLLayer* )layer :( int )multisample { + + self = [ super init ]; + if ( self != nil ) { + [ self createContext :layer ]; + [ self createBuffers :layer :multisample ]; + } + return self; + } + + //----------------------------------------------------------------// + -( int ) multisample { + return mMultisample; + } + + //----------------------------------------------------------------// + -( BOOL ) multisampleEnabled { + return mMultisample > 1; + } + + //----------------------------------------------------------------// + -( void ) openGraphicsContext { + + if ([ EAGLContext currentContext ] != mEAGLContext ) { + [ EAGLContext setCurrentContext:mEAGLContext ]; + } + } + + //----------------------------------------------------------------// + -( void ) presentFrame { + + [ self openGraphicsContext ]; + + if ( mFrameIsReady ) { + glBindRenderbufferOES ( GL_RENDERBUFFER_OES, mRenderbuffer ); + [ mEAGLContext presentRenderbuffer:GL_RENDERBUFFER_OES ]; + mFrameIsReady = NO; + } + + [ self closeGraphicsContext ]; + } + + //----------------------------------------------------------------// + -( void ) render { + + if ( mFrameIsReady ) return; + if ( !AKUDisplayListHasContent ( AKU_DISPLAY_LIST_DRAWING )) return; + + [ self openGraphicsContext ]; + [ self bindFramebuffer ]; + + [ MOAIContextMgr displayListBeginPhase:AKU_DISPLAY_LIST_DRAWING_PHASE ]; + + if ( AKUDisplayListIsEnabled ( AKU_DISPLAY_LIST_DRAWING )) { + AKUDisplayListProcess ( AKU_DISPLAY_LIST_DRAWING ); + } + else { + AKURender (); + } + + [ MOAIContextMgr displayListEndPhase:AKU_DISPLAY_LIST_DRAWING_PHASE ]; + + if ([ self multisampleEnabled ]) { + // resolve multisample buffer + glBindFramebufferOES ( GL_READ_FRAMEBUFFER_APPLE, mMSAAFramebuffer ); + glBindFramebufferOES ( GL_DRAW_FRAMEBUFFER_APPLE, mFramebuffer ); + glResolveMultisampleFramebufferAPPLE (); + + GLenum attachments [] = { GL_COLOR_ATTACHMENT0_OES, GL_DEPTH_ATTACHMENT_OES }; + glDiscardFramebufferEXT ( GL_READ_FRAMEBUFFER_APPLE, 1, attachments ); + } + + //[ NSThread sleepForTimeInterval:( 1.0f / 15.0f )]; + + mFrameIsReady = YES; + + [ self closeGraphicsContext ]; + } + + //----------------------------------------------------------------// + -( void ) resize :( CAEAGLLayer* )layer { + + if (( mEAGLContext != nil ) && ([ self sizeChanged :layer ])) { + [ self openGraphicsContext ]; + [ self deleteBuffers ]; + [ self createBuffers :layer :mMultisample ]; + [ self closeGraphicsContext ]; + } + } + + //----------------------------------------------------------------// + -( BOOL ) sizeChanged :( CAEAGLLayer* )layer { + + float scale = 1; + + if ([[ UIScreen mainScreen ] respondsToSelector:@selector ( scale )]) { + scale = [[ UIScreen mainScreen ] scale]; + } + + CGSize size = layer.bounds.size; + return (( mWidth != ( GLint )( size.width * scale )) || ( mHeight != ( GLint )( size.height * scale ))); + } + + //----------------------------------------------------------------// + -( void ) shutdown { + + if ( mEAGLContext != nil ) { + [ self openGraphicsContext ]; + [ self deleteBuffers ]; + [ self closeGraphicsContext ]; + } + mEAGLContext = nil; + } + +@end diff --git a/src/host-ios/MOAIRendererAsync.h b/src/host-ios/MOAIRendererAsync.h new file mode 100644 index 0000000000..b6540788ff --- /dev/null +++ b/src/host-ios/MOAIRendererAsync.h @@ -0,0 +1,22 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import +#import + +#import "MOAIRenderer.h" + +//================================================================// +// MOAIRendererAsync +//================================================================// +@interface MOAIRendererAsync : NSObject < MOAIRendererProtocol > { +@private +} + + //----------------------------------------------------------------// + -( id ) initWithLayer :( CAEAGLLayer* )layer :( int )multisample :( BOOL )useLoadingThread; + +@end diff --git a/src/host-ios/MOAIRendererAsync.mm b/src/host-ios/MOAIRendererAsync.mm new file mode 100644 index 0000000000..1310bbe224 --- /dev/null +++ b/src/host-ios/MOAIRendererAsync.mm @@ -0,0 +1,147 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import "MOAICommandThread.h" +#import "MOAIContextMgr.h" +#import "MOAIRendererAsync.h" + +#import +#import +#import + +#import +#import +#import + +//================================================================// +// MOAIRendererAsync () +//================================================================// +@interface MOAIRendererAsync () { + + MOAICommandThread* mLoadingThread; + MOAICommandThread* mDrawingThread; + + MOAIRenderer* mRenderer; + + EAGLContext* mLoadingContext; +} + + @property ( readonly, nonatomic ) int multisample; + @property ( readonly, nonatomic ) BOOL multisampleEnabled; + + //----------------------------------------------------------------// + -( void ) load; + +@end + +//================================================================// +// MOAIRendererAsync +//================================================================// +@implementation MOAIRendererAsync + + //----------------------------------------------------------------// + -( id ) initWithLayer :( CAEAGLLayer* )layer :( int )multisample :( BOOL )useLoadingThread { + + self = [ super init]; + if ( self != nil ) { + + mDrawingThread = [[ MOAICommandThread alloc ] init ]; + + void ( ^command )( void ) = ^{ + + AKUDisplayListEnable ( AKU_DISPLAY_LIST_DRAWING ); + mRenderer = [[ MOAIRenderer alloc ] initWithLayer :layer :multisample ]; + + if ( useLoadingThread ) { + + AKUDisplayListEnable ( AKU_DISPLAY_LIST_LOADING ); + mLoadingContext = [[ EAGLContext alloc ] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup:[[ mRenderer eaglContext ] sharegroup ]]; + + mLoadingThread = [[ MOAICommandThread alloc ] init ]; + [ mLoadingThread start ]; + } + }; + + [ mDrawingThread command:command :YES ]; + } + return self; + } + + //----------------------------------------------------------------// + -( void ) load { + + if ( !mLoadingThread ) return; + if ([ mLoadingThread isBusy ]) return; + if ( !AKUDisplayListHasContent ( AKU_DISPLAY_LIST_LOADING )) return; + + void ( ^command )( void ) = ^{ + + [ EAGLContext setCurrentContext:mLoadingContext ]; + + [ MOAIContextMgr displayListBeginPhase:AKU_DISPLAY_LIST_LOADING_PHASE ]; + AKUDisplayListProcess ( AKU_DISPLAY_LIST_LOADING ); + [ MOAIContextMgr displayListEndPhase:AKU_DISPLAY_LIST_LOADING_PHASE ]; + + [ EAGLContext setCurrentContext:nil ]; + }; + + [ mLoadingThread command:command :NO ]; + } + + //----------------------------------------------------------------// + -( void ) presentFrame { + + if ([ mDrawingThread isBusy ]) return; + + void ( ^command )( void ) = ^{ + [ mRenderer presentFrame ]; + }; + + [ mDrawingThread command:command :YES ]; + } + + //----------------------------------------------------------------// + -( void ) render { + + [ MOAIContextMgr displayListBeginPhase :AKU_DISPLAY_LIST_LOGIC_PHASE ]; + AKURender (); + [ MOAIContextMgr displayListEndPhase :AKU_DISPLAY_LIST_LOGIC_PHASE ]; + + [ self load ]; + + if ([ mDrawingThread isBusy ]) return; + if ( !AKUDisplayListHasContent ( AKU_DISPLAY_LIST_DRAWING )) return; + + void ( ^command )( void ) = ^{ + [ mRenderer render ]; + }; + + [ mDrawingThread command:command :NO ]; + } + + //----------------------------------------------------------------// + -( void ) resize :( CAEAGLLayer* )layer { + + void ( ^command )( void ) = ^{ + [ mRenderer resize :layer ]; + }; + + [ mDrawingThread command:command :YES ]; + } + + //----------------------------------------------------------------// + -( void ) shutdown { + + void ( ^command )( void ) = ^{ + + [ mRenderer shutdown ]; + }; + + [ mDrawingThread command:command :YES ]; + [ mDrawingThread stop ]; + } + +@end diff --git a/src/host-ios/MOAIView.h b/src/host-ios/MOAIView.h index 4212436c20..ea1a529d72 100644 --- a/src/host-ios/MOAIView.h +++ b/src/host-ios/MOAIView.h @@ -13,8 +13,6 @@ @interface MOAIView : UIView { @private } - @property ( readonly, nonatomic ) int multisample; - @property ( readonly, nonatomic ) BOOL multisampleEnabled; //----------------------------------------------------------------// -( void ) application :( UIApplication* )application didFailToRegisterForRemoteNotificationsWithError:( NSError* )error; diff --git a/src/host-ios/MOAIView.mm b/src/host-ios/MOAIView.mm index 70ca9143a5..bbcc0fb209 100644 --- a/src/host-ios/MOAIView.mm +++ b/src/host-ios/MOAIView.mm @@ -4,7 +4,10 @@ // http://getmoai.com //----------------------------------------------------------------// +#import "MOAIContextMgr.h" #import "MOAIView.h" +#import "MOAIRenderer.h" +#import "MOAIRendererAsync.h" #import #import @@ -14,6 +17,8 @@ #import #import +//#define AKU_HOST_FULL_ASYNC + enum { MOAI_INPUT_DEVICE, TOTAL_INPUT_DEVICES, @@ -33,40 +38,16 @@ @interface MOAIView () { NSTimeInterval mAnimInterval; CADisplayLink* mDisplayLink; - GLint mWidth; - GLint mHeight; - - EAGLContext* mEAGLContext; - - GLuint mFramebuffer; - GLuint mRenderbuffer; - GLuint mDepthbuffer; - - GLuint mMSAAFramebuffer; - GLuint mMSAARenderBuffer; - - GLuint mDepthBuffer; - BOOL mGCDetected; BOOL mSimStarted; - int mMultisample; + + id < MOAIRendererProtocol > mRenderer; } //----------------------------------------------------------------// - -( void ) beginDrawing; - -( void ) closeGraphicsContext; - -( bool ) createBuffers; - -( void ) createContext; - -( void ) deleteBuffers; - -( void ) drawView; -( void ) dummyFunc; - -( void ) endDrawing; -( void ) handleTouches :( NSSet* )touches :( BOOL )down; - -( void ) openGraphicsContext; -( void ) onUpdateAnim; - -( void ) releaseContext; - -( void ) renewContext; - -( BOOL ) sizeChanged; -( void ) startAnimation; -( void ) stopAnimation; @end @@ -76,9 +57,6 @@ -( void ) stopAnimation; //================================================================// @implementation MOAIView - @dynamic multisample; - @dynamic multisampleEnabled; - //----------------------------------------------------------------// +( void ) appInitialize { @@ -140,176 +118,11 @@ -( BOOL ) application:( UIApplication* )application openURL:( NSURL* )url source return YES; } - //----------------------------------------------------------------// - -( void ) beginDrawing { - - [self openGraphicsContext]; - [self bindFramebuffer]; - } - - //----------------------------------------------------------------// - - (void) bindFramebuffer { - - if ([ self multisampleEnabled ]) { - // draw into multisample buffer - glBindFramebufferOES ( GL_FRAMEBUFFER_OES, mMSAAFramebuffer ); - } - else { - glBindFramebufferOES ( GL_FRAMEBUFFER_OES, mFramebuffer ); - } - } - - //----------------------------------------------------------------// - -( void ) closeGraphicsContext { - - if ([ EAGLContext currentContext ] == mEAGLContext ) { - [ EAGLContext setCurrentContext:nil ]; - } - } - - //----------------------------------------------------------------// - -( bool ) createBuffers { - - mWidth = 0; - mHeight = 0; - - // set us up the frame buffers - glGenFramebuffersOES(1, &mFramebuffer); - glBindFramebufferOES(GL_FRAMEBUFFER_OES, mFramebuffer); - - glGenRenderbuffersOES(1, &mRenderbuffer); - glBindRenderbufferOES(GL_RENDERBUFFER_OES, mRenderbuffer); - - [ mEAGLContext renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer ]; - glGetRenderbufferParameterivOES ( GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &mWidth ); - glGetRenderbufferParameterivOES ( GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &mHeight ); - - glFramebufferRenderbufferOES ( GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, mRenderbuffer ); - - // check OK - if (glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) { - NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES)); - return false; - } - - // set us up the msaa buffers - if ([self multisampleEnabled]) { - glGenFramebuffersOES ( 1 , &mMSAAFramebuffer ); - glBindFramebufferOES ( GL_FRAMEBUFFER_OES, mMSAAFramebuffer ); - - glGenRenderbuffersOES ( 1, &mMSAARenderBuffer ); - glBindRenderbufferOES ( GL_RENDERBUFFER_OES, mMSAARenderBuffer ); - - glRenderbufferStorageMultisampleAPPLE ( GL_RENDERBUFFER_OES, self.multisample, GL_RGBA4_OES, mWidth, mHeight ); - glFramebufferRenderbufferOES ( GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, mMSAARenderBuffer); - } - - glGenRenderbuffersOES ( 1, &mDepthBuffer ); - glBindRenderbufferOES ( GL_RENDERBUFFER_OES, mDepthBuffer ); - - // set us up the depth buffer - if ([self multisampleEnabled]) { - glRenderbufferStorageMultisampleAPPLE ( GL_RENDERBUFFER_OES, self.multisample, GL_DEPTH_COMPONENT16_OES, mWidth, mHeight ); - } - else { - glRenderbufferStorageOES ( GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, mWidth, mHeight ); - } - - glFramebufferRenderbufferOES ( GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, mDepthBuffer ); - - // check OK - if ( glCheckFramebufferStatusOES ( GL_FRAMEBUFFER_OES ) != GL_FRAMEBUFFER_COMPLETE_OES ) { - NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES ( GL_FRAMEBUFFER_OES )); - return false; - } - - CGRect screenRect = [[ UIScreen mainScreen ] bounds ]; - CGFloat scale = [[ UIScreen mainScreen ] scale ]; - CGFloat screenWidth = screenRect.size.width * scale; - CGFloat screenHeight = screenRect.size.height * scale; - - [ self bindFramebuffer ]; - - AKUSetScreenSize ( screenWidth, screenHeight ); - AKUSetViewSize ( mWidth, mHeight ); - AKUDetectFramebuffer (); - - return true; - } - - //----------------------------------------------------------------// - -( void ) createContext { - - // Get the layer - CAEAGLLayer* glLayer = ( CAEAGLLayer* )self.layer; - - glLayer.opaque = YES; - glLayer.drawableProperties = @{ - kEAGLDrawablePropertyRetainedBacking:[NSNumber numberWithBool:NO], - kEAGLDrawablePropertyColorFormat:kEAGLColorFormatRGBA8, // kEAGLColorFormatRGB565 or kEAGLColorFormatRGBA8 - }; - - if ([[ UIScreen mainScreen ] respondsToSelector: @selector ( scale )]) { - CGFloat appContentScaleFactor = [[ UIScreen mainScreen ] scale ]; - if ([ glLayer respondsToSelector: @selector ( setContentsScale: )]) { - glLayer.contentsScale = appContentScaleFactor; - } - } - - mEAGLContext = [[ EAGLContext alloc ] initWithAPI:kEAGLRenderingAPIOpenGLES2 ]; - assert ( mEAGLContext ); - - [ self openGraphicsContext ]; - AKUDetectGfxContext (); - } - //----------------------------------------------------------------// -( void ) dealloc { AKUDeleteContext ( mAKUContext ); - [ self releaseContext ]; - } - - //----------------------------------------------------------------// - - ( void ) deleteBuffers { - - if ( mFramebuffer ) { - glDeleteFramebuffersOES ( 1, &mFramebuffer ); - mFramebuffer = 0; - } - - if ( mRenderbuffer ) { - glDeleteRenderbuffersOES ( 1, &mRenderbuffer ); - mRenderbuffer = 0; - } - - if ( mMSAAFramebuffer ) { - glDeleteFramebuffersOES ( 1, &mMSAAFramebuffer ); - mMSAAFramebuffer = 0; - } - - if (mMSAARenderBuffer ) { - glDeleteRenderbuffersOES ( 1, &mMSAARenderBuffer ); - mMSAARenderBuffer = 0; - } - - if ( mDepthBuffer ) { - glDeleteRenderbuffersOES ( 1, &mDepthBuffer ); - mDepthBuffer = 0; - } - } - - //----------------------------------------------------------------// - -( void ) drawView { - - self.opaque = AKUIsGfxBufferOpaque () != 0; - - [ self beginDrawing ]; - - AKUSetContext ( mAKUContext ); - AKURender (); - - [ self endDrawing ]; + [ mRenderer shutdown ]; } //----------------------------------------------------------------// @@ -317,26 +130,6 @@ -( void ) dummyFunc { //dummy to fix weird input bug } - //----------------------------------------------------------------// - -( void ) endDrawing { - - if ([ self multisampleEnabled ]) { - // resolve multisample buffer - glBindFramebufferOES ( GL_READ_FRAMEBUFFER_APPLE, mMSAAFramebuffer ); - glBindFramebufferOES ( GL_DRAW_FRAMEBUFFER_APPLE, mFramebuffer ); - glResolveMultisampleFramebufferAPPLE (); - - GLenum attachments [] = { GL_COLOR_ATTACHMENT0_OES, GL_DEPTH_ATTACHMENT_OES }; - glDiscardFramebufferEXT ( GL_READ_FRAMEBUFFER_APPLE, 1, attachments ); - } - - // finish & present - glBindRenderbufferOES ( GL_RENDERBUFFER_OES, mRenderbuffer ); - [ mEAGLContext presentRenderbuffer:GL_RENDERBUFFER_OES ]; - - [ self closeGraphicsContext ]; // do not remove this - } - //----------------------------------------------------------------// // Since iOS 8.0 both [[UIScreen mainScreen] bounds/applicationFrame] are interface oriented. // Before iOS 8.0, only the portrait "bounds" where returned. @@ -388,11 +181,10 @@ -( void ) handleTouches :( NSSet* )touches :( BOOL )down { } //----------------------------------------------------------------// - -( id ) initWithCoder:(NSCoder*)aDecoder - { + -( id ) initWithCoder:( NSCoder* )aDecoder { + // make sure to do self init here - if ( self = [ self init ]) { - mMultisample = 1; + if ( self = [ super initWithCoder:aDecoder ]) { } return self; } @@ -415,11 +207,7 @@ -( void ) layoutSubviews { // It is necessary to call super here [ super layoutSubviews ]; - if (( mEAGLContext != nil ) && ([ self sizeChanged ])) { - [ self openGraphicsContext ]; - [ self deleteBuffers ]; - [ self createBuffers ]; - } + [ mRenderer resize:( CAEAGLLayer* )self.layer ]; } //----------------------------------------------------------------// @@ -432,8 +220,6 @@ -( void ) moaiInitWithMultisample :( int )multisample { NSAssert ((( multisample == 1 ) || ( multisample == 4 )), @"Invalid multisample" ); - mMultisample = multisample; - mAKUContext = AKUCreateContext (); AKUSetUserdata (( __bridge void* )self ); @@ -452,11 +238,23 @@ -( void ) moaiInitWithMultisample :( int )multisample { CGFloat screenWidth = screenRect.size.width * scale; CGFloat screenHeight = screenRect.size.height * scale; - AKUSetScreenDpi([ self guessScreenDpi ]); - - [ self createContext ]; - [ self openGraphicsContext ]; - [ self createBuffers ]; + AKUSetScreenDpi ([ self guessScreenDpi ]); + + #if defined ( AKU_HOST_GFX_ASYNC ) || defined ( AKU_HOST_FULL_ASYNC ) + + BOOL useLoadingThread = NO; + + #ifdef AKU_HOST_FULL_ASYNC + useLoadingThread = YES; + #endif + + mRenderer = [[ MOAIRendererAsync alloc ] initWithLayer :( CAEAGLLayer* )self.layer :multisample :useLoadingThread ]; + + #else + + mRenderer = [[ MOAIRenderer alloc ] initWithLayer :( CAEAGLLayer* )self.layer :multisample ]; + + #endif AKUModulesRunLuaAPIWrapper (); @@ -465,39 +263,18 @@ -( void ) moaiInitWithMultisample :( int )multisample { mAnimInterval = 1; // 1 for 60fps, 2 for 30fps [ self pause:false ]; - [ self closeGraphicsContext ]; - } - - //----------------------------------------------------------------// - -( int ) multisample { - return mMultisample; - } - - //----------------------------------------------------------------// - -( BOOL ) multisampleEnabled { - return mMultisample > 1; - } - - //----------------------------------------------------------------// - -( void ) openGraphicsContext { - - if ([ EAGLContext currentContext ] != mEAGLContext ) { - [ EAGLContext setCurrentContext:mEAGLContext ]; - } } //----------------------------------------------------------------// -( void ) onUpdateAnim { - - AKUSetContext ( mAKUContext ); - AKUModulesUpdate (); - self.opaque = AKUIsGfxBufferOpaque () != 0; - - [ self beginDrawing ]; - AKUSetContext ( mAKUContext ); - AKURender (); - [ self endDrawing ]; + [ mRenderer presentFrame ]; + + AKUSetContext ( mAKUContext ); + AKUModulesUpdate (); + self.opaque = AKUIsGfxBufferOpaque () != 0; + + [ mRenderer render ]; //sometimes the input handler will get 'locked out' by the render, this will allow it to run [ self performSelector:@selector( dummyFunc ) withObject:self afterDelay: 0 ]; @@ -516,29 +293,6 @@ -( void ) pause :( BOOL )paused { } } - //----------------------------------------------------------------// - -( void ) releaseContext { - - [ self closeGraphicsContext ]; - - if ( mEAGLContext != nil ) { - [ self openGraphicsContext ]; - [ self deleteBuffers ]; - [ self closeGraphicsContext ]; - } - mEAGLContext = nil; - } - - //----------------------------------------------------------------// - -( void ) renewContext { - - if ( !mEAGLContext ) { - [ self createContext ]; - [ self openGraphicsContext ]; - [ self createBuffers ]; - } - } - //----------------------------------------------------------------// -( void ) run :( NSString* )filename { @@ -554,19 +308,6 @@ -( void ) setWorkingDirectory :( NSString* )path { AKUSetWorkingDirectory ([ path UTF8String ]); } - //----------------------------------------------------------------// - -( BOOL ) sizeChanged { - - float scale = 1; - - if ([[ UIScreen mainScreen ] respondsToSelector:@selector ( scale )]) { - scale = [[ UIScreen mainScreen ] scale]; - } - - CGSize size = self.layer.bounds.size; - return (( mWidth != ( GLint )( size.width * scale )) || ( mHeight != ( GLint )( size.height * scale ))); - } - //----------------------------------------------------------------// -( void ) startAnimation { diff --git a/src/host-modules/aku_modules.cpp b/src/host-modules/aku_modules.cpp index d5f9f2c37e..2d43c93ff7 100644 --- a/src/host-modules/aku_modules.cpp +++ b/src/host-modules/aku_modules.cpp @@ -6,6 +6,12 @@ #include #include +#include +#include + +#include +#include + //================================================================// // objc modules //================================================================// @@ -67,10 +73,6 @@ void AKUModulesAppFinalize () { AKUFmodExAppFinalize (); #endif - #if AKU_WITH_HARNESS - AKUHarnessAppFinalize (); - #endif - #if AKU_WITH_HTTP_CLIENT AKUHttpClientAppFinalize (); #endif @@ -109,7 +111,7 @@ void AKUModulesAppFinalize () { } //----------------------------------------------------------------// -void AKUModulesAppInitialize () { +int AKUModulesAppInitialize () { #if AKU_WITH_ANDROID AKUModulesAndroidAppInitialize (); @@ -139,10 +141,6 @@ void AKUModulesAppInitialize () { AKUFmodExAppInitialize (); #endif - #if AKU_WITH_HARNESS - AKUHarnessAppInitialize (); - #endif - #if AKU_WITH_HTTP_CLIENT AKUHttpClientAppInitialize (); #endif @@ -178,10 +176,14 @@ void AKUModulesAppInitialize () { #if AKU_WITH_PLUGINS AKUPluginsAppInitialize (); #endif + + return AKU_OK; } //----------------------------------------------------------------// -void AKUModulesContextInitialize () { +int AKUModulesContextInitialize () { + + ZLResultCodeAccumulator result; #if AKU_WITH_ANDROID AKUModulesAndroidContextInitialize (); @@ -211,6 +213,10 @@ void AKUModulesContextInitialize () { AKUFmodExContextInitialize (); #endif + #if AKU_WITH_HARFBUZZ + AKUHarfBuzzContextInitialize (); + #endif + #if AKU_WITH_HARNESS AKUHarnessContextInitialize (); #endif @@ -269,11 +275,23 @@ void AKUModulesContextInitialize () { AKUImageWebPContextInitialize (); #endif - AKULoadFuncFromBuffer ( moai_lua, moai_lua_SIZE, AKU_DATA_STRING, AKU_DATA_ZIPPED ); - AKUCallFunc (); + result.Reset (); + result = AKULoadFuncFromBuffer ( moai_lua, moai_lua_SIZE, "moai.lua", AKU_DATA_ZIPPED ); + result = AKUCallFunc (); + + if ( result != AKU_OK ) { + ZLLog_ErrorF ( ZLLog::CONSOLE, "ERROR: Failed to load Moai's embedded Lua wrapper. Some functions may be unavailable.\n" ); + } + + result.Reset (); + result = AKULoadFuncFromBuffer ( moai_test_mgr_lua, moai_test_mgr_lua_SIZE, "moai_test_mgr.lua", AKU_DATA_ZIPPED ); + result = AKUCallFunc (); - AKULoadFuncFromBuffer ( moai_test_mgr_lua, moai_test_mgr_lua_SIZE, AKU_DATA_STRING, AKU_DATA_ZIPPED ); - AKUCallFunc (); + if ( result != AKU_OK ) { + ZLLog_ErrorF ( ZLLog::CONSOLE, "ERROR: Failed to load Moai's embedded test manager. Some functions may be unavailable.\n" ); + } + + return result; } //----------------------------------------------------------------// @@ -319,10 +337,6 @@ void AKUModulesUpdate () { AKUFmodExUpdate (); #endif - #if AKU_WITH_HARNESS - AKUHarnessUpdate () - #endif - #if AKU_WITH_SIM AKUUpdate (); #endif diff --git a/src/host-modules/aku_modules.h b/src/host-modules/aku_modules.h index 2d1830578c..129b994628 100644 --- a/src/host-modules/aku_modules.h +++ b/src/host-modules/aku_modules.h @@ -39,6 +39,10 @@ #include #endif +#if AKU_WITH_HARFBUZZ + #include +#endif + #if AKU_WITH_HARNESS #include #endif @@ -89,8 +93,8 @@ //----------------------------------------------------------------// void AKUModulesAppFinalize (); -void AKUModulesAppInitialize (); -void AKUModulesContextInitialize (); +int AKUModulesAppInitialize (); +int AKUModulesContextInitialize (); void AKUModulesPause ( bool pause ); void AKUModulesUpdate (); diff --git a/src/host-modules/aku_modules_android.cpp b/src/host-modules/aku_modules_android.cpp index 8dc0378349..aae51baa4e 100644 --- a/src/host-modules/aku_modules_android.cpp +++ b/src/host-modules/aku_modules_android.cpp @@ -27,6 +27,10 @@ void AKUModulesAndroidAppFinalize () { AKUAndroidCrittercismAppFinalize (); #endif + #if AKU_WITH_ANDROID_DELTADNA + AKUAndroidDeltaDNAAppFinalize (); + #endif + #if AKU_WITH_ANDROID_FACEBOOK AKUAndroidFacebookAppFinalize (); #endif @@ -71,6 +75,10 @@ void AKUModulesAndroidAppInitialize () { AKUAndroidCrittercismAppInitialize (); #endif + #if AKU_WITH_ANDROID_DELTADNA + AKUAndroidDeltaDNAAppInitialize (); + #endif + #if AKU_WITH_ANDROID_FACEBOOK AKUAndroidFacebookAppInitialize (); #endif @@ -115,6 +123,10 @@ void AKUModulesAndroidContextInitialize () { AKUAndroidCrittercismContextInitialize (); #endif + #if AKU_WITH_ANDROID_DELTADNA + AKUAndroidDeltaDNAContextInitialize (); + #endif + #if AKU_WITH_ANDROID_FACEBOOK AKUAndroidFacebookContextInitialize (); #endif diff --git a/src/host-modules/aku_modules_android.h b/src/host-modules/aku_modules_android.h index fa344c4069..0adeb9ec78 100644 --- a/src/host-modules/aku_modules_android.h +++ b/src/host-modules/aku_modules_android.h @@ -27,6 +27,10 @@ #include #endif +#if AKU_WITH_ANDROID_DELTADNA + #include +#endif + #if AKU_WITH_ANDROID_FACEBOOK #include #endif diff --git a/src/host-modules/aku_modules_android_config.h b/src/host-modules/aku_modules_android_config.h index 43ac7a34af..77fe232a72 100644 --- a/src/host-modules/aku_modules_android_config.h +++ b/src/host-modules/aku_modules_android_config.h @@ -21,8 +21,12 @@ #define AKU_WITH_ANDROID_CRITTERCISM 0 #endif + #ifndef AKU_WITH_ANDROID_DELTADNA + #define AKU_WITH_ANDROID_DELTADNA 1 + #endif + #ifndef AKU_WITH_ANDROID_FACEBOOK - #define AKU_WITH_ANDROID_FACEBOOK 0 + #define AKU_WITH_ANDROID_FACEBOOK 1 #endif #ifndef AKU_WITH_ANDROID_FLURRY @@ -34,7 +38,7 @@ #endif #ifndef AKU_WITH_ANDROID_GOOGLE_BILLING - #define AKU_WITH_ANDROID_GOOGLE_BILLING 0 + #define AKU_WITH_ANDROID_GOOGLE_BILLING 1 #endif #ifndef AKU_WITH_ANDROID_GOOGLE_PUSH @@ -42,7 +46,7 @@ #endif #ifndef AKU_WITH_ANDROID_GOOGLE_PLAY_SERVICES - #define AKU_WITH_ANDROID_GOOGLE_PLAY_SERVICES 0 + #define AKU_WITH_ANDROID_GOOGLE_PLAY_SERVICES 1 #endif #ifndef AKU_WITH_ANDROID_TAPJOY diff --git a/src/host-modules/aku_modules_config.h b/src/host-modules/aku_modules_config.h index e3197380e3..600f98dad8 100644 --- a/src/host-modules/aku_modules_config.h +++ b/src/host-modules/aku_modules_config.h @@ -21,6 +21,10 @@ #define AKU_WITH_FMOD_EX 0 #endif + #ifndef AKU_WITH_HARFBUZZ + #define AKU_WITH_HARFBUZZ 0 + #endif + #ifndef AKU_WITH_HARNESS #define AKU_WITH_HARNESS 0 #endif @@ -33,6 +37,10 @@ #define AKU_WITH_HTTP_SERVER 0 #endif + #ifndef AKU_WITH_IFA // technically not a module; just configuration + #define AKU_WITH_IFA 1 + #endif + #ifndef AKU_WITH_IMAGE_JPG #define AKU_WITH_IMAGE_JPG 1 #endif diff --git a/src/host-modules/aku_modules_ios_config.h b/src/host-modules/aku_modules_ios_config.h index 16d96dba6b..ae63c5f8b6 100644 --- a/src/host-modules/aku_modules_ios_config.h +++ b/src/host-modules/aku_modules_ios_config.h @@ -65,4 +65,5 @@ #define AKU_WITH_IOS_VUNGLE 0 #endif -#endif \ No newline at end of file + +#endif diff --git a/src/host-modules/aku_modules_util.cpp b/src/host-modules/aku_modules_util.cpp index cc3f8e6456..196bb9198f 100644 --- a/src/host-modules/aku_modules_util.cpp +++ b/src/host-modules/aku_modules_util.cpp @@ -51,7 +51,7 @@ int _parseArgStringAndCall ( char* exeName, char* scriptName, int argc, char** a void AKUModulesParseArgs ( int argc, char** argv ) { if ( argc < 2 ) { - AKULoadFuncFromFile ( "main.lua" ); + if ( AKULoadFuncFromFile ( "main.lua" ) != AKU_OK ) return; AKUCallFunc (); } else { @@ -63,13 +63,13 @@ void AKUModulesParseArgs ( int argc, char** argv ) { if (( strcmp ( arg, "-s" ) == 0 )) { char* script = argv [ ++i ]; - AKULoadFuncFromString ( script ); + AKULoadFuncFromString ( script, strlen ( script ), 0 ); i = _parseArgStringAndCall ( argv [ 0 ], 0, argc, argv, i ); } else if (( strcmp ( arg, "-f" ) == 0 )) { char* filename = argv [ ++i ]; - AKULoadFuncFromFile ( filename ); + if ( AKULoadFuncFromFile ( filename ) != AKU_OK ) return; i = _parseArgStringAndCall ( argv [ 0 ], filename, argc, argv, i ); } else { @@ -77,7 +77,7 @@ void AKUModulesParseArgs ( int argc, char** argv ) { int argc2 = argc - 2; char** argv2 = argc2 > 0 ? &argv [ i + 1 ] : 0; - AKULoadFuncFromFile ( arg ); + if ( AKULoadFuncFromFile ( arg ) != AKU_OK ) return; AKUCallFuncWithArgArray ( argv [ 0 ], argv [ i ], argc2, argv2, AKU_AS_ARGS ); break; } diff --git a/src/host-modules/aku_plugins.h b/src/host-modules/aku_plugins.h index 9efc63e787..26f47e69b3 100644 --- a/src/host-modules/aku_plugins.h +++ b/src/host-modules/aku_plugins.h @@ -11,4 +11,5 @@ void AKUPluginsContextInitialize (); void AKUPluginsPause ( bool pause ); void AKUPluginsUpdate (); + #endif diff --git a/src/host-sdl/SDLHost-osx.mm b/src/host-sdl/SDLHost-osx.mm new file mode 100644 index 0000000000..e8d6925029 --- /dev/null +++ b/src/host-sdl/SDLHost-osx.mm @@ -0,0 +1,18 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#import + +#include "SDLHost.h" + +//----------------------------------------------------------------// +void GetDeviceToPixelScale ( float& w, float& h ) { + + CGFloat scale = [[ NSScreen mainScreen ] backingScaleFactor ]; + + w = ( float )scale; + h = ( float )scale; +} diff --git a/src/host-sdl/SDLHost.cpp b/src/host-sdl/SDLHost.cpp index 2e7ce02ef5..8378c9c3b1 100644 --- a/src/host-sdl/SDLHost.cpp +++ b/src/host-sdl/SDLHost.cpp @@ -6,11 +6,12 @@ #include #include +#include #include #ifdef MOAI_OS_WINDOWS #include -#elif defined(MOAI_OS_LINUX) +#elif defined ( MOAI_OS_LINUX ) #include //XOpenDisplay,etc #include #include @@ -24,10 +25,14 @@ #include "SDLKeyCodeMapping.h" #ifdef __APPLE__ -#include -#include + #include + #include #endif +//#include +//#include +#include + #define UNUSED(p) (( void )p) namespace InputDeviceID { @@ -51,12 +56,186 @@ namespace InputSensorID { }; } +// run with multithreaded host or not +//#define GFX_ASYNC 1 + +// counters for testing async timing issues (dropped frames) +static const int SIM_UPDATE_INTERVAL = 1; +static const int LOAD_UPDATE_INTERVAL = 1; +static const int RENDER_UPDATE_INTERVAL = 1; + +static float sDeviceScaleX = 1.0f; +static float sDeviceScaleY = 1.0f; + static SDL_Window* sWindow = 0; typedef int ( *DisplayModeFunc ) (int, SDL_DisplayMode *); static void SetScreenSize ( DisplayModeFunc func); +//================================================================// +// WorkerThreadInfo +//================================================================// +class WorkerThreadInfo { +public: + + enum { + LOADING_FLAG = 0x01, + RENDER_FLAG = 0x02, + }; + +private: + + static SDL_mutex* sDisplayListMutex; + //static SDL_GLContext sSharedContext; + + SDL_Thread* mThread; + SDL_cond* mCondition; + SDL_mutex* mConditionMutex; + bool mIsDone; + + SDL_GLContext mContext; + + int mMask; + + //----------------------------------------------------------------// + static int ThreadMain ( void* data ) { + + SDL_LockMutex ( sDisplayListMutex ); + + WorkerThreadInfo* info = ( WorkerThreadInfo* )data; + + SDL_GL_MakeCurrent ( sWindow, info->mContext ); + + if ( info->mMask & LOADING_FLAG ) { + AKUDisplayListEnable ( AKU_DISPLAY_LIST_LOADING ); + } + + if ( info->mMask & RENDER_FLAG ) { + AKUDetectGfxContext (); + AKUDisplayListEnable ( AKU_DISPLAY_LIST_DRAWING ); + } + + SDL_UnlockMutex ( sDisplayListMutex ); + + int loadUpdateCounter = 0; + int renderUpdateCounter = 0; + + while ( info->mIsDone == false ) { + + SDL_LockMutex ( info->mConditionMutex ); + SDL_CondWait ( info->mCondition, info->mConditionMutex ); + SDL_UnlockMutex ( info->mConditionMutex ); + + + if ( loadUpdateCounter >= ( LOAD_UPDATE_INTERVAL - 1 )) { + loadUpdateCounter = 0; + + if ( info->mMask & LOADING_FLAG ) { + + WorkerThreadInfo::DisplayListBeginPhase ( AKU_DISPLAY_LIST_LOADING_PHASE ); + AKUDisplayListProcess ( AKU_DISPLAY_LIST_LOADING ); + WorkerThreadInfo::DisplayListEndPhase ( AKU_DISPLAY_LIST_LOADING_PHASE ); + } + } + + if ( renderUpdateCounter >= ( RENDER_UPDATE_INTERVAL - 1 )) { + renderUpdateCounter = 0; + + if ( info->mMask & RENDER_FLAG ) { + + WorkerThreadInfo::DisplayListBeginPhase ( AKU_DISPLAY_LIST_DRAWING_PHASE ); + AKUDisplayListProcess ( AKU_DISPLAY_LIST_DRAWING ); + WorkerThreadInfo::DisplayListEndPhase ( AKU_DISPLAY_LIST_DRAWING_PHASE ); + + SDL_GL_SwapWindow ( sWindow ); + } + } + + loadUpdateCounter++; + renderUpdateCounter++; + } + + SDL_GL_DeleteContext ( info->mContext ); + + return 0; + } + +public: + + //----------------------------------------------------------------// + static void DisplayListBeginPhase ( int list ) { + + SDL_LockMutex ( sDisplayListMutex ); + AKUDisplayListBeginPhase ( list ); + SDL_UnlockMutex ( sDisplayListMutex ); + } + + //----------------------------------------------------------------// + static void DisplayListEndPhase ( int list ) { + + SDL_LockMutex ( sDisplayListMutex ); + AKUDisplayListEndPhase ( list ); + SDL_UnlockMutex ( sDisplayListMutex ); + } + + //----------------------------------------------------------------// + void Signal () { + + bool hasContent = false; + + if (( this->mMask & LOADING_FLAG ) && AKUDisplayListHasContent ( AKU_DISPLAY_LIST_LOADING )) { + hasContent = true; + } + + if (( this->mMask & RENDER_FLAG ) && AKUDisplayListHasContent ( AKU_DISPLAY_LIST_DRAWING )) { + hasContent = true; + } + + if ( hasContent ) { + SDL_LockMutex ( this->mConditionMutex ); + SDL_CondSignal ( this->mCondition ); + SDL_UnlockMutex ( this->mConditionMutex ); + } + } + + //----------------------------------------------------------------// + void Start ( int mask, const char* name ) { + + this->mContext = SDL_GL_CreateContext ( sWindow ); + SDL_GL_SetSwapInterval ( 1 ); + + this->mMask = mask; + this->mCondition = SDL_CreateCond (); + this->mConditionMutex = SDL_CreateMutex (); + this->mThread = SDL_CreateThread ( WorkerThreadInfo::ThreadMain, name, this ); + } + + //----------------------------------------------------------------// + void Stop () { + + SDL_LockMutex ( this->mConditionMutex ); + this->mIsDone = true; + SDL_CondSignal ( this->mCondition ); + SDL_UnlockMutex ( this->mConditionMutex ); + SDL_WaitThread ( this->mThread, 0 ); + } + + //----------------------------------------------------------------// + WorkerThreadInfo () : + mThread ( 0 ), + mCondition ( 0 ), + mConditionMutex ( 0 ), + mIsDone ( false ) { + + if ( !sDisplayListMutex ) { + sDisplayListMutex = SDL_CreateMutex (); + } + } +}; + +SDL_mutex* WorkerThreadInfo::sDisplayListMutex = 0; + //================================================================// // aku callbacks //================================================================// @@ -98,10 +277,19 @@ void _AKUExitFullscreenModeFunc () { void _AKUOpenWindowFunc ( const char* title, int width, int height ) { if ( !sWindow ) { - sWindow = SDL_CreateWindow ( title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN ); - SDL_GL_CreateContext ( sWindow ); - SDL_GL_SetSwapInterval ( 1 ); - AKUDetectGfxContext (); + + GetDeviceToPixelScale ( sDeviceScaleX, sDeviceScaleY ); + + SDL_GL_SetAttribute ( SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1 ); + sWindow = SDL_CreateWindow ( + title, + SDL_WINDOWPOS_CENTERED, + SDL_WINDOWPOS_CENTERED, + ( int )( width / sDeviceScaleX ), + ( int )( height / sDeviceScaleY ), + SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI + ); + AKUSetViewSize ( width, height ); AKUSdlSetWindow ( sWindow ); @@ -117,6 +305,7 @@ void _AKUOpenWindowFunc ( const char* title, int width, int height ) { //----------------------------------------------------------------// void _AKUSetTextInputRectFunc ( int xMin, int yMin, int xMax, int yMax ) { + SDL_Rect sdlRect; sdlRect.x = xMin; sdlRect.y = yMin; @@ -126,16 +315,30 @@ void _AKUSetTextInputRectFunc ( int xMin, int yMin, int xMax, int yMax ) { SDL_SetTextInputRect ( &sdlRect ); } +//================================================================// +// SDL callbacks +//================================================================// + +void _SDL_LogOutputFunction ( void *userdata, int category, SDL_LogPriority priority, const char *message ); + +//----------------------------------------------------------------// +void _SDL_LogOutputFunction ( void *userdata, int category, SDL_LogPriority priority, const char *message ) { + UNUSED ( userdata ); + UNUSED ( category ); + UNUSED ( priority ); + + printf ( "%s", message ); +} //================================================================// // helpers //================================================================// -static void Finalize (); -static void Init ( int argc, char** argv ); -static void MainLoop (); -static void PrintMoaiVersion (); -static void SetScreenDpi (); +static void Finalize (); +static void Init ( int argc, char** argv ); +static void MainLoop (); +static void PrintMoaiVersion (); +static void SetScreenDpi (); //----------------------------------------------------------------// void Finalize () { @@ -146,9 +349,23 @@ void Finalize () { SDL_Quit (); } +#ifndef __APPLE__ + +//----------------------------------------------------------------// +void GetDeviceToPixelScale ( float& w, float& h ) { + + w = 1.0f; + h = 1.0f; +} + +#endif + //----------------------------------------------------------------// void Init ( int argc, char** argv ) { + SDL_LogSetOutputFunction ( _SDL_LogOutputFunction, 0 ); + SDL_LogSetPriority ( SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE ); + SDL_Init ( SDL_INIT_EVERYTHING ); PrintMoaiVersion (); @@ -165,9 +382,9 @@ void Init ( int argc, char** argv ) { AKUSetInputConfigurationName ( "SDL" ); - SetScreenSize( SDL_GetDesktopDisplayMode ); + SetScreenSize ( SDL_GetDesktopDisplayMode ); - SetScreenDpi(); + SetScreenDpi (); AKUReserveInputDevices ( InputDeviceID::TOTAL ); AKUSetInputDevice ( InputDeviceID::DEVICE, "device" ); @@ -189,117 +406,77 @@ void Init ( int argc, char** argv ) { AKUSetFunc_OpenWindow ( _AKUOpenWindowFunc ); - AKUSetFunc_SetTextInputRect( _AKUSetTextInputRectFunc ); + AKUSetFunc_SetTextInputRect ( _AKUSetTextInputRectFunc ); #ifdef __APPLE__ - //are we a bundle? - CFBundleRef bref = CFBundleGetMainBundle(); - if (bref == NULL || CFBundleGetIdentifier(bref) == NULL) { - AKUModulesParseArgs ( argc, argv ); - } else { + //are we a bundle? + CFBundleRef bref = CFBundleGetMainBundle (); + if ( bref == NULL || CFBundleGetIdentifier ( bref ) == NULL ) { + AKUModulesParseArgs ( argc, argv ); + } + else { + + CFURLRef bundleurl = CFBundleCopyResourcesDirectoryURL ( bref ); + assert ( bundleurl != NULL ); - CFURLRef bundleurl = CFBundleCopyResourcesDirectoryURL(bref); - assert(bundleurl != NULL); - - UInt8 buf[PATH_MAX]; - CFURLGetFileSystemRepresentation(bundleurl, true, buf, PATH_MAX); + UInt8 buf [ PATH_MAX ]; + CFURLGetFileSystemRepresentation ( bundleurl, true, buf, PATH_MAX ); - AKUSetWorkingDirectory((const char *)buf); - AKULoadFuncFromFile("bootstrap.lua"); - AKUCallFunc(); - } + AKUSetWorkingDirectory(( const char * )buf ); + AKULoadFuncFromFile ( "bootstrap.lua" ); + AKUCallFunc (); + } #else - - + AKUModulesParseArgs ( argc, argv ); + #endif - atexit ( Finalize ); // do this *after* SDL_Init } -// based on host-glut -//void _onMultiButton( int touch_id, float x, float y, int state ); -//void _onMultiButton( int touch_id, float x, float y, int state ) { -// -// AKUEnqueueTouchEvent ( -// InputDeviceID::DEVICE, -// InputSensorID::TOUCH, -// touch_id, -// state == SDL_FINGERDOWN, -// ( float )x, -// ( float )y -// ); -//} - - - -//----------------------------------------------------------------// -void SetScreenSize(DisplayModeFunc func ) { - - SDL_DisplayMode dm; - - if ( func != NULL && func( 0, &dm ) == 0 ) { - AKUSetScreenSize(dm.w, dm.h); - } -} - - -//----------------------------------------------------------------// -void SetScreenDpi() { - -#ifdef MOAI_OS_WINDOWS - - HDC hDC = GetWindowDC(NULL); - int widthInMm = GetDeviceCaps(hDC, HORZSIZE); - double widthInInches = widthInMm / 25.4; - int widthInPixels = GetDeviceCaps(hDC, HORZRES); - AKUSetScreenDpi(( int )( widthInPixels / widthInInches )); - -#elif defined(MOAI_OS_LINUX) - - char* display_name = getenv( "DISPLAY" ); - if ( !display_name ) return; - - int nscreen = 0; - xcb_connection_t* conn = xcb_connect( display_name, &nscreen ); - if ( !conn ) return; - - xcb_screen_t* screen = xcb_aux_get_screen( conn, nscreen ); - - double widthInInches = screen->width_in_millimeters / 25.4; - int widthInPixels = screen->width_in_pixels; - - AKUSetScreenDpi(( int )widthInPixels / widthInInches ); - - xcb_disconnect( conn ); - -#endif - -} - //----------------------------------------------------------------// void MainLoop () { + + #if GFX_ASYNC + + WorkerThreadInfo loadingThread; + loadingThread.Start ( WorkerThreadInfo::LOADING_FLAG, "Loading Thread" ); + + WorkerThreadInfo renderThread; + renderThread.Start ( WorkerThreadInfo::RENDER_FLAG, "Render Thread" ); + + SDL_GL_MakeCurrent ( sWindow, NULL ); + + #else + + SDL_GLContext context = SDL_GL_CreateContext ( sWindow ); + SDL_GL_SetSwapInterval ( 1 ); + + AKUDetectGfxContext (); + + #endif // TODO: array's of Joysticks Joystick * joystick0 = NULL; - if ( SDL_NumJoysticks() < 1 ) { + if ( SDL_NumJoysticks () < 1 ) { std::cerr << "No Joysticks connected." << std::endl; - - } else { + } + else { - joystick0 = new Joystick(0); // 0 == first joystick of system. + joystick0 = new Joystick ( 0 ); // 0 == first joystick of system. - if ( joystick0->isOpen() || !joystick0->Open() ) - { + if ( joystick0->isOpen () || !joystick0->Open ()) { delete joystick0; joystick0 = NULL; } } - + + int simUpdateCounter = 0; + Uint32 lastFrame = SDL_GetTicks(); bool running = true; @@ -364,7 +541,7 @@ void MainLoop () { const int32_t y = sdlEvent.wheel.y; //XXX: x or y ? - AKUEnqueueWheelEvent ( InputDeviceID::DEVICE, InputSensorID::MOUSE_WHEEL, y ); + AKUEnqueueWheelEvent ( InputDeviceID::DEVICE, InputSensorID::MOUSE_WHEEL, ( float )y ); } break; @@ -384,13 +561,18 @@ void MainLoop () { if ( sdlEvent.jaxis.which == 0 /* what joystick? */ && joystick0 != NULL ) { const Joystick::AXIS_MOTION & axis = joystick0->HandleAxisMotion(sdlEvent); - AKUEnqueueJoystickEvent ( InputDeviceID::DEVICE, InputSensorID::JOYSTICK, axis.x, axis.y ); + AKUEnqueueJoystickEvent ( InputDeviceID::DEVICE, InputSensorID::JOYSTICK, ( float )axis.x, ( float )axis.y ); } break; case SDL_MOUSEMOTION: - AKUEnqueuePointerEvent ( InputDeviceID::DEVICE, InputSensorID::POINTER, sdlEvent.motion.x, sdlEvent.motion.y ); + AKUEnqueuePointerEvent ( + InputDeviceID::DEVICE, + InputSensorID::POINTER, + ( int )( sdlEvent.motion.x * sDeviceScaleX ), + ( int )( sdlEvent.motion.y * sDeviceScaleY ) + ); break; case SDL_WINDOWEVENT: @@ -400,37 +582,46 @@ void MainLoop () { sdlEvent.window.event == SDL_WINDOWEVENT_RESIZED ) { AKUSetViewSize(sdlEvent.window.data1, sdlEvent.window.data2); - } else if ( sdlEvent.window.event == SDL_WINDOWEVENT_FOCUS_LOST ) { + } + else if ( sdlEvent.window.event == SDL_WINDOWEVENT_FOCUS_LOST ) { // If the focus is lost, it must be stopped. SDL_StopTextInput(); // Clear Editing text. AKUEnqueueKeyboardEditEvent ( InputDeviceID::DEVICE, InputSensorID::KEYBOARD, "", 0, 0, SDL_TEXTEDITINGEVENT_TEXT_SIZE ); - } else if ( sdlEvent.window.event == SDL_WINDOWEVENT_FOCUS_GAINED ) { + } + else if ( sdlEvent.window.event == SDL_WINDOWEVENT_FOCUS_GAINED ) { // Start when the focus is given. // TODO:Restored the edit text. SDL_StartTextInput(); } break; - -// case SDL_FINGERDOWN: -// case SDL_FINGERUP: -// case SDL_FINGERMOTION: -// const int id = ( int )sdlEvent.tfinger.fingerId; -// const float x = sdlEvent.tfinger.x; -// const float y = sdlEvent.tfinger.y; -// const int state = ( sdlEvent.type == SDL_FINGERDOWN || sdlEvent.type == SDL_FINGERMOTION ) ? SDL_FINGERDOWN : SDL_FINGERUP; -// -// _onMultiButton(id, x, y, state); -// -// break; - } //end_switch - }//end_while + } + } AKUModulesUpdate (); - AKURender (); - SDL_GL_SwapWindow ( sWindow ); + if ( simUpdateCounter >= ( SIM_UPDATE_INTERVAL - 1 )) { + simUpdateCounter = 0; + + #if GFX_ASYNC + + WorkerThreadInfo::DisplayListBeginPhase ( AKU_DISPLAY_LIST_LOGIC_PHASE ); + AKURender (); + WorkerThreadInfo::DisplayListEndPhase ( AKU_DISPLAY_LIST_LOGIC_PHASE ); + + loadingThread.Signal (); + renderThread.Signal (); + + #else + + AKURender (); + SDL_GL_SwapWindow ( sWindow ); + + #endif + + simUpdateCounter++; + } Uint32 frameDelta = ( Uint32 )( AKUGetSimStep () * 1000.0 ); Uint32 currentFrame = SDL_GetTicks (); @@ -441,6 +632,15 @@ void MainLoop () { } lastFrame = SDL_GetTicks(); } + + #if GFX_ASYNC + + loadingThread.Stop (); + renderThread.Stop (); + #else + + SDL_GL_DeleteContext ( context ); + #endif } //----------------------------------------------------------------// @@ -452,6 +652,49 @@ void PrintMoaiVersion () { printf ( "%s\n", version ); } +//----------------------------------------------------------------// +void SetScreenSize ( DisplayModeFunc func ) { + + SDL_DisplayMode dm; + + if ( func != NULL && func( 0, &dm ) == 0 ) { + AKUSetScreenSize(dm.w, dm.h); + } +} + + +//----------------------------------------------------------------// +void SetScreenDpi() { + + #ifdef MOAI_OS_WINDOWS + + HDC hDC = GetWindowDC ( NULL ); + int widthInMm = GetDeviceCaps ( hDC, HORZSIZE ); + double widthInInches = widthInMm / 25.4; + int widthInPixels = GetDeviceCaps ( hDC, HORZRES ); + AKUSetScreenDpi (( int )( widthInPixels / widthInInches )); + + #elif defined ( MOAI_OS_LINUX ) + + char* display_name = getenv( "DISPLAY" ); + if ( !display_name ) return; + + int nscreen = 0; + xcb_connection_t* conn = xcb_connect( display_name, &nscreen ); + if ( !conn ) return; + + xcb_screen_t* screen = xcb_aux_get_screen( conn, nscreen ); + + double widthInInches = screen->width_in_millimeters / 25.4; + int widthInPixels = screen->width_in_pixels; + + AKUSetScreenDpi(( int )widthInPixels / widthInInches ); + + xcb_disconnect( conn ); + + #endif +} + //================================================================// // SDLHost //================================================================// @@ -464,6 +707,5 @@ int SDLHost ( int argc, char** argv ) { if ( sWindow ) { MainLoop (); } - return 0; } diff --git a/src/host-sdl/SDLHost.h b/src/host-sdl/SDLHost.h index e4d9ac5fef..a79d4a8272 100644 --- a/src/host-sdl/SDLHost.h +++ b/src/host-sdl/SDLHost.h @@ -5,6 +5,7 @@ #define SDLHOST_H //----------------------------------------------------------------// +void GetDeviceToPixelScale ( float& w, float& h ); int SDLHost ( int argc, char** arg ); #endif diff --git a/src/lua-headers/moai.lua b/src/lua-headers/moai.lua index 69fd67e735..cd932614b0 100644 --- a/src/lua-headers/moai.lua +++ b/src/lua-headers/moai.lua @@ -374,13 +374,13 @@ MOAIRenderMgr.extend ( -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - function class.grabNextFrame (image, callback) - local frameBuffer = MOAIGfxDevice.getFrameBuffer () - frameBuffer:grabNextFrame (image, callback) + local frameBuffer = MOAIGfxMgr.getFrameBuffer () + frameBuffer:grabNextFrame ( image, callback ) end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - function class.getRenderTable () - local frameBuffer = MOAIGfxDevice.getFrameBuffer () + local frameBuffer = MOAIGfxMgr.getFrameBuffer () return frameBuffer:getRenderTable () end @@ -413,7 +413,7 @@ MOAIRenderMgr.extend ( -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - function class.setRenderTable ( renderTable ) - local frameBuffer = MOAIGfxDevice.getFrameBuffer () + local frameBuffer = MOAIGfxMgr.getFrameBuffer () frameBuffer:setRenderTable ( renderTable ) end end @@ -535,11 +535,11 @@ MOAITransform.extend ( ) --============================================================-- --- MOAIGfxDevice +-- MOAIGfxMgr --============================================================-- -MOAIGfxDevice.extend ( +MOAIGfxMgr.extend ( - 'MOAIGfxDevice', + 'MOAIGfxMgr', ---------------------------------------------------------------- function ( class, superClass ) @@ -547,7 +547,7 @@ MOAIGfxDevice.extend ( -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -- extend the class function class.setClearColor ( ... ) - MOAIGfxDevice.getFrameBuffer():setClearColor ( ... ) + MOAIGfxMgr.getFrameBuffer():setClearColor ( ... ) end end ) @@ -595,6 +595,8 @@ end -- renames --============================================================-- +MOAIGfxDevice = MOAIGfxMgr + MOAIHashWriter = MOAIHashWriterCrypto or MOAIHashWriter MOAITextBox = MOAITextLabel MOAIThread = MOAICoroutine diff --git a/src/lua-headers/moai_lua.h b/src/lua-headers/moai_lua.h index d85c5d9f16..d07a5ae45e 100644 --- a/src/lua-headers/moai_lua.h +++ b/src/lua-headers/moai_lua.h @@ -1,289 +1,290 @@ #ifndef _moai_lua_H #define _moai_lua_H -#define moai_lua_SIZE 0x00000D1A +#define moai_lua_SIZE 0x00000D25 unsigned char moai_lua [] = { - 0xDD, 0x1C, 0x5D, 0x53, 0xDB, 0xBA, 0xF2, 0xBE, 0xA6, 0xBF, 0xC2, 0x6F, - 0x85, 0x39, 0x21, 0x07, 0xB8, 0x6F, 0x9D, 0xE1, 0x01, 0x12, 0xE0, 0xE6, - 0x5C, 0x08, 0x1D, 0x92, 0xDE, 0x9E, 0x7B, 0x3A, 0x1D, 0x46, 0xD8, 0x4A, - 0xA2, 0xD6, 0xB1, 0x3C, 0xB2, 0x03, 0xA4, 0x67, 0x7A, 0x7F, 0xFB, 0xD5, - 0xEA, 0xCB, 0x92, 0x6C, 0x87, 0x04, 0xEC, 0xB4, 0x53, 0x86, 0x81, 0x78, - 0xBF, 0xB4, 0xBB, 0xDA, 0x5D, 0xAD, 0x64, 0xC1, 0xC1, 0xC1, 0xC9, 0xAB, - 0xBE, 0xDE, 0x1C, 0x1C, 0x04, 0x7D, 0x9A, 0xAE, 0x18, 0x99, 0xCD, 0xF3, - 0x60, 0x2F, 0xDC, 0x0F, 0x8E, 0x0F, 0x8F, 0x0E, 0x0F, 0xF8, 0x8F, 0xA3, - 0xE0, 0x2F, 0x92, 0xC6, 0x24, 0xC1, 0xC1, 0x25, 0x5A, 0xE0, 0xAC, 0x1B, - 0x0C, 0x93, 0xB0, 0x17, 0x00, 0xFD, 0x69, 0x1C, 0x07, 0xB7, 0x40, 0x9F, - 0x05, 0xB7, 0x38, 0xC3, 0xEC, 0x01, 0x47, 0x12, 0x31, 0xCF, 0xF3, 0xF4, - 0xDD, 0xEF, 0xBF, 0xCF, 0x70, 0xBE, 0xA0, 0x88, 0xF4, 0x42, 0xBA, 0xE0, - 0xD0, 0x57, 0xEA, 0xF7, 0x4A, 0x09, 0x07, 0x07, 0xA0, 0x18, 0x49, 0x48, - 0x3E, 0x61, 0x28, 0xC9, 0xA6, 0x94, 0x2D, 0x8E, 0x07, 0xC3, 0x24, 0xC7, - 0x6C, 0x8A, 0x42, 0xFC, 0x7A, 0xE1, 0x31, 0x0D, 0x51, 0x1C, 0x4C, 0x97, - 0x49, 0x98, 0x13, 0x9A, 0xD4, 0x0E, 0x14, 0xEC, 0x71, 0x94, 0xFA, 0xDC, - 0x0D, 0xB2, 0x65, 0x8A, 0x59, 0x81, 0xDB, 0x7F, 0xF3, 0xA6, 0x73, 0xF0, - 0xCA, 0xAF, 0x37, 0x1D, 0x4B, 0x07, 0x25, 0xB8, 0x87, 0xA2, 0xE8, 0x8A, - 0x86, 0x7C, 0xEC, 0x0C, 0xC7, 0xD3, 0x6E, 0xF0, 0x34, 0xC0, 0x71, 0x8E, - 0xBA, 0xC1, 0x4A, 0xFC, 0xE6, 0xC3, 0x76, 0x3A, 0xAE, 0x26, 0xEB, 0x19, - 0xBA, 0xC1, 0x21, 0xF0, 0xE0, 0x24, 0x6A, 0x51, 0xDF, 0xF7, 0xE4, 0x61, - 0x3B, 0x7D, 0xEB, 0x19, 0x2C, 0x7D, 0x3B, 0xED, 0x29, 0x7C, 0x4B, 0x73, - 0x33, 0x3E, 0x5B, 0xA7, 0xA8, 0x4D, 0x78, 0x28, 0xBE, 0x0B, 0xF2, 0x96, - 0x75, 0x1C, 0x87, 0x71, 0xE1, 0x23, 0xFE, 0xA0, 0xDD, 0xA4, 0x3F, 0xD6, - 0x68, 0xFC, 0x1C, 0xDB, 0x0E, 0x1C, 0xCC, 0x4B, 0x49, 0x11, 0x90, 0x42, - 0x4D, 0x99, 0x70, 0x4F, 0x5C, 0x8D, 0xE0, 0xC4, 0x4B, 0xA4, 0x0A, 0x6A, - 0x86, 0xF3, 0x25, 0x4B, 0x04, 0x79, 0xEB, 0x8A, 0x16, 0x91, 0xB8, 0x89, - 0xA2, 0x1E, 0xF5, 0x2E, 0x15, 0x2D, 0x22, 0xD1, 0x53, 0xB4, 0x1B, 0x7C, - 0xAB, 0xD4, 0xD5, 0x63, 0x50, 0xBA, 0x7E, 0x6B, 0xB5, 0x16, 0xF0, 0x61, - 0x8B, 0xF8, 0xDB, 0xC4, 0xA1, 0x1E, 0xF5, 0xCE, 0x1C, 0xBA, 0xA0, 0x11, - 0x8E, 0x27, 0xF4, 0x23, 0x65, 0x71, 0x54, 0xA4, 0x0B, 0x68, 0xF9, 0x9C, - 0xD2, 0xB5, 0x9C, 0x2A, 0xB1, 0x76, 0x69, 0xC3, 0x03, 0xAE, 0xAD, 0xA2, - 0x4C, 0xFD, 0xAE, 0x2E, 0x01, 0x31, 0x4E, 0x66, 0xF9, 0xBC, 0x1B, 0x80, - 0x31, 0xB6, 0xD2, 0x25, 0x5B, 0xD7, 0x8C, 0x70, 0xE8, 0x56, 0xC4, 0xDA, - 0x6A, 0x53, 0x1E, 0xAD, 0xC5, 0x00, 0x04, 0x8D, 0xD7, 0x2D, 0x86, 0x5B, - 0x18, 0xBE, 0x76, 0x4D, 0xDD, 0xB9, 0x51, 0xEB, 0x56, 0xCC, 0x2D, 0x8C, - 0x5A, 0xBB, 0xF0, 0x56, 0x1B, 0xD5, 0x66, 0xF8, 0x96, 0xD7, 0xE1, 0xAD, - 0xAC, 0xA9, 0x5B, 0x9D, 0x77, 0x6F, 0xC8, 0xF3, 0xAB, 0xEE, 0x16, 0x66, - 0x6D, 0xB0, 0x84, 0xEF, 0xD6, 0xC2, 0x0C, 0xE3, 0xAF, 0x85, 0x46, 0x97, - 0x14, 0xC5, 0x5C, 0x1B, 0xF9, 0x8B, 0xC9, 0x5F, 0xA0, 0xA6, 0x82, 0x9B, - 0x4F, 0x1B, 0x5A, 0xBC, 0x46, 0x78, 0x51, 0x62, 0xEA, 0x47, 0x39, 0xDA, - 0x69, 0x2A, 0x82, 0xB2, 0x4E, 0x61, 0x70, 0xF4, 0xDD, 0xC2, 0xE2, 0x7A, - 0x21, 0x87, 0x3B, 0x37, 0xC8, 0x29, 0x0A, 0x2F, 0x35, 0xA8, 0x5E, 0xC8, - 0x0F, 0x08, 0x56, 0xA7, 0xAE, 0x6C, 0x6D, 0x4A, 0x45, 0x59, 0xA9, 0x96, - 0xD1, 0xB6, 0x19, 0x7E, 0x21, 0x78, 0x45, 0x86, 0x3D, 0x27, 0xEA, 0x68, - 0xD7, 0xD6, 0xE5, 0x4E, 0x06, 0xE8, 0xCE, 0xAB, 0xA4, 0x79, 0x89, 0x6C, - 0x07, 0xFB, 0x97, 0xCC, 0x6E, 0xF4, 0xD7, 0x2A, 0xE7, 0x93, 0xED, 0x46, - 0x39, 0x27, 0xBA, 0xF9, 0xE7, 0x6A, 0xDD, 0x2A, 0xA2, 0x58, 0xD2, 0xB6, - 0xAC, 0x9D, 0x13, 0x69, 0xF5, 0xAE, 0xF3, 0xC9, 0x78, 0x08, 0xB6, 0xAD, - 0xDC, 0x23, 0xF4, 0xEC, 0x13, 0x7A, 0x0D, 0x1D, 0xFC, 0x76, 0x4D, 0x7F, - 0x2D, 0x67, 0x6D, 0xD3, 0x2F, 0x4A, 0x76, 0x63, 0xA7, 0x60, 0xF8, 0x29, - 0xBF, 0x42, 0xF7, 0x38, 0x6E, 0xF9, 0x0C, 0xAC, 0x34, 0xCC, 0x0F, 0x3A, - 0x01, 0x9B, 0x4E, 0x09, 0x5B, 0x8C, 0xF3, 0x55, 0x8C, 0xCB, 0x5B, 0xC9, - 0x4C, 0x80, 0x4F, 0x04, 0xF8, 0x1D, 0xEC, 0x20, 0x25, 0x19, 0x10, 0x90, - 0x69, 0x90, 0xF0, 0x10, 0x97, 0x14, 0xF9, 0x1C, 0x27, 0x1C, 0xD6, 0xD1, - 0xF4, 0xD7, 0x37, 0xA7, 0x43, 0x30, 0x50, 0xD0, 0xF7, 0x12, 0xFC, 0x28, - 0x79, 0x3A, 0x42, 0x4E, 0x66, 0xE4, 0x28, 0x6E, 0x40, 0x89, 0x50, 0x34, - 0x25, 0x15, 0xC0, 0xAD, 0xE7, 0xCE, 0x05, 0x4D, 0x8A, 0xA4, 0x9D, 0xC2, - 0x43, 0x8D, 0xE1, 0x8E, 0x8B, 0x44, 0x82, 0xC1, 0xC7, 0x77, 0x85, 0x08, - 0xCD, 0xDC, 0xB2, 0xC2, 0xC2, 0xA3, 0xE4, 0x5B, 0xB1, 0x4B, 0x4C, 0x29, - 0xC7, 0x67, 0xDD, 0x20, 0x4A, 0xC9, 0xF6, 0xBA, 0x2B, 0x49, 0x9E, 0x8C, - 0x46, 0xD3, 0x09, 0xCE, 0xB8, 0x8F, 0x07, 0xBD, 0x78, 0x89, 0x82, 0x83, - 0xE0, 0x01, 0xB3, 0x0C, 0x4C, 0x3A, 0xEA, 0x1D, 0x06, 0x67, 0x38, 0x47, - 0xAF, 0x1F, 0xA1, 0x11, 0x1D, 0x21, 0x54, 0xFB, 0x68, 0x81, 0x59, 0x03, - 0x0A, 0x15, 0xB2, 0x7A, 0x7C, 0xAA, 0xB8, 0x1B, 0x83, 0x3D, 0x9E, 0xB6, - 0x6F, 0x0B, 0xF0, 0xF1, 0xE0, 0x6D, 0xB7, 0xE1, 0x08, 0x71, 0x8A, 0x46, - 0x18, 0xA3, 0x2C, 0xF3, 0x6B, 0x87, 0x7A, 0xEE, 0x03, 0x4E, 0x84, 0x09, - 0xFF, 0xE6, 0x86, 0x2B, 0x0D, 0x79, 0xEA, 0x16, 0x12, 0x20, 0xAF, 0x5F, - 0x76, 0x3E, 0x2F, 0xA4, 0x3A, 0x67, 0x53, 0x17, 0x04, 0xC7, 0xD1, 0xCD, - 0xF4, 0x3F, 0x84, 0x67, 0xFF, 0x49, 0x90, 0x90, 0xB8, 0x44, 0x00, 0xD1, - 0x7A, 0x25, 0xFA, 0xA0, 0x0A, 0x82, 0xEC, 0x39, 0x09, 0x9C, 0xE0, 0x86, - 0xE5, 0x73, 0x6A, 0x50, 0xD2, 0xAC, 0x57, 0x7D, 0x73, 0x11, 0x35, 0xB5, - 0x02, 0xB1, 0xF7, 0x31, 0x4A, 0x8A, 0xD4, 0x9B, 0x22, 0x16, 0xC8, 0x92, - 0x56, 0x5A, 0x6C, 0x2B, 0x69, 0x29, 0x0B, 0x0E, 0x8E, 0xAC, 0x4A, 0xD7, - 0xA6, 0xB2, 0x23, 0xEC, 0x6B, 0x90, 0xE0, 0x7A, 0x75, 0x6B, 0xA8, 0xB9, - 0xC2, 0x65, 0x7D, 0xAD, 0x98, 0x11, 0xA1, 0x66, 0x6A, 0x4E, 0x22, 0xA6, - 0x48, 0xC0, 0xA0, 0xDC, 0x37, 0x6F, 0xA0, 0x11, 0xAD, 0x56, 0x12, 0x55, - 0xEA, 0x60, 0xB9, 0x3A, 0x09, 0xAC, 0x05, 0xA6, 0x64, 0x9E, 0x8C, 0x11, - 0x6D, 0x5A, 0xCE, 0x96, 0x78, 0x73, 0x47, 0x1C, 0x6D, 0x3C, 0xC5, 0x6A, - 0x6E, 0xCD, 0x02, 0xC6, 0x81, 0xDA, 0x75, 0xF0, 0x63, 0xBF, 0xB9, 0x5A, - 0x75, 0xC1, 0x30, 0x9E, 0xAC, 0x52, 0x0C, 0x4B, 0xCF, 0x2D, 0x46, 0x11, - 0x66, 0xAF, 0x17, 0xCD, 0xD7, 0xF2, 0x6A, 0xD1, 0x6A, 0x61, 0x17, 0x48, - 0x0E, 0x2C, 0xAA, 0x1A, 0x4C, 0xEF, 0x5B, 0x0D, 0x86, 0x9A, 0x26, 0xE7, - 0xFB, 0xB5, 0x55, 0xED, 0x55, 0x65, 0x0D, 0x54, 0x68, 0x22, 0xE6, 0xD6, - 0x14, 0xC7, 0xAA, 0x84, 0x8B, 0x29, 0x8A, 0x2E, 0x18, 0x5D, 0x4C, 0x26, - 0x17, 0x45, 0xC6, 0x13, 0xBE, 0xBF, 0xE3, 0x15, 0x9F, 0xAB, 0x3E, 0x47, - 0x2C, 0xE4, 0x9D, 0x6C, 0x56, 0x5E, 0xAD, 0x55, 0x3B, 0x04, 0xFC, 0xD0, - 0x43, 0x28, 0x16, 0x1B, 0x95, 0x32, 0x0C, 0xD8, 0xCB, 0x78, 0x95, 0xCE, - 0x33, 0x4E, 0xB3, 0x4E, 0x98, 0x49, 0xD3, 0x16, 0x5C, 0xA0, 0x73, 0xBD, - 0x36, 0xD9, 0x3B, 0x8E, 0x6F, 0xFC, 0x5C, 0xAD, 0x4B, 0xD6, 0x8A, 0xC4, - 0xEA, 0xA3, 0x70, 0x5E, 0x64, 0x15, 0x04, 0xD8, 0x60, 0xC5, 0xBD, 0x42, - 0x42, 0xE1, 0x03, 0x81, 0x55, 0x82, 0xEB, 0x24, 0xA8, 0xC0, 0xB5, 0x45, - 0x94, 0xE3, 0xDA, 0x91, 0xE1, 0xE6, 0xAC, 0x72, 0xA4, 0xF8, 0xB9, 0xDF, - 0x5C, 0x2B, 0x04, 0x7A, 0xFC, 0x2B, 0xCF, 0xD3, 0x09, 0xCA, 0xBE, 0x36, - 0xD3, 0x68, 0x68, 0x69, 0xAA, 0xDD, 0xD6, 0x8F, 0xA3, 0xF1, 0x87, 0xDB, - 0x2B, 0xA8, 0xDE, 0x0E, 0x10, 0xF5, 0x63, 0x1F, 0xD6, 0x5F, 0xB2, 0x38, - 0x68, 0xCE, 0xB8, 0x3F, 0x32, 0x9A, 0xBC, 0x47, 0x2C, 0x6B, 0xB0, 0x1E, - 0x15, 0x22, 0x65, 0x1D, 0x92, 0x85, 0xA8, 0x80, 0xDA, 0x4D, 0x96, 0xAC, - 0x46, 0x05, 0xAE, 0x9D, 0x9A, 0x64, 0x17, 0x22, 0x5D, 0x78, 0x5A, 0x4E, - 0x39, 0x2F, 0xAB, 0x22, 0x0C, 0x05, 0x00, 0xEA, 0xCD, 0x05, 0x11, 0x5B, - 0x28, 0xAB, 0x6E, 0x58, 0xB9, 0xF6, 0x85, 0x3B, 0x42, 0x05, 0x06, 0xD0, - 0x8D, 0x57, 0x59, 0x8E, 0x17, 0xB2, 0x54, 0x95, 0xD8, 0xAC, 0x1C, 0x10, - 0x6C, 0x88, 0xAB, 0xE0, 0x39, 0x5A, 0x8E, 0xCA, 0xD9, 0x04, 0x81, 0xA9, - 0x37, 0xBB, 0x35, 0x1D, 0x27, 0xA0, 0xC4, 0x84, 0x7A, 0x16, 0xF0, 0x45, - 0x1D, 0xDD, 0xC7, 0xFC, 0xD7, 0x34, 0x46, 0x33, 0x3D, 0x21, 0x1D, 0xF9, - 0x70, 0xA2, 0x80, 0x14, 0x0A, 0x82, 0x67, 0xD3, 0x1F, 0xE3, 0x9B, 0xD1, - 0xDD, 0x70, 0x34, 0x38, 0x1F, 0x4D, 0x82, 0xDF, 0x2A, 0x91, 0xE3, 0x9B, - 0xDB, 0xC9, 0xDD, 0xBF, 0xCF, 0xFF, 0x3B, 0x0E, 0xF6, 0xAB, 0x5D, 0x6B, - 0x87, 0x62, 0xA2, 0x3C, 0xE4, 0x29, 0x03, 0x7C, 0xDE, 0x2C, 0x64, 0xE8, - 0x01, 0x97, 0x6C, 0x70, 0x1D, 0xDB, 0x4E, 0xFD, 0xB9, 0x42, 0xAB, 0x26, - 0xB2, 0xD3, 0x88, 0x2A, 0x6D, 0x72, 0x04, 0xF4, 0xA7, 0xD8, 0xE3, 0xEC, - 0x60, 0x8B, 0x03, 0x27, 0x92, 0x88, 0xE5, 0x04, 0x34, 0xEC, 0x2F, 0xE3, - 0xF8, 0x78, 0xB0, 0x93, 0x9D, 0xC8, 0x98, 0xB2, 0x7C, 0xCC, 0xE3, 0x10, - 0x7B, 0x47, 0x63, 0x29, 0x23, 0x94, 0x91, 0x7C, 0x55, 0xD7, 0xB2, 0xD6, - 0xF1, 0x1D, 0x7A, 0xAC, 0x2D, 0x6F, 0x4F, 0x1E, 0x93, 0xA8, 0xF6, 0x26, - 0xC0, 0xFA, 0x53, 0xC1, 0x6A, 0x46, 0x7D, 0x26, 0xE8, 0x1E, 0x0A, 0xB6, - 0x6E, 0x85, 0x3C, 0xA2, 0xFC, 0x98, 0x6C, 0x6D, 0x45, 0x35, 0xE3, 0x06, - 0x56, 0x54, 0x14, 0x48, 0x59, 0x16, 0x45, 0x95, 0xFA, 0xEB, 0xEE, 0x74, - 0xDC, 0x3F, 0x1F, 0x0D, 0x86, 0xA3, 0x4B, 0x13, 0x85, 0x0E, 0x7A, 0x70, - 0xEE, 0xE3, 0x1B, 0xDE, 0x97, 0x5C, 0x32, 0x94, 0xCE, 0x49, 0x98, 0xBD, - 0x67, 0x34, 0x6D, 0xA6, 0xC6, 0xD8, 0x12, 0x4B, 0xA5, 0xC6, 0x46, 0xFE, - 0xDA, 0x15, 0xA7, 0xBD, 0x33, 0x0D, 0x06, 0xEB, 0xBF, 0x09, 0xC3, 0x6B, - 0x92, 0xF0, 0xA8, 0x13, 0x3F, 0x9F, 0xAE, 0x11, 0x44, 0x20, 0xFF, 0x59, - 0x57, 0x4D, 0xCE, 0xE8, 0x32, 0x89, 0xB2, 0x4A, 0xE6, 0x43, 0x9B, 0x5F, - 0x07, 0x76, 0xCB, 0xF9, 0x08, 0x37, 0xB0, 0x70, 0x58, 0x5C, 0xC1, 0x52, - 0x3B, 0x12, 0x5E, 0xD8, 0x12, 0xE7, 0x5E, 0x96, 0xCE, 0x4D, 0x4B, 0xDD, - 0x6F, 0x9E, 0xC5, 0x00, 0xE1, 0x76, 0x57, 0xDD, 0x9F, 0x72, 0x8C, 0x76, - 0xF3, 0xB5, 0xD2, 0x79, 0x2D, 0x9D, 0x00, 0xDC, 0x72, 0x79, 0x98, 0x5D, - 0xCF, 0x1A, 0x5A, 0xCA, 0x8D, 0xB8, 0x52, 0x8E, 0x19, 0x4C, 0x0B, 0xE9, - 0x55, 0xD5, 0x49, 0x37, 0x14, 0x1F, 0xD5, 0xC5, 0xD2, 0x6B, 0x26, 0xE5, - 0xB9, 0xB8, 0xB4, 0x70, 0x02, 0x2D, 0x9B, 0xDC, 0x93, 0x16, 0x31, 0xC2, - 0x2C, 0x94, 0xDE, 0xEC, 0x8A, 0x30, 0xF3, 0x38, 0xF4, 0x8B, 0x10, 0x9B, - 0x5E, 0xBF, 0x0E, 0xE9, 0xB8, 0x42, 0xFE, 0xFE, 0x2E, 0x80, 0x52, 0x56, - 0xE6, 0xC9, 0x72, 0x04, 0x58, 0x8D, 0x60, 0xC7, 0x0A, 0x33, 0x8B, 0xE4, - 0x8D, 0xE9, 0xC0, 0x9B, 0x3F, 0x65, 0x0B, 0x63, 0x8C, 0x98, 0x54, 0x6E, - 0x9C, 0xA3, 0xF0, 0xAB, 0x32, 0xB4, 0x46, 0x6F, 0xBE, 0x98, 0xB4, 0x97, - 0xE2, 0xCA, 0xEF, 0x0C, 0xDD, 0x8F, 0xF8, 0x9C, 0xAA, 0x8A, 0x45, 0x16, - 0x68, 0x06, 0x65, 0x19, 0xC5, 0xF1, 0x3D, 0x57, 0xCF, 0x4A, 0xEC, 0x29, - 0x10, 0x9C, 0x2D, 0xA7, 0x53, 0xBE, 0x65, 0x94, 0x2D, 0xFA, 0xE5, 0xF4, - 0x69, 0x80, 0x1F, 0x88, 0x3A, 0x71, 0xB6, 0xD0, 0xD2, 0x26, 0x8B, 0xE1, - 0xDD, 0xF3, 0xA3, 0xB4, 0x69, 0x62, 0x55, 0x68, 0xBD, 0xD0, 0x28, 0x15, - 0x2D, 0x8E, 0x6D, 0x15, 0xE2, 0x5B, 0xB4, 0x26, 0xA5, 0xA9, 0x1C, 0xEE, - 0x3D, 0x64, 0xF6, 0x9E, 0xDC, 0x93, 0xD5, 0xE7, 0x55, 0x4D, 0x32, 0x76, - 0xC4, 0x5E, 0xAA, 0xC7, 0xB0, 0xBA, 0x1A, 0xE9, 0x67, 0x48, 0x9B, 0x06, - 0x2C, 0xB3, 0xB9, 0x6D, 0x41, 0x90, 0x16, 0x9B, 0xFD, 0x97, 0xDA, 0x41, - 0x12, 0xBE, 0x51, 0xCC, 0x5D, 0x3B, 0xBA, 0x5A, 0x70, 0xAB, 0xD6, 0x48, - 0x0F, 0x36, 0x67, 0x0F, 0xEF, 0x62, 0x02, 0xC2, 0x53, 0x63, 0xC9, 0x32, - 0xF8, 0xC4, 0x57, 0xE2, 0x14, 0x11, 0x96, 0xF9, 0x53, 0x14, 0x44, 0x54, - 0x14, 0x3C, 0x5E, 0x21, 0x15, 0xE9, 0xC9, 0x89, 0x1C, 0xD8, 0x14, 0xC8, - 0x35, 0x53, 0xDC, 0x0D, 0xF4, 0x31, 0x69, 0xE7, 0x9E, 0x61, 0xF4, 0x55, - 0x7C, 0x54, 0x35, 0xD1, 0xDA, 0x23, 0xB7, 0xE3, 0xB1, 0x67, 0xAB, 0x73, - 0x43, 0x35, 0xE7, 0xD9, 0x71, 0xDA, 0x68, 0x20, 0xC6, 0x64, 0xD1, 0x4C, - 0xEB, 0xC0, 0x05, 0x95, 0x9A, 0x06, 0x0E, 0xDB, 0x51, 0xBB, 0xB0, 0xC3, - 0x6E, 0xA1, 0x66, 0x45, 0x74, 0xDB, 0xA7, 0x6A, 0xA2, 0x5D, 0x56, 0xD9, - 0x92, 0x4A, 0x15, 0x14, 0x3F, 0xA0, 0x68, 0x96, 0xD5, 0xAA, 0x25, 0xFC, - 0x21, 0x45, 0xB0, 0xA4, 0xDF, 0x3A, 0x52, 0x88, 0x94, 0xE6, 0x33, 0x32, - 0x64, 0x24, 0xCD, 0x47, 0x34, 0xC2, 0x0D, 0x25, 0xA6, 0x91, 0x67, 0xBD, - 0xB2, 0x7B, 0xEB, 0x62, 0x78, 0x96, 0xFE, 0x1C, 0x17, 0x11, 0x5A, 0xD8, - 0x0F, 0x86, 0x34, 0x49, 0x8A, 0xFD, 0x20, 0x1F, 0x97, 0x85, 0xE2, 0x32, - 0x41, 0x97, 0xB7, 0xEA, 0x11, 0xD7, 0x23, 0xCA, 0xE4, 0xE5, 0x02, 0x7B, - 0x53, 0x88, 0xF2, 0x9C, 0x8D, 0x59, 0xA8, 0x2E, 0xCE, 0xF4, 0xEE, 0xEE, - 0x00, 0x30, 0x82, 0x3F, 0xEC, 0x0C, 0x3E, 0x19, 0x01, 0xC1, 0x67, 0x97, - 0x61, 0x90, 0xE5, 0x70, 0x9E, 0x02, 0x8E, 0x76, 0x19, 0xCC, 0x08, 0x9F, - 0xD5, 0x1E, 0x41, 0x8B, 0x87, 0xD3, 0x75, 0xCD, 0x69, 0x96, 0x41, 0x67, - 0x5F, 0x7E, 0xCA, 0xB1, 0x57, 0x24, 0x29, 0xEE, 0x69, 0x2B, 0x56, 0xAD, - 0xBC, 0xE6, 0xF6, 0x4E, 0x8B, 0xDB, 0x2C, 0x87, 0x6B, 0x5E, 0xF2, 0x6F, - 0xF5, 0x86, 0x5E, 0xDF, 0x01, 0x73, 0x9C, 0xA5, 0x37, 0x46, 0xBA, 0x0F, - 0x99, 0x56, 0xFF, 0x85, 0x15, 0x9E, 0xEA, 0x35, 0xD2, 0xDF, 0xCE, 0x2F, - 0xF0, 0xA2, 0x92, 0xE5, 0x1A, 0x2F, 0xEE, 0x8B, 0x95, 0x55, 0x71, 0xC9, - 0x06, 0x19, 0x34, 0xE0, 0x3A, 0x11, 0x9E, 0xE1, 0xB0, 0xD7, 0xB7, 0x82, - 0x58, 0xBA, 0xFC, 0x2B, 0x5E, 0x75, 0x83, 0x07, 0x14, 0xEB, 0xDB, 0x02, - 0x30, 0x83, 0x15, 0x61, 0xC1, 0xC9, 0x82, 0xCF, 0x56, 0x37, 0x03, 0x9A, - 0x68, 0xE8, 0x89, 0xE4, 0x97, 0x08, 0xFF, 0x04, 0x25, 0x9C, 0xE3, 0x68, - 0x19, 0xE3, 0x0F, 0x69, 0x84, 0x72, 0xD7, 0xA4, 0x0E, 0x8E, 0x33, 0xBC, - 0x5E, 0x9A, 0xD5, 0x04, 0x55, 0xDF, 0x39, 0x68, 0xF3, 0xD4, 0xE8, 0x54, - 0x99, 0xEF, 0x44, 0xE7, 0x30, 0x92, 0xBF, 0x47, 0xE6, 0x8D, 0x52, 0xF9, - 0xC8, 0x68, 0x53, 0xC6, 0xB2, 0x97, 0x0D, 0x01, 0xB8, 0x41, 0x72, 0xB5, - 0xD4, 0x19, 0x99, 0x4B, 0x99, 0xCD, 0x94, 0x61, 0x23, 0xAE, 0xD4, 0x25, - 0x19, 0xCC, 0x4F, 0x72, 0x1F, 0xEC, 0x45, 0x37, 0x52, 0xCB, 0x77, 0xBE, - 0xC6, 0x39, 0x23, 0xC9, 0xAC, 0x32, 0x19, 0x41, 0x7A, 0x35, 0xB9, 0x3A, - 0x56, 0xAB, 0x63, 0x92, 0x68, 0xFF, 0xD5, 0x4B, 0xDD, 0x48, 0x99, 0x1E, - 0xA9, 0xE9, 0xC8, 0xD0, 0xA7, 0xB7, 0x0D, 0x45, 0x86, 0x16, 0x57, 0x8E, - 0x8C, 0xE2, 0x98, 0xF8, 0x57, 0x3D, 0xD5, 0x6E, 0xFA, 0xCD, 0x83, 0xDE, - 0x6E, 0x35, 0xF4, 0xDA, 0xC1, 0xEC, 0xDE, 0x4A, 0xEF, 0x1C, 0x34, 0xE6, - 0xD7, 0xDB, 0xE0, 0xC0, 0xD5, 0x1B, 0xD8, 0xBE, 0xF4, 0x69, 0x2C, 0xDE, - 0x95, 0xF7, 0x7A, 0xBD, 0xA2, 0x31, 0xAE, 0xDB, 0xCF, 0xEE, 0xED, 0xBF, - 0xAB, 0xE3, 0x6B, 0xA3, 0x38, 0xFF, 0xB9, 0x88, 0x1B, 0xBE, 0x60, 0x62, - 0x24, 0x5A, 0xF7, 0xDC, 0x0C, 0xAC, 0x7C, 0xBB, 0xC4, 0xA0, 0x7E, 0x8A, - 0x0B, 0x6F, 0x3B, 0xBE, 0x7C, 0xF1, 0x80, 0x93, 0x5C, 0xBC, 0xFB, 0xC8, - 0x19, 0x46, 0x8B, 0xE2, 0xC2, 0x9D, 0xEA, 0xC1, 0x52, 0xE9, 0xC7, 0x13, - 0xD7, 0xAF, 0xF6, 0x25, 0x30, 0x49, 0x21, 0x6F, 0xFF, 0x0B, 0x11, 0xAE, - 0x2C, 0xDD, 0xCB, 0x51, 0x06, 0xE7, 0x4F, 0x70, 0x4F, 0xF3, 0x8D, 0x33, - 0x00, 0x8E, 0xF1, 0x82, 0xAB, 0x00, 0xDD, 0xA2, 0xEC, 0x8E, 0x66, 0xB2, - 0xA5, 0x20, 0xF7, 0xCB, 0x1C, 0x77, 0x9C, 0x16, 0x4E, 0xDE, 0x6B, 0x09, - 0x54, 0x5F, 0xA4, 0xC6, 0xE5, 0xE4, 0xE7, 0x52, 0x84, 0xE1, 0x2A, 0x48, - 0xB9, 0xF5, 0xDD, 0xB2, 0xD4, 0xCC, 0x11, 0xBB, 0x81, 0x40, 0xD8, 0x62, - 0xBB, 0xB2, 0x78, 0x1F, 0x8F, 0x47, 0x4B, 0x68, 0x43, 0x37, 0x94, 0x55, - 0x30, 0x94, 0x64, 0x41, 0x0B, 0xC4, 0x3F, 0x6D, 0x26, 0x47, 0x76, 0x5A, - 0x9E, 0x04, 0x58, 0x19, 0x37, 0x96, 0x00, 0xC4, 0x8E, 0x84, 0xEF, 0x7A, - 0x42, 0xF4, 0xF9, 0x72, 0x21, 0x44, 0x8E, 0xC0, 0xB3, 0x4A, 0x4C, 0x5F, - 0xD1, 0x0F, 0xEB, 0xB9, 0x7B, 0x90, 0x33, 0xA7, 0x43, 0x20, 0xC7, 0xA9, - 0x61, 0xEA, 0xA8, 0x19, 0xDF, 0x53, 0x54, 0xFF, 0xF3, 0x43, 0xE8, 0xCF, - 0xEB, 0xAB, 0xBB, 0xF3, 0xDB, 0xDB, 0x9B, 0x5B, 0x3E, 0x4F, 0x48, 0xBC, - 0x37, 0xAF, 0x21, 0x1C, 0xDC, 0x8C, 0xCE, 0xF5, 0x89, 0xA1, 0xD6, 0x51, - 0x90, 0x76, 0xA5, 0x5A, 0xC0, 0xAC, 0xA2, 0x48, 0x12, 0xA9, 0x3E, 0xBA, - 0xE2, 0x50, 0xB1, 0xC1, 0x8B, 0x37, 0x4C, 0x5C, 0xF0, 0xC9, 0x1A, 0xF8, - 0x6B, 0x07, 0x71, 0x79, 0x0F, 0x65, 0xF3, 0x8F, 0x8C, 0xF0, 0x8A, 0x00, - 0xD3, 0xE8, 0x42, 0xFA, 0x6C, 0x95, 0xE6, 0xD4, 0x5C, 0xF3, 0x33, 0x70, - 0xD3, 0x8A, 0x9E, 0xD1, 0xA7, 0x8E, 0x66, 0x2B, 0x3A, 0x5D, 0xF1, 0x34, - 0xE7, 0x89, 0x18, 0x19, 0x64, 0x9F, 0x32, 0xBA, 0xCC, 0x79, 0x24, 0xCA, - 0x41, 0xE1, 0x1D, 0xBB, 0xC1, 0x39, 0xEF, 0xF9, 0x35, 0xF6, 0x78, 0x50, - 0x89, 0x3F, 0x1E, 0x48, 0x01, 0x32, 0xE1, 0xE5, 0xD5, 0x4B, 0x45, 0x26, - 0x41, 0xA7, 0x11, 0x4A, 0xB5, 0x86, 0x12, 0xA2, 0x8C, 0xAB, 0x22, 0x6A, - 0x64, 0x3A, 0xFA, 0x8C, 0xF2, 0xEA, 0xF9, 0x3E, 0x46, 0x79, 0x33, 0xCD, - 0x9C, 0x5E, 0x4A, 0xE0, 0x28, 0x94, 0x4B, 0x0C, 0xF1, 0x65, 0x5F, 0xC6, - 0x7F, 0xC0, 0xBF, 0x5C, 0x04, 0x62, 0xF7, 0x68, 0x86, 0xF9, 0x4A, 0x19, - 0x63, 0x99, 0x37, 0x27, 0x3E, 0xA7, 0x8C, 0x3A, 0x00, 0x9E, 0xA6, 0xA9, - 0x42, 0xC3, 0x27, 0x35, 0xA5, 0xFC, 0xE3, 0x69, 0x12, 0x31, 0x4A, 0x22, - 0x0B, 0x32, 0xBC, 0x19, 0x4B, 0x8E, 0x65, 0x44, 0xE8, 0x18, 0x2D, 0xD2, - 0xD8, 0x94, 0x61, 0x07, 0xA4, 0x39, 0x2C, 0x58, 0x9F, 0x86, 0x14, 0x55, - 0x21, 0xD4, 0x28, 0x42, 0xEE, 0x19, 0xA3, 0x8F, 0x45, 0x65, 0xD7, 0x4F, - 0x8A, 0x49, 0x3D, 0x7A, 0x5A, 0x29, 0xA8, 0xD6, 0x6C, 0x8C, 0xA6, 0x88, - 0x11, 0xFE, 0xE4, 0xCA, 0xD0, 0xE8, 0x01, 0x41, 0x31, 0x9D, 0x29, 0x9C, - 0x7A, 0x50, 0x82, 0xE4, 0x93, 0x27, 0x5D, 0x02, 0x41, 0x9C, 0x03, 0x18, - 0x0F, 0xAE, 0x84, 0xB8, 0x6B, 0xFA, 0x40, 0x30, 0x9F, 0xDF, 0x95, 0xD1, - 0xD9, 0x86, 0x28, 0x16, 0x0B, 0xE4, 0x49, 0xB7, 0x30, 0xA0, 0x20, 0x84, - 0xCC, 0x4D, 0x0A, 0xB3, 0xC5, 0xCB, 0xD8, 0x3F, 0x59, 0x04, 0x25, 0x2C, - 0x5F, 0xC9, 0x05, 0x13, 0xFE, 0x9A, 0x29, 0x93, 0xBE, 0x8F, 0xA0, 0xFF, - 0x49, 0x56, 0xDA, 0xEF, 0xEA, 0xD1, 0x9F, 0x2C, 0x05, 0xD6, 0x86, 0x9F, - 0x91, 0x38, 0x96, 0x7B, 0x18, 0xFB, 0x49, 0xFB, 0x50, 0x3E, 0xFA, 0x9E, - 0x95, 0x50, 0x2D, 0xA1, 0x3F, 0xE7, 0xDA, 0x9C, 0x51, 0x2A, 0x0E, 0xA1, - 0x5C, 0x80, 0xC7, 0x58, 0x20, 0x0C, 0x2F, 0x4F, 0x34, 0x9E, 0x55, 0x21, - 0xC9, 0x16, 0x9A, 0xB9, 0x80, 0xF8, 0xDC, 0x05, 0x46, 0xB3, 0x5F, 0xF0, - 0x86, 0xE4, 0x9E, 0x52, 0x7D, 0xFB, 0x58, 0x3F, 0x7A, 0x8C, 0x1A, 0xAC, - 0xB9, 0x46, 0x34, 0x27, 0x53, 0x12, 0x22, 0x70, 0x68, 0xA6, 0x58, 0x1D, - 0x98, 0xC7, 0xEF, 0xE0, 0xB4, 0x90, 0x09, 0x4A, 0xBF, 0x50, 0xED, 0x6B, - 0xF9, 0xE0, 0xB1, 0x49, 0xA0, 0xA1, 0x7F, 0x14, 0xDA, 0x6B, 0x06, 0xF9, - 0xE4, 0x73, 0x48, 0xA8, 0x9E, 0xF2, 0x3E, 0x5D, 0xA4, 0x7C, 0xD0, 0x7B, - 0x12, 0x93, 0x7C, 0x65, 0x72, 0xBC, 0x20, 0x72, 0x53, 0x5C, 0xC1, 0x79, - 0x13, 0x9D, 0x44, 0x93, 0x47, 0x8C, 0x73, 0xEB, 0x44, 0x69, 0x2F, 0xE7, - 0xB1, 0xD2, 0x0D, 0x96, 0x2C, 0xDE, 0xF7, 0x64, 0xC0, 0x3F, 0x7F, 0x4B, - 0x69, 0x86, 0x05, 0x87, 0x4D, 0x26, 0x8A, 0x40, 0x59, 0x76, 0x7E, 0x1A, - 0x86, 0x38, 0xCB, 0x26, 0xF4, 0x2B, 0x4E, 0xEC, 0x01, 0xF6, 0x83, 0x6A, - 0x0E, 0xD8, 0x9D, 0xB9, 0x74, 0xD5, 0x64, 0xD9, 0x15, 0x9D, 0xCD, 0x70, - 0x34, 0x4C, 0x82, 0xCA, 0xBE, 0xC0, 0x57, 0x1A, 0x25, 0x52, 0xE1, 0x1A, - 0x71, 0xE3, 0xF3, 0xF1, 0x78, 0x78, 0x33, 0xBA, 0x1B, 0x0C, 0x07, 0x77, - 0x57, 0x37, 0x97, 0xC3, 0x91, 0xEB, 0xF6, 0xDE, 0xE4, 0xE3, 0xF9, 0xF9, - 0xE4, 0x6E, 0xFC, 0xA1, 0xDF, 0xE7, 0x84, 0x17, 0x1F, 0xAE, 0x82, 0xDF, - 0x82, 0xA3, 0xB5, 0x42, 0x46, 0x37, 0x93, 0x4A, 0x41, 0xE5, 0x81, 0x40, - 0x52, 0x49, 0x14, 0xAF, 0x0C, 0xC4, 0x75, 0x97, 0x20, 0x81, 0x2F, 0xD9, - 0x9B, 0xC4, 0x84, 0xB7, 0x23, 0x89, 0x1F, 0x1E, 0x92, 0xEF, 0x4A, 0xE1, - 0xB2, 0x4F, 0xCF, 0x6A, 0xF7, 0x39, 0x30, 0x72, 0xDD, 0x68, 0xB1, 0x1C, - 0xCC, 0x7D, 0x66, 0xE2, 0xC6, 0x28, 0xF1, 0xAA, 0xE1, 0xFD, 0xA1, 0x61, - 0x4A, 0x7C, 0xC9, 0xCA, 0xE2, 0xCA, 0xD9, 0xBA, 0xA3, 0x71, 0x34, 0x86, - 0x2E, 0xB5, 0x52, 0x89, 0xAC, 0xC0, 0x54, 0x06, 0xA4, 0xC5, 0x66, 0xDC, - 0xAB, 0x1A, 0x2E, 0x3D, 0xF8, 0xBE, 0xED, 0x15, 0xD5, 0x06, 0x3E, 0x37, - 0x8F, 0x3C, 0x25, 0x9F, 0xA5, 0x2C, 0xA2, 0xA2, 0xE4, 0xD1, 0x7A, 0x37, - 0xAE, 0xF5, 0x31, 0x0C, 0xFB, 0xF7, 0xF7, 0x0D, 0x25, 0x7D, 0x12, 0x0A, - 0xC2, 0x71, 0xA4, 0x36, 0xB4, 0x98, 0x02, 0x38, 0xBE, 0xAD, 0x93, 0xE2, - 0xF9, 0xBB, 0xDE, 0x5B, 0x7A, 0x22, 0x1B, 0xFD, 0x73, 0xDC, 0x6B, 0x94, - 0xF0, 0x06, 0x84, 0x35, 0xD1, 0x8B, 0xCA, 0xDC, 0x79, 0xE4, 0xBD, 0xDE, - 0x65, 0x4C, 0xEF, 0xF9, 0x47, 0x67, 0x03, 0x46, 0xEF, 0xBF, 0x74, 0xC5, - 0x33, 0xB4, 0xE3, 0xA5, 0xDD, 0x82, 0x3C, 0x24, 0x08, 0x2C, 0xB8, 0x66, - 0x91, 0x08, 0x63, 0xB3, 0x58, 0x34, 0x05, 0xD3, 0xF5, 0x8C, 0x59, 0xDD, - 0x12, 0xEC, 0xD1, 0x0C, 0x18, 0xDE, 0x2A, 0x38, 0x84, 0xF2, 0xDF, 0xB1, - 0xD1, 0x5C, 0xB4, 0xF8, 0x27, 0xB6, 0x8E, 0xF2, 0x4F, 0x00, 0x0C, 0x61, - 0x37, 0xA8, 0xE4, 0xE3, 0x3A, 0xBB, 0x70, 0xB8, 0xE8, 0xCD, 0xE8, 0x94, - 0xC0, 0xCA, 0x7B, 0x9E, 0xC0, 0xDB, 0x84, 0x68, 0x3B, 0xC1, 0x15, 0x02, - 0xAA, 0x06, 0x79, 0x91, 0xD2, 0x59, 0xBD, 0xD2, 0xB2, 0xA9, 0x1F, 0x26, - 0x53, 0xFA, 0x52, 0xAD, 0x4B, 0x12, 0xE0, 0xD8, 0x41, 0x95, 0x37, 0xE8, - 0x4B, 0xAD, 0xBF, 0xCA, 0xE1, 0x8F, 0xBD, 0x98, 0x4C, 0x71, 0xB8, 0x0A, - 0xF5, 0x5D, 0xB7, 0x02, 0x01, 0xFF, 0x34, 0x53, 0xE3, 0x2A, 0x8A, 0x86, - 0xDE, 0xD2, 0x0D, 0x07, 0x45, 0x2A, 0xC8, 0x03, 0x0E, 0xB7, 0x44, 0x67, - 0x45, 0x4B, 0x6C, 0x8D, 0xF5, 0x49, 0x33, 0x07, 0x9F, 0x55, 0x0E, 0x77, - 0x3A, 0xEB, 0xA9, 0x8A, 0xAC, 0xCD, 0x60, 0x10, 0xEF, 0x76, 0x8E, 0xC1, - 0x39, 0xCA, 0xA8, 0xF7, 0x2A, 0x5A, 0x30, 0x49, 0x1E, 0xF8, 0x3A, 0xBC, - 0xA9, 0x51, 0xF2, 0x54, 0x6C, 0x7B, 0x7B, 0xE4, 0xBF, 0x59, 0x28, 0xC8, - 0xF5, 0xC6, 0x5A, 0xDD, 0xBF, 0x31, 0xEA, 0x11, 0xD8, 0xBE, 0xCB, 0x0B, - 0x38, 0x05, 0xB1, 0xB9, 0x7E, 0x63, 0xC8, 0xAC, 0x63, 0x3D, 0x6B, 0xAF, - 0xAB, 0xD3, 0xED, 0x1F, 0xFF, 0x07, + 0xDD, 0x1C, 0x5D, 0x53, 0xE3, 0x38, 0xF2, 0x5E, 0x33, 0xBF, 0xC2, 0x6F, + 0x03, 0xB5, 0x21, 0x0B, 0xDC, 0xDB, 0x54, 0xF1, 0x00, 0x09, 0x70, 0xEC, + 0x41, 0x98, 0x22, 0x99, 0x9B, 0xBD, 0x9D, 0x9A, 0xA2, 0x84, 0xAD, 0x10, + 0xED, 0x38, 0x96, 0x4B, 0x76, 0x60, 0x32, 0x5B, 0x73, 0xBF, 0xFD, 0xD4, + 0xFA, 0x96, 0x6C, 0x87, 0x00, 0x76, 0x66, 0x6A, 0x29, 0x0A, 0xE2, 0xFE, + 0x52, 0x77, 0xAB, 0xBB, 0xD5, 0x92, 0x05, 0x7B, 0x7B, 0x47, 0xAF, 0xFA, + 0x7A, 0xB3, 0xB7, 0x17, 0x0D, 0x69, 0xBE, 0x62, 0xE4, 0x7E, 0x5E, 0x46, + 0x3B, 0xF1, 0x6E, 0x74, 0xB8, 0x7F, 0xB0, 0xBF, 0xC7, 0x7F, 0x1C, 0x44, + 0x7F, 0x90, 0x3C, 0x25, 0x19, 0x8E, 0xCE, 0xD1, 0x02, 0x17, 0xFD, 0xE8, + 0x22, 0x8B, 0x07, 0x11, 0xD0, 0x1F, 0xA7, 0x69, 0x74, 0x03, 0xF4, 0x45, + 0x74, 0x83, 0x0B, 0xCC, 0x1E, 0x70, 0x22, 0x11, 0xF3, 0xB2, 0xCC, 0xDF, + 0xFD, 0xFA, 0xEB, 0x3D, 0x2E, 0x17, 0x14, 0x91, 0x41, 0x4C, 0x17, 0x1C, + 0xFA, 0x4A, 0xFD, 0x5E, 0x29, 0x61, 0x6F, 0x0F, 0x14, 0x23, 0x19, 0x29, + 0xA7, 0x0C, 0x65, 0xC5, 0x8C, 0xB2, 0xC5, 0xE1, 0xE8, 0x22, 0x2B, 0x31, + 0x9B, 0xA1, 0x18, 0xBF, 0x5E, 0x78, 0x4A, 0x63, 0x94, 0x46, 0xB3, 0x65, + 0x16, 0x97, 0x84, 0x66, 0x8D, 0x03, 0x45, 0x3B, 0x1C, 0xA5, 0x3E, 0xF7, + 0xA3, 0x62, 0x99, 0x63, 0x66, 0x71, 0xBB, 0x6F, 0xDE, 0xF4, 0xF6, 0x5E, + 0xF9, 0xF5, 0xA6, 0xE7, 0xE8, 0xA0, 0x04, 0x0F, 0x50, 0x92, 0x5C, 0xD2, + 0x98, 0x8F, 0x5D, 0xE0, 0x74, 0xD6, 0x8F, 0xBE, 0x8E, 0x70, 0x5A, 0xA2, + 0x7E, 0xB4, 0x12, 0xBF, 0xF9, 0xB0, 0xBD, 0x9E, 0xAF, 0xC9, 0x7A, 0x86, + 0x7E, 0xB4, 0x0F, 0x3C, 0x38, 0x4B, 0x3A, 0xD4, 0xF7, 0x3D, 0x79, 0x78, + 0x9E, 0xBE, 0xCD, 0x0C, 0x8E, 0xBE, 0xBD, 0xEE, 0x14, 0xBE, 0xA1, 0xA5, + 0x19, 0x9F, 0xAD, 0x53, 0xD4, 0x25, 0xDC, 0x17, 0xDF, 0x96, 0xBC, 0x63, + 0x1D, 0x27, 0x71, 0x6A, 0x7D, 0xC4, 0x1F, 0xB4, 0x9B, 0xF4, 0xC7, 0x06, + 0x8D, 0x9F, 0x62, 0xDB, 0x82, 0x83, 0x79, 0x29, 0xB1, 0x01, 0x29, 0xD4, + 0x94, 0x09, 0xF7, 0x95, 0xAB, 0x11, 0x1D, 0x05, 0x89, 0x54, 0x43, 0xCD, + 0x70, 0xB9, 0x64, 0x99, 0x20, 0xEF, 0x5C, 0x51, 0x1B, 0x89, 0x9B, 0x28, + 0x1A, 0x50, 0x6F, 0x53, 0x51, 0x1B, 0x89, 0x81, 0xA2, 0xFD, 0xE8, 0x5B, + 0xAD, 0xAE, 0x01, 0x83, 0xD2, 0xF5, 0x5B, 0xA7, 0xB5, 0x80, 0x0F, 0x6B, + 0xE3, 0x6F, 0x13, 0x87, 0x06, 0xD4, 0x5B, 0x73, 0xE8, 0x82, 0x26, 0x38, + 0x9D, 0xD2, 0x8F, 0x94, 0xA5, 0x89, 0x4D, 0x17, 0xD0, 0xF2, 0x29, 0xA5, + 0x1B, 0x39, 0x55, 0x62, 0x6D, 0xD3, 0x86, 0x07, 0xDC, 0x58, 0x45, 0x99, + 0xFA, 0x5D, 0x5F, 0x02, 0x52, 0x9C, 0xDD, 0x97, 0xF3, 0x7E, 0x04, 0xC6, + 0xB8, 0x4A, 0x57, 0x6C, 0x5D, 0x33, 0xC2, 0xBE, 0x5F, 0x11, 0x1B, 0xAB, + 0x4D, 0x75, 0xB4, 0x0E, 0x03, 0x10, 0x34, 0x5E, 0xB7, 0x18, 0x3E, 0xC3, + 0xF0, 0xB5, 0x6B, 0xEA, 0xD6, 0x8D, 0x5A, 0xB7, 0x62, 0x3E, 0xC3, 0xA8, + 0xB5, 0x0B, 0x6F, 0xBD, 0x51, 0x5D, 0x86, 0x6F, 0x75, 0x1D, 0x7E, 0x96, + 0x35, 0x4D, 0xAB, 0xF3, 0xF6, 0x0D, 0x79, 0x7A, 0xD5, 0x7D, 0x86, 0x59, + 0x1B, 0x2C, 0xE1, 0xDB, 0xB5, 0xB0, 0xC0, 0xF8, 0x8B, 0xD5, 0xE8, 0x9C, + 0xA2, 0x94, 0x6B, 0x23, 0x7F, 0x31, 0xF9, 0x0B, 0xD4, 0x54, 0x70, 0xF3, + 0x69, 0x43, 0x8B, 0xD7, 0x08, 0xB7, 0x25, 0xA6, 0x79, 0x94, 0x83, 0xAD, + 0xA6, 0x22, 0x28, 0xEB, 0x15, 0x06, 0x4F, 0xDF, 0x67, 0x58, 0xDC, 0x2C, + 0x64, 0x7F, 0xEB, 0x06, 0x79, 0x45, 0xE1, 0xA5, 0x06, 0x35, 0x0B, 0xF9, + 0x01, 0xC1, 0xEA, 0xD5, 0x95, 0x67, 0x9B, 0x52, 0x53, 0x56, 0xEA, 0x65, + 0x74, 0x6D, 0x46, 0x58, 0x08, 0x5E, 0x91, 0x61, 0x4F, 0x89, 0x3A, 0xD8, + 0xB6, 0x75, 0xA5, 0x97, 0x01, 0xBA, 0xF3, 0xAA, 0x68, 0x5E, 0x21, 0xDB, + 0xC2, 0xFE, 0xA5, 0x70, 0x1B, 0xFD, 0xB5, 0xCA, 0x85, 0x64, 0xDB, 0x51, + 0xCE, 0x8B, 0x6E, 0xFE, 0xB9, 0x5E, 0xB7, 0x9A, 0x28, 0x96, 0xB4, 0x1D, + 0x6B, 0xE7, 0x45, 0x5A, 0xB3, 0xEB, 0x42, 0x32, 0x1E, 0x82, 0x5D, 0x2B, + 0xF7, 0x08, 0x3D, 0xFB, 0x94, 0x5E, 0x41, 0x07, 0xFF, 0xBC, 0xA6, 0xBF, + 0x91, 0xB3, 0xB1, 0xE9, 0x17, 0x25, 0xBB, 0xB5, 0x53, 0x30, 0xFC, 0xB5, + 0xBC, 0x44, 0x77, 0x38, 0xED, 0xF8, 0x0C, 0xAC, 0x32, 0xCC, 0x0F, 0x3A, + 0x01, 0x9B, 0xCD, 0x08, 0x5B, 0x4C, 0xCA, 0x55, 0x8A, 0xAB, 0x5B, 0xC9, + 0x42, 0x80, 0x8F, 0x04, 0xF8, 0x1D, 0xEC, 0x20, 0x25, 0x19, 0x10, 0x90, + 0x59, 0x94, 0xF1, 0x10, 0x97, 0x14, 0xE5, 0x1C, 0x67, 0x1C, 0xD6, 0xD3, + 0xF4, 0x57, 0xD7, 0xC7, 0x17, 0x60, 0xA0, 0xA0, 0x1F, 0x64, 0xF8, 0x51, + 0xF2, 0xF4, 0x84, 0x9C, 0xC2, 0xC8, 0x51, 0xDC, 0x80, 0x12, 0xA1, 0x68, + 0x4A, 0x2A, 0x80, 0x3B, 0xCF, 0x9D, 0x33, 0x9A, 0xD9, 0xA4, 0x9D, 0xC1, + 0x43, 0x83, 0xE1, 0x9E, 0x8B, 0x44, 0x82, 0xC1, 0xC7, 0x77, 0x56, 0x84, + 0x66, 0xEE, 0x58, 0x61, 0xE1, 0x51, 0xF2, 0xCD, 0xEE, 0x12, 0x73, 0xCA, + 0xF1, 0x45, 0x3F, 0x4A, 0x72, 0xF2, 0x7C, 0xDD, 0x95, 0xA4, 0x40, 0x46, + 0xAB, 0xE9, 0x04, 0x67, 0xDC, 0x87, 0xA3, 0x41, 0xBA, 0x44, 0xD1, 0x5E, + 0xF4, 0x80, 0x59, 0x01, 0x26, 0x1D, 0x0C, 0xF6, 0xA3, 0x13, 0x5C, 0xA2, + 0xD7, 0x8F, 0xD0, 0x8A, 0x8E, 0x10, 0xAA, 0x43, 0xB4, 0xC0, 0xAC, 0x05, + 0x85, 0xAC, 0xAC, 0x01, 0x9F, 0x2A, 0xEE, 0xC6, 0x68, 0x87, 0xA7, 0xED, + 0x5B, 0x0B, 0x3E, 0x1C, 0xBD, 0xED, 0xB7, 0x1C, 0x21, 0x5E, 0xD1, 0x88, + 0x53, 0x54, 0x14, 0x61, 0xED, 0x50, 0xCF, 0x43, 0xC0, 0x89, 0x30, 0xE1, + 0xDF, 0xDC, 0x70, 0xA5, 0x21, 0x4F, 0x5D, 0x2B, 0x01, 0xF2, 0xFA, 0x65, + 0xE7, 0xF3, 0x42, 0xAA, 0x77, 0x36, 0x75, 0x46, 0x70, 0x9A, 0x5C, 0xCF, + 0xFE, 0x43, 0x78, 0xF6, 0x1F, 0x45, 0x19, 0x49, 0x2B, 0x04, 0x10, 0xAD, + 0x97, 0xA2, 0x0F, 0xAA, 0x21, 0x28, 0x9E, 0x92, 0xC0, 0x09, 0xAE, 0x59, + 0x39, 0xA7, 0x06, 0x25, 0xCD, 0x7A, 0xD5, 0x37, 0x17, 0xD1, 0x50, 0x2B, + 0x10, 0x7B, 0x9F, 0xA2, 0xCC, 0xA6, 0xDE, 0x0C, 0xB1, 0x48, 0x96, 0xB4, + 0xCA, 0x62, 0x5B, 0x4B, 0x4B, 0x59, 0xB4, 0x77, 0xE0, 0x54, 0xBA, 0x2E, + 0x95, 0x1D, 0xE3, 0x50, 0x83, 0x0C, 0x37, 0xAB, 0xDB, 0x40, 0xCD, 0x15, + 0xAE, 0xEA, 0xEB, 0xC4, 0x8C, 0x08, 0x35, 0x53, 0x73, 0x32, 0x31, 0x45, + 0x02, 0x06, 0xE5, 0xBE, 0x7D, 0x03, 0x8D, 0x68, 0xB5, 0x92, 0xA8, 0x52, + 0x07, 0xCB, 0xD5, 0x51, 0xE4, 0x2C, 0x30, 0x15, 0xF3, 0x64, 0x8C, 0x68, + 0xD3, 0x4A, 0xB6, 0xC4, 0x9B, 0x3B, 0xE2, 0x60, 0xE3, 0x29, 0x56, 0x73, + 0x6B, 0x16, 0x30, 0x0E, 0xD4, 0xAE, 0x83, 0x1F, 0xBB, 0xED, 0xD5, 0xAA, + 0x33, 0x86, 0xF1, 0x74, 0x95, 0x63, 0x58, 0x7A, 0x6E, 0x30, 0x4A, 0x30, + 0x7B, 0xBD, 0x68, 0xBE, 0x96, 0xD7, 0x8B, 0x56, 0x0B, 0xBB, 0x40, 0x72, + 0xA0, 0xAD, 0x6A, 0x30, 0xBD, 0x6F, 0x35, 0x18, 0x6A, 0x9A, 0x9C, 0xEF, + 0xD7, 0x56, 0xB5, 0x57, 0x95, 0x35, 0x50, 0xA1, 0x8D, 0x98, 0x5B, 0x53, + 0x1C, 0xEB, 0x12, 0x2E, 0xA5, 0x28, 0x39, 0x63, 0x74, 0x31, 0x9D, 0x9E, + 0xD9, 0x8C, 0x27, 0x7C, 0x7F, 0xC7, 0x2B, 0x3E, 0x57, 0x7D, 0x8E, 0x58, + 0xCC, 0x3B, 0xD9, 0xA2, 0xBA, 0x5A, 0xAB, 0x76, 0x08, 0xF8, 0xA1, 0x87, + 0x50, 0x2C, 0x2E, 0x2A, 0x67, 0x18, 0xB0, 0xE7, 0xE9, 0x2A, 0x9F, 0x17, + 0x9C, 0x66, 0x9D, 0x30, 0x93, 0xA6, 0x1D, 0xB8, 0x40, 0xE7, 0x7A, 0x63, + 0xB2, 0xF7, 0x3C, 0xDF, 0x84, 0xB9, 0xDA, 0x94, 0xAC, 0x35, 0x89, 0x35, + 0x44, 0xF1, 0xDC, 0x66, 0x15, 0x04, 0xD8, 0x68, 0xC5, 0xBD, 0x42, 0x62, + 0xE1, 0x03, 0x81, 0x55, 0x82, 0x9B, 0x24, 0xA8, 0xC0, 0x75, 0x45, 0x54, + 0xE3, 0xDA, 0x93, 0xE1, 0xE7, 0xAC, 0x72, 0xA4, 0xF8, 0xB9, 0xDB, 0x5E, + 0x2B, 0x04, 0x7A, 0xFC, 0xAB, 0x2C, 0xF3, 0x29, 0x2A, 0xBE, 0xB4, 0xD3, + 0x68, 0x68, 0x69, 0xAA, 0xDD, 0xD6, 0x8F, 0xE3, 0xC9, 0x87, 0x9B, 0x4B, + 0xA8, 0xDE, 0x1E, 0x10, 0x0D, 0xD3, 0x10, 0x36, 0x5C, 0xB2, 0x34, 0x6A, + 0xCF, 0xB8, 0xDF, 0x0A, 0x9A, 0xBD, 0x47, 0xAC, 0x68, 0xB1, 0x1E, 0x59, + 0x91, 0xB2, 0x0E, 0xC9, 0x42, 0x64, 0xA1, 0x6E, 0x93, 0x25, 0xAB, 0x91, + 0xC5, 0x75, 0x53, 0x93, 0xDC, 0x42, 0xA4, 0x0B, 0x4F, 0xC7, 0x29, 0x17, + 0x64, 0x55, 0x82, 0xA1, 0x00, 0x40, 0xBD, 0x39, 0x23, 0x62, 0x0B, 0xE5, + 0xD4, 0x0D, 0x27, 0xD7, 0xFE, 0xE4, 0x8E, 0x50, 0x81, 0x01, 0x74, 0x93, + 0x55, 0x51, 0xE2, 0x85, 0x2C, 0x55, 0x15, 0x36, 0x27, 0x07, 0x04, 0x1B, + 0xE2, 0x2A, 0x04, 0x8E, 0x96, 0xA3, 0x72, 0x36, 0x41, 0x60, 0xEA, 0xCD, + 0x76, 0x4D, 0xC7, 0x19, 0x28, 0x31, 0xA5, 0x81, 0x05, 0x7C, 0x51, 0x47, + 0x77, 0x29, 0xFF, 0x35, 0x4B, 0xD1, 0xBD, 0x9E, 0x90, 0x9E, 0x7C, 0x38, + 0x52, 0x40, 0x0A, 0x05, 0x21, 0xB0, 0xE9, 0xB7, 0xC9, 0xF5, 0xF8, 0xF6, + 0x62, 0x3C, 0x3A, 0x1D, 0x4F, 0xA3, 0x5F, 0x6A, 0x91, 0x93, 0xEB, 0x9B, + 0xE9, 0xED, 0xBF, 0x4F, 0xFF, 0x3B, 0x89, 0x76, 0xEB, 0x5D, 0xEB, 0x86, + 0x62, 0xA6, 0x3C, 0x14, 0x28, 0x03, 0x7C, 0xC1, 0x2C, 0x14, 0xE8, 0x01, + 0x57, 0x6C, 0xF0, 0x1D, 0xDB, 0x4D, 0xFD, 0xB9, 0x44, 0xAB, 0x36, 0xB2, + 0xD3, 0x88, 0xAA, 0x6C, 0x72, 0x04, 0xF4, 0xA7, 0xD8, 0xE3, 0x6C, 0x61, + 0x8B, 0x03, 0x27, 0x92, 0x88, 0x95, 0x04, 0x34, 0x1C, 0x2E, 0xD3, 0xF4, + 0x70, 0xB4, 0x95, 0x9D, 0xC8, 0x84, 0xB2, 0x72, 0xC2, 0xE3, 0x10, 0x07, + 0x47, 0x63, 0x39, 0x23, 0x94, 0x91, 0x72, 0xD5, 0xD4, 0xB2, 0x36, 0xF1, + 0xED, 0x07, 0xAC, 0x1D, 0x6F, 0x4F, 0x1E, 0xB3, 0xA4, 0xF1, 0x26, 0xC0, + 0xFA, 0x53, 0xC1, 0x7A, 0x46, 0x7D, 0x26, 0xE8, 0x1F, 0x0A, 0x76, 0x6E, + 0x85, 0x3C, 0xA2, 0xFC, 0x98, 0x3D, 0xDB, 0x8A, 0x7A, 0xC6, 0x0D, 0xAC, + 0xA8, 0x29, 0x90, 0xB2, 0x2C, 0x8A, 0x2A, 0xF5, 0xC7, 0xED, 0xF1, 0x64, + 0x78, 0x3A, 0x1E, 0x5D, 0x8C, 0xCF, 0x4D, 0x14, 0x7A, 0xE8, 0xD1, 0x69, + 0x88, 0x6F, 0x79, 0x5F, 0x72, 0xCE, 0x50, 0x3E, 0x27, 0x71, 0xF1, 0x9E, + 0xD1, 0xBC, 0x9D, 0x1A, 0xE3, 0x4A, 0xAC, 0x94, 0x1A, 0x17, 0xF9, 0xF7, + 0xAE, 0x38, 0xDD, 0x9D, 0x69, 0x30, 0x58, 0xFF, 0x4D, 0x18, 0x5E, 0x91, + 0x8C, 0x47, 0x9D, 0xF8, 0xF9, 0xF5, 0x0A, 0x41, 0x04, 0xF2, 0x9F, 0x4D, + 0xD5, 0xE4, 0x84, 0x2E, 0xB3, 0xA4, 0xA8, 0x65, 0xDE, 0x77, 0xF9, 0x75, + 0x60, 0x77, 0x9C, 0x8F, 0x70, 0x03, 0x0B, 0xC7, 0xF6, 0x0A, 0x96, 0xDA, + 0x91, 0xF0, 0xC2, 0x96, 0x79, 0xF7, 0xB2, 0x74, 0x6E, 0x3A, 0xEA, 0x7E, + 0x0B, 0x2C, 0x06, 0x08, 0xB7, 0xBB, 0xEE, 0xFE, 0x94, 0x67, 0xB4, 0x9F, + 0xAF, 0xB5, 0xCE, 0xEB, 0xE8, 0x04, 0xE0, 0x86, 0xCB, 0xC3, 0xEC, 0xEA, + 0xBE, 0xA5, 0xA5, 0xDC, 0x88, 0xAB, 0xE4, 0x98, 0xC1, 0x74, 0x90, 0x5E, + 0x75, 0x9D, 0x74, 0x4B, 0xF1, 0x51, 0x5F, 0x2C, 0x83, 0x66, 0x52, 0x9E, + 0x8B, 0x4B, 0x0B, 0xA7, 0xD0, 0xB2, 0xC9, 0x3D, 0xA9, 0x8D, 0x11, 0xE6, + 0xA0, 0xF4, 0x66, 0x57, 0x84, 0x59, 0xC0, 0xA1, 0x5F, 0x84, 0xB8, 0xF4, + 0xFA, 0x75, 0x48, 0xCF, 0x17, 0xF2, 0xD7, 0x77, 0x01, 0x94, 0xB2, 0x8A, + 0x40, 0x96, 0x27, 0xC0, 0x69, 0x04, 0x7B, 0x4E, 0x98, 0x39, 0x24, 0x6F, + 0x4C, 0x07, 0xDE, 0xFE, 0x29, 0x5B, 0x9C, 0x62, 0xC4, 0xA4, 0x72, 0x93, + 0x12, 0xC5, 0x5F, 0x94, 0xA1, 0x0D, 0x7A, 0xF3, 0xC5, 0xA4, 0xBB, 0x14, + 0x57, 0x7E, 0x67, 0xE8, 0x6E, 0xCC, 0xE7, 0x54, 0x55, 0x2C, 0xB2, 0x40, + 0xF7, 0x50, 0x96, 0x51, 0x9A, 0xDE, 0x71, 0xF5, 0x9C, 0xC4, 0x9E, 0x01, + 0xC1, 0xC9, 0x72, 0x36, 0xE3, 0x5B, 0x46, 0xD9, 0xA2, 0x9F, 0xCF, 0xBE, + 0x42, 0x68, 0xDF, 0xAB, 0x72, 0xA7, 0x70, 0xD2, 0x20, 0x87, 0xFA, 0x5D, + 0x30, 0x44, 0x14, 0x8C, 0xD1, 0xB9, 0x85, 0x75, 0x91, 0xF5, 0x12, 0x9B, + 0x54, 0xA4, 0x78, 0xA6, 0xD5, 0xC8, 0xEE, 0xD0, 0x94, 0x9C, 0xE6, 0x72, + 0xB8, 0xF7, 0x90, 0xD5, 0x3B, 0x72, 0x3F, 0xD6, 0x9C, 0x53, 0x0D, 0x89, + 0xD8, 0x13, 0xFB, 0xA8, 0x01, 0xC3, 0xEA, 0x5A, 0x64, 0x98, 0x1D, 0x5D, + 0x1A, 0xB0, 0x2C, 0xE6, 0xAE, 0x05, 0x51, 0x6E, 0x37, 0xFA, 0x2F, 0xB5, + 0x83, 0x64, 0x7C, 0x93, 0x58, 0xFA, 0x76, 0xF4, 0xB5, 0xE0, 0x4E, 0xAD, + 0x91, 0x1E, 0x6C, 0xCF, 0x1E, 0xDE, 0xC1, 0x44, 0x84, 0x27, 0xC6, 0x92, + 0x15, 0xF0, 0x89, 0xAF, 0xC2, 0x39, 0x22, 0xAC, 0x08, 0xA7, 0x28, 0x4A, + 0xA8, 0x28, 0x76, 0xBC, 0x3A, 0x2A, 0xD2, 0xA3, 0x23, 0x39, 0xB0, 0x29, + 0x8E, 0x6B, 0xA6, 0xB8, 0x1F, 0xE9, 0x23, 0xD2, 0xDE, 0x1D, 0xC3, 0xE8, + 0x8B, 0xF8, 0xA8, 0xEA, 0xA1, 0xB3, 0x3F, 0xEE, 0xC6, 0x63, 0x4F, 0x56, + 0xE6, 0x36, 0xEA, 0xCD, 0x93, 0x83, 0x74, 0xD1, 0x39, 0x4C, 0xC8, 0xA2, + 0x9D, 0x9E, 0x81, 0x0B, 0xAA, 0x74, 0x0B, 0x1C, 0xB6, 0xA5, 0x3E, 0x61, + 0x8B, 0x6D, 0x42, 0xC3, 0x52, 0xE8, 0xF7, 0x4D, 0xF5, 0x44, 0xDB, 0x2C, + 0xB1, 0x15, 0x95, 0x6A, 0x28, 0x7E, 0x40, 0xC5, 0xAC, 0xAA, 0xD5, 0x48, + 0xF8, 0x43, 0x2A, 0x60, 0x45, 0xBF, 0x75, 0xA4, 0x10, 0x29, 0xED, 0x67, + 0x64, 0xCC, 0x48, 0x5E, 0x8E, 0x69, 0x82, 0x5B, 0x4A, 0x4C, 0x23, 0xCF, + 0x79, 0x57, 0xF7, 0xD6, 0xC7, 0xF0, 0x2C, 0xFD, 0x39, 0x6E, 0x20, 0x74, + 0xB0, 0x11, 0x8C, 0x69, 0x96, 0xD9, 0x8D, 0x20, 0x1F, 0x97, 0xC5, 0xE2, + 0x16, 0x41, 0x9F, 0xF7, 0xE8, 0x09, 0xD7, 0x23, 0x29, 0xE4, 0xAD, 0x02, + 0x77, 0x37, 0x88, 0xCA, 0x92, 0x4D, 0x58, 0xAC, 0x6E, 0xCC, 0x0C, 0x6E, + 0x6F, 0x01, 0x30, 0x86, 0xBF, 0xE8, 0x8C, 0x3E, 0x19, 0x01, 0xD1, 0x67, + 0x9F, 0x61, 0x54, 0x94, 0x70, 0x90, 0x02, 0x8E, 0xF6, 0x19, 0xCC, 0x08, + 0x9F, 0xD5, 0xE6, 0x40, 0x8B, 0x87, 0x63, 0x75, 0xCD, 0x69, 0xD6, 0x40, + 0x6F, 0x43, 0x7E, 0xCC, 0xB1, 0x97, 0x24, 0xB3, 0x17, 0xB4, 0x15, 0xAB, + 0x56, 0x5E, 0x73, 0x07, 0xC7, 0xC4, 0x5D, 0x96, 0xC3, 0x35, 0x6F, 0xF7, + 0x9F, 0xF5, 0x6A, 0x5E, 0x5F, 0xFE, 0xF2, 0x9C, 0xA5, 0x77, 0x44, 0xBA, + 0x09, 0x99, 0xD5, 0xFF, 0x69, 0x15, 0x9E, 0xE9, 0x35, 0x32, 0xDC, 0xC7, + 0x2F, 0xF0, 0xA2, 0x96, 0xE5, 0x0A, 0x2F, 0xEE, 0xEC, 0xCA, 0xAA, 0xB8, + 0x64, 0x77, 0x0C, 0x1A, 0x70, 0x9D, 0x08, 0xCF, 0x70, 0xD8, 0xE4, 0x3B, + 0x41, 0x2C, 0x5D, 0xFE, 0x05, 0xAF, 0xFA, 0xD1, 0x03, 0x4A, 0xF5, 0x35, + 0x01, 0x98, 0xC1, 0x9A, 0xB0, 0xE0, 0x64, 0xD1, 0x67, 0xA7, 0x95, 0x01, + 0x4D, 0x34, 0xF4, 0x48, 0xF2, 0x4B, 0x44, 0x78, 0x74, 0x12, 0xCF, 0x71, + 0xB2, 0x4C, 0xF1, 0x87, 0x3C, 0x41, 0xA5, 0x6F, 0x52, 0x0F, 0xA7, 0x05, + 0x5E, 0x2F, 0xCD, 0xE9, 0x80, 0xEA, 0x2F, 0x1B, 0x74, 0x79, 0x5C, 0x74, + 0xAC, 0xCC, 0xF7, 0xA2, 0xF3, 0x22, 0x91, 0xBF, 0xC7, 0xE6, 0x55, 0x52, + 0xF5, 0xAC, 0x68, 0x53, 0xC6, 0xAA, 0x97, 0x0D, 0x01, 0xB8, 0x41, 0x72, + 0x75, 0xD4, 0x19, 0x99, 0xDB, 0x98, 0xED, 0x94, 0x61, 0x23, 0xAE, 0xD2, + 0x25, 0x19, 0xCC, 0x4F, 0x72, 0x11, 0xEC, 0x45, 0x57, 0x51, 0xAB, 0x97, + 0xBD, 0x26, 0x25, 0x23, 0xD9, 0x7D, 0x6D, 0x32, 0x82, 0xF4, 0x7A, 0x72, + 0x75, 0x9E, 0xD6, 0xC4, 0x24, 0xD1, 0xE1, 0x3B, 0x97, 0xA6, 0x91, 0x0A, + 0x3D, 0x52, 0xDB, 0x91, 0xA1, 0x8F, 0x6D, 0x5B, 0x8A, 0x0C, 0x2D, 0xAE, + 0x1A, 0x19, 0xF6, 0x7C, 0xF8, 0xEF, 0x7A, 0x9C, 0xDD, 0xF6, 0x2B, 0x07, + 0xB1, 0xD7, 0x6A, 0xE9, 0x65, 0x83, 0xDC, 0xB7, 0x55, 0x5E, 0x33, 0x08, + 0xF0, 0xDF, 0x6F, 0x5F, 0x03, 0x57, 0x6D, 0x60, 0xD7, 0x32, 0xA4, 0xA9, + 0x78, 0x37, 0x3E, 0x18, 0x0C, 0x6C, 0x3F, 0x5C, 0xBB, 0x87, 0xDD, 0xD9, + 0x7D, 0xD7, 0xC4, 0xD4, 0x45, 0x41, 0xFE, 0x7D, 0x91, 0xB6, 0x7C, 0x9B, + 0xC4, 0x48, 0x74, 0x2E, 0xB5, 0x19, 0x58, 0xF5, 0x2A, 0x89, 0x41, 0xFD, + 0x14, 0xB7, 0xDB, 0xB6, 0x7C, 0xD3, 0xE2, 0x01, 0x67, 0xA5, 0x78, 0xD1, + 0x51, 0x32, 0x8C, 0x16, 0xF6, 0x76, 0x9D, 0xEA, 0xBB, 0x72, 0xE9, 0xC7, + 0x23, 0xDF, 0xAF, 0xEE, 0x8D, 0x2F, 0x49, 0x21, 0xAF, 0xFA, 0x0B, 0x11, + 0xBE, 0x2C, 0xDD, 0xBF, 0x51, 0x06, 0x07, 0x4E, 0x70, 0x29, 0xF3, 0x8D, + 0x37, 0x00, 0x4E, 0xF1, 0x82, 0xAB, 0x00, 0x1D, 0xA2, 0xEC, 0x88, 0xEE, + 0x65, 0x1B, 0x41, 0xEE, 0x96, 0x25, 0xEE, 0x79, 0x6D, 0x9B, 0xBC, 0xC4, + 0x12, 0xA9, 0x5E, 0x48, 0x8D, 0xCB, 0xC9, 0x4F, 0xA5, 0x08, 0xC3, 0x65, + 0x49, 0xB9, 0xF5, 0xFD, 0xAA, 0xD4, 0xC2, 0x13, 0xBB, 0x81, 0x40, 0xD8, + 0x56, 0xFB, 0xB2, 0x78, 0xEF, 0x8E, 0xC7, 0x4B, 0x68, 0x3D, 0x37, 0x94, + 0x65, 0x19, 0x2A, 0xB2, 0xA0, 0xED, 0xE1, 0x9F, 0x36, 0x93, 0x23, 0xBB, + 0xAB, 0x40, 0x02, 0xAC, 0x86, 0x1B, 0x4B, 0x00, 0x62, 0x4F, 0xC2, 0x77, + 0x3D, 0x21, 0xFA, 0x40, 0xD9, 0x0A, 0x91, 0x23, 0xF0, 0xAC, 0x12, 0xD3, + 0x67, 0x7B, 0x60, 0x3D, 0x77, 0x0F, 0x72, 0xE6, 0x74, 0x08, 0x94, 0x38, + 0x37, 0x4C, 0x3D, 0x35, 0xE3, 0x3B, 0x8A, 0xEA, 0x7F, 0x61, 0x08, 0xFD, + 0x7E, 0x75, 0x79, 0x7B, 0x7A, 0x73, 0x73, 0x7D, 0xC3, 0xE7, 0x09, 0x89, + 0x97, 0xE4, 0x0D, 0x84, 0xA3, 0xEB, 0xF1, 0xA9, 0x3E, 0x22, 0xD4, 0x3A, + 0x0A, 0xD2, 0xBE, 0x54, 0x0B, 0x98, 0x55, 0x14, 0x49, 0x22, 0xD5, 0x3B, + 0xD7, 0x9C, 0x22, 0xB6, 0x78, 0xCB, 0x86, 0x89, 0xDB, 0x3C, 0x45, 0x0B, + 0x7F, 0xDA, 0xA0, 0xEA, 0xF0, 0x08, 0x3F, 0x90, 0x18, 0xC3, 0x2C, 0x3A, + 0x0B, 0x9E, 0xBC, 0xFE, 0x87, 0x8A, 0xF9, 0x47, 0x46, 0x78, 0xB9, 0xD0, + 0x58, 0x0B, 0x19, 0xB2, 0x55, 0x5E, 0x52, 0x73, 0xE1, 0xCF, 0xC0, 0x4D, + 0x6F, 0x7A, 0x42, 0xBF, 0xF6, 0x34, 0x9B, 0x6D, 0x7D, 0xC5, 0xD3, 0x9C, + 0x67, 0x69, 0x62, 0x90, 0x43, 0xCA, 0xE8, 0xB2, 0xE4, 0x61, 0x2A, 0x07, + 0x85, 0xB7, 0xED, 0x06, 0xE7, 0xBD, 0xF1, 0xD7, 0xD8, 0xC3, 0x51, 0x2D, + 0xFE, 0x70, 0x24, 0x05, 0xC8, 0x6A, 0x20, 0x2F, 0x61, 0x2A, 0x32, 0x09, + 0x3A, 0x4E, 0x50, 0xAE, 0x35, 0x94, 0x10, 0x65, 0x5C, 0x1D, 0x51, 0x2B, + 0x73, 0x35, 0x64, 0x94, 0x97, 0xD6, 0xF7, 0x29, 0x2A, 0xDB, 0xE9, 0xEE, + 0xF4, 0x3A, 0x03, 0x67, 0xA3, 0x5C, 0x62, 0x8C, 0xCF, 0x87, 0x32, 0x39, + 0x22, 0xFE, 0xE5, 0x23, 0x10, 0xBB, 0x43, 0xF7, 0x98, 0x2F, 0xA3, 0x29, + 0x96, 0x49, 0x75, 0x14, 0x72, 0xCA, 0x90, 0x04, 0xE0, 0x71, 0x9E, 0x2B, + 0x34, 0x7C, 0x52, 0x53, 0xCA, 0x3F, 0x1E, 0x67, 0x09, 0xA3, 0x24, 0x71, + 0x20, 0x17, 0xD7, 0x13, 0xC9, 0xB1, 0x4C, 0x08, 0x9D, 0xA0, 0x45, 0x9E, + 0x9A, 0x1A, 0xED, 0x81, 0x34, 0x87, 0x03, 0x1B, 0xD2, 0x98, 0xA2, 0x3A, + 0x84, 0x1A, 0x45, 0xC8, 0x3D, 0x61, 0xF4, 0xD1, 0x96, 0x7D, 0xFD, 0xA4, + 0x98, 0xD4, 0x63, 0xA0, 0x95, 0x82, 0x6A, 0xCD, 0x26, 0x68, 0x86, 0x18, + 0xE1, 0x4F, 0xBE, 0x0C, 0x8D, 0x1E, 0x11, 0x94, 0xD2, 0x7B, 0x85, 0x53, + 0x0F, 0x4A, 0x90, 0x7C, 0x0A, 0xA4, 0x4B, 0x20, 0x88, 0xF3, 0x00, 0x93, + 0xD1, 0xA5, 0x10, 0x77, 0x45, 0x1F, 0x08, 0xE6, 0xF3, 0xBB, 0x32, 0x3A, + 0xBB, 0x10, 0xC5, 0xE2, 0x80, 0x02, 0xE9, 0x0E, 0x06, 0x14, 0x84, 0x90, + 0xB9, 0xCE, 0x61, 0xB6, 0x78, 0x8D, 0xFB, 0x27, 0x4B, 0xA0, 0xBE, 0x95, + 0x2B, 0xB9, 0x9A, 0xC2, 0xDF, 0x35, 0x15, 0xD2, 0xF7, 0x09, 0x34, 0x47, + 0xD9, 0x4A, 0xFB, 0x5D, 0x3D, 0x86, 0x93, 0xA5, 0xC0, 0xDA, 0xF0, 0x13, + 0x92, 0xA6, 0x72, 0x53, 0xE3, 0x3E, 0x69, 0x1F, 0xCA, 0xC7, 0xD0, 0xB3, + 0x12, 0xAA, 0x25, 0x0C, 0xE7, 0x5C, 0x9B, 0x13, 0x4A, 0xC5, 0xA9, 0x94, + 0x0F, 0x08, 0x18, 0x2D, 0xC2, 0xF0, 0xF2, 0x44, 0xE3, 0x59, 0x15, 0x93, + 0x62, 0xA1, 0x99, 0x2D, 0x24, 0xE4, 0xB6, 0x18, 0xCD, 0x7E, 0xC6, 0xBB, + 0x95, 0x3B, 0x4A, 0xF5, 0x3D, 0x64, 0xFD, 0x18, 0x30, 0x6A, 0xB0, 0xE6, + 0x1A, 0xD3, 0x92, 0xCC, 0x48, 0x8C, 0xC0, 0xA1, 0x85, 0x62, 0xF5, 0x60, + 0x01, 0xBF, 0x87, 0xD3, 0x42, 0xA6, 0x28, 0xFF, 0x93, 0x6A, 0x5F, 0xCB, + 0x87, 0x80, 0x4D, 0x02, 0x0D, 0xFD, 0xA3, 0xD0, 0x5E, 0x33, 0xC8, 0xA7, + 0x90, 0x43, 0x42, 0xF5, 0x94, 0x0F, 0xE9, 0x22, 0xE7, 0x83, 0xDE, 0x91, + 0x94, 0x94, 0x2B, 0x93, 0xE3, 0x96, 0xC8, 0x4F, 0x71, 0x05, 0xE7, 0xED, + 0x75, 0x96, 0x4C, 0x1F, 0x31, 0x2E, 0x9D, 0x23, 0xA6, 0x9D, 0x92, 0xC7, + 0x4A, 0x3F, 0x5A, 0xB2, 0x74, 0x37, 0x90, 0x01, 0xFF, 0x06, 0x2E, 0xA7, + 0x05, 0x16, 0x1C, 0x2E, 0x99, 0x28, 0x02, 0x55, 0xD9, 0xE5, 0x71, 0x1C, + 0xE3, 0xA2, 0x98, 0xD2, 0x2F, 0x38, 0x73, 0x07, 0xD8, 0x8D, 0xEA, 0x39, + 0x60, 0xBB, 0xE6, 0xD3, 0xD5, 0x93, 0x15, 0x97, 0xF4, 0xFE, 0x1E, 0x27, + 0x17, 0x59, 0x54, 0xDB, 0x34, 0x84, 0x4A, 0xA3, 0x4C, 0x2A, 0xDC, 0x20, + 0x6E, 0x72, 0x3A, 0x99, 0x5C, 0x5C, 0x8F, 0x6F, 0x47, 0x17, 0xA3, 0xDB, + 0xCB, 0xEB, 0xF3, 0x8B, 0xB1, 0xEF, 0xF6, 0xC1, 0xF4, 0xE3, 0xE9, 0xE9, + 0xF4, 0x76, 0xF2, 0x61, 0x38, 0xE4, 0x84, 0x67, 0x1F, 0x2E, 0xA3, 0x5F, + 0xA2, 0x83, 0xB5, 0x42, 0xC6, 0xD7, 0xD3, 0x5A, 0x41, 0xD5, 0x81, 0x40, + 0x52, 0x45, 0x14, 0xAF, 0x0C, 0xC4, 0x77, 0x97, 0x20, 0x81, 0x2F, 0xD9, + 0xB8, 0xA4, 0x84, 0xF7, 0x2A, 0x59, 0x18, 0x1E, 0x92, 0xEF, 0x52, 0xE1, + 0x8A, 0x4F, 0x4F, 0x6A, 0xF7, 0x39, 0x32, 0x72, 0xFD, 0x68, 0x71, 0x1C, + 0xCC, 0x7D, 0x66, 0xE2, 0xC6, 0x28, 0xF1, 0xAA, 0xE1, 0xC3, 0xA1, 0x61, + 0x4A, 0x42, 0xC9, 0xCA, 0xE2, 0xDA, 0xD9, 0xBA, 0xA5, 0x69, 0x32, 0x81, + 0x16, 0xB6, 0x56, 0x89, 0xC2, 0x62, 0x6A, 0x03, 0xD2, 0x61, 0x33, 0xEE, + 0x55, 0xDD, 0x98, 0x1E, 0x7C, 0xD7, 0xF5, 0x8A, 0xEA, 0x11, 0x9F, 0x9A, + 0x47, 0x9E, 0x92, 0x4F, 0x52, 0xDA, 0xA8, 0xA8, 0x78, 0xB4, 0xD9, 0x8D, + 0x6B, 0x7D, 0x0C, 0xC3, 0xFE, 0xF5, 0x7D, 0x43, 0x49, 0x9F, 0x84, 0x82, + 0x70, 0x3E, 0xA9, 0x0D, 0xB5, 0x53, 0x00, 0xE7, 0xB9, 0x4D, 0x52, 0x02, + 0x7F, 0x37, 0x7B, 0x4B, 0x4F, 0x64, 0xAB, 0x7F, 0x98, 0x7B, 0x85, 0x32, + 0xDE, 0x80, 0xB0, 0x36, 0x1A, 0x55, 0x99, 0x3B, 0x8F, 0xBC, 0xD7, 0x3B, + 0x4F, 0xE9, 0x1D, 0xFF, 0xE8, 0xED, 0xCE, 0xE8, 0xDD, 0x9F, 0x7D, 0xF1, + 0x0C, 0xBD, 0x7A, 0x65, 0x2B, 0x21, 0x4F, 0x10, 0x22, 0x07, 0xAE, 0x59, + 0x24, 0xC2, 0xD8, 0x2C, 0x16, 0x4D, 0xC1, 0xC4, 0xFB, 0x5F, 0xA7, 0x5B, + 0x82, 0x0D, 0x9C, 0x01, 0xC3, 0x6B, 0x06, 0x8F, 0x50, 0xFE, 0x63, 0x36, + 0x5A, 0x8A, 0xFE, 0xFF, 0xC8, 0xD5, 0x51, 0xFE, 0x31, 0x80, 0x21, 0xEC, + 0x47, 0xB5, 0x7C, 0x5C, 0x67, 0x1F, 0x0E, 0x57, 0xBE, 0x19, 0x9D, 0x11, + 0x58, 0x79, 0x4F, 0x33, 0x78, 0xBD, 0x90, 0x3C, 0x4F, 0x70, 0x8D, 0x80, + 0xBA, 0x41, 0x5E, 0xA4, 0x74, 0xD1, 0xAC, 0xB4, 0x6C, 0xEA, 0x2F, 0xB2, + 0x19, 0x7D, 0xA9, 0xD6, 0x15, 0x09, 0x70, 0x26, 0xA1, 0xCA, 0x1B, 0xF4, + 0xA5, 0xCE, 0xDF, 0xE7, 0xF0, 0xC7, 0x41, 0x4A, 0x66, 0x38, 0x5E, 0xC5, + 0xFA, 0xD6, 0x9B, 0x45, 0xC0, 0xBF, 0xCF, 0xD4, 0xB8, 0x9A, 0xA2, 0xA1, + 0xF7, 0x7B, 0x17, 0x23, 0x9B, 0x0A, 0xF2, 0xF4, 0xC3, 0x2F, 0xD1, 0x85, + 0x6D, 0x89, 0x9D, 0xB1, 0x3E, 0x69, 0xE6, 0xE8, 0xB3, 0xCA, 0xE1, 0x5E, + 0x6F, 0x3D, 0x95, 0xCD, 0xDA, 0x02, 0x06, 0x09, 0xEE, 0xEA, 0x18, 0x9C, + 0xA7, 0x8C, 0x7A, 0xD1, 0xA2, 0x05, 0x93, 0xEC, 0x81, 0xAF, 0xC3, 0x9B, + 0x1A, 0x25, 0x8F, 0xCC, 0x9E, 0x6F, 0x8F, 0xFC, 0x87, 0x0B, 0x96, 0x5C, + 0xEF, 0xBA, 0xD5, 0x6D, 0x1C, 0xA3, 0x1E, 0x81, 0xBD, 0xBD, 0xBC, 0x8E, + 0x63, 0x89, 0xCD, 0x65, 0x1C, 0x43, 0xE6, 0x1C, 0xF8, 0x39, 0x1B, 0x61, + 0x9D, 0x6E, 0xFF, 0xF8, 0x3F, }; #endif diff --git a/src/moai-android-adcolony/java/build.gradle b/src/moai-android-adcolony/java/build.gradle index 94b119e6ec..8641aa4542 100644 --- a/src/moai-android-adcolony/java/build.gradle +++ b/src/moai-android-adcolony/java/build.gradle @@ -23,11 +23,11 @@ android { } } } - +/* moai { nativeLib "moai-android-adcolony" } - +*/ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.1.1' diff --git a/src/moai-android-deltadna/MOAIDeltaDNAAndroid.cpp b/src/moai-android-deltadna/MOAIDeltaDNAAndroid.cpp new file mode 100644 index 0000000000..6f45fe91d8 --- /dev/null +++ b/src/moai-android-deltadna/MOAIDeltaDNAAndroid.cpp @@ -0,0 +1,66 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "moai-core/pch.h" +#include "moai-sim/pch.h" + +#include + +#include +#include + +extern JavaVM* jvm; + +//================================================================// +// lua +//================================================================// + +//----------------------------------------------------------------// +/** @lua initialize + @text Initialize DeltaDNA sdk + + @in string clientVersion + @in bool debugMode + @out void +*/ +int MOAIDeltaDNAAndroid::_initialize ( lua_State* L ) { + MOAI_JAVA_LUA_SETUP ( MOAIDeltaDNAAndroid, "" ) + + MOAIJString clientVersion = self->GetJString ( lua_tostring ( state, 1 )); + bool debugMode = lua_toboolean ( state, 2 ); + + self->CallStaticVoidMethod ( self->mJava_Initialize, ( jstring ) clientVersion, ( jboolean ) debugMode ); + //self->CallStaticVoidMethod ( self->mJava_Initialize ); + return 1; +} + +//================================================================// +// MOAIDeltaDNAAndroid +//================================================================// + +//----------------------------------------------------------------// +MOAIDeltaDNAAndroid::MOAIDeltaDNAAndroid () { + + RTTI_SINGLE ( MOAIGlobalEventSource ) + + this->SetClass ( "com/moaisdk/deltadna/MoaiDeltaDNA" ); + + this->mJava_Initialize = this->GetStaticMethod ( "initialize", "(Ljava/lang/String;Z)V" ); + //this->mJava_Initialize = this->GetStaticMethod ( "initialize", "()V" ); +} + +//----------------------------------------------------------------// +MOAIDeltaDNAAndroid::~MOAIDeltaDNAAndroid () { + +} + +//----------------------------------------------------------------// +void MOAIDeltaDNAAndroid::RegisterLuaClass ( MOAILuaState& state ) { + + luaL_Reg regTable [] = { + { "initialize", _initialize }, + { NULL, NULL } + }; + + luaL_register ( state, 0, regTable ); +} \ No newline at end of file diff --git a/src/moai-android-deltadna/MOAIDeltaDNAAndroid.h b/src/moai-android-deltadna/MOAIDeltaDNAAndroid.h new file mode 100644 index 0000000000..72338d781b --- /dev/null +++ b/src/moai-android-deltadna/MOAIDeltaDNAAndroid.h @@ -0,0 +1,45 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIDELTADNAANDROID_H +#define MOAIDELTADNAANDROID_H + +#include +#include + +//================================================================// +// MOAIDeltaDNAAndroid +//================================================================// +/** @lua MOAIDeltaDNAAndroid + @text Wrapper for Facebook integration on Android devices. + Facebook provides social integration for sharing on + www.facebook.com. Exposed to Lua via MOAIFacebook on + all mobile platforms. + + @const DIALOG_DID_COMPLETE Event code for a successfully completed Facebook dialog. + @const DIALOG_DID_NOT_COMPLETE Event code for a failed (or canceled) Facebook dialog. + @const REQUEST_RESPONSE Event code for graph request responses. + @const REQUEST_RESPONSE_FAILED Event code for failed graph request responses. + @const SESSION_DID_LOGIN Event code for a successfully completed Facebook login. + @const SESSION_DID_NOT_LOGIN Event code for a failed (or canceled) Facebook login. +*/ +class MOAIDeltaDNAAndroid : + public MOAIGlobalClass < MOAIDeltaDNAAndroid, MOAIGlobalEventSource >, + public JniUtils { +private: + + jmethodID mJava_Initialize; + + //----------------------------------------------------------------// + static int _initialize ( lua_State* L ); + +public: + + DECL_LUA_SINGLETON ( MOAIDeltaDNAAndroid ); + + MOAIDeltaDNAAndroid (); + ~MOAIDeltaDNAAndroid (); + void RegisterLuaClass ( MOAILuaState& state ); +}; + +#endif //MOAIDELTADNAANDROID_H diff --git a/src/moai-android-deltadna/host.cpp b/src/moai-android-deltadna/host.cpp new file mode 100644 index 0000000000..17e4494f69 --- /dev/null +++ b/src/moai-android-deltadna/host.cpp @@ -0,0 +1,34 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +// From moai-box2d's pch.h +#include +#include +#include +#include +#include + +// We need to know what's configured as well? +#include + +#include +#include + +//================================================================// +// aku +//================================================================// + +//----------------------------------------------------------------// +void AKUAndroidDeltaDNAAppFinalize () { +} + +//----------------------------------------------------------------// +void AKUAndroidDeltaDNAAppInitialize () { +} + +//----------------------------------------------------------------// +void AKUAndroidDeltaDNAContextInitialize () { + + REGISTER_LUA_CLASS ( MOAIDeltaDNAAndroid ); + +} \ No newline at end of file diff --git a/src/moai-android-deltadna/host.h b/src/moai-android-deltadna/host.h new file mode 100644 index 0000000000..b9189bfea8 --- /dev/null +++ b/src/moai-android-deltadna/host.h @@ -0,0 +1,16 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#ifndef AKU_ANDROID_DELTADNA_HOST_H +#define AKU_ANDROID_DELTADNA_HOST_H + +#include + +AKU_API void AKUAndroidDeltaDNAAppFinalize (); +AKU_API void AKUAndroidDeltaDNAAppInitialize (); +AKU_API void AKUAndroidDeltaDNAContextInitialize (); + +#endif diff --git a/src/moai-android-deltadna/java/AndroidManifest.xml b/src/moai-android-deltadna/java/AndroidManifest.xml new file mode 100644 index 0000000000..80e3e0d1ce --- /dev/null +++ b/src/moai-android-deltadna/java/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/src/moai-android-deltadna/java/build.gradle b/src/moai-android-deltadna/java/build.gradle new file mode 100644 index 0000000000..f4e65da1be --- /dev/null +++ b/src/moai-android-deltadna/java/build.gradle @@ -0,0 +1,36 @@ +apply plugin: 'com.android.library' + +android { + compileSdkVersion 22 + buildToolsVersion "22.0.1" + + defaultConfig { + minSdkVersion 17 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs += 'src' + } + } +} + +repositories { + mavenCentral() +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:22.1.1' + compile files('../../../3rdparty-android/deltadna-v3.3.6/lib/dd_android_sdk.jar') + compile project(':core') +} diff --git a/src/moai-android-deltadna/java/proguard-rules.pro b/src/moai-android-deltadna/java/proguard-rules.pro new file mode 100644 index 0000000000..dafb72ef25 --- /dev/null +++ b/src/moai-android-deltadna/java/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /Users/patrick/Library/Android/sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/src/moai-android-deltadna/java/src/com/moaisdk/deltadna/MoaiDeltaDNA.java b/src/moai-android-deltadna/java/src/com/moaisdk/deltadna/MoaiDeltaDNA.java new file mode 100644 index 0000000000..848c807ba0 --- /dev/null +++ b/src/moai-android-deltadna/java/src/com/moaisdk/deltadna/MoaiDeltaDNA.java @@ -0,0 +1,54 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +package com.moaisdk.deltadna; + +import com.deltadna.android.sdk.DDNA; +import com.deltadna.android.sdk.helpers.NotStartedException; + +import android.app.Activity; + +@SuppressWarnings ( "unused" ) + +//================================================================// +// MoaiDeltaDNA +//================================================================// +public class MoaiDeltaDNA { + + private static Activity sActivity = null; + private static String sEnvironmentKey = "56919948607282167963952652014071"; + private static String sCollectHostname = "http://collect2674dltcr.deltadna.net/collect/api"; + private static String sEngageHostname = "http://engage2674dltcr.deltadna.net"; + + public static void initialize ( String clientVersion, boolean debugMode ) { + + DDNA.inst ().settings ().setDebugMode ( debugMode ); + DDNA.inst ().setClientVersion ( clientVersion ); + + // Start deltaDNA SDK + // SDK generates its own userID when null is passed + DDNA.inst ().startSDK ( sEnvironmentKey, sCollectHostname, sEngageHostname, null ); + } + + public static void onCreate ( Activity activity ) { + + sActivity = activity; + + // Initialise the deltaDNA SDK + // NB This can also be done in your applications OnCreate method. + DDNA.inst ().init ( activity.getApplication () ); + } + + public static void onDestroy () { + + try { + DDNA.inst ().stopSDK (); + } + catch ( NotStartedException e ) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/src/moai-android-facebook/MOAIFacebookAndroid.cpp b/src/moai-android-facebook/MOAIFacebookAndroid.cpp index f2c9ebe7b3..0d2a29d904 100644 --- a/src/moai-android-facebook/MOAIFacebookAndroid.cpp +++ b/src/moai-android-facebook/MOAIFacebookAndroid.cpp @@ -31,6 +31,22 @@ int MOAIFacebookAndroid::_getUserID ( lua_State* L ) { return 1; } +//----------------------------------------------------------------// +/** @lua getUserName + @text Retrieve the Facebook user name + + @out string name +*/ +int MOAIFacebookAndroid::_getUserName ( lua_State* L ) { + MOAI_JAVA_LUA_SETUP ( MOAIFacebookAndroid, "" ) + + MOAIJString jName = ( jstring )self->CallStaticObjectMethod ( self->mJava_GetUserName ); + cc8* name = self->GetCString ( jName ); + lua_pushstring ( state, name ); + self->ReleaseCString ( jName, name ); + return 1; +} + //----------------------------------------------------------------// /** @lua getToken @text Retrieve the Facebook login token. @@ -47,6 +63,38 @@ int MOAIFacebookAndroid::_getToken ( lua_State* L ) { return 1; } +//----------------------------------------------------------------// +/** @lua getTokenExpireTime + @text Retrieve the Facebook login token. + + @out string token +*/ +int MOAIFacebookAndroid::_getTokenExpireTime ( lua_State* L ) { + MOAI_JAVA_LUA_SETUP ( MOAIFacebookAndroid, "" ) + + MOAIJString jtoken = ( jstring )self->CallStaticObjectMethod ( self->mJava_GetTokenExpireTime ); + cc8* token = self->GetCString ( jtoken ); + lua_pushstring ( state, token ); + self->ReleaseCString ( jtoken, token ); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getTokenRefreshTime + @text Retrieve the Facebook login token. + + @out string token +*/ +int MOAIFacebookAndroid::_getTokenRefreshTime ( lua_State* L ) { + MOAI_JAVA_LUA_SETUP ( MOAIFacebookAndroid, "" ) + + MOAIJString jtoken = ( jstring )self->CallStaticObjectMethod ( self->mJava_GetTokenRefreshTime ); + cc8* token = self->GetCString ( jtoken ); + lua_pushstring ( state, token ); + self->ReleaseCString ( jtoken, token ); + return 1; +} + //----------------------------------------------------------------// /** @lua graphRequest @text Make a request on Facebook's Graph API @@ -95,17 +143,37 @@ int MOAIFacebookAndroid::_init ( lua_State* L ) { int MOAIFacebookAndroid::_login ( lua_State *L ) { MOAI_JAVA_LUA_SETUP ( MOAIFacebookAndroid, "" ) - jobjectArray jpermissions = NULL; + jobjectArray jpermissions = NULL; + MOAIJString prevToken = NULL; + MOAIJString fbId = NULL; + MOAIJString tokenExpireTime = NULL; + MOAIJString tokenRefreshTime = NULL; if ( state.IsType ( 1, LUA_TTABLE )) { jpermissions = self->StringArrayFromLua ( L, 1 ); } - + + if ( state.IsType ( 2, LUA_TSTRING )) { + prevToken = self->GetJString ( lua_tostring ( state, 2 )); + } + + if ( state.IsType ( 3, LUA_TSTRING )) { + fbId = self->GetJString ( lua_tostring ( state, 3 )); + } + + if ( state.IsType ( 4, LUA_TSTRING )) { + tokenExpireTime = self->GetJString ( lua_tostring ( state, 4 )); + } + + if ( state.IsType ( 5, LUA_TSTRING )) { + tokenRefreshTime = self->GetJString ( lua_tostring ( state, 5 )); + } + if ( jpermissions == NULL ) { jpermissions = self->Env ()->NewObjectArray ( 0, self->Env ()->FindClass( "java/lang/String" ), 0 ); } - self->CallStaticVoidMethod ( self->mJava_Login, jpermissions ); + self->CallStaticVoidMethod ( self->mJava_Login, jpermissions, ( jstring ) prevToken, ( jstring ) fbId, ( jstring ) tokenExpireTime, ( jstring ) tokenRefreshTime ); return 0; } @@ -211,13 +279,16 @@ MOAIFacebookAndroid::MOAIFacebookAndroid () { RTTI_SINGLE ( MOAIGlobalEventSource ) this->SetClass ( "com/moaisdk/facebook/MoaiFacebook" ); - + this->mJava_GetToken = this->GetStaticMethod ( "getToken", "()Ljava/lang/String;" ); + this->mJava_GetTokenExpireTime = this->GetStaticMethod ( "getTokenExpireTime", "()Ljava/lang/String;" ); + this->mJava_GetTokenRefreshTime = this->GetStaticMethod ( "getTokenRefreshTime", "()Ljava/lang/String;" ); this->mJava_GetUserID = this->GetStaticMethod ( "getUserID", "()Ljava/lang/String;" ); + this->mJava_GetUserName = this->GetStaticMethod ( "getUserName", "()Ljava/lang/String;" ); //this->mJava_GraphRequest = this->GetStaticMethod ( "graphRequest", "(Ljava/lang/String;Landroid/os/Bundle;)V" ); this->mJava_Init = this->GetStaticMethod ( "init", "(Ljava/lang/String;)V" ); this->mJava_IsSessionValid = this->GetStaticMethod ( "isSessionValid", "()Z" ); - this->mJava_Login = this->GetStaticMethod ( "login", "([Ljava/lang/String;)V" ); + this->mJava_Login = this->GetStaticMethod ( "login", "([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" ); this->mJava_Logout = this->GetStaticMethod ( "logout", "()V" ); this->mJava_PostToFeed = this->GetStaticMethod ( "postToFeed", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" ); this->mJava_RestoreSession = this->GetStaticMethod ( "restoreSession", "()Z" ); @@ -240,7 +311,10 @@ void MOAIFacebookAndroid::RegisterLuaClass ( MOAILuaState& state ) { luaL_Reg regTable [] = { { "getListener", &MOAIGlobalEventSource::_getListener < MOAIFacebookAndroid > }, { "getUserID", _getUserID }, + { "getUserName", _getUserName }, { "getToken", _getToken }, + { "getTokenExpireTime", _getTokenExpireTime }, + { "getTokenRefreshTime", _getTokenRefreshTime }, { "graphRequest", _graphRequest }, { "init", _init }, { "login", _login }, diff --git a/src/moai-android-facebook/MOAIFacebookAndroid.h b/src/moai-android-facebook/MOAIFacebookAndroid.h index 983414468f..e5bb3fe3ce 100644 --- a/src/moai-android-facebook/MOAIFacebookAndroid.h +++ b/src/moai-android-facebook/MOAIFacebookAndroid.h @@ -29,7 +29,10 @@ class MOAIFacebookAndroid : private: jmethodID mJava_GetToken; + jmethodID mJava_GetTokenExpireTime; + jmethodID mJava_GetTokenRefreshTime; jmethodID mJava_GetUserID; + jmethodID mJava_GetUserName; jmethodID mJava_GraphRequest; jmethodID mJava_Init; jmethodID mJava_IsSessionValid; @@ -41,17 +44,20 @@ class MOAIFacebookAndroid : jmethodID mJava_ShowInviteDialog; //----------------------------------------------------------------// - static int _getUserID ( lua_State* L ); - static int _getToken ( lua_State* L ); - static int _graphRequest ( lua_State* L ); - static int _init ( lua_State* L ); - static int _login ( lua_State* L ); - static int _logout ( lua_State* L ); - static int _postToFeed ( lua_State* L ); - static int _restoreSession ( lua_State* L ); - static int _sendRequest ( lua_State* L ); - static int _sessionValid ( lua_State* L ); - static int _showInviteDialog ( lua_State* L ); + static int _getUserID ( lua_State* L ); + static int _getUserName ( lua_State* L ); + static int _getToken ( lua_State* L ); + static int _getTokenExpireTime ( lua_State* L ); + static int _getTokenRefreshTime ( lua_State* L ); + static int _graphRequest ( lua_State* L ); + static int _init ( lua_State* L ); + static int _login ( lua_State* L ); + static int _logout ( lua_State* L ); + static int _postToFeed ( lua_State* L ); + static int _restoreSession ( lua_State* L ); + static int _sendRequest ( lua_State* L ); + static int _sessionValid ( lua_State* L ); + static int _showInviteDialog ( lua_State* L ); public: diff --git a/src/moai-android-facebook/java/src/com/moaisdk/facebook/MoaiFacebook.java b/src/moai-android-facebook/java/src/com/moaisdk/facebook/MoaiFacebook.java index c01aa2b3dc..2c99b13dcd 100644 --- a/src/moai-android-facebook/java/src/com/moaisdk/facebook/MoaiFacebook.java +++ b/src/moai-android-facebook/java/src/com/moaisdk/facebook/MoaiFacebook.java @@ -8,11 +8,15 @@ import java.io.IOException; import java.net.MalformedURLException; +import java.text.DateFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Collection; + +import com.facebook.AccessTokenSource; import com.moaisdk.core.*; import android.app.Activity; @@ -65,72 +69,89 @@ public static DialogResultCode valueOf ( int index ) { } } - private static Activity sActivity = null; - private static CallbackManager sCallbackManager = null; - private static String sAppId = null; - private static String sUserEmail = null; - private static String sUserID = null; - private static String sUserName = null; - private static AccessToken sLoginAccessToken = null; + private static Activity sActivity = null; + private static CallbackManager sCallbackManager = null; + private static String sAppId = null; + private static String sUserEmail = null; + private static String sUserID = null; + private static String sUserName = null; + private static String sLoginAccessToken = null; + private static Date sAccessTokenExpireTime = null; + private static Date sAccessTokenRefreshTime = null; protected static native void AKUNotifyFacebookLoginSuccess (); protected static native void AKUNotifyFacebookLoginDismissed (); protected static native void AKUNotifyFacebookLoginError (); - private static FacebookCallback sLoginCallback = new FacebookCallback() { + private static FacebookCallback sLoginCallback = new FacebookCallback () { @Override public void onSuccess ( LoginResult loginResult ) { MoaiLog.i ( "MoaiFacebook onSuccess" ); - sLoginAccessToken = loginResult.getAccessToken (); + AccessToken token = loginResult.getAccessToken (); + sLoginAccessToken = token.getToken (); + sAccessTokenExpireTime = token.getExpires (); + sAccessTokenRefreshTime = token.getLastRefresh (); - GraphRequest.newMeRequest( - sLoginAccessToken, new GraphRequest.GraphJSONObjectCallback () { + GraphRequest.newMeRequest ( token, new GraphRequest.GraphJSONObjectCallback () { @Override public void onCompleted ( JSONObject json, GraphResponse response ) { - if (response.getError () != null) { - + if ( response.getError () != null ) + { // handle error System.out.println ( "ERROR" ); AKUNotifyFacebookLoginError (); - - } else { - + } + else + { System.out.println ( "Success" ); - try { + try + { + if ( json.has ( "id" )) + sUserID = json.getString ( "id" ); - sUserID = json.getString ( "id" ); - sUserName = json.getString ( "name" ); + if ( json.has ( "name" )) + sUserName = json.getString ( "name" ); - AKUNotifyFacebookLoginSuccess (); + if ( json.has ( "email" )) + sUserEmail = json.getString ( "email" ); - } catch (JSONException e) { - e.printStackTrace(); + AKUNotifyFacebookLoginSuccess (); + } + catch ( JSONException e ) + { + e.printStackTrace (); } } } - }).executeAsync(); + }).executeAsync (); } @Override - public void onCancel() { + public void onCancel () { MoaiLog.i ( "MoaiFacebook onCancel" ); - sUserEmail = null; - sUserID = null; - sUserName = null; + sUserEmail = null; + sUserID = null; + sUserName = null; + sLoginAccessToken = null; + sAccessTokenExpireTime = null; + sAccessTokenRefreshTime = null; AKUNotifyFacebookLoginDismissed (); } @Override - public void onError(FacebookException exception) { + public void onError ( FacebookException exception ) { MoaiLog.i ( "MoaiFacebook onError" ); - sUserEmail = null; - sUserID = null; - sUserName = null; + sUserEmail = null; + sUserID = null; + sUserName = null; + sLoginAccessToken = null; + sAccessTokenExpireTime = null; + sAccessTokenRefreshTime = null; AKUNotifyFacebookLoginError (); } }; @@ -139,12 +160,7 @@ public void onError(FacebookException exception) { public static void onActivityResult ( int requestCode, int resultCode, Intent data ) { MoaiLog.i ( "MoaiFacebook onActivityResult: Calling Session onActivityResult ()" ); - sCallbackManager.onActivityResult(requestCode, resultCode, data); - -// Session session = Session.getActiveSession (); -// if ( session != null ) { -// session.onActivityResult ( sActivity, requestCode, resultCode, data ); -// } + sCallbackManager.onActivityResult ( requestCode, resultCode, data ); } //----------------------------------------------------------------// @@ -160,7 +176,7 @@ public static void onCreate ( Activity activity ) { } //----------------------------------------------------------------// - public static void onResume ( ) { + public static void onResume () { MoaiLog.i("MoaiFacebook on resume"); // if(sAppId != null) { @@ -176,7 +192,45 @@ public static void onResume ( ) { public static String getToken () { MoaiLog.i ( "MoaiFacebook: getToken" ); - return sLoginAccessToken.getToken (); + + if ( sLoginAccessToken != null ) { + + MoaiLog.i ( "MoaiFacebook: getToken sLoginAccessToken != null" ); + return sLoginAccessToken; + } + else { + MoaiLog.i ( "MoaiFacebook: getToken sLoginAccessToken == null" ); + return ""; + } + } + + //----------------------------------------------------------------// + public static String getTokenExpireTime () { + + //MoaiLog.i ( "MoaiFacebook: getUserID" ); + + if ( sAccessTokenExpireTime != null ) + return sAccessTokenExpireTime.toString (); + else + return ""; + } + + //----------------------------------------------------------------// + public static String getTokenRefreshTime () { + + //MoaiLog.i ( "MoaiFacebook: getUserID" ); + + if ( sAccessTokenRefreshTime != null ) + return sAccessTokenRefreshTime.toString (); + else + return ""; + } + + //----------------------------------------------------------------// + public static String getUserEmail () { + + //MoaiLog.i ( "MoaiFacebook: getUserID" ); + return sUserEmail; } //----------------------------------------------------------------// @@ -186,6 +240,13 @@ public static String getUserID () { return sUserID; } + //----------------------------------------------------------------// + public static String getUserName () { + + //MoaiLog.i ( "MoaiFacebook: getUserID" ); + return sUserName; + } + //----------------------------------------------------------------// public static void init ( String appId ) { @@ -206,24 +267,44 @@ public static boolean isSessionValid () { } //----------------------------------------------------------------// - public static void login ( String [] p ) { + public static void login ( String [] p, String prevToken, String fbId, String tokenExpireTime, String tokenRefreshTime ) { MoaiLog.i("MoaiFacebook: login"); // TODO pass permissions via argument ArrayList permissions = new ArrayList(); - permissions.add ( "user_friends" ); - permissions.add ( "user_photos" ); - permissions.add ( "public_profile" ); - permissions.add ( "email" ); + for ( String permission : p ) + permissions.add ( permission ); + + if ( prevToken != null && prevToken.length () > 0 ) + { + try + { + Date expireTime = DateFormat.getDateInstance ().parse ( tokenExpireTime ); + Date refreshTime = DateFormat.getDateInstance ().parse ( tokenRefreshTime ); + AccessToken token = new AccessToken ( prevToken, sAppId, fbId, permissions, null, AccessTokenSource.FACEBOOK_APPLICATION_SERVICE, expireTime, refreshTime ); + AccessToken.setCurrentAccessToken ( token ); + } + catch ( java.text.ParseException e ) + { + e.printStackTrace (); + } + } + LoginManager.getInstance().logInWithReadPermissions ( sActivity, permissions ); } //----------------------------------------------------------------// public static void logout () { - MoaiLog.i("MoaiFacebook: logout"); + MoaiLog.i ( "MoaiFacebook: logout" ); LoginManager.getInstance ().logOut (); + sUserEmail = null; + sUserID = null; + sUserName = null; + sLoginAccessToken = null; + sAccessTokenExpireTime = null; + sAccessTokenRefreshTime = null; } //----------------------------------------------------------------// @@ -244,7 +325,7 @@ public static void showInviteDialog ( String linkURL, String imgURL ) { MoaiLog.i ( "MoaiFacebook: showInviteDialog" ); - if ( AppInviteDialog.canShow()) { + if ( AppInviteDialog.canShow ()) { AppInviteContent content = new AppInviteContent.Builder () .setApplinkUrl ( linkURL ) .setPreviewImageUrl ( imgURL ) diff --git a/src/moai-android-google-billing/java/AndroidManifest.xml b/src/moai-android-google-billing/java/AndroidManifest.xml index c28461a7e2..6f9ac34372 100644 --- a/src/moai-android-google-billing/java/AndroidManifest.xml +++ b/src/moai-android-google-billing/java/AndroidManifest.xml @@ -1,2 +1,3 @@ + diff --git a/src/moai-android-google-billing/java/src/com/moaisdk/googlebilling/MoaiGoogleBilling.java b/src/moai-android-google-billing/java/src/com/moaisdk/googlebilling/MoaiGoogleBilling.java index 1dd4977ce0..efa80be4d2 100644 --- a/src/moai-android-google-billing/java/src/com/moaisdk/googlebilling/MoaiGoogleBilling.java +++ b/src/moai-android-google-billing/java/src/com/moaisdk/googlebilling/MoaiGoogleBilling.java @@ -42,7 +42,8 @@ public class MoaiGoogleBilling { private static boolean sInAppSupported = false; private static boolean sSubscriptionSupported = false; - + private static boolean sWaitingForPurchase = false; + // purchase types public static final String PURCHASE_TYPE_INAPP = "inapp"; public static final String PURCHASE_TYPE_SUBSCRIPTION = "subs"; @@ -69,7 +70,7 @@ public static void onCreate ( Activity activity ) { MoaiLog.i ( "MoaiGoogleBilling v3 onCreate: Initializing Google Billing" ); sActivity = activity; - + sWaitingForPurchase = false; sServiceConn = new ServiceConnection () { //--------------------------------------------------------// @@ -120,8 +121,10 @@ public void onServiceConnected ( ComponentName name, IBinder service ) { } } }; - - sActivity.bindService ( new Intent ( "com.android.vending.billing.InAppBillingService.BIND" ), sServiceConn, Context.BIND_AUTO_CREATE ); + Intent serviceIntent = new Intent ( "com.android.vending.billing.InAppBillingService.BIND" ); + serviceIntent.setPackage ( "com.android.vending" ); + + sActivity.bindService ( serviceIntent, sServiceConn, Context.BIND_AUTO_CREATE ); } //----------------------------------------------------------------// @@ -136,9 +139,9 @@ public static void onDestroy () { //----------------------------------------------------------------// public static void onActivityResult ( int requestCode, int resultCode, Intent data ) { - - MoaiLog.i("Test java!"); - + + if ( !sWaitingForPurchase ) return; + if ( resultCode == Activity.RESULT_OK ) { if ( requestCode == 1001 ) { @@ -151,7 +154,8 @@ public static void onActivityResult ( int requestCode, int resultCode, Intent da jsonData.add ( purchaseData ); jsonData.add ( dataSignature ); JSONArray jsonArray = new JSONArray ( jsonData ); - + sWaitingForPurchase = false; + synchronized ( Moai.sAkuLock ) { AKUNotifyGooglePurchaseResponseReceived ( responseCode, jsonArray.toString ()); @@ -274,6 +278,7 @@ public static int purchaseProduct ( String sku, int productType, String devPaylo sActivity.startIntentSenderForResult ( pendingIntent.getIntentSender (), 1001, new Intent (), Integer.valueOf ( 0 ), Integer.valueOf ( 0 ), Integer.valueOf ( 0 )); } + sWaitingForPurchase = true; return buyIntentBundle.getInt ( "RESPONSE_CODE" ); } catch ( Exception e ) { diff --git a/src/moai-android/MOAIAppAndroid.h b/src/moai-android/MOAIAppAndroid.h index e7e362be22..5c157a1e16 100644 --- a/src/moai-android/MOAIAppAndroid.h +++ b/src/moai-android/MOAIAppAndroid.h @@ -46,8 +46,8 @@ class MOAIAppAndroid : ACTIVITY_ON_PAUSE, ACTIVITY_ON_RESUME, ACTIVITY_ON_RESTART, - APP_OPENED_FROM_URL, BACK_BUTTON_PRESSED, + APP_OPENED_FROM_URL, EVENT_PICTURE_TAKEN, EVENT_MEMORY_WARNING, TOTAL, diff --git a/src/moai-android/MOAIBillingAndroid.cpp b/src/moai-android/MOAIBillingAndroid.cpp index 6c69b5794b..d26769aaed 100644 --- a/src/moai-android/MOAIBillingAndroid.cpp +++ b/src/moai-android/MOAIBillingAndroid.cpp @@ -374,7 +374,7 @@ int MOAIBillingAndroid::_checkInAppSupported ( lua_State* L ) { JNI_GET_ENV ( jvm, env ); - jclass billing = env->FindClass ( "com/moaisdk/core/MoaiGoogleBilling" ); + jclass billing = env->FindClass ( "com/moaisdk/googlebilling/MoaiGoogleBilling" ); if ( billing == NULL ) { ZLLogF ( ZLLog::CONSOLE, "MOAIBillingAndroid: Unable to find java class %s", "com/ziplinegames/moai/MoaiGoogleBilling" ); @@ -413,7 +413,7 @@ int MOAIBillingAndroid::_checkSubscriptionSupported ( lua_State* L ) { JNI_GET_ENV ( jvm, env ); - jclass billing = env->FindClass ( "com/moaisdk/core/MoaiGoogleBilling" ); + jclass billing = env->FindClass ( "com/moaisdk/googlebilling/MoaiGoogleBilling" ); if ( billing == NULL ) { ZLLogF ( ZLLog::CONSOLE, "MOAIBillingAndroid: Unable to find java class %s", "com/ziplinegames/moai/MoaiGoogleBilling" ); @@ -456,7 +456,7 @@ int MOAIBillingAndroid::_consumePurchaseSync ( lua_State* L ) { JNI_GET_ENV ( jvm, env ); MOAIJString jtoken = JNI_GET_JSTRING ( token ); - jclass billing = env->FindClass ( "com/moaisdk/core/MoaiGoogleBilling" ); + jclass billing = env->FindClass ( "com/moaisdk/googlebilling/MoaiGoogleBilling" ); if ( billing == NULL ) { ZLLogF ( ZLLog::CONSOLE, "MOAIBillingAndroid: Unable to find java class %s", "com/ziplinegames/moai/MoaiGoogleBilling" ); @@ -500,7 +500,7 @@ int MOAIBillingAndroid::_getPurchasedProducts ( lua_State* L ) { cc8* continuation = lua_tostring ( state, 2 ); MOAIJString jcontinuation = JNI_GET_JSTRING ( continuation ); - jclass billing = env->FindClass ( "com/moaisdk/core/MoaiGoogleBilling" ); + jclass billing = env->FindClass ( "com/moaisdk/googlebilling/MoaiGoogleBilling" ); if ( billing == NULL ) { ZLLogF ( ZLLog::CONSOLE, "MOAIBillingAndroid: Unable to find java class %s", "com/ziplinegames/moai/MoaiGoogleBilling" ); @@ -547,7 +547,7 @@ int MOAIBillingAndroid::_purchaseProduct ( lua_State* L ) { MOAIJString jsku = JNI_GET_JSTRING ( sku ); MOAIJString jdevPayload = JNI_GET_JSTRING ( devPayload ); - jclass billing = env->FindClass ( "com/moaisdk/core/MoaiGoogleBilling" ); + jclass billing = env->FindClass ( "com/moaisdk/googlebilling/MoaiGoogleBilling" ); if ( billing == NULL ) { ZLLogF ( ZLLog::CONSOLE, "MOAIBillingAndroid: Unable to find java class %s", "com/ziplinegames/moai/MoaiGoogleBilling" ); @@ -682,7 +682,7 @@ int MOAIBillingAndroid::_requestProductsSync ( lua_State* L ) { // get type int type = lua_tointeger ( state, 2 ); - jclass billing = env->FindClass ( "com/moaisdk/core/MoaiGoogleBilling" ); + jclass billing = env->FindClass ( "com/moaisdk/googlebilling/MoaiGoogleBilling" ); if ( billing == NULL ) { ZLLogF ( ZLLog::CONSOLE, "MOAIBillingAndroid: Unable to find java class %s", "com/ziplinegames/moai/MoaiGoogleBilling" ); @@ -715,7 +715,7 @@ int MOAIBillingAndroid::_requestProductsSync ( lua_State* L ) { //----------------------------------------------------------------// MOAIBillingAndroid::MOAIBillingAndroid () : - mBillingProvider ( "com/moaisdk/core/MoaiGoogleBilling" ) { + mBillingProvider ( "com/moaisdk/googlebilling/MoaiGoogleBilling" ) { RTTI_SINGLE ( MOAILuaObject ) } @@ -1042,13 +1042,13 @@ extern "C" JNIEXPORT void JNICALL Java_com_ziplinegames_moai_MoaiAmazonBilling_A //================================================================// //----------------------------------------------------------------// -extern "C" JNIEXPORT void JNICALL Java_com_ziplinegames_moai_MoaiGoogleBilling_AKUNotifyGoogleBillingSupported ( JNIEnv* env, jclass obj, jboolean supported ) { +extern "C" JNIEXPORT void JNICALL Java_com_moaisdk_googlebilling_MoaiGoogleBilling_AKUNotifyGoogleBillingSupported ( JNIEnv* env, jclass obj, jboolean supported ) { MOAIBillingAndroid::Get ().NotifyBillingSupported ( supported ); } //----------------------------------------------------------------// -extern "C" JNIEXPORT void JNICALL Java_com_ziplinegames_moai_MoaiGoogleBilling_AKUNotifyGooglePurchaseResponseReceived ( JNIEnv* env, jclass obj, jint code, jstring jidentifier ) { +extern "C" JNIEXPORT void JNICALL Java_com_moaisdk_googlebilling_MoaiGoogleBilling_AKUNotifyGooglePurchaseResponseReceived ( JNIEnv* env, jclass obj, jint code, jstring jidentifier ) { JNI_GET_CSTRING ( jidentifier, identifier ); @@ -1058,7 +1058,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_ziplinegames_moai_MoaiGoogleBilling_A } //----------------------------------------------------------------// -extern "C" JNIEXPORT void JNICALL Java_com_ziplinegames_moai_MoaiGoogleBilling_AKUNotifyGooglePurchaseStateChanged ( JNIEnv* env, jclass obj, jint code, jstring jidentifier, jstring jorder, jstring jnotification, jstring jpayload ) { +extern "C" JNIEXPORT void JNICALL Java_com_moaisdk_googlebilling_MoaiGoogleBilling_AKUNotifyGooglePurchaseStateChanged ( JNIEnv* env, jclass obj, jint code, jstring jidentifier, jstring jorder, jstring jnotification, jstring jpayload ) { JNI_GET_CSTRING ( jidentifier, identifier ); JNI_GET_CSTRING ( jorder, order ); @@ -1074,7 +1074,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_ziplinegames_moai_MoaiGoogleBilling_A } //----------------------------------------------------------------// -extern "C" JNIEXPORT void JNICALL Java_com_ziplinegames_moai_MoaiGoogleBilling_AKUNotifyGoogleRestoreResponseReceived ( JNIEnv* env, jclass obj, jint code ) { +extern "C" JNIEXPORT void JNICALL Java_com_moaisdk_googlebilling_MoaiGoogleBilling_AKUNotifyGoogleRestoreResponseReceived ( JNIEnv* env, jclass obj, jint code ) { MOAIBillingAndroid::Get ().NotifyRestoreResponseReceived ( MOAIBillingAndroid::MapGoogleResponseCode ( code ), false, NULL ); } diff --git a/src/moai-android/java/build.gradle b/src/moai-android/java/build.gradle index 1825345f15..19dd87ea4b 100644 --- a/src/moai-android/java/build.gradle +++ b/src/moai-android/java/build.gradle @@ -1,6 +1,21 @@ apply plugin: 'com.android.library' android { + compileSdkVersion 22 + buildToolsVersion "22.0.1" + + defaultConfig { + minSdkVersion 17 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' @@ -8,3 +23,8 @@ android { } } } + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:22.1.1' +} \ No newline at end of file diff --git a/src/moai-android/java/src/com/moaisdk/core/Moai.java b/src/moai-android/java/src/com/moaisdk/core/Moai.java index 374930ce2d..4164870920 100644 --- a/src/moai-android/java/src/com/moaisdk/core/Moai.java +++ b/src/moai-android/java/src/com/moaisdk/core/Moai.java @@ -144,6 +144,7 @@ public static ListenerEvent valueOf ( int index ) { "com.moaisdk.amazonbilling.MoaiAmazonBilling", "com.moaisdk.chartboost.MoaiChartBoost", "com.moaisdk.crittercism.MoaiCrittercism", + "com.moaisdk.deltadna.MoaiDeltaDNA", "com.moaisdk.facebook.MoaiFacebook", "com.moaisdk.fortumo.MoaiFortumo", "com.moaisdk.flurry.MoaiFlurry", diff --git a/src/moai-android/java/src/com/moaisdk/core/MoaiActivity.java b/src/moai-android/java/src/com/moaisdk/core/MoaiActivity.java index 655bc99db3..36ba710d6e 100644 --- a/src/moai-android/java/src/com/moaisdk/core/MoaiActivity.java +++ b/src/moai-android/java/src/com/moaisdk/core/MoaiActivity.java @@ -113,7 +113,7 @@ protected void onCreate ( Bundle savedInstanceState ) { Moai.mount ( "bundle", myApp.publicSourceDir ); } - Moai.setWorkingDirectory ( "bundle/assets" ); // TODO: this should be set from a string resource or a manifest entry + Moai.setWorkingDirectory ( "bundle/assets/lua" ); // TODO: this should be set from a string resource or a manifest entry } catch ( NameNotFoundException e ) { MoaiLog.e ( "MoaiActivity onCreate: Unable to locate the application bundle" ); } diff --git a/src/moai-audio-sampler/MOAIAudioSamplerCocoa.h b/src/moai-audio-sampler/MOAIAudioSamplerCocoa.h index a639e07592..f5b23d0b50 100644 --- a/src/moai-audio-sampler/MOAIAudioSamplerCocoa.h +++ b/src/moai-audio-sampler/MOAIAudioSamplerCocoa.h @@ -17,67 +17,57 @@ @text Audio sampler singleton */ class MOAIAudioSamplerCocoa : - public virtual MOAINode { - + public virtual MOAIInstanceEventSource { private: - void pause(); - void resume(); + + AudioStreamBasicDescription mStreamDescription; + AudioQueueRef mQueue; + ZLLeanArray < AudioQueueBufferRef > mBuffers; + + bool mIsRunning; + bool mIsPaused; + + void* mSessionActiveObserver; + void* mSessionInactiveObserver; + + MOAILuaSharedPtr < MOAIStream > mStream; + u32 mStreamFormat; + size_t mSampleSize; + size_t mSamplesWritten; //----------------------------------------------------------------// - static int _setFrequency ( lua_State* L ); - static int _setNumChannels ( lua_State* L ); - static int _prepareBuffer ( lua_State* L ); - static int _start ( lua_State* L ); - static int _read ( lua_State* L ); + static int _getLevels ( lua_State* L ); + static int _init ( lua_State* L ); + static int _pause ( lua_State* L ); + static int _resume ( lua_State* L ); + static int _setStream ( lua_State* L ); + static int _start ( lua_State* L ); static int _stop ( lua_State* L ); - static int _pause ( lua_State* L ); - static int _resume ( lua_State* L ); - static int _getLevels ( lua_State* L ); - - u32 mNumFrequency; - u32 mNumChannels; - size_t mMaxBufferSizeInBytes; - size_t mBufferAryLen; - short **mBufferAry; - size_t *mBufferReadSizeInBytes; - - AudioStreamBasicDescription recFmt; - AudioQueueRef queue; - AudioQueueBufferRef *buffers; - AudioQueueLevelMeterState *levels; - u32 currentWriteIndex; - u32 currentReadIndex; - - bool isActive; - bool isQueueInitialized; - bool isQueuePrimed; - void* mSessionActiveObserver; - void* mSessionInactiveObserver; - static void globalCallback( void *inUserData, - AudioQueueRef inAQ, - AudioQueueBufferRef inBuffer, - const AudioTimeStamp *inStartTime, - UInt32 inNumPackets, - const AudioStreamPacketDescription *inPacketDesc ); + //----------------------------------------------------------------// + void HandleInput ( AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, UInt32 inNumPackets ); + static void InputCallback ( void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, const AudioTimeStamp *inStartTime, UInt32 inNumPackets, const AudioStreamPacketDescription *inPacketDesc ); + void Pause (); + void Resume (); + public: DECL_LUA_FACTORY ( MOAIAudioSamplerCocoa ) - // DECL_ATTR_HELPER ( MOAIUntzSound ) - // enum { - // ATTR_VOLUME, - // TOTAL_ATTR, - // }; - + enum { + EVENT_BUFFER, + }; //----------------------------------------------------------------// - MOAIAudioSamplerCocoa (); - ~MOAIAudioSamplerCocoa (); - void RegisterLuaClass ( MOAILuaState& state ); - void RegisterLuaFuncs ( MOAILuaState& state ); - - + void Clear (); + void GetLevels ( double& average, double& peak ); + void Init ( u32 sampleRate, u32 channels, u32 sampleSize, u32 totalBuffers ); + MOAIAudioSamplerCocoa (); + ~MOAIAudioSamplerCocoa (); + void RegisterLuaClass ( MOAILuaState& state ); + void RegisterLuaFuncs ( MOAILuaState& state ); + void Start (); + void Stop (); }; #endif diff --git a/src/moai-audio-sampler/MOAIAudioSamplerCocoa.mm b/src/moai-audio-sampler/MOAIAudioSamplerCocoa.mm index a3a53cdbb6..a804f51083 100644 --- a/src/moai-audio-sampler/MOAIAudioSamplerCocoa.mm +++ b/src/moai-audio-sampler/MOAIAudioSamplerCocoa.mm @@ -4,447 +4,365 @@ #include #include -//================================================================// -// cpp helper -//================================================================// - //----------------------------------------------------------------// void RegisterMOAIAudioSamplerCocoa () { REGISTER_LUA_CLASS ( MOAIAudioSamplerCocoa ); } +//================================================================// +// lua +//================================================================// -MOAIAudioSamplerCocoa::MOAIAudioSamplerCocoa () : -mNumFrequency(0), - mNumChannels(0), - mMaxBufferSizeInBytes ( 0 ), - mBufferAryLen(0), - mBufferAry(NULL), - mBufferReadSizeInBytes (NULL), - currentWriteIndex(0), - currentReadIndex(0), - isActive(false), - isQueueInitialized(false) -{ - //fprintf(stderr,"MOAIAudioSamplerCocoa construct. %p\n", this ); - RTTI_SINGLE ( MOAINode ) - - mSessionActiveObserver = - [ [NSNotificationCenter defaultCenter] addObserverForName:@"UntzSessionActive" - object:nil - queue:nil - usingBlock:^(NSNotification *) { - this->resume(); - } ]; - - mSessionInactiveObserver = - [ [NSNotificationCenter defaultCenter] addObserverForName:@"UntzSessionInactive" - object:nil - queue:nil - usingBlock:^(NSNotification *) { - this->pause(); - } ]; +//----------------------------------------------------------------// +int MOAIAudioSamplerCocoa::_getLevels ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) + + double average; + double peak; + + self->GetLevels ( average, peak ); + + state.Push ( average ); + state.Push ( peak ); + + return 2; } -MOAIAudioSamplerCocoa::~MOAIAudioSamplerCocoa () { - //fprintf(stderr,"MOAIAudioSamplerCocoa destruct. %p\n", this ); +//----------------------------------------------------------------// +int MOAIAudioSamplerCocoa::_init ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) - if( this->isQueueInitialized ){ - AudioQueueDispose( this->queue, TRUE); - - if(this->mBufferAry){ - for(u32 i=0;imBufferAryLen;i++){ - free( this->mBufferAry[i] ); - AudioQueueFreeBuffer(this->queue, this->buffers[i]); - } - free(this->buffers); - free(this->mBufferAry); - free(this->mBufferReadSizeInBytes); - } - free(this->levels); - } + u32 sampleRate = state.GetValue < u32 >( 2, 44100 ); + u32 channels = state.GetValue < u32 >( 3, 1 ); + u32 sampleSize = state.GetValue < u32 >( 4, sampleRate >> 1 ); + u32 totalBuffers = state.GetValue < u32 >( 5, 5 ); - [[NSNotificationCenter defaultCenter] removeObserver:(id)mSessionActiveObserver]; - [[NSNotificationCenter defaultCenter] removeObserver:(id)mSessionInactiveObserver]; -} + self->Init ( sampleRate, channels, sampleSize, totalBuffers ); -void MOAIAudioSamplerCocoa::pause() { - if ( queue ) { - AudioQueuePause( queue ); - isActive = false; - } + return 0; } -void MOAIAudioSamplerCocoa::resume() { - if ( queue ) { - OSStatus result = AudioQueueStart( queue, NULL ); - if(result){ - fprintf(stderr, "AudioQueueStart failed %ld\n", result); - } - isActive = true; - } +//----------------------------------------------------------------// +int MOAIAudioSamplerCocoa::_pause ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) + self->Pause (); + return 0; } -int MOAIAudioSamplerCocoa::_setFrequency ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "UN" ) - ; - - if( self->isQueueInitialized ) { - fprintf(stderr, "Queue already initialized\n"); - lua_pushstring ( L, "Queue already initialized" ); - return 1; - } - - self->mNumFrequency = state.GetValue < u32 >( 2, 44100 ); +//----------------------------------------------------------------// +int MOAIAudioSamplerCocoa::_resume ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) + self->Resume (); return 0; } -int MOAIAudioSamplerCocoa::_setNumChannels ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "UN" ) - ; - - if( self->isQueueInitialized ) { - fprintf(stderr, "Queue already initialized\n"); - lua_pushstring ( L, "Queue already initialized" ); - return 1; - } - - self->mNumChannels = state.GetValue < u32 >(2, 2 ); +//----------------------------------------------------------------// +int MOAIAudioSamplerCocoa::_setStream ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) + self->mStream.Set ( *self, state.GetLuaObject < MOAIStream >( 2, false )); + self->mStreamFormat = state.GetValue < u32 >( 3, ZLSample::SAMPLE_S16 ); + return 0; +} + +//----------------------------------------------------------------// +int MOAIAudioSamplerCocoa::_start ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) + self->Start (); + return 0; +} + +//----------------------------------------------------------------// +int MOAIAudioSamplerCocoa::_stop ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) + self->Stop (); return 0; } +//================================================================// +// MOAIAudioSamplerCocoa +//================================================================// +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::Clear () { + this->Stop (); + [[ NSNotificationCenter defaultCenter ] removeObserver:( id )mSessionActiveObserver ]; + [[ NSNotificationCenter defaultCenter ] removeObserver:( id )mSessionInactiveObserver ]; -// Determine the size, in bytes, of a buffer necessary to represent the supplied number -// of seconds of audio data. -static int MyComputeRecordBufferSize(const AudioStreamBasicDescription *format, AudioQueueRef queue, float seconds) -{ - int packets, frames, bytes; + if ( this->mQueue ){ - frames = (int)ceil(seconds * format->mSampleRate); - - if (format->mBytesPerFrame > 0) - bytes = frames * format->mBytesPerFrame; - else { - UInt32 maxPacketSize; - if (format->mBytesPerPacket > 0) - maxPacketSize = format->mBytesPerPacket; // constant packet size - else { - UInt32 propertySize = sizeof(maxPacketSize); - OSStatus result = AudioQueueGetProperty(queue, kAudioConverterPropertyMaximumOutputPacketSize, &maxPacketSize, - &propertySize ); - if(result){ - return -1; // couldn't get queue's maximum output packet size - } + AudioQueueDispose ( this->mQueue, TRUE ); + + for ( u32 i = 0; i < this->mBuffers.Size (); i++ ) { + AudioQueueFreeBuffer ( this->mQueue, this->mBuffers [ i ]); } - if (format->mFramesPerPacket > 0) - packets = frames / format->mFramesPerPacket; - else - packets = frames; // worst-case scenario: 1 frame in a packet - if (packets == 0) // sanity check - packets = 1; - bytes = packets * maxPacketSize; - } - return bytes; + this->mQueue = 0; + } + this->mBuffers.Clear (); } +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::GetLevels ( double& average, double& peak ) { + average = 0.0; + peak = 0.0; - -void MOAIAudioSamplerCocoa::globalCallback( void *inUserData, - AudioQueueRef inAQ, - AudioQueueBufferRef inBuffer, - const AudioTimeStamp *inStartTime, - UInt32 inNumPackets, - const AudioStreamPacketDescription *inPacketDesc ) -{ - UNUSED ( inStartTime ); - UNUSED ( inPacketDesc ); - - MOAIAudioSamplerCocoa *sampler = (MOAIAudioSamplerCocoa*) inUserData; - -// fprintf(stderr, "callback. nPkt:%d active:%d buf:%p sz:%d curWI:%d\n", -// inNumPackets, (int)sampler->isActive, inBuffer->mAudioData, inBuffer->mAudioDataByteSize, sampler->currentWriteIndex ); - - if( sampler->isActive ){ - short *outbuf = sampler->mBufferAry[ sampler->currentWriteIndex]; - short *inbuf = (short*) inBuffer->mAudioData; - for(u32 i=0;imBufferReadSizeInBytes[ sampler->currentWriteIndex] = inBuffer->mAudioDataByteSize; + if ( !this->mIsRunning ) { + return; + } + + UInt32 channelsPerFrame = this->mStreamDescription.mChannelsPerFrame; + UInt32 size = sizeof ( AudioQueueLevelMeterState ) * channelsPerFrame; + AudioQueueLevelMeterState* levels = ( AudioQueueLevelMeterState* )alloca ( size ); + + assert ( levels ); + + OSErr result = AudioQueueGetProperty ( this->mQueue, kAudioQueueProperty_CurrentLevelMeterDB, levels, &size ); + + if ( result ) { + fprintf ( stderr, "AudioQueueGetProperty kAudioQueueProperty_CurrentLevelMeterDB failed with %ld\n", result ); + return; + } - sampler->currentWriteIndex ++; - if( sampler->currentWriteIndex >= sampler->mBufferAryLen ){ - sampler->currentWriteIndex = 0; - } - - OSStatus result = AudioQueueEnqueueBuffer( inAQ, inBuffer, 0, NULL ); - if(result) printf("cannot enqueue buffer %d\n", ( int )result ); + // average both channels for detection + // if the device has a stereo mic (the macbook has) it's helpful + + for ( u32 i = 0; i < channelsPerFrame; i++ ) { + average += ( float )( levels [ 0 ].mAveragePower ); + peak += ( float )( levels [ 0 ].mPeakPower ); } } -int MOAIAudioSamplerCocoa::_prepareBuffer ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "UNN" ) - ; - - if( self->isQueueInitialized ) { - fprintf(stderr, "Queue already initialized\n"); - lua_pushstring ( L, "Queue already initialized" ); - return 1; - } - - double sec = state.GetValue < float > (2, 1); - self->mBufferAryLen = state.GetValue < u32> (3, 5 ); - - memset( &self->recFmt, 0, sizeof(self->recFmt)); - - self->recFmt.mSampleRate = self->mNumFrequency; - self->recFmt.mChannelsPerFrame = self->mNumChannels; // 2 for stereo - self->recFmt.mFormatID = kAudioFormatLinearPCM; - self->recFmt.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked; - self->recFmt.mBitsPerChannel = 16; - self->recFmt.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; // to be apparent - self->recFmt.mBytesPerPacket = self->recFmt.mBytesPerFrame = ( self->recFmt.mBitsPerChannel / 8) * self->recFmt.mChannelsPerFrame; - self->recFmt.mFramesPerPacket = 1; - self->recFmt.mReserved = 0; +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::HandleInput ( AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, UInt32 inNumPackets ) { + + short* inbuf = ( short* )inBuffer->mAudioData; + + if ( this->mStream ) { + + for ( u32 i = 0; i < inNumPackets; i++, this->mSamplesWritten++ ) { + + ZLSample::WriteSample ( *this->mStream, this->mStreamFormat, &inbuf [ i ], ZLSample::SAMPLE_S16 ); + + if (( this->mSampleSize > 0 ) && ( this->mSamplesWritten >= ( this->mSampleSize - 1 ))) { + + this->InvokeListenerWithSelf ( EVENT_BUFFER ); + this->mSamplesWritten = 0; + } + } + } + + if ( this->mIsRunning ) { + OSStatus result = AudioQueueEnqueueBuffer ( inAQ, inBuffer, 0, NULL ); + if ( result ) { + printf ( "cannot enqueue buffer %d\n", ( int )result ); + } + } +} + +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::Init ( u32 sampleRate, u32 channels, u32 sampleSize, u32 totalBuffers ) { + + this->Clear (); + + memset ( &this->mStreamDescription, 0, sizeof ( this->mStreamDescription )); + + this->mStreamDescription.mSampleRate = sampleRate; + this->mStreamDescription.mChannelsPerFrame = channels; // 2 for stereo + this->mStreamDescription.mFormatID = kAudioFormatLinearPCM; + this->mStreamDescription.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked; + this->mStreamDescription.mBitsPerChannel = 16; + this->mStreamDescription.mBytesPerPacket = ( this->mStreamDescription.mBitsPerChannel >> 3 ) * channels; + this->mStreamDescription.mBytesPerFrame = this->mStreamDescription.mBytesPerPacket; + this->mStreamDescription.mFramesPerPacket = 1; + this->mStreamDescription.mReserved = 0; - OSStatus result = AudioQueueNewInput( &self->recFmt, globalCallback, - self, /*userdata*/ - NULL, /*run loop */ - NULL, /*run loop mode */ - 0, /*flags */ - &self->queue ); - if(result){ - fprintf(stderr, "AudioQueueNewInput failed\n"); - lua_pushstring ( L, "" ); - return 1; + OSStatus result = AudioQueueNewInput ( + &this->mStreamDescription, + InputCallback, + this, // userdata + CFRunLoopGetMain (), // run loop + kCFRunLoopCommonModes, // run loop mode + 0, // flags + &this->mQueue + ); + + if ( result ){ + fprintf ( stderr, "AudioQueueNewInput failed\n" ); + return; } - int bufsize = MyComputeRecordBufferSize( &self->recFmt, self->queue, ( float )sec ); - if( bufsize < 0 ){ - fprintf(stderr, "invalid arg?"); - lua_pushstring ( L, "" ); - return 1; + size_t bufsize = this->mStreamDescription.mBytesPerFrame * sampleSize; + if ( bufsize <= 0 ) { + fprintf ( stderr, "invalid arg?" ); + return; } - fprintf(stderr, "bufsize:%d\n", bufsize ); - self->mMaxBufferSizeInBytes = bufsize; + //fprintf ( stderr, "bufsize:%d\n", bufsize ); // where - self->mBufferAry = (short**) malloc( self->mBufferAryLen * sizeof(short*)); - self->mBufferReadSizeInBytes = (size_t*) malloc( self->mBufferAryLen * sizeof(size_t)); - memset( self->mBufferReadSizeInBytes, 0, self->mBufferAryLen * sizeof(size_t)); - self->buffers = (AudioQueueBufferRef*) malloc( self->mBufferAryLen * sizeof(AudioQueueBufferRef)); - - assert(self->mBufferAry); - assert(self->buffers); - for(u32 i=0;i< self->mBufferAryLen;++i){ - self->mBufferAry[i] = (short*) malloc( bufsize ); - assert(self->mBufferAry[i]); - - result = AudioQueueAllocateBuffer( self->queue, bufsize, &self->buffers[i]); - if(result){ - fprintf(stderr, "AudioQueueAllocateBuffer failed with %ld\n", result); - lua_pushstring ( L, "" ); - return 1; - } + this->mBuffers.Init ( totalBuffers ); + + for ( u32 i = 0; i < this->mBuffers.Size (); ++i ){ + + result = AudioQueueAllocateBuffer ( this->mQueue, ( UInt32 )bufsize, &this->mBuffers [ i ]); + if ( result ){ + fprintf ( stderr, "AudioQueueAllocateBuffer failed with %ld\n", result ); + return; } + } // enable level metering UInt32 val = 1; - result = AudioQueueSetProperty( self->queue, - kAudioQueueProperty_EnableLevelMetering, - &val, - sizeof(UInt32) ); - if(result){ - fprintf(stderr, "AudioQueueSetProperty kAudioQueueProperty_EnableLevelMetering failed with %ld\n", result); + result = AudioQueueSetProperty ( + this->mQueue, + kAudioQueueProperty_EnableLevelMetering, + &val, + sizeof ( UInt32 ) + ); + + if ( result ) { + fprintf ( stderr, "AudioQueueSetProperty kAudioQueueProperty_EnableLevelMetering failed with %ld\n", result ); } - self->levels = (AudioQueueLevelMeterState*) malloc( self->mNumChannels * sizeof(AudioQueueLevelMeterState)); - - self->isQueueInitialized = true; - return 0; + + this->mSampleSize = sampleSize; } -int MOAIAudioSamplerCocoa::_start ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) - ; - - if (!self->isQueuePrimed) { - memset( self->mBufferReadSizeInBytes, 0, self->mBufferAryLen * sizeof(size_t)); - - for(u32 i=0;i< self->mBufferAryLen;++i){ - OSStatus result = AudioQueueEnqueueBuffer( self->queue, self->buffers[i], 0, NULL ); - if(result){ - fprintf(stderr, "AudioQueueEnqueueBuffer failed with %ld\n", result); - lua_pushstring ( L, "" ); - return 1; - } - } - self->currentReadIndex = 0; - self->currentWriteIndex = 0; - self->isQueuePrimed = true; - } - - OSStatus result = AudioQueueStart( self->queue, NULL ); - if(result){ - fprintf(stderr, "AudioQueueStart failed with %ld\n", result); - lua_pushstring ( L, "" ); - return 1; - } +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::InputCallback ( void* inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, const AudioTimeStamp *inStartTime, UInt32 inNumPackets, const AudioStreamPacketDescription* inPacketDesc ) { - self->isActive = true; - return 0; + UNUSED ( inStartTime ); + UNUSED ( inPacketDesc ); + + MOAIAudioSamplerCocoa* sampler = ( MOAIAudioSamplerCocoa* )inUserData; + + sampler->HandleInput ( inAQ, inBuffer, inNumPackets ); } -// @out data: array table -int MOAIAudioSamplerCocoa::_read ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) - ; - cc8 *tn = state.GetValue < cc8 * > ( 2, "float" ); - - int tnid = -1; - if( strcmp( tn, "float" ) == 0 ){ - tnid = 0; - } else if( strcmp( tn, "char" ) == 0 ){ - tnid = 8; - } else if( strcmp( tn, "short" ) == 0 ){ - tnid = 16; - } else if( strcmp( tn, "raw" ) == 0 ){ - tnid = 255; - } else { - lua_pushnil(L); - return 1; - } +//----------------------------------------------------------------// +MOAIAudioSamplerCocoa::MOAIAudioSamplerCocoa () : + mQueue ( 0 ), + mIsRunning ( false ), + mIsPaused ( false ), + mSessionActiveObserver ( 0 ), + mSessionInactiveObserver ( 0 ), + mStreamFormat ( 0 ), + mSampleSize ( 0 ), + mSamplesWritten ( 0 ) { + + RTTI_SINGLE ( MOAIInstanceEventSource ) - for(u32 i=0;i< self->mBufferAryLen;i++){ - u32 useInd = ( self->currentReadIndex + i ) % self->mBufferAryLen; - if( self->mBufferReadSizeInBytes[useInd] > 0 ){ - - short *data = self->mBufferAry[ useInd ]; - int datanum = ( int )self->mBufferReadSizeInBytes[ useInd ] / sizeof(short); - - if(tnid==255){ - short *outdata = (short*) malloc(sizeof(short) * datanum); - for(int j=0;jmBufferReadSizeInBytes[useInd ] = 0; // set 0 after read - self->currentReadIndex ++; - if( self->currentReadIndex >= self->mBufferAryLen ){ - self->currentReadIndex = 0; - } - return 1; // return a table - } - } - // no data is incoming. - lua_pushnil(L); - return 1; + mSessionActiveObserver = [[ NSNotificationCenter defaultCenter ] addObserverForName:@"UntzSessionActive" + object:nil + queue:nil + usingBlock:^( NSNotification* ) { + this->Resume (); + } + ]; + + mSessionInactiveObserver = [[ NSNotificationCenter defaultCenter ] addObserverForName:@"UntzSessionInactive" + object:nil + queue:nil + usingBlock:^( NSNotification* ) { + this->Pause (); + } + ]; } -int MOAIAudioSamplerCocoa::_stop ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) - ; - if ( self->queue ) { - self->isActive = false; - AudioQueueStop( self->queue, TRUE); +//----------------------------------------------------------------// +MOAIAudioSamplerCocoa::~MOAIAudioSamplerCocoa () { - self->isQueuePrimed = false; - } - return 0; + this->mStream.Set ( *this, 0 ); + this->Clear (); } -int MOAIAudioSamplerCocoa::_pause ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) - ; - self->pause(); - return 0; -} -int MOAIAudioSamplerCocoa::_resume ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) - ; - self->resume(); - return 0; -} -int MOAIAudioSamplerCocoa::_getLevels ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIAudioSamplerCocoa, "U" ) - ; - - if ( !self->isActive ) { - // no data is incoming. - lua_pushnil(L); - return 1; - } - - UInt32 data_sz = sizeof(AudioQueueLevelMeterState) * self->mNumChannels; - OSErr result = AudioQueueGetProperty( self->queue, - kAudioQueueProperty_CurrentLevelMeterDB, self->levels, - &data_sz ); - if(result){ - fprintf(stderr, "AudioQueueGetProperty kAudioQueueProperty_CurrentLevelMeterDB failed with %ld\n", result); - lua_pushnil(L); - return 1; + +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::Pause () { + + if ( this->mIsRunning && ( !this->mIsPaused )) { + AudioQueuePause ( this->mQueue ); + this->mIsPaused = true; } - - // average both channels for detection - // if the device has a stereo mic (the macbook has) it's helpful - double average = 0; - double peak = 0; - for (u32 i=0; imNumChannels; i++) { - average += (float)(self->levels[0].mAveragePower); - peak += (float)(self->levels[0].mPeakPower); +} + +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::Resume () { + + if ( this->mIsRunning && this->mIsPaused ) { + OSStatus result = AudioQueueStart ( this->mQueue, NULL ); + if ( result ) { + fprintf ( stderr, "AudioQueueStart failed %ld\n", result ); + } + this->mIsPaused = false; } - - lua_pushnumber( L, average / self->mNumChannels); - lua_pushnumber( L, peak / self->mNumChannels); - return 2; } +//----------------------------------------------------------------// void MOAIAudioSamplerCocoa::RegisterLuaClass ( MOAILuaState& state ) { - MOAINode::RegisterLuaClass ( state ); + MOAIInstanceEventSource::RegisterLuaClass ( state ); - // state.SetField ( -1, "ATTR_VOLUME", MOAIUntzSoundAttr::Pack ( ATTR_VOLUME )); + state.SetField ( -1, "EVENT_BUFFER", ( u32 )EVENT_BUFFER ); + + state.SetField ( -1, "SAMPLE_S8", ( u32 )ZLSample::SAMPLE_S8 ); + state.SetField ( -1, "SAMPLE_U8", ( u32 )ZLSample::SAMPLE_U8 ); + state.SetField ( -1, "SAMPLE_S16", ( u32 )ZLSample::SAMPLE_S16 ); + state.SetField ( -1, "SAMPLE_U16", ( u32 )ZLSample::SAMPLE_U16 ); + state.SetField ( -1, "SAMPLE_S32", ( u32 )ZLSample::SAMPLE_S32 ); + state.SetField ( -1, "SAMPLE_U32", ( u32 )ZLSample::SAMPLE_U32 ); + state.SetField ( -1, "SAMPLE_FLOAT", ( u32 )ZLSample::SAMPLE_FLOAT ); } //----------------------------------------------------------------// void MOAIAudioSamplerCocoa::RegisterLuaFuncs ( MOAILuaState& state ) { - MOAINode::RegisterLuaFuncs ( state ); + MOAIInstanceEventSource::RegisterLuaFuncs ( state ); luaL_Reg regTable [] = { - { "setNumChannels", _setNumChannels }, - { "setFrequency", _setFrequency }, - { "prepareBuffer", _prepareBuffer }, - { "start", _start }, - { "read", _read }, - { "stop", _stop }, - { "pause", _pause }, - { "resume", _resume }, - { "getLevels", _getLevels }, + { "getLevels", _getLevels }, + { "init", _init }, + { "pause", _pause }, + { "resume", _resume }, + { "setStream", _setStream }, + { "start", _start }, + { "stop", _stop }, { NULL, NULL } }; luaL_register ( state, 0, regTable ); } +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::Start () { + + if ( !this->mIsRunning ) { + + for ( u32 i = 0; i < this->mBuffers.Size (); ++i ) { + + OSStatus result = AudioQueueEnqueueBuffer ( this->mQueue, this->mBuffers [ i ], 0, NULL ); + + if ( result ) { + fprintf ( stderr, "AudioQueueEnqueueBuffer failed with %ld\n", result ); + return; + } + } + + OSStatus result = AudioQueueStart ( this->mQueue, NULL ); + if ( result ) { + fprintf ( stderr, "AudioQueueStart failed with %ld\n", result ); + return; + } + + this->mIsRunning = true; + } +} + +//----------------------------------------------------------------// +void MOAIAudioSamplerCocoa::Stop () { + if ( this->mIsRunning ) { + this->mIsRunning = false; + AudioQueueStop ( this->mQueue, YES ); + } +} diff --git a/src/moai-box2d/MOAIBox2DBody.cpp b/src/moai-box2d/MOAIBox2DBody.cpp index f08de1773e..9216067db8 100644 --- a/src/moai-box2d/MOAIBox2DBody.cpp +++ b/src/moai-box2d/MOAIBox2DBody.cpp @@ -30,7 +30,7 @@ int MOAIBox2DBody::_addChain ( lua_State* L ) { } float unitsToMeters = self->GetUnitsToMeters (); - u32 totalCoords = lua_objlen ( state, 2 ); + u32 totalCoords = ( u32 )lua_objlen ( state, 2 ); if( totalCoords < 4 || totalCoords % 2 != 0 ) { MOAILogF ( state, ZLLog::LOG_ERROR, MOAILogMessages::MOAIBox2DBody_InvalidVertexCount_D, totalCoords ); return 0; @@ -115,7 +115,7 @@ int MOAIBox2DBody::_addEdges ( lua_State* L ) { } float unitsToMeters = self->GetUnitsToMeters (); - u32 totalVerts = lua_objlen ( state, 2 ) / 2; + u32 totalVerts = ( u32 )lua_objlen ( state, 2 ) / 2; if (totalVerts) { diff --git a/src/moai-box2d/MOAIBox2DDebugDraw.cpp b/src/moai-box2d/MOAIBox2DDebugDraw.cpp index 20c02dbf96..c7b6a4f429 100644 --- a/src/moai-box2d/MOAIBox2DDebugDraw.cpp +++ b/src/moai-box2d/MOAIBox2DDebugDraw.cpp @@ -31,176 +31,177 @@ //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawPolygon ( const b2Vec2* vertices, int32 vertexCount, const b2Color& color ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPenColor ( color.r, color.g, color.b, 1.0f ); + gfxMgr.mGfxState.SetPenColor ( color.r, color.g, color.b, 1.0f ); - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_LOOP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_LOOP ); for ( int32 i = 0; i < vertexCount; ++i ) { - this->WriteVtx ( gfxDevice, vertices [ i ].x, vertices [ i ].y ); + this->WriteVtx ( gfxMgr.mVertexCache, vertices [ i ].x, vertices [ i ].y ); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawSolidPolygon ( const b2Vec2* vertices, int32 vertexCount, const b2Color& color ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetBlendMode ( ZGL_BLEND_FACTOR_SRC_ALPHA, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); + gfxMgr.mGfxState.SetBlendMode ( ZGL_BLEND_FACTOR_SRC_ALPHA, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); - gfxDevice.SetPenColor ( 0.5f * color.r, 0.5f * color.g, 0.5f * color.b, 0.5f ); + gfxMgr.mGfxState.SetPenColor ( 0.5f * color.r, 0.5f * color.g, 0.5f * color.b, 0.5f ); - gfxDevice.BeginPrim ( ZGL_PRIM_TRIANGLE_FAN ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_TRIANGLE_FAN ); for ( int32 i = 0; i < vertexCount; ++i ) { - this->WriteVtx ( gfxDevice, vertices [ i ].x, vertices [ i ].y ); + this->WriteVtx ( gfxMgr.mVertexCache, vertices [ i ].x, vertices [ i ].y ); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); - gfxDevice.SetBlendMode (); - gfxDevice.SetPenColor ( color.r, color.g, color.b, 1.0f ); + gfxMgr.mGfxState.SetBlendMode (); + gfxMgr.mGfxState.SetPenColor ( color.r, color.g, color.b, 1.0f ); - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_LOOP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_LOOP ); for (int32 i = 0; i < vertexCount; ++i) { - this->WriteVtx ( gfxDevice, vertices [ i ].x, vertices [ i ].y ); + this->WriteVtx ( gfxMgr.mVertexCache, vertices [ i ].x, vertices [ i ].y ); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawCircle ( const b2Vec2& center, float32 radius, const b2Color& color ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPenColor ( color.r, color.g, color.b, 1.0f ); + gfxMgr.mGfxState.SetPenColor ( color.r, color.g, color.b, 1.0f ); const float32 k_segments = 16.0f; const float32 k_increment = 2.0f * b2_pi / k_segments; - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_LOOP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_LOOP ); float32 theta = 0.0f; - for (int32 i = 0; i < k_segments; ++i) { - b2Vec2 v = center + radius * b2Vec2(cosf(theta), sinf(theta)); - this->WriteVtx ( gfxDevice, v.x, v.y ); + for ( int32 i = 0; i < k_segments; ++i ) { + b2Vec2 v = center + radius * b2Vec2 ( cosf ( theta ), sinf ( theta )); + this->WriteVtx ( gfxMgr.mVertexCache, v.x, v.y ); theta += k_increment; } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawSolidCircle ( const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetBlendMode ( ZGL_BLEND_FACTOR_SRC_ALPHA, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); - gfxDevice.SetPenColor ( 0.5f * color.r, 0.5f * color.g, 0.5f * color.b, 0.5f ); + gfxMgr.mGfxState.SetBlendMode ( ZGL_BLEND_FACTOR_SRC_ALPHA, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); + gfxMgr.mGfxState.SetPenColor ( 0.5f * color.r, 0.5f * color.g, 0.5f * color.b, 0.5f ); const float32 k_segments = 16.0f; const float32 k_increment = 2.0f * b2_pi / k_segments; - gfxDevice.BeginPrim ( ZGL_PRIM_TRIANGLE_FAN ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_TRIANGLE_FAN ); float32 theta = 0.0f; for (int32 i = 0; i < k_segments; ++i) { b2Vec2 v = center + radius * b2Vec2(cosf(theta), sinf(theta)); - this->WriteVtx ( gfxDevice, v.x, v.y ); + this->WriteVtx ( gfxMgr.mVertexCache, v.x, v.y ); theta += k_increment; } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); - gfxDevice.SetBlendMode (); - gfxDevice.SetPenColor ( color.r, color.g, color.b, 1.0f ); + gfxMgr.mGfxState.SetBlendMode (); + gfxMgr.mGfxState.SetPenColor ( color.r, color.g, color.b, 1.0f ); - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_LOOP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_LOOP ); theta = 0.0f; for (int32 i = 0; i < k_segments; ++i) { b2Vec2 v = center + radius * b2Vec2(cosf(theta), sinf(theta)); - this->WriteVtx ( gfxDevice, v.x, v.y ); + this->WriteVtx ( gfxMgr.mVertexCache, v.x, v.y ); theta += k_increment; } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); b2Vec2 p = center + radius * axis; - gfxDevice.BeginPrim ( ZGL_PRIM_LINES ); - this->WriteVtx ( gfxDevice, center.x, center.y ); - this->WriteVtx ( gfxDevice, p.x, p.y ); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINES ); + this->WriteVtx ( gfxMgr.mVertexCache, center.x, center.y ); + this->WriteVtx ( gfxMgr.mVertexCache, p.x, p.y ); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawSegment ( const b2Vec2& p1, const b2Vec2& p2, const b2Color& color ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPenColor ( color.r, color.g, color.b, 1.0f ); + gfxMgr.mGfxState.SetPenColor ( color.r, color.g, color.b, 1.0f ); - gfxDevice.BeginPrim ( ZGL_PRIM_LINES ); - this->WriteVtx ( gfxDevice, p1.x, p1.y ); - this->WriteVtx ( gfxDevice, p2.x, p2.y ); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINES ); + this->WriteVtx ( gfxMgr.mVertexCache, p1.x, p1.y ); + this->WriteVtx ( gfxMgr.mVertexCache, p2.x, p2.y ); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawTransform ( const b2Transform& xf ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); b2Vec2 p1 = xf.p, p2; const float32 k_axisScale = 0.4f; - gfxDevice.BeginPrim ( ZGL_PRIM_LINES ); + gfxMgr.mGfxState.SetPenColor ( 1.0f, 0.0f, 0.0f, 1.0f ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINES ); - gfxDevice.SetPenColor(1.0f, 0.0f, 0.0f, 1.0f); - this->WriteVtx(gfxDevice, p1.x, p1.y); + this->WriteVtx ( gfxMgr.mVertexCache, p1.x, p1.y ); - p2 = p1 + k_axisScale * xf.q.GetXAxis(); - this->WriteVtx(gfxDevice, p2.x, p2.y); + p2 = p1 + k_axisScale * xf.q.GetXAxis (); + this->WriteVtx ( gfxMgr.mVertexCache, p2.x, p2.y ); - gfxDevice.EndPrim(); + gfxMgr.mVertexCache.EndPrim(); - gfxDevice.BeginPrim ( ZGL_PRIM_LINES ); - - gfxDevice.SetPenColor(0.0f, 1.0f, 0.0f, 1.0f); - this->WriteVtx(gfxDevice, p1.x, p1.y); + gfxMgr.mGfxState.SetPenColor ( 0.0f, 1.0f, 0.0f, 1.0f ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINES ); + + this->WriteVtx ( gfxMgr.mVertexCache, p1.x, p1.y ); - p2 = p1 + k_axisScale * xf.q.GetYAxis(); - this->WriteVtx(gfxDevice, p2.x, p2.y); + p2 = p1 + k_axisScale * xf.q.GetYAxis (); + this->WriteVtx ( gfxMgr.mVertexCache, p2.x, p2.y ); - gfxDevice.EndPrim(); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawPoint ( const b2Vec2& p, float32 size, const b2Color& color ) { + UNUSED ( size ); - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.BeginPrim(ZGL_PRIM_POINTS); - gfxDevice.SetPenColor(color.r, color.g, color.b, 1.0f); - this->WriteVtx(gfxDevice, p.x, p.y); - gfxDevice.EndPrim(); + gfxMgr.mGfxState.SetPenColor ( color.r, color.g, color.b, 1.0f ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_POINTS ); + this->WriteVtx ( gfxMgr.mVertexCache, p.x, p.y ); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIBox2DDebugDraw::DrawAABB ( b2AABB* aabb, const b2Color& c ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPenColor(c.r, c.g, c.b, 1.0f); - gfxDevice.BeginPrim(ZGL_PRIM_LINE_LOOP); - this->WriteVtx(gfxDevice, aabb->lowerBound.x, aabb->lowerBound.y); - this->WriteVtx(gfxDevice, aabb->upperBound.x, aabb->lowerBound.y); - this->WriteVtx(gfxDevice, aabb->upperBound.x, aabb->upperBound.y); - this->WriteVtx(gfxDevice, aabb->lowerBound.x, aabb->upperBound.y); - gfxDevice.EndPrim(); + gfxMgr.mGfxState.SetPenColor ( c.r, c.g, c.b, 1.0f ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_LOOP ); + this->WriteVtx ( gfxMgr.mVertexCache, aabb->lowerBound.x, aabb->lowerBound.y ); + this->WriteVtx ( gfxMgr.mVertexCache, aabb->upperBound.x, aabb->lowerBound.y ); + this->WriteVtx ( gfxMgr.mVertexCache, aabb->upperBound.x, aabb->upperBound.y ); + this->WriteVtx ( gfxMgr.mVertexCache, aabb->lowerBound.x, aabb->upperBound.y ); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// -void MOAIBox2DDebugDraw::WriteVtx ( MOAIGfxDevice& gfxDevice, float x, float y ) { +void MOAIBox2DDebugDraw::WriteVtx ( MOAIGfxVertexCache& gfxMgr, float x, float y ) { ZLVec3D vtx; vtx.mX = x * this->mScale; vtx.mY = y * this->mScale; vtx.mZ = 0.0f; - gfxDevice.WriteVtx ( vtx ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.WriteVtx ( vtx ); + gfxMgr.WritePenColor4b (); } diff --git a/src/moai-box2d/MOAIBox2DDebugDraw.h b/src/moai-box2d/MOAIBox2DDebugDraw.h index c6364e5d15..347a2dfa8e 100644 --- a/src/moai-box2d/MOAIBox2DDebugDraw.h +++ b/src/moai-box2d/MOAIBox2DDebugDraw.h @@ -21,7 +21,7 @@ #include -class MOAIGfxDevice; +class MOAIGfxMgr; struct b2AABB; // This class implements debug drawing callbacks that are invoked @@ -32,7 +32,7 @@ class MOAIBox2DDebugDraw : public b2Draw { float mScale; - void WriteVtx ( MOAIGfxDevice& gfxDevice, float x, float y ); + void WriteVtx ( MOAIGfxVertexCache& vertexCache, float x, float y ); public: void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color); diff --git a/src/moai-box2d/MOAIBox2DWorld.cpp b/src/moai-box2d/MOAIBox2DWorld.cpp index 02de582466..82b4ac4255 100644 --- a/src/moai-box2d/MOAIBox2DWorld.cpp +++ b/src/moai-box2d/MOAIBox2DWorld.cpp @@ -842,10 +842,10 @@ int MOAIBox2DWorld::_getPerformance ( lua_State* L ) { */ int MOAIBox2DWorld::_getRayCast ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIBox2DWorld, "U" ) - float p1x=state.GetValue < float >( 2, 0 ); - float p1y=state.GetValue < float >( 3, 0 ); - float p2x=state.GetValue < float >( 4, 0 ); - float p2y=state.GetValue < float >( 5, 0 ); + float p1x=state.GetValue < float >( 2, 0 ) * self->mUnitsToMeters; + float p1y=state.GetValue < float >( 3, 0 ) * self->mUnitsToMeters; + float p2x=state.GetValue < float >( 4, 0 ) * self->mUnitsToMeters; + float p2y=state.GetValue < float >( 5, 0 ) * self->mUnitsToMeters; b2Vec2 p1(p1x,p1y); b2Vec2 p2(p2x,p2y); @@ -1164,7 +1164,7 @@ MOAIBox2DWorld::~MOAIBox2DWorld () { void MOAIBox2DWorld::OnUpdate ( double step ) { this->mLock = true; - this->mWorld->Step ( step, this->mVelocityIterations, this->mPositionIterations ); + this->mWorld->Step (( float32 )step, this->mVelocityIterations, this->mPositionIterations ); this->mLock = false; this->Destroy (); @@ -1237,14 +1237,12 @@ void MOAIBox2DWorld::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIBox2DWorld::Render () { - if ( this->mDebugDraw ) { + if ( this->mDebugDraw && MOAIDraw::Bind ()) { - MOAIDraw::Bind (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_WORLD, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::WORLD_MTX ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::VIEW_PROJ_MTX )); this->mDebugDraw->mScale = 1.0f / this->mUnitsToMeters; this->mWorld->DrawDebugData (); diff --git a/src/moai-core/MOAIEnvironment.cpp b/src/moai-core/MOAIEnvironment.cpp index 9ac6e1c300..a856bc9729 100644 --- a/src/moai-core/MOAIEnvironment.cpp +++ b/src/moai-core/MOAIEnvironment.cpp @@ -114,30 +114,30 @@ void MOAIEnvironment::DetectEnvironment () { strcpy ( pszOS, TEXT ( "Win" )); if ( osvi.dwMajorVersion == 6 ) { if ( osvi.dwMinorVersion == 1 ) { - if( osvi.wProductType == VER_NT_WORKSTATION ) - strcat(pszOS, TEXT("7")); - else strcat(pszOS, TEXT("2008R2" )); + if ( osvi.wProductType == VER_NT_WORKSTATION ) + strcat ( pszOS, TEXT ( "7" )); + else strcat ( pszOS, TEXT ( "2008R2" )); } else if( osvi.dwMinorVersion == 0 ) { if( osvi.wProductType == VER_NT_WORKSTATION ) - strcat(pszOS, TEXT("Vista")); - else strcat(pszOS, TEXT("Server2008" )); + strcat ( pszOS, TEXT ( "Vista" )); + else strcat ( pszOS, TEXT ( "Server2008" )); } } else if ( osvi.dwMajorVersion == 5 ) { if (osvi.dwMinorVersion == 2) { if( osvi.wProductType == VER_NT_WORKSTATION && si.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64) { - strcat(pszOS, TEXT( "XPx64")); + strcat ( pszOS, TEXT ( "XPx64" )); } else { - strcat(pszOS, TEXT("Server2003")); + strcat ( pszOS, TEXT ( "Server2003" )); } } else if ( osvi.dwMinorVersion == 1 ) { - strcat(pszOS, TEXT("XP")); + strcat ( pszOS, TEXT ( "XP" )); } else if ( osvi.dwMinorVersion == 0 ) { - strcat(pszOS, TEXT("2000")); + strcat ( pszOS, TEXT ( "2000" )); } } diff --git a/src/moai-core/MOAIEnvironment.h b/src/moai-core/MOAIEnvironment.h index b2fddd670f..b1cef3bb04 100644 --- a/src/moai-core/MOAIEnvironment.h +++ b/src/moai-core/MOAIEnvironment.h @@ -7,6 +7,7 @@ #include #include +#define MOAI_ENV_appDirectory "appDirectory" #define MOAI_ENV_appDisplayName "appDisplayName" #define MOAI_ENV_appID "appID" #define MOAI_ENV_appVersion "appVersion" @@ -34,13 +35,17 @@ #define MOAI_ENV_osVersion "osVersion" #define MOAI_ENV_resourceDirectory "resourceDirectory" #define MOAI_ENV_screenDpi "screenDpi" +#define MOAI_ENV_screenScale "screenScale" #define MOAI_ENV_systemLanguageCode "systemLanguageCode" #define MOAI_ENV_verticalResolution "verticalResolution" #define MOAI_ENV_horizontalResolution "horizontalResolution" #define MOAI_ENV_udid "udid" #define MOAI_ENV_openUdid "openUdid" -#define MOAI_ENV_iosIFA "iosIFA" +#if AKU_WITH_IFA + #define MOAI_ENV_iosIFA "iosIFA" +#endif + #define MOAI_ENV_iosIFV "iosIFV" #define OS_BRAND_AMAZON "Amazon" diff --git a/src/moai-core/MOAIGlobals.cpp b/src/moai-core/MOAIGlobals.cpp index f96b8466fc..9b262bd368 100644 --- a/src/moai-core/MOAIGlobals.cpp +++ b/src/moai-core/MOAIGlobals.cpp @@ -3,6 +3,7 @@ #include "pch.h" +#include #include //================================================================// @@ -13,6 +14,10 @@ void MOAIGlobalClassBase::OnGlobalsFinalize () { } +//----------------------------------------------------------------// +void MOAIGlobalClassBase::OnGlobalsInitialize () { +} + //----------------------------------------------------------------// MOAIGlobalClassBase::MOAIGlobalClassBase () { } @@ -36,6 +41,12 @@ MOAIGlobals::~MOAIGlobals () { size_t total = this->mGlobals.Size (); + MOAILuaRuntime::Get ().Close (); // call this ahead of everything to purge all the Lua bindings + + // Lua runtime gets special treatment + u32 luaRuntimeID = MOAIGlobalID < MOAILuaRuntime >::GetID (); + this->mGlobals [ luaRuntimeID ].mIsValid = false; + // finalize everything for ( size_t i = 1; i <= total; ++i ) { MOAIGlobalPair& pair = this->mGlobals [ total - i ]; diff --git a/src/moai-core/MOAIGlobals.h b/src/moai-core/MOAIGlobals.h index 93ec976cb6..7f86232098 100644 --- a/src/moai-core/MOAIGlobals.h +++ b/src/moai-core/MOAIGlobals.h @@ -45,6 +45,7 @@ class MOAIGlobalClassBase { //----------------------------------------------------------------// virtual void OnGlobalsFinalize (); + virtual void OnGlobalsInitialize (); MOAIGlobalClassBase (); virtual ~MOAIGlobalClassBase (); }; @@ -114,6 +115,8 @@ class MOAIGlobals { pair.mGlobal = global; pair.mProxy = 0; pair.mIsValid = true; + + pair.mGlobalBase->OnGlobalsInitialize (); } if ( !this->mGlobals [ id ].mIsValid ) { diff --git a/src/moai-core/MOAILogMessages.cpp b/src/moai-core/MOAILogMessages.cpp index 52b431f161..d03dd87191 100644 --- a/src/moai-core/MOAILogMessages.cpp +++ b/src/moai-core/MOAILogMessages.cpp @@ -35,21 +35,21 @@ bool MOAILogMessages::CheckFileExists ( cc8* filename, lua_State* L ) { } //----------------------------------------------------------------// -bool MOAILogMessages::CheckIndex ( u32 idx, u32 size, lua_State* L ) { +bool MOAILogMessages::CheckIndex ( size_t idx, size_t size, lua_State* L ) { if ( size == 0 ) { MOAILogF ( L, ZLLog::LOG_ERROR, MOAILogMessages::MOAI_IndexNoReserved ); return false; } else if ( !( idx < size )) { - MOAILogF ( L, MOAILogMessages::MOAI_IndexOutOfRange_DDD, idx, 0, size - 1 ); + MOAILogF ( L, MOAILogMessages::MOAI_IndexOutOfRange_DDD, ( u32 )idx, 0, ( u32 )( size - 1 )); return false; } return true; } //----------------------------------------------------------------// -bool MOAILogMessages::CheckIndexPlusOne ( u32 idx, u32 size, lua_State* L ) { +bool MOAILogMessages::CheckIndexPlusOne ( size_t idx, size_t size, lua_State* L ) { if ( size == 0 ) { MOAILogF ( L, ZLLog::LOG_ERROR, MOAILogMessages::MOAI_IndexNoReserved ); @@ -63,7 +63,7 @@ bool MOAILogMessages::CheckIndexPlusOne ( u32 idx, u32 size, lua_State* L ) { } //----------------------------------------------------------------// -bool MOAILogMessages::CheckReserve ( u32 idx, u32 size, lua_State* L ) { +bool MOAILogMessages::CheckReserve ( size_t idx, size_t size, lua_State* L ) { if ( !( idx < size )) { MOAILogF ( L, ZLLog::LOG_ERROR, MOAILogMessages::MOAI_IndexNoReserved ); diff --git a/src/moai-core/MOAILogMessages.h b/src/moai-core/MOAILogMessages.h index cbe218a79d..5483599709 100644 --- a/src/moai-core/MOAILogMessages.h +++ b/src/moai-core/MOAILogMessages.h @@ -44,9 +44,9 @@ class MOAILogMessages { //----------------------------------------------------------------// static bool CheckFileExists ( cc8* filename, lua_State* L = 0 ); - static bool CheckIndex ( u32 idx, u32 size, lua_State* L = 0 ); - static bool CheckIndexPlusOne ( u32 idx, u32 size, lua_State* L = 0 ); - static bool CheckReserve ( u32 idx, u32 size, lua_State* L = 0 ); + static bool CheckIndex ( size_t idx, size_t size, lua_State* L = 0 ); + static bool CheckIndexPlusOne ( size_t idx, size_t size, lua_State* L = 0 ); + static bool CheckReserve ( size_t idx, size_t size, lua_State* L = 0 ); static void RegisterDefaultLogMessages (); static void RegisterLogMessageIDs ( MOAILuaState& state ); }; diff --git a/src/moai-core/MOAILogMgr.cpp b/src/moai-core/MOAILogMgr.cpp index 2b2e78eaa9..db6a9a5d4a 100644 --- a/src/moai-core/MOAILogMgr.cpp +++ b/src/moai-core/MOAILogMgr.cpp @@ -88,9 +88,9 @@ int MOAILogMgr::_log ( lua_State* L ) { } STLString log; - log.write ( "[%s] %s", token, msg ); + log.write ( "[%s-%d] %s", token, level, msg ); - ZLLogF ( ZLLog::CONSOLE, "%s", log.c_str ()); // Caller's string may contain % and should NOT be used as a format to LogF + ZLLog::LogF ( level, ZLLog::CONSOLE, "%s", log.c_str ()); // Caller's string may contain % and should NOT be used as a format to LogF return 0; } @@ -225,21 +225,21 @@ void MOAILogMgr::LogV ( lua_State *L, u32 level, cc8* message, va_list args ) { if ( ZLLog::IsEnabled ( level )) { if ( L ) { - ZLLogF ( ZLLog::CONSOLE, "----------------------------------------------------------------\n" ); + ZLLog::LogF ( level, ZLLog::CONSOLE, "----------------------------------------------------------------\n" ); } - ZLLogV ( ZLLog::CONSOLE, message, args ); + ZLLog::LogV ( level, ZLLog::CONSOLE, message, args ); size_t msgSize = strlen ( message ); if ( msgSize && ( message [ msgSize - 1 ] != '\n' )) { - ZLLogF ( ZLLog::CONSOLE, "\n" ); + ZLLog::LogF ( level, ZLLog::CONSOLE, "\n" ); } if ( L ) { - ZLLogF ( ZLLog::CONSOLE, "\n" ); + ZLLog::LogF ( level, ZLLog::CONSOLE, "\n" ); MOAILuaState state ( L ); state.LogStackTrace ( level, ZLLog::CONSOLE, NULL, 0 ); - ZLLogF ( ZLLog::CONSOLE, "\n" ); + ZLLog::LogF ( level, ZLLog::CONSOLE, "\n" ); } } } diff --git a/src/moai-core/MOAILuaObject.cpp b/src/moai-core/MOAILuaObject.cpp index 30b233c636..204d4ba00a 100644 --- a/src/moai-core/MOAILuaObject.cpp +++ b/src/moai-core/MOAILuaObject.cpp @@ -222,7 +222,7 @@ void MOAILuaObject::BindToLua ( MOAILuaState& state ) { // and take a weak ref back to the userdata this->mUserdata.SetRef ( state, -1 ); - assert ( !lua_isnil ( state, -1 )); + assert ( this->mUserdata ); // NOTE: we have to do this *after* mUserdata has been initialized as LuaRetain calls PushLuaUserdata // which in turn calls BindToLua if there is no mUserdata... @@ -294,6 +294,12 @@ bool MOAILuaObject::IsSingleton () { return luaClass->IsSingleton (); } +//----------------------------------------------------------------// +void MOAILuaObject::LuaRelease () { + + this->LuaRelease ( this ); +} + //----------------------------------------------------------------// void MOAILuaObject::LuaRelease ( MOAILuaObject* object ) { @@ -329,6 +335,12 @@ void MOAILuaObject::LuaRelease ( MOAILuaObject* object ) { object->Release (); } +//----------------------------------------------------------------// +void MOAILuaObject::LuaRetain () { + + this->LuaRetain ( this ); +} + //----------------------------------------------------------------// void MOAILuaObject::LuaRetain ( MOAILuaObject* object ) { diff --git a/src/moai-core/MOAILuaObject.h b/src/moai-core/MOAILuaObject.h index 47fb63a36c..68c44b8a12 100644 --- a/src/moai-core/MOAILuaObject.h +++ b/src/moai-core/MOAILuaObject.h @@ -68,7 +68,9 @@ class MOAILuaObject : bool IsBound (); static bool IsMoaiUserdata ( MOAILuaState& state, int idx ); bool IsSingleton (); + void LuaRelease (); void LuaRelease ( MOAILuaObject* object ); + void LuaRetain (); void LuaRetain ( MOAILuaObject* object ); MOAILuaObject (); virtual ~MOAILuaObject (); diff --git a/src/moai-core/MOAILuaRef.cpp b/src/moai-core/MOAILuaRef.cpp index 22389be951..272397e368 100644 --- a/src/moai-core/MOAILuaRef.cpp +++ b/src/moai-core/MOAILuaRef.cpp @@ -217,7 +217,7 @@ bool MOAILuaMemberRef::PushRef ( MOAILuaState& state ) { lua_rawgeti ( state, -1, this->mRefID ); lua_replace ( state, -2 ); } - isNil = lua_isnil ( state, -1 ); + isNil = state.IsNilOrNone ( -1 ); } if ( isNil ) { @@ -236,7 +236,7 @@ void MOAILuaMemberRef::SetRef ( MOAILuaObject& owner, MOAILuaState& state, int i this->Clear (); - if ( lua_isnil ( state, idx ) == false ) { + if ( state.IsNilOrNone ( idx ) == false ) { idx = state.AbsIndex ( idx ); diff --git a/src/moai-core/MOAILuaRuntime.cpp b/src/moai-core/MOAILuaRuntime.cpp index 5ed44cdbf6..6553ab6a4a 100644 --- a/src/moai-core/MOAILuaRuntime.cpp +++ b/src/moai-core/MOAILuaRuntime.cpp @@ -940,7 +940,7 @@ void MOAILuaRuntime::PushHistogram ( MOAILuaState& state, cc8* trackingGroup ) size_t count = histogramIt->second; lua_pushstring ( state, name ); - lua_pushnumber ( state, count ); + lua_pushnumber ( state, ( lua_Number )count ); lua_settable ( state, -3 ); } } @@ -1112,8 +1112,8 @@ void MOAILuaRuntime::ReportLeaksFormatted ( cc8* filename, cc8* trackingGroup ) const ObjectSet& objectSet = i->second; ZLLogF ( file, "Allocation: %lu\n", objectSet.size ()); - for ( ObjectSetIt objectSetIt = objectSet.begin (); objectSetIt != objectSet.end (); ++objectSetIt ) { - MOAILuaObject* object = *objectSetIt; + for ( ObjectSetConstIt objectSetIt = objectSet.begin (); objectSetIt != objectSet.end (); ++objectSetIt ) { + const MOAILuaObject* object = *objectSetIt; ZLLogF ( file, "<%s> %p\n", object->TypeName (), object ); if ( traversalState.mPathMap.contains ( object )) { diff --git a/src/moai-core/MOAILuaRuntime.h b/src/moai-core/MOAILuaRuntime.h index ce1a3f55e5..2ef49518b0 100644 --- a/src/moai-core/MOAILuaRuntime.h +++ b/src/moai-core/MOAILuaRuntime.h @@ -41,7 +41,7 @@ class MOAILuaTraversalState { typedef STLSet < const void* > TraversalSet; typedef TraversalSet::iterator TraversalSetIt; - typedef STLMap < MOAILuaObject*, StringSet > ObjectPathMap; + typedef STLMap < const MOAILuaObject*, StringSet > ObjectPathMap; typedef ObjectPathMap::iterator ObjectPathMapIt; TraversalSet mTraversalStack; // to hold traversed objects @@ -68,6 +68,7 @@ class MOAILuaRuntime : typedef STLSet < MOAILuaObject* > ObjectSet; typedef ObjectSet::iterator ObjectSetIt; + typedef ObjectSet::const_iterator ObjectSetConstIt; typedef STLMap < MOAILuaObject*, MOAILuaObjectInfo > TrackingMap; typedef TrackingMap::iterator TrackingMapIt; diff --git a/src/moai-core/MOAILuaSharedPtr.h b/src/moai-core/MOAILuaSharedPtr.h index 08398757a2..583e4089c9 100644 --- a/src/moai-core/MOAILuaSharedPtr.h +++ b/src/moai-core/MOAILuaSharedPtr.h @@ -15,12 +15,6 @@ class MOAILuaSharedPtr { TYPE* mObject; - //----------------------------------------------------------------// - inline void operator = ( const MOAILuaSharedPtr < TYPE >& assign ) { - UNUSED ( assign ); - assert ( false ); // unsupported - }; - //----------------------------------------------------------------// inline TYPE* Get () { return this->mObject; @@ -31,13 +25,6 @@ class MOAILuaSharedPtr { return this->mObject; } - //----------------------------------------------------------------// - MOAILuaSharedPtr ( const MOAILuaSharedPtr < TYPE >& assign ) : - mObject ( 0 ) { - UNUSED ( assign ); - assert ( false ); // unsupported - }; - public: //----------------------------------------------------------------// @@ -79,6 +66,13 @@ class MOAILuaSharedPtr { inline operator const TYPE* () const { return this->Get (); }; + + //----------------------------------------------------------------// + inline void operator = ( const MOAILuaSharedPtr < TYPE >& assign ) { + assert ( !this->mObject ); + this->mObject = assign.mObject; + (( MOAILuaSharedPtr < TYPE >& )assign ).mObject = 0; + }; //----------------------------------------------------------------// inline bool PushRef ( MOAILuaState& state ) { @@ -111,6 +105,12 @@ class MOAILuaSharedPtr { ~MOAILuaSharedPtr () { assert ( !this->mObject ); // must be manually cleared before destruction; use Set ( owner, 0 ) } + + //----------------------------------------------------------------// + MOAILuaSharedPtr ( const MOAILuaSharedPtr < TYPE >& assign ) : + mObject ( assign.mObject ) { + (( MOAILuaSharedPtr < TYPE >& )assign ).mObject = 0; + }; }; #endif diff --git a/src/moai-core/MOAILuaState.cpp b/src/moai-core/MOAILuaState.cpp index 98a83e3af1..40ce12c94d 100644 --- a/src/moai-core/MOAILuaState.cpp +++ b/src/moai-core/MOAILuaState.cpp @@ -511,8 +511,6 @@ int MOAILuaState::GetLuaThreadStatus ( lua_State* thread ) { default: // some error occured return THREAD_ERROR; } - - return THREAD_UNKNOWN; } //----------------------------------------------------------------// @@ -860,13 +858,13 @@ ZLBox MOAILuaState::GetValue < ZLBox >( int idx, const ZLBox value ) { ZLBox box; - box.mMin.mX = lua_tonumber ( this->mState, idx + 0 ); - box.mMin.mY = lua_tonumber ( this->mState, idx + 1 ); - box.mMin.mZ = lua_tonumber ( this->mState, idx + 2 ); + box.mMin.mX = ( float )lua_tonumber ( this->mState, idx + 0 ); + box.mMin.mY = ( float )lua_tonumber ( this->mState, idx + 1 ); + box.mMin.mZ = ( float )lua_tonumber ( this->mState, idx + 2 ); - box.mMax.mX = lua_tonumber ( this->mState, idx + 3 ); - box.mMax.mY = lua_tonumber ( this->mState, idx + 4 ); - box.mMax.mZ = lua_tonumber ( this->mState, idx + 5 ); + box.mMax.mX = ( float )lua_tonumber ( this->mState, idx + 3 ); + box.mMax.mY = ( float )lua_tonumber ( this->mState, idx + 4 ); + box.mMax.mZ = ( float )lua_tonumber ( this->mState, idx + 5 ); return box; } @@ -881,10 +879,10 @@ ZLColorVec MOAILuaState::GetValue < ZLColorVec >( int idx, const ZLColorVec valu ZLColorVec color; - color.mR = lua_tonumber ( this->mState, idx + 0 ); - color.mG = lua_tonumber ( this->mState, idx + 1 ); - color.mB = lua_tonumber ( this->mState, idx + 2 ); - color.mA = lua_tonumber ( this->mState, idx + 3 ); + color.mR = ( float )lua_tonumber ( this->mState, idx + 0 ); + color.mG = ( float )lua_tonumber ( this->mState, idx + 1 ); + color.mB = ( float )lua_tonumber ( this->mState, idx + 2 ); + color.mA = ( float )lua_tonumber ( this->mState, idx + 3 ); return color; } @@ -899,10 +897,10 @@ ZLRect MOAILuaState::GetValue < ZLRect >( int idx, const ZLRect value ) { if ( this->CheckParams ( idx, "NNNN", false )) { - rect.mXMin = lua_tonumber ( this->mState, idx + 0 ); - rect.mYMin = lua_tonumber ( this->mState, idx + 1 ); - rect.mXMax = lua_tonumber ( this->mState, idx + 2 ); - rect.mYMax = lua_tonumber ( this->mState, idx + 3 ); + rect.mXMin = ( float )lua_tonumber ( this->mState, idx + 0 ); + rect.mYMin = ( float )lua_tonumber ( this->mState, idx + 1 ); + rect.mXMax = ( float )lua_tonumber ( this->mState, idx + 2 ); + rect.mYMax = ( float )lua_tonumber ( this->mState, idx + 3 ); return rect; } @@ -910,12 +908,12 @@ ZLRect MOAILuaState::GetValue < ZLRect >( int idx, const ZLRect value ) { rect.mXMin = value.mXMin; rect.mYMin = value.mYMin; - rect.mXMax = value.mXMin + lua_tonumber ( this->mState, idx + 1 ); - rect.mYMax = value.mYMin + lua_tonumber ( this->mState, idx + 2 ); + rect.mXMax = value.mXMin + ( float )lua_tonumber ( this->mState, idx + 1 ); + rect.mYMax = value.mYMin + ( float )lua_tonumber ( this->mState, idx + 2 ); } else if ( this->IsType ( idx, LUA_TNUMBER )) { - float size = lua_tonumber ( this->mState, idx ); + float size = ( float )lua_tonumber ( this->mState, idx ); rect.mXMin = value.mXMin; rect.mYMin = value.mYMin; @@ -934,8 +932,8 @@ ZLVec2D MOAILuaState::GetValue < ZLVec2D >( int idx, const ZLVec2D value ) { ZLVec2D vec; - vec.mX = lua_tonumber ( this->mState, idx + 0 ); - vec.mY = lua_tonumber ( this->mState, idx + 1 ); + vec.mX = ( float )lua_tonumber ( this->mState, idx + 0 ); + vec.mY = ( float )lua_tonumber ( this->mState, idx + 1 ); return vec; } @@ -950,9 +948,9 @@ ZLVec3D MOAILuaState::GetValue < ZLVec3D >( int idx, const ZLVec3D value ) { ZLVec3D vec; - vec.mX = lua_tonumber ( this->mState, idx + 0 ); - vec.mY = lua_tonumber ( this->mState, idx + 1 ); - vec.mZ = lua_tonumber ( this->mState, idx + 2 ); + vec.mX = ( float )lua_tonumber ( this->mState, idx + 0 ); + vec.mY = ( float )lua_tonumber ( this->mState, idx + 1 ); + vec.mZ = ( float )lua_tonumber ( this->mState, idx + 2 ); return vec; } @@ -1059,7 +1057,7 @@ bool MOAILuaState::IsTableOrUserdata ( int idx ) { bool MOAILuaState::IsTrueOrNotNil ( int idx ) { if ( lua_isboolean ( this->mState, idx )) { - return lua_toboolean ( this->mState, idx ); + return lua_toboolean ( this->mState, idx ) ? true : false; } return !lua_isnil ( this->mState, idx ); } diff --git a/src/moai-core/MOAILuaState.h b/src/moai-core/MOAILuaState.h index c205f3f686..8ab874d6a9 100644 --- a/src/moai-core/MOAILuaState.h +++ b/src/moai-core/MOAILuaState.h @@ -170,6 +170,28 @@ class MOAILuaState { template < typename TYPE > void SetFieldByIndex ( int idx, int key, TYPE value ); template < typename TYPE > void SetGlobal ( cc8* key, TYPE value ); template < typename TYPE > void WriteArray ( int size, TYPE* values ); + + //----------------------------------------------------------------// + template < typename TYPE > + TYPE GetFieldValue ( int idx, cc8* key, TYPE value ) { + + this->GetField ( idx, key ); + TYPE result = this->GetValue < TYPE >( -1, value ); + this->Pop (); + + return result; + } + + //----------------------------------------------------------------// + template < typename TYPE > + TYPE GetFieldValue ( int idx, int key, TYPE value ) { + + this->GetField ( idx, key ); + TYPE result = this->GetValue < TYPE >( -1, value ); + this->Pop (); + + return result; + } }; //----------------------------------------------------------------// diff --git a/src/moai-core/MOAIScopedLuaState.cpp b/src/moai-core/MOAIScopedLuaState.cpp index 8d7e6ae85f..620840cd34 100644 --- a/src/moai-core/MOAIScopedLuaState.cpp +++ b/src/moai-core/MOAIScopedLuaState.cpp @@ -13,6 +13,12 @@ // MOAIScopedLuaState //================================================================// +//----------------------------------------------------------------// +int MOAIScopedLuaState::GetLocalTop () { + + return this->GetTop () - this->mRestoreTop; +} + //----------------------------------------------------------------// void MOAIScopedLuaState::PinTop () { diff --git a/src/moai-core/MOAIScopedLuaState.h b/src/moai-core/MOAIScopedLuaState.h index 1403611979..da01ee88ac 100644 --- a/src/moai-core/MOAIScopedLuaState.h +++ b/src/moai-core/MOAIScopedLuaState.h @@ -21,6 +21,7 @@ class MOAIScopedLuaState : public: //----------------------------------------------------------------// + int GetLocalTop (); void PinTop (); void PinTop ( int top ); void Set ( lua_State* L ); diff --git a/src/moai-core/MOAISerializer.cpp b/src/moai-core/MOAISerializer.cpp index b6495f548b..255daf0076 100644 --- a/src/moai-core/MOAISerializer.cpp +++ b/src/moai-core/MOAISerializer.cpp @@ -185,17 +185,17 @@ int MOAISerializer::_setBase64Enabled ( lua_State* L ) { //================================================================// //----------------------------------------------------------------// -MOAISerializerBase::ObjID MOAISerializer::AffirmMemberID ( MOAILuaObject* object ) { +MOAISerializerBase::ObjID MOAISerializer::AffirmMemberID ( MOAILuaObject* object, bool processMetatable ) { if ( object ) { MOAIScopedLuaState state = object->GetSelf (); - return this->AffirmMemberID ( state, -1 ); + return this->AffirmMemberID ( state, -1, processMetatable ); } return NULL_OBJ_ID; } //----------------------------------------------------------------// -MOAISerializerBase::ObjID MOAISerializer::AffirmMemberID ( MOAILuaState& state, int idx ) { +MOAISerializerBase::ObjID MOAISerializer::AffirmMemberID ( MOAILuaState& state, int idx, bool processMetatable ) { if ( !( state.IsType ( idx, LUA_TUSERDATA ) || state.IsType ( idx, LUA_TTABLE ))) return NULL_OBJ_ID; @@ -242,9 +242,9 @@ MOAISerializerBase::ObjID MOAISerializer::AffirmMemberID ( MOAILuaState& state, int status = state.DebugCall ( 3, 3 ); if ( status == 0 ) { - objectInfo.mUserTableID = this->AffirmMemberID ( state, -3 ); - objectInfo.mMemberTableID = this->AffirmMemberID ( state, -2 ); - objectInfo.mInitTableID = this->AffirmMemberID ( state, -1 ); + objectInfo.mUserTableID = this->AffirmMemberID ( state, -3, false ); + objectInfo.mMemberTableID = this->AffirmMemberID ( state, -2, false ); + objectInfo.mInitTableID = this->AffirmMemberID ( state, -1, false ); state.Pop ( 3 ); } } @@ -255,9 +255,15 @@ MOAISerializerBase::ObjID MOAISerializer::AffirmMemberID ( MOAILuaState& state, this->mTableMap [ memberID ].SetRef ( state, idx ); + if ( processMetatable && lua_getmetatable ( state, idx )) { + this->AffirmMemberID ( state, -1 ); + state.Pop ( 1 ); + } + u32 itr = state.PushTableItr ( idx ); while ( state.TableItrNext ( itr )) { - this->AffirmMemberID ( state, -1 ); + this->AffirmMemberID ( state, -2 ); // key + this->AffirmMemberID ( state, -1 ); // value } } return memberID; @@ -536,20 +542,50 @@ u32 MOAISerializer::WriteTableInitializer ( ZLStream& stream, MOAILuaState& stat int keyType = lua_type ( state, -2 ); int valType = lua_type ( state, -1 ); - cc8* keyName = lua_tostring ( state, -2 ); + + lua_pushvalue ( state, -2 ); + cc8* keyName = lua_tostring ( state, -1 ); + lua_pop ( state, 1 ); + + cc8* unsupportedValueTypeName = 0; switch ( valType ) { case LUA_TNONE: case LUA_TNIL: case LUA_TFUNCTION: case LUA_TTHREAD: - continue; + + unsupportedValueTypeName = MOAILuaState::GetLuaTypeName ( valType ); + break; + } + + if ( unsupportedValueTypeName ) { + ZLLog_ErrorF ( ZLLog::CONSOLE, "ERROR: MOAISerializer encountered an unsupported value type ( %s)\n", unsupportedValueTypeName ); + continue; } // TODO: warn about unsupported key types switch ( keyType ) { - + + case LUA_TBOOLEAN: { + + int value = lua_toboolean ( state, -1 ); + cc8* str = ( value ) ? "true": "false"; + stream.Print ( "\t%s [ %s ]\t= ", prefix, str ); + break; + } + case LUA_TLIGHTUSERDATA: { + + stream.Print ( "\t%s [ %p ]\t= ", prefix, lua_touserdata ( state, -2 )); + break; + } + case LUA_TNUMBER: { + + stream.Print ( "\t%s [ %s ]\t= ", prefix, keyName ); + break; + } case LUA_TSTRING: { + if ( MOAISerializer::IsSimpleStringKey ( keyName )) { stream.Print ( "\t%s.%s = ", prefix, keyName ); } @@ -558,10 +594,25 @@ u32 MOAISerializer::WriteTableInitializer ( ZLStream& stream, MOAILuaState& stat } break; } - case LUA_TNUMBER: { - stream.Print ( "\t%s [ %s ]\t= ", prefix, keyName ); + case LUA_TTABLE: { + + ObjID tableID = this->GetID ( state, -2 ); + if ( this->mTableMap.contains ( tableID )) { + stream.Print ( "\t%s [ objects [ 0x%02X ]]\t= ", prefix, tableID ); + } break; } + case LUA_TUSERDATA: { + + MOAILuaObject* object = state.GetLuaObject < MOAILuaObject >( -2, false ); + ObjID instanceID = this->GetID ( object ); + stream.Print ( "\t%s [ objects [ 0x%02X ]]\t= ", prefix, instanceID ); + break; + } + default: { + cc8* keyTypeName = MOAILuaState::GetLuaTypeName ( valType ); + ZLLog_ErrorF ( ZLLog::CONSOLE, "ERROR: MOAISerializer encountered an unsupported key type (%s)\n", keyTypeName ); + } }; switch ( valType ) { @@ -572,11 +623,12 @@ u32 MOAISerializer::WriteTableInitializer ( ZLStream& stream, MOAILuaState& stat stream.Print ( "%s\n", str ); break; } - case LUA_TTABLE: { - ObjID tableID = this->GetID ( state, -1 ); - if ( this->mTableMap.contains ( tableID )) { - stream.Print ( "objects [ 0x%02X ]\n", tableID ); - } + case LUA_TLIGHTUSERDATA: { + stream.Print ( "%p,\n", lua_touserdata ( state, -1 )); + break; + } + case LUA_TNUMBER: { + stream.Print ( "%s\n", lua_tostring ( state, -1 )); break; } case LUA_TSTRING: { @@ -586,8 +638,11 @@ u32 MOAISerializer::WriteTableInitializer ( ZLStream& stream, MOAILuaState& stat stream.Print ( "%s\n", str.c_str ()); break; } - case LUA_TNUMBER: { - stream.Print ( "%s\n", lua_tostring ( state, -1 )); + case LUA_TTABLE: { + ObjID tableID = this->GetID ( state, -1 ); + if ( this->mTableMap.contains ( tableID )) { + stream.Print ( "objects [ 0x%02X ]\n", tableID ); + } break; } case LUA_TUSERDATA: { @@ -596,15 +651,23 @@ u32 MOAISerializer::WriteTableInitializer ( ZLStream& stream, MOAILuaState& stat stream.Print ( "objects [ 0x%02X ]\n", instanceID ); break; } - case LUA_TLIGHTUSERDATA: { - stream.Print ( "%p,\n", lua_touserdata ( state, -1 )); - break; - } }; ++count; } + if ( lua_getmetatable ( state, idx )) { + + if ( state.IsType ( -1, LUA_TTABLE )) { + + ObjID tableID = this->GetID ( state, -1 ); + if ( this->mTableMap.contains ( tableID )) { + stream.Print ( "\tsetmetatable ( %s, objects [ 0x%02X ])\n", prefix, tableID ); + } + } + state.Pop ( 1 ); + } + return count; } diff --git a/src/moai-core/MOAISerializer.h b/src/moai-core/MOAISerializer.h index 40d21d5cb4..631d612aae 100644 --- a/src/moai-core/MOAISerializer.h +++ b/src/moai-core/MOAISerializer.h @@ -73,8 +73,8 @@ class MOAISerializer : DECL_LUA_FACTORY ( MOAISerializer ) //----------------------------------------------------------------// - ObjID AffirmMemberID ( MOAILuaObject* object ); - ObjID AffirmMemberID ( MOAILuaState& state, int idx ); + ObjID AffirmMemberID ( MOAILuaObject* object, bool processMetatable = true ); + ObjID AffirmMemberID ( MOAILuaState& state, int idx, bool processMetatable = true ); void Clear (); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); diff --git a/src/moai-core/MOAITestMgr.cpp b/src/moai-core/MOAITestMgr.cpp index 2ed1a2f165..3cf2fecdbb 100644 --- a/src/moai-core/MOAITestMgr.cpp +++ b/src/moai-core/MOAITestMgr.cpp @@ -3,6 +3,7 @@ #include "pch.h" +#include #include //================================================================// @@ -48,7 +49,7 @@ void MOAITestResult::Push ( lua_State* L ) { } //----------------------------------------------------------------// -json_t* MOAITestResult::ToJson () { +void* MOAITestResult::ToJson () { json_t* json = json_object (); @@ -71,7 +72,7 @@ json_t* MOAITestResult::ToJson () { ChildrenIt childrenIt = this->mChildren.begin (); for ( u32 i = 0; childrenIt != this->mChildren.end (); ++childrenIt, ++i ) { MOAITestResult& child = *childrenIt; - json_array_append_new ( children, child.ToJson ()); + json_array_append_new ( children, ( json_t* )child.ToJson ()); } json_object_set_new ( json, "children", children ); @@ -338,22 +339,25 @@ void MOAITestMgr::SetTimeout () { //----------------------------------------------------------------// void MOAITestMgr::SetTimeout ( float seconds ) { -//TODO some kind of thread based timeout for windows -#ifndef MOAI_COMPILER_MSVC - struct sigaction sa; - memset ( &sa, 0, sizeof ( sa )); - sa.sa_handler = MOAITestMgr::OnAlarm; - sigaction ( SIGALRM, &sa, NULL ); + //TODO some kind of thread based timeout for windows + #ifdef MOAI_COMPILER_MSVC + UNUSED ( seconds ); + #else + struct sigaction sa; - itimerval ival; + memset ( &sa, 0, sizeof ( sa )); + sa.sa_handler = MOAITestMgr::OnAlarm; + sigaction ( SIGALRM, &sa, NULL ); - memset ( &ival, 0, sizeof ( ival )); - ival.it_value.tv_sec = ( int )seconds; - ival.it_value.tv_usec = ( int )( ZLFloat::Decimal ( seconds ) * 1000000.f ); + itimerval ival; - setitimer ( ITIMER_REAL, &ival, 0 ); -#endif + memset ( &ival, 0, sizeof ( ival )); + ival.it_value.tv_sec = ( int )seconds; + ival.it_value.tv_usec = ( int )( ZLFloat::Decimal ( seconds ) * 1000000.f ); + + setitimer ( ITIMER_REAL, &ival, 0 ); + #endif } //----------------------------------------------------------------// @@ -371,7 +375,7 @@ void MOAITestMgr::WriteLog () { if ( this->mRoot ) { - json_t* json = this->mRoot->ToJson (); + json_t* json = ( json_t* )this->mRoot->ToJson (); STLString out = json_dumps ( json, JSON_INDENT ( 4 ) | JSON_SORT_KEYS ); json_decref ( json ); out.append ( "\n" ); diff --git a/src/moai-core/MOAITestMgr.h b/src/moai-core/MOAITestMgr.h index bbea28ef74..a1ddf8123c 100644 --- a/src/moai-core/MOAITestMgr.h +++ b/src/moai-core/MOAITestMgr.h @@ -8,8 +8,6 @@ #include #include -#include - //================================================================// // MOAITestResult //================================================================// @@ -28,7 +26,7 @@ class MOAITestResult { STLList < MOAITestResult > mChildren; //----------------------------------------------------------------// - json_t* ToJson (); + void* ToJson (); void Push ( lua_State* L ); }; diff --git a/src/moai-core/MOAITrace.cpp b/src/moai-core/MOAITrace.cpp index dbc37928f9..cc4da71383 100644 --- a/src/moai-core/MOAITrace.cpp +++ b/src/moai-core/MOAITrace.cpp @@ -1,6 +1,8 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com +#include "pch.h" + #include //================================================================// @@ -158,7 +160,7 @@ void MOAITrace::HandleTrace ( lua_State* L, lua_Debug *ar ) { const void* func = lua_topointer ( L, -1 ); lua_pop ( L, 1 ); - MOAIFuncTraceStackFrame& frame = threadTrace.mStack.Pop (); + MOAIFuncTraceStackFrame frame = threadTrace.mStack.Pop (); assert ( frame.mFunc == func ); MOAIFuncTrace& record = this->mFuncTrace [ func ]; diff --git a/src/moai-core/MOAIVersion.cpp b/src/moai-core/MOAIVersion.cpp index ca3d21e9c6..e4d585046f 100644 --- a/src/moai-core/MOAIVersion.cpp +++ b/src/moai-core/MOAIVersion.cpp @@ -20,7 +20,8 @@ STLString MOAIVersion::GetVersionString () { MOAI_SDK_VERSION_MINOR ); - if ( MOAI_SDK_VERSION_REVISION > 0 ) { + int revision = MOAI_SDK_VERSION_REVISION; // vs2015 C4127 + if ( revision > 0 ) { version.write ( ".%d", MOAI_SDK_VERSION_REVISION ); } diff --git a/src/moai-core/host.cpp b/src/moai-core/host.cpp index 3c000c5c9e..eec5792e66 100644 --- a/src/moai-core/host.cpp +++ b/src/moai-core/host.cpp @@ -5,6 +5,7 @@ #include #include #include +#include //================================================================// // AKUContext @@ -45,13 +46,14 @@ static AKUContext* sContext = 0; // local //================================================================// -void _debugCallWithArgs ( MOAILuaState& state, int totalArgs, int asParams ); -int _loadContextFunc ( MOAILuaState& state ); -void _pushArgOrParam ( MOAILuaState& state, int index, char* arg, int asParam ); -void _setupArgs ( MOAILuaState& state, char* exeName, char* scriptName, int asParams ); +int _debugCallWithArgs ( MOAILuaState& state, int totalArgs, int asParams ); +int _loadContextFunc ( MOAILuaState& state ); +int _loadFuncFromBuffer ( MOAIDataBuffer& buffer, cc8* chunkname, int compressed ); +void _pushArgOrParam ( MOAILuaState& state, int index, char* arg, int asParam ); +void _setupArgs ( MOAILuaState& state, char* exeName, char* scriptName, int asParams ); //----------------------------------------------------------------// -void _debugCallWithArgs ( MOAILuaState& state, int totalArgs, int asParams ) { +int _debugCallWithArgs ( MOAILuaState& state, int totalArgs, int asParams ) { int status; @@ -63,7 +65,7 @@ void _debugCallWithArgs ( MOAILuaState& state, int totalArgs, int asParams ) { status = state.DebugCall ( totalArgs, 0 ); } - state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status ); + return state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status ) ? AKU_ERROR : AKU_OK; } //----------------------------------------------------------------// @@ -72,11 +74,71 @@ int _loadContextFunc ( MOAILuaState& state ) { if ( sContext && sContext->mLuaFunc ) { state.Push ( sContext->mLuaFunc ); sContext->mLuaFunc.Clear (); - return 0; + return AKU_OK; } ZLLog_ErrorF ( ZLLog::CONSOLE, "Missing function to call; use AKULoadFunc* to load a function\n" ); - return 1; + return AKU_ERROR; +} + +//----------------------------------------------------------------// +int _loadFuncFromBuffer ( MOAIDataBuffer& buffer, cc8* chunkname, int compressed ) { + + if ( compressed == AKU_DATA_ZIPPED ) { + buffer.Inflate ( ZLDeflateWriter::DEFAULT_WBITS ); + } + + if ( !buffer.Size ()) return AKU_ERROR; + + u8* data; + size_t size; + + MOAIDataBufferScopedLock lock ( buffer, ( void** )&data, &size ); + + MOAILuaHeader header; + header.Read ( data, size ); + + if ( header.IsBytecode ()) { + + MOAILuaHeader sysHeader; + sysHeader.Init (); + + if ( !sysHeader.IsCompatible ( header )) { + ZLLog_ErrorF ( ZLLog::CONSOLE, "ERROR: Attempt to load incompatible Lua bytecode.\n" ); + return AKU_ERROR; + } + } + else { + // trim trailing nulls from non-bytecode + while (( size > 1 ) && ( data [ size - 1 ] == 0 )) --size; + } + + MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); + + lua_getglobal ( state, "loadstring" ); + if ( !state.IsType ( -1, LUA_TFUNCTION )) { + ZLLog_ErrorF ( ZLLog::CONSOLE, "Missing global Lua function 'loadstring'\n" ); + } + + state.Push ( data, size ); + + if ( chunkname ) { + state.Push ( chunkname ); + } + + int status = state.DebugCall ( state.GetLocalTop () - 1, 2 ); + if ( state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status )) return AKU_ERROR; + + if ( state.IsType ( -1, LUA_TSTRING )) { + + ZLLog_ErrorF ( ZLLog::CONSOLE, "Error loading script:\n" ); + ZLLog_ErrorF ( ZLLog::CONSOLE, "%s\n", state.GetValue < cc8* >( -1, "" )); + return AKU_ERROR; + } + + sContext->mLuaFunc.SetRef ( state, -2 ); + assert ( !sContext->mLuaFunc.IsNil ()); + return AKU_OK; } //----------------------------------------------------------------// @@ -154,12 +216,12 @@ void AKUAppInitialize () { } //----------------------------------------------------------------// -void AKUCallFunc () { +int AKUCallFunc () { MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - if ( _loadContextFunc ( state ) != 0 ) return; + if ( _loadContextFunc ( state ) != 0 ) return AKU_ERROR; int status = state.DebugCall ( 0, 0 ); - state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status ); + return state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status ) ? AKU_ERROR : AKU_OK; } //----------------------------------------------------------------// @@ -167,25 +229,25 @@ void AKUCallFunc () { // arg[0] => argZero - first arg counting from offset (script name as passed to host binary) // arg[1] => next arg/option/script // arg[2] => next arg/option/script - // ... -void AKUCallFuncWithArgArray ( char* exeName, char* scriptName, int argc, char** argv, int asParams ) { +// ... +int AKUCallFuncWithArgArray ( char* exeName, char* scriptName, int argc, char** argv, int asParams ) { MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - if ( _loadContextFunc ( state ) != 0 ) return; + if ( _loadContextFunc ( state ) != 0 ) return AKU_ERROR; _setupArgs ( state, exeName, scriptName, asParams ); for ( int i = 0; i < argc; ++i ) { _pushArgOrParam ( state, i + 1, argv [ i ], asParams ); } - _debugCallWithArgs ( state, argc, asParams ); + return _debugCallWithArgs ( state, argc, asParams ); } //----------------------------------------------------------------// -void AKUCallFuncWithArgString ( char* exeName, char* scriptName, char* args, int asParams ) { +int AKUCallFuncWithArgString ( char* exeName, char* scriptName, char* args, int asParams ) { MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - if ( _loadContextFunc ( state ) != 0 ) return; + if ( _loadContextFunc ( state ) != 0 ) return AKU_ERROR; _setupArgs ( state, exeName, scriptName, asParams ); @@ -198,7 +260,7 @@ void AKUCallFuncWithArgString ( char* exeName, char* scriptName, char* args, int token = strtok ( NULL, " " ); } } - _debugCallWithArgs ( state, numParams, asParams ); + return _debugCallWithArgs ( state, numParams, asParams ); } //----------------------------------------------------------------// @@ -326,92 +388,37 @@ void AKUInitMemPool ( size_t bytes ) { } //----------------------------------------------------------------// -void AKULoadFuncFromBuffer ( void* data, size_t size, int dataType, int compressed ) { +int AKULoadFuncFromBuffer ( void* data, size_t size, const char* chunkname, int compressed ) { sContext->mLuaFunc.Clear (); - if ( !size ) return; - MOAIDataBuffer buffer; buffer.Load ( data, size ); - if ( compressed == AKU_DATA_ZIPPED ) { - buffer.Inflate ( ZLDeflateWriter::DEFAULT_WBITS ); - } - - buffer.Lock ( &data, &size ); - MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - - if ( dataType == AKU_DATA_BYTECODE ) { - lua_getglobal ( state, "loadstring" ); - state.Push ( data, size ); - int status = state.DebugCall ( 1, 1 ); - if ( !state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status )) { - sContext->mLuaFunc.SetRef ( state, -1 ); - } - } - - if ( dataType == AKU_DATA_STRING ) { - AKULoadFuncFromString (( cc8* )data ); - } - - buffer.Unlock (); + return _loadFuncFromBuffer ( buffer, chunkname, compressed ); } //----------------------------------------------------------------// -void AKULoadFuncFromFile ( const char* filename ) { +int AKULoadFuncFromFile ( const char* filename ) { sContext->mLuaFunc.Clear (); if ( !ZLFileSys::CheckFileExists ( filename )) { ZLLog_ErrorF ( ZLLog::CONSOLE, "Could not find file %s \n", filename ); - return; + return AKU_ERROR; } - MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - - //int top = state.GetTop (); - - lua_getglobal ( state, "loadfile" ); - if ( !state.IsType ( -1, LUA_TFUNCTION )) { - ZLLog_ErrorF ( ZLLog::CONSOLE, "Missing global Lua function 'loadfile'\n" ); - } - - state.Push ( filename ); + MOAIDataBuffer buffer; + if ( !buffer.Load ( filename )) return AKU_ERROR; + if ( !buffer.Size ()) return AKU_ERROR; - int status = state.DebugCall ( 1, 2 ); - if ( !state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status )) { - if ( state.IsNil ( -2 )) { - - cc8* msg = state.GetValue < cc8* >( -1, "loafile returned 'nil'" ); - UNUSED ( msg ); - - ZLLog_ErrorF ( ZLLog::CONSOLE, "%s\n", msg ); - } - else { - sContext->mLuaFunc.SetRef ( state, -2 ); - } - } + return _loadFuncFromBuffer ( buffer, filename, AKU_DATA_UNCOMPRESSED ); } //----------------------------------------------------------------// -void AKULoadFuncFromString ( const char* script ) { - - sContext->mLuaFunc.Clear (); +int AKULoadFuncFromString ( const char* script, size_t size, const char* chunkname ) { - MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - - lua_getglobal ( state, "loadstring" ); - if ( !state.IsType ( -1, LUA_TFUNCTION )) { - ZLLog_ErrorF ( ZLLog::CONSOLE, "Missing global Lua function 'loadstring'\n" ); - } - - state.Push ( script ); - - int status = state.DebugCall ( 1, 1 ); - if ( !state.LogErrors ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, status )) { - sContext->mLuaFunc.SetRef ( state, -1 ); - } + return AKULoadFuncFromBuffer (( void* )script, size, chunkname, AKU_DATA_UNCOMPRESSED ); } //----------------------------------------------------------------// diff --git a/src/moai-core/host.h b/src/moai-core/host.h index 70d18a9418..359dc3ea41 100644 --- a/src/moai-core/host.h +++ b/src/moai-core/host.h @@ -39,8 +39,6 @@ enum { }; enum { - AKU_DATA_BYTECODE, - AKU_DATA_STRING, AKU_DATA_ZIPPED, AKU_DATA_UNCOMPRESSED, }; @@ -54,6 +52,11 @@ enum { AKU_LOG_NONE, }; +enum { + AKU_OK, + AKU_ERROR = -1, +}; + // callbacks typedef void ( *AKUErrorTracebackFunc ) ( const char* message, struct lua_State* L, int level ); @@ -74,15 +77,15 @@ AKU_API void AKUSetLogLevel ( int logLevel ); AKU_API void AKUSetUserdata ( void* user ); // management api -AKU_API void AKUCallFunc (); -AKU_API void AKUCallFuncWithArgArray ( char* exeName, char* scriptName, int argc, char** argv, int asParams ); -AKU_API void AKUCallFuncWithArgString ( char* exeName, char* scriptName, char* args, int asParams ); +AKU_API int AKUCallFunc (); +AKU_API int AKUCallFuncWithArgArray ( char* exeName, char* scriptName, int argc, char** argv, int asParams ); +AKU_API int AKUCallFuncWithArgString ( char* exeName, char* scriptName, char* args, int asParams ); AKU_API lua_State* AKUGetLuaState (); AKU_API char* AKUGetMoaiVersion ( char* buffer, size_t length ); AKU_API char* AKUGetWorkingDirectory ( char* buffer, size_t length ); -AKU_API void AKULoadFuncFromBuffer ( void* data, size_t size, int dataType, int compressed ); -AKU_API void AKULoadFuncFromFile ( const char* filename ); -AKU_API void AKULoadFuncFromString ( const char* script ); +AKU_API int AKULoadFuncFromBuffer ( void* data, size_t size, const char* chunkname, int compressed ); +AKU_API int AKULoadFuncFromFile ( const char* filename ); +AKU_API int AKULoadFuncFromString ( const char* script, size_t size, const char* chunkname ); AKU_API int AKUMountVirtualDirectory ( char const* virtualPath, char const* archive ); AKU_API int AKUSetWorkingDirectory ( char const* path ); diff --git a/src/moai-fmod-ex/MOAIFmodExChannel.cpp b/src/moai-fmod-ex/MOAIFmodExChannel.cpp index 5941748941..d8dada00cf 100644 --- a/src/moai-fmod-ex/MOAIFmodExChannel.cpp +++ b/src/moai-fmod-ex/MOAIFmodExChannel.cpp @@ -68,7 +68,7 @@ int MOAIFmodExChannel::_moveVolume ( lua_State* L ) { action->SetLink ( 0, self, MOAIFmodExChannelAttr::Pack ( ATTR_VOLUME ), delta, mode ); action->SetSpan ( length ); - action->Start ( MOAISim::Get ().GetActionMgr ()); + action->Start ( 0 ); action->PushLuaUserdata ( state ); return 1; @@ -120,7 +120,7 @@ int MOAIFmodExChannel::_seekVolume ( lua_State* L ) { action->SetLink ( 0, self, MOAIFmodExChannelAttr::Pack ( ATTR_VOLUME ), target - self->mVolume, mode ); action->SetSpan ( length ); - action->Start ( MOAISim::Get ().GetActionMgr ()); + action->Start ( 0 ); action->PushLuaUserdata ( state ); return 1; diff --git a/src/moai-harfbuzz/host.cpp b/src/moai-harfbuzz/host.cpp new file mode 100644 index 0000000000..0658767805 --- /dev/null +++ b/src/moai-harfbuzz/host.cpp @@ -0,0 +1,122 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include + +#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include FT_OUTLINE_H + +#include +#include + +// adapted from https://github.com/lxnt/ex-sdl-freetype-harfbuzz +// just to see if hb is alive + +#define NUM_EXAMPLES 3 + +//================================================================// +// host +//================================================================// + +const char *texts [ NUM_EXAMPLES ] = { + "Ленивый рыжий кот", + "كسول الزنجبيل القط", + "懶惰的姜貓", +}; + +const hb_direction_t text_directions [ NUM_EXAMPLES ] = { + HB_DIRECTION_LTR, + HB_DIRECTION_RTL, + HB_DIRECTION_TTB, +}; + +/* XXX: These are not correct, though it doesn't seem to break anything + * regardless of their value. */ +const char *languages [ NUM_EXAMPLES ] = { + "en", + "ar", + "ch", +}; + +const hb_script_t scripts [ NUM_EXAMPLES ] = { + HB_SCRIPT_LATIN, + HB_SCRIPT_ARABIC, + HB_SCRIPT_HAN, +}; + +enum { + ENGLISH, + ARABIC, + CHINESE, +}; + +//----------------------------------------------------------------// +void AKUHarfBuzzContextInitialize () { + +// int ptSize = 50*64; +// int device_hdpi = 72; +// int device_vdpi = 72; +// +// FT_Library ft_library; +// assert ( !FT_Init_FreeType ( &ft_library )); +// +// FT_Face ft_face [ NUM_EXAMPLES ]; +// +// // to run, clone ex-sdl-freetype-harfbuzz and fix these paths to find the included fonts +// +// assert(!FT_New_Face ( ft_library, "fonts/DejaVuSerif.ttf", 0, &ft_face [ ENGLISH ])); +// assert(!FT_Set_Char_Size ( ft_face [ ENGLISH ], 0, ptSize, device_hdpi, device_vdpi )); +// //force_ucs2_charmap ( ft_face [ ENGLISH ]); +// +// assert(!FT_New_Face ( ft_library, "fonts/amiri-0.104/amiri-regular.ttf", 0, &ft_face [ ARABIC ])); +// assert(!FT_Set_Char_Size ( ft_face [ ARABIC ], 0, ptSize, device_hdpi, device_vdpi )); +// //force_ucs2_charmap ( ft_face [ ARABIC ]); +// +// assert(!FT_New_Face ( ft_library, "fonts/fireflysung-1.3.0/fireflysung.ttf", 0, &ft_face [ CHINESE ])); +// assert(!FT_Set_Char_Size ( ft_face [ CHINESE ], 0, ptSize, device_hdpi, device_vdpi )); +// //force_ucs2_charmap ( ft_face [ CHINESE ]); +// +// hb_font_t *hb_ft_font [ NUM_EXAMPLES ]; +// hb_ft_font [ ENGLISH ] = hb_ft_font_create ( ft_face [ ENGLISH ], NULL ); +// hb_ft_font [ ARABIC ] = hb_ft_font_create ( ft_face [ ARABIC ] , NULL ); +// hb_ft_font [ CHINESE ] = hb_ft_font_create ( ft_face [ CHINESE ], NULL ); +// +// for ( int i = 0; i < NUM_EXAMPLES; ++i ) { +// +// /* Create a buffer for harfbuzz to use */ +// hb_buffer_t* buf = hb_buffer_create (); +// +// hb_buffer_set_direction ( buf, text_directions [ i ]); +// hb_buffer_set_script ( buf, scripts [ i ]); +// hb_buffer_set_language ( buf, hb_language_from_string ( languages [ i ], strlen ( languages [ i ]))); +// +// hb_buffer_add_utf8 ( buf, texts [ i ], strlen ( texts [ i ]), 0, strlen ( texts [ i ])); +// hb_shape ( hb_ft_font [ i ], buf, NULL, 0 ); +// +// unsigned int glyph_count; +// hb_glyph_info_t* glyph_info = hb_buffer_get_glyph_infos ( buf, &glyph_count ); +// hb_glyph_position_t* glyph_pos = hb_buffer_get_glyph_positions ( buf, &glyph_count ); +// +// printf ( "hb string: %d\n", i ); +// +// for ( int j = 0; j < glyph_count; ++j ) { +// +// hb_glyph_info_t& info = glyph_info [ j ]; +// hb_glyph_position_t& position = glyph_pos [ j ]; +// +// printf ( "\tglyph: %d xAdv: %d yAdv: %d xOff: %d yOff: %d\n", +// info.codepoint, +// position.x_advance, +// position.y_advance, +// position.x_offset, +// position.y_offset +// ); +// } +// +// printf ( "\n" ); +// } +// +// FT_Done_FreeType ( ft_library ); +} diff --git a/src/moai-harfbuzz/host.h b/src/moai-harfbuzz/host.h new file mode 100644 index 0000000000..06cb69aa67 --- /dev/null +++ b/src/moai-harfbuzz/host.h @@ -0,0 +1,14 @@ +//----------------------------------------------------------------// +// Copyright (c) 2010-2011 Zipline Games, Inc. +// All Rights Reserved. +// http://getmoai.com +//----------------------------------------------------------------// + +#ifndef MOAI_HARFBUZZ_HOST_H +#define MOAI_HARFBUZZ_HOST_H + +#include + +AKU_API void AKUHarfBuzzContextInitialize (); + +#endif diff --git a/src/moai-http-client/MOAIHttpTaskBase.cpp b/src/moai-http-client/MOAIHttpTaskBase.cpp index 3bd8418a00..163e39150d 100644 --- a/src/moai-http-client/MOAIHttpTaskBase.cpp +++ b/src/moai-http-client/MOAIHttpTaskBase.cpp @@ -88,7 +88,7 @@ int MOAIHttpTaskBase::_getResponseHeader ( lua_State* L ) { int MOAIHttpTaskBase::_getSize ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIHttpTaskBase, "U" ) - lua_pushnumber ( state, self->mData.Size ()); + lua_pushnumber ( state, ( lua_Number )self->mData.Size ()); return 1; } @@ -181,7 +181,7 @@ int MOAIHttpTaskBase::_httpPost ( lua_State* L ) { void* bytes; size_t size; data->Lock ( &bytes, &size ); - self->InitForPost ( url, useragent, bytes, size, verbose ); + self->InitForPost ( url, useragent, bytes, ( u32 )size, verbose ); data->Unlock (); } } @@ -189,7 +189,7 @@ int MOAIHttpTaskBase::_httpPost ( lua_State* L ) { size_t size; cc8* postString = lua_tolstring ( state, 3, &size ); - self->InitForPost ( url, useragent, postString, size, verbose ); + self->InitForPost ( url, useragent, postString, ( u32 )size, verbose ); } if ( blocking ) { @@ -300,7 +300,7 @@ int MOAIHttpTaskBase::_setBody ( lua_State* L ) { void* bytes; size_t size; data->Lock ( &bytes, &size ); - self->SetBody ( bytes, size ); + self->SetBody ( bytes, ( u32 )size ); data->Unlock (); } } @@ -308,7 +308,7 @@ int MOAIHttpTaskBase::_setBody ( lua_State* L ) { size_t size; cc8* postString = lua_tolstring ( state, 2, &size ); - self->SetBody ( postString, size ); + self->SetBody ( postString, ( u32 )size ); } return 0; } diff --git a/src/moai-http-client/MOAIHttpTaskCurl.cpp b/src/moai-http-client/MOAIHttpTaskCurl.cpp index bc8837e324..08cc37f90c 100644 --- a/src/moai-http-client/MOAIHttpTaskCurl.cpp +++ b/src/moai-http-client/MOAIHttpTaskCurl.cpp @@ -3,10 +3,12 @@ #include "pch.h" -#include - SUPPRESS_EMPTY_FILE_WARNING + #if MOAI_WITH_LIBCURL + +#include + #include #include @@ -205,7 +207,7 @@ void MOAIHttpTaskCurl::CurlFinish () { if ( this->mStream == &this->mMemStream ) { - u32 size = this->mMemStream.GetLength (); + u32 size = ( u32 )this->mMemStream.GetLength (); if ( size ) { this->mData.Init ( size ); diff --git a/src/moai-http-client/MOAIHttpTaskCurl.h b/src/moai-http-client/MOAIHttpTaskCurl.h index 066aa2a221..5aca85fd62 100644 --- a/src/moai-http-client/MOAIHttpTaskCurl.h +++ b/src/moai-http-client/MOAIHttpTaskCurl.h @@ -8,12 +8,7 @@ #include -#define CURL_STATICLIB -#define CURL_DISABLE_LDAP - -extern "C" { - #include -} +#include //================================================================// // MOAIHttpTaskCurl diff --git a/src/moai-http-client/MOAIUrlMgrCurl.cpp b/src/moai-http-client/MOAIUrlMgrCurl.cpp index 4a063de6e7..6bf670eaa9 100644 --- a/src/moai-http-client/MOAIUrlMgrCurl.cpp +++ b/src/moai-http-client/MOAIUrlMgrCurl.cpp @@ -168,7 +168,7 @@ void MOAIUrlMgrCurl::ProcessHandle () { int stillRunning; while ( CURLM_CALL_MULTI_PERFORM == curl_multi_perform ( multiHandle, &stillRunning )); - this->mMore = stillRunning; + this->mMore = stillRunning == 1 ? true : false; } //----------------------------------------------------------------// diff --git a/src/moai-image-jpg/MOAIImageFormatJpg.cpp b/src/moai-image-jpg/MOAIImageFormatJpg.cpp index 1722a54bee..6f4f3c9b3b 100644 --- a/src/moai-image-jpg/MOAIImageFormatJpg.cpp +++ b/src/moai-image-jpg/MOAIImageFormatJpg.cpp @@ -1,8 +1,6 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com -#include "pch.h" - #include extern "C" { @@ -49,7 +47,7 @@ static void _jpgSkipInputData ( j_decompress_ptr cinfo, long num_bytes ) { src->pub.next_input_byte = ( JOCTET* )(( size_t )src->pub.next_input_byte + num_bytes ); } else { - src->stream->Seek ( num_bytes - src->pub.bytes_in_buffer, SEEK_CUR ); + src->stream->Seek (( long )( num_bytes - src->pub.bytes_in_buffer ), SEEK_CUR ); src->pub.bytes_in_buffer = src->stream->ReadBytes ( src->buffer, JPG_BUFFER_SIZE ); src->pub.next_input_byte = ( JOCTET* )src->buffer; } @@ -98,9 +96,8 @@ bool MOAIImageFormatJpg::CheckHeader ( const void* buffer ) { //----------------------------------------------------------------// bool MOAIImageFormatJpg::CreateTexture ( MOAISingleTexture& texture, const void* data, size_t size ) { -#ifndef MOAI_COMPILER_MSVC + UNUSED ( texture ); -#endif UNUSED ( data ); UNUSED ( size ); @@ -195,7 +192,7 @@ void MOAIImageFormatJpg::ReadImageJpg ( MOAIImage& image, void* jpgInfoParam, u3 if ( transform & MOAIImageTransform::PREMULTIPLY_ALPHA ) { for ( u32 y = 0; y < height; ++y ) { - void* row = this->GetRowAddr ( image, y ); + void* row = this->GetRowAddrMutable ( image, y ); ZLColor::PremultiplyAlpha ( row, image.GetColorFormat (), width ); } } @@ -207,7 +204,7 @@ void MOAIImageFormatJpg::ReadImageJpg ( MOAIImage& image, void* jpgInfoParam, u3 for ( u32 y = 0; y < height; ++y ) { jpeg_read_scanlines ( cinfo, &samprow, 1 ); - void* destRow = this->GetRowAddr ( image, y ); + void* destRow = this->GetRowAddrMutable ( image, y ); ZLColor::Convert ( destRow, image.GetColorFormat (), rowBuffer, jpgColorFormat, width ); if ( transform & MOAIImageTransform::PREMULTIPLY_ALPHA ) { diff --git a/src/moai-image-png/MOAIImageFormatPng.cpp b/src/moai-image-png/MOAIImageFormatPng.cpp index b49e625a4e..51e7cd6fed 100644 --- a/src/moai-image-png/MOAIImageFormatPng.cpp +++ b/src/moai-image-png/MOAIImageFormatPng.cpp @@ -1,8 +1,6 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com -#include "pch.h" - #include #include @@ -51,9 +49,7 @@ bool MOAIImageFormatPng::CheckHeader ( const void* buffer ) { //----------------------------------------------------------------// bool MOAIImageFormatPng::CreateTexture ( MOAISingleTexture& texture, const void* data, size_t size ) { -#ifndef MOAI_COMPILER_MSVC UNUSED ( texture ); -#endif UNUSED ( data ); UNUSED ( size ); @@ -207,14 +203,14 @@ void MOAIImageFormatPng::ReadImagePng ( MOAIImage& image, void* pngParam, void* for ( int i = 0; i < passes; ++i ) { for ( u32 y = 0; y < height; ++y ) { - void* row = this->GetRowAddr ( image, y ); + void* row = this->GetRowAddrMutable ( image, y ); png_read_row ( png, ( png_bytep )row, 0 ); } } if ( transform & MOAIImageTransform::PREMULTIPLY_ALPHA ) { for ( u32 y = 0; y < height; ++y ) { - void* row = this->GetRowAddr ( image, y ); + void* row = this->GetRowAddrMutable ( image, y ); ZLColor::PremultiplyAlpha ( row, image.GetColorFormat (), width ); } } @@ -237,7 +233,7 @@ void MOAIImageFormatPng::ReadImagePng ( MOAIImage& image, void* pngParam, void* for ( u32 y = 0; y < height; ++y ) { void* srcRow = ( void* )(( size_t )srcBuff + ( srcRowSize * y )); - void* destRow = this->GetRowAddr ( image, y ); + void* destRow = this->GetRowAddrMutable ( image, y ); ZLColor::Convert ( destRow, image.GetColorFormat (), srcRow, pngColorFormat, width ); if ( transform & MOAIImageTransform::PREMULTIPLY_ALPHA ) { @@ -252,7 +248,7 @@ void MOAIImageFormatPng::ReadImagePng ( MOAIImage& image, void* pngParam, void* for ( u32 y = 0; y < height; ++y ) { png_read_row ( png, ( png_bytep )srcRow, 0 ); - void* destRow = this->GetRowAddr ( image, y ); + void* destRow = this->GetRowAddrMutable ( image, y ); ZLColor::Convert ( destRow, image.GetColorFormat (), srcRow, pngColorFormat, width ); if ( transform & MOAIImageTransform::PREMULTIPLY_ALPHA ) { @@ -265,7 +261,7 @@ void MOAIImageFormatPng::ReadImagePng ( MOAIImage& image, void* pngParam, void* } else { - u32 rowsize = image.GetRowSize (); + size_t rowsize = image.GetRowSize (); if ( rowsize < png_get_rowbytes ( png, pngInfo )) return; this->Alloc ( image ); @@ -293,7 +289,7 @@ void MOAIImageFormatPng::ReadImagePng ( MOAIImage& image, void* pngParam, void* // copy the rows for ( int i = 0; i < passes; ++i ) { for ( u32 y = 0; y < height; ++y ) { - void* row = this->GetRowAddr ( image, y ); + void* row = this->GetRowAddrMutable ( image, y ); png_read_row ( png, ( png_bytep )row, 0 ); } } diff --git a/src/moai-image-pvr/MOAIImageFormatPvr.cpp b/src/moai-image-pvr/MOAIImageFormatPvr.cpp index 0e792f79e4..b8b0a5638f 100644 --- a/src/moai-image-pvr/MOAIImageFormatPvr.cpp +++ b/src/moai-image-pvr/MOAIImageFormatPvr.cpp @@ -1,8 +1,6 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com -#include "pch.h" - #include #include @@ -65,7 +63,7 @@ class MOAIPvrHeader { //----------------------------------------------------------------// static const void* GetFileData ( const void* data, size_t size ); static MOAIPvrHeader* GetHeader ( const void* data, size_t size ); - MOAIPvrMipLevelInfo GetMipLevelInfo ( int mipLevel ); + MOAIPvrMipLevelInfo GetMipLevelInfo ( u32 mipLevel ); size_t GetPixelSizeDecompressed (); size_t GetTotalSize (); bool HasAlpha (); @@ -100,14 +98,14 @@ MOAIPvrHeader* MOAIPvrHeader::GetHeader ( const void* data, size_t size ) { } //----------------------------------------------------------------// -MOAIPvrMipLevelInfo MOAIPvrHeader::GetMipLevelInfo ( int mipLevel ) { +MOAIPvrMipLevelInfo MOAIPvrHeader::GetMipLevelInfo ( u32 mipLevel ) { MOAIPvrMipLevelInfo info; info.mLevel = mipLevel; - const size_t factor = 1 << mipLevel; + const u32 factor = 1 << mipLevel; - info.mWidth = MAX ( this->mWidth / factor, 1 ); + info.mWidth = MAX ( this->mWidth / factor, 1 ); info.mHeight = MAX ( this->mHeight / factor, 1 ); info.mSizeDecompressed = info.mWidth * info.mHeight * this->GetPixelSizeDecompressed (); @@ -115,8 +113,8 @@ MOAIPvrMipLevelInfo MOAIPvrHeader::GetMipLevelInfo ( int mipLevel ) { if ( this->IsCompressed ()) { bool isTwoBit = this->IsTwoBit (); - const size_t minTexWidth = isTwoBit ? PVRTC2_MIN_TEXWIDTH : PVRTC4_MIN_TEXWIDTH; - const size_t minTexHeight = isTwoBit ? PVRTC2_MIN_TEXHEIGHT : PVRTC4_MIN_TEXHEIGHT; + const u32 minTexWidth = isTwoBit ? PVRTC2_MIN_TEXWIDTH : PVRTC4_MIN_TEXWIDTH; + const u32 minTexHeight = isTwoBit ? PVRTC2_MIN_TEXHEIGHT : PVRTC4_MIN_TEXHEIGHT; info.mSizeCompressed = ( MAX ( info.mWidth, minTexWidth ) * MAX ( info.mHeight, minTexHeight ) * this->mBitCount ) / 8; // TODO: this right for two bit? } else { @@ -214,19 +212,13 @@ bool MOAIImageFormatPvr::CheckHeader ( const void* buffer ) { //----------------------------------------------------------------// bool MOAIImageFormatPvr::CreateTexture ( MOAISingleTexture& texture, const void* data, size_t size ) { - if ( !MOAIGfxDevice::Get ().GetHasContext ()) return false; - MOAIGfxDevice::Get ().ClearErrors (); + if ( !MOAIGfxMgr::Get ().GetHasContext ()) return false; + MOAIGfxMgr::Get ().ClearErrors (); MOAIPvrHeader* header = MOAIPvrHeader::GetHeader ( data, size ); if ( !header ) return false; bool isCompressed = header->IsCompressed (); - - #if !( ZGL_DEVCAPS_PVR_TEXTURE || MOAI_WITH_LIBPVR ) - if ( isCompressed ) return false; - #endif - - bool hasAlpha = header->HasAlpha (); int internalFormat = 0; int pixelType = 0; @@ -271,11 +263,11 @@ bool MOAIImageFormatPvr::CreateTexture ( MOAISingleTexture& texture, const void* #if ZGL_DEVCAPS_PVR_TEXTURE case MOAIPvrHeader::OGL_PVRTC2: - internalFormat = hasAlpha ? ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG : ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; + internalFormat = header->HasAlpha () ? ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG : ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; break; case MOAIPvrHeader::OGL_PVRTC4: - internalFormat = hasAlpha ? ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG : ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; + internalFormat = header->HasAlpha () ? ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG : ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; break; #else @@ -304,47 +296,54 @@ bool MOAIImageFormatPvr::CreateTexture ( MOAISingleTexture& texture, const void* default: return false; } + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); - u32 glTexID = zglCreateTexture (); + ZLGfxHandle* glTexID = gfx.CreateTexture (); if ( glTexID ) { - zglBindTexture ( glTexID ); + gfx.BindTexture ( glTexID ); size_t textureSize = 0; const void* imageData = header->GetFileData ( data, size ); + ZLCopyOnWrite buffer; - int nLevels = header->mMipMapCount + 1; - for ( int level = 0; level < nLevels; ++level ) { + u32 nLevels = header->mMipMapCount + 1; + for ( u32 level = 0; level < nLevels; ++level ) { MOAIPvrMipLevelInfo info = header->GetMipLevelInfo ( level ); - int width = info.mWidth; - int height = info.mHeight; + u32 width = info.mWidth; + u32 height = info.mHeight; if ( isCompressed ) { #if ZGL_DEVCAPS_PVR_TEXTURE - zglCompressedTexImage2D ( level, internalFormat, width, height, info.mSizeCompressed, imageData ); + buffer.Alloc ( info.mSizeCompressed, imageData ); + gfx.CompressedTexImage2D ( level, internalFormat, width, height, info.mSizeCompressed, buffer.GetSharedConstBuffer ()); + + #else - #elif MOAI_WITH_LIBPVR - ZLLeanArray < char > buffer; - buffer.Init ( info.mSizeDecompressed ); - if ( !this->Decompress ( *header, info, buffer.Data (), info.mSizeDecompressed, imageData, info.mSizeCompressed )) { + buffer.Reserve ( info.mSizeDecompressed ); + + if ( !this->Decompress ( *header, info, buffer.Invalidate (), info.mSizeDecompressed, imageData, info.mSizeCompressed )) { this->CleanupTexture ( texture ); return false; } - zglTexImage2D ( level, internalFormat, width, height, internalFormat, pixelType, buffer.Data ()); + gfx.TexImage2D ( level, internalFormat, width, height, internalFormat, pixelType, buffer.GetSharedConstBuffer ()); #endif } else { - zglTexImage2D ( level, internalFormat, width, height, internalFormat, pixelType, imageData ); + + buffer.Alloc ( info.mSizeDecompressed, imageData ); + gfx.TexImage2D ( level, internalFormat, width, height, internalFormat, pixelType, buffer.GetSharedConstBuffer ()); } - if ( MOAIGfxDevice::Get ().LogErrors ()) { + if ( MOAIGfxMgr::Get ().LogErrors ()) { this->CleanupTexture ( texture ); return false; } @@ -354,6 +353,7 @@ bool MOAIImageFormatPvr::CreateTexture ( MOAISingleTexture& texture, const void* } this->SetTextureID ( texture, glTexID, internalFormat, pixelType, textureSize ); + return true; } return false; @@ -361,8 +361,6 @@ bool MOAIImageFormatPvr::CreateTexture ( MOAISingleTexture& texture, const void* //----------------------------------------------------------------// bool MOAIImageFormatPvr::Decompress ( MOAIPvrHeader& header, const MOAIPvrMipLevelInfo& info, MOAIImage& image, ZLStream& stream ) { - - bool isCompressed = header.IsCompressed (); this->SetDimensions ( image, info.mWidth, info.mHeight, 0 ); @@ -408,7 +406,7 @@ bool MOAIImageFormatPvr::Decompress ( MOAIPvrHeader& header, const MOAIPvrMipLev this->SetPixelFormat ( image, MOAIImage::TRUECOLOR ); this->Alloc ( image ); - if ( !MOAIImageFormatPvr::Decompress ( header, info, this->GetBitmap ( image ), image.GetBitmapSize (), stream )) { + if ( !MOAIImageFormatPvr::Decompress ( header, info, this->GetBitmapMutable ( image ), image.GetBitmapSize (), stream )) { ZLLog_ErrorF ( ZLLog::CONSOLE, "Error loading or decompressing PVR at mip level %d\n", info.mLevel ); return false; } @@ -454,11 +452,7 @@ bool MOAIImageFormatPvr::Decompress ( MOAIPvrHeader& header, const MOAIPvrMipLev if ( isCompressed ) { - int resultSize = 0; - - #if MOAI_WITH_LIBPVR - resultSize = PVRTDecompressPVRTC ( srcBuffer, header.IsTwoBit (), info.mWidth, info.mHeight, ( unsigned char* )buffer ); - #endif + size_t resultSize = ( size_t )PVRTDecompressPVRTC ( srcBuffer, header.IsTwoBit (), info.mWidth, info.mHeight, ( unsigned char* )buffer ); if ( resultSize != info.mSizeCompressed ) { ZLLog_ErrorF ( ZLLog::CONSOLE, "Error decompressing PVR at mip level %d\n", info.mLevel ); @@ -483,10 +477,6 @@ bool MOAIImageFormatPvr::GetTextureInfo ( ZLStream& stream, MOAITextureInfo& inf MOAIPvrHeader header; if ( header.Load ( stream )) { - #if !( ZGL_DEVCAPS_PVR_TEXTURE || MOAI_WITH_LIBPVR ) - if ( header.IsCompressed ()) return false; - #endif - info.mWidth = header.mWidth; info.mHeight = header.mHeight; info.mSize = header.mHeaderSize + header.mDataSize; @@ -517,14 +507,7 @@ bool MOAIImageFormatPvr::ReadImage ( MOAIImage& image, ZLStream& stream, u32 tra return false; } - #if !MOAI_WITH_LIBPVR - if ( header.IsCompressed ()) { - ZLLog_ErrorF ( ZLLog::CONSOLE, "Software PVR decompression not supported; build Moai SDK using MOAI_WITH_LIBPVR\n" ); - return false; - } - #endif - - MOAIPvrMipLevelInfo info = header.GetMipLevelInfo ( 1 ); + MOAIPvrMipLevelInfo info = header.GetMipLevelInfo ( 0 ); if ( this->Decompress ( header, info, image, stream )) { image.Transform ( transform ); diff --git a/src/moai-image-webp/MOAIImageFormatWebP.cpp b/src/moai-image-webp/MOAIImageFormatWebP.cpp index 5fcd63e98b..ca637db335 100644 --- a/src/moai-image-webp/MOAIImageFormatWebP.cpp +++ b/src/moai-image-webp/MOAIImageFormatWebP.cpp @@ -1,8 +1,6 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com -#include "pch.h" - #include extern "C" { @@ -112,7 +110,7 @@ void MOAIImageFormatWebP::ReadImageWebP ( MOAIImage& image, u8 const* data, size break; } config.output.u.RGBA.rgba = ( u8* )this->GetBitmap ( image ); - config.output.u.RGBA.stride = image.GetRowSize (); + config.output.u.RGBA.stride = ( int )image.GetRowSize (); config.output.u.RGBA.size = image.GetBitmapSize (); config.output.is_external_memory = true; diff --git a/src/moai-ios-facebook/MOAIFacebookIOS.h b/src/moai-ios-facebook/MOAIFacebookIOS.h index ca2eb3563b..7a978a2c89 100644 --- a/src/moai-ios-facebook/MOAIFacebookIOS.h +++ b/src/moai-ios-facebook/MOAIFacebookIOS.h @@ -9,9 +9,6 @@ #import #import -#import -#import -#import @class MOAIFacebookIOSDialogDelegate; @class MOAIFacebookIOSRequestDelegate; @@ -37,18 +34,27 @@ class MOAIFacebookIOS : public MOAIGlobalClass < MOAIFacebookIOS, MOAILuaObject >, public MOAIGlobalEventSource { private: - + //----------------------------------------------------------------// static int _getExpirationDate ( lua_State* L ); + static int _getUserEmail ( lua_State* L ); + static int _getUserID ( lua_State* L ); + static int _getUserName ( lua_State* L ); static int _getToken ( lua_State* L ); static int _graphRequest ( lua_State* L ); + static int _handleDidBecomeActive ( lua_State* L ); + static int _handleOpenUrl ( lua_State* L ); static int _init ( lua_State* L ); static int _login ( lua_State* L ); static int _logout ( lua_State* L ); static int _postToFeed ( lua_State* L ); + static int _restoreSession ( lua_State* L ); static int _sendRequest ( lua_State* L ); static int _sessionValid ( lua_State* L ); + + STLString mName; + STLString mEmail; public: DECL_LUA_SINGLETON ( MOAIFacebookIOS ); diff --git a/src/moai-ios-facebook/MOAIFacebookIOS.mm b/src/moai-ios-facebook/MOAIFacebookIOS.mm index ad1b9a178d..b276dfc010 100644 --- a/src/moai-ios-facebook/MOAIFacebookIOS.mm +++ b/src/moai-ios-facebook/MOAIFacebookIOS.mm @@ -6,6 +6,9 @@ #import #import +#import +#import +#import //================================================================// // lua @@ -29,7 +32,6 @@ return 1; } - //----------------------------------------------------------------// /** @lua getToken @text Retrieve the Facebook login token. @@ -51,6 +53,69 @@ return 1; } +//----------------------------------------------------------------// +/** @lua getUserEmail + @text Retrieve the Facebook User email . + + @in nil + @out string User email + */ +int MOAIFacebookIOS::_getUserEmail ( lua_State* L ) { + MOAI_LUA_SETUP_SINGLE ( MOAIFacebookIOS, "" ) + + + + if ( MOAIFacebookIOS::Get ().mEmail != "" ) { + lua_pushstring ( L, MOAIFacebookIOS::Get ().mEmail); + } else { + lua_pushnil ( L ); + } + + return 1; +} +//----------------------------------------------------------------// +/** @lua getUserID + @text Retrieve the Facebook User ID . + + @in nil + @out string User ID + */ +int MOAIFacebookIOS::_getUserID ( lua_State* L ) { + MOAI_LUA_SETUP_SINGLE ( MOAIFacebookIOS, "" ) + + NSString* ID = [[ FBSDKAccessToken currentAccessToken ] userID ]; + + if ( ID ) { + lua_pushstring ( L, [ ID UTF8String ]); + } else { + lua_pushnil ( L ); + } + + return 1; +} +//----------------------------------------------------------------// +/** @lua getUserName + @text Retrieve the Facebook User Name . + + @in nil + @out string User User Name + */ +int MOAIFacebookIOS::_getUserName ( lua_State* L ) { + MOAI_LUA_SETUP_SINGLE ( MOAIFacebookIOS, "" ) + + + + + if ( MOAIFacebookIOS::Get ().mName != "") { + lua_pushstring ( L, MOAIFacebookIOS::Get ().mName.c_str() ); + } else { + lua_pushnil ( L ); + } + + return 1; +} + + //----------------------------------------------------------------// /** @lua graphRequest @text Make a request on Facebook's Graph API @@ -93,12 +158,23 @@ } else { MOAIFacebookIOS::Get ().ReceivedRequestResponse ( result ); + } }]; return 0; } - +int MOAIFacebookIOS::_handleDidBecomeActive ( lua_State* L ) { + UNUSED( L ); + + [FBSDKAppEvents activateApp]; + return 0; +} +int MOAIFacebookIOS::_handleOpenUrl ( lua_State* L ) { + + UNUSED( L ); + return 0; +} //----------------------------------------------------------------// /** @lua init @text Initialize Facebook. @@ -146,7 +222,8 @@ // If you ask for multiple permissions at once, you // should check if specific permissions missing //if ([ result.grantedPermissions containsObject:@"email" ]) { - // // Do work + // Do work + //} } }]; @@ -168,6 +245,14 @@ return 0; } +int MOAIFacebookIOS::_restoreSession ( lua_State* L ) { + UNUSED( L ); + if ( [ FBSDKAccessToken currentAccessToken ]) { + MOAIFacebookIOS::Get ().SessionDidLogin (); + } + + return 1; +} //----------------------------------------------------------------// // TODO: 3rdparty doxygen int MOAIFacebookIOS::_postToFeed ( lua_State* L ) { @@ -269,10 +354,13 @@ //================================================================// //----------------------------------------------------------------// -MOAIFacebookIOS::MOAIFacebookIOS () { +MOAIFacebookIOS::MOAIFacebookIOS (): + mName(""),mEmail(0) { RTTI_SINGLE ( MOAILuaObject ) RTTI_SINGLE ( MOAIGlobalEventSource ) + + } //----------------------------------------------------------------// @@ -294,12 +382,16 @@ { "getExpirationDate", _getExpirationDate }, { "getListener", &MOAIGlobalEventSource::_getListener < MOAIFacebookIOS > }, { "getToken", _getToken }, - { "getUserID", _getToken }, + { "getUserID", _getUserID }, + { "getUserName", _getUserName }, { "graphRequest", _graphRequest }, + { "handleDidBecomeActive", _handleDidBecomeActive }, + { "handleOpenUrl", _handleOpenUrl }, { "init", _init }, { "login", _login }, { "logout", _logout }, { "postToFeed", _postToFeed }, + { "restoreSession", _restoreSession }, { "sendRequest", _sendRequest }, { "sessionValid", _sessionValid }, { "setListener", &MOAIGlobalEventSource::_setListener < MOAIFacebookIOS > }, @@ -358,6 +450,23 @@ //----------------------------------------------------------------// void MOAIFacebookIOS::SessionDidLogin () { + if ([FBSDKAccessToken currentAccessToken]) { + [[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:@{@"fields": @"email,name"}] + startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { + UNUSED ( connection ); + if (!error) { + + this->mName.clear(); + if( [ result[ @"name" ] UTF8String ] ) + this->mName.write( [ result[ @"name" ] UTF8String ]); + this->mEmail.clear(); + if( [ result[ @"email" ] UTF8String ] ) + this->mEmail.write( [ result[ @"email" ] UTF8String ] ); + } + }]; + + + } MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); if ( this->PushListener ( SESSION_DID_LOGIN, state )) { diff --git a/src/moai-ios-motion/MOAIMotionMgrIOS.mm b/src/moai-ios-motion/MOAIMotionMgrIOS.mm index fa289c1feb..ddf92c9ff1 100644 --- a/src/moai-ios-motion/MOAIMotionMgrIOS.mm +++ b/src/moai-ios-motion/MOAIMotionMgrIOS.mm @@ -273,7 +273,7 @@ state.Push ( inputMgr.GetDevice ( this->mInputDeviceID )); lua_setfield ( state, -2, "deviceMotion" ); - this->Start ( MOAISim::Get ().GetActionTree (), true ); + this->Start ( MOAISim::Get ().GetActionTree ().GetDefaultParent (), true ); } //----------------------------------------------------------------// diff --git a/src/moai-ios/host.mm b/src/moai-ios/host.mm index 48fe319142..5e23a2da2f 100644 --- a/src/moai-ios/host.mm +++ b/src/moai-ios/host.mm @@ -6,8 +6,11 @@ #import "headers.h" #import -#import -#import +#import + +#if AKU_WITH_IFA + #import +#endif #include #include @@ -52,9 +55,11 @@ void AKUIosContextInitialize () { environment.SetValue ( MOAI_ENV_osBrand, "iOS" ); environment.SetValue ( MOAI_ENV_osVersion, [[ UIDevice currentDevice ].systemVersion UTF8String ]); environment.SetValue ( MOAI_ENV_openUdid, [[ MOAIOpenUDID value] UTF8String ]); + environment.SetValue ( MOAI_ENV_screenScale, [[ UIScreen mainScreen ] scale ]); environment.SetValue ( MOAI_ENV_systemLanguageCode, [[[ NSLocale preferredLanguages ] objectAtIndex: 0 ] UTF8String ]); environment.SetValue ( MOAI_ENV_verticalResolution, [[ UIScreen mainScreen ] bounds ].size.height * [[ UIScreen mainScreen ] scale ]); + environment.SetValue ( MOAI_ENV_appDirectory, [[ NSSearchPathForDirectoriesInDomains ( NSApplicationDirectory, NSUserDomainMask, YES ) objectAtIndex:0 ] UTF8String ]); environment.SetValue ( MOAI_ENV_cacheDirectory, [[ NSSearchPathForDirectoriesInDomains ( NSCachesDirectory, NSUserDomainMask, YES ) objectAtIndex:0 ] UTF8String ]); environment.SetValue ( MOAI_ENV_resourceDirectory, [[[ NSBundle mainBundle ] resourcePath ] UTF8String ]); environment.SetValue ( MOAI_ENV_documentDirectory, [[ NSSearchPathForDirectoriesInDomains ( NSDocumentDirectory, NSUserDomainMask, YES ) objectAtIndex:0 ] UTF8String ]); @@ -64,13 +69,15 @@ void AKUIosContextInitialize () { environment.SetValue ( MOAI_ENV_iosIFV, [[[[UIDevice currentDevice] identifierForVendor ] UUIDString ] UTF8String ]); } - Class identifierManagerClass = NSClassFromString ( @"ASIdentifierManager" ); - if ( identifierManagerClass ) { - ASIdentifierManager* sharedManager = [ identifierManagerClass sharedManager ]; - if ([ sharedManager isAdvertisingTrackingEnabled ]) { - environment.SetValue ( MOAI_ENV_iosIFA, [[[ sharedManager advertisingIdentifier ] UUIDString ] UTF8String ]); + #if AKU_WITH_IFA + Class identifierManagerClass = NSClassFromString ( @"ASIdentifierManager" ); + if ( identifierManagerClass ) { + ASIdentifierManager* sharedManager = [ identifierManagerClass sharedManager ]; + if ([ sharedManager isAdvertisingTrackingEnabled ]) { + environment.SetValue ( MOAI_ENV_iosIFA, [[[ sharedManager advertisingIdentifier ] UUIDString ] UTF8String ]); + } } - } + #endif int name [] = { CTL_HW, HW_MACHINE }; @@ -110,6 +117,6 @@ void AKUIosOpenUrl ( NSURL* url, NSString* sourceApplication ) { //----------------------------------------------------------------// void AKUIosSetFrameBuffer ( GLuint frameBuffer ) { - MOAIGfxDevice::Get ().GetDefaultFrameBuffer ()->SetGLFrameBufferID ( frameBuffer ); + MOAIGfxMgr::Get ().mGfxState.GetDefaultFrameBuffer ()->SetGLFrameBufferID ( new ZLGfxHandle ( ZLGfxHandle::FRAMEBUFFER, frameBuffer, true )); } diff --git a/src/moai-luaext/host.cpp b/src/moai-luaext/host.cpp index 72f6fe092c..82c787905b 100644 --- a/src/moai-luaext/host.cpp +++ b/src/moai-luaext/host.cpp @@ -1,6 +1,7 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com +#include #include extern "C" { @@ -26,21 +27,20 @@ void AKULuaExtAppInitialize () { //----------------------------------------------------------------// void AKULuaExtContextInitialize () { - lua_State* state = AKUGetLuaState (); + MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); #if MOAI_WITH_LIBCRYPTO luaopen_crypto ( state ); #endif - #if MOAI_WITH_CURL + #if MOAI_WITH_CURL luaopen_luacurl ( state ); #endif - #if MOAI_WITH_SQLITE - luaopen_luasql_sqlite3 ( state ); - #endif + #if MOAI_WITH_SQLITE + luaopen_luasql_sqlite3 ( state ); + #endif luaopen_lfs ( state ); luapreload_fullluasocket ( state ); - } diff --git a/src/moai-sdl/MOAIDialogSDL.cpp b/src/moai-sdl/MOAIDialogSDL.cpp index 12fa7bef9a..ae0e9caa55 100644 --- a/src/moai-sdl/MOAIDialogSDL.cpp +++ b/src/moai-sdl/MOAIDialogSDL.cpp @@ -47,7 +47,7 @@ int MOAIDialogSDL::_show ( lua_State* L ) { self->mWindow, // window title, // title message, // message - nButtons, // numbuttons + ( int )nButtons, // numbuttons buttons, // buttons NULL // colorScheme }; diff --git a/src/moai-sdl/host.cpp b/src/moai-sdl/host.cpp index 4e1f096067..3f9eddb86f 100644 --- a/src/moai-sdl/host.cpp +++ b/src/moai-sdl/host.cpp @@ -1,7 +1,6 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com -#include "pch.h" #include #include diff --git a/src/moai-sim/MOAIAction.cpp b/src/moai-sim/MOAIAction.cpp index 4ae26cdf0c..9c4df93109 100644 --- a/src/moai-sim/MOAIAction.cpp +++ b/src/moai-sim/MOAIAction.cpp @@ -170,6 +170,26 @@ int MOAIAction::_getChildren ( lua_State *L ) { return total; } +//----------------------------------------------------------------// +/** @lua hasChildren + @text Returns 'true; if action has children and the number of + children. + + @in MOAIAction self + @out boolean hasChildren + @out number nChildren +*/ +int MOAIAction::_hasChildren ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIAction, "U" ) + + size_t count = self->mChildren.Count (); + + state.Push ( count > 0 ); + state.Push (( u32 )count ); + + return 2; +} + //----------------------------------------------------------------// /** @lua isActive @text Checks to see if an action is currently in the action tree. @@ -270,17 +290,12 @@ int MOAIAction::_setAutoStop ( lua_State* L ) { int MOAIAction::_start ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIAction, "U" ) - MOAIAction* action = state.GetLuaObject < MOAIAction >( 2, true ); + MOAIAction* parent = state.GetLuaObject < MOAIAction >( 2, true ); bool defer = state.GetValue < bool >( 3, false ); - if ( !action ) { - action = MOAISim::Get ().GetActionMgr ().GetDefaultParent (); - } + self->Start ( parent, defer ); - self->Attach ( action, defer ); state.CopyToTop ( 1 ); - self->mActionFlags &= ~FLAGS_IS_PAUSED; - return 1; } @@ -331,7 +346,7 @@ int MOAIAction::_throttle ( lua_State* L ) { int MOAIAction::_update ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIAction, "U" ) - float step = state.GetValue < float >( 2, MOAISim::Get ().GetStep ()); + double step = state.GetValue < double >( 2, MOAISim::Get ().GetStep ()); self->OnUpdate ( step ); return 0; @@ -539,6 +554,7 @@ void MOAIAction::RegisterLuaFuncs ( MOAILuaState& state ) { { "defer", _defer }, { "detach", _detach }, { "getChildren", _getChildren }, + { "hasChildren", _hasChildren }, { "isActive", _isActive }, { "isBusy", _isBusy }, { "isDone", _isDone }, @@ -648,10 +664,10 @@ void MOAIAction::Update ( MOAIActionTree& tree, double step ) { } //----------------------------------------------------------------// -void MOAIAction::Start ( MOAIActionTree& tree, bool defer ) { +void MOAIAction::Start ( MOAIAction* parent, bool defer ) { - MOAIAction* defaultParent = tree.GetDefaultParent (); - this->Attach ( defaultParent, defer ); + parent = parent ? parent : MOAIActionStackMgr::Get ().GetDefaultParent (); + this->Attach ( parent, defer ); this->mActionFlags &= ~FLAGS_IS_PAUSED; } diff --git a/src/moai-sim/MOAIAction.h b/src/moai-sim/MOAIAction.h index df2225f9c6..ab163b5c7c 100644 --- a/src/moai-sim/MOAIAction.h +++ b/src/moai-sim/MOAIAction.h @@ -78,6 +78,7 @@ class MOAIAction : static int _defer ( lua_State* L ); static int _detach ( lua_State* L ); static int _getChildren ( lua_State* L ); + static int _hasChildren ( lua_State* L ); static int _isActive ( lua_State* L ); static int _isBusy ( lua_State* L ); static int _isDone ( lua_State* L ); @@ -132,8 +133,8 @@ class MOAIAction : ~MOAIAction (); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); - void Start ( MOAIActionTree& tree, bool defer ); + void Start ( MOAIAction* parent, bool defer ); void Stop (); }; -#endif \ No newline at end of file +#endif diff --git a/src/moai-sim/MOAIAnim.cpp b/src/moai-sim/MOAIAnim.cpp index 083d51f631..c38bc3467a 100644 --- a/src/moai-sim/MOAIAnim.cpp +++ b/src/moai-sim/MOAIAnim.cpp @@ -106,7 +106,7 @@ void MOAIAnim::Apply ( float t ) { MOAIAttrOp attrOp; - u32 total = this->mLinks.Size (); + u32 total = ( u32 )this->mLinks.Size (); for ( u32 i = 0; i < total; ++i ) { MOAIAnimLink& link = this->mLinks [ i ]; @@ -134,7 +134,7 @@ void MOAIAnim::Apply ( float t0, float t1 ) { MOAIAttrOp attrOp; - u32 total = this->mLinks.Size (); + u32 total = ( u32 )this->mLinks.Size (); for ( u32 i = 0; i < total; ++i ) { MOAIAnimLink& link = this->mLinks [ i ]; @@ -191,7 +191,7 @@ MOAIAnim::~MOAIAnim () { void MOAIAnim::OnUpdate ( double step ) { float t0 = this->GetTime (); - this->DoStep ( step ); + this->DoStep (( float )step ); float t1 = this->GetTime (); this->Apply ( t0, t1 ); diff --git a/src/moai-sim/MOAIAnimCurve.cpp b/src/moai-sim/MOAIAnimCurve.cpp index 95642413aa..cd6d1891b7 100644 --- a/src/moai-sim/MOAIAnimCurve.cpp +++ b/src/moai-sim/MOAIAnimCurve.cpp @@ -3,7 +3,8 @@ #include "pch.h" #include -#include +#include +#include //================================================================// // local @@ -22,9 +23,14 @@ int MOAIAnimCurve::_getValueAtTime ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIAnimCurve, "UN" ); float time = state.GetValue < float >( 2, 0 ); - float value = self->GetValue ( time ); + + MOAIAnimKeySpan span = self->GetSpan ( time ); + float value = self->GetValue ( span ); + state.Push ( value ); - return 1; + state.Push ( span.mKeyID + 1 ); + + return 2; } //----------------------------------------------------------------// @@ -104,35 +110,35 @@ void MOAIAnimCurve::Draw ( u32 resolution ) const { // and then the spans between keys should be filled in with an approximation of // the resolution. - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); float length = this->GetLength (); float step = length / ( float )resolution; - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_STRIP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_STRIP ); for ( u32 i = 0; i < resolution; ++i ) { float t = step * ( float )i; float v = this->GetValue ( t ); - gfxDevice.WriteVtx ( t, v, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( t, v, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); } float t = length; float v = this->GetValue ( t ); - gfxDevice.WriteVtx ( t, v, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( t, v, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// float MOAIAnimCurve::GetCurveDelta () const { - u32 size = this->mKeys.Size (); + size_t size = this->mKeys.Size (); if ( size > 1 ) { return this->mSamples [ size - 1 ] - this->mSamples [ 0 ]; } diff --git a/src/moai-sim/MOAIAnimCurveBase.cpp b/src/moai-sim/MOAIAnimCurveBase.cpp index 1c9d5adc62..5c40f9d557 100644 --- a/src/moai-sim/MOAIAnimCurveBase.cpp +++ b/src/moai-sim/MOAIAnimCurveBase.cpp @@ -102,7 +102,7 @@ u32 MOAIAnimCurveBase::FindKeyID ( float time ) const { MOAIAnimKey key; key.mTime = time; - u32 index = USBinarySearchNearest < MOAIAnimKey >( this->mKeys.Data (), key, this->mKeys.Size ()); + u32 index = USBinarySearchNearest < MOAIAnimKey >( this->mKeys.Data (), key, ( u32 )this->mKeys.Size ()); return index; } @@ -132,7 +132,7 @@ const MOAIAnimKey& MOAIAnimCurveBase::GetKey ( u32 id ) const { //----------------------------------------------------------------// float MOAIAnimCurveBase::GetLength () const { - u32 total = this->mKeys.Size (); + u32 total = ( u32 )this->mKeys.Size (); if ( total == 0 ) return 0.0f; return this->mKeys [ total - 1 ].mTime - this->mKeys [ 0 ].mTime; } @@ -145,7 +145,7 @@ MOAIAnimKeySpan MOAIAnimCurveBase::GetSpan ( float time ) const { span.mTime = 0.0f; span.mCycle = 0.0f; - u32 total = this->mKeys.Size (); + u32 total = ( u32 )this->mKeys.Size (); u32 endID = total - 1; assert ( total ); @@ -244,7 +244,7 @@ void MOAIAnimCurveBase::SetKey ( u32 id, float time, u32 mode, float weight ) { //----------------------------------------------------------------// u32 MOAIAnimCurveBase::Size () const { - return this->mKeys.Size (); + return ( u32 )this->mKeys.Size (); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIAnimCurveQuat.cpp b/src/moai-sim/MOAIAnimCurveQuat.cpp index c05e6adf58..117968749c 100644 --- a/src/moai-sim/MOAIAnimCurveQuat.cpp +++ b/src/moai-sim/MOAIAnimCurveQuat.cpp @@ -25,15 +25,19 @@ int MOAIAnimCurveQuat::_getValueAtTime ( lua_State* L ) { float time = state.GetValue < float >( 2, 0 ); - ZLQuaternion quat; - quat = self->GetValue( time ); + MOAIAnimKeySpan span = self->GetSpan ( time ); + ZLQuaternion quat = self->GetValue ( span ); ZLVec3D value; quat.Get ( value.mX, value.mY, value.mZ ); + state.Push ( value.mX ); state.Push ( value.mY ); state.Push ( value.mZ ); - return 3; + + state.Push ( span.mKeyID + 1 ); + + return 4; } //----------------------------------------------------------------// @@ -85,7 +89,7 @@ ZLQuaternion MOAIAnimCurveQuat::GetCurveDelta () const { ZLQuaternion delta; - u32 size = this->mKeys.Size (); + u32 size = ( u32 )this->mKeys.Size (); if ( size > 1 ) { delta = this->mSamples [ size - 1 ]; delta.Sub ( this->mSamples [ 0 ]); diff --git a/src/moai-sim/MOAIAnimCurveVec.cpp b/src/moai-sim/MOAIAnimCurveVec.cpp index e0e455ea44..c6dbd41b17 100644 --- a/src/moai-sim/MOAIAnimCurveVec.cpp +++ b/src/moai-sim/MOAIAnimCurveVec.cpp @@ -24,11 +24,17 @@ int MOAIAnimCurveVec::_getValueAtTime ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIAnimCurveVec, "UN" ); float time = state.GetValue < float >( 2, 0 ); - ZLVec3D value = self->GetValue ( time ); + + MOAIAnimKeySpan span = self->GetSpan ( time ); + ZLVec3D value = self->GetValue ( span ); + state.Push ( value.mX ); state.Push ( value.mY ); state.Push ( value.mZ ); - return 3; + + state.Push ( span.mKeyID + 1 ); + + return 4; } //----------------------------------------------------------------// @@ -80,7 +86,7 @@ ZLVec3D MOAIAnimCurveVec::GetCurveDelta () const { ZLVec3D delta; - u32 size = this->mKeys.Size (); + u32 size = ( u32 )this->mKeys.Size (); if ( size > 1 ) { delta = this->mSamples [ size - 1 ]; delta.Sub ( this->mSamples [ 0 ]); diff --git a/src/moai-sim/MOAIBitmapFontReader.cpp b/src/moai-sim/MOAIBitmapFontReader.cpp index fe53368c1c..679fdfd906 100644 --- a/src/moai-sim/MOAIBitmapFontReader.cpp +++ b/src/moai-sim/MOAIBitmapFontReader.cpp @@ -298,6 +298,8 @@ int MOAIBitmapFontReader::RenderGlyph ( MOAIImage& image, float x, float y, cons MOAIImage::FILTER_LINEAR, blendFunc ); + + return OK; } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIBlendMode.cpp b/src/moai-sim/MOAIBlendMode.cpp index b207c6590e..b39e184019 100644 --- a/src/moai-sim/MOAIBlendMode.cpp +++ b/src/moai-sim/MOAIBlendMode.cpp @@ -3,18 +3,21 @@ #include "pch.h" #include +#include //================================================================// // MOAIBlendMode //================================================================// //----------------------------------------------------------------// -void MOAIBlendMode::Bind () { - - zglEnable ( ZGL_PIPELINE_BLEND ); - zglBlendMode ( this->mEquation ); - zglBlendFunc ( this->mSourceFactor, this->mDestFactor ); -} +//void MOAIBlendMode::Bind () { +// +// ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); +// +// gfx.Enable ( ZGL_PIPELINE_BLEND ); +// gfx.BlendMode ( this->mEquation ); +// gfx.BlendFunc ( this->mSourceFactor, this->mDestFactor ); +//} //----------------------------------------------------------------// void MOAIBlendMode::GetBlendFactors ( u32 blend, int& srcFactor, int& dstFactor ) { diff --git a/src/moai-sim/MOAIBlendMode.h b/src/moai-sim/MOAIBlendMode.h index 655cad375e..70f4509b81 100644 --- a/src/moai-sim/MOAIBlendMode.h +++ b/src/moai-sim/MOAIBlendMode.h @@ -21,7 +21,7 @@ class MOAIBlendMode { int mDestFactor; //----------------------------------------------------------------// - void Bind (); + //void Bind (); static void GetBlendFactors ( u32 blend, int& srcFactor, int& dstFactor ); void SetBlend ( u32 blend ); void SetBlend ( int srcFactor, int dstFactor ); diff --git a/src/moai-sim/MOAIBoundsDeck.cpp b/src/moai-sim/MOAIBoundsDeck.cpp index 7131c4cf0f..8d9ab17026 100644 --- a/src/moai-sim/MOAIBoundsDeck.cpp +++ b/src/moai-sim/MOAIBoundsDeck.cpp @@ -113,13 +113,13 @@ ZLBox MOAIBoundsDeck::ComputeMaxBounds () { ZLBox bounds; - u32 size = this->mBoundsArray.Size (); + size_t size = this->mBoundsArray.Size (); if ( size == 0 ) { bounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ); } else { this->mMaxBounds = this->mBoundsArray [ 0 ]; - for ( u32 i = 1; i < size; ++i ) { + for ( size_t i = 1; i < size; ++i ) { bounds.Grow ( this->mBoundsArray [ i ]); } } @@ -140,8 +140,6 @@ MOAIBoundsDeck::MOAIBoundsDeck () { RTTI_BEGIN RTTI_EXTEND ( MOAIStandardDeck ) RTTI_END - - //this->SetContentMask ( MOAIProp::CAN_DRAW ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIButtonSensor.cpp b/src/moai-sim/MOAIButtonSensor.cpp index 726c50b87f..8410eac203 100644 --- a/src/moai-sim/MOAIButtonSensor.cpp +++ b/src/moai-sim/MOAIButtonSensor.cpp @@ -86,7 +86,6 @@ int MOAIButtonSensor::_setCallback ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIButtonSensor, "U" ) self->mOnButton.SetRef ( state, 2 ); - return 0; } diff --git a/src/moai-sim/MOAICamera.cpp b/src/moai-sim/MOAICamera.cpp index af2ebe7021..3b751269df 100644 --- a/src/moai-sim/MOAICamera.cpp +++ b/src/moai-sim/MOAICamera.cpp @@ -187,7 +187,7 @@ int MOAICamera::_moveFieldOfView ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -224,7 +224,7 @@ int MOAICamera::_seekFieldOfView ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -384,7 +384,6 @@ ZLMatrix4x4 MOAICamera::GetProjMtx ( const MOAIViewport& viewport ) const { ZLRect rect = viewport.GetRect (); - ZLVec2D viewScale = viewport.GetScale (); float xScale = ( 2.0f / rect.Width ()) * viewScale.mX; float yScale = ( 2.0f / rect.Height ()) * viewScale.mY; @@ -467,12 +466,12 @@ void MOAICamera::LookAt ( float x, float y, float z ) { target.Init ( local.mX, 0.0f, local.mZ ); target.Norm (); - float yRot = zAxis.Radians ( target ) * R2D * ( target.mX > 0.0f ? 1.0f : -1.0f ); // yaw + float yRot = ( float )( zAxis.Radians ( target ) * R2D * ( target.mX > 0.0f ? 1.0f : -1.0f )); // yaw target = local; target.Norm (); - float xRot = yAxis.Radians ( target ) * R2D; // pitch + float xRot = ( float )( yAxis.Radians ( target ) * R2D ); // pitch ZLVec3D rot = this->GetRot (); diff --git a/src/moai-sim/MOAICameraFitter2D.cpp b/src/moai-sim/MOAICameraFitter2D.cpp index 1ce282a10c..81b06f69f8 100644 --- a/src/moai-sim/MOAICameraFitter2D.cpp +++ b/src/moai-sim/MOAICameraFitter2D.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/src/moai-sim/MOAICollisionProp.cpp b/src/moai-sim/MOAICollisionProp.cpp index 6ae8fbd243..237ea08b13 100644 --- a/src/moai-sim/MOAICollisionProp.cpp +++ b/src/moai-sim/MOAICollisionProp.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -110,7 +110,7 @@ MOAICollisionProp::MOAICollisionProp () : mStayActive ( false ), mTouched ( MOAICollisionWorld::OVERLAP_PASS_INIT ), mCollisionWorld ( 0 ) { - + RTTI_BEGIN RTTI_EXTEND ( MOAIProp ) RTTI_END @@ -138,11 +138,13 @@ void MOAICollisionProp::OnRemoved () { //----------------------------------------------------------------// bool MOAICollisionProp::PrepareForInsertion ( const MOAIPartition& partition ) { + UNUSED ( partition ); return true; } //----------------------------------------------------------------// bool MOAICollisionProp::RefineOverlap ( const MOAICollisionProp& other, MOAIOverlapInfo& info ) const { + UNUSED ( other ); // TODO: actually pay attention to OVERLAP_GRANULARITY_FINE and OVERLAP_CALCULATE_BOUNDS info.mHasBounds = false; diff --git a/src/moai-sim/MOAICollisionProp.h b/src/moai-sim/MOAICollisionProp.h index 248966549c..7b0e4f94ea 100644 --- a/src/moai-sim/MOAICollisionProp.h +++ b/src/moai-sim/MOAICollisionProp.h @@ -100,19 +100,15 @@ class MOAICollisionProp: DECL_LUA_FACTORY ( MOAICollisionProp ) - enum { - OVERLAP_EVENTS_ON_UPDATE = 0x01, // will send overlap update events - OVERLAP_EVENTS_CONTINUOUS = 0x02, // both props will stay active as long as there's an overlap - OVERLAP_EVENTS_LIFECYCLE = 0x04, // will create overlap links and receive begin/end events - OVERLAP_GRANULARITY_FINE = 0x08, // will use higher resolution primitives if available - OVERLAP_CALCULATE_BOUNDS = 0x10, // will calculate bounds instead of just a point between both props - }; - - enum { - GROUP_MASK_ALL = 0xffffffff, - }; + static const u32 OVERLAP_EVENTS_ON_UPDATE = 0x01; // will send overlap update events + static const u32 OVERLAP_EVENTS_CONTINUOUS = 0x02; // both props will stay active as long as there's an overlap + static const u32 OVERLAP_EVENTS_LIFECYCLE = 0x04; // will create overlap links and receive begin/end events + static const u32 OVERLAP_GRANULARITY_FINE = 0x08; // will use higher resolution primitives if available + static const u32 OVERLAP_CALCULATE_BOUNDS = 0x10; // will calculate bounds instead of just a point between both props + + static const u32 GROUP_MASK_ALL = 0xffffffff; - static const u32 DEFAULT_OVERLAP_FLAGS = 0; + static const u32 DEFAULT_OVERLAP_FLAGS = 0; //----------------------------------------------------------------// MOAICollisionProp (); diff --git a/src/moai-sim/MOAICollisionWorld.cpp b/src/moai-sim/MOAICollisionWorld.cpp index b33e18a7b6..8784a08bc5 100644 --- a/src/moai-sim/MOAICollisionWorld.cpp +++ b/src/moai-sim/MOAICollisionWorld.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -477,16 +477,16 @@ void MOAICollisionWorld::RemoveProp ( MOAICollisionProp& prop ) { //----------------------------------------------------------------// void MOAICollisionWorld::Render () { - MOAIDebugLines& debugLines = MOAIDebugLines::Get (); + //MOAIDebugLines& debugLines = MOAIDebugLines::Get (); MOAIDraw& draw = MOAIDraw::Get (); UNUSED ( draw ); // mystery warning in vs2008 draw.Bind (); - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_WORLD, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::WORLD_MTX ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::VIEW_PROJ_MTX )); MOAICollisionProp* drawList = 0; diff --git a/src/moai-sim/MOAICollisionWorld.h b/src/moai-sim/MOAICollisionWorld.h index 8285b1859a..d3a2fcfa67 100644 --- a/src/moai-sim/MOAICollisionWorld.h +++ b/src/moai-sim/MOAICollisionWorld.h @@ -75,9 +75,7 @@ class MOAICollisionWorld : OVERLAP_UPDATE, }; - enum { - OVERLAP_PASS_INIT = 0, - }; + static const u32 OVERLAP_PASS_INIT = 0; //----------------------------------------------------------------// MOAICollisionWorld (); diff --git a/src/moai-sim/MOAIColor.cpp b/src/moai-sim/MOAIColor.cpp index ee28b14d01..a36455394d 100644 --- a/src/moai-sim/MOAIColor.cpp +++ b/src/moai-sim/MOAIColor.cpp @@ -66,7 +66,7 @@ int MOAIColor::_moveColor ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -120,7 +120,7 @@ int MOAIColor::_seekColor ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -149,11 +149,6 @@ int MOAIColor::_seekColor ( lua_State* L ) { int MOAIColor::_setColor ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIColor, "UNNN" ) - float r = state.GetValue < float >( 2, 0.0f ); - float g = state.GetValue < float >( 3, 0.0f ); - float b = state.GetValue < float >( 4, 0.0f ); - float a = state.GetValue < float >( 5, 1.0f ); - ZLColorVec color = state.GetColor ( 2, 0.0f, 0.0f, 0.0f, 1.0f ); if ( !color.Compare ( *self )) { self->Set ( color.mR, color.mG, color.mB, color.mA ); diff --git a/src/moai-sim/MOAICoroutine.cpp b/src/moai-sim/MOAICoroutine.cpp index 6b20764fc0..b1ca51313b 100644 --- a/src/moai-sim/MOAICoroutine.cpp +++ b/src/moai-sim/MOAICoroutine.cpp @@ -148,7 +148,7 @@ int MOAICoroutine::_run ( lua_State* L ) { lua_xmove ( state, self->mState, self->mNarg + 1 ); - self->Start ( MOAISim::Get ().GetActionMgr (), defer ); + self->Start ( 0, defer ); return 0; } @@ -227,7 +227,7 @@ MOAICoroutine::MOAICoroutine () : mNarg ( 0 ), mIsUpdating ( false ), mIsActive ( false ), - mIsDefaultParent ( true ) { + mIsDefaultParent ( false ) { RTTI_SINGLE ( MOAIAction ) @@ -258,7 +258,7 @@ void MOAICoroutine::OnStop () { //----------------------------------------------------------------// void MOAICoroutine::OnUpdate ( double step ) { - this->Resume ( step ); + this->Resume (( float )step ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIDebugLines.cpp b/src/moai-sim/MOAIDebugLines.cpp index b3d354be5b..c5238d13dd 100644 --- a/src/moai-sim/MOAIDebugLines.cpp +++ b/src/moai-sim/MOAIDebugLines.cpp @@ -3,7 +3,7 @@ #include "pch.h" #include -#include +#include #include #include @@ -85,13 +85,13 @@ int MOAIDebugLines::_showStyle ( lua_State* L ) { //----------------------------------------------------------------// bool MOAIDebugLines::Bind ( u32 styleID ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAIDebugLineStyle& style = this->mStyles [ styleID ]; if ( style.mVisible ) { - gfxDevice.SetPenColor ( style.mColor ); - gfxDevice.SetPenWidth ( style.mSize ); + gfxMgr.mGfxState.SetPenColor ( style.mColor ); + gfxMgr.mGfxState.SetPenWidth ( style.mSize ); return true; } return false; @@ -138,7 +138,10 @@ void MOAIDebugLines::RegisterLuaClass ( MOAILuaState& state ) { state.SetField ( -1, "TEXT_BOX_BASELINES", ( u32 )TEXT_BOX_BASELINES ); state.SetField ( -1, "TEXT_BOX_GLYPH_BOUNDS", ( u32 )TEXT_BOX_GLYPH_BOUNDS ); state.SetField ( -1, "TEXT_BOX_GLYPHS", ( u32 )TEXT_BOX_GLYPHS ); - state.SetField ( -1, "TEXT_BOX_LAYOUT", ( u32 )TEXT_BOX_LAYOUT ); + state.SetField ( -1, "TEXT_BOX_LAYOUT_BOUNDS", ( u32 )TEXT_BOX_LAYOUT_BOUNDS ); + state.SetField ( -1, "TEXT_BOX_LIMITS", ( u32 )TEXT_BOX_LIMITS ); + state.SetField ( -1, "TEXT_BOX_LINES_GLYPH_BOUNDS", ( u32 )TEXT_BOX_LINES_GLYPH_BOUNDS ); + state.SetField ( -1, "TEXT_BOX_LINES_LAYOUT_BOUNDS", ( u32 )TEXT_BOX_LINES_LAYOUT_BOUNDS ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIDebugLines.h b/src/moai-sim/MOAIDebugLines.h index c233bab234..b1f75d052f 100644 --- a/src/moai-sim/MOAIDebugLines.h +++ b/src/moai-sim/MOAIDebugLines.h @@ -43,7 +43,9 @@ class MOAIDebugLineStyle { @const TEXT_BOX_BASELINES @const TEXT_BOX_GLYPH_BOUNDS @const TEXT_BOX_GLYPHS - @const TEXT_BOX_LAYOUT + @const TEXT_BOX_LIMITS + @const TEXT_BOX_LINES_GLYPH_BOUNDS + @const TEXT_BOX_LINES_LOGICAL_BOUNDS */ class MOAIDebugLines : public MOAIGlobalClass < MOAIDebugLines, MOAILuaObject > { @@ -64,7 +66,10 @@ class MOAIDebugLines : TEXT_BOX_BASELINES, TEXT_BOX_GLYPH_BOUNDS, TEXT_BOX_GLYPHS, - TEXT_BOX_LAYOUT, + TEXT_BOX_LAYOUT_BOUNDS, + TEXT_BOX_LIMITS, + TEXT_BOX_LINES_GLYPH_BOUNDS, + TEXT_BOX_LINES_LAYOUT_BOUNDS, TOTAL_STYLES, }; diff --git a/src/moai-sim/MOAIDeck.cpp b/src/moai-sim/MOAIDeck.cpp index 563b77d49b..ccf8e641d7 100644 --- a/src/moai-sim/MOAIDeck.cpp +++ b/src/moai-sim/MOAIDeck.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include @@ -22,6 +22,24 @@ // local //================================================================// +//----------------------------------------------------------------// +//----------------------------------------------------------------// +/** @lua setBoundsDeck + @text Set or clear the bounds override deck. + + @in MOAIDeck self + @opt MOAIBoundsDeck boundsDeck + @out nil +*/ +int MOAIDeck::_setBoundsDeck ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIDeck, "U" ) + + self->mBoundsDeck.Set ( *self, state.GetLuaObject < MOAIBoundsDeck >( 2, true )); + + return 0; +} + + //----------------------------------------------------------------// /** @lua getBounds @text Return bounds for an item or the maximum bounds for the @@ -38,7 +56,7 @@ @out zMax @override - + @out xMin @out yMin @out zMin @@ -65,82 +83,6 @@ int MOAIDeck::_getBounds ( lua_State* L ) { return 6; } -//----------------------------------------------------------------// -/** @lua subdivideRect - @text Convenience method. Here for now as a class method, but maybe should - move to MOAIGrid. - - Subdivides a rectangle given a tile width and height. A table tile - rectangles will be returned. The tiles will be clipped to the original - rect. - - @in number tileWidth - @in number tileHeight - @in number xMin - @in number yMin - @in number xMax - @in number yMax - @out nil -*/ -int MOAIDeck::_subdivideRect ( lua_State* L ) { - MOAI_LUA_SETUP_CLASS ( "NNNNNN" ) - - float tileWidth = state.GetValue < float >( 1, 1.0f ); - float tileHeight = state.GetValue < float >( 2, 1.0f ); - - tileWidth = ABS ( tileWidth ); - tileHeight = ABS ( tileHeight ); - - ZLRect rect = state.GetRect < float >( 3 ); - - u32 x0 = ( u32 )( rect.mXMin / tileWidth ); - u32 x1 = ( u32 )( rect.mXMax / tileWidth ); - - u32 y0 = ( u32 )( rect.mYMin / tileHeight ); - u32 y1 = ( u32 )( rect.mYMax / tileHeight ); - - u32 count = 0; - u32 xCount = 0; - u32 yCount = 0; - - lua_newtable ( state ); - - for ( u32 y = y0; y <= y1; ++y ) { - for ( u32 x = x0; x <= x1; ++x ) { - - ZLRect tile; - - tile.mXMin = x * tileWidth; - tile.mYMin = y * tileHeight; - tile.mXMax = tile.mXMin + tileWidth; - tile.mYMax = tile.mYMin + tileHeight; - - ZLRect sub; - if ( tile.Intersect ( rect, sub )) { - - count++; - state.Push ( count ); - - lua_newtable ( state ); - state.SetFieldByIndex < float >( -1, 1, sub.mXMin ); - state.SetFieldByIndex < float >( -1, 2, sub.mYMin ); - state.SetFieldByIndex < float >( -1, 3, sub.mXMax ); - state.SetFieldByIndex < float >( -1, 4, sub.mYMax ); - - lua_settable ( state, -3 ); - - xCount = ( x - x0 ) + 1; - yCount = ( y - y0 ) + 1; - } - } - } - - state.Push ( xCount ); - state.Push ( yCount ); - - return 3; -} - //================================================================// // MOAIDeck //================================================================// @@ -209,13 +151,7 @@ MOAIDeck::~MOAIDeck () { //----------------------------------------------------------------// void MOAIDeck::RegisterLuaClass ( MOAILuaState& state ) { - - luaL_Reg regTable [] = { - { "subdivideRect", _subdivideRect }, - { NULL, NULL } - }; - - luaL_register ( state, 0, regTable ); + UNUSED ( state ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIDeck.h b/src/moai-sim/MOAIDeck.h index 7d95666387..4fa3a17c6b 100644 --- a/src/moai-sim/MOAIDeck.h +++ b/src/moai-sim/MOAIDeck.h @@ -29,9 +29,14 @@ class MOAIDeck : NO_CONTENT = 0xffffffff, }; + MOAILuaSharedPtr < MOAIBoundsDeck > mBoundsDeck; // bounds override + + ZLBox mMaxBounds; + bool mBoundsDirty; + //----------------------------------------------------------------// + static int _setBoundsDeck ( lua_State* L ); static int _getBounds ( lua_State* L ); - static int _subdivideRect ( lua_State* L ); public: diff --git a/src/moai-sim/MOAIDeckProxy.cpp b/src/moai-sim/MOAIDeckProxy.cpp index be98158e22..3f79fb15c4 100644 --- a/src/moai-sim/MOAIDeckProxy.cpp +++ b/src/moai-sim/MOAIDeckProxy.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/moai-sim/MOAIDraw.cpp b/src/moai-sim/MOAIDraw.cpp index 80a2d22fcb..b4ad4005f6 100644 --- a/src/moai-sim/MOAIDraw.cpp +++ b/src/moai-sim/MOAIDraw.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,7 +16,7 @@ #define DEFAULT_ELLIPSE_STEPS 64 //================================================================// -// ZLAbstractVertexWriter2D +// MOAIDrawVertexWriter2D //================================================================// class MOAIDrawVertexWriter2D : public ZLAbstractVertexWriter2D { @@ -24,9 +24,9 @@ class MOAIDrawVertexWriter2D : //----------------------------------------------------------------// void WriteVertex ( const ZLVec2D& v ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.WriteVtx ( v.mX, v.mY ); - gfxDevice.WriteFinalColor4b (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + gfxMgr.mVertexCache.WriteVtx ( v.mX, v.mY ); + gfxMgr.mVertexCache.WritePenColor4b (); } }; @@ -60,7 +60,7 @@ struct TextDrawContext { }; static TextDrawContext g_TextDrawContext; -static TextDrawContext* g_CurrentTextDrawContext = 0; +static TextDrawContext* g_CurrentTextDrawContext = 0; // TODO: ugh! refactor this! //----------------------------------------------------------------// void MOAIDraw::BeginDrawString ( float scale, MOAIFont& font, float fontSize, float shadowOffsetX, float shadowOffsetY ) { @@ -86,8 +86,9 @@ void MOAIDraw::DrawString ( cc8* text, float x, float y, float width, float heig assert ( g_CurrentTextDrawContext ); // Transform the center into 'world' space - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - const ZLMatrix4x4& orgWorldTransform = gfxDevice.GetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + const ZLMatrix4x4& orgWorldTransform = gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_MTX ); ZLVec2D pos ( x, y ); orgWorldTransform.Transform ( pos ); x = pos.mX; @@ -180,13 +181,10 @@ void MOAIDraw::DrawString ( cc8* text, float x, float y, float scale, MOAIFont& void MOAIDraw::EndDrawString () { // Setup for drawing - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); // Get current state - const ZLMatrix4x4& orgWorldTransform = gfxDevice.GetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); - - u32 orgVtxModeInput, orgVtxModeOutput; - gfxDevice.GetVertexMtxMode ( orgVtxModeInput, orgVtxModeOutput ); + //const ZLMatrix4x4& orgWorldTransform = gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_MTX ); // TODO //GLint orgSrcBlend, orgDestBlend; @@ -194,16 +192,17 @@ void MOAIDraw::EndDrawString () { //glGetIntegerv ( GL_BLEND_DST, &orgDestBlend ); // Apply render state - gfxDevice.SetShader ( MOAIShaderMgr::FONT_SHADER ); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_WORLD, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetBlendMode ( ZGL_BLEND_FACTOR_ONE, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); + if ( !gfxMgr.mGfxState.BindShader ( MOAIShaderMgr::FONT_SHADER )) return; + + gfxMgr.mGfxState.SetBlendMode ( ZGL_BLEND_FACTOR_ONE, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_MTX )); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); // Get the context data assert( g_CurrentTextDrawContext ); - MOAIFont& font = *g_CurrentTextDrawContext->mFont; - float scale = g_CurrentTextDrawContext->mScale; + //MOAIFont& font = *g_CurrentTextDrawContext->mFont; + //float scale = g_CurrentTextDrawContext->mScale; float shadowOffsetX = g_CurrentTextDrawContext->mShadowOffsetX; float shadowOffsetY = g_CurrentTextDrawContext->mShadowOffsetY; @@ -212,11 +211,11 @@ void MOAIDraw::EndDrawString () { u32 numPasses = 1; float offsetX = 0; float offsetY = 0; - ZLColorVec penColor = gfxDevice.GetPenColor (); + ZLColorVec penColor = gfxMgr.mGfxState.GetPenColor (); if ( drawDropShadows ) { numPasses = 2; - gfxDevice.SetPenColor ( 0, 0, 0, 1 ); + gfxMgr.mGfxState.SetPenColor ( 0, 0, 0, 1 ); offsetX = shadowOffsetX; offsetY = shadowOffsetY; } @@ -224,27 +223,26 @@ void MOAIDraw::EndDrawString () { for ( u32 pass = 0; pass < numPasses; pass++ ) { if ( pass == 1 || numPasses == 1 ) { - gfxDevice.SetPenColor ( penColor ); + gfxMgr.mGfxState.SetPenColor ( penColor ); offsetX = 0; offsetY = 0; } - STLList < GlyphPlacement >::const_iterator it; - for ( it = g_CurrentTextDrawContext->mGlyphs.begin (); it != g_CurrentTextDrawContext->mGlyphs.end (); ++it ) { + //STLList < GlyphPlacement >::const_iterator it; + //for ( it = g_CurrentTextDrawContext->mGlyphs.begin (); it != g_CurrentTextDrawContext->mGlyphs.end (); ++it ) { - const GlyphPlacement& glyphPlacement = *it; - MOAIGlyph* glyph = glyphPlacement.glyph; - MOAISingleTexture* glyphTexture = font.GetGlyphTexture ( *glyph ); - //glyph->Draw ( *glyphTexture, glyphPlacement.x + offsetX, glyphPlacement.y + offsetY, scale, scale ); - } + // const GlyphPlacement& glyphPlacement = *it; + // MOAIGlyph* glyph = glyphPlacement.glyph; + // MOAISingleTexture* glyphTexture = font.GetGlyphTexture ( *glyph ); + // glyph->Draw ( *glyphTexture, glyphPlacement.x + offsetX, glyphPlacement.y + offsetY, scale, scale ); + //} } // Restore render state - Bind (); + MOAIDraw::Bind (); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, orgWorldTransform ); - gfxDevice.SetVertexMtxMode ( orgVtxModeInput, orgVtxModeOutput ); - //gfxDevice.SetBlendMode ( orgSrcBlend, orgDestBlend ); // TODO + //gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_WORLD_TRANSFORM, orgWorldTransform ); + //gfxMgr.SetBlendMode ( orgSrcBlend, orgDestBlend ); // TODO // Clear context g_CurrentTextDrawContext->mFont = 0; @@ -271,7 +269,7 @@ int MOAIDraw::_drawAnimCurve ( lua_State* L ) { } //----------------------------------------------------------------// -// TODO: doxygen +// TODO: implement int MOAIDraw::_drawAxisGrid ( lua_State* L ) { UNUSED ( L ); return 0; @@ -364,6 +362,30 @@ int MOAIDraw::_drawCircle ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +/** @lua drawCircleSpokes + @text Draw the spokes of a circle. + + @in number x + @in number y + @in number r + @in number steps + @out nil +*/ +int MOAIDraw::_drawCircleSpokes ( lua_State* L ) { + + MOAILuaState state ( L ); + + float x0 = state.GetValue < float >( 1, 0.0f ); + float y0 = state.GetValue < float >( 2, 0.0f ); + float r = state.GetValue < float >( 3, 0.0f ); + u32 steps = state.GetValue < u32 >( 4, DEFAULT_ELLIPSE_STEPS ); + + MOAIDraw::DrawEllipseSpokes ( x0, y0, r, r, steps ); + return 0; +} + + //----------------------------------------------------------------// /** @lua drawElements @text Draw elements. @@ -412,7 +434,33 @@ int MOAIDraw::_drawEllipse ( lua_State* L ) { } //----------------------------------------------------------------// -// TODO: doxygen +/** @lua drawCircleSpokes + @text Draw the spokes of an ellipse. + + @in number x + @in number y + @in number xRad + @in number yRad + @in number steps + @out nil +*/ +int MOAIDraw::_drawEllipseSpokes ( lua_State* L ) { + + MOAILuaState state ( L ); + + float x = state.GetValue < float >( 1, 0.0f ); + float y = state.GetValue < float >( 2, 0.0f ); + float xRad = state.GetValue < float >( 3, 0.0f ); + float yRad = state.GetValue < float >( 4, 0.0f ); + + u32 steps = state.GetValue < u32 >( 5, DEFAULT_ELLIPSE_STEPS ); + + MOAIDraw::DrawEllipseSpokes ( x, y, xRad, yRad, steps ); + return 0; +} + +//----------------------------------------------------------------// +// TODO: implement int MOAIDraw::_drawGrid ( lua_State* L ) { UNUSED ( L ); return 0; @@ -434,7 +482,7 @@ int MOAIDraw::_drawLine ( lua_State* L ) { MOAIDraw::DrawLuaParams ( L, ZGL_PRIM_LINE_STRIP ); } - MOAIGfxDevice::Get ().FlushBufferedPrims (); + MOAIGfxMgr::Get ().mVertexCache.FlushBufferedPrims (); // TODO: have to do this here? return 0; } @@ -683,7 +731,7 @@ int MOAIDraw::_fillRect ( lua_State* L ) { */ int MOAIDraw::_setBlendMode ( lua_State* L ) { MOAILuaState state ( L ); - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); if ( state.IsType ( 1, LUA_TNUMBER )) { if ( state.IsType ( 2, LUA_TNUMBER )) { @@ -691,16 +739,16 @@ int MOAIDraw::_setBlendMode ( lua_State* L ) { u32 srcFactor = state.GetValue < u32 >( 1, 0 ); u32 dstFactor = state.GetValue < u32 >( 2, 0 ); u32 equation = state.GetValue < u32 >( 3, 0 ); - gfxDevice.SetBlendMode ( srcFactor, dstFactor, equation ); + gfxMgr.mGfxState.SetBlendMode ( srcFactor, dstFactor, equation ); } else { u32 blendMode = state.GetValue < u32 >( 1, MOAIBlendMode::BLEND_NORMAL ); - gfxDevice.SetBlendMode (( const MOAIBlendMode& )blendMode); + gfxMgr.mGfxState.SetBlendMode (( const MOAIBlendMode& )blendMode); } } else { - gfxDevice.SetBlendMode(); + gfxMgr.mGfxState.SetBlendMode(); } return 0; } @@ -710,13 +758,19 @@ int MOAIDraw::_setBlendMode ( lua_State* L ) { //================================================================// //----------------------------------------------------------------// -void MOAIDraw::Bind () { +bool MOAIDraw::Bind () { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + if ( !gfxMgr.mGfxState.BindTexture ()) return false; + if ( !gfxMgr.mGfxState.BindShader ( MOAIShaderMgr::LINE_SHADER )) return false; - gfxDevice.SetTexture (); - gfxDevice.SetShader ( MOAIShaderMgr::LINE_SHADER ); - gfxDevice.BindBufferedDrawing ( MOAIVertexFormatMgr::XYZWC ); + gfxMgr.mVertexCache.BindBufferedDrawing ( MOAIVertexFormatMgr::XYZWC ); + + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); + gfxMgr.mVertexCache.SetUVTransform ( MOAIGfxMgr::Get ().mGfxState.GetMtx ( MOAIGfxGlobalsCache::UV_MTX )); + + return true; } //----------------------------------------------------------------// @@ -728,7 +782,7 @@ void MOAIDraw::DrawAnimCurve ( const MOAIAnimCurve& curve, u32 resolution ) { //----------------------------------------------------------------// void MOAIDraw::DrawAxisGrid ( ZLVec2D loc, ZLVec2D vec, float size ) { - ZLMatrix4x4 mtx = MOAIGfxDevice::Get ().GetViewProjMtx (); + ZLMatrix4x4 mtx = MOAIGfxMgr::Get ().mGfxState.GetMtx ( MOAIGfxGlobalsCache::VIEW_PROJ_MTX ); ZLMatrix4x4 invMtx; invMtx.Inverse ( mtx ); @@ -859,29 +913,35 @@ void MOAIDraw::DrawBoxOutline ( const ZLBox& box ) { //----------------------------------------------------------------// void MOAIDraw::DrawBezierCurve ( const ZLCubicBezier2D& bezier ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAIDrawVertexWriter2D writer; - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_STRIP ); - bezier.Flatten ( writer ); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_STRIP ); + bezier.Flatten ( writer ); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIDraw::DrawElements ( MOAIGfxBuffer* vtxBuffer, MOAIVertexFormat* vtxFormat, u32 count ) { + + // TODO: fix this? + + UNUSED ( vtxBuffer ); + UNUSED ( vtxFormat ); + UNUSED ( count ); -// MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); +// MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); // -// MOAIGfxDevice::Get ().UnbindBufferedDrawing (); +// MOAIGfxMgr::Get ().UnbindBufferedDrawing (); // // vtxBuffer->Bind (); // vtxFormat->Bind ( 0 ); // -// gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_MODEL ); +// gfxMgr.SetVertexMtxMode ( MOAIGfxMgr::VTX_STAGE_MODEL, MOAIGfxMgr::VTX_STAGE_MODEL ); // -// gfxDevice.UpdateShaderGlobals (); +// gfxMgr.UpdateShaderGlobals (); // -// // TODO: use gfxDevice to cache buffers +// // TODO: use gfxMgr to cache buffers // // zglDrawArrays ( ZGL_PRIM_TRIANGLES, 0, count ); // vtxBuffer->Unbind (); @@ -900,22 +960,22 @@ void MOAIDraw::DrawEllipseFill ( const ZLRect& rect, u32 steps ) { //----------------------------------------------------------------// void MOAIDraw::DrawEllipseFill ( float x, float y, float xRad, float yRad, u32 steps ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); float angle = ( float )TWOPI / ( float )steps; float angleStep = ( float )PI; - gfxDevice.BeginPrim ( ZGL_PRIM_TRIANGLE_FAN ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_TRIANGLE_FAN ); for ( u32 i = 0; i < steps; ++i, angleStep += angle ) { - gfxDevice.WriteVtx ( + gfxMgr.mVertexCache.WriteVtx ( x + ( Sin ( angleStep ) * xRad ), y + ( Cos ( angleStep ) * yRad ), 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WritePenColor4b (); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// @@ -930,22 +990,39 @@ void MOAIDraw::DrawEllipseOutline ( const ZLRect& rect, u32 steps ) { //----------------------------------------------------------------// void MOAIDraw::DrawEllipseOutline ( float x, float y, float xRad, float yRad, u32 steps ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); float step = ( float )TWOPI / ( float )steps; float angle = ( float )PI; - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_LOOP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_LOOP ); for ( u32 i = 0; i < steps; ++i, angle += step ) { - gfxDevice.WriteVtx ( + gfxMgr.mVertexCache.WriteVtx ( x + ( Cos ( angle ) * xRad ), y + ( Sin ( angle ) * yRad ), 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WritePenColor4b (); + } + gfxMgr.mVertexCache.EndPrim (); +} + +//----------------------------------------------------------------// +void MOAIDraw::DrawEllipseSpokes ( float x, float y, float xRad, float yRad, u32 steps ) { + + float step = ( float )TWOPI / ( float )steps; + float angle = ( float )PI; + + for ( u32 i = 0; i < steps; ++i, angle += step ) { + + MOAIDraw::DrawLine ( + x, + y, + x + ( Cos ( angle ) * xRad ), + y + ( Sin ( angle ) * yRad ) + ); } - gfxDevice.EndPrim (); } //----------------------------------------------------------------// @@ -997,30 +1074,30 @@ void MOAIDraw::DrawLine ( const ZLVec3D& v0, const ZLVec3D& v1 ) { //----------------------------------------------------------------// void MOAIDraw::DrawLine ( float x0, float y0, float z0, float x1, float y1, float z1 ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPrimType ( ZGL_PRIM_LINE_STRIP ); + gfxMgr.mVertexCache.SetPrimType ( ZGL_PRIM_LINE_STRIP ); - gfxDevice.BeginPrim (); + gfxMgr.mVertexCache.BeginPrim (); - gfxDevice.WriteVtx ( x0, y0, z0 ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( x0, y0, z0 ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( x1, y1, z1 ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( x1, y1, z1 ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIDraw::DrawLuaParams ( lua_State* L, u32 primType ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAILuaState state ( L ); u32 total = state.GetTop () >> 1; - gfxDevice.BeginPrim ( primType ); + gfxMgr.mVertexCache.BeginPrim ( primType ); for ( u32 i = 0; i < total; ++i ) { @@ -1029,24 +1106,24 @@ void MOAIDraw::DrawLuaParams ( lua_State* L, u32 primType ) { float x = state.GetValue < float >( idx, 0.0f ); float y = state.GetValue < float >( idx + 1, 0.0f ); - gfxDevice.WriteVtx ( x, y, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( x, y, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIDraw::DrawLuaArray ( lua_State* L, u32 primType ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAILuaState state ( L ); float x = 0.0f; float y = 0.0f; - gfxDevice.BeginPrim ( primType ); + gfxMgr.mVertexCache.BeginPrim ( primType ); u32 counter = 0; lua_pushnil ( L ); @@ -1057,14 +1134,14 @@ void MOAIDraw::DrawLuaArray ( lua_State* L, u32 primType ) { x = state.GetValue < float >( -1, 0.0f ); } else { y = state.GetValue < float >( -1, 0.0f ); - gfxDevice.WriteVtx ( x, y ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( x, y ); + gfxMgr.mVertexCache.WritePenColor4b (); } ++counter; lua_pop ( L, 1 ); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// @@ -1076,32 +1153,32 @@ void MOAIDraw::DrawPoint ( const ZLVec2D& loc ) { //----------------------------------------------------------------// void MOAIDraw::DrawPoint ( float x, float y ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPrimType ( ZGL_PRIM_POINTS ); + gfxMgr.mVertexCache.SetPrimType ( ZGL_PRIM_POINTS ); - gfxDevice.BeginPrim (); - gfxDevice.WriteVtx ( x, y, 0.0f ); - gfxDevice.WriteFinalColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.BeginPrim (); + gfxMgr.mVertexCache.WriteVtx ( x, y, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIDraw::DrawPolyOutline ( const ZLPolygon2D& poly ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPrimType ( ZGL_PRIM_LINE_LOOP ); + gfxMgr.mVertexCache.SetPrimType ( ZGL_PRIM_LINE_LOOP ); size_t size = poly.GetSize (); - gfxDevice.BeginPrim (); + gfxMgr.mVertexCache.BeginPrim (); for ( u32 i = 0; i < size; ++i ) { const ZLVec2D& v0 = poly.GetVertex ( i ); - gfxDevice.WriteVtx ( v0.mX, v0.mY, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( v0.mX, v0.mY, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// @@ -1119,7 +1196,7 @@ void MOAIDraw::DrawRay ( float x, float y, float dx, float dy ) { ZLVec2D loc ( x, y ); ZLVec2D vec ( dx, dy ); - ZLMatrix4x4 mtx = MOAIGfxDevice::Get ().GetViewProjMtx (); + ZLMatrix4x4 mtx = MOAIGfxMgr::Get ().mGfxState.GetMtx ( MOAIGfxGlobalsCache::VIEW_PROJ_MTX ); ZLMatrix4x4 invMtx; invMtx.Inverse ( mtx ); @@ -1138,17 +1215,17 @@ void MOAIDraw::DrawRay ( float x, float y, float dx, float dy ) { invMtx.Transform ( p0 ); invMtx.Transform ( p1 ); - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.BeginPrim ( ZGL_PRIM_LINES ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINES ); - gfxDevice.WriteVtx ( p0.mX, p0.mY, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( p0.mX, p0.mY, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( p1.mX, p1.mY, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( p1.mX, p1.mY, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } } @@ -1188,55 +1265,55 @@ void MOAIDraw::DrawRectFill ( ZLRect rect, bool asTriStrip ) { //----------------------------------------------------------------// void MOAIDraw::DrawRectFill ( float left, float top, float right, float bottom, bool asTriStrip ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); if ( asTriStrip ) { - gfxDevice.BeginPrim ( ZGL_PRIM_TRIANGLE_STRIP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_TRIANGLE_STRIP ); - gfxDevice.WriteVtx ( left, top, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( left, top, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( right, top, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( right, top, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( left, bottom, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( left, bottom, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( right, bottom, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( right, bottom, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } else { // Tri 1 - gfxDevice.BeginPrim ( ZGL_PRIM_TRIANGLES ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_TRIANGLES ); - gfxDevice.WriteVtx ( left, top, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( left, top, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( right, top, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( right, top, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( right, bottom, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( right, bottom, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); // Tri 2 - gfxDevice.BeginPrim ( ZGL_PRIM_TRIANGLES ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_TRIANGLES ); - gfxDevice.WriteVtx ( right, bottom, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( right, bottom, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( left, bottom, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( left, bottom, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( left, top, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( left, top, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } } @@ -1249,48 +1326,48 @@ void MOAIDraw::DrawRectOutline ( const ZLRect& rect ) { //----------------------------------------------------------------// void MOAIDraw::DrawRectOutline ( float left, float top, float right, float bottom ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.BeginPrim ( ZGL_PRIM_LINE_LOOP ); + gfxMgr.mVertexCache.BeginPrim ( ZGL_PRIM_LINE_LOOP ); - gfxDevice.WriteVtx ( left, top, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( left, top, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( right, top, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( right, top, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( right, bottom, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( right, bottom, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.WriteVtx ( left, bottom, 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( left, bottom, 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIDraw::DrawTexture ( float left, float top, float right, float bottom, MOAITexture* texture ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); if ( texture ) { -// gfxDevice.SetBlendMode ( ZGL_BLEND_FACTOR_ONE, ZGL_BLEND_FACTOR_ZERO ); - gfxDevice.SetTexture ( texture ); - gfxDevice.SetShader ( MOAIShaderMgr::DECK2D_SHADER ); +// gfxMgr.SetBlendMode ( ZGL_BLEND_FACTOR_ONE, ZGL_BLEND_FACTOR_ZERO ); + if ( !gfxMgr.mGfxState.BindTexture ( texture )) return; + if ( !gfxMgr.mGfxState.BindShader ( MOAIShaderMgr::DECK2D_SHADER )) return; - const ZLColorVec& orgColor = gfxDevice.GetPenColor (); - gfxDevice.SetPenColor ( 1, 1, 1, 1 ); + const ZLColorVec& orgColor = gfxMgr.mGfxState.GetPenColor (); + gfxMgr.mGfxState.SetPenColor ( 1, 1, 1, 1 ); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); MOAIQuadBrush quad; quad.SetVerts ( left, top, right, bottom ); quad.SetUVs ( 0, 0, 1, 1 ); quad.Draw (); -// gfxDevice.SetBlendMode (); - gfxDevice.SetPenColor ( orgColor ); +// gfxMgr.SetBlendMode (); + gfxMgr.mGfxState.SetPenColor ( orgColor ); MOAIDraw::Bind (); } @@ -1299,39 +1376,39 @@ void MOAIDraw::DrawTexture ( float left, float top, float right, float bottom, M //----------------------------------------------------------------// void MOAIDraw::DrawVertexArray ( const ZLVec3D* verts, u32 count, u32 color, u32 primType ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPrimType ( primType ); - gfxDevice.SetPenColor ( color ); + gfxMgr.mGfxState.SetPenColor ( color ); + gfxMgr.mVertexCache.SetPrimType ( primType ); - gfxDevice.BeginPrim (); + gfxMgr.mVertexCache.BeginPrim (); for ( u32 i = 0; i < count; ++i ) { const ZLVec3D& vtx = verts [ i ]; - gfxDevice.WriteVtx ( vtx ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( vtx ); + gfxMgr.mVertexCache.WritePenColor4b (); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// void MOAIDraw::DrawVertexArray2D ( const float* verts, u32 count, u32 color, u32 primType ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPrimType ( primType ); - gfxDevice.SetPenColor ( color ); + gfxMgr.mGfxState.SetPenColor ( color ); + gfxMgr.mVertexCache.SetPrimType ( primType ); - gfxDevice.BeginPrim (); + gfxMgr.mVertexCache.BeginPrim (); for ( u32 i = 0; i < count; ++i ) { u32 v = i << 1; - gfxDevice.WriteVtx ( verts [ v ], verts [ v + 1 ], 0.0f ); - gfxDevice.WriteFinalColor4b (); + gfxMgr.mVertexCache.WriteVtx ( verts [ v ], verts [ v + 1 ], 0.0f ); + gfxMgr.mVertexCache.WritePenColor4b (); } - gfxDevice.EndPrim (); + gfxMgr.mVertexCache.EndPrim (); } //----------------------------------------------------------------// @@ -1354,8 +1431,10 @@ void MOAIDraw::RegisterLuaClass ( MOAILuaState& state ) { { "drawBezierCurve", _drawBezierCurve }, { "drawBoxOutline", _drawBoxOutline }, { "drawCircle", _drawCircle }, + { "drawCircleSpokes", _drawCircleSpokes }, { "drawElements", _drawElements }, { "drawEllipse", _drawEllipse }, + { "drawEllipseSpokes", _drawEllipseSpokes }, //{ "drawGrid", _drawGrid }, // TODO { "drawLine", _drawLine }, { "drawPoints", _drawPoints }, diff --git a/src/moai-sim/MOAIDraw.h b/src/moai-sim/MOAIDraw.h index 89f008892c..3ed459502c 100644 --- a/src/moai-sim/MOAIDraw.h +++ b/src/moai-sim/MOAIDraw.h @@ -29,8 +29,10 @@ class MOAIDraw : static int _drawBezierCurve ( lua_State* L ); static int _drawBoxOutline ( lua_State* L ); static int _drawCircle ( lua_State* L ); + static int _drawCircleSpokes ( lua_State* L ); static int _drawElements ( lua_State* L ); static int _drawEllipse ( lua_State* L ); + static int _drawEllipseSpokes ( lua_State* L ); static int _drawGrid ( lua_State* L ); static int _drawLine ( lua_State* L ); static int _drawPoints ( lua_State* L ); @@ -54,7 +56,7 @@ class MOAIDraw : //----------------------------------------------------------------// static void BeginDrawString ( float scale, MOAIFont& font, float fontSize, float shadowOffsetX, float shadowOffsetY ); - static void Bind (); + static bool Bind (); static void DrawAnimCurve ( const MOAIAnimCurve& curve, u32 resolution ); static void DrawAxisGrid ( ZLVec2D loc, ZLVec2D vec, float size ); static void DrawBezierCurve ( const ZLCubicBezier2D& bezier ); @@ -66,6 +68,7 @@ class MOAIDraw : static void DrawEllipseFill ( float x, float y, float xRad, float yRad, u32 steps ); static void DrawEllipseOutline ( const ZLRect& rect, u32 steps ); static void DrawEllipseOutline ( float x, float y, float xRad, float yRad, u32 steps ); + static void DrawEllipseSpokes ( float x, float y, float xRad, float yRad, u32 steps ); static void DrawGrid ( const ZLRect& rect, u32 xCells, u32 yCells ); static void DrawLine ( const ZLVec2D& v0, const ZLVec2D& v1 ); static void DrawLine ( const ZLVec3D& v0, const ZLVec3D& v1 ); diff --git a/src/moai-sim/MOAIDynamicGlyphCache.cpp b/src/moai-sim/MOAIDynamicGlyphCache.cpp index b83f99289d..7f5917c5d9 100644 --- a/src/moai-sim/MOAIDynamicGlyphCache.cpp +++ b/src/moai-sim/MOAIDynamicGlyphCache.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include @@ -113,13 +113,13 @@ MOAISingleTexture* MOAIDynamicGlyphCache::GetGlyphTexture ( MOAIGlyph& glyph ) { //----------------------------------------------------------------// MOAIImage* MOAIDynamicGlyphCache::GetImage () { - u32 totalPages = this->mPages.Size (); + size_t totalPages = this->mPages.Size (); if ( !totalPages ) return 0; u32 width = 0; u32 height = 0; - for ( u32 i = 0; i < totalPages; ++i ) { + for ( size_t i = 0; i < totalPages; ++i ) { MOAIImage& srcImage = *this->mPages [ i ]->mImageTexture; width = srcImage.GetWidth (); @@ -137,7 +137,7 @@ MOAIImage* MOAIDynamicGlyphCache::GetImage () { ); u32 y = 0; - for ( u32 i = 0; i < totalPages; ++i ) { + for ( size_t i = 0; i < totalPages; ++i ) { MOAIImage& srcImage = *this->mPages [ i ]->mImageTexture; u32 copyHeight = srcImage.GetHeight (); @@ -184,7 +184,7 @@ int MOAIDynamicGlyphCache::PlaceGlyph ( MOAIFont& font, MOAIGlyph& glyph ) { } } - u32 pageID = this->mPages.Size (); + u32 pageID = ( u32 )this->mPages.Size (); // TODO: cast this->mPages.Resize ( pageID + 1 ); MOAIDynamicGlyphCachePage* page = new MOAIDynamicGlyphCachePage (); diff --git a/src/moai-sim/MOAIDynamicGlyphCachePage.cpp b/src/moai-sim/MOAIDynamicGlyphCachePage.cpp index c181ee3f98..06f2051237 100644 --- a/src/moai-sim/MOAIDynamicGlyphCachePage.cpp +++ b/src/moai-sim/MOAIDynamicGlyphCachePage.cpp @@ -20,7 +20,7 @@ void MOAIDynamicGlyphCachePage::AffirmCanvas ( MOAIDynamicGlyphCache& owner, MOA if ( !this->mImageTexture ) { this->mImageTexture = new MOAIImageTexture (); - this->mImageTexture->Init ( MAX_TEXTURE_SIZE, this->mRows.mSize, owner.mColorFormat, MOAIImage::TRUECOLOR ); + this->mImageTexture->Init ( MAX_TEXTURE_SIZE, ( u32 )this->mRows.mSize, owner.mColorFormat, MOAIImage::TRUECOLOR ); this->mImageTexture->SetDebugName ( font.GetFilename ()); this->mImageTexture->SetFilter ( font.GetMinFilter (), font.GetMagFilter ()); this->mImageTexture->ClearBitmap (); @@ -30,7 +30,7 @@ void MOAIDynamicGlyphCachePage::AffirmCanvas ( MOAIDynamicGlyphCache& owner, MOA else if ( this->mImageTexture->MOAIImage::GetHeight () < this->mRows.mSize ) { ZLIntRect rect; - rect.Init ( 0, 0, MAX_TEXTURE_SIZE, this->mRows.mSize ); + rect.Init ( 0, 0, MAX_TEXTURE_SIZE, ( int )this->mRows.mSize ); this->mImageTexture->ResizeCanvas ( *this->mImageTexture, rect ); this->mImageTexture->UpdateRegion (); } @@ -39,14 +39,14 @@ void MOAIDynamicGlyphCachePage::AffirmCanvas ( MOAIDynamicGlyphCache& owner, MOA //----------------------------------------------------------------// MOAIDynamicGlyphCachePage::GlyphSpan* MOAIDynamicGlyphCachePage::Alloc ( MOAIDynamicGlyphCache& owner, MOAIFont& font, MOAIGlyph& glyph ) { - u32 width = ( u32 )glyph.mWidth + ( owner.mPadding.mXMax - owner.mPadding.mXMin ); - u32 height = ( u32 )glyph.mHeight + ( owner.mPadding.mYMax - owner.mPadding.mYMin ); + u32 width = ( u32 )( glyph.mWidth + owner.mPadding.Width ()); + u32 height = ( u32 )( glyph.mHeight + owner.mPadding.Height ()); RowSpan* rowIt = this->mRows.mHead; RowSpan* bestRowIt = 0; RowSpan* backupRowIt = 0; - // find the very shortest row that can still accomodate the glyph + // find the very shortest row that can still accommodate the glyph for ( ; rowIt; rowIt = rowIt->mNext ) { if ( rowIt->mOccupied && ( height <= rowIt->mSize ) && rowIt->mData.HasRoom ( width )){ if ( !bestRowIt || ( bestRowIt && ( rowIt->mSize < bestRowIt->mSize ))) { @@ -92,7 +92,7 @@ MOAIDynamicGlyphCachePage::GlyphSpan* MOAIDynamicGlyphCachePage::Alloc ( MOAIDyn GlyphSpan* glyphSpan = bestRowIt->mData.Alloc ( width ); if ( glyphSpan ) { - glyph.SetSourceLoc ( glyphSpan->mBase - owner.mPadding.mXMin, bestRowIt->mBase - owner.mPadding.mYMin); + glyph.SetSourceLoc (( u32 )( glyphSpan->mBase - ( size_t )owner.mPadding.mXMin ), ( u32 )( bestRowIt->mBase - ( size_t )owner.mPadding.mYMin )); } this->AffirmCanvas ( owner, font ); @@ -106,7 +106,7 @@ MOAIDynamicGlyphCachePage::RowSpan* MOAIDynamicGlyphCachePage::AllocRow ( u32 he // if alloc succeeded, initialize the new row if ( rowIt ) { - //u32 maxTextureSize = MOAIGfxDevice::Get ().GetMaxTextureSize (); + //u32 maxTextureSize = MOAIGfxMgr::Get ().GetMaxTextureSize (); u32 maxTextureSize = MAX_TEXTURE_SIZE; rowIt->mData.Expand ( maxTextureSize ); } @@ -126,7 +126,7 @@ void MOAIDynamicGlyphCachePage::Clear ( MOAIDynamicGlyphCache& owner ) { //----------------------------------------------------------------// bool MOAIDynamicGlyphCachePage::ExpandToNextPowerofTwo () { - //u32 maxTextureSize = MOAIGfxDevice::Get ().GetMaxTextureSize (); + //u32 maxTextureSize = MOAIGfxMgr::Get ().GetMaxTextureSize (); u32 maxTextureSize = MAX_TEXTURE_SIZE; if ( this->mRows.mSize >= maxTextureSize ) return false; diff --git a/src/moai-sim/MOAIEaseDriver.cpp b/src/moai-sim/MOAIEaseDriver.cpp index b148aee457..f1e7b9c043 100644 --- a/src/moai-sim/MOAIEaseDriver.cpp +++ b/src/moai-sim/MOAIEaseDriver.cpp @@ -96,8 +96,8 @@ MOAIEaseDriver::MOAIEaseDriver () { //----------------------------------------------------------------// MOAIEaseDriver::~MOAIEaseDriver () { - u32 total = this->mLinks.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mLinks.Size (); + for ( size_t i = 0; i < total; ++i ) { MOAIEaseDriverLink& link = this->mLinks [ i ]; link.mSource.Set ( *this, 0 ); link.mDest.Set ( *this, 0 ); @@ -118,8 +118,8 @@ void MOAIEaseDriver::OnUpdate ( double step ) { MOAIAttrOp adder; - u32 total = this->mLinks.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mLinks.Size (); + for ( size_t i = 0; i < total; ++i ) { MOAIEaseDriverLink& link = this->mLinks [ i ]; if ( link.mDest ) { diff --git a/src/moai-sim/MOAIFont.cpp b/src/moai-sim/MOAIFont.cpp index 8821e980b4..52f1aba240 100644 --- a/src/moai-sim/MOAIFont.cpp +++ b/src/moai-sim/MOAIFont.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include @@ -289,8 +289,13 @@ int MOAIFont::_setDefaultSize ( lua_State* L ) { int MOAIFont::_setFilter ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIFont, "U" ) - self->mMinFilter = state.GetValue < int >( 2, ZGL_SAMPLE_LINEAR ); - self->mMagFilter = state.GetValue < int >( 3, self->mMinFilter ); + int min = state.GetValue < int >( 2, ZGL_SAMPLE_LINEAR ); + int mag = state.GetValue < int >( 3, min ); + + MOAISingleTexture::CheckFilterModes ( min, mag ); + + self->mMinFilter = min; + self->mMagFilter = mag; return 0; } @@ -446,8 +451,8 @@ void MOAIFont::BuildKerning ( MOAIGlyph* glyphs, MOAIGlyph* pendingGlyphs ) { for ( MOAIGlyph* glyphIt = glyphs; glyphIt; glyphIt = glyphIt->mNext ) { MOAIGlyph& glyph = *glyphIt; - u32 kernTableSize = 0; - u32 oldTableSize = glyph.mKernTable.Size (); + size_t kernTableSize = 0; + size_t oldTableSize = glyph.mKernTable.Size (); this->mReader->SelectGlyph ( glyph.mCode ); @@ -458,7 +463,7 @@ void MOAIFont::BuildKerning ( MOAIGlyph* glyphs, MOAIGlyph* pendingGlyphs ) { // skip if glyph is already in old glyph's kerning table // may happen if glyphs are purged and then re-added bool unknown = true; - for ( u32 i = 0; i < oldTableSize; ++i ) { + for ( size_t i = 0; i < oldTableSize; ++i ) { if ( glyph.mKernTable [ i ].mName == glyph2.mCode ) { unknown = false; break; @@ -485,7 +490,7 @@ void MOAIFont::BuildKerning ( MOAIGlyph* glyphs, MOAIGlyph* pendingGlyphs ) { for ( MOAIGlyph* glyphIt = pendingGlyphs; glyphIt; glyphIt = glyphIt->mNext ) { MOAIGlyph& glyph = *glyphIt; - u32 kernTableSize = 0; + size_t kernTableSize = 0; this->mReader->SelectGlyph ( glyph.mCode ); @@ -559,8 +564,10 @@ MOAISingleTexture* MOAIFont::GetGlyphTexture ( MOAIGlyph& glyph ) { //----------------------------------------------------------------// void MOAIFont::Init ( cc8* filename ) { - if ( ZLFileSys::CheckFileExists ( filename )) { - this->mFilename = ZLFileSys::GetAbsoluteFilePath ( filename ); + this->mFilename = ZLFileSys::GetAbsoluteFilePath ( filename ); + + if ( !ZLFileSys::CheckFileExists ( filename )) { + ZLLog_Warning ( "WARNING: font file %s does not exist\n", filename ); } } @@ -609,6 +616,9 @@ MOAIFont::~MOAIFont () { // update them to match target - i.e. metrics or metrics and bitmap void MOAIFont::ProcessGlyphs () { + // this function gets called frequenty to process any pending glyphs on the fly. + // for that reason, it should exit quickly if there are no pending glyphs. + MOAIFontReader* fontReader = this->mReader; if ( !fontReader ) return; @@ -629,11 +639,15 @@ void MOAIFont::ProcessGlyphs () { // if no pending glyphs, move on to the next deck if ( !pendingGlyphs ) continue; + // only open the font here as we know that we have pending glyphs to process if ( !fontIsOpen ) { fontIsOpen = this->mReader->OpenFontFile ( this->mFilename ) == MOAIFontReader::OK; } - if ( !fontIsOpen ) return; + if ( !fontIsOpen ) { + ZLLog_Error ( "ERROR: unable to open font file %s for reading glyphs.\n", this->mFilename.c_str ()); + return; + } // get the face metrics fontReader->SelectFace ( glyphSet.mSize ); diff --git a/src/moai-sim/MOAIFontReader.cpp b/src/moai-sim/MOAIFontReader.cpp index d3de2b054c..56f1d7e4d6 100644 --- a/src/moai-sim/MOAIFontReader.cpp +++ b/src/moai-sim/MOAIFontReader.cpp @@ -4,17 +4,53 @@ #include "pch.h" #include -//================================================================// -// MOAIFontFaceMetrics -//================================================================// -MOAIFontFaceMetrics::MOAIFontFaceMetrics () : - mHeight ( 0.0f ), - mAscent ( 0.0f ) { -}; - //================================================================// // MOAIGlyphMetrics //================================================================// + +//----------------------------------------------------------------// +/** + * Get the rect of the glyph which includes the bearing + the size of the bounding box of the glyph. + * + * @param x The x pen position when drawing this glyph + * @param y The y pen position when drawing this glyph + * @param scale The scale at which the glyph would be drawn + */ +ZLRect MOAIGlyphMetrics::GetGlyphRect ( float x, float y, float xScale, float yScale ) const { + + ZLRect rect; + + x += ( this->mBearingX * xScale ); + y -= ( this->mBearingY * yScale ); + + rect.Init ( + x, + y, + x + ( this->mWidth * xScale ), + y + ( this->mHeight * yScale ) + ); + + return rect; +} + +//----------------------------------------------------------------// +ZLRect MOAIGlyphMetrics::GetLogicalRect ( float x, float y, float ascent, float descent, float xScale, float yScale ) const { + + ZLRect rect; + + x += ( this->mBearingX * xScale ); + + rect.Init ( + x, + y - ( ascent * yScale ), + x + ( this->mWidth * xScale ), + y + ( descent * yScale ) + ); + + return rect; +} + +//----------------------------------------------------------------// MOAIGlyphMetrics::MOAIGlyphMetrics () : mAdvanceX ( 0.0f ), mBearingX ( 0.0f ), @@ -23,6 +59,16 @@ MOAIGlyphMetrics::MOAIGlyphMetrics () : mHeight ( 0.0f ) { }; +//================================================================// +// MOAIFontFaceMetrics +//================================================================// + +//----------------------------------------------------------------// +MOAIFontFaceMetrics::MOAIFontFaceMetrics () : + mHeight ( 0.0f ), + mAscent ( 0.0f ) { +}; + //================================================================// // MOAIFontReader lua //================================================================// diff --git a/src/moai-sim/MOAIFontReader.h b/src/moai-sim/MOAIFontReader.h index 919c649dbc..b50a02961b 100644 --- a/src/moai-sim/MOAIFontReader.h +++ b/src/moai-sim/MOAIFontReader.h @@ -12,13 +12,26 @@ class MOAIKernVec; // if the texture page gets resized to make room for more glyphs //================================================================// -// MOAIKernVec +// MOAIGlyphMetrics //================================================================// -class MOAIKernVec : - public ZLVec2D { +class MOAIGlyphMetrics { public: - u32 mName; + float mAdvanceX; // The distance the pen moves to the next glyph + float mBearingX; // The distance from the pen's x coordinate to the bounding box + float mBearingY; // The distance from the pen's y coordinate to the bounding box + + float mWidth; // width of the glyph's bounding box (in pixels) + float mHeight; // height of the glyph's bounding box (in pixels) + + GET ( float, Width, mWidth ); + GET ( float, Height, mHeight ); + GET_SET ( float, AdvanceX, mAdvanceX ); + + //----------------------------------------------------------------// + ZLRect GetGlyphRect ( float x, float y, float xScale = 1.0f, float yScale = 1.0f ) const; + ZLRect GetLogicalRect ( float x, float y, float ascent, float descent, float xScale = 1.0f, float yScale = 1.0f ) const; + MOAIGlyphMetrics (); }; //================================================================// @@ -30,25 +43,21 @@ class MOAIFontFaceMetrics { float mHeight; float mAscent; + GET_SET_CONST ( float, Ascent, mAscent ); + GET_CONST ( float, Descent, ( mHeight - mAscent )); + //----------------------------------------------------------------// MOAIFontFaceMetrics (); }; //================================================================// -// MOAIGlyphMetrics +// MOAIKernVec //================================================================// -class MOAIGlyphMetrics { +class MOAIKernVec : + public ZLVec2D { public: - float mAdvanceX; // The distance the pen moves to the next glyph - float mBearingX; // The distance from the pen's x coordinate to the bounding box - float mBearingY; // The distance from the pen's y coordinate to the bounding box - - float mWidth; // width of the glyph's bounding box (in pixels) - float mHeight; // height of the glyph's bounding box (in pixels) - - //----------------------------------------------------------------// - MOAIGlyphMetrics (); + u32 mName; }; //================================================================// @@ -60,9 +69,7 @@ class MOAIFontReader : public MOAILuaObject { protected: - enum { - GLYPH_CODE_NULL = -1, - }; + static const u32 GLYPH_CODE_NULL = 0xffffffff; //----------------------------------------------------------------// static int _close ( lua_State* L ); diff --git a/src/moai-sim/MOAIFont_bmfont.cpp b/src/moai-sim/MOAIFont_bmfont.cpp index fc2e8046fb..fe820df8b9 100644 --- a/src/moai-sim/MOAIFont_bmfont.cpp +++ b/src/moai-sim/MOAIFont_bmfont.cpp @@ -97,7 +97,7 @@ void MOAIFont::InitWithBMFont ( cc8* filename, const u32 numPreloadedTextures, M STLString absFilePath = ZLFileSys::GetAbsoluteFilePath ( filename ); STLString absDirPath = ZLFileSys::TruncateFilename ( absFilePath ); - u32 len = stream.GetLength (); + size_t len = stream.GetLength (); char* buf = ( char* )malloc ( len + 1 ); stream.ReadBytes ( buf, len ); buf [ len ] = '\0'; @@ -259,7 +259,7 @@ void MOAIFont::InitWithBMFont ( cc8* filename, const u32 numPreloadedTextures, M assert ( glyphSet ); MOAIGlyph& glyph = glyphSet->EditGlyph ( first ); - u32 i = glyph.mKernTable.Size(); + size_t i = glyph.mKernTable.Size (); glyph.mKernTable.Grow ( i + 1 ); glyph.mKernTable [ i ].mName = second; glyph.mKernTable [ i ].mX = amount; diff --git a/src/moai-sim/MOAIFrameBuffer.cpp b/src/moai-sim/MOAIFrameBuffer.cpp index 3c1830427f..22cef5608c 100644 --- a/src/moai-sim/MOAIFrameBuffer.cpp +++ b/src/moai-sim/MOAIFrameBuffer.cpp @@ -4,7 +4,8 @@ #include "pch.h" #include #include -#include +#include +#include #include #include #include @@ -105,7 +106,7 @@ void MOAIClearableView::ClearSurface () { clearColor.SetRGBA ( this->mClearColor ); } - zglClearColor ( + MOAIGfxMgr::GetDrawingAPI ().ClearColor ( clearColor.mR, clearColor.mG, clearColor.mB, @@ -113,7 +114,7 @@ void MOAIClearableView::ClearSurface () { ); } - MOAIGfxDevice::Get ().ClearSurface ( this->mClearFlags ); + MOAIGfxMgr::Get ().ClearSurface ( this->mClearFlags ); } //----------------------------------------------------------------// @@ -302,7 +303,8 @@ int MOAIFrameBuffer::_setRenderTable ( lua_State* L ) { //----------------------------------------------------------------// void MOAIFrameBuffer::DetectGLFrameBufferID () { - this->mGLFrameBufferID = zglGetCurrentFramebuffer (); + + this->mGLFrameBufferID = MOAIGfxMgr::GetDrawingAPI ().GetCurrentFramebuffer (); } //----------------------------------------------------------------// @@ -319,6 +321,7 @@ ZLRect MOAIFrameBuffer::GetBufferRect () const { //----------------------------------------------------------------// void MOAIFrameBuffer::GrabImage ( MOAIImage* image ) { + UNUSED ( image ); // TODO: doesn't work now? // TODO: all this is extremely hinky. this assumes that the framebuffer is RGBA_8888, which it // may not be. it also does two extra allocations and copies. what *should* happen is that we @@ -326,28 +329,28 @@ void MOAIFrameBuffer::GrabImage ( MOAIImage* image ) { // only if we need to convert. we should also implement/use a mirror operation inside of MOAIImage // so we don't have to do it here. - unsigned char* buffer = ( unsigned char* ) malloc ( this->mBufferWidth * this->mBufferHeight * 4 ); - - zglReadPixels ( 0, 0, this->mBufferWidth, this->mBufferHeight, buffer ); - - //image is flipped vertically, flip it back - int index,indexInvert; - for ( u32 y = 0; y < ( this->mBufferHeight / 2 ); ++y ) { - for ( u32 x = 0; x < this->mBufferWidth; ++x ) { - for ( u32 i = 0; i < 4; ++i ) { - - index = i + ( x * 4 ) + ( y * this->mBufferWidth * 4 ); - indexInvert = i + ( x * 4 ) + (( this->mBufferHeight - 1 - y ) * this->mBufferWidth * 4 ); - - unsigned char temp = buffer [ indexInvert ]; - buffer [ indexInvert ] = buffer [ index ]; - buffer [ index ] = temp; - } - } - } - - image->Init ( buffer, this->mBufferWidth, this->mBufferHeight, ZLColor::RGBA_8888 ); - free ( buffer ); +// unsigned char* buffer = ( unsigned char* ) malloc ( this->mBufferWidth * this->mBufferHeight * 4 ); +// +// zglReadPixels ( 0, 0, this->mBufferWidth, this->mBufferHeight, buffer ); +// +// //image is flipped vertically, flip it back +// int index,indexInvert; +// for ( u32 y = 0; y < ( this->mBufferHeight / 2 ); ++y ) { +// for ( u32 x = 0; x < this->mBufferWidth; ++x ) { +// for ( u32 i = 0; i < 4; ++i ) { +// +// index = i + ( x * 4 ) + ( y * this->mBufferWidth * 4 ); +// indexInvert = i + ( x * 4 ) + (( this->mBufferHeight - 1 - y ) * this->mBufferWidth * 4 ); +// +// unsigned char temp = buffer [ indexInvert ]; +// buffer [ indexInvert ] = buffer [ index ]; +// buffer [ index ] = temp; +// } +// } +// } +// +// image->Init ( buffer, this->mBufferWidth, this->mBufferHeight, ZLColor::RGBA_8888 ); +// free ( buffer ); } //----------------------------------------------------------------// @@ -369,9 +372,31 @@ MOAIFrameBuffer::MOAIFrameBuffer () : //----------------------------------------------------------------// MOAIFrameBuffer::~MOAIFrameBuffer () { + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mGLFrameBufferID, false ); this->mFrameImage.Set ( *this, 0 ); } +//----------------------------------------------------------------// +void MOAIFrameBuffer::OnReadPixels ( const ZLCopyOnWrite& buffer, void * userdata ) { + UNUSED ( userdata ); + + this->mGrabNextFrame = false; + MOAIImage* image = this->mFrameImage; + + if ( image ) { + + image->Init ( buffer.GetBuffer (), this->mBufferWidth, this->mBufferHeight, ZLColor::RGBA_8888 ); + + if ( this->mOnFrameFinish ) { + MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); + if ( this->mOnFrameFinish.PushRef ( state )) { + this->mFrameImage.PushRef ( state ); + state.DebugCall ( 1, 0 ); + } + } + } +} + //----------------------------------------------------------------// void MOAIFrameBuffer::RegisterLuaClass ( MOAILuaState& state ) { @@ -399,13 +424,13 @@ void MOAIFrameBuffer::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIFrameBuffer::Render () { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - this->mLastDrawCount = gfxDevice.GetDrawCount (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + //this->mLastDrawCount = gfxMgr.GetDrawCount (); - gfxDevice.BindFrameBuffer ( this ); + gfxMgr.mGfxState.BindFrameBuffer ( this ); //disable scissor rect for clear - gfxDevice.SetScissorRect (); + gfxMgr.mGfxState.SetScissorRect (); this->ClearSurface (); if ( this->mRenderTable ) { @@ -415,24 +440,17 @@ void MOAIFrameBuffer::Render () { state.Pop ( 1 ); } - gfxDevice.FlushBufferedPrims (); + gfxMgr.mVertexCache.FlushBufferedPrims (); + // since we're doing this on the render thread, set it every time until we get a callback if ( this->mGrabNextFrame ) { - this->GrabImage ( this->mFrameImage ); - this->mGrabNextFrame = false; - - if ( this->mOnFrameFinish ) { - MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - if ( this->mOnFrameFinish.PushRef ( state )) { - this->mFrameImage.PushRef ( state ); - state.DebugCall ( 1, 0 ); - } - } + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + gfx.ReadPixels ( 0, 0, this->mBufferWidth, this->mBufferHeight, ZGL_PIXEL_FORMAT_RGBA, ZGL_PIXEL_TYPE_UNSIGNED_BYTE, 4, this, 0 ); } this->mRenderCounter++; - this->mLastDrawCount = gfxDevice.GetDrawCount () - this->mLastDrawCount; + //this->mLastDrawCount = gfxMgr.GetDrawCount () - this->mLastDrawCount; } //----------------------------------------------------------------// @@ -474,7 +492,7 @@ void MOAIFrameBuffer::SetBufferSize ( u32 width, u32 height ) { } //----------------------------------------------------------------// -void MOAIFrameBuffer::SetGLFrameBufferID ( u32 frameBufferID ){ +void MOAIFrameBuffer::SetGLFrameBufferID ( ZLGfxHandle* frameBufferID ){ this->mGLFrameBufferID = frameBufferID; } diff --git a/src/moai-sim/MOAIFrameBuffer.h b/src/moai-sim/MOAIFrameBuffer.h index a89bdec8f4..5c366b6199 100644 --- a/src/moai-sim/MOAIFrameBuffer.h +++ b/src/moai-sim/MOAIFrameBuffer.h @@ -55,18 +55,19 @@ class MOAIClearableView : indexed from 1. */ class MOAIFrameBuffer : - public MOAIClearableView { + public MOAIClearableView, + public virtual ZLGfxListener { protected: - friend class MOAIGfxDevice; - friend class MOAIGfxDeviceStateCache; + friend class MOAIGfxMgr; + friend class MOAIGfxStateCache; u32 mBufferWidth; u32 mBufferHeight; float mBufferScale; bool mLandscape; - u32 mGLFrameBufferID; + ZLGfxHandle* mGLFrameBufferID; bool mGrabNextFrame; MOAILuaMemberRef mOnFrameFinish; @@ -86,6 +87,7 @@ class MOAIFrameBuffer : //----------------------------------------------------------------// + void OnReadPixels ( const ZLCopyOnWrite& buffer, void* userdata ); void RenderTable ( MOAILuaState& state, int idx ); public: @@ -105,7 +107,7 @@ class MOAIFrameBuffer : MOAIFrameBuffer (); ~MOAIFrameBuffer (); void SetBufferSize ( u32 width, u32 height ); - void SetGLFrameBufferID ( u32 frameBufferID ); + void SetGLFrameBufferID ( ZLGfxHandle* frameBufferID ); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); virtual void Render (); diff --git a/src/moai-sim/MOAIFrameBufferTexture.cpp b/src/moai-sim/MOAIFrameBufferTexture.cpp index ad4c035196..0bf0785a18 100644 --- a/src/moai-sim/MOAIFrameBufferTexture.cpp +++ b/src/moai-sim/MOAIFrameBufferTexture.cpp @@ -2,7 +2,8 @@ // http://getmoai.com #include "pch.h" -#include +#include +#include #include //================================================================// @@ -58,7 +59,6 @@ void MOAIFrameBufferTexture::Init ( u32 width, u32 height, u32 colorFormat, u32 this->mStencilFormat = stencilFormat; this->FinishInit (); - this->DoCPUAffirm (); } //----------------------------------------------------------------// @@ -81,7 +81,7 @@ MOAIFrameBufferTexture::MOAIFrameBufferTexture () : //----------------------------------------------------------------// MOAIFrameBufferTexture::~MOAIFrameBufferTexture () { - this->OnGPUDestroy (); + this->OnGPUDeleteOrDiscard ( true ); } //----------------------------------------------------------------// @@ -94,99 +94,89 @@ bool MOAIFrameBufferTexture::OnGPUCreate () { this->mBufferWidth = this->mWidth; this->mBufferHeight = this->mHeight; + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + // bail and retry (no error) if GL cannot generate buffer ID - this->mGLFrameBufferID = zglCreateFramebuffer (); + this->mGLFrameBufferID = gfx.CreateFramebuffer (); if ( !this->mGLFrameBufferID ) return false; if ( this->mColorFormat ) { - this->mGLColorBufferID = zglCreateRenderbuffer (); - zglBindRenderbuffer ( this->mGLColorBufferID ); - zglRenderbufferStorage ( this->mColorFormat, this->mWidth, this->mHeight ); + this->mGLColorBufferID = gfx.CreateRenderbuffer (); + gfx.BindRenderbuffer ( this->mGLColorBufferID ); + gfx.RenderbufferStorage ( this->mColorFormat, this->mWidth, this->mHeight ); } if ( this->mDepthFormat ) { - this->mGLDepthBufferID = zglCreateRenderbuffer (); - zglBindRenderbuffer ( this->mGLDepthBufferID ); - zglRenderbufferStorage ( this->mDepthFormat, this->mWidth, this->mHeight ); + this->mGLDepthBufferID = gfx.CreateRenderbuffer (); + gfx.BindRenderbuffer ( this->mGLDepthBufferID ); + gfx.RenderbufferStorage ( this->mDepthFormat, this->mWidth, this->mHeight ); } if ( this->mStencilFormat ) { - this->mGLStencilBufferID = zglCreateRenderbuffer (); - zglBindRenderbuffer ( this->mGLStencilBufferID ); - zglRenderbufferStorage ( this->mStencilFormat, this->mWidth, this->mHeight ); + this->mGLStencilBufferID = gfx.CreateRenderbuffer (); + gfx.BindRenderbuffer ( this->mGLStencilBufferID ); + gfx.RenderbufferStorage ( this->mStencilFormat, this->mWidth, this->mHeight ); } - zglBindFramebuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, this->mGLFrameBufferID ); + gfx.BindFramebuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, this->mGLFrameBufferID ); if ( this->mGLColorBufferID ) { - zglFramebufferRenderbuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, this->mGLColorBufferID ); + gfx.FramebufferRenderbuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, this->mGLColorBufferID ); } if ( this->mGLDepthBufferID ) { - zglFramebufferRenderbuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_DEPTH, this->mGLDepthBufferID ); + gfx.FramebufferRenderbuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_DEPTH, this->mGLDepthBufferID ); } if ( this->mGLStencilBufferID ) { - zglFramebufferRenderbuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_STENCIL, this->mGLStencilBufferID ); + gfx.FramebufferRenderbuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_STENCIL, this->mGLStencilBufferID ); } + gfx.PushSection (); + // TODO: handle error; clear - u32 status = zglCheckFramebufferStatus ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ ); + gfx.CheckFramebufferStatus ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ ); - if ( status == ZGL_FRAMEBUFFER_STATUS_COMPLETE ) { + bool status = false; - this->mGLTexID = zglCreateTexture (); - zglBindTexture ( this->mGLTexID ); - zglTexImage2D ( 0, ZGL_PIXEL_FORMAT_RGBA, this->mWidth, this->mHeight, ZGL_PIXEL_FORMAT_RGBA, ZGL_PIXEL_TYPE_UNSIGNED_BYTE, 0 ); - zglFramebufferTexture2D ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, this->mGLTexID, 0 ); - - // refresh tex params on next bind - this->mIsDirty = true; + if ( gfx.PushSuccessHandler ()) { + + this->mGLTexID = gfx.CreateTexture (); + gfx.BindTexture ( this->mGLTexID ); + gfx.TexImage2D ( 0, ZGL_PIXEL_FORMAT_RGBA, this->mWidth, this->mHeight, ZGL_PIXEL_FORMAT_RGBA, ZGL_PIXEL_TYPE_UNSIGNED_BYTE, 0 ); + gfx.FramebufferTexture2D ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, this->mGLTexID, 0 ); // clearing framebuffer because it might contain garbage - zglClearColor ( 0, 0, 0, 0 ); - zglClear ( ZGL_CLEAR_COLOR_BUFFER_BIT | ZGL_CLEAR_STENCIL_BUFFER_BIT | ZGL_CLEAR_DEPTH_BUFFER_BIT ); + gfx.ClearColor ( 0, 0, 0, 0 ); + gfx.Clear ( ZGL_CLEAR_COLOR_BUFFER_BIT | ZGL_CLEAR_STENCIL_BUFFER_BIT | ZGL_CLEAR_DEPTH_BUFFER_BIT ); + + this->OnGPUUpdate (); - return true; + status = true; } - zglDeleteFramebuffer ( this->mGLFrameBufferID ); - zglDeleteRenderbuffer ( this->mGLColorBufferID ); - zglDeleteRenderbuffer ( this->mGLDepthBufferID ); - zglDeleteRenderbuffer ( this->mGLStencilBufferID ); + if ( gfx.PushErrorHandler ()) { - return false; -} - -//----------------------------------------------------------------// -void MOAIFrameBufferTexture::OnGPUDestroy () { - - if ( MOAIGfxResourceMgr::IsValid ()) { - - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_FRAMEBUFFER, this->mGLFrameBufferID ); - this->mGLFrameBufferID = 0; - - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_RENDERBUFFER, this->mGLColorBufferID ); - this->mGLColorBufferID = 0; - - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_RENDERBUFFER, this->mGLDepthBufferID ); - this->mGLDepthBufferID = 0; - - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_RENDERBUFFER, this->mGLStencilBufferID ); - this->mGLStencilBufferID = 0; + gfx.Delete ( this->mGLFrameBufferID ); + gfx.Delete ( this->mGLColorBufferID ); + gfx.Delete ( this->mGLDepthBufferID ); + gfx.Delete ( this->mGLStencilBufferID ); } - this->MOAISingleTexture::OnGPUDestroy (); + + gfx.PopSection (); + + return status; } //----------------------------------------------------------------// -void MOAIFrameBufferTexture::OnGPULost () { +void MOAIFrameBufferTexture::OnGPUDeleteOrDiscard ( bool shouldDelete ) { - this->mGLFrameBufferID = 0; - this->mGLColorBufferID = 0; - this->mGLDepthBufferID = 0; - this->mGLStencilBufferID = 0; + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mGLFrameBufferID, shouldDelete ); + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mGLColorBufferID, shouldDelete ); + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mGLDepthBufferID, shouldDelete ); + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mGLStencilBufferID, shouldDelete ); - this->MOAISingleTexture::OnGPULost (); + this->MOAISingleTexture::OnGPUDeleteOrDiscard ( shouldDelete ); } //----------------------------------------------------------------// @@ -213,9 +203,7 @@ void MOAIFrameBufferTexture::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIFrameBufferTexture::Render () { - if ( this->PrepareForBind ()) { - MOAIFrameBuffer::Render (); - } + MOAIFrameBuffer::Render (); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIFrameBufferTexture.h b/src/moai-sim/MOAIFrameBufferTexture.h index 90f1ec597d..7df4472ae9 100644 --- a/src/moai-sim/MOAIFrameBufferTexture.h +++ b/src/moai-sim/MOAIFrameBufferTexture.h @@ -20,9 +20,9 @@ class MOAIFrameBufferTexture : public MOAISingleTexture { private: - u32 mGLColorBufferID; - u32 mGLDepthBufferID; - u32 mGLStencilBufferID; + ZLGfxHandle* mGLColorBufferID; + ZLGfxHandle* mGLDepthBufferID; + ZLGfxHandle* mGLStencilBufferID; u32 mColorFormat; u32 mDepthFormat; @@ -33,12 +33,11 @@ class MOAIFrameBufferTexture : //----------------------------------------------------------------// bool OnGPUCreate (); - void OnGPUDestroy (); - void OnGPULost (); + void OnGPUDeleteOrDiscard ( bool shouldDelete ); public: - friend class MOAIGfxDevice; + friend class MOAIGfxMgr; friend class MOAISingleTexture; DECL_LUA_FACTORY ( MOAIFrameBufferTexture ) diff --git a/src/moai-sim/MOAIFreeTypeFontReader.cpp b/src/moai-sim/MOAIFreeTypeFontReader.cpp index e7ca4bb3a0..5db534f6cd 100644 --- a/src/moai-sim/MOAIFreeTypeFontReader.cpp +++ b/src/moai-sim/MOAIFreeTypeFontReader.cpp @@ -2,13 +2,20 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + +#if MOAI_WITH_FREETYPE + #include #include #include #include -SUPPRESS_EMPTY_FILE_WARNING -#if MOAI_WITH_FREETYPE +#include + +#include FT_FREETYPE_H +#include FT_STROKER_H //================================================================// // RenderParams @@ -47,9 +54,7 @@ static void _renderSpan ( const int y, const int count, const FT_Span* const spa int x = offset + span.x; int len = span.len; - u32 alpha = ( u32 )span.coverage; - - u32 srcColor = ZLColor::Scale ( penColor, alpha ); + u32 srcColor = ZLColor::Scale ( penColor, span.coverage ); if ( blendFunc.mEquation == ZLColor::BLEND_EQ_NONE ) { @@ -96,8 +101,8 @@ int MOAIFreeTypeFontReader::CloseFontFile () { if ( this->mFace ) { - FT_Done_Face ( this->mFace ); - FT_Done_FreeType ( this->mLibrary ); + FT_Done_Face (( FT_Face )this->mFace ); + FT_Done_FreeType (( FT_Library )this->mLibrary ); } this->mFace = 0; @@ -106,16 +111,18 @@ int MOAIFreeTypeFontReader::CloseFontFile () { this->mFaceSize = 0.0f; this->mGlyphCode = GLYPH_CODE_NULL; - return OK; + return ( int )OK; } //----------------------------------------------------------------// int MOAIFreeTypeFontReader::GetFaceMetrics ( MOAIFontFaceMetrics& faceMetrics ) { - if ( !this->mFace ) return FONT_ERROR; + FT_Face face = ( FT_Face )this->mFace; + + if ( !face ) return FONT_ERROR; - faceMetrics.mAscent = ( float )( this->mFace->size->metrics.ascender >> 6 ); // div 64 - faceMetrics.mHeight = ( float )( this->mFace->size->metrics.height >> 6 ); // div 64 + faceMetrics.mAscent = ( float )( face->size->metrics.ascender >> 6 ); // div 64 + faceMetrics.mHeight = ( float )( face->size->metrics.height >> 6 ); // div 64 return OK; } @@ -123,14 +130,14 @@ int MOAIFreeTypeFontReader::GetFaceMetrics ( MOAIFontFaceMetrics& faceMetrics ) //----------------------------------------------------------------// int MOAIFreeTypeFontReader::GetGlyphMetrics ( MOAIGlyphMetrics& glyphMetrics ) { - if ( !this->mFace ) return FONT_ERROR; + FT_Face face = ( FT_Face )this->mFace; + + if ( !face ) return FONT_ERROR; if ( this->mGlyphCode == GLYPH_CODE_NULL ) return FONT_ERROR; - FT_Face face = this->mFace; - glyphMetrics.mWidth = ( float )( face->glyph->metrics.width >> 6 ); // div 64 glyphMetrics.mHeight = ( float )( face->glyph->metrics.height >> 6 ); // div 64 - glyphMetrics.mAdvanceX = ( float )( face->glyph->metrics.horiAdvance >> 6 ); // di // div 64v 64 + glyphMetrics.mAdvanceX = ( float )( face->glyph->metrics.horiAdvance >> 6 ); // div 64 glyphMetrics.mBearingX = ( float )( face->glyph->metrics.horiBearingX >> 6 ); // div 64 glyphMetrics.mBearingY = ( float )( face->glyph->metrics.horiBearingY >> 6 ); // div 64 @@ -144,7 +151,7 @@ int MOAIFreeTypeFontReader::GetKernVec ( u32 c, MOAIKernVec& kernVec ) { kernVec.mY = 0.0f; FT_Vector delta; - FT_Get_Kerning ( this->mFace, this->mGlyphCode, c, FT_KERNING_DEFAULT, &delta ); + FT_Get_Kerning (( FT_Face )this->mFace, this->mGlyphCode, c, FT_KERNING_DEFAULT, &delta ); if ( delta.x || delta.y ) { kernVec.mName = c; @@ -158,7 +165,8 @@ int MOAIFreeTypeFontReader::GetKernVec ( u32 c, MOAIKernVec& kernVec ) { //----------------------------------------------------------------// bool MOAIFreeTypeFontReader::HasKerning () { - return ( FT_HAS_KERNING ( this->mFace ) != 0 ); + FT_Face face = ( FT_Face )this->mFace; + return ( FT_HAS_KERNING ( face ) != 0 ); } //----------------------------------------------------------------// @@ -186,10 +194,10 @@ int MOAIFreeTypeFontReader::OpenFontFile ( cc8* filename ) { this->CloseFontFile (); - FT_Init_FreeType ( &this->mLibrary ); + FT_Init_FreeType ( ( FT_Library* )&this->mLibrary ); - if ( FT_New_Face ( this->mLibrary, filename, 0, &this->mFace )) { - FT_Done_FreeType ( this->mLibrary ); + if ( FT_New_Face (( FT_Library )this->mLibrary, filename, 0, ( FT_Face* )&this->mFace )) { + FT_Done_FreeType (( FT_Library )this->mLibrary ); this->mFace = 0; this->mLibrary = 0; @@ -226,7 +234,7 @@ int MOAIFreeTypeFontReader::RenderGlyph ( MOAIImage& image, float x, float y, co if ( !this->mFace ) return FONT_ERROR; if ( this->mGlyphCode == GLYPH_CODE_NULL ) return FONT_ERROR; - FT_Face face = this->mFace; + FT_Face face = ( FT_Face )this->mFace; // bail if glyph has no outline we can render if ( face->glyph->format!= FT_GLYPH_FORMAT_OUTLINE ) return FONT_ERROR; @@ -245,10 +253,10 @@ int MOAIFreeTypeFontReader::RenderGlyph ( MOAIImage& image, float x, float y, co render.mImage = ℑ render.mBlendFunc = blendFunc; render.mPenColor = this->mPenColor; - render.mPenX = x; - render.mPenY = y; + render.mPenX = ( int )x; + render.mPenY = ( int )y; - FT_Outline_Render ( this->mLibrary, &face->glyph->outline, ¶ms ); + FT_Outline_Render (( FT_Library )this->mLibrary, &face->glyph->outline, ¶ms ); } else { // completely different path to render monochrome @@ -267,12 +275,14 @@ int MOAIFreeTypeFontReader::SelectFace ( float size ) { if ( this->mFaceSize != size ) { - FT_Set_Char_Size ( this->mFace, 0, ( u32 )( size * 64.0f ), DPI, DPI ); + FT_Face face = ( FT_Face )this->mFace; + + if ( !face ) return FONT_ERROR; - if ( !this->mFace ) return FONT_ERROR; + FT_Set_Char_Size ( face, 0, ( u32 )( size * 64.0f ), DPI, DPI ); - int yMin = FT_MulFix ( this->mFace->bbox.yMin, this->mFace->size->metrics.y_scale ) >> 6; // div 64 - int yMax = FT_MulFix ( this->mFace->bbox.yMax, this->mFace->size->metrics.y_scale ) >> 6; // div 64 + int yMin = FT_MulFix ( face->bbox.yMin, face->size->metrics.y_scale ) >> 6; // div 64 + int yMax = FT_MulFix ( face->bbox.yMax, face->size->metrics.y_scale ) >> 6; // div 64 this->mFaceHeight = ( float )( yMax - yMin ); this->mFaceSize = size; @@ -287,8 +297,8 @@ int MOAIFreeTypeFontReader::SelectGlyph ( u32 c ) { this->mGlyphCode = GLYPH_CODE_NULL; - u32 index = FT_Get_Char_Index ( this->mFace, c ); - int result = FT_Load_Glyph ( this->mFace, index, FT_LOAD_NO_BITMAP ); + u32 index = FT_Get_Char_Index (( FT_Face )this->mFace, c ); + int result = FT_Load_Glyph (( FT_Face )this->mFace, index, FT_LOAD_NO_BITMAP ); if ( result ) return FONT_ERROR; this->mGlyphCode = c; diff --git a/src/moai-sim/MOAIFreeTypeFontReader.h b/src/moai-sim/MOAIFreeTypeFontReader.h index fd86eb2268..443f11f589 100644 --- a/src/moai-sim/MOAIFreeTypeFontReader.h +++ b/src/moai-sim/MOAIFreeTypeFontReader.h @@ -7,12 +7,12 @@ #if MOAI_WITH_FREETYPE #include -#include -#include FT_FREETYPE_H -#include FT_STROKER_H #include +typedef int* MOAIFtLibrary; +typedef int* MOAIFtFace; + //================================================================// // MOAIFreeTypeFontReader //================================================================// @@ -27,8 +27,8 @@ class MOAIFreeTypeFontReader : u32 mGlyphCode; float mFaceSize; - FT_Library mLibrary; - FT_Face mFace; + MOAIFtLibrary mLibrary; + MOAIFtFace mFace; float mFaceHeight; bool mAntiAlias; diff --git a/src/moai-sim/MOAIGeometryWriter.cpp b/src/moai-sim/MOAIGeometryWriter.cpp index 09f05e86bf..d0991cabb4 100644 --- a/src/moai-sim/MOAIGeometryWriter.cpp +++ b/src/moai-sim/MOAIGeometryWriter.cpp @@ -29,10 +29,10 @@ class VertexComparator { size_t vertexSize = this->mVertexFormat.GetVertexSize (); - this->mStream.Seek ( v0, SEEK_SET ); + this->mStream.SetCursor ( v0 ); this->mStream.ReadBytes ( this->mBuffer0, vertexSize ); - this->mStream.Seek ( v1, SEEK_SET ); + this->mStream.SetCursor ( v1 ); this->mStream.ReadBytes ( this->mBuffer1, vertexSize ); return ( this->mVertexFormat.Compare ( this->mBuffer0, this->mBuffer1, 0.00001f, 0.00001f ) == -1 ); @@ -70,7 +70,7 @@ class VertexComparator { @overload @in MOAIVertexFormat format - @in MOAIStream stream + @in MOAIStream vtxStream @in ZLColorVec color @in MOAIRegion region @opt number pad @@ -258,6 +258,20 @@ int MOAIGeometryWriter::_getMesh ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGeometryWriter::_offsetIndices ( lua_State* L ) { + MOAI_LUA_SETUP_SINGLE ( MOAIGeometryWriter, "" ) + + MOAIStream* idxStream = state.GetLuaObject < MOAIStream >( 1, true ); + s32 offset = state.GetValue < s32 >( 2, 0 ); + + if ( idxStream ) { + MOAIGeometryWriter::OffsetIndices ( *idxStream, offset ); + } + return 0; +} + //----------------------------------------------------------------// /** @lua pruneVertices @text Remove duplicate vertices from the vertex stream and update @@ -336,7 +350,7 @@ int MOAIGeometryWriter::_writeBox ( lua_State* L ) { } //----------------------------------------------------------------// -// TODO: doxygen +// TODO: implement int MOAIGeometryWriter::_writeCone ( lua_State* L ) { MOAI_LUA_SETUP_SINGLE ( MOAIGeometryWriter, "" ) return 0; @@ -386,21 +400,21 @@ int MOAIGeometryWriter::_writeCube ( lua_State* L ) { } //----------------------------------------------------------------// -// TODO: doxygen +// TODO: implement int MOAIGeometryWriter::_writeCylinder ( lua_State* L ) { MOAI_LUA_SETUP_SINGLE ( MOAIGeometryWriter, "" ) return 0; } //----------------------------------------------------------------// -// TODO: doxygen +// TODO: implement int MOAIGeometryWriter::_writeIcoSphere ( lua_State* L ) { MOAI_LUA_SETUP_SINGLE ( MOAIGeometryWriter, "" ) return 0; } //----------------------------------------------------------------// -// TODO: doxygen +// TODO: implement int MOAIGeometryWriter::_writeUVSphere ( lua_State* L ) { MOAI_LUA_SETUP_SINGLE ( MOAIGeometryWriter, "" ) return 0; @@ -421,7 +435,7 @@ void MOAIGeometryWriter::ApplyColor ( const MOAIVertexFormat& format, ZLStream& MOAIGeometryWriter::WriteColor ( format, stream, mode, color.mR, color.mG, color.mB, color.mA ); } - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } //----------------------------------------------------------------// @@ -442,15 +456,15 @@ void MOAIGeometryWriter::ApplyColor ( const MOAIVertexFormat& format, ZLStream& } } - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } //----------------------------------------------------------------// void MOAIGeometryWriter::ApplyLightFromImage ( const MOAIVertexFormat& format, ZLStream& stream, u32 mode, MOAIImage& image, bool gradient, float a0, float a1, const ZLVec3D& v0, const ZLVec3D& v1 ) { - float width = image.GetWidth (); - float height = image.GetHeight (); + float width = ( float )image.GetWidth (); + float height = ( float )image.GetHeight (); size_t base = stream.GetCursor (); u32 total = ( u32 )(( stream.GetLength () - base ) / format.GetVertexSize ()); @@ -489,8 +503,8 @@ void MOAIGeometryWriter::ApplyLightFromImage ( const MOAIVertexFormat& format, Z ZLVec2D hVec ( normal.mX, normal.mY ); hVec.Norm (); - float x = ( hVec.Radians () / TWOPI ) * width; - float y = ( normal.Radians ( ZLVec3D::Z_AXIS ) / PI ) * height; + float x = ( float )(( hVec.Radians () / TWOPI ) * width ); + float y = ( float )(( normal.Radians ( ZLVec3D::Z_AXIS ) / PI ) * height ); u32 sampleColor = image.SampleColor ( x, y, MOAIImage::FILTER_LINEAR, true, true ); ZLColorVec color ( sampleColor ); @@ -498,7 +512,7 @@ void MOAIGeometryWriter::ApplyLightFromImage ( const MOAIVertexFormat& format, Z MOAIGeometryWriter::WriteColor ( format, stream, mode, color.mR, color.mG, color.mB, color.mA * alpha ); } - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } //----------------------------------------------------------------// @@ -540,7 +554,7 @@ void MOAIGeometryWriter::ApplyLinearGradient ( const MOAIVertexFormat& format, Z MOAIGeometryWriter::WriteColor ( format, stream, mode, color.mR, color.mG, color.mB, color.mA ); } - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } //----------------------------------------------------------------// @@ -560,7 +574,7 @@ MOAIMesh* MOAIGeometryWriter::GetMesh ( const MOAIVertexFormat& format, ZLStream mesh->SetTotalElements ( totalElements ); ZLBox bounds; - format.ComputeBounds ( bounds, vtxBuffer->GetReadBuffer (), vtxBuffer->GetSize ()); + format.ComputeBounds ( bounds, vtxBuffer->GetBuffer ()->GetConstData (), vtxBuffer->GetSize ()); mesh->SetBounds ( bounds ); @@ -576,13 +590,13 @@ u32 MOAIGeometryWriter::GetMesh ( const MOAIVertexFormat& format, ZLStream& vtxS vtxStream.Seek ( 0, SEEK_SET ); idxStream.Seek ( 0, SEEK_SET ); - if ( vtxBuffer.GetBufferCount () == 0 ) { - vtxBuffer.ReserveVBOs ( 1 ); - } - - if ( idxBuffer.GetBufferCount () == 0 ) { - idxBuffer.ReserveVBOs ( 1 ); - } +// if ( vtxBuffer.GetBufferCount () == 0 ) { +// vtxBuffer.ReserveVBOs ( 1 ); +// } +// +// if ( idxBuffer.GetBufferCount () == 0 ) { +// idxBuffer.ReserveVBOs ( 1 ); +// } vtxBuffer.CopyFromStream ( vtxStream ); @@ -594,16 +608,16 @@ u32 MOAIGeometryWriter::GetMesh ( const MOAIVertexFormat& format, ZLStream& vtxS } else { - u32 totalVertices = vtxBuffer.GetSize () / format.GetVertexSize (); - for ( u32 i = 0; i < totalVertices; ++i ) { - idxBuffer.WriteIndex ( i ); + size_t totalVertices = vtxBuffer.GetSize () / format.GetVertexSize (); + for ( size_t i = 0; i < totalVertices; ++i ) { + idxBuffer.WriteIndex (( u32 )i ); // TODO: check overflow } } - vtxStream.Seek ( vtxStreamBase, SEEK_SET ); - idxStream.Seek ( idxStreamBase, SEEK_SET ); + vtxStream.SetCursor ( vtxStreamBase ); + idxStream.SetCursor ( idxStreamBase ); - return idxBuffer.GetSize () / idxSizeInBytes; + return ( u32 )( idxBuffer.GetSize () / idxSizeInBytes ); } //----------------------------------------------------------------// @@ -616,14 +630,32 @@ MOAIGeometryWriter::MOAIGeometryWriter () { MOAIGeometryWriter::~MOAIGeometryWriter () { } +//----------------------------------------------------------------// +void MOAIGeometryWriter::OffsetIndices ( ZLStream& idxStream, s32 offset ) { + + size_t idxStreamBase = idxStream.GetCursor (); + + size_t totalIdx = idxStream.GetLength () >> 2; + if ( !totalIdx ) return; + + for ( size_t i = 0; i < totalIdx; ++i ) { + + u32 idx = idxStream.Read < u32 >( 0 ); + idxStream.Seek ( -4, SEEK_CUR ); + idxStream.Write < u32 >(( u32 )( idx + offset )); + } + + idxStream.Seek ( idxStreamBase, SEEK_SET ); +} + //----------------------------------------------------------------// void MOAIGeometryWriter::PruneVertices ( const MOAIVertexFormat& format, MOAIStream& vtxStream, MOAIStream& idxStream ) { size_t vtxStreamBase = vtxStream.GetCursor (); size_t idxStreamBase = idxStream.GetCursor (); - size_t vtxSize = format.GetVertexSize (); - u32 inputVtxCount = ( u32 )(( vtxStream.GetLength () - vtxStreamBase ) / vtxSize ); + u32 vtxSize = format.GetVertexSize (); + size_t inputVtxCount = ( vtxStream.GetLength () - vtxStreamBase ) / vtxSize; if ( !inputVtxCount ) return; @@ -638,9 +670,9 @@ void MOAIGeometryWriter::PruneVertices ( const MOAIVertexFormat& format, MOAIStr VertexMap vertexMap ( VertexComparator ( vtxStream, format, vtxBuffer0, vtxBuffer1 )); - size_t vtxCount = 0; + u32 vtxCount = 0; - for ( size_t i = 0; i < inputVtxCount; ++i ) { + for ( u32 i = 0; i < inputVtxCount; ++i ) { size_t vertex = vtxStreamBase + ( i * vtxSize ); @@ -654,13 +686,13 @@ void MOAIGeometryWriter::PruneVertices ( const MOAIVertexFormat& format, MOAIStr } else { - vtxStream.Seek ( vertex, SEEK_SET ); + vtxStream.SetCursor ( vertex ); vtxStream.ReadBytes ( vtxBuffer0, vtxSize ); index = vtxCount++; vertex = vtxStreamBase + ( index * vtxSize ); - vtxStream.Seek ( vertex, SEEK_SET ); + vtxStream.SetCursor ( vertex ); vtxStream.WriteBytes ( vtxBuffer0, vtxSize ); vertexMap [ vertex ] = index; @@ -696,8 +728,8 @@ void MOAIGeometryWriter::PruneVertices ( const MOAIVertexFormat& format, MOAIStr vtxStream.Compact (); } - vtxStream.Seek ( vtxStreamBase, SEEK_SET ); - idxStream.Seek ( idxStreamBase, SEEK_SET ); + vtxStream.SetCursor ( vtxStreamBase ); + idxStream.SetCursor ( idxStreamBase ); } //----------------------------------------------------------------// @@ -713,6 +745,7 @@ void MOAIGeometryWriter::RegisterLuaClass ( MOAILuaState& state ) { { "applyLightFromImage", _applyLightFromImage }, { "applyLinearGradient", _applyLinearGradient }, { "getMesh", _getMesh }, + { "offsetIndices", _offsetIndices }, { "pruneVertices", _pruneVertices }, { "snapCoords", _snapCoords }, { "writeBox", _writeBox }, @@ -750,7 +783,7 @@ void MOAIGeometryWriter::SnapCoords ( const MOAIVertexFormat& format, ZLStream& format.WriteCoord ( stream, coord.mX, coord.mY, coord.mZ, coord.mW ); } - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } //----------------------------------------------------------------// @@ -787,7 +820,7 @@ void MOAIGeometryWriter::WriteBox ( const MOAIVertexFormat& format, ZLStream& st MOAIGeometryWriter::WriteQuad ( format, stream, v5, v4, v1, v0, ZLVec3D ( 0.0f, -1.0f, 0.0f )); // bottom MOAIGeometryWriter::WriteQuad ( format, stream, v2, v7, v6, v3, ZLVec3D ( 0.0f, 1.0f, 0.0f )); // top - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } //----------------------------------------------------------------// @@ -827,10 +860,20 @@ void MOAIGeometryWriter::WriteColor ( const MOAIVertexFormat& format, ZLStream& //----------------------------------------------------------------// void MOAIGeometryWriter::WriteCylinder ( const MOAIVertexFormat& format, ZLStream& stream, const ZLVec3D& v0, const ZLVec3D& v1, const ZLVec2D& r0, const ZLVec2D& r1 ) { + UNUSED ( format ); + UNUSED ( stream ); + UNUSED ( v0 ); + UNUSED ( v1 ); + UNUSED ( r0 ); + UNUSED ( r1 ); } //----------------------------------------------------------------// void MOAIGeometryWriter::WriteIcoSphere ( const MOAIVertexFormat& format, ZLStream& stream, const ZLVec3D& v0, const ZLVec3D& r ) { + UNUSED ( format ); + UNUSED ( stream ); + UNUSED ( v0 ); + UNUSED ( r ); } //----------------------------------------------------------------// @@ -853,6 +896,10 @@ void MOAIGeometryWriter::WriteQuad ( const MOAIVertexFormat& format, ZLStream& s //----------------------------------------------------------------// void MOAIGeometryWriter::WriteUVSphere ( const MOAIVertexFormat& format, ZLStream& stream, const ZLVec3D& v0, const ZLVec3D& r ) { + UNUSED ( format ); + UNUSED ( stream ); + UNUSED ( v0 ); + UNUSED ( r ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIGeometryWriter.h b/src/moai-sim/MOAIGeometryWriter.h index 5f5c2a7c03..5a1d56ce15 100644 --- a/src/moai-sim/MOAIGeometryWriter.h +++ b/src/moai-sim/MOAIGeometryWriter.h @@ -39,6 +39,7 @@ class MOAIGeometryWriter : static int _applyLightFromImage ( lua_State* L ); static int _applyLinearGradient ( lua_State* L ); static int _getMesh ( lua_State* L ); + static int _offsetIndices ( lua_State* L ); static int _pruneVertices ( lua_State* L ); static int _snapCoords ( lua_State* L ); static int _writeBox ( lua_State* L ); @@ -74,6 +75,7 @@ class MOAIGeometryWriter : static u32 GetMesh ( const MOAIVertexFormat& format, ZLStream& vtxStream, ZLStream& idxStream, MOAIVertexBuffer& vtxBuffer, MOAIIndexBuffer& idxBuffer, u32 idxSizeInBytes ); MOAIGeometryWriter (); ~MOAIGeometryWriter (); + static void OffsetIndices ( ZLStream& idxStream, s32 offset ); static void PruneVertices ( const MOAIVertexFormat& format, MOAIStream& vtxStream, MOAIStream& idxStream ); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); diff --git a/src/moai-sim/MOAIGfxBuffer.cpp b/src/moai-sim/MOAIGfxBuffer.cpp index b20e6bb0e0..e4582b95b6 100644 --- a/src/moai-sim/MOAIGfxBuffer.cpp +++ b/src/moai-sim/MOAIGfxBuffer.cpp @@ -3,8 +3,8 @@ #include "pch.h" #include -#include -#include +#include +#include #include #include @@ -81,21 +81,6 @@ int MOAIGfxBuffer::_reserveVBOs ( lua_State* L ) { return 0; } -//----------------------------------------------------------------// -/** @lua reset - @text Resets the vertex stream writing to the head of the stream. - - @in MOAIGfxBuffer self - @out nil -*/ -int MOAIGfxBuffer::_reset ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIGfxBuffer, "U" ) - - //self->SetBuffer ( self->mBuffer, self->mBuffer.Size ()); - - return 0; -} - //----------------------------------------------------------------// /** @lua scheduleFlush @text Trigger an update of the GPU-side buffer. Call this when @@ -107,7 +92,7 @@ int MOAIGfxBuffer::_reset ( lua_State* L ) { int MOAIGfxBuffer::_scheduleFlush ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIGfxBuffer, "U" ) - self->mNeedsFlush = true; + self->ScheduleForGPUUpdate (); return 0; } @@ -116,14 +101,16 @@ int MOAIGfxBuffer::_scheduleFlush ( lua_State* L ) { //================================================================// //----------------------------------------------------------------// -void MOAIGfxBuffer::BindVertexFormat ( MOAIVertexFormat* format ) { -} +//void MOAIGfxBuffer::BindVertexFormat ( MOAIVertexFormat* format ) { +//} //----------------------------------------------------------------// void MOAIGfxBuffer::Clear () { - this->Reserve ( 0 ); - this->ReserveVBOs ( 0 ); + this->ZLCopyOnWrite::Free (); + + this->mVBOs.Clear (); + this->mCurrentVBO = 0; this->Destroy (); } @@ -135,35 +122,22 @@ void MOAIGfxBuffer::CopyFromStream ( ZLStream& stream ) { this->Reserve (( u32 )size ); this->WriteStream ( stream ); - this->mNeedsFlush = true; -} - -//----------------------------------------------------------------// -const void* MOAIGfxBuffer::GetAddress () { - - return this->mUseVBOs ? 0 : this->mData; -} - -//----------------------------------------------------------------// -size_t MOAIGfxBuffer::GetSize () { - - return this->GetLength (); + this->ScheduleForGPUUpdate (); } //----------------------------------------------------------------// -u32 MOAIGfxBuffer::GetLoadingPolicy () { +ZLSharedConstBuffer* MOAIGfxBuffer::GetBuffer () { - return MOAIGfxResource::LOADING_POLICY_CPU_GPU_BIND; + return this->mUseVBOs ? 0 : this->ZLCopyOnWrite::GetSharedConstBuffer (); } //----------------------------------------------------------------// MOAIGfxBuffer::MOAIGfxBuffer () : mCurrentVBO ( 0 ), mTarget ( ZGL_BUFFER_TARGET_ARRAY ), - mNeedsFlush ( false ), mLoader ( 0 ), - mData ( 0 ), - mUseVBOs ( false ) { + mUseVBOs ( false ), + mCopyOnUpdate ( false ) { RTTI_BEGIN RTTI_EXTEND ( MOAIGfxResource ) @@ -171,12 +145,6 @@ MOAIGfxBuffer::MOAIGfxBuffer () : RTTI_END } -//----------------------------------------------------------------// -bool MOAIGfxBuffer::NeedsFlush () { - - return this->mNeedsFlush; -} - //----------------------------------------------------------------// MOAIGfxBuffer::~MOAIGfxBuffer () { @@ -197,85 +165,101 @@ void MOAIGfxBuffer::OnGPUBind () { if ( !this->mUseVBOs ) return; - bool dirty = this->mNeedsFlush && this->GetCursor (); - - if ( dirty ) { - this->mCurrentVBO = ( this->mCurrentVBO + 1 ) % this->mVBOs.Size (); - } - - u32 vbo = this->mVBOs [ this->mCurrentVBO ]; + ZLGfxHandle* vbo = this->mVBOs [ this->mCurrentVBO ]; if ( vbo ) { - - zglBindBuffer ( this->mTarget, vbo ); - - if ( dirty ) { - - // TODO: There are a few different ways to approach updating buffers with varying performance - // on different platforms. The approach here is just to multi-buffer the VBO and replace its - // contents via zglBufferSubData when they change. The TODO here is to do performance tests - // on multiple devices, evaluate other approaches and possible expose the configuration of - // those to the end user via Lua. - - //u32 hint = this->mVBOs.Size () > 1 ? ZGL_BUFFER_USAGE_DYNAMIC_DRAW : ZGL_BUFFER_USAGE_STATIC_DRAW; - //zglBufferData ( this->mTarget, this->GetLength (), 0, hint ); - - zglBufferSubData ( this->mTarget, 0, this->GetCursor (), this->mData ); - - this->mNeedsFlush = false; - } + MOAIGfxMgr::GetDrawingAPI ().BindBuffer ( this->mTarget, vbo ); } } //----------------------------------------------------------------// bool MOAIGfxBuffer::OnGPUCreate () { + u32 count = 0; + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + this->mUseVBOs = ( this->mVBOs.Size () > 0 ); - if ( !this->mUseVBOs ) return true; + + if ( this->mUseVBOs ) { - u32 count = 0; - u32 hint = this->mVBOs.Size () > 1 ? ZGL_BUFFER_USAGE_STREAM_DRAW : ZGL_BUFFER_USAGE_STATIC_DRAW; + u32 hint = this->mVBOs.Size () > 1 ? ZGL_BUFFER_USAGE_STREAM_DRAW : ZGL_BUFFER_USAGE_STATIC_DRAW; - for ( u32 i = 0; i < this->mVBOs.Size (); ++i ) { - - u32 vbo = zglCreateBuffer (); - if ( vbo ) { - - zglBindBuffer ( this->mTarget, vbo ); - zglBufferData ( this->mTarget, this->GetLength (), this->mNeedsFlush ? this->mData : 0, hint ); - zglBindBuffer ( this->mTarget, 0 ); + for ( u32 i = 0; i < this->mVBOs.Size (); ++i ) { + + ZLGfxHandle* vbo = gfx.CreateBuffer (); + if ( vbo ) { + + ZLSharedConstBuffer* buffer = this->GetCursor () ? this->GetSharedConstBuffer () : 0; + + if ( this->mCopyOnUpdate ) { + buffer = gfx.CopyBuffer ( buffer ); + } - count++; + gfx.BindBuffer ( this->mTarget, vbo ); + gfx.BufferData ( this->mTarget, this->GetLength (), buffer, 0, hint ); + gfx.BindBuffer ( this->mTarget, 0 ); + + count++; + } + this->mVBOs [ i ] = vbo; } - this->mVBOs [ i ] = vbo; } - this->mNeedsFlush = false; + return count == this->mVBOs.Size (); } //----------------------------------------------------------------// -void MOAIGfxBuffer::OnGPUDestroy () { +void MOAIGfxBuffer::OnGPUDeleteOrDiscard ( bool shouldDelete ) { for ( u32 i = 0; i < this->mVBOs.Size (); ++i ) { - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_BUFFER, this->mVBOs [ i ]); - this->mVBOs [ i ] = 0; + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mVBOs [ i ], shouldDelete ); } } //----------------------------------------------------------------// -void MOAIGfxBuffer::OnGPULost () { +void MOAIGfxBuffer::OnGPUUnbind () { - for ( u32 i = 0; i < this->mVBOs.Size (); ++i ) { - this->mVBOs [ i ] = 0; - } - - this->mNeedsFlush = true; + MOAIGfxMgr::GetDrawingAPI ().BindBuffer ( this->mTarget, 0 ); // OK? } //----------------------------------------------------------------// -void MOAIGfxBuffer::OnGPUUnbind () { +bool MOAIGfxBuffer::OnGPUUpdate () { - zglBindBuffer ( this->mTarget, 0 ); // OK? + if ( !this->mUseVBOs ) return true; + + bool dirty = this->GetCursor () > 0; + + if ( dirty ) { + this->mCurrentVBO = ( this->mCurrentVBO + 1 ) % this->mVBOs.Size (); + } + + ZLGfxHandle* vbo = this->mVBOs [ this->mCurrentVBO ]; + + if ( dirty && vbo ) { + + // TODO: There are a few different ways to approach updating buffers with varying performance + // on different platforms. The approach here is just to multi-buffer the VBO and replace its + // contents via zglBufferSubData when they change. The TODO here is to do performance tests + // on multiple devices, evaluate other approaches and possible expose the configuration of + // those to the end user via Lua. + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + ZLSharedConstBuffer* buffer = this->GetSharedConstBuffer (); + + if ( this->mCopyOnUpdate ) { + buffer = gfx.CopyBuffer ( buffer ); + } + + gfx.BindBuffer ( this->mTarget, vbo ); + gfx.BufferSubData ( this->mTarget, 0, this->GetCursor (), buffer, 0 ); + gfx.BindBuffer ( this->mTarget, 0 ); + + //u32 hint = this->mVBOs.Size () > 1 ? ZGL_BUFFER_USAGE_DYNAMIC_DRAW : ZGL_BUFFER_USAGE_STATIC_DRAW; + //zglBufferData ( this->mTarget, this->GetLength (), 0, hint ); + } + + return true; } //----------------------------------------------------------------// @@ -299,7 +283,6 @@ void MOAIGfxBuffer::RegisterLuaFuncs ( MOAILuaState& state ) { { "release", _release }, { "reserve", _reserve }, { "reserveVBOs", _reserveVBOs }, - { "reset", _reset }, { "scheduleFlush", _scheduleFlush }, { NULL, NULL } }; @@ -310,15 +293,10 @@ void MOAIGfxBuffer::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIGfxBuffer::Reserve ( u32 size ) { - if ( this->mData ) { - free ( this->mData ); - this->mData = 0; - } + this->ZLCopyOnWrite::Free (); if ( size ) { - this->mData = calloc ( size, 1 ); - this->SetBuffer ( this->mData, size, size ); - this->mNeedsFlush = true; + this->ZLCopyOnWrite::Reserve ( size ); this->FinishInit (); } } @@ -326,24 +304,21 @@ void MOAIGfxBuffer::Reserve ( u32 size ) { //----------------------------------------------------------------// void MOAIGfxBuffer::ReserveVBOs ( u32 gpuBuffers ) { + if ( gpuBuffers < this->mVBOs.Size ()) { + this->mVBOs.Clear (); + } + if ( gpuBuffers ) { this->mVBOs.Resize ( gpuBuffers, 0 ); this->mCurrentVBO = gpuBuffers - 1; } - else { - this->mVBOs.Clear (); - this->mCurrentVBO = 0; - } -} - -//----------------------------------------------------------------// -void MOAIGfxBuffer::ScheduleFlush () { - this->mNeedsFlush = true; + this->FinishInit (); } //----------------------------------------------------------------// void MOAIGfxBuffer::SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ) { + UNUSED ( serializer ); u32 totalVBOs = state.GetField < u32 >( -1, "mTotalVBOs", 0 ); u32 size = state.GetField < u32 >( -1, "mSize", 0 ); @@ -355,29 +330,30 @@ void MOAIGfxBuffer::SerializeIn ( MOAILuaState& state, MOAIDeserializer& seriali if ( state.IsType ( -1, LUA_TSTRING )) { STLString zipString = lua_tostring ( state, -1 ); - size_t unzipLen = zipString.zip_inflate ( this->mData, size ); + size_t unzipLen = zipString.zip_inflate ( this->ZLCopyOnWrite::Invalidate (), size ); assert ( unzipLen == size ); // TODO: fail gracefully + UNUSED ( unzipLen ); // TODO: this *should* be handled by the zl assert redefine this->Seek ( size, SEEK_SET ); } lua_pop ( state, 1 ); - this->ScheduleFlush (); + this->ScheduleForGPUUpdate (); this->FinishInit (); } //----------------------------------------------------------------// void MOAIGfxBuffer::SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ) { + UNUSED ( serializer ); - u32 size = ( u32 )this->GetLength (); + size_t size = this->GetLength (); - state.SetField < u32 >( -1, "mTotalVBOs", this->mVBOs.Size ()); - state.SetField < u32 >( -1, "mSize", size ); + state.SetField < u32 >( -1, "mTotalVBOs", ( u32 )this->mVBOs.Size ()); + state.SetField < u32 >( -1, "mSize", ( u32 )size ); STLString zipString; - zipString.zip_deflate ( this->mData, size ); + zipString.zip_deflate ( this->ZLCopyOnWrite::GetBuffer (), size ); lua_pushstring ( state, zipString.str ()); lua_setfield ( state, -2, "mData" ); } - diff --git a/src/moai-sim/MOAIGfxBuffer.h b/src/moai-sim/MOAIGfxBuffer.h index b20efef5e8..41ee8af126 100644 --- a/src/moai-sim/MOAIGfxBuffer.h +++ b/src/moai-sim/MOAIGfxBuffer.h @@ -29,12 +29,12 @@ class MOAIGfxBufferLoader { */ class MOAIGfxBuffer : public MOAIGfxResource, - public MOAIStream, - public ZLByteStream { + public virtual MOAIStream, + public ZLCopyOnWrite { protected: - friend class MOAIGfxDeviceBase; - friend class MOAIGfxDeviceStateCache; + friend class MOAIGfxPipelineClerk; + friend class MOAIGfxStateCache; enum { UPDATE_MODE_MAPBUFFER, @@ -42,58 +42,52 @@ class MOAIGfxBuffer : UPDATE_MODE_SUBDATA, }; - ZLLeanArray < u32 > mVBOs; - u32 mCurrentVBO; - u32 mTarget; - bool mNeedsFlush; + ZLLeanArray < ZLGfxHandle* > mVBOs; + u32 mCurrentVBO; + u32 mTarget; - MOAIGfxBufferLoader* mLoader; - void* mData; + MOAIGfxBufferLoader* mLoader; - bool mUseVBOs; + bool mUseVBOs; + bool mCopyOnUpdate; //----------------------------------------------------------------// static int _copyFromStream ( lua_State* L ); static int _release ( lua_State* L ); static int _reserve ( lua_State* L ); static int _reserveVBOs ( lua_State* L ); - static int _reset ( lua_State* L ); static int _scheduleFlush ( lua_State* L ); //----------------------------------------------------------------// - void BindVertexFormat ( MOAIVertexFormat* format ); - u32 GetLoadingPolicy (); + //void BindVertexFormat ( MOAIVertexFormat* format ); bool OnCPUCreate (); void OnCPUDestroy (); void OnGPUBind (); bool OnGPUCreate (); - void OnGPUDestroy (); - void OnGPULost (); + void OnGPUDeleteOrDiscard ( bool shouldDelete ); void OnGPUUnbind (); public: - GET ( const void*, Data, mData ) GET ( size_t, BufferCount, mVBOs.Size ()) GET ( u32, Target, mTarget ) + GET_SET ( bool, CopyOnUpdate, mCopyOnUpdate ) IS ( UsingVBOs, mUseVBOs, true ) //----------------------------------------------------------------// - void Clear (); - void CopyFromStream ( ZLStream& stream ); - const void* GetAddress (); - size_t GetSize (); - MOAIGfxBuffer (); - ~MOAIGfxBuffer (); - bool NeedsFlush (); - void RegisterLuaClass ( MOAILuaState& state ); - void RegisterLuaFuncs ( MOAILuaState& state ); - void Reserve ( u32 size ); - void ReserveVBOs ( u32 gpuBuffers ); - void ScheduleFlush (); - void SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ); - void SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ); + void Clear (); + void CopyFromStream ( ZLStream& stream ); + ZLSharedConstBuffer* GetBuffer (); + MOAIGfxBuffer (); + ~MOAIGfxBuffer (); + bool OnGPUUpdate (); + void RegisterLuaClass ( MOAILuaState& state ); + void RegisterLuaFuncs ( MOAILuaState& state ); + void Reserve ( u32 size ); + void ReserveVBOs ( u32 gpuBuffers ); + void SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ); + void SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ); }; #endif diff --git a/src/moai-sim/MOAIGfxDevice.cpp b/src/moai-sim/MOAIGfxDevice.cpp deleted file mode 100644 index 11e3cb3fe4..0000000000 --- a/src/moai-sim/MOAIGfxDevice.cpp +++ /dev/null @@ -1,476 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================// -// local -//================================================================// - -//----------------------------------------------------------------// -/** @lua getFrameBuffer - @text Returns the frame buffer associated with the device. - - @out MOAIFrameBuffer frameBuffer -*/ -int MOAIGfxDevice::_getFrameBuffer ( lua_State* L ) { - - MOAILuaState state ( L ); - state.Push ( MOAIGfxDevice::Get ().GetDefaultFrameBuffer ()); - - return 1; -} - -//----------------------------------------------------------------// -/** @lua getMaxTextureSize - @text Returns the maximum texture size supported by device - - @out number maxTextureSize -*/ -int MOAIGfxDevice::_getMaxTextureSize ( lua_State* L ) { - - MOAILuaState state ( L ); - state.Push ( MOAIGfxDevice::Get ().mMaxTextureSize ); - - return 1; -} - -//----------------------------------------------------------------// -/** @lua getMaxTextureUnits - @text Returns the total number of texture units available on the device. - - @out number maxTextureUnits -*/ -int MOAIGfxDevice::_getMaxTextureUnits ( lua_State* L ) { - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - lua_pushnumber ( L, gfxDevice.mTextureUnits.Size ()); - - return 1; -} - -//----------------------------------------------------------------// -/** @lua getViewSize - @text Returns the width and height of the view - - @out number width - @out number height -*/ -int MOAIGfxDevice::_getViewSize ( lua_State* L ) { - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - lua_pushnumber ( L, gfxDevice.GetWidth ()); - lua_pushnumber ( L, gfxDevice.GetHeight ()); - - return 2; -} - -//----------------------------------------------------------------// -/** @lua setDefaultTexture - @text Specify a fallback texture to use when textures are - unavailable (pending load, missing or in error state). - - @in MOAITexture texture - @out MOAITexture texture Texture that was passed in or created. -*/ -int MOAIGfxDevice::_setDefaultTexture ( lua_State* L ) { - - MOAILuaState state ( L ); - MOAIGfxDevice& device = MOAIGfxDevice::Get (); - - MOAITexture* texture = state.GetLuaObject < MOAITexture >( 1, false ); - - if ( !texture ) { - texture = new MOAITexture (); - if ( !texture->Init ( state, 1 )) { - // TODO: report error - delete texture; - texture = 0; - } - } - - device.mDefaultTexture.Set ( device, texture ); - - if ( texture ) { - texture->PushLuaUserdata ( state ); - return 1; - } - return 0; -} - -//----------------------------------------------------------------// -/** @lua setPenColor - - @in number r - @in number g - @in number b - @opt number a Default value is 1. - @out nil -*/ -int MOAIGfxDevice::_setPenColor ( lua_State* L ) { - - MOAILuaState state ( L ); - - float r = state.GetValue < float >( 1, 1.0f ); - float g = state.GetValue < float >( 2, 1.0f ); - float b = state.GetValue < float >( 3, 1.0f ); - float a = state.GetValue < float >( 4, 1.0f ); - - MOAIGfxDevice::Get ().SetPenColor ( r, g, b, a ); - return 0; -} - -//----------------------------------------------------------------// -/** @lua setPenWidth - - @in number width - @out nil -*/ -int MOAIGfxDevice::_setPenWidth ( lua_State* L ) { - - MOAILuaState state ( L ); - - float width = state.GetValue < float >( 1, 1.0f ); - MOAIGfxDevice::Get ().SetPenWidth ( width ); - return 0; -} - -//================================================================// -// MOAIGfxDevice -//================================================================// - -//----------------------------------------------------------------// -void MOAIGfxDevice::ClearErrors () { - #ifndef MOAI_OS_NACL - if ( this->mHasContext ) { - while ( zglGetError () != ZGL_ERROR_NONE ); - } - #endif -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::ClearSurface ( u32 clearFlags ) { - - if ( clearFlags ) { - if (( clearFlags & ZGL_CLEAR_DEPTH_BUFFER_BIT ) && !this->mDepthMask ) { - zglDepthMask ( true ); - zglClear ( clearFlags ); - zglDepthMask ( false ); - } - else { - zglClear ( clearFlags ); - } - } -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::DetectContext () { - - this->mHasContext = true; - - zglBegin (); - - zglInitialize (); - - u32 maxTextureUnits = zglGetCap ( ZGL_CAPS_MAX_TEXTURE_UNITS ); - this->mTextureUnits.Init ( maxTextureUnits ); - this->mTextureUnits.Fill ( 0 ); - - this->mMaxTextureSize = zglGetCap ( ZGL_CAPS_MAX_TEXTURE_SIZE ); - - MOAIGfxResourceMgr::Get ().RenewResources (); - - this->mDefaultFrameBuffer->DetectGLFrameBufferID (); - - zglEnd (); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::DetectFramebuffer () { - - zglBegin (); - - this->mDefaultFrameBuffer->DetectGLFrameBufferID (); - - zglEnd (); -} - -//----------------------------------------------------------------// -float MOAIGfxDevice::GetDeviceScale () { - - return this->mCurrentFrameBuffer->mBufferScale; -} - -//----------------------------------------------------------------// -u32 MOAIGfxDevice::GetHeight () const { - - return this->mCurrentFrameBuffer->mBufferHeight; -} - -//----------------------------------------------------------------// -//ZLQuad MOAIGfxDevice::GetViewQuad () const { -// -// ZLQuad quad; -// -// ZLMatrix4x4 invMtx; -// invMtx.Inverse ( this->GetViewProjMtx ()); -// -// quad.mV [ 0 ].Init ( -1.0f, 1.0f ); -// quad.mV [ 1 ].Init ( 1.0f, 1.0f ); -// quad.mV [ 2 ].Init ( 1.0f, -1.0f ); -// quad.mV [ 3 ].Init ( -1.0f, -1.0f ); -// -// invMtx.TransformQuad ( quad.mV ); -// return quad; -//} - -//----------------------------------------------------------------// -//ZLRect MOAIGfxDevice::GetViewRect () const { -// -// return this->mViewRect; -//} - -//----------------------------------------------------------------// -u32 MOAIGfxDevice::GetWidth () const { - - return this->mCurrentFrameBuffer->mBufferWidth; -} - -//----------------------------------------------------------------// -bool MOAIGfxDevice::IsOpaque () const { - - assert ( this->mDefaultFrameBuffer ); - return this->mDefaultFrameBuffer->IsOpaque (); -} - -//----------------------------------------------------------------// -u32 MOAIGfxDevice::LogErrors () { - - u32 count = 0; - #ifndef MOAI_OS_NACL - if ( this->mHasContext ) { - for ( u32 error = zglGetError (); error != ZGL_ERROR_NONE; error = zglGetError (), ++count ) { - MOAILogF ( 0, ZLLog::LOG_ERROR, MOAILogMessages::MOAIGfxDevice_OpenGLError_S, zglGetErrorString ( error )); - } - } - #endif - return count; -} - -//----------------------------------------------------------------// -MOAIGfxDevice::MOAIGfxDevice () : - mHasContext ( false ), - mIsFramebufferSupported ( 0 ), - #if defined ( MOAI_OS_NACL ) || defined ( MOAI_OS_IPHONE ) || defined ( MOAI_OS_ANDROID ) || defined ( EMSCRIPTEN ) - mIsOpenGLES ( true ), - #else - mIsOpenGLES ( false ), - #endif - mMajorVersion ( 0 ), - mMinorVersion ( 0 ), - mTextureMemoryUsage ( 0 ), - mMaxTextureSize ( 0 ) { - - RTTI_SINGLE ( MOAIGlobalEventSource ) - - this->mScissorRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); - - this->mDefaultFrameBuffer.Set ( *this, new MOAIFrameBuffer ()); - this->mCurrentFrameBuffer = this->mDefaultFrameBuffer; -} - -//----------------------------------------------------------------// -MOAIGfxDevice::~MOAIGfxDevice () { - - this->mDefaultFrameBuffer.Set ( *this, 0 ); - this->mDefaultTexture.Set ( *this, 0 ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::OnGlobalsFinalize () { -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::RegisterLuaClass ( MOAILuaState& state ) { - - state.SetField ( -1, "LOADING_POLICY_CPU_GPU_ASAP", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_GPU_ASAP ); - state.SetField ( -1, "LOADING_POLICY_CPU_ASAP_GPU_NEXT", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_ASAP_GPU_NEXT ); - state.SetField ( -1, "LOADING_POLICY_CPU_ASAP_GPU_BIND", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_ASAP_GPU_BIND ); - state.SetField ( -1, "LOADING_POLICY_CPU_GPU_BIND", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_GPU_BIND ); - - state.SetField ( -1, "EVENT_RESIZE", ( u32 )EVENT_RESIZE ); - - luaL_Reg regTable [] = { - { "getFrameBuffer", _getFrameBuffer }, - { "getListener", &MOAIGlobalEventSource::_getListener < MOAIGfxDevice > }, - { "getMaxTextureSize", _getMaxTextureSize }, - { "getMaxTextureUnits", _getMaxTextureUnits }, - { "getViewSize", _getViewSize }, - { "setDefaultTexture", _setDefaultTexture }, - { "setListener", &MOAIGlobalEventSource::_setListener < MOAIGfxDevice > }, - { "setPenColor", _setPenColor }, - { "setPenWidth", _setPenWidth }, - { NULL, NULL } - }; - - luaL_register( state, 0, regTable ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::ReportTextureAlloc ( cc8* name, size_t size ) { - - this->mTextureMemoryUsage += size; - float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f; - MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "+", size, mb, name ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::ReportTextureFree ( cc8* name, size_t size ) { - - this->mTextureMemoryUsage -= size; - float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f; - MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "-", size, mb, name ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::ResetDrawCount () { - this->mDrawCount = 0; -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::ResetState () { - - this->OnGfxStateWillChange (); - - for ( u32 i = 0; i < TOTAL_VTX_TRANSFORMS; ++i ) { - this->mVertexTransforms [ i ].Ident (); - } - this->mUVTransform.Ident (); - this->mCpuVertexTransformMtx.Ident (); - - this->mVertexMtxInput = VTX_STAGE_MODEL; - this->mVertexMtxOutput = VTX_STAGE_MODEL; - - //this->mTop = 0; - //this->mPrimCount = 0; - - // turn off texture - this->mTextureUnits [ 0 ] = 0; - this->mCurrentTexture = 0; - - // turn off blending - zglDisable ( ZGL_PIPELINE_BLEND ); - this->mBlendEnabled = false; - - // disable backface culling - zglDisable ( ZGL_PIPELINE_CULL ); - this->mCullFunc = 0; - - // disable depth test - zglDisable ( ZGL_PIPELINE_DEPTH ); - this->mDepthFunc = 0; - - // disable depth write - zglDepthMask ( false ); - this->mDepthMask = false; - - // clear the vertex format - this->UnbindBufferedDrawing (); - - // clear the shader - this->mShaderProgram = 0; - - // reset the pen width - this->mPenWidth = 1.0f; - zglLineWidth ( this->mPenWidth ); - - // reset the scissor rect - ZLRect scissorRect = this->mCurrentFrameBuffer->GetBufferRect (); - zglScissor (( s32 )scissorRect.mXMin, ( s32 )scissorRect.mYMin, ( u32 )scissorRect.Width (), ( u32 )scissorRect.Height ()); - - this->mScissorRect = scissorRect; -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::SetBufferScale ( float scale ) { - - this->mDefaultFrameBuffer->SetBufferScale ( scale ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::SetBufferSize ( u32 width, u32 height ) { - - this->mDefaultFrameBuffer->SetBufferSize ( width, height ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::SetScreenSpace ( MOAIViewport& viewport ) { - UNUSED ( viewport ); - - // TODO - - //glMatrixMode ( GL_MODELVIEW ); - //glLoadIdentity (); - // - //ZLMatrix4x4 wndToNorm; - //viewport.GetWndToNormMtx ( wndToNorm ); - // - //glMatrixMode ( GL_PROJECTION ); - //MOAIGfxDevice::LoadMatrix ( wndToNorm ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::SetViewRect () { - - float width = ( float )this->mCurrentFrameBuffer->mBufferWidth; - float height = ( float )this->mCurrentFrameBuffer->mBufferHeight; - - MOAIViewport rect; - rect.Init ( 0.0f, 0.0f, width, height ); - - this->SetViewRect ( rect ); -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::SetViewRect ( ZLRect rect ) { - - ZLRect deviceRect; - - deviceRect = this->mCurrentFrameBuffer->WndRectToDevice ( rect ); - - s32 x = ( s32 )deviceRect.mXMin; - s32 y = ( s32 )deviceRect.mYMin; - - u32 w = ( u32 )( deviceRect.Width () + 0.5f ); - u32 h = ( u32 )( deviceRect.Height () + 0.5f ); - - zglViewport ( x, y, w, h ); - - this->mViewRect = rect; - this->mShaderDirty = true; -} - -//----------------------------------------------------------------// -void MOAIGfxDevice::UpdateShaderGlobals () { - - if ( this->mShaderProgram && this->mShaderDirty ) { - this->mShaderProgram->UpdateGlobals (); - } - this->mShaderDirty = false; -} diff --git a/src/moai-sim/MOAIGfxDevice.h b/src/moai-sim/MOAIGfxDevice.h deleted file mode 100644 index 5a0c79d615..0000000000 --- a/src/moai-sim/MOAIGfxDevice.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAIGFXDEVICE_H -#define MOAIGFXDEVICE_H - -#include -#include -#include -#include -#include - -class MOAICamera; -class MOAIFrameBuffer; -class MOAIGfxResource; -class MOAIMultiTexture; -class MOAIShader; -class MOAIShaderProgram; -class MOAITexture; -class MOAISingleTexture; -class MOAIVertexFormat; -class MOAIViewport; - -//================================================================// -// MOAIGfxDevice -//================================================================// -/** @lua MOAIGfxDevice - @text Interface to the graphics singleton. - - @const EVENT_RESIZE -*/ -class MOAIGfxDevice : - public MOAIGfxDeviceVertexWriter, - public MOAIGlobalClass < MOAIGfxDevice, MOAIGlobalEventSource > { -public: - - enum { - EVENT_RESIZE, - TOTAL_EVENTS, - }; - -private: - - bool mHasContext; - - bool mIsFramebufferSupported; - bool mIsOpenGLES; - - u32 mMajorVersion; - u32 mMinorVersion; - - size_t mTextureMemoryUsage; - u32 mMaxTextureSize; - - MOAILuaSharedPtr < MOAIFrameBuffer > mDefaultFrameBuffer; - MOAILuaSharedPtr < MOAITexture > mDefaultTexture; - - //----------------------------------------------------------------// - static int _getFrameBuffer ( lua_State* L ); - static int _getMaxTextureSize ( lua_State* L ); - static int _getMaxTextureUnits ( lua_State* L ); - static int _getViewSize ( lua_State* L ); - static int _setDefaultTexture ( lua_State* L ); - static int _setPenColor ( lua_State* L ); - static int _setPenWidth ( lua_State* L ); - - //----------------------------------------------------------------// - void TransformAndWriteQuad ( ZLVec4D* vtx, ZLVec2D* uv ); - -public: - - friend class MOAIGfxResource; - friend class MOAIShaderProgram; - friend class MOAISingleTexture; - - DECL_LUA_SINGLETON ( MOAIGfxDevice ) - - GET ( size_t, TextureMemoryUsage, mTextureMemoryUsage ) - GET ( u32, MaxTextureSize, mMaxTextureSize ) - GET ( bool, HasContext, mHasContext ) - - GET_BOOL ( IsOpenGLES, mIsOpenGLES ) - GET_BOOL ( IsFramebufferSupported, mIsFramebufferSupported ) - - GET ( MOAIBlendMode, BlendMode, mBlendMode ) - - GET ( MOAIFrameBuffer*, DefaultFrameBuffer, mDefaultFrameBuffer ) - GET ( MOAITexture*, DefaultTexture, mDefaultTexture ) - - //----------------------------------------------------------------// - - void ClearErrors (); - void ClearSurface ( u32 clearFlags ); // takes zgl clear flags - void DetectContext (); - void DetectFramebuffer (); - - float GetDeviceScale (); - - u32 GetHeight () const; - u32 GetWidth () const; - - bool IsOpaque () const; - u32 LogErrors (); - - MOAIGfxDevice (); - ~MOAIGfxDevice (); - - void OnGlobalsFinalize (); - - void RegisterLuaClass ( MOAILuaState& state ); - - void ReportTextureAlloc ( cc8* name, size_t size ); - void ReportTextureFree ( cc8* name, size_t size ); - - void ResetDrawCount (); - void ResetState (); - - void SetBufferScale ( float scale ); - void SetBufferSize ( u32 width, u32 height ); - - void SetScreenSpace ( MOAIViewport& viewport ); - - void SetViewRect (); - void SetViewRect ( ZLRect rect ); - - void UpdateShaderGlobals (); -}; - -#endif diff --git a/src/moai-sim/MOAIGfxDeviceBase.cpp b/src/moai-sim/MOAIGfxDeviceBase.cpp deleted file mode 100644 index 05515bc78d..0000000000 --- a/src/moai-sim/MOAIGfxDeviceBase.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" - -#include -#include -#include -#include -#include - -//================================================================// -// MOAIGfxDeviceBase -//================================================================// - -//----------------------------------------------------------------// -MOAIGfxDeviceBase::MOAIGfxDeviceBase () : - mShaderDirty ( false ), - mDrawCount ( 0 ) { - - this->mViewRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); -} - -//----------------------------------------------------------------// -MOAIGfxDeviceBase::~MOAIGfxDeviceBase () { -} diff --git a/src/moai-sim/MOAIGfxDeviceBase.h b/src/moai-sim/MOAIGfxDeviceBase.h deleted file mode 100644 index daaea8e9b8..0000000000 --- a/src/moai-sim/MOAIGfxDeviceBase.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAIGFXDEVICEBASE_H -#define MOAIGFXDEVICEBASE_H - -class MOAIIndexBuffer; -class MOAIVertexArray; -class MOAIVertexBuffer; -class MOAIVertexFormat; - -//================================================================// -// MOAIGfxDeviceBase -//================================================================// -class MOAIGfxDeviceBase { -protected: - - bool mShaderDirty; - ZLRect mViewRect; - ZLFrustum mViewVolume; - - u32 mDrawCount; - - //----------------------------------------------------------------// - virtual void UpdateShaderGlobals () = 0; - -public: - - GET ( const ZLFrustum&, ViewVolume, mViewVolume ) - GET ( const ZLRect&, ViewRect, mViewRect ) - - GET ( u32, DrawCount, mDrawCount ); - - //----------------------------------------------------------------// - MOAIGfxDeviceBase (); - virtual ~MOAIGfxDeviceBase (); -}; - -#endif diff --git a/src/moai-sim/MOAIGfxDeviceMtxCache.cpp b/src/moai-sim/MOAIGfxDeviceMtxCache.cpp deleted file mode 100644 index 695209acae..0000000000 --- a/src/moai-sim/MOAIGfxDeviceMtxCache.cpp +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" - -#include - -//================================================================// -// MOAIGfxDeviceMtxCache -//================================================================// - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetNormToWndMtx () const { - - return this->GetNormToWndMtx ( this->mViewRect ); -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetNormToWndMtx ( const ZLRect& wndRect ) const { - - float hWidth = wndRect.Width () * 0.5f; - float hHeight = wndRect.Height () * 0.5f; - - // Wnd - ZLMatrix4x4 normToWnd; - normToWnd.Scale ( hWidth, -hHeight, 1.0f ); - - ZLMatrix4x4 mtx; - mtx.Translate ( hWidth + wndRect.mXMin, hHeight + wndRect.mYMin, 0.0f ); - normToWnd.Append ( mtx ); - - return normToWnd; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::GetUVMtxMode ( u32& input, u32& output ) const { - - input = this->mUVMtxInput; - output = this->mUVMtxOutput; -} - -//----------------------------------------------------------------// -const ZLMatrix4x4& MOAIGfxDeviceMtxCache::GetUVTransform () const { - - return this->mUVTransform; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::GetVertexMtxMode ( u32& input, u32& output ) const { - - input = this->mVertexMtxInput; - output = this->mVertexMtxOutput; -} - -//----------------------------------------------------------------// -const ZLMatrix4x4& MOAIGfxDeviceMtxCache::GetVertexTransform ( u32 id ) const { - - return this->mVertexTransforms [ id ]; -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetViewProjMtx () const { - - ZLMatrix4x4 mtx = this->mVertexTransforms [ VTX_VIEW_TRANSFORM ]; - mtx.Append ( this->mVertexTransforms [ VTX_PROJ_TRANSFORM ]); - return mtx; -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetWorldToWndMtx () const { - - return this->GetWorldToWndMtx ( this->mViewRect ); -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetWorldToWndMtx ( const ZLRect& wndRect ) const { - - ZLMatrix4x4 worldToWnd = this->GetViewProjMtx (); - worldToWnd.Append ( MOAIGfxDeviceMtxCache::GetNormToWndMtx ( wndRect )); - - return worldToWnd; -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetWndToNormMtx () const { - - return this->GetWndToNormMtx ( this->mViewRect ); -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetWndToNormMtx ( const ZLRect& wndRect ) const { - - float hWidth = wndRect.Width () * 0.5f; - float hHeight = wndRect.Height () * 0.5f; - - // Inv Wnd - ZLMatrix4x4 wndToNorm; - wndToNorm.Translate ( -hWidth - wndRect.mXMin, -hHeight - wndRect.mYMin, 0.0f ); - - ZLMatrix4x4 mtx; - mtx.Scale (( 1.0f / hWidth ), -( 1.0f / hHeight ), 1.0f ); - wndToNorm.Append ( mtx ); - - return wndToNorm; -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetWndToWorldMtx () const { - - return this->GetWndToWorldMtx ( this->mViewRect ); -} - -//----------------------------------------------------------------// -ZLMatrix4x4 MOAIGfxDeviceMtxCache::GetWndToWorldMtx ( const ZLRect& wndRect ) const { - - ZLMatrix4x4 wndToWorld = MOAIGfxDeviceMtxCache::GetWndToNormMtx ( wndRect ); - - // inv viewproj - ZLMatrix4x4 mtx = this->GetViewProjMtx (); - mtx.Inverse (); - wndToWorld.Append ( mtx ); - - return wndToWorld; -} - -//----------------------------------------------------------------// -MOAIGfxDeviceMtxCache::MOAIGfxDeviceMtxCache () : - mVertexMtxInput ( VTX_STAGE_MODEL ), - mVertexMtxOutput ( VTX_STAGE_MODEL ), - mCpuVertexTransform ( false ), - mUVMtxInput ( UV_STAGE_MODEL ), - mUVMtxOutput ( UV_STAGE_MODEL ), - mCpuUVTransform ( false ) { - - for ( u32 i = 0; i < TOTAL_VTX_TRANSFORMS; ++i ) { - this->mVertexTransforms [ i ].Ident (); - this->mCpuVertexTransformCache [ i ] = false; - this->mCpuVertexTransformCacheMtx [ i ].Ident (); - } - this->mCpuVertexTransformMtx.Ident (); - - this->mUVTransform.Ident (); -} - -//----------------------------------------------------------------// -MOAIGfxDeviceMtxCache::~MOAIGfxDeviceMtxCache () { -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetUVMtxMode ( u32 input, u32 output ) { - - if (( this->mUVMtxInput != input ) || ( this->mUVMtxOutput != output )) { - - this->mUVMtxInput = input; - this->mUVMtxOutput = output; - - this->UpdateUVMtx (); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetUVTransform () { - - ZLMatrix4x4 mtx; - mtx.Ident (); - this->SetUVTransform ( mtx ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetUVTransform ( const ZLAffine3D& transform ) { - - ZLMatrix4x4 mtx; - mtx.Init ( transform ); - this->SetUVTransform ( mtx ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetUVTransform ( const ZLMatrix4x4& transform ) { - - if ( !this->mUVTransform.IsSame ( transform )) { - this->mUVTransform = transform; - this->UpdateUVMtx (); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetVertexMtxMode ( u32 input, u32 output ) { - - if (( this->mVertexMtxInput != input ) || ( this->mVertexMtxOutput != output )) { - - this->mVertexMtxInput = input; - this->mVertexMtxOutput = output; - - // Invalidate the lower level matrices (i.e. modelview, etc) matrix in this case to force recalc - for ( u32 i = input; i < output; ++i ) { - this->mCpuVertexTransformCache [ i ] = false; - } - - this->UpdateCpuVertexMtx (); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetVertexTransform ( u32 id ) { - - ZLMatrix4x4 mtx; - mtx.Ident (); - this->SetVertexTransform ( id, mtx ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetVertexTransform ( u32 id, const ZLAffine3D& transform ) { - - ZLMatrix4x4 mtx; - mtx.Init ( transform ); - this->SetVertexTransform ( id, mtx ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::SetVertexTransform ( u32 id, const ZLMatrix4x4& transform ) { - - assert ( id < TOTAL_VTX_TRANSFORMS ); - - if ( !this->mVertexTransforms [ id ].IsSame ( transform )) { - - this->mVertexTransforms [ id ] = transform; - - // check to see if this is a CPU or GPU matrix and update accordingly - if ( id < this->mVertexMtxOutput ) { - - // Invalidate the lower level matrices (i.e. modelview, etc) matrix in this case to force recalc - for ( u32 i = this->mVertexMtxInput; i <= id; ++i ) { - this->mCpuVertexTransformCache [ i ] = false; - } - this->UpdateCpuVertexMtx (); - } - } - - this->mShaderDirty = true; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::UpdateCpuVertexMtx () { - - // Used signed, so we can roll "under" to -1 without an extra range check - int start = this->mVertexMtxInput; - int finish = this->mVertexMtxOutput; - - // The matrices are being multiplied A*B*C, but the common case is that - // B and C are static throughout all/most of a frame. Thus, we can - // capitalize on the associativity of matrix multiplication by caching - // (B*C) and save a matrix mult in the common case (assuming they haven't - // changed since the last update request). - - int i = finish - 1; - - if ( this->mCpuVertexTransformCache [ i ]) { - while ( i >= start && this->mCpuVertexTransformCache [ i ]) { - --i; - } - this->mCpuVertexTransformMtx = this->mCpuVertexTransformCacheMtx [ i + 1 ]; - } - else { - this->mCpuVertexTransformMtx.Ident(); - } - - for ( ; i >= start; --i ) { - this->mCpuVertexTransformMtx.Prepend ( this->mVertexTransforms [ i ]); - this->mCpuVertexTransformCacheMtx [ i ] = this->mCpuVertexTransformMtx; - this->mCpuVertexTransformCache [ i ] = true; - } - - this->mCpuVertexTransform = !this->mCpuVertexTransformMtx.IsIdent (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::UpdateUVMtx () { - - if ( this->mUVMtxOutput == UV_STAGE_TEXTURE ) { - - this->mCpuUVTransform = !this->mUVTransform.IsIdent (); - } - else { - - this->mCpuUVTransform = false; - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceMtxCache::UpdateViewVolume () { - - ZLMatrix4x4 invViewProj; - invViewProj.Inverse ( this->GetViewProjMtx ()); - this->mViewVolume.Init ( invViewProj ); -} diff --git a/src/moai-sim/MOAIGfxDeviceMtxCache.h b/src/moai-sim/MOAIGfxDeviceMtxCache.h deleted file mode 100644 index bdda0b1b2c..0000000000 --- a/src/moai-sim/MOAIGfxDeviceMtxCache.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAIGFXDEVICEMTXCACHE_H -#define MOAIGFXDEVICEMTXCACHE_H - -#include - -//================================================================// -// MOAIGfxDeviceMtxCache -//================================================================// -class MOAIGfxDeviceMtxCache : - public MOAIGfxDeviceStateCache { -public: - - enum { - VTX_STAGE_MODEL, - VTX_STAGE_WORLD, - VTX_STAGE_VIEW, - VTX_STAGE_PROJ, - }; - - enum { - UV_STAGE_MODEL, - UV_STAGE_TEXTURE, - }; - - enum { - VTX_WORLD_TRANSFORM, - VTX_VIEW_TRANSFORM, - VTX_PROJ_TRANSFORM, - TOTAL_VTX_TRANSFORMS, - }; - -protected: - - u32 mVertexMtxInput; - u32 mVertexMtxOutput; - ZLMatrix4x4 mVertexTransforms [ TOTAL_VTX_TRANSFORMS ]; - - bool mCpuVertexTransform; - ZLMatrix4x4 mCpuVertexTransformMtx; // composition of matrices to be applied via CPU - bool mCpuVertexTransformCache [ TOTAL_VTX_TRANSFORMS ]; - ZLMatrix4x4 mCpuVertexTransformCacheMtx [ TOTAL_VTX_TRANSFORMS ]; // composition of VIEW and PROJ matrices via CPU - - u32 mUVMtxInput; - u32 mUVMtxOutput; - ZLMatrix4x4 mUVTransform; - - bool mCpuUVTransform; - - //----------------------------------------------------------------// - void UpdateCpuVertexMtx (); - void UpdateUVMtx (); - -public: - - //----------------------------------------------------------------// - ZLMatrix4x4 GetNormToWndMtx () const; - ZLMatrix4x4 GetNormToWndMtx ( const ZLRect& wndRect ) const; - - void GetUVMtxMode ( u32& input, u32& output ) const; - const ZLMatrix4x4& GetUVTransform () const; - - void GetVertexMtxMode ( u32& input, u32& output ) const; - const ZLMatrix4x4& GetVertexTransform ( u32 id ) const; - - ZLMatrix4x4 GetViewProjMtx () const; - - ZLMatrix4x4 GetWorldToWndMtx () const; - ZLMatrix4x4 GetWorldToWndMtx ( const ZLRect& wndRect ) const; - - ZLMatrix4x4 GetWndToNormMtx () const; - ZLMatrix4x4 GetWndToNormMtx ( const ZLRect& wndRect ) const; - - ZLMatrix4x4 GetWndToWorldMtx () const; - ZLMatrix4x4 GetWndToWorldMtx ( const ZLRect& wndRect ) const; - - MOAIGfxDeviceMtxCache (); - ~MOAIGfxDeviceMtxCache (); - - void SetUVMtxMode ( u32 input, u32 output ); - void SetUVTransform (); - void SetUVTransform ( const ZLAffine3D& transform ); - void SetUVTransform ( const ZLMatrix4x4& transform ); - - void SetVertexMtxMode ( u32 input, u32 output ); - void SetVertexTransform ( u32 id ); - void SetVertexTransform ( u32 id, const ZLAffine3D& transform ); - void SetVertexTransform ( u32 id, const ZLMatrix4x4& transform ); - - void UpdateViewVolume (); -}; - -#endif diff --git a/src/moai-sim/MOAIGfxDeviceStateCache.cpp b/src/moai-sim/MOAIGfxDeviceStateCache.cpp deleted file mode 100644 index 22ad434d85..0000000000 --- a/src/moai-sim/MOAIGfxDeviceStateCache.cpp +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================// -// MOAIGfxDeviceStateCache -//================================================================// - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::BindFrameBuffer ( MOAIFrameBuffer* frameBuffer ) { - - frameBuffer = frameBuffer ? frameBuffer : this->GetDefaultFrameBuffer (); - - if ( this->mCurrentFrameBuffer != frameBuffer ) { - - this->OnGfxStateWillChange (); - - zglBindFramebuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, frameBuffer->mGLFrameBufferID ); - this->mCurrentFrameBuffer = frameBuffer; - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::BindIndexBuffer ( MOAIIndexBuffer* buffer ) { - - if ( this->mCurrentIdxBuffer != buffer ) { - - if ( this->mCurrentIdxBuffer ) { - this->mCurrentIdxBuffer->Unbind (); - } - - this->mCurrentIdxBuffer = buffer; - - if ( buffer ) { - buffer->Bind (); - } - } - else if ( this->mCurrentIdxBuffer && this->mCurrentIdxBuffer->NeedsFlush ()) { - - this->mCurrentIdxBuffer->Bind (); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::BindVertexArray ( MOAIVertexArray* vtxArray ) { - - if ( this->mCurrentVtxArray != vtxArray ) { - - if ( this->mCurrentVtxArray ) { - this->mCurrentVtxArray->Unbind (); - } - - this->BindVertexBuffer (); - this->mCurrentVtxArray = vtxArray; - - if ( vtxArray ) { - vtxArray->Bind (); - } - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::BindVertexBuffer ( MOAIVertexBuffer* buffer ) { - - if ( this->mCurrentVtxBuffer != buffer ) { - - this->OnGfxStateWillChange (); - - if ( this->mCurrentVtxBuffer ) { - this->mCurrentVtxBuffer->Unbind (); - } - - this->BindVertexFormat (); - this->mCurrentVtxBuffer = buffer; - - if ( buffer ) { - buffer->Bind (); - } - } - else if ( this->mCurrentVtxBuffer && this->mCurrentVtxBuffer->NeedsFlush ()) { - - this->mCurrentVtxBuffer->Bind (); - this->mCurrentVtxFormat = 0; - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::BindVertexFormat ( MOAIVertexFormat* format ) { - - if ( this->mCurrentVtxFormat != format ) { - - this->OnGfxStateWillChange (); - - if ( this->mCurrentVtxFormat ) { - this->mCurrentVtxFormat->Unbind (); - } - - this->mCurrentVtxFormat = format; - - if ( format ) { - - assert ( this->mCurrentVtxBuffer ); // must currently have a valid vertex buffer bound (to receive the vertex format) - - format->Bind ( this->mCurrentVtxBuffer->GetAddress ()); - } - } -} - -//----------------------------------------------------------------// -MOAIGfxDeviceStateCache::MOAIGfxDeviceStateCache () : - mCullFunc ( 0 ), - mDepthFunc ( 0 ), - mDepthMask ( true ), - mBlendEnabled ( 0 ), - mPenWidth ( 1.0f ), - mShaderProgram ( 0 ), - mActiveTextures ( 0 ), - mCurrentFrameBuffer ( 0 ), - mCurrentIdxBuffer ( 0 ), - mCurrentTexture ( 0 ), - mCurrentVtxArray ( 0 ), - mCurrentVtxBuffer ( 0 ), - mCurrentVtxFormat ( 0 ) { -} - -//----------------------------------------------------------------// -MOAIGfxDeviceStateCache::~MOAIGfxDeviceStateCache () { -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetBlendMode () { - - if ( this->mBlendEnabled ) { - - this->OnGfxStateWillChange (); - - zglDisable ( ZGL_PIPELINE_BLEND ); - this->mBlendEnabled = false; - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetBlendMode ( const MOAIBlendMode& blendMode ) { - - if ( !this->mBlendEnabled ) { - - this->OnGfxStateWillChange (); - - zglEnable ( ZGL_PIPELINE_BLEND ); - - this->mBlendMode = blendMode; - zglBlendMode ( this->mBlendMode.mEquation ); - zglBlendFunc ( this->mBlendMode.mSourceFactor, this->mBlendMode.mDestFactor ); - this->mBlendEnabled = true; - } - else if ( !this->mBlendMode.IsSame ( blendMode )) { - - this->OnGfxStateWillChange (); - - this->mBlendMode = blendMode; - zglBlendMode ( this->mBlendMode.mEquation ); - zglBlendFunc ( this->mBlendMode.mSourceFactor, this->mBlendMode.mDestFactor ); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetBlendMode ( int srcFactor, int dstFactor, int equation ) { - - MOAIBlendMode blendMode; - blendMode.SetBlend ( srcFactor, dstFactor ); - blendMode.SetBlendEquation( equation ); - - this->SetBlendMode ( blendMode ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetCullFunc () { - - this->SetCullFunc ( 0 ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetCullFunc ( int cullFunc ) { - - if ( this->mCullFunc != cullFunc ) { - - this->OnGfxStateWillChange (); - - this->mCullFunc = cullFunc; - - if ( cullFunc ) { - zglEnable ( ZGL_PIPELINE_CULL ); - zglCullFace ( this->mCullFunc ); - } - else { - zglDisable ( ZGL_PIPELINE_CULL ); - } - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetDepthFunc () { - - this->SetDepthFunc ( 0 ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetDepthFunc ( int depthFunc ) { - - if ( this->mDepthFunc != depthFunc ) { - - this->OnGfxStateWillChange (); - - this->mDepthFunc = depthFunc; - - if ( depthFunc ) { - zglEnable ( ZGL_PIPELINE_DEPTH ); - zglDepthFunc ( this->mDepthFunc ); - } - else { - zglDisable ( ZGL_PIPELINE_DEPTH ); - } - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetDepthMask ( bool depthMask ) { - - if ( this->mDepthMask != depthMask ) { - - this->OnGfxStateWillChange (); - - this->mDepthMask = depthMask; - zglDepthMask ( this->mDepthMask ); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetPenWidth ( float penWidth ) { - - if ( this->mPenWidth != penWidth ) { - this->OnGfxStateWillChange (); - this->mPenWidth = penWidth; - zglLineWidth ( penWidth ); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetScissorRect () { - - this->SetScissorRect ( this->mCurrentFrameBuffer->GetBufferRect ()); - zglDisable ( ZGL_PIPELINE_SCISSOR ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetScissorRect ( ZLRect rect ) { - - rect.Bless (); - this->mViewRect.Clip ( rect ); - - ZLRect& current = this->mScissorRect; - - if ( ( current.mXMin != rect.mXMin ) || - ( current.mYMin != rect.mYMin ) || - ( current.mXMax != rect.mXMax ) || - ( current.mYMax != rect.mYMax )) { - - this->OnGfxStateWillChange (); - - ZLRect deviceRect = this->mCurrentFrameBuffer->WndRectToDevice ( rect ); - - s32 x = ( s32 )deviceRect.mXMin; - s32 y = ( s32 )deviceRect.mYMin; - - u32 w = ( u32 )( deviceRect.Width () + 0.5f ); - u32 h = ( u32 )( deviceRect.Height () + 0.5f ); - - w = h == 0 ? 0 : w; - h = w == 0 ? 0 : h; - - zglScissor ( x, y, w, h ); - this->mScissorRect = rect; - - zglEnable ( ZGL_PIPELINE_SCISSOR ); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetShader ( MOAIShader* shader ) { - - if ( shader ) { - this->SetShader ( shader->GetProgram ()); - shader->BindUniforms (); - } - else { - this->SetShader (( MOAIShaderProgram* )0 ); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetShader ( u32 preset ) { - - MOAIShaderMgr::Get ().BindShader ( preset ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetShader ( MOAIShaderProgram* program ) { - - if ( this->mShaderProgram != program ) { - - this->OnGfxStateWillChange (); - this->mShaderProgram = program; - - if ( program ) { - program->Bind (); - } - else { - program->Unbind (); - } - } - this->mShaderDirty = true; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetTexture ( MOAITextureBase* textureSet ) { - - if ( this->mCurrentTexture != textureSet ) { - - this->OnGfxStateWillChange (); - this->mCurrentTexture = textureSet; - - u32 unitsEnabled = 0; - - if ( textureSet ) { - - unitsEnabled = textureSet->CountActiveUnits (); - - // bind of unbind textues depending on state of texture set - for ( u32 i = 0; i < unitsEnabled; ++i ) { - this->SetTexture ( i, textureSet->GetTextureForUnit ( i )); - } - } - - // unbind/disable any excess textures - for ( u32 i = unitsEnabled; i < this->mActiveTextures; ++i ) { - this->SetTexture ( i, 0 ); - } - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceStateCache::SetTexture ( u32 textureUnit, MOAISingleTexture* texture ) { - - MOAISingleTexture* currentTexture = this->mTextureUnits [ textureUnit ]; - - if ( currentTexture != texture ) { - - this->OnGfxStateWillChange (); - - zglActiveTexture ( textureUnit ); - - if ( currentTexture && ( !texture )) { - currentTexture->Unbind (); - } - - this->mTextureUnits [ textureUnit ] = texture; - - if ( texture ) { - if ( !texture->Bind ()) { - - MOAITexture* defaultTexture = this->GetDefaultTexture (); - if ( texture != defaultTexture ) { - this->SetTexture ( textureUnit, defaultTexture ); - } - } - } - } -} diff --git a/src/moai-sim/MOAIGfxDeviceStateCache.h b/src/moai-sim/MOAIGfxDeviceStateCache.h deleted file mode 100644 index d5ba4f350a..0000000000 --- a/src/moai-sim/MOAIGfxDeviceStateCache.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAIGFXDEVICESTATECACHE_H -#define MOAIGFXDEVICESTATECACHE_H - -#include -#include - - -class MOAICamera; -class MOAIFrameBuffer; -class MOAIGfxResource; -class MOAIIndexBuffer; -class MOAIMultiTexture; -class MOAIShader; -class MOAIShaderProgram; -class MOAITexture; -class MOAISingleTexture; -class MOAITextureBase; -class MOAIVertexArray; -class MOAIVertexBuffer; -class MOAIVertexFormat; -class MOAIViewport; - -//================================================================// -// MOAIGfxDeviceStateCache -//================================================================// -class MOAIGfxDeviceStateCache : - public MOAIGfxDeviceBase { -protected: - - int mCullFunc; - - int mDepthFunc; - bool mDepthMask; - - MOAIBlendMode mBlendMode; - bool mBlendEnabled; - - float mPenWidth; - - ZLRect mScissorRect; - MOAIShaderProgram* mShaderProgram; - - ZLLeanArray < MOAISingleTexture* > mTextureUnits; - u32 mActiveTextures; - - MOAIFrameBuffer* mCurrentFrameBuffer; - MOAIIndexBuffer* mCurrentIdxBuffer; - MOAITextureBase* mCurrentTexture; - MOAIVertexArray* mCurrentVtxArray; - MOAIVertexBuffer* mCurrentVtxBuffer; - MOAIVertexFormat* mCurrentVtxFormat; - - //----------------------------------------------------------------// - virtual MOAIFrameBuffer* GetDefaultFrameBuffer () = 0; - virtual MOAITexture* GetDefaultTexture () = 0; - void SetTexture ( u32 textureUnit, MOAISingleTexture* texture ); - -public: - - //----------------------------------------------------------------// - void BindFrameBuffer ( MOAIFrameBuffer* frameBuffer = 0 ); - void BindIndexBuffer ( MOAIIndexBuffer* buffer = 0 ); - void BindVertexArray ( MOAIVertexArray* vtxArray = 0 ); - void BindVertexBuffer ( MOAIVertexBuffer* buffer = 0 ); - void BindVertexFormat ( MOAIVertexFormat* format = 0 ); - - MOAIGfxDeviceStateCache (); - virtual ~MOAIGfxDeviceStateCache (); - - virtual void OnGfxStateWillChange () = 0; - - void SetBlendMode (); - void SetBlendMode ( const MOAIBlendMode& blendMode ); - void SetBlendMode ( int srcFactor, int dstFactor, int equation = ZGL_BLEND_MODE_ADD ); - - void SetCullFunc (); - void SetCullFunc ( int cullFunc ); - - void SetDepthFunc (); - void SetDepthFunc ( int depthFunc ); - void SetDepthMask ( bool depthMask ); - - void SetPenWidth ( float penWidth ); - - void SetScissorRect (); - void SetScissorRect ( ZLRect rect ); - - void SetShader ( MOAIShader* shader = 0 ); - void SetShader ( u32 preset ); - void SetShader ( MOAIShaderProgram* program = 0 ); - - void SetTexture ( MOAITextureBase* textureSet = 0 ); -}; - -#endif diff --git a/src/moai-sim/MOAIGfxDeviceVertexWriter.cpp b/src/moai-sim/MOAIGfxDeviceVertexWriter.cpp deleted file mode 100644 index 67b33dcc2f..0000000000 --- a/src/moai-sim/MOAIGfxDeviceVertexWriter.cpp +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================// -// MOAIGfxDeviceVertexWriter -//================================================================// - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::BeginPrim () { - - // TODO: this was commented out to deal with prims improperly batching in Vavius's - // spine implementation. this code did not handle indexed prims correctly. the - // fix was to introduce BeginPrimIndexed (). The TODO is to make sure that the - // original behavior is preserved, and to see if there's way to reconcile these - // ideas (to get back to one BeginPrim () to handle both cases). - -// if ( this->mPrimSize ) { -// -// u32 totalIndices = this->mIdxBuffer.GetLength () / INDEX_SIZE; -// u32 totalVertices = this->mVtxBuffer.GetLength() / this->mVertexSize; -// -// u32 maxVertices = MIN ( totalIndices, totalVertices ); -// -// this->mMaxPrims = ( u32 )( maxVertices / this->mPrimSize ); -// -// this->mPrimTopIdx = this->mIdxBuffer.GetCursor () + ( this->mPrimSize * INDEX_SIZE ); -// this->mPrimTopVtx = this->mVtxBuffer.GetCursor () + ( this->mPrimSize * this->mVertexSize ); -// } - - if ( this->mUseIdxBuffer ) { - this->FlushBufferedPrims (); - } - this->mUseIdxBuffer = false; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::BeginPrim ( u32 primType, u32 primSize ) { - - this->SetPrimType ( primType, primSize ); - this->BeginPrim (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::BeginPrimIndexed ( u32 primType, u32 vtxCount, u32 idxCount ) { - - if ( !this->mUseIdxBuffer || - ( this->mTotalIndices + idxCount > this->mMaxIndices ) || - ( this->mTotalVertices + vtxCount > this->mMaxVertices )) { - - this->FlushBufferedPrims (); - } - - this->SetPrimType ( primType ); - - this->mUseIdxBuffer = true; - this->mIndexBase = ( u16 )( this->mTotalVertices ); - - this->mTotalIndices += idxCount; - this->mTotalVertices += vtxCount; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::BindBufferedDrawing ( MOAIVertexFormat& format ) { - - this->mVertexFormat = &format; - this->mVertexSize = format.GetVertexSize (); - this->UpdateLimits (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::BindBufferedDrawing ( u32 preset ) { - - MOAIVertexFormat* format = MOAIVertexFormatMgr::Get ().GetFormat ( preset ); - - assert ( format ); - this->BindBufferedDrawing ( *format ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::EndPrim () { - - ++this->mPrimCount; - - if (( this->mPrimSize == 0 ) || ( this->mPrimCount >= this->mMaxPrims )) { - - // this forces a flush immediately - this->FlushBufferedPrims (); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::EndPrimIndexed () { - -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::FlushBufferedPrims () { - - if (( !this->mIsDrawing ) && this->mVertexFormat && this->mVertexSize ) { - - this->mIsDrawing = true; - - if ( this->mUseIdxBuffer ) { - - u32 count = ( u32 )( this->mIdxBuffer.GetCursor () / INDEX_SIZE ); - - if ( count > 0 ) { - - this->mVtxBuffer.ScheduleFlush (); - this->mIdxBuffer.ScheduleFlush (); - - this->BindVertexBuffer ( &this->mVtxBuffer ); - this->BindVertexFormat ( this->mVertexFormat ); - this->BindIndexBuffer ( &this->mIdxBuffer ); - - this->UpdateShaderGlobals (); - zglDrawElements ( this->mPrimType, count, ZGL_TYPE_UNSIGNED_SHORT, this->mIdxBuffer.GetAddress ()); - this->mDrawCount++; - } - } - else { - - u32 count = this->mPrimSize ? this->mPrimCount * this->mPrimSize : ( u32 )( this->mVtxBuffer.GetCursor () / this->mVertexSize ); - - if ( count > 0 ) { - - this->mVtxBuffer.ScheduleFlush (); - - this->BindVertexBuffer ( &this->mVtxBuffer ); - this->BindVertexFormat ( this->mVertexFormat ); - - this->UpdateShaderGlobals (); - zglDrawArrays ( this->mPrimType, 0, count ); - this->mDrawCount++; - } - } - - this->mIsDrawing = false; - - this->mVtxBuffer.Seek ( 0 ); - this->mIdxBuffer.Seek ( 0 ); - - this->mPrimCount = 0; - this->mTotalIndices = 0; - this->mTotalVertices = 0; - } -} - -//----------------------------------------------------------------// -MOAIGfxDeviceVertexWriter::MOAIGfxDeviceVertexWriter () : - mIsDrawing ( false ), - mFinalColor32 ( 0xffffffff ), - mVertexSize ( 0 ), - mMaxVertices ( 0 ), - mMaxIndices ( 0 ), - mMaxPrims ( 0 ), - mPrimCount ( 0 ), - mPrimSize ( 0 ), - mPrimType ( 0xffffffff ), - mTotalVertices ( 0 ), - mTotalIndices ( 0 ), - mVertexFormat ( 0 ) { - - this->mAmbientColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f ); - this->mFinalColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f ); - this->mPenColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f ); - - this->mVtxBuffer.Reserve ( DEFAULT_VERTEX_BUFFER_SIZE ); - this->mIdxBuffer.Reserve ( DEFAULT_INDEX_BUFFER_SIZE ); -} - -//----------------------------------------------------------------// -MOAIGfxDeviceVertexWriter::~MOAIGfxDeviceVertexWriter () { -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::OnGfxStateWillChange () { - - this->FlushBufferedPrims (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::SetAmbientColor ( u32 color ) { - - this->mAmbientColor.SetRGBA ( color ); - this->UpdateFinalColor (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::SetAmbientColor ( const ZLColorVec& colorVec ) { - - this->mAmbientColor = colorVec; - this->UpdateFinalColor (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::SetAmbientColor ( float r, float g, float b, float a ) { - - this->mAmbientColor.Set ( r, g, b, a ); - this->UpdateFinalColor (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::SetPenColor ( u32 color ) { - - this->mPenColor.SetRGBA ( color ); - this->UpdateFinalColor (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::SetPenColor ( const ZLColorVec& colorVec ) { - - this->mPenColor = colorVec; - this->UpdateFinalColor (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::SetPenColor ( float r, float g, float b, float a ) { - - this->mPenColor.Set ( r, g, b, a ); - this->UpdateFinalColor (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::SetPrimType ( u32 primType, u32 primSize ) { - - if ( !primSize ) { - - switch ( primType ) { - - case ZGL_PRIM_LINES: - primSize = 2; - break; - - case ZGL_PRIM_TRIANGLES: - primSize = 3; - break; - - case ZGL_PRIM_POINTS: - case ZGL_PRIM_LINE_LOOP: - case ZGL_PRIM_LINE_STRIP: - case ZGL_PRIM_TRIANGLE_FAN: - case ZGL_PRIM_TRIANGLE_STRIP: - default: - break; - } - } - - if (( this->mPrimType != primType ) || ( this->mPrimSize != primSize )) { - - this->FlushBufferedPrims (); - - this->mPrimType = primType; - this->mPrimSize = primSize; - this->UpdateLimits (); - } -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::TransformAndWriteQuad ( ZLVec4D* vtx, ZLVec2D* uv ) { - - if ( this->mCpuVertexTransform ) { - this->mCpuVertexTransformMtx.TransformQuad ( vtx ); - } - - if ( this->mCpuUVTransform ) { - this->mUVTransform.TransformQuad ( uv ); - } - -// u32 base = this->mVtxBuffer.GetCursor () / this->mVertexSize; - this->BeginPrimIndexed ( ZGL_PRIM_TRIANGLES, 4, 6 ); - - // left top - this->mVtxBuffer.WriteUnsafe ( vtx [ 0 ]); - this->mVtxBuffer.WriteUnsafe ( uv [ 0 ]); - this->mVtxBuffer.WriteUnsafe < u32 >( this->mFinalColor32 ); - - // right top - this->mVtxBuffer.WriteUnsafe ( vtx [ 1 ]); - this->mVtxBuffer.WriteUnsafe ( uv [ 1 ]); - this->mVtxBuffer.WriteUnsafe < u32 >( this->mFinalColor32 ); - - // right bottom - this->mVtxBuffer.WriteUnsafe ( vtx[ 2 ]); - this->mVtxBuffer.WriteUnsafe ( uv [ 2 ]); - this->mVtxBuffer.WriteUnsafe < u32 >( this->mFinalColor32 ); - - // left bottom - this->mVtxBuffer.WriteUnsafe ( vtx [ 3 ]); - this->mVtxBuffer.WriteUnsafe ( uv [ 3 ]); - this->mVtxBuffer.WriteUnsafe < u32 >( this->mFinalColor32 ); - - // indices - this->WriteIndex ( 0 ); // left top - this->WriteIndex ( 3 ); // left bottom - this->WriteIndex ( 2 ); // right bottom - - this->WriteIndex ( 0 ); // left top - this->WriteIndex ( 2 ); // right bottom - this->WriteIndex ( 1 ); // right top - - this->EndPrimIndexed (); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::UnbindBufferedDrawing () { - - this->FlushBufferedPrims (); - - this->BindVertexBuffer (); - this->BindIndexBuffer (); - - this->mVertexFormat = 0; - this->mVertexSize = 0; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::UpdateFinalColor () { - - this->mFinalColor.mR = this->mAmbientColor.mR * this->mPenColor.mR; - this->mFinalColor.mG = this->mAmbientColor.mG * this->mPenColor.mG; - this->mFinalColor.mB = this->mAmbientColor.mB * this->mPenColor.mB; - this->mFinalColor.mA = this->mAmbientColor.mA * this->mPenColor.mA; - - this->mFinalColor32 = this->mFinalColor.PackRGBA (); - - this->mShaderDirty = true; -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::UpdateLimits () { - - u32 primSize = this->mPrimSize ? this->mPrimSize : 1; - u32 vertexSize = this->mVertexSize ? this->mVertexSize : 1; - - this->mMaxIndices = this->mIdxBuffer.GetLength () / INDEX_SIZE; - this->mMaxVertices = this->mVtxBuffer.GetLength() / vertexSize; - - u32 maxElements = MIN ( this->mMaxIndices, this->mMaxVertices ); - this->mMaxPrims = ( u32 )( maxElements / primSize ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv ) { - - ZLVec4D vtxBuffer [ 4 ]; - - vtxBuffer [ 0 ].mX = vtx [ 0 ].mX; - vtxBuffer [ 0 ].mY = vtx [ 0 ].mY; - vtxBuffer [ 0 ].mZ = 0.0f; - vtxBuffer [ 0 ].mW = 1.0f; - - vtxBuffer [ 1 ].mX = vtx [ 1 ].mX; - vtxBuffer [ 1 ].mY = vtx [ 1 ].mY; - vtxBuffer [ 1 ].mZ = 0.0f; - vtxBuffer [ 1 ].mW = 1.0f; - - vtxBuffer [ 2 ].mX = vtx [ 2 ].mX; - vtxBuffer [ 2 ].mY = vtx [ 2 ].mY; - vtxBuffer [ 2 ].mZ = 0.0f; - vtxBuffer [ 2 ].mW = 1.0f; - - vtxBuffer [ 3 ].mX = vtx [ 3 ].mX; - vtxBuffer [ 3 ].mY = vtx [ 3 ].mY; - vtxBuffer [ 3 ].mZ = 0.0f; - vtxBuffer [ 3 ].mW = 1.0f; - - ZLVec2D uvBuffer [ 4 ]; - memcpy ( uvBuffer, uv, sizeof ( ZLVec2D ) * 4 ); - - this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff ) { - - ZLVec4D vtxBuffer [ 4 ]; - - vtxBuffer [ 0 ].mX = vtx [ 0 ].mX + xOff; - vtxBuffer [ 0 ].mY = vtx [ 0 ].mY + yOff; - vtxBuffer [ 0 ].mZ = zOff; - vtxBuffer [ 0 ].mW = 1.0f; - - vtxBuffer [ 1 ].mX = vtx [ 1 ].mX + xOff; - vtxBuffer [ 1 ].mY = vtx [ 1 ].mY + yOff; - vtxBuffer [ 1 ].mZ = zOff; - vtxBuffer [ 1 ].mW = 1.0f; - - vtxBuffer [ 2 ].mX = vtx [ 2 ].mX + xOff; - vtxBuffer [ 2 ].mY = vtx [ 2 ].mY + yOff; - vtxBuffer [ 2 ].mZ = zOff; - vtxBuffer [ 2 ].mW = 1.0f; - - vtxBuffer [ 3 ].mX = vtx [ 3 ].mX + xOff; - vtxBuffer [ 3 ].mY = vtx [ 3 ].mY + yOff; - vtxBuffer [ 3 ].mZ = zOff; - vtxBuffer [ 3 ].mW = 1.0f; - - ZLVec2D uvBuffer [ 4 ]; - memcpy ( uvBuffer, uv, sizeof ( ZLVec2D ) * 4 ); - - this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale ) { - - ZLVec4D vtxBuffer [ 4 ]; - - vtxBuffer [ 0 ].mX = ( vtx [ 0 ].mX * xScale ) + xOff; - vtxBuffer [ 0 ].mY = ( vtx [ 0 ].mY * yScale ) + yOff; - vtxBuffer [ 0 ].mZ = zOff; - vtxBuffer [ 0 ].mW = 1.0f; - - vtxBuffer [ 1 ].mX = ( vtx [ 1 ].mX * xScale ) + xOff; - vtxBuffer [ 1 ].mY = ( vtx [ 1 ].mY * yScale ) + yOff; - vtxBuffer [ 1 ].mZ = zOff; - vtxBuffer [ 1 ].mW = 1.0f; - - vtxBuffer [ 2 ].mX = ( vtx [ 2 ].mX * xScale ) + xOff; - vtxBuffer [ 2 ].mY = ( vtx [ 2 ].mY * yScale ) + yOff; - vtxBuffer [ 2 ].mZ = zOff; - vtxBuffer [ 2 ].mW = 1.0f; - - vtxBuffer [ 3 ].mX = ( vtx [ 3 ].mX * xScale ) + xOff; - vtxBuffer [ 3 ].mY = ( vtx [ 3 ].mY * yScale ) + yOff; - vtxBuffer [ 3 ].mZ = zOff; - vtxBuffer [ 3 ].mW = 1.0f; - - ZLVec2D uvBuffer [ 4 ]; - memcpy ( uvBuffer, uv, sizeof ( ZLVec2D ) * 4 ); - - this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); -} - -//----------------------------------------------------------------// -void MOAIGfxDeviceVertexWriter::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale, float uOff, float vOff, float uScale, float vScale ) { - - ZLVec4D vtxBuffer [ 4 ]; - - vtxBuffer [ 0 ].mX = ( vtx [ 0 ].mX * xScale ) + xOff; - vtxBuffer [ 0 ].mY = ( vtx [ 0 ].mY * yScale ) + yOff; - vtxBuffer [ 0 ].mZ = zOff; - vtxBuffer [ 0 ].mW = 1.0f; - - vtxBuffer [ 1 ].mX = ( vtx [ 1 ].mX * xScale ) + xOff; - vtxBuffer [ 1 ].mY = ( vtx [ 1 ].mY * yScale ) + yOff; - vtxBuffer [ 1 ].mZ = zOff; - vtxBuffer [ 1 ].mW = 1.0f; - - vtxBuffer [ 2 ].mX = ( vtx [ 2 ].mX * xScale ) + xOff; - vtxBuffer [ 2 ].mY = ( vtx [ 2 ].mY * yScale ) + yOff; - vtxBuffer [ 2 ].mZ = zOff; - vtxBuffer [ 2 ].mW = 1.0f; - - vtxBuffer [ 3 ].mX = ( vtx [ 3 ].mX * xScale ) + xOff; - vtxBuffer [ 3 ].mY = ( vtx [ 3 ].mY * yScale ) + yOff; - vtxBuffer [ 3 ].mZ = zOff; - vtxBuffer [ 3 ].mW = 1.0f; - - ZLVec2D uvBuffer [ 4 ]; - - uvBuffer [ 0 ].mX = ( uv [ 0 ].mX * uScale ) + uOff; - uvBuffer [ 0 ].mY = ( uv [ 0 ].mY * vScale ) + vOff; - - uvBuffer [ 1 ].mX = ( uv [ 1 ].mX * uScale ) + uOff; - uvBuffer [ 1 ].mY = ( uv [ 1 ].mY * vScale ) + vOff; - - uvBuffer [ 2 ].mX = ( uv [ 2 ].mX * uScale ) + uOff; - uvBuffer [ 2 ].mY = ( uv [ 2 ].mY * vScale ) + vOff; - - uvBuffer [ 3 ].mX = ( uv [ 3 ].mX * uScale ) + uOff; - uvBuffer [ 3 ].mY = ( uv [ 3 ].mY * vScale ) + vOff; - - this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); -} diff --git a/src/moai-sim/MOAIGfxDeviceVertexWriter.h b/src/moai-sim/MOAIGfxDeviceVertexWriter.h deleted file mode 100644 index ce4f499f18..0000000000 --- a/src/moai-sim/MOAIGfxDeviceVertexWriter.h +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAIGFXDEVICEVERTEXWRITER_H -#define MOAIGFXDEVICEVERTEXWRITER_H - -#include -#include -#include - -class MOAICamera; -class MOAIFrameBuffer; -class MOAIGfxResource; -class MOAIMultiTexture; -class MOAIShader; -class MOAIShaderProgram; -class MOAITexture; -class MOAISingleTexture; -class MOAIVertexFormat; -class MOAIViewport; - -//================================================================// -// MOAIGfxDeviceVertexWriter -//================================================================// -class MOAIGfxDeviceVertexWriter : - public MOAIGfxDeviceMtxCache { -protected: - - // Stock OpenGL ES 2.0 have no support for u32 index size in glDrawElements. - // iOS and many Androids (PowerVR, adreno) support it with GL_OES_element_index_uint extension. - // We can check extension availability, but using u16 index is fine for the current buffer size (~1000 vertices). - static const size_t INDEX_SIZE = 2; - - static const size_t DEFAULT_VERTEX_BUFFER_SIZE = 0x8000; - static const size_t DEFAULT_INDEX_BUFFER_SIZE = 0x1000; - - bool mIsDrawing; - bool mUseIdxBuffer; - - ZLColorVec mAmbientColor; - ZLColorVec mPenColor; - - ZLColorVec mFinalColor; - u32 mFinalColor32; - - MOAIVertexBuffer mVtxBuffer; - MOAIIndexBuffer mIdxBuffer; - - u32 mVertexSize; - - u32 mMaxVertices; - u32 mMaxIndices; - u32 mMaxPrims; - - u32 mPrimCount; - u32 mPrimSize; -// u32 mPrimTopIdx; -// u32 mPrimTopVtx; - u32 mPrimType; - - u32 mTotalVertices; - u32 mTotalIndices; - u16 mIndexBase; - - MOAIVertexFormat* mVertexFormat; - - //----------------------------------------------------------------// - void OnGfxStateWillChange (); - void TransformAndWriteQuad ( ZLVec4D* vtx, ZLVec2D* uv ); - void UpdateFinalColor (); - void UpdateLimits (); - -public: - - GET ( ZLColorVec, AmbientColor, mAmbientColor ) - GET ( ZLColorVec, FinalColor, mFinalColor ) - GET ( ZLColorVec, PenColor, mPenColor ) - - //----------------------------------------------------------------// - void BeginPrim (); - void BeginPrim ( u32 primType, u32 primSize = 0 ); - void BeginPrimIndexed ( u32 primType, u32 vtxCount, u32 idxCount ); - - void BindBufferedDrawing ( MOAIVertexFormat& format ); - void BindBufferedDrawing ( u32 preset ); - - void EndPrim (); - void EndPrimIndexed (); - - void FlushBufferedPrims (); - - MOAIGfxDeviceVertexWriter (); - ~MOAIGfxDeviceVertexWriter (); - void SetAmbientColor ( u32 color ); - void SetAmbientColor ( const ZLColorVec& colorVec ); - void SetAmbientColor ( float r, float g, float b, float a ); - - void SetPenColor ( u32 color ); - void SetPenColor ( const ZLColorVec& colorVec ); - void SetPenColor ( float r, float g, float b, float a ); - - void SetPrimType ( u32 primType, u32 primSize = 0 ); - - void UnbindBufferedDrawing (); - void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv ); - void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff ); - void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale ); - void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale, float uOff, float vOff, float uScale, float vScale ); - - //----------------------------------------------------------------// -// template < typename TYPE > -// inline void Write ( const TYPE& type ) { -// -// size_t top = this->mTop + sizeof ( TYPE ); -// if ( top < this->mSize ) { -// *( TYPE* )(( size_t )this->mBuffer + this->mTop ) = type; -// this->mTop = top; -// } -// } - - //----------------------------------------------------------------// - inline void WriteColor ( float r, float g, float b, float a ) { - UNUSED ( r ); - UNUSED ( g ); - UNUSED ( b ); - UNUSED ( a ); - } - - //----------------------------------------------------------------// - inline void WriteFinalColor4b () { - - this->mVtxBuffer.WriteUnsafe < u32 >( this->mFinalColor32 ); - } - - //----------------------------------------------------------------// - inline void WriteFinalColor4f () { - - this->mVtxBuffer.WriteUnsafe < ZLColorVec >( this->mFinalColor ); - } - - //----------------------------------------------------------------// - inline void WriteIndex ( u16 index ) { - - this->mIdxBuffer.WriteUnsafe < u16 >( this->mIndexBase + index ); - } - - //----------------------------------------------------------------// - inline void WriteUV ( float u, float v ) { - - ZLVec2D uv; - uv.mX = u; - uv.mY = v; - - if ( this->mCpuUVTransform ) { - this->mUVTransform.Transform ( uv ); - } - this->mVtxBuffer.WriteUnsafe < ZLVec2D >( uv ); - } - - //----------------------------------------------------------------// - inline void WriteUV ( ZLVec2D uv ) { - - if ( this->mCpuUVTransform ) { - this->mUVTransform.Transform ( uv ); - } - this->mVtxBuffer.WriteUnsafe < ZLVec2D >( uv ); - } - - //----------------------------------------------------------------// - inline void WriteVtx ( float x, float y ) { - - this->WriteVtx ( x, y, 0.0f, 1.0f ); - } - - //----------------------------------------------------------------// - inline void WriteVtx ( float x, float y, float z ) { - - this->WriteVtx ( x, y, z, 1.0f ); - } - - //----------------------------------------------------------------// - inline void WriteVtx ( float x, float y, float z, float w ) { - - ZLVec4D vtx; - vtx.mX = x; - vtx.mY = y; - vtx.mZ = z; - vtx.mW = w; - - if ( this->mCpuVertexTransform ) { - this->mCpuVertexTransformMtx.Transform ( vtx ); - } - this->mVtxBuffer.WriteUnsafe < ZLVec4D >( vtx ); - } - - //----------------------------------------------------------------// - inline void WriteVtx ( ZLVec2D vtx ) { - - this->WriteVtx ( vtx.mX, vtx.mY, 0.0f ); - } - - //----------------------------------------------------------------// - inline void WriteVtx ( ZLVec3D vtx ) { - - this->WriteVtx ( vtx.mX, vtx.mY, vtx.mZ ); - } - - //----------------------------------------------------------------// - inline void WriteVtxRaw ( float x, float y, float z, float w ) { - - ZLVec4D vtx; - vtx.mX = x; - vtx.mY = y; - vtx.mZ = z; - vtx.mW = w; - - this->mVtxBuffer.WriteUnsafe < ZLVec4D >( vtx ); - } -}; - -#endif diff --git a/src/moai-sim/MOAIGfxGlobalsCache.cpp b/src/moai-sim/MOAIGfxGlobalsCache.cpp new file mode 100644 index 0000000000..72de200183 --- /dev/null +++ b/src/moai-sim/MOAIGfxGlobalsCache.cpp @@ -0,0 +1,392 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include + +//================================================================// +// MOAIGfxGlobalsCache +//================================================================// + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::CheckGlobalsAndFlush () { + + bool needsFlush = ( this->mDirtyFlags & this->mShaderFlags ) != 0; + + // we only set these in the first place to trip the shader flags (if any); can clear these here + this->mDirtyFlags &= ~( BASE_ATTRS_MASK ); + + // flush if ya gotta + if ( needsFlush ) { + this->GfxStateWillChange (); + } +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetNormToWndMtx () { + + return this->GetNormToWndMtx ( this->GetViewRect ()); +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetNormToWndMtx ( const ZLRect& wndRect ) { + + float hWidth = wndRect.Width () * 0.5f; + float hHeight = wndRect.Height () * 0.5f; + + // Wnd + ZLMatrix4x4 normToWnd; + normToWnd.Scale ( hWidth, -hHeight, 1.0f ); + + ZLMatrix4x4 mtx; + mtx.Translate ( hWidth + wndRect.mXMin, hHeight + wndRect.mYMin, 0.0f ); + normToWnd.Append ( mtx ); + + return normToWnd; +} + +//----------------------------------------------------------------// +const ZLMatrix4x4& MOAIGfxGlobalsCache::GetMtx ( u32 transformID ) { + + switch ( transformID ) { + + case INVERSE_PROJ_MTX: + + if ( this->mDirtyFlags & INVERSE_PROJ_MTX_MASK ) { + + this->mVertexTransforms [ INVERSE_PROJ_MTX ].Inverse ( this->GetMtx ( PROJ_MTX )); + this->mDirtyFlags &= ~ID_TO_FLAG ( INVERSE_PROJ_MTX ); + } + return this->mVertexTransforms [ INVERSE_PROJ_MTX ]; + + case INVERSE_UV_MTX: + + if ( this->mDirtyFlags & INVERSE_UV_MTX_MASK ) { + + this->mVertexTransforms [ INVERSE_UV_MTX ].Inverse ( this->GetMtx ( UV_MTX )); + this->mDirtyFlags &= ~ID_TO_FLAG ( INVERSE_UV_MTX ); + } + return this->mVertexTransforms [ INVERSE_UV_MTX ]; + + case INVERSE_VIEW_MTX: + + if ( this->mDirtyFlags & INVERSE_VIEW_MTX_MASK ) { + + this->mVertexTransforms [ INVERSE_VIEW_MTX ].Inverse ( this->GetMtx ( VIEW_MTX )); + this->mDirtyFlags &= ~ID_TO_FLAG ( INVERSE_VIEW_MTX ); + } + return this->mVertexTransforms [ INVERSE_VIEW_MTX ]; + + case INVERSE_VIEW_PROJ_MTX: + + if ( this->mDirtyFlags & INVERSE_VIEW_PROJ_MTX_MASK ) { + + this->mVertexTransforms [ INVERSE_VIEW_PROJ_MTX ].Inverse ( this->GetMtx ( VIEW_PROJ_MTX )); + this->mDirtyFlags &= ~ID_TO_FLAG ( INVERSE_VIEW_PROJ_MTX ); + } + return this->mVertexTransforms [ INVERSE_VIEW_PROJ_MTX ]; + + case INVERSE_WORLD_MTX: + + if ( this->mDirtyFlags & INVERSE_WORLD_MTX_MASK ) { + + this->mVertexTransforms [ INVERSE_WORLD_MTX ].Inverse ( this->GetMtx ( WORLD_MTX )); + this->mDirtyFlags &= ~ID_TO_FLAG ( INVERSE_WORLD_MTX ); + } + return this->mVertexTransforms [ INVERSE_WORLD_MTX ]; + + case INVERSE_WORLD_VIEW_MTX: + + if ( this->mDirtyFlags & INVERSE_WORLD_VIEW_MTX_MASK ) { + + this->mVertexTransforms [ INVERSE_WORLD_VIEW_MTX ].Inverse ( this->GetMtx ( WORLD_VIEW_MTX )); + this->mDirtyFlags &= ~ID_TO_FLAG ( INVERSE_WORLD_VIEW_MTX ); + } + return this->mVertexTransforms [ INVERSE_WORLD_VIEW_MTX ]; + + case INVERSE_WORLD_VIEW_PROJ_MTX: + + if ( this->mDirtyFlags & INVERSE_WORLD_VIEW_PROJ_MTX_MASK ) { + + this->mVertexTransforms [ INVERSE_WORLD_VIEW_PROJ_MTX ].Inverse ( this->GetMtx ( WORLD_VIEW_PROJ_MTX )); + this->mDirtyFlags &= ~ID_TO_FLAG ( INVERSE_WORLD_VIEW_PROJ_MTX ); + } + return this->mVertexTransforms [ INVERSE_WORLD_VIEW_PROJ_MTX ]; + + case PROJ_MTX: + + return this->mVertexTransforms [ PROJ_MTX ]; + + case UV_MTX: + + return this->mVertexTransforms [ UV_MTX ]; + + case VIEW_MTX: + + return this->mVertexTransforms [ VIEW_MTX ]; + + case VIEW_PROJ_MTX: + + if ( this->mDirtyFlags & VIEW_PROJ_MTX_MASK ) { + + this->mVertexTransforms [ VIEW_PROJ_MTX ] = this->mVertexTransforms [ VIEW_MTX ]; + this->mVertexTransforms [ VIEW_PROJ_MTX ].Append ( this->mVertexTransforms [ PROJ_MTX ]); + + this->mDirtyFlags &= ~ID_TO_FLAG ( VIEW_PROJ_MTX ); + } + return this->mVertexTransforms [ VIEW_PROJ_MTX ]; + + case WORLD_MTX: + + return this->mVertexTransforms [ WORLD_MTX ]; + + case WORLD_VIEW_MTX: + + if ( this->mDirtyFlags & WORLD_VIEW_MTX_MASK ) { + + this->mVertexTransforms [ WORLD_VIEW_MTX ] = this->mVertexTransforms [ WORLD_MTX ]; + this->mVertexTransforms [ WORLD_VIEW_MTX ].Append ( this->mVertexTransforms [ VIEW_MTX ]); + + this->mDirtyFlags &= ~ID_TO_FLAG ( WORLD_VIEW_MTX ); + } + return this->mVertexTransforms [ WORLD_VIEW_MTX ]; + + case WORLD_VIEW_PROJ_MTX: + + if ( this->mDirtyFlags & WORLD_VIEW_PROJ_MTX_MASK ) { + + this->mVertexTransforms [ WORLD_VIEW_PROJ_MTX ] = this->mVertexTransforms [ WORLD_MTX ]; + this->mVertexTransforms [ WORLD_VIEW_PROJ_MTX ].Append ( this->GetMtx ( VIEW_PROJ_MTX )); + + this->mDirtyFlags &= ~ID_TO_FLAG ( WORLD_VIEW_PROJ_MTX); + } + return this->mVertexTransforms [ WORLD_VIEW_PROJ_MTX ]; + } + + assert ( false ); + return this->mVertexTransforms [ WORLD_MTX ]; +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetWorldToWndMtx () { + + return this->GetWorldToWndMtx ( this->GetViewRect ()); +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetWorldToWndMtx ( const ZLRect& wndRect ) { + + ZLMatrix4x4 worldToWnd = this->GetMtx ( VIEW_PROJ_MTX ); + worldToWnd.Append ( MOAIGfxGlobalsCache::GetNormToWndMtx ( wndRect )); + + return worldToWnd; +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetWndToNormMtx () { + + return this->GetWndToNormMtx ( this->GetViewRect ()); +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetWndToNormMtx ( const ZLRect& wndRect ) { + + float hWidth = wndRect.Width () * 0.5f; + float hHeight = wndRect.Height () * 0.5f; + + // Inv Wnd + ZLMatrix4x4 wndToNorm; + wndToNorm.Translate ( -hWidth - wndRect.mXMin, -hHeight - wndRect.mYMin, 0.0f ); + + ZLMatrix4x4 mtx; + mtx.Scale (( 1.0f / hWidth ), -( 1.0f / hHeight ), 1.0f ); + wndToNorm.Append ( mtx ); + + return wndToNorm; +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetWndToWorldMtx () { + + return this->GetWndToWorldMtx ( this->GetViewRect ()); +} + +//----------------------------------------------------------------// +ZLMatrix4x4 MOAIGfxGlobalsCache::GetWndToWorldMtx ( const ZLRect& wndRect ) { + + ZLMatrix4x4 wndToWorld = MOAIGfxGlobalsCache::GetWndToNormMtx ( wndRect ); + + // inv viewproj + ZLMatrix4x4 mtx = this->GetMtx ( VIEW_PROJ_MTX ); + mtx.Inverse (); + wndToWorld.Append ( mtx ); + + return wndToWorld; +} + +//----------------------------------------------------------------// +const ZLFrustum& MOAIGfxGlobalsCache::GetViewVolume () { + + if ( this->mDirtyFlags & VIEW_VOLUME_MASK ) { + this->mViewVolume.Init ( this->GetMtx ( INVERSE_VIEW_PROJ_MTX )); + this->mDirtyFlags &= ~VIEW_VOLUME_MASK; + } + return this->mViewVolume; +} + +//----------------------------------------------------------------// +MOAIGfxGlobalsCache::MOAIGfxGlobalsCache () : + mDirtyFlags ( 0 ), + mShaderFlags ( 0 ), + mFinalColor32 ( 0xffffffff ), + mBufferWidth ( 0 ), + mBufferHeight ( 0 ) { + + for ( u32 i = 0; i < TOTAL_MATRICES; ++i ) { + this->mVertexTransforms [ i ].Ident (); + this->mDirtyFlags = 0; + } + + this->mAmbientColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f ); + this->mFinalColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f ); + this->mPenColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f ); +} + +//----------------------------------------------------------------// +MOAIGfxGlobalsCache::~MOAIGfxGlobalsCache () { +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetAmbientColor ( u32 color ) { + + this->mAmbientColor.SetRGBA ( color ); + this->UpdateFinalColor (); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetAmbientColor ( const ZLColorVec& colorVec ) { + + this->mAmbientColor = colorVec; + this->UpdateFinalColor (); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetAmbientColor ( float r, float g, float b, float a ) { + + this->mAmbientColor.Set ( r, g, b, a ); + this->UpdateFinalColor (); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetMtx ( u32 transformID ) { + + ZLMatrix4x4 mtx; + mtx.Ident (); + this->SetMtx ( transformID, mtx ); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetMtx ( u32 transformID, const ZLAffine3D& transform ) { + + ZLMatrix4x4 mtx; + mtx.Init ( transform ); + this->SetMtx ( transformID, mtx ); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetMtx ( u32 transformID, const ZLMatrix4x4& mtx ) { + + u32 dirtyMask = 0; + + switch ( transformID ) { + + case PROJ_MTX: + + dirtyMask = PROJ_MTX_DIRTY_MASK; + break; + + case UV_MTX: + + dirtyMask = UV_MTX_DIRTY_MASK; + break; + + case VIEW_MTX: + + dirtyMask = VIEW_MTX_DIRTY_MASK; + break; + + case WORLD_MTX: + + dirtyMask = WORLD_MTX_DIRTY_MASK; + break; + + case INVERSE_PROJ_MTX: + case INVERSE_UV_MTX: + case INVERSE_VIEW_MTX: + case INVERSE_VIEW_PROJ_MTX: + case INVERSE_WORLD_MTX: + case INVERSE_WORLD_VIEW_MTX: + case INVERSE_WORLD_VIEW_PROJ_MTX: + case VIEW_PROJ_MTX: + case WORLD_VIEW_MTX: + case WORLD_VIEW_PROJ_MTX: + + assert ( false ); // read only + return; + } + + if ( !this->mVertexTransforms [ transformID ].IsSame ( mtx )) { + this->mVertexTransforms [ transformID ] = mtx; + this->mDirtyFlags |= dirtyMask; + } + + this->CheckGlobalsAndFlush (); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetPenColor ( u32 color ) { + + this->mPenColor.SetRGBA ( color ); + this->UpdateFinalColor (); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetPenColor ( const ZLColorVec& colorVec ) { + + this->mPenColor = colorVec; + this->UpdateFinalColor (); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::SetPenColor ( float r, float g, float b, float a ) { + + this->mPenColor.Set ( r, g, b, a ); + this->UpdateFinalColor (); +} + +//----------------------------------------------------------------// +void MOAIGfxGlobalsCache::UpdateFinalColor () { + + this->mFinalColor.mR = this->mAmbientColor.mR * this->mPenColor.mR; + this->mFinalColor.mG = this->mAmbientColor.mG * this->mPenColor.mG; + this->mFinalColor.mB = this->mAmbientColor.mB * this->mPenColor.mB; + this->mFinalColor.mA = this->mAmbientColor.mA * this->mPenColor.mA; + + u32 finalColor = this->mFinalColor.PackRGBA (); + + if ( this->mFinalColor32 != finalColor ) { + + this->mFinalColor32 = finalColor; + this->mDirtyFlags |= PEN_COLOR_DIRTY_MASK; + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + gfxMgr.mVertexCache.mVertexColor = this->mFinalColor; + gfxMgr.mVertexCache.mVertexColor32 = this->mFinalColor32; + + this->CheckGlobalsAndFlush (); + } +} diff --git a/src/moai-sim/MOAIGfxGlobalsCache.h b/src/moai-sim/MOAIGfxGlobalsCache.h new file mode 100644 index 0000000000..44c4475414 --- /dev/null +++ b/src/moai-sim/MOAIGfxGlobalsCache.h @@ -0,0 +1,179 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIGFXSHADERGLOBALSCACHE_H +#define MOAIGFXSHADERGLOBALSCACHE_H + +#include + +class MOAIShaderUniformBuffer; + +#define ID_TO_FLAG(id) ( 1 << id ) + +//================================================================// +// MOAIGfxGlobalsCache +//================================================================// +class MOAIGfxGlobalsCache : + public MOAIGfxStateCache { +public: + + // GLOBAL IDs + enum { + + // NOTE: GROUP ALL MATRICES TOGETHER + INVERSE_PROJ_MTX, + INVERSE_UV_MTX, + INVERSE_VIEW_MTX, + INVERSE_VIEW_PROJ_MTX, + INVERSE_WORLD_MTX, + INVERSE_WORLD_VIEW_MTX, + INVERSE_WORLD_VIEW_PROJ_MTX, + PROJ_MTX, + UV_MTX, + VIEW_MTX, + VIEW_PROJ_MTX, + WORLD_MTX, + WORLD_VIEW_MTX, + WORLD_VIEW_PROJ_MTX, // NOTE: WHATEVER FOLLOWS THIS *MUST* BE ALIASED AS TOTAL_MATRICES (BELOW) + + PEN_COLOR, + VIEW_VOLUME, + + VIEW_HALF_HEIGHT, + VIEW_HALF_WIDTH, + VIEW_HEIGHT, + VIEW_WIDTH, + + TOTAL_GLOBALS, + }; + + static const u32 TOTAL_MATRICES = PEN_COLOR; + + // NOTE: we don't need a dirty mask for the view dimensions; the state cache will flush if the view rect changes + + enum { + + INVERSE_PROJ_MTX_MASK = ID_TO_FLAG ( INVERSE_PROJ_MTX ), + INVERSE_UV_MTX_MASK = ID_TO_FLAG ( INVERSE_UV_MTX ), + INVERSE_VIEW_MTX_MASK = ID_TO_FLAG ( INVERSE_VIEW_MTX ), + INVERSE_VIEW_PROJ_MTX_MASK = ID_TO_FLAG ( INVERSE_VIEW_PROJ_MTX ) | ID_TO_FLAG ( INVERSE_PROJ_MTX ) | ID_TO_FLAG ( INVERSE_VIEW_MTX ), + INVERSE_WORLD_MTX_MASK = ID_TO_FLAG ( INVERSE_WORLD_MTX ), + INVERSE_WORLD_VIEW_MTX_MASK = ID_TO_FLAG ( INVERSE_WORLD_VIEW_MTX ) | ID_TO_FLAG ( INVERSE_VIEW_MTX ), + INVERSE_WORLD_VIEW_PROJ_MTX_MASK = ID_TO_FLAG ( INVERSE_WORLD_VIEW_PROJ_MTX ) | ID_TO_FLAG ( INVERSE_PROJ_MTX ) | ID_TO_FLAG ( INVERSE_VIEW_MTX ), + VIEW_PROJ_MTX_MASK = ID_TO_FLAG ( VIEW_PROJ_MTX ), + VIEW_VOLUME_MASK = ID_TO_FLAG ( VIEW_VOLUME ) | ID_TO_FLAG ( INVERSE_PROJ_MTX ) | ID_TO_FLAG ( INVERSE_VIEW_MTX ), + WORLD_VIEW_MTX_MASK = ID_TO_FLAG ( WORLD_VIEW_MTX ), + WORLD_VIEW_PROJ_MTX_MASK = ID_TO_FLAG ( WORLD_VIEW_PROJ_MTX ), + + BASE_ATTRS_MASK = ID_TO_FLAG ( PROJ_MTX ) + | ID_TO_FLAG ( UV_MTX ) + | ID_TO_FLAG ( VIEW_MTX ) + | ID_TO_FLAG ( WORLD_MTX ) + | ID_TO_FLAG ( PEN_COLOR ), + + PEN_COLOR_DIRTY_MASK = ID_TO_FLAG ( PEN_COLOR ), + + PROJ_MTX_DIRTY_MASK = ID_TO_FLAG ( PROJ_MTX ) + | ID_TO_FLAG ( INVERSE_PROJ_MTX ) + | ID_TO_FLAG ( INVERSE_VIEW_PROJ_MTX ) + | ID_TO_FLAG ( INVERSE_WORLD_VIEW_PROJ_MTX ) + | ID_TO_FLAG ( VIEW_PROJ_MTX ) + | ID_TO_FLAG ( WORLD_VIEW_PROJ_MTX ) + | ID_TO_FLAG ( VIEW_VOLUME ), + + UV_MTX_DIRTY_MASK = ID_TO_FLAG ( UV_MTX ) + | ID_TO_FLAG ( INVERSE_UV_MTX ), + + VIEW_MTX_DIRTY_MASK = ID_TO_FLAG ( VIEW_MTX ) + | ID_TO_FLAG ( INVERSE_VIEW_MTX ) + | ID_TO_FLAG ( INVERSE_VIEW_PROJ_MTX ) + | ID_TO_FLAG ( INVERSE_WORLD_VIEW_MTX ) + | ID_TO_FLAG ( INVERSE_WORLD_VIEW_PROJ_MTX ) + | ID_TO_FLAG ( VIEW_PROJ_MTX ) + | ID_TO_FLAG ( WORLD_VIEW_MTX ) + | ID_TO_FLAG ( WORLD_VIEW_PROJ_MTX ) + | ID_TO_FLAG ( VIEW_VOLUME ), + + WORLD_MTX_DIRTY_MASK = ID_TO_FLAG ( WORLD_MTX ) + | ID_TO_FLAG ( INVERSE_WORLD_MTX ) + | ID_TO_FLAG ( INVERSE_WORLD_VIEW_MTX ) + | ID_TO_FLAG ( INVERSE_WORLD_VIEW_PROJ_MTX ) + | ID_TO_FLAG ( WORLD_VIEW_MTX ) + | ID_TO_FLAG ( WORLD_VIEW_PROJ_MTX ), + }; + +protected: + + ZLMatrix4x4 mVertexTransforms [ TOTAL_MATRICES ]; // composition of VIEW and PROJ matrices via CPU + u32 mDirtyFlags; + u32 mShaderFlags; + + ZLFrustum mViewVolume; + + ZLColorVec mAmbientColor; + ZLColorVec mPenColor; + ZLColorVec mFinalColor; + u32 mFinalColor32; + + u32 mBufferWidth; + u32 mBufferHeight; + + //----------------------------------------------------------------// + void CheckGlobalsAndFlush (); + void UpdateFinalColor (); + +public: + + GET ( const ZLColorVec&, AmbientColor, mAmbientColor ) + GET ( const ZLColorVec&, PenColor, mPenColor ) + GET ( const ZLColorVec&, FinalColor, mFinalColor ) + GET ( u32, FinalColor32, mFinalColor32 ) + + GET_SET ( u32, ShaderFlags, mShaderFlags ) + + //----------------------------------------------------------------// + + ZLMatrix4x4 GetNormToWndMtx (); + ZLMatrix4x4 GetNormToWndMtx ( const ZLRect& wndRect ); + + const ZLMatrix4x4& GetMtx ( u32 transformID ); + + void GetVertexMtxMode ( u32& input, u32& output ); + const ZLMatrix4x4& GetVertexTransform ( u32 id ); + + ZLMatrix4x4 GetWorldToWndMtx (); + ZLMatrix4x4 GetWorldToWndMtx ( const ZLRect& wndRect ); + + ZLMatrix4x4 GetWndToNormMtx (); + ZLMatrix4x4 GetWndToNormMtx ( const ZLRect& wndRect ); + + ZLMatrix4x4 GetWndToWorldMtx (); + ZLMatrix4x4 GetWndToWorldMtx ( const ZLRect& wndRect ); + + const ZLFrustum& GetViewVolume (); + + MOAIGfxGlobalsCache (); + ~MOAIGfxGlobalsCache (); + + void SetAmbientColor ( u32 color ); + void SetAmbientColor ( const ZLColorVec& colorVec ); + void SetAmbientColor ( float r, float g, float b, float a ); + + void SetBufferSize ( u32 width, u32 height ); + + void SetMtx ( u32 transformID ); + void SetMtx ( u32 transformID, const ZLAffine3D& transform ); + void SetMtx ( u32 transformID, const ZLMatrix4x4& mtx ); + + void SetPenColor ( u32 color ); + void SetPenColor ( const ZLColorVec& colorVec ); + void SetPenColor ( float r, float g, float b, float a ); + + //----------------------------------------------------------------// + static inline u32 GetAttrFlagForID ( u32 globalID ) { + + return globalID < TOTAL_GLOBALS ? 1 << globalID : 0; + } +}; + +#endif diff --git a/src/moai-sim/MOAIGfxMgr.cpp b/src/moai-sim/MOAIGfxMgr.cpp new file mode 100644 index 0000000000..d064f680da --- /dev/null +++ b/src/moai-sim/MOAIGfxMgr.cpp @@ -0,0 +1,388 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================// +// local +//================================================================// + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGfxMgr::_enablePipelineLogging ( lua_State* L ) { + MOAI_LUA_SETUP_SINGLE ( MOAIGfxMgr, "" ) + + MOAIGfxMgr::Get ().mPipelineMgr.EnablePipelineLogging ( state.GetValue < bool >( 1, false )); + + ZLFileSys::DeleteDirectory ( GFX_PIPELINE_LOGGING_FOLDER, true, true ); + ZLFileSys::AffirmPath ( GFX_PIPELINE_LOGGING_FOLDER ); + + return 0; +} + +//----------------------------------------------------------------// +/** @lua getFrameBuffer + @text Returns the frame buffer associated with the device. + + @out MOAIFrameBuffer frameBuffer +*/ +int MOAIGfxMgr::_getFrameBuffer ( lua_State* L ) { + + MOAILuaState state ( L ); + state.Push ( MOAIGfxMgr::Get ().mGfxState.GetDefaultFrameBuffer ()); + + return 1; +} + +//----------------------------------------------------------------// +/** @lua getMaxTextureSize + @text Returns the maximum texture size supported by device + + @out number maxTextureSize +*/ +int MOAIGfxMgr::_getMaxTextureSize ( lua_State* L ) { + + MOAILuaState state ( L ); + state.Push ( MOAIGfxMgr::Get ().mMaxTextureSize ); + + return 1; +} + +//----------------------------------------------------------------// +/** @lua getMaxTextureUnits + @text Returns the total number of texture units available on the device. + + @out number maxTextureUnits +*/ +int MOAIGfxMgr::_getMaxTextureUnits ( lua_State* L ) { + + lua_pushnumber ( L, ( double )MOAIGfxMgr::Get ().mGfxState.CountTextureUnits ()); + + return 1; +} + +//----------------------------------------------------------------// +/** @lua getViewSize + @text Returns the width and height of the view + + @out number width + @out number height +*/ +int MOAIGfxMgr::_getViewSize ( lua_State* L ) { + + MOAIFrameBuffer* frameBuffer = MOAIGfxMgr::Get ().mGfxState.GetCurrentFrameBuffer (); + + lua_pushnumber ( L, frameBuffer->GetBufferWidth ()); + lua_pushnumber ( L, frameBuffer->GetBufferHeight ()); + + return 2; +} + +//----------------------------------------------------------------// +/** @lua purgeResources + @text Purges all resources older that a given age (in render cycles). + If age is 0 then all resources are purged. + + @opt number age Default value is 0. + @out nil +*/ +int MOAIGfxMgr::_purgeResources ( lua_State* L ) { + MOAILuaState state ( L ); + + u32 age = state.GetValue < u32 >( 1, 0 ); + + MOAIGfxMgr::Get ().mResourceMgr.PurgeResources ( age ); + + return 0; +} + +//----------------------------------------------------------------// +/** @lua renewResources + @text Renews all resources. + + @out nil +*/ +int MOAIGfxMgr::_renewResources ( lua_State* L ) { + MOAILuaState state ( L ); + + MOAIGfxMgr::Get ().mResourceMgr.RenewResources (); + + return 0; +} + +//----------------------------------------------------------------// +/** @lua setDefaultTexture + @text Specify a fallback texture to use when textures are + unavailable (pending load, missing or in error state). + + @in MOAITexture texture + @out MOAITexture texture Texture that was passed in or created. +*/ +int MOAIGfxMgr::_setDefaultTexture ( lua_State* L ) { + + MOAILuaState state ( L ); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + MOAITexture* texture = state.GetLuaObject < MOAITexture >( 1, false ); + + if ( !texture ) { + texture = new MOAITexture (); + if ( !texture->Init ( state, 1 )) { + // TODO: report error + delete texture; + texture = 0; + } + } + + gfxMgr.mGfxState.SetDefaultTexture ( gfxMgr, texture ); + + if ( texture ) { + texture->PushLuaUserdata ( state ); + return 1; + } + return 0; +} + +//----------------------------------------------------------------// +/** @lua setPenColor + + @in number r + @in number g + @in number b + @opt number a Default value is 1. + @out nil +*/ +int MOAIGfxMgr::_setPenColor ( lua_State* L ) { + + MOAILuaState state ( L ); + + float r = state.GetValue < float >( 1, 1.0f ); + float g = state.GetValue < float >( 2, 1.0f ); + float b = state.GetValue < float >( 3, 1.0f ); + float a = state.GetValue < float >( 4, 1.0f ); + + MOAIGfxMgr::Get ().mGfxState.SetPenColor ( r, g, b, a ); + return 0; +} + +//----------------------------------------------------------------// +/** @lua setPenWidth + + @in number width + @out nil +*/ +int MOAIGfxMgr::_setPenWidth ( lua_State* L ) { + + MOAILuaState state ( L ); + + float width = state.GetValue < float >( 1, 1.0f ); + MOAIGfxMgr::Get ().mGfxState.SetPenWidth ( width ); + return 0; +} + +//================================================================// +// MOAIGfxMgr +//================================================================// + +//----------------------------------------------------------------// +void MOAIGfxMgr::ClearErrors () { + + #ifndef MOAI_OS_NACL + if ( this->mHasContext ) { + while ( ZLGfxDevice::GetError () != ZGL_ERROR_NONE ); + } + #endif +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::ClearSurface ( u32 clearFlags ) { + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + if ( clearFlags ) { + if (( clearFlags & ZGL_CLEAR_DEPTH_BUFFER_BIT ) && !this->mGfxState.GetDepthMask ()) { + gfx.DepthMask ( true ); + gfx.Clear ( clearFlags ); + gfx.DepthMask ( false ); + } + else { + gfx.Clear ( clearFlags ); + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::DetectContext () { + + this->mHasContext = true; + + ZLGfxDevice::Begin (); + + ZLGfxDevice::Initialize (); + + u32 maxTextureUnits = ZLGfxDevice::GetCap ( ZGL_CAPS_MAX_TEXTURE_UNITS ); + this->mGfxState.InitTextureUnits ( maxTextureUnits ); + + this->mMaxTextureSize = ZLGfxDevice::GetCap ( ZGL_CAPS_MAX_TEXTURE_SIZE ); + + // renew resources in immediate mode + this->mPipelineMgr.SelectDrawingAPI (); + + this->mGfxState.GetDefaultFrameBuffer ()->DetectGLFrameBufferID (); + + MOAIShaderMgr::Get ().AffirmAll (); + + mResourceMgr.RenewResources (); + + ZLGfxDevice::End (); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::DetectFramebuffer () { + + ZLGfxDevice::Begin (); + + this->mGfxState.GetDefaultFrameBuffer ()->DetectGLFrameBufferID (); + + ZLGfxDevice::End (); +} + +//----------------------------------------------------------------// +bool MOAIGfxMgr::IsOpaque () { + + assert ( this->mGfxState.GetDefaultFrameBuffer ()); + return this->mGfxState.GetDefaultFrameBuffer ()->IsOpaque (); +} + +//----------------------------------------------------------------// +u32 MOAIGfxMgr::LogErrors () { + + u32 count = 0; + #ifndef MOAI_OS_NACL + if ( this->mHasContext ) { + for ( u32 error = ZLGfxDevice::GetError (); error != ZGL_ERROR_NONE; error = ZLGfxDevice::GetError (), ++count ) { + MOAILogF ( 0, ZLLog::LOG_ERROR, MOAILogMessages::MOAIGfxDevice_OpenGLError_S, ZLGfxDevice::GetErrorString ( error )); + } + } + #endif + return count; +} + +//----------------------------------------------------------------// +MOAIGfxMgr::MOAIGfxMgr () : + mHasContext ( false ), + mIsFramebufferSupported ( 0 ), + #if defined ( MOAI_OS_NACL ) || defined ( MOAI_OS_IPHONE ) || defined ( MOAI_OS_ANDROID ) || defined ( EMSCRIPTEN ) + mIsOpenGLES ( true ), + #else + mIsOpenGLES ( false ), + #endif + mMajorVersion ( 0 ), + mMinorVersion ( 0 ), + mTextureMemoryUsage ( 0 ), + mMaxTextureSize ( 0 ) { + + RTTI_BEGIN + RTTI_SINGLE ( MOAIGfxStateCache ) + RTTI_SINGLE ( MOAIGlobalEventSource ) + RTTI_END + + this->mGfxState.SetDefaultFrameBuffer ( *this, new MOAIFrameBuffer ()); +} + +//----------------------------------------------------------------// +MOAIGfxMgr::~MOAIGfxMgr () { + + this->mGfxState.SetDefaultFrameBuffer ( *this, 0 ); + this->mGfxState.SetDefaultFrameBuffer ( *this, 0 ); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::OnGlobalsFinalize () { + + this->mGfxState.SetDefaultFrameBuffer ( *this, 0 ); + this->mGfxState.SetDefaultTexture ( *this, 0 ); + + mResourceMgr.ProcessDeleters (); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::OnGlobalsInitialize () { + + this->mVertexCache.InitBuffers (); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::RegisterLuaClass ( MOAILuaState& state ) { + + state.SetField ( -1, "EVENT_RESIZE", ( u32 )EVENT_RESIZE ); + + state.SetField ( -1, "DRAWING_PIPELINE", ( u32 )MOAIGfxPipelineClerk::DRAWING_PIPELINE ); + state.SetField ( -1, "LOADING_PIPELINE", ( u32 )MOAIGfxPipelineClerk::LOADING_PIPELINE ); + + luaL_Reg regTable [] = { + { "enablePipelineLogging", _enablePipelineLogging }, + { "getFrameBuffer", _getFrameBuffer }, + { "getListener", &MOAIGlobalEventSource::_getListener < MOAIGfxMgr > }, + { "getMaxTextureSize", _getMaxTextureSize }, + { "getMaxTextureUnits", _getMaxTextureUnits }, + { "getViewSize", _getViewSize }, + { "purgeResources", _purgeResources }, + { "renewResources", _renewResources }, + { "setDefaultTexture", _setDefaultTexture }, + { "setListener", &MOAIGlobalEventSource::_setListener < MOAIGfxMgr > }, + { "setPenColor", _setPenColor }, + { "setPenWidth", _setPenWidth }, + { NULL, NULL } + }; + + luaL_register( state, 0, regTable ); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::ReportTextureAlloc ( cc8* name, size_t size ) { + + this->mTextureMemoryUsage += size; + float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f; + MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "+", size, mb, name ); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::ReportTextureFree ( cc8* name, size_t size ) { + + this->mTextureMemoryUsage -= size; + float mb = ( float )this->mTextureMemoryUsage / 1024.0f / 1024.0f; + MOAILogF ( 0, ZLLog::LOG_STATUS, MOAILogMessages::MOAITexture_MemoryUse_SDFS, "-", size, mb, name ); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::ResetDrawCount () { + //this->mDrawCount = 0; +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::SetBufferScale ( float scale ) { + + this->mGfxState.GetDefaultFrameBuffer ()->SetBufferScale ( scale ); +} + +//----------------------------------------------------------------// +void MOAIGfxMgr::SetBufferSize ( u32 width, u32 height ) { + + this->mGfxState.GetDefaultFrameBuffer ()->SetBufferSize ( width, height ); +} diff --git a/src/moai-sim/MOAIGfxMgr.h b/src/moai-sim/MOAIGfxMgr.h new file mode 100644 index 0000000000..3dcb6acdf0 --- /dev/null +++ b/src/moai-sim/MOAIGfxMgr.h @@ -0,0 +1,126 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIGFXMGR_H +#define MOAIGFXMGR_H + +#include +#include +#include +#include +#include +#include +#include +#include + +class MOAICamera; +class MOAIFrameBuffer; +class MOAIGfxResource; +class MOAIMultiTexture; +class MOAIShader; +class MOAIShaderProgram; +class MOAITexture; +class MOAISingleTexture; +class MOAIVertexFormat; +class MOAIViewport; + +//================================================================// +// MOAIGfxMgr +//================================================================// +/** @lua MOAIGfxMgr + @text Interface to the graphics singleton. + + @const EVENT_RESIZE +*/ +class MOAIGfxMgr : + public MOAIGlobalClass < MOAIGfxMgr, MOAIGlobalEventSource > { +public: + + enum { + EVENT_RESIZE, + TOTAL_EVENTS, + }; + +private: + + bool mHasContext; + + bool mIsFramebufferSupported; + bool mIsOpenGLES; + + u32 mMajorVersion; + u32 mMinorVersion; + + size_t mTextureMemoryUsage; + u32 mMaxTextureSize; + + //----------------------------------------------------------------// + static int _enablePipelineLogging ( lua_State* L ); + static int _getFrameBuffer ( lua_State* L ); + static int _getMaxTextureSize ( lua_State* L ); + static int _getMaxTextureUnits ( lua_State* L ); + static int _getViewSize ( lua_State* L ); + static int _purgeResources ( lua_State* L ); + static int _renewResources ( lua_State* L ); + static int _setDefaultTexture ( lua_State* L ); + static int _setPenColor ( lua_State* L ); + static int _setPenWidth ( lua_State* L ); + + //----------------------------------------------------------------// + void OnGlobalsFinalize (); + void OnGlobalsInitialize (); + +public: + + friend class MOAIGfxResource; + friend class MOAIShaderProgram; + friend class MOAISingleTexture; + + DECL_LUA_SINGLETON ( MOAIGfxMgr ) + + GET ( size_t, TextureMemoryUsage, mTextureMemoryUsage ) + GET ( u32, MaxTextureSize, mMaxTextureSize ) + GET ( bool, HasContext, mHasContext ) + + GET_BOOL ( IsOpenGLES, mIsOpenGLES ) + GET_BOOL ( IsFramebufferSupported, mIsFramebufferSupported ) + + MOAIGfxResourceClerk mResourceMgr; + MOAIGfxGlobalsCache mGfxState; + MOAIGfxVertexCache mVertexCache; + MOAIGfxPipelineClerk mPipelineMgr; + + //----------------------------------------------------------------// + + void ClearErrors (); + void ClearSurface ( u32 clearFlags ); // takes zgl clear flags + void DetectContext (); + void DetectFramebuffer (); + + bool IsOpaque (); + u32 LogErrors (); + + MOAIGfxMgr (); + ~MOAIGfxMgr (); + + void RegisterLuaClass ( MOAILuaState& state ); + + void ReportTextureAlloc ( cc8* name, size_t size ); + void ReportTextureFree ( cc8* name, size_t size ); + + void ResetDrawCount (); + + void SetBufferScale ( float scale ); + void SetBufferSize ( u32 width, u32 height ); + + //----------------------------------------------------------------// + static ZLGfx& GetDrawingAPI () { + + ZLGfx* gfx = MOAIGfxMgr::Get ().mPipelineMgr.GetDrawingAPI (); + assert ( gfx ); + + return *gfx; + } +}; + +#endif diff --git a/src/moai-sim/MOAIGfxPipelineClerk.cpp b/src/moai-sim/MOAIGfxPipelineClerk.cpp new file mode 100644 index 0000000000..6dddcf9eca --- /dev/null +++ b/src/moai-sim/MOAIGfxPipelineClerk.cpp @@ -0,0 +1,407 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +#ifdef DeleteFile + #undef DeleteFile +#endif + +//================================================================// +// MOAIGfxPipeline +//================================================================// + +//----------------------------------------------------------------// +MOAIGfxPipelinePair* MOAIGfxPipeline::GetPair () { + + if ( this->mFreeDisplayPairs.GetTop () > 0 ) { + return this->mFreeDisplayPairs.Pop (); + } + + size_t size = this->mDisplayPairs.Size (); + this->mDisplayPairs.Grow ( size + 1 ); + this->mDisplayPairs [ size ] = new MOAIGfxPipelinePair (); + return this->mDisplayPairs [ size ]; +} + +//----------------------------------------------------------------// +bool MOAIGfxPipeline::HasContent () { + + return this->mHasContent; +} + +//----------------------------------------------------------------// +MOAIGfxPipeline::MOAIGfxPipeline () : + mHasContent ( false ), + mRenderCount ( 0 ), + mEnableLogging ( false ) { + + memset ( this->mPipeline, 0, sizeof ( this->mPipeline )); +} + +//----------------------------------------------------------------// +MOAIGfxPipeline::~MOAIGfxPipeline () { + + for ( u32 i = 0; i < this->mDisplayPairs.Size (); ++i ) { + free ( this->mDisplayPairs [ i ]); + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipeline::PhaseBegin ( u32 phase ) { + + switch ( phase ) { + + case CPU_PHASE: { + + // put these back + while ( this->mFinishedDisplayPairs.GetTop ()) { + this->ReleasePair ( this->mFinishedDisplayPairs.Pop ()); + } + + // illegal to begin while already in progress + assert ( this->mPipeline [ PIPELINE_CPU ] == 0 ); + + MOAIGfxPipelinePair* pair = 0; + + if ( this->mPipeline [ PIPELINE_PENDING ]) { + + pair = this->mPipeline [ PIPELINE_PENDING ]; + pair->mCritical.Comment ( "ROLLING BACK FROM PENDING" ); + pair->mOptional.Reset (); // discard pending commands + } + else { + pair = this->GetPair (); + } + + this->mPipeline [ PIPELINE_CPU ] = pair; + this->mPipeline [ PIPELINE_PENDING ] = 0; + + this->mHasContent = pair->mCritical.HasContent (); + + break; + } + + case GPU_PHASE: { + + // illegal to begin while already in progress + assert ( this->mPipeline [ PIPELINE_GPU ] == 0 ); + + MOAIGfxPipelinePair* pair = this->mPipeline [ PIPELINE_PENDING ]; + + if ( pair ) { + this->mPipeline [ PIPELINE_GPU ] = pair; + this->mPipeline [ PIPELINE_PENDING ] = 0; + } + break; + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipeline::PhaseEnd ( u32 phase ) { + + switch ( phase ) { + + case CPU_PHASE: { + + assert ( this->mPipeline [ PIPELINE_PENDING ] == 0 ); + + MOAIGfxPipelinePair* pair = this->mPipeline [ PIPELINE_CPU ]; + assert ( pair ); + + this->mPipeline [ PIPELINE_CPU ] = 0; + + this->mHasContent = pair->mOptional.HasContent () || pair->mCritical.HasContent (); + + if ( this->mHasContent ) { + this->mPipeline [ PIPELINE_PENDING ] = pair; + } + else { + this->ReleasePair ( pair ); + } + break; + } + + case GPU_PHASE: { + + MOAIGfxPipelinePair* pair = this->mPipeline [ PIPELINE_GPU ]; + + if ( pair ) { + this->mFinishedDisplayPairs.Push ( pair ); + this->mPipeline [ PIPELINE_GPU ] = 0; + } + + this->mHasContent = false; + + break; + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipeline::PublishAndReset () { + + size_t top = this->mFinishedDisplayPairs.GetTop (); + for ( size_t i = 0; i < top; ++i ) { + + MOAIGfxPipelinePair* pair = this->mFinishedDisplayPairs [ i ]; + + pair->mCritical.PublishEventsAndReset (); + pair->mOptional.PublishEventsAndReset (); + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipeline::ReleasePair ( MOAIGfxPipelinePair* pair ) { + + pair->mCritical.Reset (); + pair->mOptional.Reset (); + + this->mFreeDisplayPairs.Push ( pair ); +} + +//================================================================// +// MOAIGfxPipelineClerk +//================================================================// + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::BeginPhase ( u32 phase ) { + + switch ( phase ) { + + case LOGIC_PHASE: + + this->PublishAndReset ( LOADING_PIPELINE ); + this->PublishAndReset ( DRAWING_PIPELINE ); + + this->BeginPhase ( LOADING_PIPELINE, MOAIGfxPipeline::CPU_PHASE ); + this->BeginPhase ( DRAWING_PIPELINE, MOAIGfxPipeline::CPU_PHASE ); + + break; + + case LOADING_PHASE: + + this->BeginPhase ( LOADING_PIPELINE, MOAIGfxPipeline::GPU_PHASE ); + break; + + case RENDER_PHASE: + + this->BeginPhase ( DRAWING_PIPELINE, MOAIGfxPipeline::GPU_PHASE ); + break; + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::BeginPhase ( u32 pipelineID, u32 phase ) { + + if ( pipelineID < TOTAL_PIPELINES ) { + + MOAIGfxPipeline* pipeline = this->mPipelines [ pipelineID ]; + + if ( pipeline ) { + + pipeline->mEnableLogging = this->mEnablePipelineLogging; + + pipeline->PhaseBegin ( phase ); + + if (( phase == MOAIGfxPipeline::GPU_PHASE ) && ( pipeline->mPipeline [ MOAIGfxPipeline::PIPELINE_GPU ])) { + pipeline->mRenderCount = this->mPipelineRenderCount++; + } + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::EnablePipeline ( u32 pipelineID ) { + + assert ( pipelineID < TOTAL_PIPELINES ); + this->mPipelines [ pipelineID ] = new MOAIGfxPipeline (); +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::EnablePipelineLogging ( bool enable ) { + + this->mEnablePipelineLogging = enable; +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::EndPhase ( u32 phase ) { + + switch ( phase ) { + + case LOGIC_PHASE: + + this->EndPhase ( LOADING_PIPELINE, MOAIGfxPipeline::CPU_PHASE ); + this->EndPhase ( DRAWING_PIPELINE, MOAIGfxPipeline::CPU_PHASE ); + break; + + case LOADING_PHASE: + + this->EndPhase ( LOADING_PIPELINE, MOAIGfxPipeline::GPU_PHASE ); + break; + + case RENDER_PHASE: + + this->EndPhase ( DRAWING_PIPELINE, MOAIGfxPipeline::GPU_PHASE ); + break; + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::EndPhase ( u32 pipelineID, u32 phase ) { + + if ( pipelineID < TOTAL_PIPELINES ) { + MOAIGfxPipeline* pipeline = this->mPipelines [ pipelineID ]; + + if ( pipeline ) { + pipeline->PhaseEnd ( phase ); + } + } +} + +//----------------------------------------------------------------// +bool MOAIGfxPipelineClerk::HasContent ( u32 pipelineID ) { + + assert ( pipelineID < TOTAL_PIPELINES ); + return this->mPipelines [ pipelineID ] ? this->mPipelines [ pipelineID ]->HasContent () : true; +} + +//----------------------------------------------------------------// +bool MOAIGfxPipelineClerk::IsPipelineEnabled ( u32 pipelineID ) { + + return ( pipelineID < TOTAL_PIPELINES ) && ( this->mPipelines [ pipelineID ] != NULL ); +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::LogPipelineRender ( ZLGfxRetained& gfx, size_t renderCount, cc8* name, cc8* flavor ) { + + STLString temp; + temp.write ( "%s/%p.tmp", GFX_PIPELINE_LOGGING_FOLDER, &gfx ); + + ZLGfxLogger logger; + logger.Print ( temp, gfx ); + + size_t commandCount = logger.GetCommandCount () - logger.GetCommentCount (); + + if ( commandCount ) { + STLString filename; + filename.write ( "%s/display %04lu - %s %s (%lu).txt", GFX_PIPELINE_LOGGING_FOLDER, renderCount, name, flavor, commandCount ); + ZLFileSys::Rename ( temp, filename ); + } + else { + ZLFileSys::DeleteFile ( temp ); + } +} + +//----------------------------------------------------------------// +MOAIGfxPipelineClerk::MOAIGfxPipelineClerk () : + mDrawingAPI ( &mGfxImmediate ), + mDrawCount ( 0 ), + mPipelineRenderCount ( 0 ), + mEnablePipelineLogging ( false ) { + + memset ( this->mPipelines, 0, sizeof ( this->mPipelines )); +} + +//----------------------------------------------------------------// +MOAIGfxPipelineClerk::~MOAIGfxPipelineClerk () { + + for ( u32 i = 0; i < TOTAL_PIPELINES; ++i ) { + if ( this->mPipelines [ i ]) { + delete this->mPipelines [ i ]; + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::ProcessPipeline ( u32 pipelineID ) { + + assert ( pipelineID < TOTAL_PIPELINES ); + MOAIGfxPipeline* pipeline = this->mPipelines [ pipelineID ]; + + if ( pipeline && pipeline->mPipeline [ MOAIGfxPipeline::PIPELINE_GPU ]) { + + MOAIGfxPipelinePair* pair = pipeline->mPipeline [ MOAIGfxPipeline::PIPELINE_GPU ]; + + if ( pair->mCritical.HasContent () || pair->mOptional.HasContent ()) { + + if ( pipeline->mEnableLogging ) { + + cc8* name = pipelineID == DRAWING_PIPELINE ? "drawing" : "loading"; + + this->LogPipelineRender ( pair->mCritical, pipeline->mRenderCount, name, "critical" ); + this->LogPipelineRender ( pair->mOptional, pipeline->mRenderCount, name, "temporal" ); + } + + pair->mCritical.Draw ( this->mGfxImmediate ); + pair->mOptional.Draw ( this->mGfxImmediate ); + + if ( pipelineID == LOADING_PIPELINE ) { + this->mGfxImmediate.Flush ( true ); + } + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::PublishAndReset ( u32 pipelineID ) { + + assert ( pipelineID < TOTAL_PIPELINES ); + MOAIGfxPipeline* pipeline = this->mPipelines [ pipelineID ]; + + if ( pipeline ) { + pipeline->PublishAndReset (); + } +} + +//----------------------------------------------------------------// +void MOAIGfxPipelineClerk::ResetDrawingAPIs () { + + ZLGfx& loadingAPI = this->SelectDrawingAPI ( LOADING_PIPELINE ); + MOAIGfxMgr::Get ().mGfxState.ResetState (); + + ZLGfx& drawingAPI = this->SelectDrawingAPI ( DRAWING_PIPELINE ); + if ( &loadingAPI != &drawingAPI ) { + MOAIGfxMgr::Get ().mGfxState.ResetState (); + } +} + +//----------------------------------------------------------------// +ZLGfx& MOAIGfxPipelineClerk::SelectDrawingAPI () { + + this->mDrawingAPI = &this->mGfxImmediate; + return *this->mDrawingAPI; +} + +//----------------------------------------------------------------// +ZLGfx& MOAIGfxPipelineClerk::SelectDrawingAPI ( u32 pipelineID, bool critical ) { + + this->mDrawingAPI = &this->mGfxImmediate; + + if ( pipelineID < TOTAL_PIPELINES ) { + + MOAIGfxPipeline* pipeline = this->mPipelines [ pipelineID ]; + + if ( pipeline ) { + + MOAIGfxPipelinePair* pair = pipeline->mPipeline [ MOAIGfxPipeline::PIPELINE_CPU ]; + assert ( pair ); + + this->mDrawingAPI = critical ? &pair->mCritical : &pair->mOptional; + } + else if ( pipelineID == LOADING_PIPELINE ) { + + this->SelectDrawingAPI ( DRAWING_PIPELINE ); + } + } + + return *this->mDrawingAPI; +} diff --git a/src/moai-sim/MOAIGfxPipelineClerk.h b/src/moai-sim/MOAIGfxPipelineClerk.h new file mode 100644 index 0000000000..45b25e61ff --- /dev/null +++ b/src/moai-sim/MOAIGfxPipelineClerk.h @@ -0,0 +1,125 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIGFXPIPELINECLERK_H +#define MOAIGFXPIPELINECLERK_H + +class MOAIIndexBuffer; +class MOAIVertexArray; +class MOAIVertexBuffer; +class MOAIVertexFormat; + +#define GFX_PIPELINE_LOGGING_FOLDER "renderlogs" + +//================================================================// +// MOAIGfxPipelinePair +//================================================================// +class MOAIGfxPipelinePair { +private: + + friend class MOAIGfxPipeline; + friend class MOAIGfxPipelineClerk; + + ZLGfxRetained mCritical; + ZLGfxRetained mOptional; +}; + +//================================================================// +// MOAIGfxPipeline +//================================================================// +class MOAIGfxPipeline { +private: + + friend class MOAIGfxPipelineClerk; + + ZLLeanArray < MOAIGfxPipelinePair* > mDisplayPairs; + ZLLeanStack < MOAIGfxPipelinePair* > mFreeDisplayPairs; + ZLLeanStack < MOAIGfxPipelinePair* > mFinishedDisplayPairs; + + enum { + PIPELINE_CPU, // busy on the main thread + PIPELINE_PENDING, // waiting for the graphics thread + PIPELINE_GPU, // busy on the graphics thread + PIPELINE_TOTAL, + }; + + enum { + CPU_PHASE, + GPU_PHASE, + }; + + MOAIGfxPipelinePair* mPipeline [ PIPELINE_TOTAL ]; + bool mHasContent; + + size_t mRenderCount; + bool mEnableLogging; + + //----------------------------------------------------------------// + MOAIGfxPipelinePair* GetPair (); + bool HasContent (); + MOAIGfxPipeline (); + ~MOAIGfxPipeline (); + void PhaseBegin ( u32 phase ); + void PhaseEnd ( u32 phase ); + void PublishAndReset (); + void ReleasePair ( MOAIGfxPipelinePair* pair ); +}; + +//================================================================// +// MOAIGfxPipelineClerk +//================================================================// +class MOAIGfxPipelineClerk { +public: + + enum { + DRAWING_PIPELINE, + LOADING_PIPELINE, + TOTAL_PIPELINES, + }; + +protected: + + ZLGfxImmediate mGfxImmediate; + + MOAIGfxPipeline* mPipelines [ TOTAL_PIPELINES ]; + + ZLGfx* mDrawingAPI; + + u32 mDrawCount; + u32 mPipelineRenderCount; + + bool mEnablePipelineLogging; + + //----------------------------------------------------------------// + void BeginPhase ( u32 list, u32 phase ); + void EndPhase ( u32 list, u32 phase ); + void LogPipelineRender ( ZLGfxRetained& gfx, size_t renderCount, cc8* name, cc8* flavor ); + +public: + + enum { + LOGIC_PHASE, + LOADING_PHASE, + RENDER_PHASE, + }; + + GET ( u32, DrawCount, mDrawCount ) + GET ( ZLGfx*, DrawingAPI, mDrawingAPI ) + + //----------------------------------------------------------------// + void BeginPhase ( u32 phase ); + void EnablePipeline ( u32 pipelineID ); + void EnablePipelineLogging ( bool enable ); + void EndPhase ( u32 phase ); + bool HasContent ( u32 pipelineID ); + bool IsPipelineEnabled ( u32 pipelineID ); + MOAIGfxPipelineClerk (); + virtual ~MOAIGfxPipelineClerk (); + void ProcessPipeline ( u32 pipelineID ); + void PublishAndReset ( u32 pipelineID ); + void ResetDrawingAPIs (); + ZLGfx& SelectDrawingAPI (); + ZLGfx& SelectDrawingAPI ( u32 pipelineID, bool critical = false ); +}; + +#endif diff --git a/src/moai-sim/MOAIGfxQuad2D.cpp b/src/moai-sim/MOAIGfxQuad2D.cpp index 88cb0aa2db..2ddf33150e 100644 --- a/src/moai-sim/MOAIGfxQuad2D.cpp +++ b/src/moai-sim/MOAIGfxQuad2D.cpp @@ -3,7 +3,7 @@ #include "pch.h" #include -#include +#include #include #include #include @@ -186,13 +186,13 @@ ZLBox MOAIGfxQuad2D::ComputeMaxBounds () { //----------------------------------------------------------------// void MOAIGfxQuad2D::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, ZLVec3D offset, ZLVec3D scale ) { - materials.LoadGfxState ( this, idx, MOAIShaderMgr::DECK2D_SHADER ); + if ( !materials.LoadGfxState ( this, idx, MOAIShaderMgr::DECK2D_SHADER )) return; - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); + gfxMgr.mVertexCache.SetUVTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::UV_MTX )); this->mQuad.Draw ( offset.mX, offset.mY, offset.mZ, scale.mX, scale.mY ); } @@ -220,8 +220,6 @@ MOAIGfxQuad2D::MOAIGfxQuad2D () { RTTI_EXTEND ( MOAIStandardDeck ) RTTI_END - //this->SetContentMask ( MOAIProp::CAN_DRAW ); - // set up rects to draw a unit tile centered at the origin this->mQuad.SetVerts ( -0.5f, -0.5f, 0.5f, 0.5f ); this->mQuad.SetUVs ( 0.0f, 1.0f, 1.0f, 0.0f ); diff --git a/src/moai-sim/MOAIGfxQuadDeck2D.cpp b/src/moai-sim/MOAIGfxQuadDeck2D.cpp index ea4393e42d..c096a4b3b4 100644 --- a/src/moai-sim/MOAIGfxQuadDeck2D.cpp +++ b/src/moai-sim/MOAIGfxQuadDeck2D.cpp @@ -391,8 +391,8 @@ ZLBox MOAIGfxQuadDeck2D::ComputeMaxBounds () { ZLRect rect; rect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); - u32 size = this->mQuads.Size (); - for ( u32 i = 0; i < size; ++i ) { + size_t size = this->mQuads.Size (); + for ( size_t i = 0; i < size; ++i ) { rect.Grow ( this->mQuads [ i ].GetVtxBounds ()); } @@ -404,19 +404,19 @@ ZLBox MOAIGfxQuadDeck2D::ComputeMaxBounds () { //----------------------------------------------------------------// void MOAIGfxQuadDeck2D::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, ZLVec3D offset, ZLVec3D scale ) { - u32 size = this->mQuads.Size (); + u32 size = ( u32 )this->mQuads.Size (); if ( size ) { idx = idx - 1; u32 itemIdx = idx % size; - materials.LoadGfxState ( this, this->mMaterialIDs [ itemIdx ], idx, MOAIShaderMgr::DECK2D_SHADER ); + if ( !materials.LoadGfxState ( this, this->mMaterialIDs [ itemIdx ], idx, MOAIShaderMgr::DECK2D_SHADER )) return; - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); + gfxMgr.mVertexCache.SetUVTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::UV_MTX )); this->mQuads [ itemIdx ].Draw ( offset.mX, offset.mY, offset.mZ, scale.mX, scale.mY ); } @@ -427,7 +427,7 @@ ZLBox MOAIGfxQuadDeck2D::GetItemBounds ( u32 idx ) { ZLBox bounds; - u32 size = this->mQuads.Size (); + u32 size = ( u32 )this->mQuads.Size (); if ( size ) { idx = ( idx - 1 ) % size; @@ -445,7 +445,7 @@ ZLBox MOAIGfxQuadDeck2D::GetItemBounds ( u32 idx ) { bool MOAIGfxQuadDeck2D::Inside ( u32 idx, MOAIMaterialBatch& materials, u32 granularity, ZLVec3D vec, float pad ) { UNUSED ( pad ); - u32 size = this->mQuads.Size (); + u32 size = ( u32 )this->mQuads.Size (); if ( size ) { idx = ( idx - 1 ) % size; const MOAIQuadBrush& quadBrush = this->mQuads [ idx ]; @@ -460,8 +460,6 @@ MOAIGfxQuadDeck2D::MOAIGfxQuadDeck2D () { RTTI_BEGIN RTTI_EXTEND ( MOAIStandardDeck ) RTTI_END - - //this->SetContentMask ( MOAIProp::CAN_DRAW ); } //----------------------------------------------------------------// @@ -501,8 +499,8 @@ void MOAIGfxQuadDeck2D::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIGfxQuadDeck2D::Transform ( const ZLAffine3D& mtx ) { - u32 total = this->mQuads.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mQuads.Size (); + for ( size_t i = 0; i < total; ++i ) { this->mQuads [ i ].TransformVerts ( mtx ); } } @@ -510,8 +508,8 @@ void MOAIGfxQuadDeck2D::Transform ( const ZLAffine3D& mtx ) { //----------------------------------------------------------------// void MOAIGfxQuadDeck2D::TransformUV ( const ZLAffine3D& mtx ) { - u32 total = this->mQuads.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mQuads.Size (); + for ( size_t i = 0; i < total; ++i ) { this->mQuads [ i ].TransformUVs ( mtx ); } } \ No newline at end of file diff --git a/src/moai-sim/MOAIGfxQuadListDeck2D.cpp b/src/moai-sim/MOAIGfxQuadListDeck2D.cpp index 078bb52cc7..dd04ae8b1a 100644 --- a/src/moai-sim/MOAIGfxQuadListDeck2D.cpp +++ b/src/moai-sim/MOAIGfxQuadListDeck2D.cpp @@ -332,8 +332,8 @@ ZLBox MOAIGfxQuadListDeck2D::ComputeMaxBounds () { ZLRect rect; rect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); - u32 size = this->mQuads.Size (); - for ( u32 i = 0; i < size; ++i ) { + size_t size = this->mQuads.Size (); + for ( size_t i = 0; i < size; ++i ) { rect.Grow ( this->mQuads [ i ].GetBounds ()); } @@ -345,13 +345,13 @@ ZLBox MOAIGfxQuadListDeck2D::ComputeMaxBounds () { //----------------------------------------------------------------// bool MOAIGfxQuadListDeck2D::Contains ( u32 idx, const ZLVec2D& vec ) { - u32 size = this->mSprites.Size (); + size_t size = this->mSprites.Size (); if ( size ) { idx = ( idx - 1 ) % size; USSprite& brush = this->mSprites [ idx ]; - for ( u32 i = 0; i < brush.mTotalPairs; ++i ) { + for ( size_t i = 0; i < brush.mTotalPairs; ++i ) { USSpritePair& prim = this->mPairs [ brush.mBasePair + i ]; if ( this->mQuads [ prim.mQuadID ].Contains ( vec.mX, vec.mY )) { return true; @@ -364,23 +364,17 @@ bool MOAIGfxQuadListDeck2D::Contains ( u32 idx, const ZLVec2D& vec ) { //----------------------------------------------------------------// void MOAIGfxQuadListDeck2D::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, ZLVec3D offset, ZLVec3D scale ) { - u32 size = this->mSprites.Size (); + size_t size = this->mSprites.Size (); if ( size ) { idx = idx - 1; - u32 itemIdx = idx % size; + size_t itemIdx = idx % size; - bool hasMaterials = materials.Size () > 1; + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); - if ( !hasMaterials ) { - materials.LoadGfxState ( this, idx, MOAIShaderMgr::DECK2D_SHADER ); - } - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); - - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); + gfxMgr.mVertexCache.SetUVTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::UV_MTX )); USSprite& sprite = this->mSprites [ itemIdx ]; MOAIQuadBrush glQuad; @@ -388,17 +382,17 @@ void MOAIGfxQuadListDeck2D::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, Z u32 base = sprite.mBasePair; u32 top = base + sprite.mTotalPairs; - u32 totalSpritePairs = this->mPairs.Size (); + size_t totalSpritePairs = this->mPairs.Size (); u32 materialID = MOAIMaterialBatch::UNKNOWN; - for ( u32 i = base; i < top; ++i ) { + for ( size_t i = base; i < top; ++i ) { USSpritePair spritePair = this->mPairs [ i % totalSpritePairs ]; - if (( hasMaterials ) && ( materialID != spritePair.mMaterialID )) { - materials.LoadGfxState ( this, materialID, idx, MOAIShaderMgr::DECK2D_SHADER ); + if (( i == base ) || ( materialID != spritePair.mMaterialID )) { materialID = spritePair.mMaterialID; + materials.LoadGfxState ( this, materialID, idx, MOAIShaderMgr::DECK2D_SHADER ); } ZLQuad& uvQuad = this->mUVQuads [ spritePair.mUVQuadID ]; @@ -416,7 +410,7 @@ ZLBox MOAIGfxQuadListDeck2D::GetItemBounds ( u32 idx ) { ZLBox bounds; - u32 size = this->mSprites.Size (); + u32 size = ( u32 )this->mSprites.Size (); if ( size ) { idx = ( idx - 1 ) % size; @@ -450,12 +444,11 @@ ZLBox MOAIGfxQuadListDeck2D::GetItemBounds ( u32 idx ) { bool MOAIGfxQuadListDeck2D::Inside ( u32 idx, MOAIMaterialBatch& materials, u32 granularity, ZLVec3D vec, float pad ) { UNUSED ( pad ); - u32 size = this->mSprites.Size (); + u32 size = ( u32 )this->mSprites.Size (); // TODO: cast if ( size ) { idx = ( idx - 1 ) % size; - ZLRect rect; USSprite& sprite = this->mSprites [ idx ]; for ( u32 i = 0; i < sprite.mTotalPairs; ++i ) { @@ -472,8 +465,6 @@ MOAIGfxQuadListDeck2D::MOAIGfxQuadListDeck2D () { RTTI_BEGIN RTTI_EXTEND ( MOAIStandardDeck ) RTTI_END - - //this->SetContentMask ( MOAIProp::CAN_DRAW ); } //----------------------------------------------------------------// @@ -597,8 +588,8 @@ void MOAIGfxQuadListDeck2D::SetUVRect ( u32 idx, ZLRect& rect ) { //----------------------------------------------------------------// void MOAIGfxQuadListDeck2D::Transform ( const ZLAffine3D& mtx ) { - u32 total = this->mQuads.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mQuads.Size (); + for ( size_t i = 0; i < total; ++i ) { this->mQuads [ i ].Transform ( mtx ); } } @@ -606,8 +597,8 @@ void MOAIGfxQuadListDeck2D::Transform ( const ZLAffine3D& mtx ) { //----------------------------------------------------------------// void MOAIGfxQuadListDeck2D::TransformUV ( const ZLAffine3D& mtx ) { - u32 total = this->mQuads.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mQuads.Size (); + for ( size_t i = 0; i < total; ++i ) { this->mUVQuads [ i ].Transform ( mtx ); } } \ No newline at end of file diff --git a/src/moai-sim/MOAIGfxResource.cpp b/src/moai-sim/MOAIGfxResource.cpp index f1974bb247..02cdcd2ef3 100644 --- a/src/moai-sim/MOAIGfxResource.cpp +++ b/src/moai-sim/MOAIGfxResource.cpp @@ -3,9 +3,9 @@ #include "pch.h" -#include +#include #include -#include +#include #include //================================================================// @@ -32,6 +32,23 @@ int MOAIGfxResource::_getAge ( lua_State* L ) { return 1; } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGfxResource::_getResourceState ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGfxResource, "U" ) + + state.Push ( self->mState ); + return 1; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGfxResource::_preload ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGfxResource, "U" ) + + return 0; +} + //----------------------------------------------------------------// /** @lua purge @text Attempt to release the resource. Generally this is used when @@ -59,10 +76,11 @@ int MOAIGfxResource::_purge ( lua_State* L ) { //----------------------------------------------------------------// // TODO: doxygen -int MOAIGfxResource::_setLoadingPolicy ( lua_State* L ) { +int MOAIGfxResource::_scheduleForGPUCreate ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIGfxResource, "U" ) - self->mLoadingPolicy = state.GetValue < u32 >( 1, LOADING_POLICY_NONE ); + u32 listID = state.GetValue < u32 >( 2, MOAIGfxPipelineClerk::DRAWING_PIPELINE ); + self->ScheduleForGPUCreate ( listID ); return 0; } @@ -88,117 +106,105 @@ int MOAIGfxResource::_setReloader ( lua_State* L ) { //================================================================// //----------------------------------------------------------------// -bool MOAIGfxResource::Bind () { +void MOAIGfxResource::Affirm () { - if ( this->PrepareForBind ()) { + if ( this->mState == STATE_NEEDS_GPU_UPDATE ) { + this->DoGPUUpdate (); + } + else { + this->InvokeLoader (); + this->DoGPUCreate (); + } +} + +//----------------------------------------------------------------// +u32 MOAIGfxResource::Bind () { + +// if ( !MOAIGfxMgr::Get ().GetHasContext ()) { +// MOAILog ( 0, MOAILogMessages::MOAIGfxResource_MissingDevice ); +// return false; +// } + + // we're ready to bind, so do it + if ( this->mState == STATE_READY_TO_BIND ) { + this->mLastRenderCount = MOAIRenderMgr::Get ().GetRenderCounter (); this->OnGPUBind (); - return true; } - return false; + return this->mState; } //----------------------------------------------------------------// void MOAIGfxResource::Destroy () { - if ( MOAIGfxResourceMgr::IsValid ()) { - this->OnGPUDestroy (); - } - this->OnGPULost (); + this->OnGPUDeleteOrDiscard ( true ); this->OnCPUDestroy (); - this->mState = STATE_NEW; + this->mState = STATE_UNINITIALIZED; } //----------------------------------------------------------------// -bool MOAIGfxResource::DoCPUAffirm () { +bool MOAIGfxResource::DoCPUCreate () { if ( this->mState == STATE_READY_TO_BIND ) return true; - if (( this->mState == STATE_ERROR ) || ( this->mState == STATE_NEW )) return false; - - u32 loadingPolicy = this->GetLoadingPolicy (); - - // if we're deferring both CPU and GPU, bail (unless we're being forced to load the CPU) - if ( loadingPolicy == LOADING_POLICY_CPU_GPU_BIND ) return true; + if (( this->mState == STATE_ERROR ) || ( this->mState == STATE_UNINITIALIZED )) return false; // whether or not GPU is deferred, do the CPU part - if ( this->mState == STATE_NEEDS_CPU_CREATE ) { - this->mState = this->OnCPUCreate () ? STATE_NEEDS_GPU_CREATE : STATE_ERROR; - } - - // turns out we want to do the GPU piece ASAP as well - if ( this->mState == STATE_NEEDS_GPU_CREATE ) { - - if ( loadingPolicy == LOADING_POLICY_CPU_ASAP_GPU_NEXT ) { - - MOAIGfxResourceMgr::Get ().ScheduleGPUAffirm ( *this ); - } - else if ( loadingPolicy == LOADING_POLICY_CPU_GPU_ASAP ) { - - #if MOAI_USE_GFX_THREAD - - MOAIGfxResourceMgr::Get ().ScheduleGPUAffirm ( *this ); - - #else - - zglBegin (); - this->mState = this->OnGPUCreate () ? STATE_READY_TO_BIND : STATE_ERROR; - if ( this->mState == STATE_READY_TO_BIND ) { - this->OnCPUDestroy (); - } - zglEnd (); - - #endif - - } + if ( this->mState == STATE_READY_FOR_CPU_CREATE ) { + this->mState = this->OnCPUCreate () ? STATE_READY_FOR_GPU_CREATE : STATE_ERROR; } - return this->mState != STATE_ERROR; } //----------------------------------------------------------------// -bool MOAIGfxResource::DoGPUAffirm () { +bool MOAIGfxResource::DoGPUCreate () { if ( this->mState == STATE_READY_TO_BIND ) return true; - if (( this->mState == STATE_ERROR ) || ( this->mState == STATE_NEW )) return false; + if (( this->mState == STATE_ERROR ) || ( this->mState == STATE_UNINITIALIZED )) return false; // if we get here, load both CPU and GPU parts - if ( this->mState == STATE_NEEDS_CPU_CREATE ) { - this->mState = this->OnCPUCreate () ? STATE_NEEDS_GPU_CREATE : STATE_ERROR; + if ( this->mState == STATE_READY_FOR_CPU_CREATE ) { + this->mState = this->OnCPUCreate () ? STATE_READY_FOR_GPU_CREATE : STATE_ERROR; } - if ( this->mState == STATE_NEEDS_GPU_CREATE ) { - this->mState = this->OnGPUCreate () ? STATE_READY_TO_BIND : STATE_ERROR; - if ( this->mState == STATE_READY_TO_BIND ) { + if ( this->mState == STATE_READY_FOR_GPU_CREATE ) { + + // set this now; in immediate mode we'll go straight to STATE_READY_TO_BIND on success + // otherwise we'll go there later when we get GFX_EVENT_CREATED + // why can't we set STATE_READY_TO_BIND? becausein multi-threaded mode, it might be + // a few more frames before we get GFX_EVENT_CREATED + + this->mState = STATE_PENDING; + + if ( this->OnGPUCreate ()) { + MOAIGfxMgr::GetDrawingAPI ().Event ( this, GFX_EVENT_CREATED, 0 ); this->OnCPUDestroy (); } + else { + this->mState = STATE_ERROR; + } } return this->mState == STATE_READY_TO_BIND; } //----------------------------------------------------------------// -void MOAIGfxResource::ForceCPUCreate () { +bool MOAIGfxResource::DoGPUUpdate () { - if ( this->mState == STATE_NEEDS_CPU_CREATE ) { - this->mState = this->OnCPUCreate () ? STATE_NEEDS_GPU_CREATE : STATE_ERROR; + if ( this->mState == STATE_NEEDS_GPU_UPDATE ) { + this->mState = this->OnGPUUpdate () ? STATE_READY_TO_BIND : STATE_ERROR; } + return true; } //----------------------------------------------------------------// void MOAIGfxResource::FinishInit () { - if (( this->mState == STATE_NEW ) || ( this->mState == STATE_ERROR )) { - this->mState = STATE_NEEDS_CPU_CREATE; + if (( this->mState == STATE_UNINITIALIZED ) || ( this->mState == STATE_ERROR )) { + this->mState = STATE_READY_FOR_CPU_CREATE; + this->ScheduleForGPUCreate ( MOAIGfxPipelineClerk::DRAWING_PIPELINE ); } -} - -//----------------------------------------------------------------// -u32 MOAIGfxResource::GetLoadingPolicy () { - - if ( this->mLoadingPolicy == LOADING_POLICY_NONE ) { - u32 globalLoadingPolicy = MOAIGfxResourceMgr::Get ().mResourceLoadingPolicy; - return globalLoadingPolicy == LOADING_POLICY_NONE ? DEFAULT_LOADING_POLICY : globalLoadingPolicy; + else { + this->ScheduleForGPUUpdate (); } - return this->mLoadingPolicy; } //----------------------------------------------------------------// @@ -208,57 +214,106 @@ bool MOAIGfxResource::HasReloader () { } //----------------------------------------------------------------// -void MOAIGfxResource::InvokeLoader () { +bool MOAIGfxResource::InvokeLoader () { if ( this->mReloader ) { MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); if ( this->mReloader.PushRef ( state )) { state.DebugCall ( 0, 0 ); + return true; } } + return false; } //----------------------------------------------------------------// MOAIGfxResource::MOAIGfxResource () : - mState ( STATE_NEW ), - mLastRenderCount ( 0 ), - mLoadingPolicy ( LOADING_POLICY_NONE ) { + mState ( STATE_UNINITIALIZED ), + mLastRenderCount ( 0 ) { - RTTI_SINGLE ( MOAILuaObject ) + RTTI_SINGLE ( MOAIInstanceEventSource ) - this->mLink.Data ( this ); + this->mMasterLink.Data ( this ); + this->mPendingLink.Data ( this ); - MOAIGfxResourceMgr::Get ().InsertGfxResource ( *this ); + MOAIGfxMgr::Get ().mResourceMgr.InsertGfxResource ( *this ); } //----------------------------------------------------------------// MOAIGfxResource::~MOAIGfxResource () { - if ( MOAIGfxResourceMgr::IsValid ()) { - MOAIGfxResourceMgr::Get ().RemoveGfxResource ( *this ); + if ( MOAIGfxMgr::IsValid ()) { + MOAIGfxMgr::Get ().mResourceMgr.RemoveGfxResource ( *this ); } this->mReloader.Clear (); } +//----------------------------------------------------------------// +void MOAIGfxResource::OnClearDirty () { +} + +//----------------------------------------------------------------// +void MOAIGfxResource::OnGfxEvent ( u32 event, void* userdata ) { + UNUSED ( userdata ); + + if ( event == GFX_EVENT_CREATED ) { + + // we should only get this event if the creation sequence was successful + this->mState = STATE_READY_TO_BIND; + + // let Lua know the resource is ready for use + this->InvokeListener ( GFX_EVENT_CREATED ); + } +} + +//----------------------------------------------------------------// +bool MOAIGfxResource::Purge ( u32 age ) { + + if ( this->mState == STATE_ERROR ) return false; + + age = MOAIRenderMgr::Get ().GetRenderCounter () - age; + + if ( this->mLastRenderCount <= age ) { + this->OnCPUDestroy (); + this->OnGPUDeleteOrDiscard ( true ); + this->mState = STATE_READY_FOR_CPU_CREATE; + + this->ScheduleForGPUCreate ( MOAIGfxPipelineClerk::DRAWING_PIPELINE ); + + return true; + } + return false; +} + //----------------------------------------------------------------// void MOAIGfxResource::RegisterLuaClass ( MOAILuaState& state ) { - UNUSED ( state ); - state.SetField ( -1, "LOADING_POLICY_NONE", ( u32 )LOADING_POLICY_NONE ); - state.SetField ( -1, "LOADING_POLICY_CPU_GPU_ASAP", ( u32 )LOADING_POLICY_CPU_GPU_ASAP ); - state.SetField ( -1, "LOADING_POLICY_CPU_ASAP_GPU_NEXT", ( u32 )LOADING_POLICY_CPU_ASAP_GPU_NEXT ); - state.SetField ( -1, "LOADING_POLICY_CPU_ASAP_GPU_BIND", ( u32 )LOADING_POLICY_CPU_ASAP_GPU_BIND ); - state.SetField ( -1, "LOADING_POLICY_CPU_GPU_BIND", ( u32 )LOADING_POLICY_CPU_GPU_BIND ); + MOAIInstanceEventSource::RegisterLuaClass ( state ); + + state.SetField ( -1, "STATE_UNINITIALIZED", ( u32 )STATE_UNINITIALIZED ); + state.SetField ( -1, "STATE_READY_FOR_CPU_CREATE", ( u32 )STATE_READY_FOR_CPU_CREATE ); + state.SetField ( -1, "STATE_READY_FOR_GPU_CREATE", ( u32 )STATE_READY_FOR_GPU_CREATE ); + state.SetField ( -1, "STATE_READY_TO_BIND", ( u32 )STATE_READY_TO_BIND ); + state.SetField ( -1, "STATE_ERROR", ( u32 )STATE_ERROR ); + + state.SetField ( -1, "GFX_EVENT_CREATED", ( u32 )GFX_EVENT_CREATED ); + + state.SetField ( -1, "DRAWING_PIPELINE", ( u32 )MOAIGfxPipelineClerk::DRAWING_PIPELINE ); + state.SetField ( -1, "LOADING_PIPELINE", ( u32 )MOAIGfxPipelineClerk::LOADING_PIPELINE ); } //----------------------------------------------------------------// void MOAIGfxResource::RegisterLuaFuncs ( MOAILuaState& state ) { + MOAIInstanceEventSource::RegisterLuaFuncs ( state ); + luaL_Reg regTable [] = { { "getAge", _getAge }, + { "getResourceState", _getResourceState }, + { "preload", _preload }, { "purge", _purge }, { "softRelease", _purge }, // back compat - { "setLoadingPolicy", _setLoadingPolicy }, + { "scheduleForGPUCreate", _scheduleForGPUCreate }, { "setReloader", _setReloader }, { NULL, NULL } }; @@ -266,52 +321,41 @@ void MOAIGfxResource::RegisterLuaFuncs ( MOAILuaState& state ) { } //----------------------------------------------------------------// -bool MOAIGfxResource::PrepareForBind () { - - if (( this->mState == STATE_NEW ) || ( this->mState == STATE_ERROR )) return false; - - if ( !MOAIGfxDevice::Get ().GetHasContext ()) { - MOAILogF ( 0, ZLLog::LOG_FATAL, MOAILogMessages::MOAIGfxResource_MissingDevice ); - return false; - } +void MOAIGfxResource::Renew () { - if ( this->mState == STATE_NEEDS_CPU_CREATE ) { + // any (valid) state other than error we go back to square zero + if ( !(( this->mState == STATE_UNINITIALIZED ) || ( this->mState == STATE_ERROR ))) { + + this->OnGPUDeleteOrDiscard ( false ); // clear out the resource id (if any) + this->mState = STATE_READY_FOR_CPU_CREATE; this->InvokeLoader (); + this->DoGPUCreate (); } - - if ( this->DoGPUAffirm ()) { - this->mLastRenderCount = MOAIRenderMgr::Get ().GetRenderCounter (); - return true; - } - return false; } //----------------------------------------------------------------// -bool MOAIGfxResource::Purge ( u32 age ) { - - if ( this->mState == STATE_ERROR ) return false; - - age = MOAIRenderMgr::Get ().GetRenderCounter () - age; +bool MOAIGfxResource::ScheduleForGPUCreate ( u32 pipelineID ) { - if ( this->mLastRenderCount <= age ) { - this->OnCPUDestroy (); - this->OnGPUDestroy (); - this->mState = STATE_NEEDS_CPU_CREATE; - return true; + if ( this->mState == STATE_READY_TO_BIND ) return true; + if (( this->mState == STATE_UNINITIALIZED ) || ( this->mState == STATE_ERROR )) return false; + + if ( MOAIGfxMgr::IsValid ()) { + MOAIGfxMgr::Get ().mResourceMgr.ScheduleGPUAffirm ( *this, pipelineID ); } - return false; + return true; } //----------------------------------------------------------------// -void MOAIGfxResource::Renew () { +bool MOAIGfxResource::ScheduleForGPUUpdate () { - // any state other than error we go back to square zero - if ( this->mState != STATE_ERROR ) { - this->OnGPULost (); // clear out the resource id (if any) - this->mState = STATE_NEEDS_CPU_CREATE; - this->InvokeLoader (); - this->DoGPUAffirm (); + if ( this->mState != STATE_READY_TO_BIND ) return false; + + this->mState = STATE_NEEDS_GPU_UPDATE; + + if ( MOAIGfxMgr::IsValid ()) { + MOAIGfxMgr::Get ().mResourceMgr.ScheduleGPUAffirm ( *this, MOAIGfxPipelineClerk::DRAWING_PIPELINE ); // always update in the drawing pipeline } + return true; } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIGfxResource.h b/src/moai-sim/MOAIGfxResource.h index ac5a98ce03..430d8342fe 100644 --- a/src/moai-sim/MOAIGfxResource.h +++ b/src/moai-sim/MOAIGfxResource.h @@ -13,90 +13,87 @@ context (if possible). */ class MOAIGfxResource : - public virtual MOAILuaObject { + public virtual MOAIInstanceEventSource, + public virtual ZLGfxListener { private: - friend class MOAIGfxDevice; - friend class MOAIGfxDeviceBase; - friend class MOAIGfxDeviceStateCache; - friend class MOAIGfxResourceMgr; - - enum { - STATE_NEW, // we use this state to ensure we call DoCPUAffirm after init - STATE_NEEDS_CPU_CREATE, - STATE_NEEDS_GPU_CREATE, - STATE_READY_TO_BIND, - STATE_ERROR, - }; + friend class MOAIGfxMgr; + friend class MOAIGfxPipelineClerk; + friend class MOAIGfxStateCache; + friend class MOAIGfxResourceClerk; u32 mState; u32 mLastRenderCount; - u32 mLoadingPolicy; - ZLLeanLink < MOAIGfxResource* > mLink; + ZLLeanLink < MOAIGfxResource* > mMasterLink; + ZLLeanLink < MOAIGfxResource* > mPendingLink; // for custom loading function MOAILuaMemberRef mReloader; //----------------------------------------------------------------// static int _getAge ( lua_State* L ); + static int _getResourceState ( lua_State* L ); + static int _preload ( lua_State* L ); static int _purge ( lua_State* L ); - static int _setLoadingPolicy ( lua_State* L ); + static int _scheduleForGPUCreate ( lua_State* L ); static int _setReloader ( lua_State* L ); //----------------------------------------------------------------// - bool Bind (); // bind for drawing; go to STATE_READY - bool DoGPUAffirm (); // gets ready to bind - void InvokeLoader (); + void Affirm (); + u32 Bind (); // bind OR create + bool DoGPUCreate (); // gets ready to bind + bool DoGPUUpdate (); + bool InvokeLoader (); void Renew (); // lose (but not *delete*) the GPU resource void Unbind (); protected: + enum { + GFX_EVENT_CREATED, + GFX_EVENT_TOTAL, + }; + //----------------------------------------------------------------// void FinishInit (); // ready to CPU/GPU affirm; recover from STATE_NEW or STATE_ERROR bool HasReloader (); - + virtual void OnClearDirty (); virtual bool OnCPUCreate () = 0; // load or initialize any CPU-side resources required to create the GPU-side resource virtual void OnCPUDestroy () = 0; // clear any CPU-side memory used by class + void OnGfxEvent ( u32 event, void* userdata ); virtual void OnGPUBind () = 0; // select GPU-side resource on device for use virtual bool OnGPUCreate () = 0; // create GPU-side resource - virtual void OnGPUDestroy () = 0; // schedule GPU-side resource for destruction - virtual void OnGPULost () = 0; // clear any handles or references to GPU-side (called by 'Abandon') + virtual void OnGPUDeleteOrDiscard ( bool shouldDelete ) = 0; // delete or discard GPU resource handles virtual void OnGPUUnbind () = 0; // unbind GPU-side resource + virtual bool OnGPUUpdate () = 0; public: - GET ( u32, State, mState ) - IS ( Ready, mState, STATE_READY_TO_BIND ) - - SET ( u32, LoadingPolicy, mLoadingPolicy ) - enum { - LOADING_POLICY_NONE, // don't care and/or use global policy - LOADING_POLICY_CPU_GPU_ASAP, // load everything asap - LOADING_POLICY_CPU_ASAP_GPU_NEXT, // load the cpu part asap; load the gpu part next render - LOADING_POLICY_CPU_ASAP_GPU_BIND, // load the cpu part asap, load the gpu part on bind (during render) - LOADING_POLICY_CPU_GPU_BIND, // load the cpu and gpu part on bind (during render) + STATE_UNINITIALIZED, // we use this state to ensure we call DoCPUAffirm after init + STATE_READY_FOR_CPU_CREATE, + STATE_READY_FOR_GPU_CREATE, + STATE_PENDING, // waiting for GPU + STATE_READY_TO_BIND, + STATE_NEEDS_GPU_UPDATE, + STATE_ERROR, }; - static const u32 DEFAULT_LOADING_POLICY = LOADING_POLICY_CPU_ASAP_GPU_NEXT; - - // if the build defines MOAI_USE_GFX_THREAD, then gpu loading can *only* happen during render. this only effects - // LOADING_POLICY_CPU_GPU_ASAP, in which case the gpu portion must be added to a queue and loaded the next time - // we render. + GET ( u32, State, mState ) + IS ( Pending, mState, STATE_PENDING ) + IS ( Ready, mState, STATE_READY_TO_BIND ) //----------------------------------------------------------------// - bool DoCPUAffirm (); // preload CPU portion void Destroy (); // delete CPU and GPU data; go back to STATE_NEW - void ForceCPUCreate (); - virtual u32 GetLoadingPolicy (); + bool DoCPUCreate (); // preload CPU portion MOAIGfxResource (); virtual ~MOAIGfxResource (); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); + bool ScheduleForGPUCreate ( u32 pipelineID ); + bool ScheduleForGPUUpdate (); bool Purge ( u32 age ); - bool PrepareForBind (); }; #endif diff --git a/src/moai-sim/MOAIGfxResourceClerk.cpp b/src/moai-sim/MOAIGfxResourceClerk.cpp new file mode 100644 index 0000000000..d95fb3ac6d --- /dev/null +++ b/src/moai-sim/MOAIGfxResourceClerk.cpp @@ -0,0 +1,180 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include + +//================================================================// +// MOAIGfxResourceClerk +//================================================================// + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::DeleteOrDiscardHandle ( ZLGfxHandle*& handle, bool shouldDelete ) { + + if ( handle ) { + if ( shouldDelete && MOAIGfxMgr::IsValid ()) { + + MOAIGfxMgr::Get ().mResourceMgr.mDeleterStack.Push ( handle ); + return; + } + ZLGfx::Discard ( handle ); + } +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::DiscardResources () { + + ResourceIt resourceIt = this->mResources.Head (); + for ( ; resourceIt; resourceIt = resourceIt->Next ()) { + resourceIt->Data ()->OnGPUDeleteOrDiscard ( false ); + } + + size_t top = this->mDeleterStack.GetTop (); + + for ( size_t i = 0; i < top; ++i ) { + ZLGfx::Discard ( this->mDeleterStack [ i ]); + } + this->mDeleterStack.Reset (); +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::InsertGfxResource ( MOAIGfxResource& resource ) { + + this->mResources.PushBack ( resource.mMasterLink ); +} + +//----------------------------------------------------------------// +MOAIGfxResourceClerk::MOAIGfxResourceClerk () { +} + +//----------------------------------------------------------------// +MOAIGfxResourceClerk::~MOAIGfxResourceClerk () { +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::ProcessDeleters () { + + size_t top = this->mDeleterStack.GetTop (); + + if ( top ) { + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + ZLGfxDevice::Begin (); + + gfx.Flush (); + + for ( size_t i = 0; i < top; ++i ) { + ZLGfxHandle* handle = this->mDeleterStack [ i ]; + gfx.Delete ( handle ); + } + this->mDeleterStack.Reset (); + + gfx.Flush (); + + ZLGfxDevice::End (); + } +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::ProcessPending ( ZLLeanList < MOAIGfxResource* > &list ) { + + this->ProcessDeleters (); + + ResourceIt resourceIt = list.Head (); + while ( resourceIt ) { + MOAIGfxResource* resource = resourceIt->Data (); + resourceIt = resourceIt->Next (); + + resource->Affirm (); + } + list.Clear (); +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::PurgeResources ( u32 age ) { + + ZLGfxDevice::Begin (); + + ResourceIt resourceIt = this->mResources.Head (); + for ( ; resourceIt; resourceIt = resourceIt->Next ()) { + resourceIt->Data ()->Purge ( age ); + } + + ZLGfxDevice::End (); +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::RemoveGfxResource ( MOAIGfxResource& resource ) { + + this->mResources.Remove ( resource.mMasterLink ); + this->mPendingForLoadList.Remove ( resource.mPendingLink ); + this->mPendingForDrawList.Remove ( resource.mPendingLink ); +} + +//----------------------------------------------------------------// +// this gets called when the graphics context is renewed +void MOAIGfxResourceClerk::RenewResources () { + + ZLGfxDevice::Begin (); + + this->mDeleterStack.Reset (); + + ResourceIt resourceIt = this->mResources.Head (); + for ( ; resourceIt; resourceIt = resourceIt->Next ()) { + resourceIt->Data ()->Renew (); + } + + ZLGfxDevice::End (); +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::ScheduleGPUAffirm ( MOAIGfxResource& resource, u32 listID ) { + + switch ( listID ) { + + case MOAIGfxPipelineClerk::LOADING_PIPELINE: + this->mPendingForLoadList.PushBack ( resource.mPendingLink ); + break; + + case MOAIGfxPipelineClerk::DRAWING_PIPELINE: + this->mPendingForDrawList.PushBack ( resource.mPendingLink ); + break; + } +} + +//----------------------------------------------------------------// +void MOAIGfxResourceClerk::Update () { + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + ZLGfxDevice::Begin (); + + if ( this->mDeleterStack.GetTop () || this->mPendingForLoadList.Count ()) { + + ZLGfx& gfxLoading = gfxMgr.mPipelineMgr.SelectDrawingAPI ( MOAIGfxPipelineClerk::LOADING_PIPELINE, true ); + + ZGL_COMMENT ( gfxLoading, "RESOURCE MGR LOADING PIPELINE UPDATE" ); + this->ProcessDeleters (); + this->ProcessPending ( this->mPendingForLoadList ); + gfxMgr.mGfxState.UnbindAll (); + } + + if ( this->mPendingForDrawList.Count ()) { + + ZLGfx& gfxDrawing = gfxMgr.mPipelineMgr.SelectDrawingAPI ( MOAIGfxPipelineClerk::DRAWING_PIPELINE, true ); + + ZGL_COMMENT ( gfxDrawing, "RESOURCE MGR DRAWING PIPELINE UPDATE" ); + this->ProcessPending ( this->mPendingForDrawList ); + gfxMgr.mGfxState.UnbindAll (); + } + + // TODO: think about cases where we can get async results back on the + // same display list so we can remove the one-frame lag when creating resources + // in retained mode. + + ZLGfxDevice::End (); +} diff --git a/src/moai-sim/MOAIGfxResourceClerk.h b/src/moai-sim/MOAIGfxResourceClerk.h new file mode 100644 index 0000000000..65d7ce7886 --- /dev/null +++ b/src/moai-sim/MOAIGfxResourceClerk.h @@ -0,0 +1,46 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIGFXRESOURCECLERK_H +#define MOAIGFXRESOURCECLERK_H + +class MOAIGfxResource; + +//================================================================// +// MOAIGfxResourceClerk +//================================================================// +class MOAIGfxResourceClerk { +private: + + typedef ZLLeanList < MOAIGfxResource* >::Iterator ResourceIt; + ZLLeanList < MOAIGfxResource* > mResources; + + ZLLeanList < MOAIGfxResource* > mPendingForLoadList; + ZLLeanList < MOAIGfxResource* > mPendingForDrawList; + + ZLLeanStack < ZLGfxHandle*, 32 > mDeleterStack; + + //----------------------------------------------------------------// + void InsertGfxResource ( MOAIGfxResource& resource ); + void ProcessDeleters (); + void ProcessPending ( ZLLeanList < MOAIGfxResource* > &list ); + void RemoveGfxResource ( MOAIGfxResource& resource ); + void RenewResources (); + void ScheduleGPUAffirm ( MOAIGfxResource& resource, u32 listID ); + +public: + + friend class MOAIGfxMgr; + friend class MOAIGfxResource; + friend class MOAIRenderMgr; + + //----------------------------------------------------------------// + static void DeleteOrDiscardHandle ( ZLGfxHandle*& handle, bool shouldDelete ); + void DiscardResources (); + MOAIGfxResourceClerk (); + ~MOAIGfxResourceClerk (); + void PurgeResources ( u32 age = 0 ); + void Update (); +}; + +#endif diff --git a/src/moai-sim/MOAIGfxResourceMgr.cpp b/src/moai-sim/MOAIGfxResourceMgr.cpp deleted file mode 100644 index aa56ed30f9..0000000000 --- a/src/moai-sim/MOAIGfxResourceMgr.cpp +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" - -#include -#include - -//================================================================// -// MOAIGfxDeleter -//================================================================// - -//----------------------------------------------------------------// -void MOAIGfxDeleter::Delete () { - - switch ( this->mType ) { - - case DELETE_BUFFER: - zglDeleteBuffer ( this->mResourceID ); - break; - - case DELETE_FRAMEBUFFER: - zglDeleteFramebuffer ( this->mResourceID ); - break; - - case DELETE_PROGRAM: - zglDeleteProgram ( this->mResourceID ); - break; - - case DELETE_SHADER: - zglDeleteShader ( this->mResourceID ); - break; - - case DELETE_TEXTURE: - zglDeleteTexture ( this->mResourceID ); - break; - - case DELETE_RENDERBUFFER: - zglDeleteRenderbuffer ( this->mResourceID ); - break; - } -} - -//================================================================// -// lua -//================================================================// - -//----------------------------------------------------------------// -/** @lua purgeResources - @text Purges all resources older that a given age (in render cycles). - If age is 0 then all resources are purged. - - @opt number age Default value is 0. - @out nil -*/ -int MOAIGfxResourceMgr::_purgeResources ( lua_State* L ) { - MOAILuaState state ( L ); - - u32 age = state.GetValue < u32 >( 1, 0 ); - - zglBegin (); - MOAIGfxResourceMgr::Get ().PurgeResources ( age ); - zglEnd (); - - return 0; -} - -//----------------------------------------------------------------// -/** @lua renewResources - @text Renews all resources. - - @out nil -*/ -int MOAIGfxResourceMgr::_renewResources ( lua_State* L ) { - MOAILuaState state ( L ); - - zglBegin (); - MOAIGfxResourceMgr::Get ().RenewResources (); - zglEnd (); - - return 0; -} - -//----------------------------------------------------------------// -// TODO: doxygen -int MOAIGfxResourceMgr::_setResourceLoadingPolicy ( lua_State* L ) { - MOAILuaState state ( L ); - - MOAIGfxResourceMgr::Get ().mResourceLoadingPolicy = state.GetValue < u32 >( 1, MOAIGfxResource::DEFAULT_LOADING_POLICY ); - return 0; -} - -//================================================================// -// MOAIGfxResourceMgr -//================================================================// - -//----------------------------------------------------------------// -void MOAIGfxResourceMgr::InsertGfxResource ( MOAIGfxResource& resource ) { - - this->mResources.PushBack ( resource.mLink ); -} - -//----------------------------------------------------------------// -MOAIGfxResourceMgr::MOAIGfxResourceMgr () : - mResourceLoadingPolicy ( MOAIGfxResource::DEFAULT_LOADING_POLICY ) { - - RTTI_SINGLE ( MOAILuaObject ) -} - -//----------------------------------------------------------------// -MOAIGfxResourceMgr::~MOAIGfxResourceMgr () { -} - -//----------------------------------------------------------------// -void MOAIGfxResourceMgr::PurgeResources ( u32 age ) { - - ResourceIt resourceIt = this->mResources.Head (); - for ( ; resourceIt; resourceIt = resourceIt->Next ()) { - resourceIt->Data ()->Purge ( age ); - } -} - -//----------------------------------------------------------------// -void MOAIGfxResourceMgr::PushDeleter ( u32 type, u32 id ) { - - if ( id ) { - - MOAIGfxDeleter deleter; - deleter.mType = type; - deleter.mResourceID = id; - - this->mDeleterStack.Push ( deleter ); - } -} - -//----------------------------------------------------------------// -void MOAIGfxResourceMgr::RegisterLuaClass ( MOAILuaState& state ) { - - state.SetField ( -1, "LOADING_POLICY_CPU_GPU_ASAP", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_GPU_ASAP ); - state.SetField ( -1, "LOADING_POLICY_CPU_ASAP_GPU_NEXT", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_ASAP_GPU_NEXT ); - state.SetField ( -1, "LOADING_POLICY_CPU_ASAP_GPU_BIND", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_ASAP_GPU_BIND ); - state.SetField ( -1, "LOADING_POLICY_CPU_GPU_BIND", ( u32 )MOAIGfxResource::LOADING_POLICY_CPU_GPU_BIND ); - - luaL_Reg regTable [] = { - { "purgeResources", _purgeResources }, - { "renewResources", _renewResources }, - { "setResourceLoadingPolicy", _setResourceLoadingPolicy }, - { NULL, NULL } - }; - - luaL_register( state, 0, regTable ); -} - -//----------------------------------------------------------------// -void MOAIGfxResourceMgr::RemoveGfxResource ( MOAIGfxResource& resource ) { - - this->mResources.Remove ( resource.mLink ); - this->mPending.Remove ( resource.mLink ); -} - -//----------------------------------------------------------------// -// this gets called when the graphics context is renewed -void MOAIGfxResourceMgr::RenewResources () { - - this->mDeleterStack.Reset (); - - ResourceIt resourceIt = this->mResources.Head (); - for ( ; resourceIt; resourceIt = resourceIt->Next ()) { - resourceIt->Data ()->Renew (); - } -} - -//----------------------------------------------------------------// -void MOAIGfxResourceMgr::ScheduleGPUAffirm ( MOAIGfxResource& resource ) { - - this->mPending.PushBack ( resource.mLink ); -} - -//----------------------------------------------------------------// -void MOAIGfxResourceMgr::Update () { - - zglBegin (); - - u32 top = this->mDeleterStack.GetTop (); - - if ( top ) { - zglFlush (); - } - - for ( u32 i = 0; i < top; ++i ) { - MOAIGfxDeleter& deleter = this->mDeleterStack [ i ]; - deleter.Delete (); - } - this->mDeleterStack.Reset (); - - if ( top ) { - zglFlush (); - } - - ResourceIt resourceIt = this->mPending.Head (); - while ( resourceIt ) { - MOAIGfxResource* resource = resourceIt->Data (); - resourceIt = resourceIt->Next (); - - resource->DoGPUAffirm (); - this->mResources.PushBack ( resource->mLink ); - } - - zglEnd (); -} diff --git a/src/moai-sim/MOAIGfxResourceMgr.h b/src/moai-sim/MOAIGfxResourceMgr.h deleted file mode 100644 index 831116130f..0000000000 --- a/src/moai-sim/MOAIGfxResourceMgr.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAIGFXRESOURCEMGR_H -#define MOAIGFXRESOURCEMGR_H - -class MOAIGfxResource; - -//================================================================// -// MOAIGfxDeleter -//================================================================// -class MOAIGfxDeleter { -public: - - enum { - DELETE_BUFFER, - DELETE_FRAMEBUFFER, - DELETE_PROGRAM, - DELETE_SHADER, - DELETE_TEXTURE, - DELETE_RENDERBUFFER, - }; - - u32 mResourceID; - u32 mType; - - //----------------------------------------------------------------// - void Delete (); -}; - -//================================================================// -// MOAIGfxResourceMgr -//================================================================// -class MOAIGfxResourceMgr : - public MOAIGlobalClass < MOAIGfxResourceMgr, MOAILuaObject > { -private: - - typedef ZLLeanList < MOAIGfxResource* >::Iterator ResourceIt; - ZLLeanList < MOAIGfxResource* > mResources; - ZLLeanList < MOAIGfxResource* > mPending; - - ZLLeanStack < MOAIGfxDeleter, 32 > mDeleterStack; - - u32 mResourceLoadingPolicy; - - //----------------------------------------------------------------// - static int _purgeResources ( lua_State* L ); - static int _renewResources ( lua_State* L ); - static int _setResourceLoadingPolicy ( lua_State* L ); - - //----------------------------------------------------------------// - void InsertGfxResource ( MOAIGfxResource& resource ); - void RemoveGfxResource ( MOAIGfxResource& resource ); - void RenewResources (); - void ScheduleGPUAffirm ( MOAIGfxResource& resource ); - void Update (); - -public: - - friend class MOAIGfxDevice; - friend class MOAIGfxResource; - friend class MOAIRenderMgr; - - DECL_LUA_SINGLETON ( MOAIGfxResourceMgr ) - - //----------------------------------------------------------------// - MOAIGfxResourceMgr (); - ~MOAIGfxResourceMgr (); - void PurgeResources ( u32 age = 0 ); - void PushDeleter ( u32 type, u32 id ); - void RegisterLuaClass ( MOAILuaState& state ); -}; - -#endif diff --git a/src/moai-sim/MOAIGfxStateCache.cpp b/src/moai-sim/MOAIGfxStateCache.cpp new file mode 100644 index 0000000000..539bd21437 --- /dev/null +++ b/src/moai-sim/MOAIGfxStateCache.cpp @@ -0,0 +1,672 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================// +// MOAIGfxStateCacheClient +//================================================================// + +//----------------------------------------------------------------// +MOAIGfxStateCacheClient::MOAIGfxStateCacheClient () { +} + +//----------------------------------------------------------------// +MOAIGfxStateCacheClient::~MOAIGfxStateCacheClient () { +} + +//----------------------------------------------------------------// +void MOAIGfxStateCacheClient::OnGfxStateWillChange () { +} + +//================================================================// +// MOAIGfxStateCache +//================================================================// + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindFrameBuffer ( MOAIFrameBuffer* frameBuffer ) { + + frameBuffer = frameBuffer ? frameBuffer : this->mDefaultFrameBuffer; + + if ( this->mCurrentFrameBuffer != frameBuffer ) { + + this->GfxStateWillChange (); + + MOAIGfxMgr::GetDrawingAPI ().BindFramebuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, frameBuffer->mGLFrameBufferID ); + this->mCurrentFrameBuffer = frameBuffer; + } + + return true; +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindIndexBuffer ( MOAIIndexBuffer* buffer ) { + + if ( this->mCurrentIdxBuffer != buffer ) { + + if ( this->mCurrentIdxBuffer ) { + this->mCurrentIdxBuffer->Unbind (); + } + + this->mCurrentIdxBuffer = buffer; + + if ( buffer ) { + buffer->Bind (); + } + } + + return buffer ? buffer->IsReady () : true; +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindShader ( MOAIShader* shader ) { + + // we don't cache the shader itself because it doesn't cause a bind; + // we only care about binding its program (right now), which is cached. + // later on we will re-bind the current shader's uniforms, the caching + // of which is controlled by the shader program. + + this->mShader = shader; + + if ( this->mShader ) { + + if ( !this->BindShaderProgram ( shader->GetProgram ())) return false; + + return true; + } + + return this->BindShaderProgram (( MOAIShaderProgram* )0 ); +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindShader ( u32 preset ) { + + return this->BindShader ( MOAIShaderMgr::Get ().GetShader ( preset )); +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindShaderProgram ( MOAIShaderProgram* program ) { + + if ( this->mShaderProgram != program ) { + + this->GfxStateWillChange (); + + if ( this->mShaderProgram ) { + this->mShaderProgram->Unbind (); + } + + this->mShaderProgram = program; + + if ( program ) { + program->Bind (); + } + } + + return this->mShaderProgram ? this->mShaderProgram->IsReady () : true; +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindTexture ( MOAITextureBase* textureSet ) { + + bool result = true; + + if ( this->mCurrentTexture != textureSet ) { + + this->GfxStateWillChange (); + + this->mCurrentTexture = textureSet; + + u32 unitsEnabled = 0; + + if ( textureSet ) { + + unitsEnabled = textureSet->CountActiveUnits (); + + // bind or unbind textues depending on state of texture set + for ( u32 i = 0; i < unitsEnabled; ++i ) { + if ( !this->BindTexture ( i, textureSet->GetTextureForUnit ( i ))) { + result = false; + } + } + } + + // unbind/disable any excess textures + for ( u32 i = unitsEnabled; i < this->mActiveTextures; ++i ) { + this->BindTexture ( i, 0 ); + } + + this->mActiveTextures = unitsEnabled; + } + + return result; +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindTexture ( u32 textureUnit, MOAISingleTexture* texture ) { + + MOAISingleTexture* currentTexture = this->mTextureUnits [ textureUnit ]; + MOAISingleTexture* bindTexture = texture; + + if ( texture && ( !texture->IsReady ())) { + bindTexture = this->mDefaultTexture; + } + + if ( currentTexture != bindTexture ) { + + this->GfxStateWillChange (); + + MOAIGfxMgr::GetDrawingAPI ().ActiveTexture ( textureUnit ); + + if ( currentTexture ) { + currentTexture->Unbind (); + } + + this->mTextureUnits [ textureUnit ] = bindTexture; + + if ( bindTexture ) { + bindTexture->Bind (); + } + } + + return texture ? ( bindTexture && bindTexture->IsReady ()) : true; +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindVertexArray ( MOAIVertexArray* vtxArray ) { + + if ( this->mCurrentVtxArray != vtxArray ) { + + if ( this->mCurrentVtxArray ) { + this->mCurrentVtxArray->Unbind (); + } + + this->BindVertexBuffer (); + this->mCurrentVtxArray = vtxArray; + + if ( vtxArray ) { + vtxArray->Bind (); + } + } + + return vtxArray ? vtxArray->IsReady () : true; +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindVertexBuffer ( MOAIVertexBuffer* buffer ) { + + if ( this->mCurrentVtxBuffer != buffer ) { + + this->GfxStateWillChange (); + + if ( this->mCurrentVtxBuffer ) { + this->mCurrentVtxBuffer->Unbind (); + } + + this->BindVertexFormat (); + this->mCurrentVtxBuffer = buffer; + + if ( buffer ) { + buffer->Bind (); + } + } + + return buffer ? buffer->IsReady () : true; +} + +//----------------------------------------------------------------// +bool MOAIGfxStateCache::BindVertexFormat ( MOAIVertexFormat* format, bool copyBuffer ) { + + if ( this->mCurrentVtxFormat != format ) { + + this->GfxStateWillChange (); + + if ( this->mCurrentVtxFormat ) { + this->mCurrentVtxFormat->Unbind (); + } + + this->mCurrentVtxFormat = format; + + if ( format ) { + + assert ( this->mCurrentVtxBuffer ); // must currently have a valid vertex buffer bound (to receive the vertex format) + + format->Bind ( this->mCurrentVtxBuffer->GetBuffer (), copyBuffer ); + } + } + + return true; +} + +//----------------------------------------------------------------// +size_t MOAIGfxStateCache::CountTextureUnits () { + + return this->mTextureUnits.Size (); +} + +//----------------------------------------------------------------// +u32 MOAIGfxStateCache::GetBufferHeight () const { + + assert ( this->mCurrentFrameBuffer ); + return this->mCurrentFrameBuffer->mBufferHeight; +} + +//----------------------------------------------------------------// +u32 MOAIGfxStateCache::GetBufferWidth () const { + + assert ( this->mCurrentFrameBuffer ); + return this->mCurrentFrameBuffer->GetBufferWidth (); +} + +//----------------------------------------------------------------// +//float MOAIGfxStateCache::GetDeviceScale () { +// +// assert ( this->mCurrentFrameBuffer ); +// return this->mCurrentFrameBuffer->mBufferScale; +//} + +//----------------------------------------------------------------// +u32 MOAIGfxStateCache::GetShaderGlobalsMask () { + + return this->mShaderProgram ? this->mShaderProgram->GetGlobalsMask () : 0; +} + +//----------------------------------------------------------------// +float MOAIGfxStateCache::GetViewHeight () const { + + return this->mViewRect.Height (); +} + +//----------------------------------------------------------------// +//ZLQuad MOAIGfxStateCache::GetViewQuad () const { +// +// ZLQuad quad; +// +// ZLMatrix4x4 invMtx; +// invMtx.Inverse ( this->GetViewProjMtx ()); +// +// quad.mV [ 0 ].Init ( -1.0f, 1.0f ); +// quad.mV [ 1 ].Init ( 1.0f, 1.0f ); +// quad.mV [ 2 ].Init ( 1.0f, -1.0f ); +// quad.mV [ 3 ].Init ( -1.0f, -1.0f ); +// +// invMtx.TransformQuad ( quad.mV ); +// return quad; +//} + +//----------------------------------------------------------------// +//ZLRect MOAIGfxStateCache::GetViewRect () const { +// +// return this->mViewRect; +//} + +//----------------------------------------------------------------// +float MOAIGfxStateCache::GetViewWidth () const { + + return this->mViewRect.Width (); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::InitTextureUnits ( size_t nTextureUnits ) { + + this->mTextureUnits.Init ( nTextureUnits ); + this->mTextureUnits.Fill ( 0 ); +} + +//----------------------------------------------------------------// +MOAIGfxStateCache::MOAIGfxStateCache () : + mCullFunc ( 0 ), + mDepthFunc ( 0 ), + mDepthMask ( true ), + mBlendEnabled ( 0 ), + mPenWidth ( 1.0f ), + mScissorEnabled ( false ), + mShader ( 0 ), + mShaderProgram ( 0 ), + mActiveTextures ( 0 ), + mCurrentFrameBuffer ( 0 ), + mCurrentIdxBuffer ( 0 ), + mCurrentTexture ( 0 ), + mCurrentVtxArray ( 0 ), + mCurrentVtxBuffer ( 0 ), + mCurrentVtxFormat ( 0 ), + mClient ( 0 ) { + + this->mScissorRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); + this->mViewRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); + + RTTI_SINGLE ( MOAILuaObject ) +} + +//----------------------------------------------------------------// +MOAIGfxStateCache::~MOAIGfxStateCache () { +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::ResetState () { + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + ZGL_COMMENT ( gfx, "GFX RESET STATE" ); + + // clear the CPU matrix pipeline +// for ( u32 i = 0; i < TOTAL_VTX_TRANSFORMS; ++i ) { +// this->mVertexTransforms [ i ].Ident (); +// } +// this->mUVTransform.Ident (); +// this->mCpuVertexTransformMtx.Ident (); + + // reset the active texture + gfx.ActiveTexture ( 0 ); + gfx.BindTexture ( 0 ); + + // reset the shader + gfx.UseProgram ( 0 ); + + // turn off blending + gfx.Disable ( ZGL_PIPELINE_BLEND ); + this->mBlendEnabled = false; + + // disable backface culling + gfx.Disable ( ZGL_PIPELINE_CULL ); + this->mCullFunc = 0; + + // disable depth test + gfx.Disable ( ZGL_PIPELINE_DEPTH ); + this->mDepthFunc = 0; + + // disable depth write + gfx.DepthMask ( false ); + this->mDepthMask = false; + + // reset the pen width + this->mPenWidth = 1.0f; + gfx.LineWidth ( this->mPenWidth ); + + // reset the scissor rect + this->mScissorEnabled = false; + gfx.Disable ( ZGL_PIPELINE_SCISSOR ); + + for ( size_t i = 0; i < this->mTextureUnits.Size (); ++i ){ + gfx.ActiveTexture (( u32 )i ); + gfx.BindTexture ( 0 ); + this->mTextureUnits [ i ] = 0; + } + this->mActiveTextures = 0; + + this->mShaderProgram = 0; + this->mCurrentIdxBuffer = 0; + this->mCurrentTexture = 0; + this->mCurrentVtxArray = 0; + this->mCurrentVtxBuffer = 0; + this->mCurrentVtxFormat = 0; + + this->mCurrentFrameBuffer = this->mDefaultFrameBuffer; + gfx.BindFramebuffer ( ZGL_FRAMEBUFFER_TARGET_DRAW_READ, this->mCurrentFrameBuffer->mGLFrameBufferID ); + + ZGL_COMMENT ( gfx, "" ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetBlendMode () { + + if ( this->mBlendEnabled ) { + + this->GfxStateWillChange (); + + MOAIGfxMgr::GetDrawingAPI ().Disable ( ZGL_PIPELINE_BLEND ); + this->mBlendEnabled = false; + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetBlendMode ( const MOAIBlendMode& blendMode ) { + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + if ( !this->mBlendEnabled ) { + + this->GfxStateWillChange (); + + gfx.Enable ( ZGL_PIPELINE_BLEND ); + + this->mBlendMode = blendMode; + gfx.BlendMode ( this->mBlendMode.mEquation ); + gfx.BlendFunc ( this->mBlendMode.mSourceFactor, this->mBlendMode.mDestFactor ); + this->mBlendEnabled = true; + } + else if ( !this->mBlendMode.IsSame ( blendMode )) { + + this->GfxStateWillChange (); + + this->mBlendMode = blendMode; + gfx.BlendMode ( this->mBlendMode.mEquation ); + gfx.BlendFunc ( this->mBlendMode.mSourceFactor, this->mBlendMode.mDestFactor ); + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetBlendMode ( int srcFactor, int dstFactor, int equation ) { + + MOAIBlendMode blendMode; + blendMode.SetBlend ( srcFactor, dstFactor ); + blendMode.SetBlendEquation( equation ); + + this->SetBlendMode ( blendMode ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetClient () { + + this->SetClient ( 0 ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetClient ( MOAIGfxStateCacheClient* client ) { + + if ( this->mClient != client ) { + + this->GfxStateWillChange (); + this->mClient = client; + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetCullFunc () { + + this->SetCullFunc ( 0 ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetCullFunc ( int cullFunc ) { + + if ( this->mCullFunc != cullFunc ) { + + this->GfxStateWillChange (); + + this->mCullFunc = cullFunc; + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + if ( cullFunc ) { + gfx.Enable ( ZGL_PIPELINE_CULL ); + gfx.CullFace ( this->mCullFunc ); + } + else { + gfx.Disable ( ZGL_PIPELINE_CULL ); + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetDefaultFrameBuffer ( MOAILuaObject& owner, MOAIFrameBuffer* frameBuffer ) { + + this->mDefaultFrameBuffer.Set ( owner, frameBuffer ); + if ( !this->mCurrentFrameBuffer ) { + this->mCurrentFrameBuffer = this->mDefaultFrameBuffer; + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetDefaultTexture ( MOAILuaObject& owner, MOAITexture* texture ) { + + this->mDefaultTexture.Set ( owner, texture ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetDepthFunc () { + + this->SetDepthFunc ( 0 ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetDepthFunc ( int depthFunc ) { + + if ( this->mDepthFunc != depthFunc ) { + + this->GfxStateWillChange (); + + this->mDepthFunc = depthFunc; + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + if ( depthFunc ) { + gfx.Enable ( ZGL_PIPELINE_DEPTH ); + gfx.DepthFunc ( this->mDepthFunc ); + } + else { + gfx.Disable ( ZGL_PIPELINE_DEPTH ); + } + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetDepthMask ( bool depthMask ) { + + if ( this->mDepthMask != depthMask ) { + this->GfxStateWillChange (); + this->mDepthMask = depthMask; + MOAIGfxMgr::GetDrawingAPI ().DepthMask ( this->mDepthMask ); + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetPenWidth ( float penWidth ) { + + if ( this->mPenWidth != penWidth ) { + this->GfxStateWillChange (); + this->mPenWidth = penWidth; + MOAIGfxMgr::GetDrawingAPI ().LineWidth ( penWidth ); + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetScissorRect () { + + if ( this->mScissorEnabled ) { + MOAIGfxMgr::GetDrawingAPI ().Disable ( ZGL_PIPELINE_SCISSOR ); + this->mScissorEnabled = false; + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetScissorRect ( ZLRect rect ) { + + rect.Bless (); + this->mViewRect.Clip ( rect ); + + if ( !( this->mScissorEnabled && this->mScissorRect.IsEqual ( rect ))) { + + this->GfxStateWillChange (); + + ZLRect deviceRect = this->mCurrentFrameBuffer->WndRectToDevice ( rect ); + + s32 x = ( s32 )deviceRect.mXMin; + s32 y = ( s32 )deviceRect.mYMin; + + u32 w = ( u32 )( deviceRect.Width () + 0.5f ); + u32 h = ( u32 )( deviceRect.Height () + 0.5f ); + + w = h == 0 ? 0 : w; + h = w == 0 ? 0 : h; + + MOAIGfxMgr::GetDrawingAPI ().Scissor ( x, y, w, h ); + this->mScissorRect = rect; + } + + if ( !this->mScissorEnabled ) { + MOAIGfxMgr::GetDrawingAPI ().Enable ( ZGL_PIPELINE_SCISSOR ); + this->mScissorEnabled = true; + } +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetViewRect () { + + float width = ( float )this->mCurrentFrameBuffer->mBufferWidth; + float height = ( float )this->mCurrentFrameBuffer->mBufferHeight; + + MOAIViewport rect; + rect.Init ( 0.0f, 0.0f, width, height ); + + this->SetViewRect ( rect ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::SetViewRect ( ZLRect rect ) { + + ZLRect deviceRect; + + deviceRect = this->mCurrentFrameBuffer->WndRectToDevice ( rect ); + + s32 x = ( s32 )deviceRect.mXMin; + s32 y = ( s32 )deviceRect.mYMin; + + u32 w = ( u32 )( deviceRect.Width () + 0.5f ); + u32 h = ( u32 )( deviceRect.Height () + 0.5f ); + + MOAIGfxMgr::Get ().GetDrawingAPI ().Viewport ( x, y, w, h ); + + this->mViewRect = rect; +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::UnbindAll () { + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + ZGL_COMMENT ( gfx, "GFX UNBIND ALL" ); + + this->BindFrameBuffer (); + this->BindIndexBuffer (); + this->BindShader (); + this->BindTexture (); + this->BindVertexArray (); + this->BindVertexBuffer (); + this->BindVertexFormat (); + + ZGL_COMMENT ( gfx, "" ); +} + +//----------------------------------------------------------------// +void MOAIGfxStateCache::UpdateAndBindUniforms () { + + if ( this->mShader ) { + this->mShader->UpdateAndBindUniforms (); + } +} diff --git a/src/moai-sim/MOAIGfxStateCache.h b/src/moai-sim/MOAIGfxStateCache.h new file mode 100644 index 0000000000..3262da45e5 --- /dev/null +++ b/src/moai-sim/MOAIGfxStateCache.h @@ -0,0 +1,158 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIGFXSTATECACHE_H +#define MOAIGFXSTATECACHE_H + +#include +#include + +class MOAICamera; +class MOAIFrameBuffer; +class MOAIGfxResource; +class MOAIIndexBuffer; +class MOAIMultiTexture; +class MOAIShader; +class MOAIShaderProgram; +class MOAITexture; +class MOAISingleTexture; +class MOAITextureBase; +class MOAIVertexArray; +class MOAIVertexBuffer; +class MOAIVertexFormat; +class MOAIViewport; + +//================================================================// +// MOAIGfxStateCacheClient +//================================================================// +class MOAIGfxStateCacheClient { +protected: + + friend class MOAIGfxStateCache; + + //----------------------------------------------------------------// + MOAIGfxStateCacheClient (); + virtual ~MOAIGfxStateCacheClient (); + virtual void OnGfxStateWillChange (); +}; + +//================================================================// +// MOAIGfxStateCache +//================================================================// +class MOAIGfxStateCache : + public virtual MOAILuaObject { +protected: + + int mCullFunc; + + int mDepthFunc; + bool mDepthMask; + + MOAIBlendMode mBlendMode; + bool mBlendEnabled; + + float mPenWidth; + + bool mScissorEnabled; + ZLRect mScissorRect; + + MOAIShader* mShader; + MOAIShaderProgram* mShaderProgram; + + ZLLeanArray < MOAISingleTexture* > mTextureUnits; + u32 mActiveTextures; + + MOAIFrameBuffer* mCurrentFrameBuffer; + MOAIIndexBuffer* mCurrentIdxBuffer; + MOAITextureBase* mCurrentTexture; + MOAIVertexArray* mCurrentVtxArray; + MOAIVertexBuffer* mCurrentVtxBuffer; + MOAIVertexFormat* mCurrentVtxFormat; + + ZLRect mViewRect; + + MOAILuaSharedPtr < MOAIFrameBuffer > mDefaultFrameBuffer; + MOAILuaSharedPtr < MOAITexture > mDefaultTexture; + + MOAIGfxStateCacheClient* mClient; + + //----------------------------------------------------------------// + bool BindShaderProgram ( MOAIShaderProgram* program ); // only called by BindShader () + bool BindTexture ( u32 textureUnit, MOAISingleTexture* texture ); + +public: + + GET ( MOAIBlendMode, BlendMode, mBlendMode ) + GET ( bool, DepthMask, mDepthMask ) + GET ( MOAIFrameBuffer*, CurrentFrameBuffer, mCurrentFrameBuffer ) + GET ( const ZLRect&, ViewRect, mViewRect ) + GET ( MOAIFrameBuffer*, DefaultFrameBuffer, mDefaultFrameBuffer ) + GET ( MOAITexture*, DefaultTexture, mDefaultTexture ) + + //----------------------------------------------------------------// + bool BindFrameBuffer ( MOAIFrameBuffer* frameBuffer = 0 ); + bool BindIndexBuffer ( MOAIIndexBuffer* buffer = 0 ); + bool BindShader ( MOAIShader* shader = 0 ); + bool BindShader ( u32 preset ); + bool BindTexture ( MOAITextureBase* textureSet = 0 ); + bool BindVertexArray ( MOAIVertexArray* vtxArray = 0 ); + bool BindVertexBuffer ( MOAIVertexBuffer* buffer = 0 ); + bool BindVertexFormat ( MOAIVertexFormat* format = 0, bool copyBuffer = false ); + + size_t CountTextureUnits (); + + u32 GetBufferHeight () const; + u32 GetBufferWidth () const; + + //float GetDeviceScale (); + u32 GetShaderGlobalsMask (); + + float GetViewHeight () const; + float GetViewWidth () const; + + void InitTextureUnits ( size_t nTextureUnits ); + + MOAIGfxStateCache (); + virtual ~MOAIGfxStateCache (); + + void ResetState (); + + void SetBlendMode (); + void SetBlendMode ( const MOAIBlendMode& blendMode ); + void SetBlendMode ( int srcFactor, int dstFactor, int equation = ZGL_BLEND_MODE_ADD ); + + void SetClient (); + void SetClient ( MOAIGfxStateCacheClient* client ); + + void SetCullFunc (); + void SetCullFunc ( int cullFunc ); + + void SetDefaultFrameBuffer ( MOAILuaObject& owner, MOAIFrameBuffer* frameBuffer ); + void SetDefaultTexture ( MOAILuaObject& owner, MOAITexture* texture ); + + void SetDepthFunc (); + void SetDepthFunc ( int depthFunc ); + void SetDepthMask ( bool depthMask ); + + void SetPenWidth ( float penWidth ); + + void SetScissorRect (); + void SetScissorRect ( ZLRect rect ); + + void SetViewRect (); + void SetViewRect ( ZLRect rect ); + + void UnbindAll (); + void UpdateAndBindUniforms (); // call this immediately before drawing + + //----------------------------------------------------------------// + inline void GfxStateWillChange () { + + if ( this->mClient ) { + this->mClient->OnGfxStateWillChange (); + this->mClient = 0; + } + } +}; + +#endif diff --git a/src/moai-sim/MOAIGfxVertexCache.cpp b/src/moai-sim/MOAIGfxVertexCache.cpp new file mode 100644 index 0000000000..3ef737bec5 --- /dev/null +++ b/src/moai-sim/MOAIGfxVertexCache.cpp @@ -0,0 +1,521 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================// +// MOAIGfxVertexCache +//================================================================// + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::BeginPrim () { + + // TODO: this was commented out to deal with prims improperly batching in Vavius's + // spine implementation. this code did not handle indexed prims correctly. the + // fix was to introduce BeginPrimIndexed (). The TODO is to make sure that the + // original behavior is preserved, and to see if there's way to reconcile these + // ideas (to get back to one BeginPrim () to handle both cases). + +// if ( this->mPrimSize ) { +// +// u32 totalIndices = this->mIdxBuffer->GetLength () / INDEX_SIZE; +// u32 totalVertices = this->mVtxBuffer->GetLength() / this->mVertexSize; +// +// u32 maxVertices = MIN ( totalIndices, totalVertices ); +// +// this->mMaxPrims = ( u32 )( maxVertices / this->mPrimSize ); +// +// this->mPrimTopIdx = this->mIdxBuffer->GetCursor () + ( this->mPrimSize * INDEX_SIZE ); +// this->mPrimTopVtx = this->mVtxBuffer->GetCursor () + ( this->mPrimSize * this->mVertexSize ); +// } + + if ( this->mUseIdxBuffer ) { + this->FlushBufferedPrims (); + } + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + gfxMgr.mGfxState.SetShaderFlags ( gfxMgr.mGfxState.GetShaderGlobalsMask ()); + gfxMgr.mGfxState.SetClient ( this ); + + this->mUseIdxBuffer = false; +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::BeginPrim ( u32 primType, u32 primSize ) { + + this->SetPrimType ( primType, primSize ); + this->BeginPrim (); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::BeginPrimIndexed ( u32 primType, u32 vtxCount, u32 idxCount ) { + + this->SetPrimType ( primType ); + + if ( !this->mUseIdxBuffer || + (( this->mTotalIndices + idxCount ) > this->mMaxIndices ) || + (( this->mTotalVertices + vtxCount ) > this->mMaxVertices )) { + + this->FlushBufferedPrims (); + } + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + gfxMgr.mGfxState.SetShaderFlags ( gfxMgr.mGfxState.GetShaderGlobalsMask ()); + gfxMgr.mGfxState.SetClient ( this ); + + this->mUseIdxBuffer = true; + this->mIndexBase = ( u16 )( this->mTotalVertices ); + + this->mTotalIndices += idxCount; + this->mTotalVertices += vtxCount; +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::BindBufferedDrawing ( MOAIVertexFormat& format ) { + + this->mVertexFormat = &format; + this->mVertexSize = format.GetVertexSize (); + this->UpdateLimits (); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::BindBufferedDrawing ( u32 preset ) { + + MOAIVertexFormat* format = MOAIVertexFormatMgr::Get ().GetFormat ( preset ); + + assert ( format ); + this->BindBufferedDrawing ( *format ); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::EndPrim () { + + ++this->mPrimCount; + + if (( this->mPrimSize == 0 ) || ( this->mPrimCount >= this->mMaxPrims )) { + + // this forces a flush immediately + this->FlushBufferedPrims (); + } +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::EndPrimIndexed () { + +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::FlushBufferedPrims () { + + if (( !this->mIsDrawing ) && this->mVertexFormat && this->mVertexSize ) { + + this->mIsDrawing = true; + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + if ( this->mUseIdxBuffer ) { + + u32 count = ( u32 )( this->mIdxBuffer->GetCursor () / INDEX_SIZE ); + + if ( count > 0 ) { + + this->mVtxBuffer->OnGPUUpdate (); + this->mIdxBuffer->OnGPUUpdate (); + + //gfxCache.BindVertexFormat (); + + gfxMgr.mGfxState.BindVertexBuffer ( this->mVtxBuffer ); + gfxMgr.mGfxState.BindVertexFormat ( this->mVertexFormat, true ); + gfxMgr.mGfxState.BindIndexBuffer ( this->mIdxBuffer ); + + gfxMgr.mGfxState.UpdateAndBindUniforms (); + + ZLSharedConstBuffer* buffer = gfx.CopyBuffer ( this->mIdxBuffer->GetBuffer ()); + + gfx.DrawElements ( this->mPrimType, count, ZGL_TYPE_UNSIGNED_SHORT, buffer, 0 ); + //this->mDrawCount++; + } + } + else { + + u32 count = this->mPrimSize ? this->mPrimCount * this->mPrimSize : ( u32 )( this->mVtxBuffer->GetCursor () / this->mVertexSize ); + + if ( count > 0 ) { + + this->mVtxBuffer->OnGPUUpdate (); + + //gfxCache.BindVertexFormat (); + + gfxMgr.mGfxState.BindVertexBuffer ( this->mVtxBuffer ); + gfxMgr.mGfxState.BindVertexFormat ( this->mVertexFormat, true ); + + gfxMgr.mGfxState.UpdateAndBindUniforms (); + + gfx.DrawArrays ( this->mPrimType, 0, count ); + //this->mDrawCount++; + } + } + + this->mIsDrawing = false; + + this->mVtxBuffer->SetLength ( 0 ); + this->mIdxBuffer->SetLength ( 0 ); + +// this->mPrimTopIdx = 0; +// this->mPrimTopVtx = 0; + this->mPrimCount = 0; + + this->mPrimCount = 0; + this->mTotalIndices = 0; + this->mTotalVertices = 0; + + gfxMgr.mGfxState.SetShaderFlags ( 0 ); + } +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::InitBuffers () { + + if ( !this->mVtxBuffer ) { + + this->mVtxBuffer = new MOAIVertexBuffer (); + this->mIdxBuffer = new MOAIIndexBuffer (); + + this->mVtxBuffer->Reserve ( DEFAULT_VERTEX_BUFFER_SIZE ); + this->mIdxBuffer->Reserve ( DEFAULT_INDEX_BUFFER_SIZE ); + + this->mVtxBuffer->SetCopyOnUpdate ( true ); + this->mIdxBuffer->SetCopyOnUpdate ( true ); + } +} + +//----------------------------------------------------------------// +MOAIGfxVertexCache::MOAIGfxVertexCache () : + mIsDrawing ( false ), + mUseIdxBuffer ( false ), + mVtxBuffer ( 0 ), + mIdxBuffer ( 0 ), + mVertexSize ( 0 ), + mMaxVertices ( 0 ), + mMaxIndices ( 0 ), + mMaxPrims ( 0 ), + mPrimCount ( 0 ), + mPrimSize ( 0 ), + mPrimType ( 0xffffffff ), + mTotalVertices ( 0 ), + mTotalIndices ( 0 ), + mVertexFormat ( 0 ), + mApplyVertexTransform ( false ), + mApplyUVTransform ( false ), + mVertexColor32 ( 0xffffffff ) { + + this->mVertexTransform.Ident (); + this->mUVTransform.Ident (); + + this->mVertexColor.Set ( 1.0f, 1.0f, 1.0f, 1.0f ); +} + +//----------------------------------------------------------------// +MOAIGfxVertexCache::~MOAIGfxVertexCache () { + + if ( this->mVtxBuffer ) { + + delete this->mVtxBuffer; + delete this->mIdxBuffer; + } +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::OnGfxStateWillChange () { + + this->FlushBufferedPrims (); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::SetPrimType ( u32 primType, u32 primSize ) { + + if ( !primSize ) { + + switch ( primType ) { + + case ZGL_PRIM_LINES: + primSize = 2; + break; + + case ZGL_PRIM_TRIANGLES: + primSize = 3; + break; + + case ZGL_PRIM_POINTS: + case ZGL_PRIM_LINE_LOOP: + case ZGL_PRIM_LINE_STRIP: + case ZGL_PRIM_TRIANGLE_FAN: + case ZGL_PRIM_TRIANGLE_STRIP: + default: + break; + } + } + + if (( this->mPrimType != primType ) || ( this->mPrimSize != primSize )) { + + this->FlushBufferedPrims (); + + this->mPrimType = primType; + this->mPrimSize = primSize; + this->UpdateLimits (); + } +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::SetUVTransform () { + + this->mApplyUVTransform = false; + this->mUVTransform.Ident (); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::SetUVTransform ( const ZLMatrix4x4& uvTransform ) { + + this->mApplyUVTransform = !uvTransform.IsIdent (); + this->mUVTransform = uvTransform; +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::SetVertexTransform () { + + this->mApplyVertexTransform = false; + this->mVertexTransform.Ident (); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::SetVertexTransform ( const ZLMatrix4x4& vertexTransform ) { + + this->mApplyVertexTransform = !vertexTransform.IsIdent (); + this->mVertexTransform = vertexTransform; +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::TransformAndWriteQuad ( ZLVec4D* vtx, ZLVec2D* uv ) { + + if ( this->mApplyVertexTransform ) { + this->mVertexTransform.TransformQuad ( vtx ); + } + + if ( this->mApplyUVTransform ) { + this->mUVTransform.TransformQuad ( uv ); + } + +// u32 base = this->mVtxBuffer->GetCursor () / this->mVertexSize; + this->BeginPrimIndexed ( ZGL_PRIM_TRIANGLES, 4, 6 ); + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + + // left top + this->mVtxBuffer->Write ( vtx [ 0 ]); + this->mVtxBuffer->Write ( uv [ 0 ]); + this->mVtxBuffer->Write < u32 >( this->mVertexColor32 ); + + // right top + this->mVtxBuffer->Write ( vtx [ 1 ]); + this->mVtxBuffer->Write ( uv [ 1 ]); + this->mVtxBuffer->Write < u32 >( this->mVertexColor32 ); + + // right bottom + this->mVtxBuffer->Write ( vtx[ 2 ]); + this->mVtxBuffer->Write ( uv [ 2 ]); + this->mVtxBuffer->Write < u32 >( this->mVertexColor32 ); + + // left bottom + this->mVtxBuffer->Write ( vtx [ 3 ]); + this->mVtxBuffer->Write ( uv [ 3 ]); + this->mVtxBuffer->Write < u32 >( this->mVertexColor32 ); + + // indices + this->WriteIndex ( 0 ); // left top + this->WriteIndex ( 3 ); // left bottom + this->WriteIndex ( 2 ); // right bottom + + this->WriteIndex ( 0 ); // left top + this->WriteIndex ( 2 ); // right bottom + this->WriteIndex ( 1 ); // right top + + this->EndPrimIndexed (); +} + +//----------------------------------------------------------------// +//void MOAIGfxVertexCache::UnbindBufferedDrawing () { +// +// MOAIGfxStateCache& gfxCache = MOAIGfxStateCache::Get (); +// +// this->FlushBufferedPrims (); +// +// this->BindVertexBuffer (); +// this->BindIndexBuffer (); +// +// this->mVertexFormat = 0; +// this->mVertexSize = 0; +//} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::UpdateLimits () { + + u32 primSize = this->mPrimSize ? this->mPrimSize : 1; + u32 vertexSize = this->mVertexSize ? this->mVertexSize : 1; + + this->mMaxIndices = ( u32 )( this->mIdxBuffer->GetSize () / INDEX_SIZE ); + this->mMaxVertices = ( u32 )( this->mVtxBuffer->GetSize () / vertexSize ); + + u32 maxElements = MIN ( this->mMaxIndices, this->mMaxVertices ); + this->mMaxPrims = ( u32 )( maxElements / primSize ); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv ) { + + ZLVec4D vtxBuffer [ 4 ]; + + vtxBuffer [ 0 ].mX = vtx [ 0 ].mX; + vtxBuffer [ 0 ].mY = vtx [ 0 ].mY; + vtxBuffer [ 0 ].mZ = 0.0f; + vtxBuffer [ 0 ].mW = 1.0f; + + vtxBuffer [ 1 ].mX = vtx [ 1 ].mX; + vtxBuffer [ 1 ].mY = vtx [ 1 ].mY; + vtxBuffer [ 1 ].mZ = 0.0f; + vtxBuffer [ 1 ].mW = 1.0f; + + vtxBuffer [ 2 ].mX = vtx [ 2 ].mX; + vtxBuffer [ 2 ].mY = vtx [ 2 ].mY; + vtxBuffer [ 2 ].mZ = 0.0f; + vtxBuffer [ 2 ].mW = 1.0f; + + vtxBuffer [ 3 ].mX = vtx [ 3 ].mX; + vtxBuffer [ 3 ].mY = vtx [ 3 ].mY; + vtxBuffer [ 3 ].mZ = 0.0f; + vtxBuffer [ 3 ].mW = 1.0f; + + ZLVec2D uvBuffer [ 4 ]; + memcpy ( uvBuffer, uv, sizeof ( ZLVec2D ) * 4 ); + + this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff ) { + + ZLVec4D vtxBuffer [ 4 ]; + + vtxBuffer [ 0 ].mX = vtx [ 0 ].mX + xOff; + vtxBuffer [ 0 ].mY = vtx [ 0 ].mY + yOff; + vtxBuffer [ 0 ].mZ = zOff; + vtxBuffer [ 0 ].mW = 1.0f; + + vtxBuffer [ 1 ].mX = vtx [ 1 ].mX + xOff; + vtxBuffer [ 1 ].mY = vtx [ 1 ].mY + yOff; + vtxBuffer [ 1 ].mZ = zOff; + vtxBuffer [ 1 ].mW = 1.0f; + + vtxBuffer [ 2 ].mX = vtx [ 2 ].mX + xOff; + vtxBuffer [ 2 ].mY = vtx [ 2 ].mY + yOff; + vtxBuffer [ 2 ].mZ = zOff; + vtxBuffer [ 2 ].mW = 1.0f; + + vtxBuffer [ 3 ].mX = vtx [ 3 ].mX + xOff; + vtxBuffer [ 3 ].mY = vtx [ 3 ].mY + yOff; + vtxBuffer [ 3 ].mZ = zOff; + vtxBuffer [ 3 ].mW = 1.0f; + + ZLVec2D uvBuffer [ 4 ]; + memcpy ( uvBuffer, uv, sizeof ( ZLVec2D ) * 4 ); + + this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale ) { + + ZLVec4D vtxBuffer [ 4 ]; + + vtxBuffer [ 0 ].mX = ( vtx [ 0 ].mX * xScale ) + xOff; + vtxBuffer [ 0 ].mY = ( vtx [ 0 ].mY * yScale ) + yOff; + vtxBuffer [ 0 ].mZ = zOff; + vtxBuffer [ 0 ].mW = 1.0f; + + vtxBuffer [ 1 ].mX = ( vtx [ 1 ].mX * xScale ) + xOff; + vtxBuffer [ 1 ].mY = ( vtx [ 1 ].mY * yScale ) + yOff; + vtxBuffer [ 1 ].mZ = zOff; + vtxBuffer [ 1 ].mW = 1.0f; + + vtxBuffer [ 2 ].mX = ( vtx [ 2 ].mX * xScale ) + xOff; + vtxBuffer [ 2 ].mY = ( vtx [ 2 ].mY * yScale ) + yOff; + vtxBuffer [ 2 ].mZ = zOff; + vtxBuffer [ 2 ].mW = 1.0f; + + vtxBuffer [ 3 ].mX = ( vtx [ 3 ].mX * xScale ) + xOff; + vtxBuffer [ 3 ].mY = ( vtx [ 3 ].mY * yScale ) + yOff; + vtxBuffer [ 3 ].mZ = zOff; + vtxBuffer [ 3 ].mW = 1.0f; + + ZLVec2D uvBuffer [ 4 ]; + memcpy ( uvBuffer, uv, sizeof ( ZLVec2D ) * 4 ); + + this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); +} + +//----------------------------------------------------------------// +void MOAIGfxVertexCache::WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale, float uOff, float vOff, float uScale, float vScale ) { + + ZLVec4D vtxBuffer [ 4 ]; + + vtxBuffer [ 0 ].mX = ( vtx [ 0 ].mX * xScale ) + xOff; + vtxBuffer [ 0 ].mY = ( vtx [ 0 ].mY * yScale ) + yOff; + vtxBuffer [ 0 ].mZ = zOff; + vtxBuffer [ 0 ].mW = 1.0f; + + vtxBuffer [ 1 ].mX = ( vtx [ 1 ].mX * xScale ) + xOff; + vtxBuffer [ 1 ].mY = ( vtx [ 1 ].mY * yScale ) + yOff; + vtxBuffer [ 1 ].mZ = zOff; + vtxBuffer [ 1 ].mW = 1.0f; + + vtxBuffer [ 2 ].mX = ( vtx [ 2 ].mX * xScale ) + xOff; + vtxBuffer [ 2 ].mY = ( vtx [ 2 ].mY * yScale ) + yOff; + vtxBuffer [ 2 ].mZ = zOff; + vtxBuffer [ 2 ].mW = 1.0f; + + vtxBuffer [ 3 ].mX = ( vtx [ 3 ].mX * xScale ) + xOff; + vtxBuffer [ 3 ].mY = ( vtx [ 3 ].mY * yScale ) + yOff; + vtxBuffer [ 3 ].mZ = zOff; + vtxBuffer [ 3 ].mW = 1.0f; + + ZLVec2D uvBuffer [ 4 ]; + + uvBuffer [ 0 ].mX = ( uv [ 0 ].mX * uScale ) + uOff; + uvBuffer [ 0 ].mY = ( uv [ 0 ].mY * vScale ) + vOff; + + uvBuffer [ 1 ].mX = ( uv [ 1 ].mX * uScale ) + uOff; + uvBuffer [ 1 ].mY = ( uv [ 1 ].mY * vScale ) + vOff; + + uvBuffer [ 2 ].mX = ( uv [ 2 ].mX * uScale ) + uOff; + uvBuffer [ 2 ].mY = ( uv [ 2 ].mY * vScale ) + vOff; + + uvBuffer [ 3 ].mX = ( uv [ 3 ].mX * uScale ) + uOff; + uvBuffer [ 3 ].mY = ( uv [ 3 ].mY * vScale ) + vOff; + + this->TransformAndWriteQuad ( vtxBuffer, uvBuffer ); +} diff --git a/src/moai-sim/MOAIGfxVertexCache.h b/src/moai-sim/MOAIGfxVertexCache.h new file mode 100644 index 0000000000..83d3fb261b --- /dev/null +++ b/src/moai-sim/MOAIGfxVertexCache.h @@ -0,0 +1,221 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIGFXVERTEXCACHE_H +#define MOAIGFXVERTEXCACHE_H + +#include +#include +#include + +class MOAICamera; +class MOAIFrameBuffer; +class MOAIGfxResource; +class MOAIMultiTexture; +class MOAIShader; +class MOAIShaderProgram; +class MOAITexture; +class MOAISingleTexture; +class MOAIVertexFormat; +class MOAIViewport; + +//================================================================// +// MOAIGfxVertexCache +//================================================================// +class MOAIGfxVertexCache : + virtual public MOAIGfxStateCacheClient { +protected: + + friend class MOAIGfxGlobalsCache; + friend class MOAIGfxStateCache; + + // Stock OpenGL ES 2.0 has no support for u32 index size in glDrawElements. + // iOS and many Androids (PowerVR, adreno) support it with GL_OES_element_index_uint extension. + // We can check extension availability, but using u16 index is fine for the current buffer size (~1000 vertices). + static const size_t INDEX_SIZE = 2; + + static const size_t DEFAULT_VERTEX_BUFFER_SIZE = 0x8000; + static const size_t DEFAULT_INDEX_BUFFER_SIZE = 0x1000; + + bool mIsDrawing; + bool mUseIdxBuffer; + + MOAIVertexBuffer* mVtxBuffer; + MOAIIndexBuffer* mIdxBuffer; + + u32 mVertexSize; + + u32 mMaxVertices; + u32 mMaxIndices; + u32 mMaxPrims; + + u32 mPrimCount; + u32 mPrimSize; +// u32 mPrimTopIdx; +// u32 mPrimTopVtx; + u32 mPrimType; + + u32 mTotalVertices; + u32 mTotalIndices; + u16 mIndexBase; + + MOAIVertexFormat* mVertexFormat; + + bool mApplyVertexTransform; + ZLMatrix4x4 mVertexTransform; + + bool mApplyUVTransform; + ZLMatrix4x4 mUVTransform; + + ZLColorVec mVertexColor; + u32 mVertexColor32; + + //----------------------------------------------------------------// + void OnGfxStateWillChange (); + void TransformAndWriteQuad ( ZLVec4D* vtx, ZLVec2D* uv ); + void UpdateLimits (); + +public: + + //----------------------------------------------------------------// + void BeginPrim (); + void BeginPrim ( u32 primType, u32 primSize = 0 ); + void BeginPrimIndexed ( u32 primType, u32 vtxCount, u32 idxCount ); + + void BindBufferedDrawing ( MOAIVertexFormat& format ); + void BindBufferedDrawing ( u32 preset ); + + void EndPrim (); + void EndPrimIndexed (); + + void FlushBufferedPrims (); + + void InitBuffers (); + + MOAIGfxVertexCache (); + ~MOAIGfxVertexCache (); + + void SetPrimType ( u32 primType, u32 primSize = 0 ); + + void SetUVTransform (); + void SetUVTransform ( const ZLMatrix4x4& uvTransform ); + void SetVertexTransform (); + void SetVertexTransform ( const ZLMatrix4x4& vertexTransform ); + + //void UnbindBufferedDrawing (); + void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv ); + void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff ); + void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale ); + void WriteQuad ( const ZLVec2D* vtx, const ZLVec2D* uv, float xOff, float yOff, float zOff, float xScale, float yScale, float uOff, float vOff, float uScale, float vScale ); + + //----------------------------------------------------------------// +// inline void WriteColor ( float r, float g, float b, float a ) { +// UNUSED ( r ); +// UNUSED ( g ); +// UNUSED ( b ); +// UNUSED ( a ); +// } + + //----------------------------------------------------------------// + inline void WritePenColor4b () { + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + this->mVtxBuffer->Write < u32 >( this->mVertexColor32 ); + } + + //----------------------------------------------------------------// + inline void WritePenColor4f () { + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + this->mVtxBuffer->Write < ZLColorVec >( this->mVertexColor ); + } + + //----------------------------------------------------------------// + inline void WriteIndex ( u16 index ) { + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + this->mIdxBuffer->Write < u16 >( this->mIndexBase + index ); + } + + //----------------------------------------------------------------// + inline void WriteUV ( float u, float v ) { + + ZLVec2D uv; + uv.mX = u; + uv.mY = v; + + if ( this->mApplyUVTransform ) { + this->mUVTransform.Transform ( uv ); + } + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + this->mVtxBuffer->Write < ZLVec2D >( uv ); + } + + //----------------------------------------------------------------// + inline void WriteUV ( ZLVec2D uv ) { + + if ( this->mApplyUVTransform ) { + this->mUVTransform.Transform ( uv ); + } + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + this->mVtxBuffer->Write < ZLVec2D >( uv ); + } + + //----------------------------------------------------------------// + inline void WriteVtx ( float x, float y ) { + + this->WriteVtx ( x, y, 0.0f, 1.0f ); + } + + //----------------------------------------------------------------// + inline void WriteVtx ( float x, float y, float z ) { + + this->WriteVtx ( x, y, z, 1.0f ); + } + + //----------------------------------------------------------------// + inline void WriteVtx ( float x, float y, float z, float w ) { + + ZLVec4D vtx; + vtx.mX = x; + vtx.mY = y; + vtx.mZ = z; + vtx.mW = w; + + if ( this->mApplyVertexTransform ) { + this->mVertexTransform.Transform ( vtx ); + } + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + this->mVtxBuffer->Write < ZLVec4D >( vtx ); + } + + //----------------------------------------------------------------// + inline void WriteVtx ( ZLVec2D vtx ) { + + this->WriteVtx ( vtx.mX, vtx.mY, 0.0f ); + } + + //----------------------------------------------------------------// + inline void WriteVtx ( ZLVec3D vtx ) { + + this->WriteVtx ( vtx.mX, vtx.mY, vtx.mZ ); + } + + //----------------------------------------------------------------// + inline void WriteVtxRaw ( float x, float y, float z, float w ) { + + ZLVec4D vtx; + vtx.mX = x; + vtx.mY = y; + vtx.mZ = z; + vtx.mW = w; + + // TODO: put back an optimized write (i.e. WriteUnsafe or an equivalent) + this->mVtxBuffer->Write < ZLVec4D >( vtx ); + } +}; + +#endif diff --git a/src/moai-sim/MOAIGlyph.cpp b/src/moai-sim/MOAIGlyph.cpp index ffc91966d0..48cb78cf11 100644 --- a/src/moai-sim/MOAIGlyph.cpp +++ b/src/moai-sim/MOAIGlyph.cpp @@ -3,6 +3,7 @@ #include "pch.h" #include +#include #include #include #include @@ -14,8 +15,8 @@ //----------------------------------------------------------------// void MOAIGlyph::Draw ( MOAISingleTexture& texture, float x, float y, float xScale, float yScale, const ZLRect& padding ) const { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.SetTexture ( &texture ); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + if ( !gfxMgr.mGfxState.BindTexture ( &texture )) return; MOAIQuadBrush glQuad; @@ -29,6 +30,7 @@ void MOAIGlyph::Draw ( MOAISingleTexture& texture, float x, float y, float xScal y + (( this->mHeight + padding.mYMax ) * yScale ) ); + // calculate this dynamically as the texture size may change float uScale = 1.0f / texture.GetWidth (); float vScale = 1.0f / texture.GetHeight (); @@ -44,11 +46,17 @@ void MOAIGlyph::Draw ( MOAISingleTexture& texture, float x, float y, float xScal glQuad.Draw (); } +//----------------------------------------------------------------// +ZLRect MOAIGlyph::GetGlyphLogicalRect ( float x, float y, float xScale, float yScale ) const { + + return this->GetLogicalRect ( x, y, this->mDeck->GetAscent (), this->mDeck->GetDescent (), xScale, yScale ); +} + //----------------------------------------------------------------// MOAIKernVec MOAIGlyph::GetKerning ( u32 name ) const { - u32 total = this->mKernTable.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mKernTable.Size (); + for ( size_t i = 0; i < total; ++i ) { MOAIKernVec& kernVec = this->mKernTable [ i ]; if ( kernVec.mName == name ) { @@ -64,38 +72,14 @@ MOAIKernVec MOAIGlyph::GetKerning ( u32 name ) const { return kernVec; } -//----------------------------------------------------------------// -/** - * Get the rect of the glyph which includes the bearing + the size of the bounding box of the glyph. - * - * @param x The x pen position when drawing this glyph - * @param y The y pen position when drawing this glyph - * @param scale The scale at which the glyph would be drawn - */ -ZLRect MOAIGlyph::GetRect ( float x, float y, float xScale, float yScale ) const { - - x += this->mBearingX * xScale; - y -= this->mBearingY * yScale; - - ZLRect rect; - - rect.Init ( - x, - y, - x + ( this->mWidth * xScale ), - y + ( this->mHeight * yScale ) - ); - - return rect; -} - //----------------------------------------------------------------// MOAIGlyph::MOAIGlyph () : mCode ( NULL_CODE_ID ), mPageID ( NULL_PAGE_ID ), mSrcX ( 0 ), mSrcY ( 0 ), - mNext ( 0 ) { + mNext ( 0 ), + mDeck ( 0 ) { } //----------------------------------------------------------------// @@ -125,10 +109,10 @@ void MOAIGlyph::SerializeIn ( MOAILuaState& state ) { if ( state.GetFieldWithType ( -1, "mKernTable", LUA_TTABLE )) { - u32 size = lua_objlen ( state, -1 ); + int size = ( int )lua_objlen ( state, -1 ); // TODO: cast this->mKernTable.Init ( size ); - for ( u32 i = 0; i < size; ++i ) { + for ( int i = 0; i < size; ++i ) { if ( state.GetFieldWithType ( -1, i + 1, LUA_TTABLE )) { @@ -181,12 +165,12 @@ void MOAIGlyph::SetKernVec ( u32 id, const MOAIKernVec& kernVec ) { } //----------------------------------------------------------------// -void MOAIGlyph::SetScreenRect ( float width, float height, float yOff ) { - - this->mWidth = width; - this->mHeight = height; - this->mBearingY = -yOff; -} +//void MOAIGlyph::SetScreenRect ( float width, float height, float yOff ) { +// +// this->mWidth = width; +// this->mHeight = height; +// this->mBearingY = -yOff; +//} //----------------------------------------------------------------// void MOAIGlyph::SetSourceLoc ( u32 srcX, u32 srcY ) { diff --git a/src/moai-sim/MOAIGlyph.h b/src/moai-sim/MOAIGlyph.h index 87dc33ef66..df32ed7506 100644 --- a/src/moai-sim/MOAIGlyph.h +++ b/src/moai-sim/MOAIGlyph.h @@ -7,6 +7,7 @@ #include class MOAIDynamicGlyphCachePage; +class MOAIGlyphSet; class MOAISingleTexture; //================================================================// @@ -17,7 +18,6 @@ class MOAIGlyph : private: static const u32 MAX_KERN_TABLE_SIZE = 512; - static const u32 NULL_CODE_ID = 0xffffffff; static const u32 NULL_PAGE_ID = 0xffffffff; u32 mCode; // The character code of the glyph @@ -28,10 +28,13 @@ class MOAIGlyph : ZLLeanArray < MOAIKernVec > mKernTable; - MOAIGlyph* mNext; // for use in glyph processing list + MOAIGlyph* mNext; // for use in glyph processing list + MOAIGlyphSet* mDeck; public: + static const u32 NULL_CODE_ID = 0xffffffff; + // TODO: this is a lot of friends; good idea to clean this up friend class MOAIBitmapFontReader; friend class MOAIFont; @@ -40,31 +43,28 @@ class MOAIGlyph : friend class MOAIGlyphCache; friend class MOAIDynamicGlyphCachePage; friend class MOAITextLabel; - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextLayout; friend class MOAITextStyleParser; - GET ( u32, SrcX, mSrcX ); - GET ( u32, SrcY, mSrcY ); - GET ( float, Width, mWidth ); - GET ( float, Height, mHeight ); + GET ( u32, SrcX, mSrcX ) + GET ( u32, SrcY, mSrcY ) + GET_SET ( u32, Code, mCode ) + GET_SET ( u32, PageID, mPageID ) + GET_CONST ( MOAIGlyphSet&, Deck, *mDeck ) - GET_SET ( u32, Code, mCode ); - GET_SET ( u32, PageID, mPageID ); - GET_SET ( float, AdvanceX, mAdvanceX ); - //----------------------------------------------------------------// - void Draw ( MOAISingleTexture& texture, float x, float y, float xScale, float yScale, const ZLRect& padding ) const; - MOAIKernVec GetKerning ( u32 name ) const; - ZLRect GetRect ( float x, float y, float xScale = 1.0f, float yScale = 1.0f ) const; - MOAIGlyph (); - ~MOAIGlyph (); - void ReserveKernTable ( u32 total ); - void SerializeIn ( MOAILuaState& state ); - void SerializeOut ( MOAILuaState& state ); - void SetKernVec ( u32 id, const MOAIKernVec& kernVec ); - void SetScreenRect ( float width, float height, float yOff ); - void SetSourceLoc ( u32 srcX, u32 srcY ); + void Draw ( MOAISingleTexture& texture, float x, float y, float xScale, float yScale, const ZLRect& padding ) const; + ZLRect GetGlyphLogicalRect ( float x, float y, float xScale = 1.0f, float yScale = 1.0f ) const; + MOAIKernVec GetKerning ( u32 name ) const; + MOAIGlyph (); + ~MOAIGlyph (); + void ReserveKernTable ( u32 total ); + void SerializeIn ( MOAILuaState& state ); + void SerializeOut ( MOAILuaState& state ); + void SetKernVec ( u32 id, const MOAIKernVec& kernVec ); + //void SetScreenRect ( float width, float height, float yOff ); + void SetSourceLoc ( u32 srcX, u32 srcY ); }; #endif diff --git a/src/moai-sim/MOAIGlyphSet.cpp b/src/moai-sim/MOAIGlyphSet.cpp index 39016fe776..1e71dab36d 100644 --- a/src/moai-sim/MOAIGlyphSet.cpp +++ b/src/moai-sim/MOAIGlyphSet.cpp @@ -14,6 +14,8 @@ const MOAIGlyph& MOAIGlyphSet::AffirmGlyph ( u32 c ) { if ( !this->mGlyphMap.contains ( c )) { MOAIGlyph& glyph = this->mGlyphMap [ c ]; + + glyph.mDeck = this; glyph.mNext = this->mPending; this->mPending = &glyph; glyph.mCode = c; @@ -29,6 +31,8 @@ MOAIGlyph& MOAIGlyphSet::EditGlyph ( u32 c ) { if ( !this->mGlyphMap.contains ( c )) { MOAIGlyph& glyph = this->mGlyphMap [ c ]; + + glyph.mDeck = this; glyph.mNext = this->mGlyphs; this->mGlyphs = &glyph; glyph.mCode = c; @@ -70,6 +74,7 @@ void MOAIGlyphSet::SerializeIn ( MOAILuaState& state ) { u32 c = state.GetValue < u32 >( -2, 0 ); MOAIGlyph& glyph = this->mGlyphMap [ c ]; glyph.SerializeIn ( state ); + glyph.mDeck = this; } state.Pop ( 1 ); } diff --git a/src/moai-sim/MOAIGlyphSet.h b/src/moai-sim/MOAIGlyphSet.h index e78b16a4a3..9e0a2827a8 100644 --- a/src/moai-sim/MOAIGlyphSet.h +++ b/src/moai-sim/MOAIGlyphSet.h @@ -14,7 +14,7 @@ class MOAIGlyphSet : private: friend class MOAIFont; - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; float mSize; @@ -32,16 +32,15 @@ class MOAIGlyphSet : public: - GET_SET ( float, Size, mSize ); - GET_SET ( float, Height, mHeight ); - GET_SET ( float, Ascent, mAscent ); + GET_SET_CONST ( float, Size, mSize ); + GET_SET_CONST ( float, Height, mHeight ); //----------------------------------------------------------------// - MOAIGlyph* GetGlyph ( u32 c ); - MOAIGlyphSet (); - ~MOAIGlyphSet (); - void SerializeIn ( MOAILuaState& state ); - void SerializeOut ( MOAILuaState& state ); + MOAIGlyph* GetGlyph ( u32 c ); + MOAIGlyphSet (); + ~MOAIGlyphSet (); + void SerializeIn ( MOAILuaState& state ); + void SerializeOut ( MOAILuaState& state ); }; #endif diff --git a/src/moai-sim/MOAIGraphicsProp.cpp b/src/moai-sim/MOAIGraphicsProp.cpp index 08235f578f..547961d0bb 100644 --- a/src/moai-sim/MOAIGraphicsProp.cpp +++ b/src/moai-sim/MOAIGraphicsProp.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include @@ -26,6 +26,61 @@ // local //================================================================// +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGraphicsProp::_getBillboard ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGraphicsProp, "U" ) + + state.Push ( self->mBillboard ); + return 1; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGraphicsProp::_getBlendEquation ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGraphicsProp, "U" ) + + state.Push ( self->mBlendMode.mEquation ); + return 1; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGraphicsProp::_getBlendMode ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGraphicsProp, "U" ) + + state.Push ( self->mBlendMode.mSourceFactor ); + state.Push ( self->mBlendMode.mDestFactor ); + return 2; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGraphicsProp::_getCullMode ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGraphicsProp, "U" ) + + state.Push ( self->mCullMode ); + return 1; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGraphicsProp::_getDepthMask ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGraphicsProp, "U" ) + + state.Push ( self->mDepthMask ); + return 1; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIGraphicsProp::_getDepthTest ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIGraphicsProp, "U" ) + + state.Push ( self->mDepthTest ); + return 1; +} + //----------------------------------------------------------------// /** @name getIndexBatchSize @text Return the index batch size of the material batch attached @@ -597,7 +652,7 @@ void MOAIGraphicsProp::DrawDebug ( int subPrimID, float lod ) { if ( this->GetBoundsStatus () != BOUNDS_OK ) return; - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAIDebugLines& debugLines = MOAIDebugLines::Get (); MOAIDraw& draw = MOAIDraw::Get (); @@ -607,7 +662,7 @@ void MOAIGraphicsProp::DrawDebug ( int subPrimID, float lod ) { this->LoadVertexTransform (); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); ZLBox modelBounds; this->OnGetModelBounds ( modelBounds ); @@ -625,7 +680,7 @@ void MOAIGraphicsProp::DrawDebug ( int subPrimID, float lod ) { } // clear out the world transform (draw in world space) - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::VIEW_PROJ_MTX )); if ( debugLines.Bind ( MOAIDebugLines::PROP_WORLD_BOUNDS )) { draw.DrawBoxOutline ( this->GetBounds ()); @@ -751,7 +806,7 @@ ZLMatrix4x4 MOAIGraphicsProp::GetWorldDrawingMtx () { case BILLBOARD_SCREEN: { - MOAIGfxDevice::Get ().GetWorldToWndMtx (); + //MOAIGfxMgr::Get ().GetWorldToWndMtx (); ZLMatrix4x4 viewProjMtx = camera->GetWorldToWndMtx ( *viewport ); @@ -820,56 +875,42 @@ bool MOAIGraphicsProp::IsVisible ( float lod ) { //----------------------------------------------------------------// void MOAIGraphicsProp::LoadGfxState () { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - //MOAIDeckGfxState gfxState; - - // TODO: deck resolves when drawing - - //if ( this->mDeck ) { - // this->mDeck->GetGfxState ( MOAIDeckRemapper::Remap ( this->mRemapper, this->mIndex ), gfxState ); - //} - - //gfxState.SetShader ( this->mShader ); - //gfxState.SetTexture ( this->mTexture ); - - //gfxDevice.SetShader ( gfxState.GetShader ()); - //gfxDevice.SetGfxState ( gfxState.GetTexture ()); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetPenColor ( this->mColor ); - gfxDevice.SetCullFunc ( this->mCullMode ); - gfxDevice.SetDepthFunc ( this->mDepthTest ); - gfxDevice.SetDepthMask ( this->mDepthMask ); - gfxDevice.SetBlendMode ( this->mBlendMode ); + gfxMgr.mGfxState.SetPenColor ( this->mColor ); + gfxMgr.mGfxState.SetCullFunc ( this->mCullMode ); + gfxMgr.mGfxState.SetDepthFunc ( this->mDepthTest ); + gfxMgr.mGfxState.SetDepthMask ( this->mDepthMask ); + gfxMgr.mGfxState.SetBlendMode ( this->mBlendMode ); if ( this->mScissorRect ) { - ZLRect scissorRect = this->mScissorRect->GetScissorRect ( gfxDevice.GetWorldToWndMtx ()); - gfxDevice.SetScissorRect ( scissorRect ); + ZLRect scissorRect = this->mScissorRect->GetScissorRect ( gfxMgr.mGfxState.GetWorldToWndMtx ()); + gfxMgr.mGfxState.SetScissorRect ( scissorRect ); } else { - gfxDevice.SetScissorRect (); + gfxMgr.mGfxState.SetScissorRect (); } } //----------------------------------------------------------------// void MOAIGraphicsProp::LoadUVTransform () { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); if ( this->mUVTransform ) { ZLAffine3D uvMtx = this->mUVTransform->GetLocalToWorldMtx (); - gfxDevice.SetUVTransform ( uvMtx ); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::UV_MTX, uvMtx ); } else { - gfxDevice.SetUVTransform (); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::UV_MTX ); } } //----------------------------------------------------------------// void MOAIGraphicsProp::LoadVertexTransform () { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, this->GetWorldDrawingMtx ()); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::WORLD_MTX, this->GetWorldDrawingMtx ()); } //----------------------------------------------------------------// @@ -976,6 +1017,12 @@ void MOAIGraphicsProp::RegisterLuaFuncs ( MOAILuaState& state ) { MOAIColor::RegisterLuaFuncs ( state ); luaL_Reg regTable [] = { + { "getBillboard", _getBillboard }, + { "getBlendEquation", _getBlendEquation }, + { "getBlendMode", _getBlendMode }, + { "getCullMode", _getCullMode }, + { "getDepthMask", _getDepthMask }, + { "getDepthTest", _getDepthTest }, { "getIndexBatchSize", _getIndexBatchSize }, { "getMaterialBatch", _getMaterialBatch }, { "getScissorRect", _getScissorRect }, diff --git a/src/moai-sim/MOAIGraphicsProp.h b/src/moai-sim/MOAIGraphicsProp.h index 713a481c7f..cd530bdea2 100644 --- a/src/moai-sim/MOAIGraphicsProp.h +++ b/src/moai-sim/MOAIGraphicsProp.h @@ -79,6 +79,12 @@ class MOAIGraphicsProp : private: //----------------------------------------------------------------// + static int _getBillboard ( lua_State* L ); + static int _getBlendEquation ( lua_State* L ); + static int _getBlendMode ( lua_State* L ); + static int _getCullMode ( lua_State* L ); + static int _getDepthMask ( lua_State* L ); + static int _getDepthTest ( lua_State* L ); static int _getIndexBatchSize ( lua_State* L ); static int _getMaterialBatch ( lua_State* L ); static int _getScissorRect ( lua_State* L ); diff --git a/src/moai-sim/MOAIGrid.cpp b/src/moai-sim/MOAIGrid.cpp index 5091dadf4c..0795ee6f98 100644 --- a/src/moai-sim/MOAIGrid.cpp +++ b/src/moai-sim/MOAIGrid.cpp @@ -359,7 +359,7 @@ void MOAIGrid::SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ) //----------------------------------------------------------------// void MOAIGrid::SetTile ( u32 addr, u32 tile ) { - u32 size = this->mTiles.Size (); + u32 size = ( u32 )this->mTiles.Size (); // TODO: cast if ( size ) { addr = addr % this->mTiles.Size (); diff --git a/src/moai-sim/MOAIGrid.h b/src/moai-sim/MOAIGrid.h index fd992163a0..4900ede3e5 100644 --- a/src/moai-sim/MOAIGrid.h +++ b/src/moai-sim/MOAIGrid.h @@ -21,7 +21,7 @@ class MOAIGrid : public MOAIGridSpace { private: - ZLLeanArray < u32 > mTiles; + ZLLeanArray < u32 > mTiles; // TODO: fix size //----------------------------------------------------------------// static int _clearTileFlags ( lua_State* L ); diff --git a/src/moai-sim/MOAIGridDeck2D.cpp b/src/moai-sim/MOAIGridDeck2D.cpp index 5154f2cff6..2f6a7bd175 100644 --- a/src/moai-sim/MOAIGridDeck2D.cpp +++ b/src/moai-sim/MOAIGridDeck2D.cpp @@ -139,7 +139,7 @@ ZLBox MOAIGridDeck2D::ComputeMaxBounds () { ZLBox bounds; - u32 size = this->mBrushes.Size (); + u32 size = ( u32 )this->mBrushes.Size (); if ( size == 0 ) { bounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ); } @@ -155,7 +155,7 @@ ZLBox MOAIGridDeck2D::ComputeMaxBounds () { //----------------------------------------------------------------// void MOAIGridDeck2D::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, ZLVec3D offset, ZLVec3D scale ) { - u32 size = this->mBrushes.Size (); + u32 size = ( u32 )this->mBrushes.Size (); if ( !size ) return; if ( !this->mGrid ) return; @@ -199,7 +199,7 @@ ZLBox MOAIGridDeck2D::GetItemBounds ( u32 idx ) { ZLBox bounds; - u32 size = this->mBrushes.Size (); + u32 size = ( u32 )this->mBrushes.Size (); if ( this->mGrid && size ) { // TODO: handle oversized decks (don't assume unit sized deck items) @@ -224,7 +224,6 @@ MOAIGridDeck2D::MOAIGridDeck2D () { RTTI_EXTEND ( MOAIStandardDeck ) RTTI_END - //this->SetContentMask ( MOAIProp::CAN_DRAW ); this->mMaxBounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f ); } diff --git a/src/moai-sim/MOAIGridFancy.cpp b/src/moai-sim/MOAIGridFancy.cpp index a2c51f8f9e..d321cb8c61 100644 --- a/src/moai-sim/MOAIGridFancy.cpp +++ b/src/moai-sim/MOAIGridFancy.cpp @@ -4,7 +4,7 @@ #include "pch.h" #include #include -#include +#include #include //================================================================// @@ -332,8 +332,8 @@ void MOAIGridFancy::Draw ( MOAIDeck *deck, MOAIDeckRemapper *remapper, MOAIMater float tileWidth = this->GetTileWidth (); float tileHeight = this->GetTileHeight (); - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - ZLColorVec penColor = gfxDevice.GetPenColor(); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + ZLColorVec penColor = gfxMgr.mGfxState.GetPenColor(); for ( int y = c0.mY; y <= c1.mY; ++y ) { for ( int x = c0.mX; x <= c1.mX; ++x ) { @@ -348,10 +348,10 @@ void MOAIGridFancy::Draw ( MOAIDeck *deck, MOAIDeckRemapper *remapper, MOAIMater ZLVec2D loc = this->GetTilePoint ( coord, MOAIGridSpace::TILE_CENTER ); if ( color ) { - gfxDevice.SetPenColor ( penColor * this->GetPalette ( color ).ScaleAlpha ( alpha ) ); + gfxMgr.mGfxState.SetPenColor ( penColor * this->GetPalette ( color ).ScaleAlpha ( alpha ) ); } else { - gfxDevice.SetPenColor ( penColor * ZLColorVec ( 1.0, 1.0, 1.0, alpha ) ); + gfxMgr.mGfxState.SetPenColor ( penColor * ZLColorVec ( 1.0, 1.0, 1.0, alpha ) ); } offset.mX = loc.mX; @@ -363,7 +363,7 @@ void MOAIGridFancy::Draw ( MOAIDeck *deck, MOAIDeckRemapper *remapper, MOAIMater } } - gfxDevice.SetPenColor(penColor); + gfxMgr.mGfxState.SetPenColor(penColor); } //----------------------------------------------------------------// @@ -496,7 +496,7 @@ void MOAIGridFancy::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIGridFancy::SetColor ( u32 addr, u32 value ) { - u32 size = this->mColors.Size (); + u32 size = ( u32 )this->mColors.Size (); if ( size ) { addr = addr % size; @@ -520,7 +520,7 @@ void MOAIGridFancy::SetColor ( int xTile, int yTile, u32 value ) { //----------------------------------------------------------------// void MOAIGridFancy::SetAlpha ( u32 addr, float value ) { - u32 size = this->mAlphas.Size (); + u32 size = ( u32 )this->mAlphas.Size (); if ( size ) { addr = addr % size; @@ -531,7 +531,7 @@ void MOAIGridFancy::SetAlpha ( u32 addr, float value ) { //----------------------------------------------------------------// void MOAIGridFancy::SetScale ( u32 addr, float value ) { - u32 size = this->mScales.Size (); + u32 size = ( u32 )this->mScales.Size (); if ( size ) { addr = addr % size; @@ -544,7 +544,7 @@ void MOAIGridFancy::SetPalette ( u32 addr, const ZLColorVec &color ) { /* attempt to make palette large enough for this */ this->mColorPalette.Grow ( addr, 1, ZLColorVec ( 1.0, 1.0, 1.0, 1.0 ) ); - u32 size = this->mColorPalette.Size (); + u32 size = ( u32 )this->mColorPalette.Size (); if ( size ) { addr = addr % size; diff --git a/src/moai-sim/MOAIGridSpace.cpp b/src/moai-sim/MOAIGridSpace.cpp index b04a2b1845..82668a34f0 100644 --- a/src/moai-sim/MOAIGridSpace.cpp +++ b/src/moai-sim/MOAIGridSpace.cpp @@ -644,7 +644,7 @@ MOAICellCoord MOAIGridSpace::GetAxialHexCellCoord ( float x, float y ) const { r = floorf (( floorf ( t1 - x ) + t2 ) / 3.0f ); q = floorf (( floorf ( 2.0f * x + 1.0f ) + t2) / 3.0f ); - return MOAICellCoord ( q, r ); + return MOAICellCoord (( int )q, ( int )r ); } //----------------------------------------------------------------// @@ -700,12 +700,14 @@ void MOAIGridSpace::GetBoundsInRect ( ZLRect rect, MOAICellCoord& c0, MOAICellCo maxSize.Bless (); if ( this->mShape == AXIAL_HEX_SHAPE ) { - float rectHeight; + c0 = this->GetAxialHexCellCoord ( rect.mXMin, rect.mYMin ); c1 = this->GetAxialHexCellCoord ( rect.mXMax, rect.mYMax ); - rectHeight = c1.mY - c0.mY; - /* you need an extra column per two rows */ - c1.mX = c1.mX + (rectHeight / 2); + + int rectHeight = c1.mY - c0.mY; + + // you need an extra column per two rows + c1.mX = c1.mX + ( rectHeight >> 1 ); } else { c0.mX = ( int )floorf ( ( rect.mXMin / this->mCellWidth ) - ( maxSize.mXMax / 0.5f - 1.0f ) ); c0.mY = ( int )floorf ( ( rect.mYMin / this->mCellHeight ) - ( maxSize.mYMax / 0.5f - 1.0f ) ); diff --git a/src/moai-sim/MOAIImage.cpp b/src/moai-sim/MOAIImage.cpp index c787540680..4ded74bc96 100644 --- a/src/moai-sim/MOAIImage.cpp +++ b/src/moai-sim/MOAIImage.cpp @@ -6,9 +6,9 @@ #include #include #include -#include +#include #include -#include +#include //================================================================// // local @@ -64,19 +64,33 @@ int MOAIImage::_bleedRect ( lua_State* L ) { } //----------------------------------------------------------------// -/** @lua blur - @text Fast gaussian blur (approximated with box blur) +/** @lua calculateGaussianKernel + @text Calculate a one dimensional gaussian kernel suitable for blurring. @in MOAIImage self + @opt number radius Default valus is 1.0. + @opt number sigma Default valie is radius / 3 (https://en.wikipedia.org/wiki/Gaussian_blur) @out nil */ -int MOAIImage::_blur ( lua_State *L ) { - MOAI_LUA_SETUP ( MOAIImage, "U" ) +int MOAIImage::_calculateGaussianKernel ( lua_State* L ) { + MOAI_LUA_SETUP_CLASS ( "" ) + + float radius = state.GetValue < float >( 1, 1.0f ); + float sigma = state.GetValue < float >( 2, ( radius / 3.0f )); - // TODO: better implementation with support for radius and sigma. - // Current is rather an ad-hoc one with r = 5 - self->Blur (); + if ( radius > 0.0f ) { + int kernelWidth = ( int )MOAIImage::CalculateGaussianKernelWidth ( radius ); + float* kernel = ( float* )alloca ( kernelWidth * sizeof ( float )); + + MOAIImage::CalculateGaussianKernel ( radius, sigma, kernel, kernelWidth ); + + lua_newtable ( state ); + for ( int i = 0; i < kernelWidth; ++i ) { + state.SetFieldByIndex ( -1, i + 1, kernel [ i ]); + } + return 1; + } return 0; } @@ -88,7 +102,6 @@ int MOAIImage::_blur ( lua_State *L ) { @in MOAIImage other @out boolean areEqual A value indicating whether the images are equal. */ - int MOAIImage::_compare ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIImage, "UU" ) @@ -126,6 +139,122 @@ int MOAIImage::_convert ( lua_State* L ) { return 1; } +//----------------------------------------------------------------// +/** @lua convolve + @text Convolve the image using a one or two dimensional kernel. If a one-dimensional kernel is provided, the + image will be convolved in two passes: first horizonally and then vertically using the same kernel. + + @in MOAIImage self + @in table kernel A one or two dimensional array of coefficients. + @opt boolean normalize If true, the kernel will be normalized prior to the convolution. Default value is true. + @out MOAIImage image The resulting image. +*/ +int MOAIImage::_convolve ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIImage, "UT" ) + + bool normalize = state.GetValue < bool >( 3, true ); + + int kernelWidth = ( int )state.GetTableSize ( 2 ); + + if ( kernelWidth ) { + + MOAIImage* image = new MOAIImage (); + + state.GetField ( 2, 1 ); + + if ( state.IsType ( -1, LUA_TNUMBER )) { + + float* kernel = ( float* )alloca ( kernelWidth * sizeof ( float )); + + for ( int x = 0; x < kernelWidth; ++x ) { + kernel [ x ] = state.GetFieldValue < float >( 2, x + 1, 0.0f ); + } + + if ( normalize ) { + ZLFloat::Normalize ( kernel, kernelWidth ); + } + image->Convolve ( *self, kernel, kernelWidth ); + } + else if ( state.IsType ( -1, LUA_TTABLE )) { + + int kernelHeight = kernelWidth; + kernelWidth = ( int )state.GetTableSize ( -1 ); + + float* kernel = ( float* )alloca ( kernelWidth * kernelHeight * sizeof ( float )); + + for ( int y = 0; y < kernelWidth; ++y ) { + + state.GetField ( 2, y + 1 ); + for ( int x = 0; x < kernelWidth; ++x ) { + kernel [( y * kernelWidth ) + x ] = state.GetFieldValue < float >( -1, x + 1, 0.0f ); + } + state.Pop (); + } + + for ( int x = 0; x < kernelWidth * kernelHeight; ++x ) { + printf ( "kernel: %f\n", kernel [ x ]); + } + + if ( normalize ) { + ZLFloat::Normalize ( kernel, kernelWidth * kernelHeight ); + } + image->Convolve ( *self, kernel, kernelWidth, kernelHeight ); + } + + state.Pop (); + + image->PushLuaUserdata ( state ); + return 1; + } + return 0; +} + +//----------------------------------------------------------------// +/** @lua convolve1D + @text Convolve the image using a one dimensional kernel. + + @in MOAIImage self + @in table kernel A one dimensional array of coefficients. + @opt boolean horizontal If true, the image will be convolved horizontally. Otherwise the image will be convolved vertically. Devault value is true. + @opt boolean normalize If true, the kernel will be normalized prior to the convolution. Default value is true. + @out MOAIImage image The resulting image. +*/ +int MOAIImage::_convolve1D ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIImage, "UT" ) + + bool horizontal = state.GetValue < bool >( 3, true ); + bool normalize = state.GetValue < bool >( 4, true ); + + size_t kernelWidth = state.GetTableSize ( 2 ); + + if ( kernelWidth ) { + + MOAIImage* image = new MOAIImage (); + + state.GetField ( 2, 1 ); + + if ( state.IsType ( -1, LUA_TNUMBER )) { + + float* kernel = ( float* )alloca ( kernelWidth * sizeof ( float )); + + for ( size_t x = 0; x < kernelWidth; ++x ) { + kernel [ x ] = state.GetFieldValue < float >( 2, ( int )( x + 1 ), 0.0f ); // TODO: cast + } + + if ( normalize ) { + ZLFloat::Normalize ( kernel, kernelWidth ); + } + image->Convolve1D ( *self, kernel, kernelWidth, horizontal ); + } + + state.Pop (); + + image->PushLuaUserdata ( state ); + return 1; + } + return 0; +} + //----------------------------------------------------------------// /** @lua copy @text Copies an image. @@ -491,6 +620,41 @@ int MOAIImage::_getColor32 ( lua_State* L ) { return 1; } +//----------------------------------------------------------------// +/** @lua getContentRect + @text computes the content rect, not taking in account any boundary transparency + + @in MOAIImage self + @out rect + */ +int MOAIImage::_getContentRect(lua_State *L) { + MOAI_LUA_SETUP ( MOAIImage, "U" ) + + ZLIntRect contentRect = self->GetContentRect (); + int left, right, top, bottom; + contentRect.GetRect ( left, top, right, bottom ); + lua_pushnumber ( state, left); + lua_pushnumber ( state, top ); + lua_pushnumber ( state, right); + lua_pushnumber ( state, bottom ); + + return 4; +} + +//----------------------------------------------------------------// +/** @lua getData + @text returns the bitmap data + + @in MOAIImage self + @out byte array string + */ +int MOAIImage::_getData(lua_State *L) { + MOAI_LUA_SETUP ( MOAIImage, "U" ) + + lua_pushlstring ( state, ( const char* )self->mBitmap.GetBuffer (), self->mBitmap.GetSize ()); + return 1; +} + //----------------------------------------------------------------// /** @lua getFormat @text Returns the color format of the image. @@ -592,6 +756,34 @@ int MOAIImage::_init ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +/** @lua isOpaque + @text false if at least one pixel is not opaque + + @in MOAIImage self + @out bool + */ +int MOAIImage::_isOpaque(lua_State *L) { + MOAI_LUA_SETUP ( MOAIImage, "U" ) + + // TODO: this is so inefficient + + for ( u32 y = 0; y < self->mHeight; y++ ) { + for ( u32 x = 0; x < self->mWidth; x++ ) { + ZLColorVec color; + color.SetRGBA ( self->GetColor ( x, y )); + if ( color.mA != 255 ) { + lua_pushboolean ( L, 0 ); + return 1; + } + } + } + + // it's opaque! + lua_pushboolean ( L, 1 ); + return 1; +} + //----------------------------------------------------------------// /** @lua load @text Loads an image from an image file. @@ -717,23 +909,29 @@ int MOAIImage::_loadFromBuffer ( lua_State* L ) { may be rearranged or blended. @in MOAIImage self + @opt number r1 @opt number r2 @opt number r3 @opt number r4 + @opt number g1 @opt number g2 @opt number g3 @opt number g4 + @opt number b1 @opt number b2 @opt number b3 @opt number b4 + @opt number a1 @opt number a2 @opt number a3 @opt number a4 + @opt number K Default value is 1. + @out nil */ int MOAIImage::_mix ( lua_State* L ) { @@ -963,6 +1161,85 @@ int MOAIImage::_simpleThreshold ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +/** @lua subdivideRect + @text Convenience method. Here for now as a class method, but maybe should + move to MOAIGrid. + + Subdivides a rectangle given a tile width and height. A table of tile + rectangles will be returned. The tiles will be clipped to the original + rect. + + @in number tileWidth + @in number tileHeight + @in number xMin + @in number yMin + @in number xMax + @in number yMax + @out nil +*/ +int MOAIImage::_subdivideRect ( lua_State* L ) { + MOAI_LUA_SETUP_CLASS ( "NNNNNN" ) + + float tileWidth = state.GetValue < float >( 1, 1.0f ); + float tileHeight = state.GetValue < float >( 2, 1.0f ); + + tileWidth = ABS ( tileWidth ); + tileHeight = ABS ( tileHeight ); + + ZLRect rect = state.GetRect < float >( 3 ); + + u32 x0 = ( u32 )( rect.mXMin / tileWidth ); + u32 x1 = ( u32 )( rect.mXMax / tileWidth ); + + u32 y0 = ( u32 )( rect.mYMin / tileHeight ); + u32 y1 = ( u32 )( rect.mYMax / tileHeight ); + + u32 count = 0; + u32 xCount = 0; + u32 yCount = 0; + + lua_newtable ( state ); + + for ( u32 y = y0; y <= y1; ++y ) { + for ( u32 x = x0; x <= x1; ++x ) { + + ZLRect tile; + + tile.mXMin = x * tileWidth; + tile.mYMin = y * tileHeight; + tile.mXMax = tile.mXMin + tileWidth; + tile.mYMax = tile.mYMin + tileHeight; + + ZLRect sub; + if ( tile.Intersect ( rect, sub )) { + + if (( sub.Width () > 0.0f ) && ( sub.Height () > 0.0f )) { + + count++; + state.Push ( count ); + + lua_newtable ( state ); + state.SetFieldByIndex < float >( -1, 1, sub.mXMin ); + state.SetFieldByIndex < float >( -1, 2, sub.mYMin ); + state.SetFieldByIndex < float >( -1, 3, sub.mXMax ); + state.SetFieldByIndex < float >( -1, 4, sub.mYMax ); + + lua_settable ( state, -3 ); + + xCount = ( x - x0 ) + 1; + yCount = ( y - y0 ) + 1; + } + } + } + } + + state.Push ( xCount ); + state.Push ( yCount ); + + return 3; +} + //----------------------------------------------------------------// /** @lua write @text Write image to a file. @@ -980,9 +1257,9 @@ int MOAIImage::_write ( lua_State* L ) { ZLFileStream stream; stream.OpenWrite ( filename ); - bool result = self->Write ( stream, format ); + ZLResultCode result = self->Write ( stream, format ); - state.Push ( result ); + state.Push ( result == ZL_OK ); return 1; } @@ -1018,26 +1295,8 @@ MOAIImage* MOAIImage::AffirmImage ( MOAILuaState& state, int idx ) { //----------------------------------------------------------------// void MOAIImage::Alloc () { - if ( this->mBitmap ) { - free ( this->mBitmap ); - this->mBitmap = 0; - } - - if ( this->mPalette ) { - free ( this->mPalette ); - this->mPalette = 0; - } - - u32 bitmapSize = this->GetBitmapSize (); - if ( bitmapSize ) { - this->mBitmap = malloc ( bitmapSize ); - } - - u32 paletteSize = this->GetPaletteSize (); - if ( paletteSize ) { - this->mPalette = malloc ( paletteSize ); - memset ( this->mPalette, 0, paletteSize ); - } + this->mBitmap.Alloc ( this->GetBitmapSize ()); + this->mPalette.Alloc ( this->GetPaletteSize ()); } //----------------------------------------------------------------// @@ -1113,11 +1372,11 @@ void MOAIImage::BleedRect ( ZLIntRect rect ) { u32 bitDepth = this->GetPixelDepthInBits (); if ( yMin > 0 ) { - ZLBitBuffer::Blit ( this->GetRowAddr ( yMin - 1 ), xMin, this->GetRowAddr ( yMin ), xMin, xMax - xMin, bitDepth ); + ZLBitBuffer::Blit ( this->GetRowAddrMutable ( yMin - 1 ), xMin, this->GetRowAddr ( yMin ), xMin, xMax - xMin, bitDepth ); } if ( yMax < height ) { - ZLBitBuffer::Blit ( this->GetRowAddr ( yMax ), xMin, this->GetRowAddr ( yMax - 1 ), xMin, xMax - xMin, bitDepth ); + ZLBitBuffer::Blit ( this->GetRowAddrMutable ( yMax ), xMin, this->GetRowAddr ( yMax - 1 ), xMin, xMax - xMin, bitDepth ); } } @@ -1184,95 +1443,47 @@ void MOAIImage::Blit ( const MOAIImage& image, int srcX, int srcY, int destX, in for ( int y = 0; y < height; ++y ) { const void* srcRow = image.GetRowAddr ( y + srcY ); - void* destRow = this->GetRowAddr ( y + destY ); + void* destRow = this->GetRowAddrMutable ( y + destY ); ZLBitBuffer::Blit ( destRow, destX, srcRow, srcX, width, pixelDepth ); } } //----------------------------------------------------------------// -static int reflect( int M, int x ) { - - if ( x < 0 ) { - return -x - 1; - } - if ( x >= M ) { - return 2 * M - x - 1; - } - return x; -} +//static int reflect ( int M, int x ) { +// +// if ( x < 0 ) { +// return -x - 1; +// } +// if ( x >= M ) { +// return 2 * M - x - 1; +// } +// return x; +//} //----------------------------------------------------------------// -void MOAIImage::Blur () { - - MOAIImage image; - image.Copy ( *this ); - - ZLColorVec sum, color; - int x1, y1; - - // coefficients of 1D gaussian kernel with sigma = 1 - float coeffs [] = { 0.0545, 0.2442, 0.4026, 0.2442, 0.0545 }; -// float coeffs [] = { 0.006, 0.061, 0.242, 0.383, 0.242, 0.061, 0.006 }; - int r = 2; +void MOAIImage::CalculateGaussianKernel ( float radius, float sigma, float* kernel, size_t kernelWidth ) { + + float sum = 0.0; + + double x = -( double )radius; + for ( size_t i = 0; i < kernelWidth; ++i, x += 1.0 ) { - // along y - direction - for ( int y = 0; y < this->mHeight; y++ ) { - for ( int x = 0; x < this->mWidth; x++ ) { - sum.SetRGBA ( 0 ); - for ( int i = -r; i <= r; i++ ) { - y1 = reflect ( this->mHeight, y - i ); - color.SetRGBA ( this->GetColor ( x, y1 )); - color.mA *= coeffs [ i + r ]; - color.mR *= coeffs [ i + r ]; - color.mG *= coeffs [ i + r ]; - color.mB *= coeffs [ i + r ]; - sum.Add ( color ); - } - image.SetColor ( x, y, sum.PackRGBA ()); - } + float g = ( float )Gaussian ( x, 2.0, 0.0, sigma ); // since we're going to normalize, we can use any value for a + + kernel [ i ] = g; + sum += g; } - // along x - direction - for ( int y = 0; y < this->mHeight; y++ ) { - for ( int x = 0; x < this->mWidth; x++ ) { - sum.SetRGBA ( 0 ); - for ( int i = -r; i <= r; i++ ) { - x1 = reflect ( this->mWidth, x - i ); - color.SetRGBA ( image.GetColor ( x1, y )); - color.mA *= coeffs [ i + r ]; - color.mR *= coeffs [ i + r ]; - color.mG *= coeffs [ i + r ]; - color.mB *= coeffs [ i + r ]; - sum.Add ( color ); - } - this->SetColor ( x, y, sum.PackRGBA ()); - } + for ( size_t i = 0; i < kernelWidth; ++i ) { + kernel [ i ] /= sum; } } //----------------------------------------------------------------// -void MOAIImage::ComparePixel( ZLIntVec2D** grid, ZLIntVec2D& p, int x, int y, int offsetX, int offsetY, int width, int height ) { - - // Need to check for boundaries unless there is a 1 pixel gutter - ZLIntVec2D otherPixel; //= grid[y + offsetY][x + offsetX]; - - int newX = x + offsetX; - int newY = y + offsetY; - - if ( newX >= 0 && newY >= 0 && newX < width && newY < height ) { - otherPixel = grid[newY][newX]; - } - else { - otherPixel.mX = 9999; - otherPixel.mY = 9999; - } - - otherPixel.mX += offsetX; - otherPixel.mY += offsetY; - - if ( otherPixel.LengthSquared() < p.LengthSquared() ) - p = otherPixel; +size_t MOAIImage::CalculateGaussianKernelWidth ( float radius ) { + + return ((( size_t )ceil ( radius )) * 2 ) + 1; } //----------------------------------------------------------------// @@ -1318,29 +1529,22 @@ void MOAIImage::CalculateSDF( ZLIntVec2D** grid, int width, int height ) { //----------------------------------------------------------------// void MOAIImage::Clear () { - if ( this->mBitmap ) { - free ( this->mBitmap ); - } - - if ( this->mPalette ) { - free ( this->mPalette ); - } + this->mBitmap.Free (); + this->mPalette.Free (); this->mColorFormat = ZLColor::CLR_FMT_UNKNOWN; this->mPixelFormat = PXL_FMT_UNKNOWN; this->mWidth = 0; this->mHeight = 0; - - this->mBitmap = 0; - this->mPalette = 0; } //----------------------------------------------------------------// void MOAIImage::ClearBitmap () { - if ( this->mBitmap ) { - memset ( this->mBitmap, 0, this->GetBitmapSize ()); + void* bitmap = this->mBitmap.Invalidate (); + if ( bitmap ) { + memset ( bitmap, 0, this->GetBitmapSize ()); } } @@ -1360,7 +1564,87 @@ void MOAIImage::ClearRect ( ZLIntRect rect ) { u32 pixelDepth = this->GetPixelDepthInBits (); for ( int y = rect.mYMin; y < rect.mYMax; ++y ) { - ZLBitBuffer::Clear ( this->GetRowAddr ( y ), pixelDepth, width, pixelDepth ); + ZLBitBuffer::Clear ( this->GetRowAddrMutable ( y ), pixelDepth, width, pixelDepth ); + } +} + +//----------------------------------------------------------------// +bool MOAIImage::Compare ( const MOAIImage& image ) { + + if (( this->mWidth != image.mWidth ) || ( this->mHeight != image.mHeight )) { + return false; + } + + float r [ 2 ][ 4 ] = {{ 0 }}; + float g [ 2 ][ 4 ] = {{ 0 }}; + float b [ 2 ][ 4 ] = {{ 0 }}; + float a [ 2 ][ 4 ] = {{ 0 }}; + + for ( u32 i = 0; i < this->mHeight; i++ ) { + for ( u32 j = 0; j < this->mWidth; j++ ) { + ZLColorVec color1, color2; + color1.SetRGBA ( this->GetColor ( j, i )); + color2.SetRGBA ( image.GetColor ( j, i )); + + r [ 0 ][ u32 ( ZLFloat::Max ( color1.mR * 4 - 1, 0 ))]++; + g [ 0 ][ u32 ( ZLFloat::Max ( color1.mG * 4 - 1, 0 ))]++; + b [ 0 ][ u32 ( ZLFloat::Max ( color1.mB * 4 - 1, 0 ))]++; + a [ 0 ][ u32 ( ZLFloat::Max ( color1.mA * 4 - 1, 0 ))]++; + + r [ 1 ][ u32 ( ZLFloat::Max ( color2.mR * 4 - 1, 0 ))]++; + g [ 1 ][ u32 ( ZLFloat::Max ( color2.mG * 4 - 1, 0 ))]++; + b [ 1 ][ u32 ( ZLFloat::Max ( color2.mB * 4 - 1, 0 ))]++; + a [ 1 ][ u32 ( ZLFloat::Max ( color2.mA * 4 - 1, 0 ))]++; + } + } + + for ( u32 i = 0; i < 2; i++ ) { + for ( u32 j = 0; j < 4; j++ ) { + r [ i ][ j ] = r [ i ][ j ] / ( this->mWidth * this->mHeight ); + g [ i ][ j ] = g [ i ][ j ] / ( this->mWidth * this->mHeight ); + b [ i ][ j ] = b [ i ][ j ] / ( this->mWidth * this->mHeight ); + a [ i ][ j ] = a [ i ][ j ] / ( this->mWidth * this->mHeight ); + } + } + + for ( u32 i = 0; i < 4; i++ ) { + r [ 0 ][ i ] = ZLFloat::Abs ( r [ 0 ][ i ] - r [ 1 ][ i ]); + g [ 0 ][ i ] = ZLFloat::Abs ( g [ 0 ][ i ] - g [ 1 ][ i ]); + b [ 0 ][ i ] = ZLFloat::Abs ( b [ 0 ][ i ] - b [ 1 ][ i ]); + a [ 0 ][ i ] = ZLFloat::Abs ( a [ 0 ][ i ] - a [ 1 ][ i ]); + } + + float similar = 0; + + for ( u32 i = 0; i < 4; i++ ) { + similar += ( r [ 0 ][ i ] + g [ 0 ][ i ] + b [ 0 ][ i ] + a [ 0 ][ i ]); + } + + return similar < .02; // TODO: WTF? +} + +//----------------------------------------------------------------// +void MOAIImage::ComparePixel( ZLIntVec2D** grid, ZLIntVec2D& p, int x, int y, int offsetX, int offsetY, int width, int height ) { + + // Need to check for boundaries unless there is a 1 pixel gutter + ZLIntVec2D otherPixel; //= grid[y + offsetY][x + offsetX]; + + int newX = x + offsetX; + int newY = y + offsetY; + + if ( newX >= 0 && newY >= 0 && newX < width && newY < height ) { + otherPixel = grid[newY][newX]; + } + else { + otherPixel.mX = 9999; + otherPixel.mY = 9999; + } + + otherPixel.mX += offsetX; + otherPixel.mY += offsetY; + + if ( otherPixel.LengthSquared () < p.LengthSquared ()) { + p = otherPixel; } } @@ -1403,7 +1687,7 @@ bool MOAIImage::Convert ( const MOAIImage& image, ZLColor::ColorFormat colorFmt, // we'll use the helper method in ZLColor which is a little more efficient for ( u32 y = 0; y < image.mHeight; ++y ) { const void* srcRow = image.GetRowAddr ( y ); - void* destRow = newImage.GetRowAddr ( y ); + void* destRow = newImage.GetRowAddrMutable ( y ); ZLColor::Convert ( destRow, newImage.mColorFormat, srcRow, image.mColorFormat, image.mWidth ); } } @@ -1412,7 +1696,7 @@ bool MOAIImage::Convert ( const MOAIImage& image, ZLColor::ColorFormat colorFmt, // pixel format is indexed color, so just convert the palette u32 total = image.GetPaletteCount (); - ZLColor::Convert ( newImage.mPalette, newImage.mColorFormat, image.mPalette, image.mColorFormat, total ); + ZLColor::Convert ( newImage.mPalette.Invalidate (), newImage.mColorFormat, image.mPalette.GetBuffer (), image.mColorFormat, total ); } this->Take ( newImage ); @@ -1420,58 +1704,110 @@ bool MOAIImage::Convert ( const MOAIImage& image, ZLColor::ColorFormat colorFmt, } //----------------------------------------------------------------// -bool MOAIImage::Compare ( const MOAIImage& image ) { - - if (( this->mWidth != image.mWidth ) || ( this->mHeight != image.mHeight )) { - return false; - } - - float r [ 2 ][ 4 ] = {{ 0 }}; - float g [ 2 ][ 4 ] = {{ 0 }}; - float b [ 2 ][ 4 ] = {{ 0 }}; - float a [ 2 ][ 4 ] = {{ 0 }}; +void MOAIImage::Convolve ( const MOAIImage& image, const float* kernel, size_t kernelWidth ) { - for ( u32 i = 0; i < this->mHeight; i++ ) { - for ( u32 j = 0; j < this->mWidth; j++ ) { - ZLColorVec color1, color2; - color1.SetRGBA ( this->GetColor ( j, i )); - color2.SetRGBA ( image.GetColor ( j, i )); - - r [ 0 ][ u32 ( ZLFloat::Max ( color1.mR * 4 - 1, 0 ))]++; - g [ 0 ][ u32 ( ZLFloat::Max ( color1.mG * 4 - 1, 0 ))]++; - b [ 0 ][ u32 ( ZLFloat::Max ( color1.mB * 4 - 1, 0 ))]++; - a [ 0 ][ u32 ( ZLFloat::Max ( color1.mA * 4 - 1, 0 ))]++; + MOAIImage temp; + temp.Convolve1D ( image, kernel, kernelWidth, true ); + this->Convolve1D ( temp, kernel, kernelWidth, false ); +} - r [ 1 ][ u32 ( ZLFloat::Max ( color2.mR * 4 - 1, 0 ))]++; - g [ 1 ][ u32 ( ZLFloat::Max ( color2.mG * 4 - 1, 0 ))]++; - b [ 1 ][ u32 ( ZLFloat::Max ( color2.mB * 4 - 1, 0 ))]++; - a [ 1 ][ u32 ( ZLFloat::Max ( color2.mA * 4 - 1, 0 ))]++; - } - } +//----------------------------------------------------------------// +void MOAIImage::Convolve ( const MOAIImage& image, const float* kernel, size_t kernelWidth, size_t kernelHeight ) { - for ( u32 i = 0; i < 2; i++ ) { - for ( u32 j = 0; j < 4; j++ ) { - r [ i ][ j ] = r [ i ][ j ] / ( this->mWidth * this->mHeight ); - g [ i ][ j ] = g [ i ][ j ] / ( this->mWidth * this->mHeight ); - b [ i ][ j ] = b [ i ][ j ] / ( this->mWidth * this->mHeight ); - a [ i ][ j ] = a [ i ][ j ] / ( this->mWidth * this->mHeight ); + MOAIImage temp; + temp.Copy ( image ); + + ZLColorVec sum; + ZLColorVec color; + + size_t hKernelWidth = kernelWidth >> 1; + size_t hKernelHeight = kernelHeight >> 1; + + for ( u32 y = 0; y < image.mHeight; ++y ) { + for ( u32 x = 0; x < image.mHeight; ++x ) { + + sum.SetRGBA ( 0 ); + + for ( size_t ky = 0; ky < kernelHeight; ++ky ) { + for ( size_t kx = 0; kx < kernelWidth; ++kx ) { + + int sx = ( int )(( x + kx ) - hKernelWidth ); + sx = sx < 0 ? 0 : ( sx < ( int )image.mWidth ? sx : image.mWidth - 1 ); + + int sy = ( int )(( y + ky ) - hKernelHeight ); + sy = sy < 0 ? 0 : ( sy < ( int )image.mHeight ? sy : image.mHeight - 1 ); + + color.SetRGBA ( image.GetColor ( sx, sy )); + + float c = kernel [( ky * kernelWidth ) + kx ]; + + sum.mR += color.mR * c; + sum.mG += color.mG * c; + sum.mB += color.mB * c; + sum.mA += color.mA * c; + } + } + + sum.Clamp (); + temp.SetColor ( x, y, sum.PackRGBA ()); } } + + this->Take ( temp ); +} - for ( u32 i = 0; i < 4; i++ ) { - r [ 0 ][ i ] = ZLFloat::Abs ( r [ 0 ][ i ] - r [ 1 ][ i ]); - g [ 0 ][ i ] = ZLFloat::Abs ( g [ 0 ][ i ] - g [ 1 ][ i ]); - b [ 0 ][ i ] = ZLFloat::Abs ( b [ 0 ][ i ] - b [ 1 ][ i ]); - a [ 0 ][ i ] = ZLFloat::Abs ( a [ 0 ][ i ] - a [ 1 ][ i ]); - } +//----------------------------------------------------------------// +void MOAIImage::Convolve1D ( const MOAIImage& image, const float* kernel, size_t kernelSize, bool horizontal ) { - float similar = 0; + MOAIImage temp; + temp.Copy ( image ); + + ZLColorVec sum; + ZLColorVec color; + + size_t hKernel = kernelSize >> 1; + + for ( u32 y = 0; y < image.mHeight; ++y ) { + for ( u32 x = 0; x < image.mWidth; ++x ) { + + sum.SetRGBA ( 0 ); + + for ( size_t k = 0; k < kernelSize; ++k ) { - for ( u32 i = 0; i < 4; i++ ) { - similar += ( r [ 0 ][ i ] + g [ 0 ][ i ] + b [ 0 ][ i ] + a [ 0 ][ i ]); + int sx; + int sy; + + if ( horizontal ) { + + sx = ( int )(( x + k ) - hKernel ); + sx = sx < 0 ? 0 : ( sx < ( int )image.mWidth ? sx : image.mWidth - 1 ); + + sy = y; + } + else { + + sx = x; + + sy = ( int )(( y + k ) - hKernel ); + sy = sy < 0 ? 0 : ( sy < ( int )image.mHeight ? sy : image.mHeight - 1 ); + } + + color.SetRGBA ( image.GetColor ( sx, sy )); + + float c = kernel [ k ]; + + sum.mR += color.mR * c; + sum.mG += color.mG * c; + sum.mB += color.mB * c; + sum.mA += color.mA * c; + } + + sum.Clamp (); + temp.SetColor ( x, y, sum.PackRGBA ()); + } } - - return similar < .02; + + this->Take ( temp ); } //----------------------------------------------------------------// @@ -1479,17 +1815,16 @@ void MOAIImage::Copy ( const MOAIImage& image ) { if ( this == &image ) return; - this->Init ( image.mWidth, image.mHeight, image.mColorFormat, image.mPixelFormat ); + this->mColorFormat = image.mColorFormat; + this->mPixelFormat = image.mPixelFormat; + + this->mWidth = image.mWidth; + this->mHeight = image.mHeight; - size_t bitmapSize = this->GetBitmapSize (); - if ( bitmapSize ) { - memcpy ( this->mBitmap, image.mBitmap, bitmapSize ); - } + this->mBitmap = image.mBitmap; + this->mPalette = image.mPalette; - size_t paletteSize = this->GetPaletteSize (); - if ( paletteSize ) { - memcpy ( this->mPalette, image.mPalette, paletteSize ); - } + this->OnImageStatusChanged ( true ); } //----------------------------------------------------------------// @@ -1505,8 +1840,6 @@ void MOAIImage::CopyRect ( const MOAIImage& image, ZLIntRect srcRect, ZLIntRect if (( this->mPixelFormat != TRUECOLOR ) && ( image.mPixelFormat != TRUECOLOR )) return; // TODO: warn about this case - float scale; - bool xFlip = srcRect.IsXFlipped () != destRect.IsXFlipped (); bool yFlip = srcRect.IsYFlipped () != destRect.IsYFlipped (); @@ -1533,8 +1866,8 @@ void MOAIImage::CopyRect ( const MOAIImage& image, ZLIntRect srcRect, ZLIntRect if ( !srcRect.Overlap ( srcBounds )) return; if ( !destRect.Overlap ( destBounds )) return; - ZLVec2D srcToDest ( srcRect.Width () / destRect.Width (), srcRect.Height () / destRect.Height ()); - ZLVec2D destToSrc ( 1.0 / srcToDest.mX, 1.0 / srcToDest.mY ); + ZLVec2D srcToDest (( float )( srcRect.Width () / destRect.Width ()), ( float )( srcRect.Height () / destRect.Height ())); + ZLVec2D destToSrc ( 1.0f / srcToDest.mX, 1.0f / srcToDest.mY ); ZLIntRect srcClipA = srcRect; ZLIntRect srcClipB = srcRect; @@ -1675,8 +2008,8 @@ void MOAIImage::CopyRect ( const MOAIImage& image, ZLIntRect srcRect, ZLIntRect for ( int y = 0; y < destHeight; ++y ) { for ( int x = 0; x < destWidth; ++x ) { - float xPixel = floorf ( xSrcOrigin + (( float )x * xSrcStep ) + 0.5f ); - float yPixel = floorf ( ySrcOrigin + (( float )y * ySrcStep ) + 0.5f ); + u32 xPixel = ( u32 )floorf ( xSrcOrigin + (( float )x * xSrcStep ) + 0.5f ); + u32 yPixel = ( u32 )floorf ( ySrcOrigin + (( float )y * ySrcStep ) + 0.5f ); u32 pixel = srcImage.GetPixel ( xPixel, yPixel ); this->SetPixel ( xPixel, yPixel, pixel ); @@ -1743,11 +2076,11 @@ void MOAIImage::Desaturate ( const MOAIImage& image, float rY, float gY, float b if ( this->mPixelFormat == TRUECOLOR ) { for ( u32 y = 0; y < this->mHeight; y++ ) { - ZLColor::Desaturate ( this->GetRowAddr ( y ), this->mColorFormat, this->mWidth, rY, gY, bY, K ); + ZLColor::Desaturate ( this->GetRowAddrMutable ( y ), this->mColorFormat, this->mWidth, rY, gY, bY, K ); } } else { - ZLColor::Desaturate ( this->mPalette, this->mColorFormat, this->GetPaletteCount (), rY, gY, bY, K ); + ZLColor::Desaturate ( this->mPalette.Invalidate (), this->mColorFormat, this->GetPaletteCount (), rY, gY, bY, K ); } } @@ -1937,8 +2270,9 @@ void MOAIImage::FillEllipse ( int centerX, int centerY, int xRad, int yRad, u32 s64 dy = xRad * xRad; while ( stopX >= stopY ) { - this->DrawLine ( x0 - x, y0 + y, x0 + x, y0 + y, color ); - this->DrawLine ( x0 - x, y0 - y, x0 + x, y0 - y, color ); + + this->DrawLine (( int )( x0 - x ), ( int )( y0 + y ), ( int )( x0 + x ), ( int )( y0 + y ), color ); + this->DrawLine (( int )( x0 - x ), ( int )( y0 - y ), ( int )( x0 + x ), ( int )( y0 - y ), color ); y++; stopY += aa2; @@ -1962,8 +2296,8 @@ void MOAIImage::FillEllipse ( int centerX, int centerY, int xRad, int yRad, u32 stopY = aa2 * yRad; while ( stopX <= stopY ) { - this->DrawLine ( x0 - x, y0 + y, x0 + x, y0 + y, color ); - this->DrawLine ( x0 - x, y0 - y, x0 + x, y0 - y, color ); + this->DrawLine (( int )( x0 - x ), ( int )( y0 + y ), ( int )( x0 + x ), ( int )( y0 + y ), color ); + this->DrawLine (( int )( x0 - x ), ( int )( y0 - y ), ( int )( x0 + x ), ( int )( y0 - y ), color ); x++; stopX += bb2; err += dx; @@ -2007,26 +2341,28 @@ void MOAIImage::GammaCorrection ( const MOAIImage& image, float gamma ) { if ( this->mPixelFormat == TRUECOLOR ) { for ( u32 y = 0; y < this->mHeight; y++ ) { - ZLColor::GammaCorrection ( this->GetRowAddr ( y ), this->mColorFormat, this->mWidth, gamma ); + ZLColor::GammaCorrection ( this->GetRowAddrMutable ( y ), this->mColorFormat, this->mWidth, gamma ); } } else { - ZLColor::GammaCorrection ( this->mPalette, this->mColorFormat, this->GetPaletteCount (), gamma ); + ZLColor::GammaCorrection ( this->mPalette.Invalidate (), this->mColorFormat, this->GetPaletteCount (), gamma ); } } //----------------------------------------------------------------// void MOAIImage::GenerateOutlineFromSDF ( ZLIntRect rect, float distMin, float distMax, float r, float g, float b, float a ) { - u32 width = rect.Width () + 1; - u32 height = rect.Height () + 1; + + int width = rect.Width () + 1; + int height = rect.Height () + 1; for ( int y = 0; y < height; ++y ) { for ( int x = 0; x < width; ++x ) { + u32 color = this->GetColor ( x + rect.mXMin, y + rect.mYMin ); ZLColorVec colorVec; colorVec.SetRGBA ( color ); - if ( colorVec.mA >= distMin && colorVec.mA < distMax ) { + if ( colorVec.mA > distMin && colorVec.mA <= distMax ) { colorVec.mR = r; colorVec.mG = g; colorVec.mB = b; @@ -2086,8 +2422,8 @@ void MOAIImage::GenerateSDF ( ZLIntRect rect ) { } } - CalculateSDF( grid1, width, height ); - CalculateSDF( grid2, width, height ); + CalculateSDF ( grid1, width, height ); + CalculateSDF ( grid2, width, height ); int maxDist = INT_MIN; int minDist = INT_MAX; @@ -2117,7 +2453,7 @@ void MOAIImage::GenerateSDF ( ZLIntRect rect ) { for( int y = 0; y < height; y++ ) { for ( int x = 0; x < width; x++ ) { - float scaledDistVal = gridDistance [ y ][ x ]; + float scaledDistVal = ( float )gridDistance [ y ][ x ]; scaledDistVal = ( scaledDistVal + 30 ) / range; ZLColorVec colorVec; colorVec.Set ( 0, 0, 0, scaledDistVal ); @@ -2141,8 +2477,8 @@ void MOAIImage::GenerateSDF ( ZLIntRect rect ) { //----------------------------------------------------------------// void MOAIImage::GenerateSDFAA ( ZLIntRect rect, float sizeInPixels ) { - int width = rect.Width (); - int height = rect.Height (); + u32 width = ( u32 )rect.Width (); + u32 height = ( u32 )rect.Height (); short* xdist = ( short* ) malloc ( width * height * sizeof ( short )); short* ydist = ( short* ) malloc ( width * height * sizeof ( short )); @@ -2165,8 +2501,8 @@ void MOAIImage::GenerateSDFAA ( ZLIntRect rect, float sizeInPixels ) { } // Compute outside = edtaa3(bitmap); % Transform background (0's) - computegradient ( data, width, height, gx, gy ); - edtaa3 ( data, gx, gy, width, height, xdist, ydist, outside ); + moai_computegradient ( data, width, height, gx, gy ); + moai_edtaa3 ( data, gx, gy, width, height, xdist, ydist, outside ); for ( u32 i = 0; i < width * height; ++i ) { if ( outside [ i ] < 0 ) { outside [ i ] = 0.0; @@ -2179,8 +2515,8 @@ void MOAIImage::GenerateSDFAA ( ZLIntRect rect, float sizeInPixels ) { for ( u32 i = 0; i < width * height; ++i ) { data [ i ] = 1.0 - data [ i ]; } - computegradient ( data, width, height, gx, gy ); - edtaa3 ( data, gx, gy, width, height, xdist, ydist, inside ); + moai_computegradient ( data, width, height, gx, gy ); + moai_edtaa3 ( data, gx, gy, width, height, xdist, ydist, inside ); for ( u32 i = 0; i < width * height; ++i ) { if ( inside [ i ] < 0 ) { inside [ i ] = 0.0; @@ -2192,13 +2528,13 @@ void MOAIImage::GenerateSDFAA ( ZLIntRect rect, float sizeInPixels ) { u32 i = y * width + x; - float dist = outside [ i ] - inside [ i ]; // distance in pixels + double dist = outside [ i ] - inside [ i ]; // distance in pixels - dist = ( 1.0f - ( dist / sizeInPixels )) * 0.5f; // normalize - dist = MAX ( 0.0f, MIN ( dist, 1.0f )); // clamp + dist = ( 1.0 - ( dist / sizeInPixels )) * 0.5; // normalize + dist = MAX ( 0.0, MIN ( dist, 1.0 )); // clamp ZLColorVec colorVec; - colorVec.Set ( 0, 0, 0, dist ); + colorVec.Set ( 0, 0, 0, ( float )dist ); this->SetColor ( x + rect.mXMin, y + rect.mYMin, colorVec.PackRGBA ()); } } @@ -2356,9 +2692,9 @@ void MOAIImage::GenerateSDFDeadReckoning ( ZLIntRect rect, int threshold ) { } //----------------------------------------------------------------// -u32 MOAIImage::GetBitmapSize () const { +size_t MOAIImage::GetBitmapSize () const { - return this->GetRowSize () * this->mHeight; + return this->GetRowSize () * ( size_t )this->mHeight; } //----------------------------------------------------------------// @@ -2372,20 +2708,92 @@ ZLIntRect MOAIImage::GetBounds () { //----------------------------------------------------------------// u32 MOAIImage::GetColor ( u32 x, u32 y ) const { - if ( !this->mBitmap ) return 0; + if ( !this->mBitmap.GetSize ()) return 0; if ( this->mPixelFormat == TRUECOLOR ) { return ZLColor::ConvertToRGBA ( this->GetPixel ( x, y ), this->mColorFormat ); } - else { - return this->GetPaletteColor ( this->GetPixel ( x, y )); + return this->GetPaletteColor ( this->GetPixel ( x, y )); +} + +//----------------------------------------------------------------// +ZLIntRect MOAIImage::GetContentRect () { + + // TODO: this is crazy inefficient + // TODO: one iteration through all pixels should be sufficient + // TODO: should just check alpha bitmask from GetColor () + + static const u32 NO_CROP = ( u32 )-1; + u32 cropLeft = NO_CROP; + for ( u32 x = 0; x < this->mWidth; x++ ) { + for ( u32 y = 0; y < this->mHeight; y++ ) { + ZLColorVec color; + color.SetRGBA ( this->GetColor ( x, y )); + if ( color.mA > 0 ) { + cropLeft = x; + break; + } + } + if ( cropLeft != NO_CROP ) + break; + } + + if ( cropLeft == NO_CROP ) { + // completely empty image! + ZLIntRect rect; + rect.Init ( 0, 0, 0, 0 ); + return rect; + } + + u32 cropRight = NO_CROP; + for ( u32 x = this->mWidth - 1; x >= 0; x-- ) { + for ( u32 y = 0; y < this->mHeight; y++ ) { + ZLColorVec color; + color.SetRGBA ( this->GetColor ( x, y )); + if ( color.mA > 0 ) { + cropRight = x + 1; + break; + } + } + if ( cropRight != NO_CROP ) + break; + } + + u32 cropTop = NO_CROP; + for ( u32 y = 0; y < this->mHeight; y++ ) { + for ( u32 x = 0; x < this->mWidth; x++ ) { + ZLColorVec color; + color.SetRGBA ( this->GetColor ( x, y )); + if ( color.mA > 0 ) { + cropTop = y; + break; + } + } + if ( cropTop != NO_CROP ) + break; + } + + u32 cropBottom = NO_CROP; + for ( u32 y = this->mHeight - 1; y >= 0; y-- ) { + for ( u32 x = 0; x < this->mWidth; x++ ) { + ZLColorVec color; + color.SetRGBA ( this->GetColor ( x, y )); + if ( color.mA > 0 ) { + cropBottom = y+1; + break; + } + } + if ( cropBottom != NO_CROP ) + break; } - return 0; + ZLIntRect rect; + rect.Init ( cropLeft, cropTop, cropRight, cropBottom ); + return rect; } //----------------------------------------------------------------// -u32 MOAIImage::GetDataSize () const { +size_t MOAIImage::GetDataSize () const { return this->GetPaletteSize () + this->GetBitmapSize (); } @@ -2405,7 +2813,7 @@ u32 MOAIImage::GetPaletteColor ( u32 i ) const { u32 total = this->GetPaletteCount (); if ( i < total ) { - u32 pixel = ZLBitBuffer::GetValue ( this->mPalette, i, ZLColor::GetDepthInBits ( this->mColorFormat )); + u32 pixel = ZLBitBuffer::GetValue ( this->mPalette.GetBuffer (), i, ZLColor::GetDepthInBits ( this->mColorFormat )); return ZLColor::ConvertToRGBA ( pixel, this->mColorFormat ); } return 0; @@ -2424,7 +2832,7 @@ u32 MOAIImage::GetPaletteCount () const { } //----------------------------------------------------------------// -u32 MOAIImage::GetPaletteSize () const { +size_t MOAIImage::GetPaletteSize () const { return ZLBitBuffer::CalculateSize ( ZLColor::GetDepthInBits ( this->mColorFormat ), this->GetPaletteCount ()); } @@ -2458,15 +2866,15 @@ ZLIntRect MOAIImage::GetRect () { } //----------------------------------------------------------------// -void* MOAIImage::GetRowAddr ( u32 y ) { +const void* MOAIImage::GetRowAddr ( u32 y ) const { - return ( void* )(( size_t )this->mBitmap + ( this->GetRowSize () * y )); + return ( const void* )(( size_t )this->mBitmap.GetBuffer () + ( this->GetRowSize () * y )); } //----------------------------------------------------------------// -const void* MOAIImage::GetRowAddr ( u32 y ) const { +void* MOAIImage::GetRowAddrMutable ( u32 y ) { - return ( const void* )(( size_t )this->mBitmap + ( this->GetRowSize () * y )); + return ( void* )(( size_t )this->mBitmap.Invalidate () + ( this->GetRowSize () * y )); } //----------------------------------------------------------------// @@ -2509,7 +2917,7 @@ void MOAIImage::Init ( u32 width, u32 height, ZLColor::ColorFormat colorFmt, Pix } //----------------------------------------------------------------// -void MOAIImage::Init ( void* bitmap, u32 width, u32 height, ZLColor::ColorFormat colorFmt ) { +void MOAIImage::Init ( const void* bitmap, u32 width, u32 height, ZLColor::ColorFormat colorFmt ) { this->Clear (); @@ -2522,8 +2930,8 @@ void MOAIImage::Init ( void* bitmap, u32 width, u32 height, ZLColor::ColorFormat this->mHeight = height; this->Alloc (); - u32 size = this->GetBitmapSize (); - memcpy ( this->mBitmap, bitmap, size ); + size_t size = this->GetBitmapSize (); + memcpy ( this->mBitmap.Invalidate (), bitmap, size ); this->OnImageStatusChanged ( this->IsOK ()); } @@ -2577,7 +2985,7 @@ bool MOAIImage::Load ( ZLStream& stream, u32 transform ) { //----------------------------------------------------------------// bool MOAIImage::IsOK () { - return ( this->mBitmap != 0 ); + return ( this->mBitmap.GetSize () != 0 ); } //----------------------------------------------------------------// @@ -2650,11 +3058,11 @@ void MOAIImage::Mix ( const MOAIImage& image, const ZLMatrix4x4& mtx, float K ) if ( this->mPixelFormat == TRUECOLOR ) { for ( u32 y = 0; y < this->mHeight; y++ ) { - ZLColor::Mix ( this->GetRowAddr ( y ), this->mColorFormat, this->mWidth, mtx, K ); + ZLColor::Mix ( this->GetRowAddrMutable ( y ), this->mColorFormat, this->mWidth, mtx, K ); } } else { - ZLColor::Mix ( this->mPalette, this->mColorFormat, this->GetPaletteCount (), mtx, K ); + ZLColor::Mix ( this->mPalette.Invalidate (), this->mColorFormat, this->GetPaletteCount (), mtx, K ); } } @@ -2663,9 +3071,7 @@ MOAIImage::MOAIImage () : mPixelFormat ( PXL_FMT_UNKNOWN ), mColorFormat ( ZLColor::CLR_FMT_UNKNOWN ), mWidth ( 0 ), - mHeight ( 0 ), - mBitmap ( 0 ), - mPalette ( 0 ) { + mHeight ( 0 ) { RTTI_SINGLE ( MOAILuaObject ) } @@ -2702,11 +3108,11 @@ void MOAIImage::PremultiplyAlpha ( const MOAIImage& image ) { if ( this->mPixelFormat == TRUECOLOR ) { for ( u32 y = 0; y < this->mHeight; ++y ) { - ZLColor::PremultiplyAlpha ( this->GetRowAddr ( y ), this->mColorFormat, this->mWidth ); + ZLColor::PremultiplyAlpha ( this->GetRowAddrMutable ( y ), this->mColorFormat, this->mWidth ); } } else { - ZLColor::PremultiplyAlpha ( this->mPalette, this->mColorFormat, this->GetPaletteCount ()); + ZLColor::PremultiplyAlpha ( this->mPalette.Invalidate (), this->mColorFormat, this->GetPaletteCount ()); } } @@ -2763,6 +3169,14 @@ void MOAIImage::RegisterLuaClass ( MOAILuaState& state ) { state.SetField ( -1, "BLEND_FACTOR_ONE_MINUS_SRC_COLOR", ( u32 )ZLColor::BLEND_FACTOR_ONE_MINUS_SRC_COLOR ); state.SetField ( -1, "BLEND_FACTOR_SRC_ALPHA", ( u32 )ZLColor::BLEND_FACTOR_SRC_ALPHA ); state.SetField ( -1, "BLEND_FACTOR_SRC_COLOR", ( u32 )ZLColor::BLEND_FACTOR_SRC_COLOR ); + + luaL_Reg regTable [] = { + { "calculateGaussianKernel", _calculateGaussianKernel }, + { "subdivideRect", _subdivideRect }, + { NULL, NULL } + }; + + luaL_register ( state, 0, regTable ); } //----------------------------------------------------------------// @@ -2772,10 +3186,11 @@ void MOAIImage::RegisterLuaFuncs ( MOAILuaState& state ) { luaL_Reg regTable [] = { { "average", _average }, { "bleedRect", _bleedRect }, - { "blur", _blur }, { "compare", _compare }, { "convert", _convert }, { "convertColors", _convert }, // back compat + { "convolve", _convolve }, + { "convolve1D", _convolve1D }, { "convertToGrayScale", _desaturate }, // back compat { "copy", _copy }, { "copyBits", _copyBits }, @@ -2790,10 +3205,13 @@ void MOAIImage::RegisterLuaFuncs ( MOAILuaState& state ) { { "generateSDFAA", _generateSDFAA }, { "generateSDFDeadReckoning", _generateSDFDeadReckoning }, { "getColor32", _getColor32 }, + { "getContentRect", _getContentRect }, + { "getData", _getData }, { "getFormat", _getFormat }, { "getRGBA", _getRGBA }, { "getSize", _getSize }, { "init", _init }, + { "isOpaque", _isOpaque }, { "load", _load }, { "loadAsync", _loadAsync }, { "loadFromBuffer", _loadFromBuffer }, @@ -2854,14 +3272,14 @@ void MOAIImage::ResizeCanvas ( const MOAIImage& image, ZLIntRect rect ) { u32 spanSize = endSpan - beginSpan; - u32 bitDepth = this->GetPixelDepthInBits (); + u32 bitDepth = newImage.GetPixelDepthInBits (); - u32 srcRowSize = image.GetRowSize (); + //u32 srcRowSize = image.GetRowSize (); u32 srcRowXOff = srcRect.mXMin < 0 ? -srcRect.mXMin : 0; for ( int y = 0; y < height; ++y ) { - void* destRow = newImage.GetRowAddr ( y ); + void* destRow = newImage.GetRowAddrMutable ( y ); if (( y < srcRect.mYMin ) || ( y >= srcRect.mYMax )) { @@ -2970,7 +3388,7 @@ void MOAIImage::SetPaletteColor ( u32 idx, u32 rgba ) { u32 color = ZLColor::ConvertFromRGBA ( rgba, this->mColorFormat ); u32 colorDepth = ZLColor::GetDepthInBits ( this->mColorFormat ); - ZLBitBuffer::SetValue ( this->mPalette, color, idx, colorDepth ); + ZLBitBuffer::SetValue ( this->mPalette.Invalidate (), color, idx, colorDepth ); } } @@ -2979,7 +3397,7 @@ void MOAIImage::SetPixel ( u32 x, u32 y, u32 pixel ) { if (( x >= this->mWidth ) || ( y >= this->mHeight )) return; - ZLBitBuffer::SetValue ( this->GetRowAddr ( y ), pixel, x, this->GetPixelDepthInBits ()); + ZLBitBuffer::SetValue ( this->GetRowAddrMutable ( y ), pixel, x, this->GetPixelDepthInBits ()); } //----------------------------------------------------------------// @@ -2993,11 +3411,11 @@ void MOAIImage::SimpleThreshold ( const MOAIImage& image, float rT, float gT, fl if ( this->mPixelFormat == TRUECOLOR ) { for ( u32 y = 0; y < this->mHeight; ++y ) { - ZLColor::SimpleThreshold ( this->GetRowAddr ( y ), this->mColorFormat, this->mWidth, threshold ); + ZLColor::SimpleThreshold ( this->GetRowAddrMutable ( y ), this->mColorFormat, this->mWidth, threshold ); } } else { - ZLColor::SimpleThreshold ( this->mPalette, this->mColorFormat, this->GetPaletteCount (), threshold ); + ZLColor::SimpleThreshold ( this->mPalette.Invalidate (), this->mColorFormat, this->GetPaletteCount (), threshold ); } } diff --git a/src/moai-sim/MOAIImage.h b/src/moai-sim/MOAIImage.h index b5b4e0da74..4c41be52af 100644 --- a/src/moai-sim/MOAIImage.h +++ b/src/moai-sim/MOAIImage.h @@ -65,11 +65,8 @@ class MOAIImage : u32 mWidth; u32 mHeight; - void* mBitmap; - void* mPalette; - - //GET_SET ( void*, Bitmap, mBitmap ); - //GET_SET ( void*, Palette, mPalette ); + ZLCopyOnWrite mBitmap; + ZLCopyOnWrite mPalette; SET ( PixelFormat, PixelFormat, mPixelFormat ) SET ( ZLColor::ColorFormat, ColorFormat, mColorFormat ) @@ -80,9 +77,11 @@ class MOAIImage : //----------------------------------------------------------------// static int _average ( lua_State* L ); static int _bleedRect ( lua_State* L ); - static int _blur ( lua_State* L ); + static int _calculateGaussianKernel ( lua_State* L ); static int _compare ( lua_State* L ); static int _convert ( lua_State* L ); + static int _convolve ( lua_State* L ); + static int _convolve1D ( lua_State* L ); static int _copy ( lua_State* L ); static int _copyBits ( lua_State* L ); static int _copyRect ( lua_State* L ); @@ -96,10 +95,13 @@ class MOAIImage : static int _generateSDFAA ( lua_State* L ); static int _generateSDFDeadReckoning ( lua_State* L ); static int _getColor32 ( lua_State* L ); + static int _getContentRect ( lua_State* L ); + static int _getData ( lua_State* L ); static int _getFormat ( lua_State* L ); static int _getRGBA ( lua_State* L ); static int _getSize ( lua_State* L ); static int _init ( lua_State* L ); + static int _isOpaque ( lua_State* L ); static int _load ( lua_State* L ); static int _loadAsync ( lua_State* L ); static int _loadFromBuffer ( lua_State* L ); @@ -111,14 +113,15 @@ class MOAIImage : static int _setColor32 ( lua_State* L ); static int _setRGBA ( lua_State* L ); static int _simpleThreshold ( lua_State* L ); + static int _subdivideRect ( lua_State* L ); static int _write ( lua_State* L ); //----------------------------------------------------------------// void Alloc (); void ComparePixel ( ZLIntVec2D** grid, ZLIntVec2D& p, int x, int y, int offsetX, int offsetY, int width, int height ); void CalculateSDF ( ZLIntVec2D** grid, int width, int height ); - void* GetRowAddr ( u32 y ); const void* GetRowAddr ( u32 y ) const; + void* GetRowAddrMutable ( u32 y ); virtual void OnImageStatusChanged ( bool isOK ); public: @@ -131,8 +134,14 @@ class MOAIImage : GET_CONST ( u32, Width, mWidth ) GET_CONST ( u32, Height, mHeight ) - GET_CONST ( void*, Bitmap, mBitmap ); - GET_CONST ( void*, Palette, mPalette ); + GET_CONST ( void*, Bitmap, mBitmap.GetBuffer ()) + GET_CONST ( void*, Palette, mPalette.GetBuffer ()) + + GET ( ZLCopyOnWrite, BitmapCow, mBitmap ) + GET ( ZLCopyOnWrite, PaletteCow, mPalette ) + + GET ( ZLSharedConstBuffer*, BitmapBuffer, mBitmap.GetSharedConstBuffer ()) + GET ( ZLSharedConstBuffer*, PaletteBuffer, mBitmap.GetSharedConstBuffer ()) enum { FILTER_LINEAR, @@ -140,72 +149,107 @@ class MOAIImage : }; //----------------------------------------------------------------// - static MOAIImage* AffirmImage ( MOAILuaState& state, int idx ); - ZLColorVec Average () const; - void BleedRect ( ZLIntRect rect ); - void Blit ( const MOAIImage& image, int srcX, int srcY, int destX, int destY, int width, int height ); - void Blur (); - void Clear (); - void ClearBitmap (); - void ClearRect ( ZLIntRect rect ); - bool Compare ( const MOAIImage& image ); - bool Convert ( const MOAIImage& image, ZLColor::ColorFormat colorFmt, PixelFormat pixelFmt ); - void Copy ( const MOAIImage& image ); - void CopyRect ( const MOAIImage& image, ZLIntRect srcRect, ZLIntRect destRect, u32 filter = FILTER_LINEAR ); - void CopyRect ( const MOAIImage& image, ZLIntRect srcRect, ZLIntRect destRect, u32 filter, const ZLColorBlendFunc& blendFunc ); - void Desaturate ( const MOAIImage& image, float rY, float gY, float bY, float K ); - void DrawLine ( int p1x, int p1y, int p2x, int p2y, u32 color ); - void FillCircle ( float x, float y, float xRad, u32 color ); - void FillEllipse ( int x, int y, int xRad, int yRad, u32 color ); - void FillRect ( ZLIntRect rect, u32 color ); - void GammaCorrection ( const MOAIImage& image, float gamma ); - void GenerateOutlineFromSDF ( ZLIntRect rect, float distMin, float distMax, float r, float g, float b, float a ); - void GenerateSDF ( ZLIntRect rect ); - void GenerateSDFAA ( ZLIntRect rect, float sizeInPixels ); - void GenerateSDFDeadReckoning ( ZLIntRect rect, int threshold ); - u32 GetBitmapSize () const; - ZLIntRect GetBounds (); - u32 GetColor ( u32 x, u32 y ) const; - u32 GetDataSize () const; - static u32 GetMinPowerOfTwo ( u32 size ); // gets the smallest power of two greater than size - u32 GetPaletteColor ( u32 idx ) const; - u32 GetPaletteCount () const; - u32 GetPaletteSize () const; - u32 GetPixel ( u32 x, u32 y ) const; - u32 GetPixelDepthInBits () const; - u32 GetPixelMask () const; - ZLIntRect GetRect (); - size_t GetRowSize () const; - void GetSubImage ( const MOAIImage& image, ZLIntRect rect ); - void Init ( const MOAIImage& image ); - void Init ( u32 width, u32 height, ZLColor::ColorFormat colorFmt, PixelFormat pixelFmt ); - void Init ( void* bitmap, u32 width, u32 height, ZLColor::ColorFormat colorFmt ); - bool IsPow2 (); - static bool IsPow2 ( u32 n ); - bool Load ( cc8* filename, u32 transform = 0 ); - bool Load ( ZLStream& stream, u32 transform = 0 ); - bool IsOK (); - bool MipReduce (); - void Mix ( const MOAIImage& image, const ZLMatrix4x4& mtx, float K ); - MOAIImage (); - ~MOAIImage (); - void PadToPow2 ( const MOAIImage& image ); - void PremultiplyAlpha ( const MOAIImage& image ); - void Print (); - void RegisterLuaClass ( MOAILuaState& state ); - void RegisterLuaFuncs ( MOAILuaState& state ); - void ResizeCanvas ( const MOAIImage& image, ZLIntRect rect ); - u32 SampleColor ( float x, float y, u32 filter, bool wrapX = false, bool wrapY = false ) const; - void SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ); - void SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ); - void SetColor ( u32 x, u32 y, u32 color ); - void SetColor ( u32 x, u32 y, u32 color, const ZLColorBlendFunc& blendFunc ); - void SetPaletteColor ( u32 idx, u32 rgba ); - void SetPixel ( u32 x, u32 y, u32 pixel ); - void SimpleThreshold ( const MOAIImage& image, float rT, float gT, float bT, float aT ); - void Take ( MOAIImage& image ); - void Transform ( u32 transform ); - bool Write ( ZLStream& stream, cc8* formatName ); + static MOAIImage* AffirmImage ( MOAILuaState& state, int idx ); + ZLColorVec Average () const; + void BleedRect ( ZLIntRect rect ); + void Blit ( const MOAIImage& image, int srcX, int srcY, int destX, int destY, int width, int height ); + void Blur (); + static void CalculateGaussianKernel ( float radius, float* kernel, size_t kernalWidth ); + static void CalculateGaussianKernel ( float radius, float sigma, float* kernel, size_t kernalWidth ); + static size_t CalculateGaussianKernelWidth ( float radius ); + void Clear (); + void ClearBitmap (); + void ClearRect ( ZLIntRect rect ); + bool Compare ( const MOAIImage& image ); + bool Convert ( const MOAIImage& image, ZLColor::ColorFormat colorFmt, PixelFormat pixelFmt ); + void Convolve ( const MOAIImage& image, const float* kernel, size_t kernelWidth ); + void Convolve ( const MOAIImage& image, const float* kernel, size_t kernelWidth, size_t kernelHeight ); + void Convolve1D ( const MOAIImage& image, const float* kernel, size_t kernelSize, bool horizontal ); + void Copy ( const MOAIImage& image ); + void CopyRect ( const MOAIImage& image, ZLIntRect srcRect, ZLIntRect destRect, u32 filter = FILTER_LINEAR ); + void CopyRect ( const MOAIImage& image, ZLIntRect srcRect, ZLIntRect destRect, u32 filter, const ZLColorBlendFunc& blendFunc ); + void Desaturate ( const MOAIImage& image, float rY, float gY, float bY, float K ); + void DrawLine ( int p1x, int p1y, int p2x, int p2y, u32 color ); + void FillCircle ( float x, float y, float xRad, u32 color ); + void FillEllipse ( int x, int y, int xRad, int yRad, u32 color ); + void FillRect ( ZLIntRect rect, u32 color ); + void GammaCorrection ( const MOAIImage& image, float gamma ); + void GenerateOutlineFromSDF ( ZLIntRect rect, float distMin, float distMax, float r, float g, float b, float a ); + void GenerateSDF ( ZLIntRect rect ); + void GenerateSDFAA ( ZLIntRect rect, float sizeInPixels ); + void GenerateSDFDeadReckoning ( ZLIntRect rect, int threshold ); + size_t GetBitmapSize () const; + ZLIntRect GetBounds (); + u32 GetColor ( u32 x, u32 y ) const; + ZLIntRect GetContentRect (); + size_t GetDataSize () const; + static u32 GetMinPowerOfTwo ( u32 size ); // gets the smallest power of two greater than size + u32 GetPaletteColor ( u32 idx ) const; + u32 GetPaletteCount () const; + size_t GetPaletteSize () const; + u32 GetPixel ( u32 x, u32 y ) const; + u32 GetPixelDepthInBits () const; + u32 GetPixelMask () const; + ZLIntRect GetRect (); + size_t GetRowSize () const; + void GetSubImage ( const MOAIImage& image, ZLIntRect rect ); + void Init ( const MOAIImage& image ); + void Init ( u32 width, u32 height, ZLColor::ColorFormat colorFmt, PixelFormat pixelFmt ); + void Init ( const void* bitmap, u32 width, u32 height, ZLColor::ColorFormat colorFmt ); + bool IsPow2 (); + static bool IsPow2 ( u32 n ); + bool Load ( cc8* filename, u32 transform = 0 ); + bool Load ( ZLStream& stream, u32 transform = 0 ); + bool IsOK (); + bool MipReduce (); + void Mix ( const MOAIImage& image, const ZLMatrix4x4& mtx, float K ); + MOAIImage (); + ~MOAIImage (); + void PadToPow2 ( const MOAIImage& image ); + void PremultiplyAlpha ( const MOAIImage& image ); + void Print (); + void RegisterLuaClass ( MOAILuaState& state ); + void RegisterLuaFuncs ( MOAILuaState& state ); + void ResizeCanvas ( const MOAIImage& image, ZLIntRect rect ); + u32 SampleColor ( float x, float y, u32 filter, bool wrapX = false, bool wrapY = false ) const; + void SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ); + void SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ); + void SetColor ( u32 x, u32 y, u32 color ); + void SetColor ( u32 x, u32 y, u32 color, const ZLColorBlendFunc& blendFunc ); + void SetPaletteColor ( u32 idx, u32 rgba ); + void SetPixel ( u32 x, u32 y, u32 pixel ); + void SimpleThreshold ( const MOAIImage& image, float rT, float gT, float bT, float aT ); + void Take ( MOAIImage& image ); + void Transform ( u32 transform ); + bool Write ( ZLStream& stream, cc8* formatName ); + + //----------------------------------------------------------------// + // TODO: move this somewhere more appropriate + static inline double Gaussian ( double x, double c ) { + + return Gaussian ( x, GaussianUnitIntegral ( c ), 0.0, c ); + } + + //----------------------------------------------------------------// + // TODO: move this somewhere more appropriate + static inline double Gaussian ( double x, double b, double c ) { + + return Gaussian ( x, GaussianUnitIntegral ( c ), b, c ); + } + + //----------------------------------------------------------------// + // TODO: move this somewhere more appropriate + static inline double Gaussian ( double x, double a, double b, double c ) { + + return a * exp ( -((( x - b ) * ( x - b )) / ( 2.0 * ( c * c )))); + } + + //----------------------------------------------------------------// + // TODO: move this somewhere more appropriate + static inline double GaussianUnitIntegral ( double c ) { + + return 1.0 / ( c * sqrt ( TWOPI )); + } }; #endif diff --git a/src/moai-sim/MOAIImageFormat.cpp b/src/moai-sim/MOAIImageFormat.cpp index 1ac73f0b62..9929f42465 100644 --- a/src/moai-sim/MOAIImageFormat.cpp +++ b/src/moai-sim/MOAIImageFormat.cpp @@ -32,15 +32,15 @@ bool MOAIImageFormat::CreateTexture ( MOAISingleTexture& texture, const void* da } //----------------------------------------------------------------// -void* MOAIImageFormat::GetBitmap ( MOAIImage& image ) const { +const void* MOAIImageFormat::GetBitmap ( MOAIImage& image ) const { - return image.mBitmap; + return image.mBitmap.GetBuffer (); } //----------------------------------------------------------------// -void* MOAIImageFormat::GetRowAddr ( MOAIImage& image, u32 y ) const { +void* MOAIImageFormat::GetBitmapMutable ( MOAIImage& image ) const { - return image.GetRowAddr ( y ); + return image.mBitmap.Invalidate (); } //----------------------------------------------------------------// @@ -49,6 +49,12 @@ const void* MOAIImageFormat::GetRowAddr ( const MOAIImage& image, u32 y ) const return image.GetRowAddr ( y ); } +//----------------------------------------------------------------// +void* MOAIImageFormat::GetRowAddrMutable ( MOAIImage& image, u32 y ) const { + + return image.GetRowAddrMutable ( y ); +} + //----------------------------------------------------------------// bool MOAIImageFormat::GetTextureInfo ( ZLStream& stream, MOAITextureInfo& info ) { UNUSED ( stream ); @@ -97,7 +103,7 @@ void MOAIImageFormat::SetPixelFormat ( MOAIImage& image, MOAIImage::PixelFormat } //----------------------------------------------------------------// -void MOAIImageFormat::SetTextureID ( MOAISingleTexture& texture, u32 glTexID, int internalFormat, int pixelType, size_t textureSize ) { +void MOAIImageFormat::SetTextureID ( MOAISingleTexture& texture, ZLGfxHandle* glTexID, int internalFormat, int pixelType, size_t textureSize ) { texture.SetTextureID ( glTexID, internalFormat, pixelType, textureSize ); } diff --git a/src/moai-sim/MOAIImageFormat.h b/src/moai-sim/MOAIImageFormat.h index 14543e105d..f2612e5171 100644 --- a/src/moai-sim/MOAIImageFormat.h +++ b/src/moai-sim/MOAIImageFormat.h @@ -27,13 +27,14 @@ class MOAIImageFormat { //----------------------------------------------------------------// void Alloc ( MOAIImage& image ) const; void CleanupTexture ( MOAISingleTexture& texture ); - void* GetBitmap ( MOAIImage& image ) const; - void* GetRowAddr ( MOAIImage& image, u32 y ) const; + const void* GetBitmap ( MOAIImage& image ) const; + void* GetBitmapMutable ( MOAIImage& image ) const; const void* GetRowAddr ( const MOAIImage& image, u32 y ) const; + void* GetRowAddrMutable ( MOAIImage& image, u32 y ) const; void SetColorFormat ( MOAIImage& image, ZLColor::ColorFormat colorFormat ) const; bool SetDimensions ( MOAIImage& image, u32 width, u32 height, u32 transform ) const; void SetPixelFormat ( MOAIImage& image, MOAIImage::PixelFormat pixelFormat ) const; - void SetTextureID ( MOAISingleTexture& texture, u32 glTexID, int internalFormat, int pixelType, size_t textureSize ); + void SetTextureID ( MOAISingleTexture& texture, ZLGfxHandle* glTexID, int internalFormat, int pixelType, size_t textureSize ); public: diff --git a/src/moai-sim/MOAIImageFormatMgr.cpp b/src/moai-sim/MOAIImageFormatMgr.cpp index c1f230173b..607a90c49f 100644 --- a/src/moai-sim/MOAIImageFormatMgr.cpp +++ b/src/moai-sim/MOAIImageFormatMgr.cpp @@ -30,7 +30,7 @@ MOAIImageFormat* MOAIImageFormatMgr::FindFormat ( ZLStream& stream ) { void* buffer = alloca ( headerSize ); size_t size = stream.ReadBytes ( buffer, headerSize ); - stream.Seek ( cursor, SEEK_SET ); + stream.SetCursor ( cursor ); if (( size == headerSize ) && format.CheckHeader ( buffer )) return &format; } @@ -50,7 +50,7 @@ u32 MOAIImageFormatMgr::HashName ( cc8* name ) { if ( c && isalnum ( c )) { if ( isalpha ( c )) { - c = toupper ( c ); + c = ( char )toupper ( c ); c = ( c - 'A' ) + 10; } else { diff --git a/src/moai-sim/MOAIImageLoadTask.cpp b/src/moai-sim/MOAIImageLoadTask.cpp index c725d389b2..563f5b5600 100644 --- a/src/moai-sim/MOAIImageLoadTask.cpp +++ b/src/moai-sim/MOAIImageLoadTask.cpp @@ -2,8 +2,8 @@ // http://getmoai.com #include "pch.h" -#include #include +#include //================================================================// // MOAIImageLoadTask @@ -35,21 +35,28 @@ void MOAIImageLoadTask::Execute () { //----------------------------------------------------------------// void MOAIImageLoadTask::Init ( cc8* filename, MOAIImage& target, u32 transform ) { + this->mTarget = ⌖ + this->mFilename = filename; this->mTransform = transform; - this->mTarget.Set ( *this, &target ); + this->mTarget->LuaRetain (); } //----------------------------------------------------------------// void MOAIImageLoadTask::Init ( MOAIDataBuffer& data, MOAIImage& target, u32 transform ) { + this->mDataBuffer = &data; + this->mTarget = ⌖ + this->mTransform = transform; - this->mDataBuffer.Set ( *this, &data); - this->mTarget.Set ( *this, &target ); + this->mDataBuffer->LuaRetain (); + this->mTarget->LuaRetain (); } //----------------------------------------------------------------// -MOAIImageLoadTask::MOAIImageLoadTask () { +MOAIImageLoadTask::MOAIImageLoadTask () : + mDataBuffer ( 0 ), + mTarget ( 0 ) { RTTI_SINGLE ( MOAITask ) } @@ -57,8 +64,13 @@ MOAIImageLoadTask::MOAIImageLoadTask () { //----------------------------------------------------------------// MOAIImageLoadTask::~MOAIImageLoadTask () { - this->mDataBuffer.Set ( *this, 0 ); - this->mTarget.Set ( *this, 0 ); + if ( this->mDataBuffer ) { + this->mDataBuffer->LuaRelease (); + } + + if ( this->mTarget ) { + this->mTarget->LuaRelease (); + } } //----------------------------------------------------------------// @@ -90,6 +102,6 @@ void MOAIImageLoadTask::RegisterLuaFuncs ( MOAILuaState& state ) { void MOAIImageLoadTask::SetCallback ( lua_State* L, int idx ) { MOAILuaState state ( L ); - this->mOnFinish.SetRef ( *this, state, idx ); + this->mOnFinish.SetRef ( state, idx ); } diff --git a/src/moai-sim/MOAIImageLoadTask.h b/src/moai-sim/MOAIImageLoadTask.h index 0e890aa605..dd3d51dac3 100644 --- a/src/moai-sim/MOAIImageLoadTask.h +++ b/src/moai-sim/MOAIImageLoadTask.h @@ -11,17 +11,17 @@ class MOAIDataBuffer; //================================================================// // MOAIImageLoadTask //================================================================// -class MOAIImageLoadTask : +class MOAIImageLoadTask : public MOAITask { private: - MOAIImage mImage; + MOAIImage mImage; - STLString mFilename; - MOAILuaSharedPtr < MOAIDataBuffer > mDataBuffer; - MOAILuaSharedPtr < MOAIImage > mTarget; - MOAILuaMemberRef mOnFinish; - u32 mTransform; + STLString mFilename; + MOAIDataBuffer* mDataBuffer; + MOAIImage* mTarget; + MOAILuaStrongRef mOnFinish; + u32 mTransform; //----------------------------------------------------------------// void Execute (); @@ -29,8 +29,6 @@ class MOAIImageLoadTask : public: - DECL_LUA_FACTORY ( MOAIImageLoadTask ) - //----------------------------------------------------------------// void Init ( cc8* filename, MOAIImage& target, u32 transform ); void Init ( MOAIDataBuffer& data, MOAIImage& target, u32 transform ); diff --git a/src/moai-sim/MOAIImageTexture.cpp b/src/moai-sim/MOAIImageTexture.cpp index 04e9be5246..9c8fe76d77 100644 --- a/src/moai-sim/MOAIImageTexture.cpp +++ b/src/moai-sim/MOAIImageTexture.cpp @@ -2,7 +2,7 @@ // http://getmoai.com #include "pch.h" -#include +#include #include //================================================================// @@ -40,8 +40,13 @@ int MOAIImageTexture::_updateRegion ( lua_State* L ) { //================================================================// //----------------------------------------------------------------// -MOAIImageTexture::MOAIImageTexture () : - mStatus ( INVALID ) { +void MOAIImageTexture::OnClearDirty () { + + this->mRegion.Clear (); +} + +//----------------------------------------------------------------// +MOAIImageTexture::MOAIImageTexture () { RTTI_BEGIN RTTI_EXTEND ( MOAISingleTexture ) @@ -56,21 +61,27 @@ MOAIImageTexture::~MOAIImageTexture () { } //----------------------------------------------------------------// -void MOAIImageTexture::OnGPUBind () { +bool MOAIImageTexture::OnGPUCreate () { - if ( this->mStatus == INVALID ) { - this->UpdateTextureFromImage ( *this, this->mRegion ); - this->mStatus = VALID; + if ( !this->IsOK ()) return false; + + this->mRegion.Clear (); + if ( this->CreateTextureFromImage ( *this )) { + return this->OnGPUUpdate (); } - MOAISingleTexture::OnGPUBind (); + return false; } //----------------------------------------------------------------// -bool MOAIImageTexture::OnGPUCreate () { +bool MOAIImageTexture::OnGPUUpdate () { - if ( !this->IsOK ()) return false; - this->mStatus = VALID; - return this->CreateTextureFromImage ( *this ); + bool result = true; + + if ( this->mRegion.Area () > 0 ) { + result = this->UpdateTextureFromImage ( *this, this->mRegion ); + this->mRegion.Clear (); + } + return result && MOAISingleTexture::OnGPUUpdate (); } //----------------------------------------------------------------// @@ -78,7 +89,6 @@ void MOAIImageTexture::OnImageStatusChanged ( bool isOK ) { if ( isOK ) { this->FinishInit (); - this->DoCPUAffirm (); } } @@ -118,7 +128,7 @@ void MOAIImageTexture::SerializeOut ( MOAILuaState& state, MOAISerializer& seria void MOAIImageTexture::UpdateRegion () { this->mRegion = this->GetRect (); - this->mStatus = INVALID; + this->ScheduleForGPUUpdate (); } //----------------------------------------------------------------// @@ -127,11 +137,12 @@ void MOAIImageTexture::UpdateRegion ( ZLIntRect rect ) { rect.Bless (); this->GetRect ().Clip ( rect ); - if ( this->mStatus == VALID ) { - this->mRegion = rect; + if ( this->GetState () == STATE_NEEDS_GPU_UPDATE ) { + this->mRegion.Grow ( rect ); } else { - this->mRegion.Grow ( rect ); + this->mRegion = rect; } - this->mStatus = INVALID; + + this->ScheduleForGPUUpdate (); } diff --git a/src/moai-sim/MOAIImageTexture.h b/src/moai-sim/MOAIImageTexture.h index 9748dffa45..3a1feea412 100644 --- a/src/moai-sim/MOAIImageTexture.h +++ b/src/moai-sim/MOAIImageTexture.h @@ -21,20 +21,15 @@ class MOAIImageTexture : public MOAIImage { private: - enum { - VALID, - INVALID, - }; - - u32 mStatus; ZLIntRect mRegion; //----------------------------------------------------------------// static int _updateRegion ( lua_State* L ); //----------------------------------------------------------------// - void OnGPUBind (); + void OnClearDirty (); bool OnGPUCreate (); + bool OnGPUUpdate (); void OnImageStatusChanged ( bool isOK ); public: diff --git a/src/moai-sim/MOAIIndexBuffer.cpp b/src/moai-sim/MOAIIndexBuffer.cpp index e39e2ea6ba..42cbd4e00f 100644 --- a/src/moai-sim/MOAIIndexBuffer.cpp +++ b/src/moai-sim/MOAIIndexBuffer.cpp @@ -3,8 +3,8 @@ #include "pch.h" -#include -#include +#include +#include #include #include #include @@ -43,7 +43,7 @@ int MOAIIndexBuffer::_copyFromStream ( lua_State* L ) { // TODO: report trunctations! - MOAIIndexBuffer* idxBuffer = state.GetLuaObject < MOAIIndexBuffer >( 2, true ); + MOAIIndexBuffer* idxBuffer = state.GetLuaObject < MOAIIndexBuffer >( 2, false ); if ( idxBuffer ) { self->CopyFromStream ( *idxBuffer, idxBuffer->mIndexSize ); @@ -73,18 +73,15 @@ int MOAIIndexBuffer::_countElements ( lua_State* L ) { u32 totalElements = 0; // prim type, index size in bytes - if ( state.CheckParams ( 2, "N", false )) { + u32 primType = state.GetValue < u32 >( 2, ZGL_PRIM_TRIANGLES ); - u32 primType = state.GetValue < u32 >( 2, ZGL_PRIM_TRIANGLES ); - - totalElements = self->GetSize () / self->mIndexSize; - - if ( primType == ZGL_PRIM_LINES ) { - totalElements /= 2; - } - else if ( primType == ZGL_PRIM_TRIANGLES ) { - totalElements /= 3; - } + totalElements = ( u32 )( self->GetSize () / self->mIndexSize ); + + if ( primType == ZGL_PRIM_LINES ) { + totalElements /= 2; + } + else if ( primType == ZGL_PRIM_TRIANGLES ) { + totalElements /= 3; } state.Push ( totalElements ); @@ -156,7 +153,7 @@ void MOAIIndexBuffer::CopyFromStream ( ZLStream& stream, u32 srcInputSizeInBytes this->Write < u16 >(( u16 )idx ); } } - this->mNeedsFlush = true; + this->ScheduleForGPUUpdate (); } //----------------------------------------------------------------// @@ -177,16 +174,16 @@ MOAIIndexBuffer::~MOAIIndexBuffer () { void MOAIIndexBuffer::PrintIndices () { size_t cursor = this->GetCursor (); - u32 length = cursor / this->mIndexSize; + u32 length = ( u32 )( cursor / this->mIndexSize ); if ( length ) { this->Seek ( 0, SEEK_SET ); for ( u32 i = 0; i < length; ++i ) { - u32 v = this->mIndexSize == 4 ? this->Read < u32 >( 0 ) : this->Read < u16 >( 0 ); + u32 v = this->mIndexSize == 4 ? this->Read < u32 >( 0 ) : ( u32 )this->Read < u16 >( 0 ); printf ( "%d: %d\n", i, v ); } - this->Seek ( cursor, SEEK_SET ); + this->SetCursor ( cursor ); } } diff --git a/src/moai-sim/MOAIIndexBuffer.h b/src/moai-sim/MOAIIndexBuffer.h index c59f6d4d52..c71dcb0dbb 100644 --- a/src/moai-sim/MOAIIndexBuffer.h +++ b/src/moai-sim/MOAIIndexBuffer.h @@ -16,7 +16,7 @@ class MOAIIndexBuffer : public MOAIGfxBuffer { private: - friend class MOAIGfxDeviceBase; + friend class MOAIGfxPipelineClerk; u32 mIndexSize; diff --git a/src/moai-sim/MOAIInputMgr.cpp b/src/moai-sim/MOAIInputMgr.cpp index 511138b84d..fa6d95896a 100644 --- a/src/moai-sim/MOAIInputMgr.cpp +++ b/src/moai-sim/MOAIInputMgr.cpp @@ -26,10 +26,7 @@ int MOAIInputMgr::_autoTimestamp ( lua_State* L ) { MOAI_LUA_SETUP_SINGLE ( MOAIInputMgr, "" ) - self->mAutoTimestamp = state.GetValue < bool >( 1, true ); - if ( self->mAutoTimestamp ) { - self->mTimebase = ZLDeviceTime::GetTimeInSeconds (); - } + self->SetAutotimestamp ( state.GetValue < bool >( 1, true )); return 0; } @@ -97,7 +94,7 @@ int MOAIInputMgr::_suspendEvents ( lua_State* L ) { //----------------------------------------------------------------// u8 MOAIInputMgr::AddDevice ( cc8* name ) { - u8 id = this->mDevices.GetTop (); + u8 id = ( u8 )this->mDevices.GetTop (); this->mDevices.Push (); this->SetDevice ( id, name ); @@ -206,6 +203,7 @@ MOAIInputMgr::~MOAIInputMgr () { //----------------------------------------------------------------// size_t MOAIInputMgr::ParseEvents ( ZLStream& stream, double timestep ) { + UNUSED ( timestep ); // TODO: fix this bool first = true; double timebase = 0; @@ -223,7 +221,7 @@ size_t MOAIInputMgr::ParseEvents ( ZLStream& stream, double timestep ) { first = false; } - if ( timestep < ( timestamp - timebase )) break; + //if ( timestep < ( timestamp - timebase )) break; // TODO: come back to this MOAISensor* sensor = this->GetSensor ( deviceID, sensorID ); assert ( sensor ); @@ -239,9 +237,9 @@ size_t MOAIInputMgr::ParseEvents ( ZLStream& stream, double timestep ) { void MOAIInputMgr::Record ( size_t size ) { if ( this->mRecorder && size ) { - this->Seek ( 0, SEEK_SET ); + this->SetCursor ( 0 ); this->mRecorder->WriteStream ( *this, size ); - this->Seek ( size, SEEK_SET ); + this->SetCursor ( size ); } } @@ -299,6 +297,15 @@ void MOAIInputMgr::SetAutosuspend ( double autosuspend ) { this->mAutosuspend = autosuspend >= 0 ? autosuspend : 0; } +//----------------------------------------------------------------// +void MOAIInputMgr::SetAutotimestamp ( bool autotimestamp ) { + + this->mAutoTimestamp = autotimestamp; + if ( this->mAutoTimestamp ) { + this->mTimebase = ZLDeviceTime::GetTimeInSeconds (); + } +} + //----------------------------------------------------------------// void MOAIInputMgr::SetConfigurationName ( cc8* name ) { @@ -360,12 +367,12 @@ void MOAIInputMgr::SuspendEvents ( bool suspend ) { //----------------------------------------------------------------// void MOAIInputMgr::Update ( double timestep ) { - ZLStream* eventStream = this; + //ZLStream* eventStream = this; if ( this->mPlayback ) { if ( this->mRecorder ) { size_t cursor = this->ParseEvents ( *this->mRecorder, timestep ); - this->mRecorder->Seek ( cursor, SEEK_SET ); + this->mRecorder->SetCursor ( cursor ); } } else { @@ -390,7 +397,7 @@ void MOAIInputMgr::Update ( double timestep ) { this->DiscardFront ( cursor ); // back to the end of the queue - this->Seek ( this->GetLength (), SEEK_SET ); + this->SetCursor ( this->GetLength ()); } } } @@ -404,6 +411,7 @@ bool MOAIInputMgr::WriteEventHeader ( u8 deviceID, u8 sensorID, u32 type ) { this->Write < u8 >(( u8 )sensorID ); double timestamp = this->mAutoTimestamp ? ZLDeviceTime::GetTimeInSeconds () : this->mTimestamp; + this->Write < double >( timestamp - this->mTimebase ); return true; diff --git a/src/moai-sim/MOAIInputMgr.h b/src/moai-sim/MOAIInputMgr.h index 5974fe7984..380b61d67a 100644 --- a/src/moai-sim/MOAIInputMgr.h +++ b/src/moai-sim/MOAIInputMgr.h @@ -78,6 +78,7 @@ class MOAIInputMgr : void ReserveSensors ( u8 deviceID, u8 total ); void ResetSensorState (); void SetAutosuspend ( double autosuspend ); + void SetAutotimestamp ( bool autotimestamp ); void SetConfigurationName ( cc8* name ); void SetDevice ( u8 deviceID, cc8* name ); // back compat void SetDeviceActive ( u8 deviceID, bool active ); diff --git a/src/moai-sim/MOAIKeyCode.h b/src/moai-sim/MOAIKeyCode.h index fc99d03f94..8028eaa52a 100644 --- a/src/moai-sim/MOAIKeyCode.h +++ b/src/moai-sim/MOAIKeyCode.h @@ -118,4 +118,4 @@ class MOAIKeyCode : //----------------------------------------------------------------// void RegisterLuaClass ( MOAILuaState& state ); }; -#endif \ No newline at end of file +#endif diff --git a/src/moai-sim/MOAIKeyboardSensor.cpp b/src/moai-sim/MOAIKeyboardSensor.cpp index 5fdce1672a..3e7ea826e6 100644 --- a/src/moai-sim/MOAIKeyboardSensor.cpp +++ b/src/moai-sim/MOAIKeyboardSensor.cpp @@ -317,7 +317,7 @@ void MOAIKeyboardSensor::ParseEvent ( ZLStream& eventStream ) { } } else if ( eventType == KeyboardEventType::CHAR ) { - u32 unicodeChar = eventStream.Read < u32 >( -1 ); + u32 unicodeChar = eventStream.Read < u32 >( 0xffffffff ); if ( this->mOnChar ) { // Convert to UTF-8 and zero-terminate diff --git a/src/moai-sim/MOAILayer.cpp b/src/moai-sim/MOAILayer.cpp index 91d13ca0c5..52b7b48928 100644 --- a/src/moai-sim/MOAILayer.cpp +++ b/src/moai-sim/MOAILayer.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include @@ -212,10 +212,10 @@ int MOAILayer::_getPropViewList ( lua_State* L ) { u32 sortMode = state.GetValue < u32 >( 2, self->mSortMode ); bool sortInViewSpace = state.GetValue < bool >( 3, self->mSortInViewSpace ); - sortScale [ 0 ] = state.GetValue < bool >( 4, self->mSortScale [ 0 ]); - sortScale [ 1 ] = state.GetValue < bool >( 5, self->mSortScale [ 1 ]); - sortScale [ 2 ] = state.GetValue < bool >( 6, self->mSortScale [ 2 ]); - sortScale [ 3 ] = state.GetValue < bool >( 7, self->mSortScale [ 3 ]); + sortScale [ 0 ] = state.GetValue < float >( 4, self->mSortScale [ 0 ]); + sortScale [ 1 ] = state.GetValue < float >( 5, self->mSortScale [ 1 ]); + sortScale [ 2 ] = state.GetValue < float >( 6, self->mSortScale [ 2 ]); + sortScale [ 3 ] = state.GetValue < float >( 7, self->mSortScale [ 3 ]); ZLMatrix4x4 viewMtx = self->GetViewMtx (); ZLMatrix4x4 invViewProjMtx = viewMtx; @@ -619,6 +619,10 @@ int MOAILayer::_wndToWorld ( lua_State* L ) { int MOAILayer::_wndToWorldRay ( lua_State* L ) { MOAI_LUA_SETUP ( MOAILayer, "UNN" ) + if ( self->mCamera ) { + self->mCamera->ForceUpdate (); + } + ZLMatrix4x4 wndToWorld = self->GetWndToWorldMtx (); ZLVec4D loc; @@ -681,7 +685,7 @@ int MOAILayer::_wndToWorldRay ( lua_State* L ) { if ( self->mCamera && ( self->mCamera->GetType () == MOAICamera::CAMERA_TYPE_3D )) { const ZLAffine3D& localToWorldMtx = self->mCamera->GetLocalToWorldMtx (); ZLVec3D zAxis = localToWorldMtx.GetZAxis (); - ns = -( d / zAxis.Dot ( norm )); + ns = -( d * zAxis.Dot ( norm )); } else { ns = d; @@ -750,7 +754,7 @@ void MOAILayer::Draw ( int subPrimID, float lod ) { if ( !this->mViewport ) return; if ( this->IsClear ()) return; - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAIRenderMgr& renderMgr = MOAIRenderMgr::Get (); MOAIViewport& viewport = *this->mViewport; @@ -758,32 +762,25 @@ void MOAILayer::Draw ( int subPrimID, float lod ) { renderMgr.SetCamera ( this->mCamera ); renderMgr.SetViewport ( this->mViewport ); - - // TODO: leaving this here for now (Moai SDK 1.7) but we need to move/remove it soon - gfxDevice.ResetState (); // TODO: ZLMatrix4x4 mtx; mtx.Init ( this->mLocalToWorldMtx ); // TODO: - //mtx.Append ( gfxDevice.GetWorldToWndMtx ( 1.0f, 1.0f )); + //mtx.Append ( gfxMgr.GetWorldToWndMtx ( 1.0f, 1.0f )); mtx.Transform ( viewportRect ); - gfxDevice.SetViewRect ( viewportRect ); - gfxDevice.SetScissorRect ( viewportRect ); + gfxMgr.mGfxState.SetViewRect ( viewportRect ); + gfxMgr.mGfxState.SetScissorRect ( viewportRect ); this->ClearSurface (); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::WORLD_MTX ); ZLMatrix4x4 view = this->GetViewMtx (); ZLMatrix4x4 proj = this->GetProjectionMtx (); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_VIEW_TRANSFORM, view ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_PROJ_TRANSFORM, proj ); - - // recompute the frustum - gfxDevice.UpdateViewVolume (); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::VIEW_MTX, view ); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::PROJ_MTX, proj ); this->RenderTable ( this->mUnderlayTable ); @@ -793,7 +790,7 @@ void MOAILayer::Draw ( int subPrimID, float lod ) { if ( !interfaceMask ) return; MOAIPartitionResultBuffer& buffer = MOAIPartitionResultMgr::Get ().GetBuffer (); - const ZLFrustum& viewVolume = gfxDevice.GetViewVolume (); + const ZLFrustum& viewVolume = gfxMgr.mGfxState.GetViewVolume (); u32 totalResults = 0; @@ -821,19 +818,19 @@ void MOAILayer::Draw ( int subPrimID, float lod ) { buffer.Sort ( this->mSortMode ); // set up the ambient color - gfxDevice.SetAmbientColor ( this->mColor ); + gfxMgr.mGfxState.SetAmbientColor ( this->mColor ); // figure out the correct LOD factor - float lod = this->mLODFactor * this->GetLinkedValue ( MOAILayerAttr::Pack ( ATTR_LOD ), 1.0f ); + float lodFactor = this->mLODFactor * this->GetLinkedValue ( MOAILayerAttr::Pack ( ATTR_LOD ), 1.0f ); - this->DrawProps ( buffer, lod ); + this->DrawProps ( buffer, lodFactor ); if ( this->mShowDebugLines ) { // clear the ambient color and bind vector drawing - gfxDevice.SetAmbientColor ( 1.0f, 1.0f, 1.0f, 1.0f ); + gfxMgr.mGfxState.SetAmbientColor ( 1.0f, 1.0f, 1.0f, 1.0f ); MOAIDraw::Get ().Bind (); - this->DrawPropsDebug ( buffer, lod ); + this->DrawPropsDebug ( buffer, lodFactor ); } } @@ -1091,17 +1088,29 @@ void MOAILayer::RenderTable ( MOAILuaState& state, int idx ) { int valType = lua_type ( state, -1 ); - if ( valType == LUA_TUSERDATA ) { - MOAIRenderable* renderable = state.GetLuaObject < MOAIRenderable >( -1, false ); - if ( renderable ) { - renderable->Render (); + switch ( valType ) { + + case LUA_TUSERDATA: { + MOAIRenderable* renderable = state.GetLuaObject < MOAIRenderable >( -1, false ); + if ( renderable ) { + renderable->Render (); + } + break; } - } - else if ( valType == LUA_TTABLE ) { - this->RenderTable ( state, -1 ); - } - else { - n = 0; + case LUA_TTABLE: + this->RenderTable ( state, -1 ); + break; + + case LUA_TFUNCTION: { + + MOAIDraw::Bind (); + + state.CopyToTop ( -1 ); + state.DebugCall ( 0, 0 ); + break; + } + default: + n = 0; } lua_pop ( state, 1 ); diff --git a/src/moai-sim/MOAILayoutFrame.cpp b/src/moai-sim/MOAILayoutFrame.cpp index da596ab0f5..fe9b517e24 100644 --- a/src/moai-sim/MOAILayoutFrame.cpp +++ b/src/moai-sim/MOAILayoutFrame.cpp @@ -3,7 +3,7 @@ #include "pch.h" #include -#include +#include #include //================================================================// @@ -301,7 +301,7 @@ ZLRect MOAILayoutFrame::GetScissorRect () { // TODO: mtx.Init ( this->mLocalToWorldMtx ); - //mtx.Append ( MOAIGfxDevice::Get ().GetWorldToWndMtx ( 1.0f, 1.0f )); + //mtx.Append ( MOAIGfxMgr::Get ().GetWorldToWndMtx ( 1.0f, 1.0f )); mtx.Transform ( scissorRect ); return scissorRect; diff --git a/src/moai-sim/MOAIMaterialBatch.cpp b/src/moai-sim/MOAIMaterialBatch.cpp index acece288d8..3af00d7378 100644 --- a/src/moai-sim/MOAIMaterialBatch.cpp +++ b/src/moai-sim/MOAIMaterialBatch.cpp @@ -3,7 +3,7 @@ #include "pch.h" -#include +#include #include #include #include @@ -17,15 +17,14 @@ //================================================================// //----------------------------------------------------------------// -void MOAIMaterial::LoadGfxState ( MOAIMaterial* fallback, u32 defaultShader ) { +bool MOAIMaterial::LoadGfxState ( MOAIMaterial* fallback, u32 defaultShader ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAIShader* shader = this->mShader ? this->mShader : (( fallback && fallback->mShader ) ? fallback->mShader : MOAIShaderMgr::Get ().GetShader ( defaultShader )); MOAITextureBase* texture = this->mTexture ? this->mTexture : (( fallback && fallback->mTexture ) ? fallback->mTexture : 0 ); - gfxDevice.SetShader ( shader ); - gfxDevice.SetTexture ( texture ); + return ( gfxMgr.mGfxState.BindShader ( shader ) && gfxMgr.mGfxState.BindTexture ( texture )); } //----------------------------------------------------------------// @@ -318,30 +317,28 @@ MOAIMaterial* MOAIMaterialBatch::GetMaterial ( u32 materialID, u32 deckIndex ) { } //----------------------------------------------------------------// -void MOAIMaterialBatch::LoadGfxState ( MOAIMaterialBatch* fallback, u32 idx, u32 defaultShader ) { +bool MOAIMaterialBatch::LoadGfxState ( MOAIMaterialBatch* fallback, u32 idx, u32 defaultShader ) { - this->LoadGfxState ( fallback, UNKNOWN, idx, defaultShader ); + return this->LoadGfxState ( fallback, UNKNOWN, idx, defaultShader ); } //----------------------------------------------------------------// -void MOAIMaterialBatch::LoadGfxState ( MOAIMaterialBatch* fallback, u32 materialID, u32 deckIndex, u32 defaultShader ) { +bool MOAIMaterialBatch::LoadGfxState ( MOAIMaterialBatch* fallback, u32 materialID, u32 deckIndex, u32 defaultShader ) { MOAIMaterial* primary = this->GetMaterial ( materialID, deckIndex ); MOAIMaterial* secondary = ( fallback && ( this != fallback )) ? fallback->GetMaterial ( materialID, deckIndex ) : 0; if ( primary ) { - primary->LoadGfxState ( secondary, defaultShader ); + return primary->LoadGfxState ( secondary, defaultShader ); } else if ( secondary ) { - secondary->LoadGfxState ( 0, defaultShader ); + return secondary->LoadGfxState ( 0, defaultShader ); } - else { - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.SetTexture (); - gfxDevice.SetShader ( MOAIShaderMgr::Get ().GetShader ( defaultShader )); - } + gfxMgr.mGfxState.BindTexture (); + return gfxMgr.mGfxState.BindShader ( MOAIShaderMgr::Get ().GetShader ( defaultShader )); } //----------------------------------------------------------------// @@ -355,6 +352,8 @@ MOAIMaterialBatch::MOAIMaterialBatch () : //----------------------------------------------------------------// MOAIMaterialBatch::~MOAIMaterialBatch () { + + this->Clear (); } //----------------------------------------------------------------// @@ -483,23 +482,23 @@ void MOAIMaterialBatch::SetHitMaskThreshold ( MOAILuaState& state, u32 idx ) { } //----------------------------------------------------------------// -void MOAIMaterialBatch::RawLoadGfxState ( u32 idx, u32 defaultShader ) { - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - MOAIShader* shader = 0; - MOAITextureBase* texture = 0; - - if ( idx < this->mMaterials.Size ()) { - shader = this->mMaterials [ idx ].mShader; - texture = this->mMaterials [ idx ].mTexture; - } - - shader = shader ? shader : MOAIShaderMgr::Get ().GetShader ( defaultShader ); - - gfxDevice.SetShader ( shader ); - gfxDevice.SetTexture ( texture ); -} +//void MOAIMaterialBatch::RawLoadGfxState ( u32 idx, u32 defaultShader ) { +// +// MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); +// +// MOAIShader* shader = 0; +// MOAITextureBase* texture = 0; +// +// if ( idx < this->mMaterials.Size ()) { +// shader = this->mMaterials [ idx ].mShader; +// texture = this->mMaterials [ idx ].mTexture; +// } +// +// shader = shader ? shader : MOAIShaderMgr::Get ().GetShader ( defaultShader ); +// +// gfxMgr.SetShader ( shader ); +// gfxMgr.SetTexture ( texture ); +//} //----------------------------------------------------------------// void MOAIMaterialBatch::Reserve ( u32 n ) { diff --git a/src/moai-sim/MOAIMaterialBatch.h b/src/moai-sim/MOAIMaterialBatch.h index 18dfc02dea..d3507a74c2 100644 --- a/src/moai-sim/MOAIMaterialBatch.h +++ b/src/moai-sim/MOAIMaterialBatch.h @@ -27,7 +27,7 @@ class MOAIMaterial { public: //----------------------------------------------------------------// - void LoadGfxState ( MOAIMaterial* fallback, u32 defaultShader ); + bool LoadGfxState ( MOAIMaterial* fallback, u32 defaultShader ); MOAIMaterial (); virtual ~MOAIMaterial (); bool TestHit ( float x, float y ); // in local (uv) space of the mask @@ -84,14 +84,14 @@ class MOAIMaterialBatch : void Clear (); MOAIMaterial* GetMaterial ( u32 idx ); MOAIMaterial* GetMaterial ( u32 materialID, u32 deckIndex ); - void LoadGfxState ( MOAIMaterialBatch* fallback, u32 idx, u32 defaultShader ); - void LoadGfxState ( MOAIMaterialBatch* fallback, u32 materialID, u32 deckIndex, u32 defaultShader ); + bool LoadGfxState ( MOAIMaterialBatch* fallback, u32 idx, u32 defaultShader ); + bool LoadGfxState ( MOAIMaterialBatch* fallback, u32 materialID, u32 deckIndex, u32 defaultShader ); MOAIMaterialBatch (); virtual ~MOAIMaterialBatch (); MOAIMaterial* RawGetMaterial ( u32 idx ); MOAIShader* RawGetShader ( u32 idx ); MOAITextureBase* RawGetTexture ( u32 idx ); - void RawLoadGfxState ( u32 idx, u32 defaultShader ); + //void RawLoadGfxState ( u32 idx, u32 defaultShader ); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); void Reserve ( u32 n ); diff --git a/src/moai-sim/MOAIMatrix.cpp b/src/moai-sim/MOAIMatrix.cpp index 38997caba1..9cff9fb7b1 100644 --- a/src/moai-sim/MOAIMatrix.cpp +++ b/src/moai-sim/MOAIMatrix.cpp @@ -103,10 +103,12 @@ void MOAIMatrix::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIMatrix::SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ) { + UNUSED ( state ); UNUSED ( serializer ); } //----------------------------------------------------------------// void MOAIMatrix::SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ) { + UNUSED ( state ); UNUSED ( serializer ); } diff --git a/src/moai-sim/MOAIMesh.cpp b/src/moai-sim/MOAIMesh.cpp index 24ea830f58..d20ff8ffa7 100644 --- a/src/moai-sim/MOAIMesh.cpp +++ b/src/moai-sim/MOAIMesh.cpp @@ -3,8 +3,8 @@ #include "pch.h" -#include -#include +#include +#include #include #include #include @@ -114,16 +114,14 @@ void MOAIMesh::DrawIndex ( u32 idx, MOAIMeshSpan* span, MOAIMaterialBatch& mater UNUSED ( offset ); UNUSED ( scale ); - materials.LoadGfxState ( this, idx, MOAIShaderMgr::MESH_SHADER ); + if ( !materials.LoadGfxState ( this, idx, MOAIShaderMgr::MESH_SHADER )) return; // TODO: make use of offset and scale - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + if ( gfxMgr.mGfxState.BindVertexArray ( this )) { - this->FinishInit (); - gfxDevice.BindVertexArray ( this ); - - if ( this->IsReady ()) { + ZLGfx& gfx = gfxMgr.GetDrawingAPI (); // I am super lazy, so set this up here instead of adding if's below MOAIMeshSpan defaultSpan; @@ -133,39 +131,36 @@ void MOAIMesh::DrawIndex ( u32 idx, MOAIMeshSpan* span, MOAIMaterialBatch& mater defaultSpan.mNext = 0; span = &defaultSpan; } - - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_MODEL ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); - gfxDevice.SetPenWidth ( this->mPenWidth ); + gfxMgr.mGfxState.SetPenWidth ( this->mPenWidth ); - gfxDevice.UpdateShaderGlobals (); + gfxMgr.mGfxState.UpdateAndBindUniforms (); - // TODO: use gfxDevice to cache buffers if ( this->mIndexBuffer ) { - gfxDevice.BindIndexBuffer ( this->mIndexBuffer ); - if ( this->mIndexBuffer->IsReady ()) { + // TODO: turns out we can bind this inside the VAO as well. so there. + if ( gfxMgr.mGfxState.BindIndexBuffer ( this->mIndexBuffer )) { - u32 indexSizeInBytes = this->mIndexBuffer->GetIndexSize (); + size_t indexSizeInBytes = this->mIndexBuffer->GetIndexSize (); for ( ; span; span = span->mNext ) { - zglDrawElements ( + gfx.DrawElements ( this->mPrimType, - span->mTop - span->mBase, + ( u32 )( span->mTop - span->mBase ), indexSizeInBytes == 2 ? ZGL_TYPE_UNSIGNED_SHORT : ZGL_TYPE_UNSIGNED_INT, - ( const void* )(( size_t )this->mIndexBuffer->GetAddress () + ( span->mBase * indexSizeInBytes )) + this->mIndexBuffer->GetBuffer (), + span->mBase * indexSizeInBytes ); } - gfxDevice.BindIndexBuffer (); + gfxMgr.mGfxState.BindIndexBuffer (); } } else { for ( ; span; span = span->mNext ) { - zglDrawArrays ( this->mPrimType, span->mBase, span->mTop - span->mBase ); + gfx.DrawArrays ( this->mPrimType, ( u32 )span->mBase, ( u32 )( span->mTop - span->mBase )); } } - gfxDevice.BindVertexArray (); + gfxMgr.mGfxState.BindVertexArray (); } } @@ -235,13 +230,10 @@ void MOAIMesh::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIMesh::ReserveVAOs ( u32 total ) { - if ( MOAIGfxResourceMgr::IsValid ()) { - for ( size_t i = 0; i < this->mVAOs.Size (); ++i ) { - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_BUFFER, this->mVAOs [ i ]); - } + for ( size_t i = 0; i < this->mVAOs.Size (); ++i ) { + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mVAOs [ i ], false ); } this->mVAOs.Init ( total ); - this->mVAOs.Fill ( 0 ); } //----------------------------------------------------------------// @@ -303,7 +295,7 @@ void MOAIMesh::SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ) lua_setfield ( state, -2, "mBounds" ); - state.SetField < u32 >( -1, "mPenWidth", this->mPenWidth ); + state.SetField < u32 >( -1, "mPenWidth", ( u32 )this->mPenWidth ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIMultiTexture.cpp b/src/moai-sim/MOAIMultiTexture.cpp index 71c38a39d5..db0f021f2f 100644 --- a/src/moai-sim/MOAIMultiTexture.cpp +++ b/src/moai-sim/MOAIMultiTexture.cpp @@ -9,6 +9,25 @@ // local //================================================================// +//----------------------------------------------------------------// +/** @lua release + @text Releases any memory associated with the texture. + + @in MOAIMultiTexture self + @out nil +*/ +int MOAIMultiTexture::_release ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIMultiTexture, "U" ) + + for ( size_t i = 0; i < self->mTextures.Size (); ++i ) { + MOAISingleTexture* texture = self->mTextures [ i ]; + if ( texture ) { + texture->Destroy (); + } + } + return 0; +} + //----------------------------------------------------------------// /** @lua reserve @text Reserve or clears indices for textures. @@ -54,7 +73,7 @@ int MOAIMultiTexture::_setTexture ( lua_State* L ) { //----------------------------------------------------------------// u32 MOAIMultiTexture::CountActiveUnits () { - return this->mTextures.Size (); + return ( u32 )this->mTextures.Size (); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIMultiTexture.h b/src/moai-sim/MOAIMultiTexture.h index 96dd74a1b6..6f52ca0b94 100644 --- a/src/moai-sim/MOAIMultiTexture.h +++ b/src/moai-sim/MOAIMultiTexture.h @@ -16,12 +16,13 @@ class MOAIMultiTexture : public MOAITextureBase { private: - friend class MOAIGfxDevice; - friend class MOAIGfxDeviceStateCache; + friend class MOAIGfxMgr; + friend class MOAIGfxStateCache; ZLLeanArray < MOAISingleTexture* > mTextures; //----------------------------------------------------------------// + static int _release ( lua_State* L ); static int _reserve ( lua_State* L ); static int _setTexture ( lua_State* L ); diff --git a/src/moai-sim/MOAINode.cpp b/src/moai-sim/MOAINode.cpp index 5f8d9f7865..555ecd41b5 100644 --- a/src/moai-sim/MOAINode.cpp +++ b/src/moai-sim/MOAINode.cpp @@ -211,7 +211,7 @@ int MOAINode::_moveAttr ( lua_State* L ) { action->SetLink ( 0, self, attrID, value, mode ); action->SetSpan ( length ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -271,7 +271,7 @@ int MOAINode::_seekAttr ( lua_State* L ) { action->SetLink ( 0, self, attrID, value - getter.GetValue ( 0.0f ), mode ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; diff --git a/src/moai-sim/MOAIParticlePexPlugin.cpp b/src/moai-sim/MOAIParticlePexPlugin.cpp index 8e49f441a4..689766204f 100644 --- a/src/moai-sim/MOAIParticlePexPlugin.cpp +++ b/src/moai-sim/MOAIParticlePexPlugin.cpp @@ -4,9 +4,12 @@ #include "pch.h" #if MOAI_WITH_TINYXML - #include -#endif +SUPPRESS_EMPTY_FILE_WARNING + +#include + +#include #include #include #include @@ -35,6 +38,7 @@ // lua //================================================================// +//----------------------------------------------------------------// int MOAIParticlePexPlugin::_getBlendMode( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) @@ -43,44 +47,50 @@ int MOAIParticlePexPlugin::_getBlendMode( lua_State* L ){ return 2; } -int MOAIParticlePexPlugin::_getDuration( lua_State* L ){ +//----------------------------------------------------------------// +int MOAIParticlePexPlugin::_getDuration ( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) lua_pushnumber ( state, self->mDuration ); return 1; } -int MOAIParticlePexPlugin::_getEmission( lua_State* L ){ +//----------------------------------------------------------------// +int MOAIParticlePexPlugin::_getEmission ( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) lua_pushnumber ( state, self->mEmissionCount ); return 1; } -int MOAIParticlePexPlugin::_getFrequency( lua_State* L ){ +//----------------------------------------------------------------// +int MOAIParticlePexPlugin::_getFrequency ( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) lua_pushnumber ( state, self->mEmissionRate ); return 1; } -int MOAIParticlePexPlugin::_getLifespan ( lua_State* L ){ +//----------------------------------------------------------------// +int MOAIParticlePexPlugin::_getLifespan ( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) - lua_pushnumber ( state, self->mLifespanTerm[0] ); - lua_pushnumber ( state, self->mLifespanTerm[1] ); + lua_pushnumber ( state, self->mLifespanTerm [ 0 ]); + lua_pushnumber ( state, self->mLifespanTerm [ 1 ]); return 2; } +//----------------------------------------------------------------// int MOAIParticlePexPlugin::_getMaxParticles ( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) lua_pushnumber ( state, self->mNumParticles ); return 1; } +//----------------------------------------------------------------// int MOAIParticlePexPlugin::_getRect( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) - lua_pushnumber ( state, -self->mSourcePosVariance[0] ); - lua_pushnumber ( state, -self->mSourcePosVariance[1] ); - lua_pushnumber ( state, self->mSourcePosVariance[0] ); - lua_pushnumber ( state, self->mSourcePosVariance[1] ); + lua_pushnumber ( state, -self->mSourcePosVariance [ 0 ]); + lua_pushnumber ( state, -self->mSourcePosVariance [ 1 ]); + lua_pushnumber ( state, self->mSourcePosVariance [ 0 ]); + lua_pushnumber ( state, self->mSourcePosVariance [ 1 ]); return 4; } @@ -94,7 +104,8 @@ int MOAIParticlePexPlugin::_getRect( lua_State* L ){ int MOAIParticlePexPlugin::_getTextureName( lua_State* L ){ MOAI_LUA_SETUP ( MOAIParticlePexPlugin, "U" ) - lua_pushstring( state, self->mTextureName); + lua_pushstring ( state, self->mTextureName ); + return 1; } @@ -108,445 +119,299 @@ int MOAIParticlePexPlugin::_getTextureName( lua_State* L ){ int MOAIParticlePexPlugin::_load( lua_State* L ){ UNUSED ( L ); - #if MOAI_WITH_TINYXML - MOAILuaState state ( L ); - if ( !state.CheckParams ( 1, "S" )) { - MOAILogF ( L, ZLLog::LOG_ERROR, MOAILogMessages::MOAI_ParamTypeMismatch ); - return 0; - } - - cc8* xml = lua_tostring ( state, 1 ); - - if ( MOAILogMessages::CheckFileExists ( xml, L )) { - TiXmlDocument doc; - doc.LoadFile ( xml ); - MOAIParticlePexPlugin *particle = new MOAIParticlePexPlugin(); - MOAIParticlePexPlugin::Parse ( xml, *particle, doc.RootElement ()); - particle->PushLuaUserdata ( state ); - return 1; - } - #endif + MOAILuaState state ( L ); + if ( !state.CheckParams ( 1, "S" )) { + MOAILogF ( L, ZLLog::LOG_ERROR, MOAILogMessages::MOAI_ParamTypeMismatch ); + return 0; + } + + cc8* xml = lua_tostring ( state, 1 ); + + if ( MOAILogMessages::CheckFileExists ( xml, L )) { + TiXmlDocument doc; + doc.LoadFile ( xml ); + MOAIParticlePexPlugin *particle = new MOAIParticlePexPlugin(); + MOAIParticlePexPlugin::Parse ( xml, *particle, doc.RootElement ()); + particle->PushLuaUserdata ( state ); + return 1; + } return 0; } + //================================================================// // MOAIParticlePlugin //================================================================// -#if MOAI_WITH_TINYXML -#include +//----------------------------------------------------------------// // warning: modifies size argument -static -void read_n_values(float *array, TiXmlAttribute *attribute, int max, int *registers, int &size) { - for (int i = 0; i < max; ++i) { - if (attribute) { - array[i] = atof(attribute->Value()); - if (array[i] != 0) { - if (registers) { - registers[i] = size++; +static void read_n_values ( float *array, TiXmlAttribute *attribute, int max, int *registers, int &size ) { + + for ( int i = 0; i < max; ++i ) { + if ( attribute ) { + array [ i ] = ( float )atof ( attribute->Value ()); + if ( array [ i ] != 0 ) { + if ( registers ) { + registers [ i ] = size++; } } - attribute = attribute->Next(); - } else { - array[i] = 0; + attribute = attribute->Next (); + } + else { + array [ i ] = 0; } } } -void MOAIParticlePexPlugin::Parse( cc8* filename, MOAIParticlePexPlugin& plugin, TiXmlNode* node ) -{ - if ( !node ) return; - - plugin.mParticlePath = filename; - - STLString absFilePath = ZLFileSys::GetAbsoluteFilePath ( filename ); - STLString absDirPath = ZLFileSys::TruncateFilename ( absFilePath ); - - TiXmlElement* element = node->ToElement(); - - if ( element && !strcmp(element->Value (), "particleEmitterConfig") ) { - - plugin.mSize = 0; - // round up the children - STLSet < string > children; - TiXmlElement* childElement = node->FirstChildElement (); - - for ( ; childElement; childElement = childElement->NextSiblingElement ()) { - STLString text = childElement->Value (); - TiXmlAttribute* attribute = childElement->FirstAttribute (); - - if(!attribute || !text || text == "") - continue; - - if(text == "angle") - plugin.mAngle = (float)atof(attribute->Value()); - else if(text == "angleVariance") - { - plugin.mAngleVariance = (float)atof(attribute->Value()); - if(plugin.mAngleVariance != 0) - plugin.mAngleRegister = plugin.mSize++; - } - else if(text == "blendFuncSource") - plugin.mBlendFuncSrc = zglMapFromGLEnum( atoi(attribute->Value())); - else if(text == "blendFuncDestination") - plugin.mBlendFuncDst = zglMapFromGLEnum( atoi(attribute->Value())); - else if(text == "duration") - plugin.mDuration = (float)atof(attribute->Value()); - else if(text == "emitterType") - plugin.mEmitterType = (EmitterType)atoi(attribute->Value()); - else if(text == "finishColor") - read_n_values(plugin.mFinishColor, attribute, 4, NULL, plugin.mSize); - else if(text == "finishColorVariance") - read_n_values(plugin.mFinishColorVariance, attribute, 4, plugin.mFinishColorRegister, plugin.mSize); - else if(text == "finishParticleSize") - plugin.mFinishSize = (float)atof(attribute->Value()); - // this used to be spelled with a capital F, accept that for - // compatibility. - else if(text == "finishParticleSizeVariance" || text == "FinishParticleSizeVariance") - { - plugin.mFinishSizeVariance = (float)atof(attribute->Value()); - if(plugin.mFinishSizeVariance != 0) - plugin.mFinishSizeRegister = plugin.mSize++; - } - else if(text == "gravity") - read_n_values(plugin.mGravity, attribute, 2, NULL, plugin.mSize); - else if(text == "maxParticles") - plugin.mNumParticles = atoi(attribute->Value()); - else if(text == "maxRadius") - plugin.mMaxRadius = (float)atof(attribute->Value()); - else if(text == "maxRadiusVariance") - { - plugin.mMaxRadiusVariance = (float)atof(attribute->Value()); - if(plugin.mMaxRadiusVariance != 0) - plugin.mMaxRadiusRegister = plugin.mSize++; - } - else if(text == "minRadius") - plugin.mMinRadius = (float)atof(attribute->Value()); - else if(text == "particleLifeSpan") - plugin.mLifespan = (float)atof(attribute->Value()); - else if(text == "particleLifespanVariance") - { - plugin.mLifespanVariance = (float)atof(attribute->Value()); - if(plugin.mLifespanVariance != 0) - plugin.mLifespanRegister = plugin.mSize++; - } - else if(text == "radialAcceleration") - plugin.mRadialAcceleration = (float)atof(attribute->Value()); - else if(text == "radialAccelVariance") - { - plugin.mRadialAccelVariance = (float)atof(attribute->Value()); - if(plugin.mRadialAccelVariance != 0) - plugin.mRadialAccelRegister = plugin.mSize++; - } - else if(text == "rotatePerSecond") - plugin.mRotPerSecond = (float)atof(attribute->Value()); - else if(text == "rotatePerSecondVariance") - { - plugin.mRotPerSecondVariance = (float)atof(attribute->Value()); - } - else if(text == "rotationEnd") - plugin.mRotEnd = (float)atof(attribute->Value()); - else if(text == "rotationEndVariance") - { - plugin.mRotEndVariance = (float)atof(attribute->Value()); - if(plugin.mRotEndVariance != 0) - plugin.mRotEndRegister = plugin.mSize++; - } - else if(text == "rotationStart") - plugin.mRotStart = (float)atof(attribute->Value()); - else if(text == "rotationStartVariance") - { - plugin.mRotStartVariance = (float)atof(attribute->Value()); - if(plugin.mRotStartVariance != 0) - plugin.mRotStartRegister = plugin.mSize++; - } - else if(text == "sourcePosition") - read_n_values(plugin.mSourcePos, attribute, 2, NULL, plugin.mSize); - else if(text == "sourcePositionVariance") - read_n_values(plugin.mSourcePosVariance, attribute, 2, NULL, plugin.mSize); - else if(text == "speed") - plugin.mSpeed = (float)atof(attribute->Value()); - else if(text == "speedVariance") - { - plugin.mSpeedVariance = (float)atof(attribute->Value()); - if(plugin.mSpeedVariance != 0) - plugin.mSpeedRegister = plugin.mSize++; - } - else if(text == "startColor") - read_n_values(plugin.mStartColor, attribute, 4, NULL, plugin.mSize); - else if(text == "startColorVariance") - read_n_values(plugin.mStartColorVariance, attribute, 4, plugin.mStartColorRegister, plugin.mSize); - else if(text == "startParticleSize") - plugin.mStartSize = (float)atof(attribute->Value()); - else if(text == "startParticleSizeVariance") - { - plugin.mStartSizeVariance = (float)atof(attribute->Value()); - if(plugin.mStartSizeVariance != 0) - plugin.mStartSizeRegister = plugin.mSize++; - } - else if(text == "tangentialAcceleration") - plugin.mTanAccel = (float)atof(attribute->Value()); - else if(text == "tangentialAccelVariance") - { - plugin.mTanAccelVariance = (float)atof(attribute->Value()); - if(plugin.mTanAccelVariance != 0) - plugin.mTanAccelRegister = plugin.mSize++; - } - else if(text == "texture") { - plugin.mTextureName = absDirPath; - plugin.mTextureName.append ( attribute->Value ()); - } - - } - - plugin.mStartXRegister = plugin.mSize++; - plugin.mStartYRegister = plugin.mSize++; +//----------------------------------------------------------------// +MOAIParticlePexPlugin::MOAIParticlePexPlugin () : + mLifespanRegister(-1), + mAngleRegister(-1), + mStartSizeRegister(-1), + mFinishSizeRegister(-1), + mMaxRadiusRegister(-1), + mRadialAccelRegister(-1), + mTanAccelRegister(-1), + mRotStartRegister(-1), + mRotEndRegister(-1), + mSpeedRegister(-1){ - if(plugin.mEmitterType == EMITTER_GRAVITY) - { - plugin.mDirectionXRegister = plugin.mSize++; - plugin.mDirectionYRegister = plugin.mSize++; - } - else - { - plugin.mRotPerSecondRegister = plugin.mSize++; - plugin.mRadialRegister = plugin.mSize++; - } + memset(mStartColorRegister, -1, sizeof(mStartColorRegister)); + memset(mFinishColorRegister, -1,sizeof(mFinishColorRegister)); + mSourcePos[0] = mSourcePos[1] = 0; + mSourcePosVariance[0] = mSourcePosVariance[1] = 0; - // Set up emitter. - plugin.mEmissionRate = 1.0f / (plugin.mNumParticles / plugin.mLifespan ); - plugin.mEmissionCount = 1; - if( plugin.mEmissionRate < 0.05 ) - { - plugin.mEmissionCount = (u32)ceil( 0.05 / plugin.mEmissionRate ); - plugin.mEmissionRate *= plugin.mEmissionCount; - } + RTTI_SINGLE ( MOAIParticlePlugin ) +} - plugin.mLifespanTerm[0] = plugin.mLifespan - plugin.mLifespanVariance < 0 ? 0 : plugin.mLifespan - plugin.mLifespanVariance; - plugin.mLifespanTerm[1] = plugin.mLifespan + plugin.mLifespanVariance; - } +//----------------------------------------------------------------// +MOAIParticlePexPlugin::~MOAIParticlePexPlugin () { } -#endif -void MOAIParticlePexPlugin::OnInit ( float* particle, float* registers) -{ +//----------------------------------------------------------------// +void MOAIParticlePexPlugin::OnInit ( float* particle, float* registers ) { + // Set colors. - for(int i = 0; i < 4; i++) - { + for ( int i = 0; i < 4; i++ ) { - if (mStartColorRegister[i] > -1 ) - { - float minVal = mStartColor[i] - mStartColorVariance[i] < 0 ? 0 : mStartColor[i] - mStartColorVariance[i]; - registers[mStartColorRegister[i]] = ZLFloat::Rand (minVal, mStartColor[i] + mStartColorVariance[i] ); + if ( mStartColorRegister [ i ] > -1 ) { + float minVal = mStartColor [ i ] - mStartColorVariance [ i ] < 0 ? 0 : mStartColor [ i ] - mStartColorVariance [ i ]; + registers[mStartColorRegister [ i ]] = ZLFloat::Rand ( minVal, mStartColor [ i ] + mStartColorVariance [ i ]); } - if(mFinishColorRegister[i] > -1 ) - { - float minVal = mFinishColor[i] - mFinishColorVariance[i] < 0 ? 0 : mFinishColor[i] - mFinishColorVariance[i]; - registers[mFinishColorRegister[i]] =ZLFloat::Rand (minVal, mFinishColor[i] + mFinishColorVariance[i] ); + if ( mFinishColorRegister [ i ] > -1 ) { + float minVal = mFinishColor [ i ] - mFinishColorVariance [ i ] < 0 ? 0 : mFinishColor [ i ] - mFinishColorVariance [ i ]; + registers[mFinishColorRegister [ i ]] =ZLFloat::Rand ( minVal, mFinishColor [ i ] + mFinishColorVariance [ i ]); } } - if(mStartSizeRegister > -1) - { + if ( mStartSizeRegister > -1 ) { float minVal = mStartSize - mStartSizeVariance < 0 ? 0 : mStartSize - mStartSizeVariance; - registers[mStartSizeRegister] = ZLFloat::Rand (minVal, mStartSize + mStartSizeVariance); + registers [ mStartSizeRegister ] = ZLFloat::Rand ( minVal, mStartSize + mStartSizeVariance ); } - if(mFinishSizeRegister > -1) - { + if ( mFinishSizeRegister > -1 ) { float minVal = mFinishSize - mFinishSizeVariance < 0 ? 0 : mFinishSize - mFinishSizeVariance; - registers[mFinishSizeRegister] = ZLFloat::Rand (minVal, mFinishSize + mFinishSizeVariance); + registers [ mFinishSizeRegister ] = ZLFloat::Rand ( minVal, mFinishSize + mFinishSizeVariance ); } - if(mRotStartRegister > -1 ) - registers[mRotStartRegister] = ZLFloat::Rand (mRotStart-mRotStartVariance, mRotStart+mRotStartVariance); + if ( mRotStartRegister > -1 ) + registers [ mRotStartRegister] = ZLFloat::Rand ( mRotStart-mRotStartVariance, mRotStart+mRotStartVariance ); - if(mRotEndRegister > -1) - registers[mRotStartRegister] = ZLFloat::Rand (mRotEnd-mRotEndVariance, mRotEnd+mRotEndVariance); + if ( mRotEndRegister > -1 ) { + registers [ mRotStartRegister ] = ZLFloat::Rand ( mRotEnd-mRotEndVariance, mRotEnd+mRotEndVariance ); + } float angleStartDeg; + // have to compute the angle first, because the computed DX and DY may be used by later calculations. - if(mEmitterType == EMITTER_GRAVITY) - { + if ( mEmitterType == EMITTER_GRAVITY ) { // for gravity emitters, use mAngle as a modifier on the angle computed from dy and dx. - angleStartDeg = (atan2f ( particle[MOAIParticle::PARTICLE_DY], particle[MOAIParticle::PARTICLE_DX] ) * R2D ) + mAngle; + angleStartDeg = ( float )( atan2f ( particle [ MOAIParticle::PARTICLE_DY ], particle [ MOAIParticle::PARTICLE_DX ]) * R2D ) + mAngle; } - else - { + else { angleStartDeg = mAngle; } - if (mAngleRegister > -1) - { - angleStartDeg += ZLFloat::Rand (- mAngleVariance, + mAngleVariance ); + if ( mAngleRegister > -1 ) { + angleStartDeg += ZLFloat::Rand ( -mAngleVariance, + mAngleVariance ); } - particle[MOAIParticle::PARTICLE_DX] = Cos(angleStartDeg * (float)D2R); - particle[MOAIParticle::PARTICLE_DY] = Sin(angleStartDeg * (float)D2R); + + particle [ MOAIParticle::PARTICLE_DX ] = Cos ( angleStartDeg * ( float )D2R ); + particle [ MOAIParticle::PARTICLE_DY ] = Sin ( angleStartDeg * ( float )D2R ); - if (mEmitterType == EMITTER_GRAVITY) - { + if ( mEmitterType == EMITTER_GRAVITY ) { + // Set initial speed - if (mSpeedRegister > -1) - { - registers[mSpeedRegister] = ZLFloat::Rand(mSpeed - mSpeedVariance, mSpeed + mSpeedVariance); - registers[mDirectionXRegister] = particle[MOAIParticle::PARTICLE_DX] * registers[mSpeedRegister]; - registers[mDirectionYRegister] = particle[MOAIParticle::PARTICLE_DY] * registers[mSpeedRegister]; + if ( mSpeedRegister > -1 ) { + registers [ mSpeedRegister ] = ZLFloat::Rand ( mSpeed - mSpeedVariance, mSpeed + mSpeedVariance ); + registers [ mDirectionXRegister ] = particle [ MOAIParticle::PARTICLE_DX ] * registers [ mSpeedRegister ]; + registers [ mDirectionYRegister ] = particle [ MOAIParticle::PARTICLE_DY ] * registers [ mSpeedRegister ]; + } + else { + registers [ mDirectionXRegister ] = particle [ MOAIParticle::PARTICLE_DX ] * mSpeed; + registers [ mDirectionYRegister ] = particle [ MOAIParticle::PARTICLE_DY ] * mSpeed; } - else - { - registers[mDirectionXRegister] = particle[MOAIParticle::PARTICLE_DX] * mSpeed; - registers[mDirectionYRegister] = particle[MOAIParticle::PARTICLE_DY] * mSpeed; + + if ( mRadialAccelRegister > -1 ) { + registers [ mRadialAccelRegister ] = ZLFloat::Rand ( mRadialAcceleration - mRadialAccelVariance, mRadialAcceleration + mRadialAccelVariance ); } - if (mRadialAccelRegister > -1) - registers[mRadialAccelRegister] = ZLFloat::Rand(mRadialAcceleration - mRadialAccelVariance, mRadialAcceleration + mRadialAccelVariance); - if (mTanAccelRegister > -1) - registers[mTanAccelRegister] = ZLFloat::Rand(mTanAccel - mTanAccelVariance, mTanAccel + mTanAccelVariance); + if ( mTanAccelRegister > -1 ) { + registers [ mTanAccelRegister ] = ZLFloat::Rand ( mTanAccel - mTanAccelVariance, mTanAccel + mTanAccelVariance ); + } } - else - { - if (mRotPerSecondVariance != 0) - { - float randVal = ZLFloat::Rand (mRotPerSecond - mRotPerSecondVariance, mRotPerSecond + mRotPerSecondVariance); - registers[mRotPerSecondRegister] = randVal; - } else { - registers[mRotPerSecondRegister] = mRotPerSecond; + else { + + if ( mRotPerSecondVariance != 0 ) { + float randVal = ZLFloat::Rand ( mRotPerSecond - mRotPerSecondVariance, mRotPerSecond + mRotPerSecondVariance ); + registers [ mRotPerSecondRegister ] = randVal; + } + else { + registers [ mRotPerSecondRegister ] = mRotPerSecond; } - if (mMaxRadiusRegister > -1 ) - { - registers[mMaxRadiusRegister] = ZLFloat::Rand (mMaxRadius - mMaxRadiusVariance, mMaxRadius + mMaxRadiusVariance); - particle[MOAIParticle::PARTICLE_X] += Cos(angleStartDeg * (float)D2R) * registers[mMaxRadiusRegister]; - particle[MOAIParticle::PARTICLE_Y] += Sin(angleStartDeg * (float)D2R) * registers[mMaxRadiusRegister]; + if ( mMaxRadiusRegister > -1 ) { + registers [ mMaxRadiusRegister ] = ZLFloat::Rand ( mMaxRadius - mMaxRadiusVariance, mMaxRadius + mMaxRadiusVariance ); + particle [ MOAIParticle::PARTICLE_X ] += Cos ( angleStartDeg * ( float )D2R ) * registers [ mMaxRadiusRegister ]; + particle [ MOAIParticle::PARTICLE_Y ] += Sin ( angleStartDeg * ( float )D2R ) * registers [ mMaxRadiusRegister ]; } - else - { - particle[MOAIParticle::PARTICLE_X] += Cos(angleStartDeg * (float)D2R) * mMaxRadius; - particle[MOAIParticle::PARTICLE_Y] += Sin(angleStartDeg * (float)D2R) * mMaxRadius; + else { + particle [ MOAIParticle::PARTICLE_X ] += Cos ( angleStartDeg * ( float )D2R ) * mMaxRadius; + particle [ MOAIParticle::PARTICLE_Y ] += Sin ( angleStartDeg * ( float )D2R ) * mMaxRadius; } registers[mRadialRegister] = angleStartDeg; } // pick a slightly different source position, based on mSourcePos - registers[mStartXRegister] = particle[MOAIParticle::PARTICLE_X] + mSourcePos[0] + ZLFloat::Rand(- mSourcePosVariance[0], + mSourcePosVariance[0]); - registers[mStartYRegister] = particle[MOAIParticle::PARTICLE_Y] + mSourcePos[1] + ZLFloat::Rand(- mSourcePosVariance[1], + mSourcePosVariance[1]); + registers [ mStartXRegister ] = particle [ MOAIParticle::PARTICLE_X ] + mSourcePos [ 0 ] + ZLFloat::Rand ( -mSourcePosVariance [ 0 ], + mSourcePosVariance [ 0 ]); + registers [ mStartYRegister ] = particle [ MOAIParticle::PARTICLE_Y ] + mSourcePos [ 1 ] + ZLFloat::Rand ( -mSourcePosVariance [ 1 ], + mSourcePosVariance [ 1 ]); - particle[MOAIParticle::PARTICLE_X] = registers[mStartXRegister]; - particle[MOAIParticle::PARTICLE_Y] = registers[mStartYRegister]; + particle [ MOAIParticle::PARTICLE_X ] = registers [ mStartXRegister ]; + particle [ MOAIParticle::PARTICLE_Y ] = registers [ mStartYRegister ]; } -void MOAIParticlePexPlugin::OnRender ( float* particle, float* registers, AKUParticleSprite* sprite, float t0, float t1, float term) -{ +//----------------------------------------------------------------// +void MOAIParticlePexPlugin::OnRender ( float* particle, float* registers, AKUParticleSprite* sprite, float t0, float t1, float term) { + // Set colors. float sVal, eVal; - for(int i = 0; i < 4; i++) - { + for ( int i = 0; i < 4; i++ ) { - if(mStartColorRegister[i] > -1 ) - sVal = registers[mStartColorRegister[i]]; - else - sVal = mStartColor[i]; - - if(mFinishColorRegister[i] > -1 ) - eVal = registers[mFinishColorRegister[i]]; - else - eVal = mFinishColor[i]; - - switch(i) - { - case 0: - sprite->mRed = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); - break; - case 1: - sprite->mGreen = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); - break; - case 2: - sprite->mBlue = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); - break; - case 3: - sprite->mAlpha = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); - break; + if ( mStartColorRegister [ i ] > -1 ) { + sVal = registers[mStartColorRegister [ i ]]; + } + else { + sVal = mStartColor [ i ]; + } + + if ( mFinishColorRegister [ i ] > -1 ) { + eVal = registers[mFinishColorRegister [ i ]]; + } + else { + eVal = mFinishColor [ i ]; + } + + switch ( i ) { + + case 0: + sprite->mRed = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); + break; + + case 1: + sprite->mGreen = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); + break; + + case 2: + sprite->mBlue = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); + break; + + case 3: + sprite->mAlpha = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); + break; } } - if(mStartSizeRegister > -1 ) - sVal = registers[mStartSizeRegister]; - else + if ( mStartSizeRegister > -1 ) { + sVal = registers [ mStartSizeRegister ]; + } + else { sVal = mStartSize; + } - if(mFinishSizeRegister > -1 ) - eVal = registers[mFinishSizeRegister]; - else + if ( mFinishSizeRegister > -1 ) { + eVal = registers [ mFinishSizeRegister ]; + } + else { eVal = mFinishSize; + } - if(sVal != eVal) - { + if ( sVal != eVal ) { sprite->mXScl = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); sprite->mYScl = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); } - else - { + else { sprite->mXScl = sVal; sprite->mYScl = sVal; } - if(mRotStartRegister > -1 ) - sVal = registers[mRotStartRegister]; - else + if ( mRotStartRegister > -1 ) { + sVal = registers [ mRotStartRegister ]; + } + else { sVal = mRotStart; + } - if(mRotEndRegister > -1 ) - eVal = registers[mRotEndRegister]; - else + if ( mRotEndRegister > -1 ) { + eVal = registers [ mRotEndRegister ]; + } + else { eVal = mRotEnd; + } - if( sVal != eVal) + if ( sVal != eVal ) { sprite->mZRot = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, eVal, t1 ); - else + } + else { sprite->mZRot = sVal; + } - if (mEmitterType == EMITTER_GRAVITY) - { + if ( mEmitterType == EMITTER_GRAVITY ) { + float moveX = 0; float moveY = 0; - float dx = particle[MOAIParticle::PARTICLE_X] - registers[mStartXRegister]; - float dy = particle[MOAIParticle::PARTICLE_Y] - registers[mStartYRegister]; + float dx = particle [ MOAIParticle::PARTICLE_X ] - registers [ mStartXRegister ]; + float dy = particle [ MOAIParticle::PARTICLE_Y ] - registers [ mStartYRegister ]; - if(mRadialAcceleration != 0 || mRadialAccelVariance != 0 || - mTanAccel != 0 || mTanAccelVariance != 0) - { + if ( mRadialAcceleration != 0 || mRadialAccelVariance != 0 || mTanAccel != 0 || mTanAccelVariance != 0 ) { + float xVal, yVal; - float denom = Sqrt( (dx * dx) + (dy * dy) ); + float denom = Sqrt (( dx * dx ) + ( dy * dy )); // Set radial acceleration - if( mRadialAcceleration != 0 || mRadialAccelVariance != 0) - { - if(denom) - { - xVal = (float)( dx / denom ); - yVal = (float)( dy / denom ); + if ( mRadialAcceleration != 0 || mRadialAccelVariance != 0 ) { + + if ( denom ) { + xVal = ( float )( dx / denom ); + yVal = ( float )( dy / denom ); } - else - { + else { xVal = 0; yVal = 0; } - if( mRadialAccelRegister > -1) - { - xVal *= registers[mRadialAccelRegister]; - yVal *= registers[mRadialAccelRegister]; + if ( mRadialAccelRegister > -1 ) { + xVal *= registers [ mRadialAccelRegister ]; + yVal *= registers [ mRadialAccelRegister ]; } - else - { + else { xVal *= mRadialAcceleration; yVal *= mRadialAcceleration; } @@ -555,27 +420,23 @@ void MOAIParticlePexPlugin::OnRender ( float* particle, float* registers, AKUPa } // Set tangential acceleration - if(mTanAccel != 0 || mTanAccelVariance != 0) - { - if(denom) - { - xVal = (float)( dx / denom ); - yVal = (float)( dy / denom ); + if ( mTanAccel != 0 || mTanAccelVariance != 0 ) { + + if ( denom ) { + xVal = ( float )( dx / denom ); + yVal = ( float )( dy / denom ); } - else - { + else { xVal = 0; yVal = 0; } float yNewVal = xVal; - if( mTanAccelRegister > -1) - { - xVal = -yVal * registers[mTanAccelRegister]; - yVal = yNewVal * registers[mTanAccelRegister]; + if ( mTanAccelRegister > -1 ) { + xVal = -yVal * registers [ mTanAccelRegister ]; + yVal = yNewVal * registers [ mTanAccelRegister ]; } - else - { + else { xVal = -yVal * mTanAccel; yVal = yNewVal * mTanAccel; } @@ -585,8 +446,8 @@ void MOAIParticlePexPlugin::OnRender ( float* particle, float* registers, AKUPa } } - moveX += mGravity[0]; - moveY += mGravity[1]; + moveX += mGravity [ 0 ]; + moveY += mGravity [ 1 ]; float delta = t1 - t0; delta *= term; @@ -594,58 +455,288 @@ void MOAIParticlePexPlugin::OnRender ( float* particle, float* registers, AKUPa moveX *= delta; moveY *= delta; - registers[ mDirectionXRegister ] += moveX; - registers[ mDirectionYRegister ] += moveY; + registers [ mDirectionXRegister ] += moveX; + registers [ mDirectionYRegister ] += moveY; - moveX = registers[ mDirectionXRegister ] * delta; - moveY = registers[ mDirectionYRegister ] * delta; + moveX = registers [ mDirectionXRegister ] * delta; + moveY = registers [ mDirectionYRegister ] * delta; - particle[ MOAIParticle::PARTICLE_X ] += moveX; - particle[ MOAIParticle::PARTICLE_Y ] += moveY; + particle [ MOAIParticle::PARTICLE_X ] += moveX; + particle [ MOAIParticle::PARTICLE_Y ] += moveY; } - else - { - registers[mRadialRegister] += registers[mRotPerSecondRegister] * ((t1 - t0)*term); + else { + + registers [ mRadialRegister ] += registers [ mRotPerSecondRegister ] * (( t1 - t0 ) * term ); - if(mMaxRadiusRegister > -1) + if ( mMaxRadiusRegister > -1 ) { sVal = registers[mMaxRadiusRegister]; - else + } + else { sVal = mMaxRadius; + } + float magVal = ZLInterpolate::Interpolate ( ZLInterpolate::kLinear, sVal, mMinRadius, t1 ); - particle[MOAIParticle::PARTICLE_X] = registers[mStartXRegister] - Cos(registers[mRadialRegister] * (float)D2R) * magVal; - particle[MOAIParticle::PARTICLE_Y] = registers[mStartYRegister] - Sin(registers[mRadialRegister] * (float)D2R) * magVal; + particle [ MOAIParticle::PARTICLE_X ] = registers [ mStartXRegister ] - Cos ( registers [ mRadialRegister ] * ( float )D2R ) * magVal; + particle [ MOAIParticle::PARTICLE_Y ] = registers [ mStartYRegister ] - Sin ( registers [ mRadialRegister ] * ( float )D2R ) * magVal; } - sprite->mXLoc = particle[ MOAIParticle::PARTICLE_X ]; - sprite->mYLoc = particle[ MOAIParticle::PARTICLE_Y ]; + sprite->mXLoc = particle [ MOAIParticle::PARTICLE_X ]; + sprite->mYLoc = particle [ MOAIParticle::PARTICLE_Y ]; sprite->mGfxID = 1; } //----------------------------------------------------------------// -MOAIParticlePexPlugin::MOAIParticlePexPlugin () : - mLifespanRegister(-1), - mAngleRegister(-1), - mStartSizeRegister(-1), - mFinishSizeRegister(-1), - mMaxRadiusRegister(-1), - mRadialAccelRegister(-1), - mTanAccelRegister(-1), - mRotStartRegister(-1), - mRotEndRegister(-1), - mSpeedRegister(-1){ +void MOAIParticlePexPlugin::Parse ( cc8* filename, MOAIParticlePexPlugin& plugin, TiXmlNode* node ) { - memset(mStartColorRegister, -1, sizeof(mStartColorRegister)); - memset(mFinishColorRegister, -1,sizeof(mFinishColorRegister)); - mSourcePos[0] = mSourcePos[1] = 0; - mSourcePosVariance[0] = mSourcePosVariance[1] = 0; + if ( !node ) return; + + plugin.mParticlePath = filename; + + STLString absFilePath = ZLFileSys::GetAbsoluteFilePath ( filename ); + STLString absDirPath = ZLFileSys::TruncateFilename ( absFilePath ); + + TiXmlElement* element = node->ToElement (); - RTTI_SINGLE ( MOAIParticlePlugin ) -} + if ( element && !strcmp ( element->Value (), "particleEmitterConfig" )) { + + plugin.mSize = 0; + // round up the children + STLSet < string > children; + TiXmlElement* childElement = node->FirstChildElement (); + + for ( ; childElement; childElement = childElement->NextSiblingElement ()) { + + STLString text = childElement->Value (); + TiXmlAttribute* attribute = childElement->FirstAttribute (); -//----------------------------------------------------------------// -MOAIParticlePexPlugin::~MOAIParticlePexPlugin () { + if ( !attribute || !text || text == "" ) continue; + + if ( text == "angle" ) { + plugin.mAngle = ( float )atof(attribute->Value ()); + } + else if ( text == "angleVariance" ) { + + plugin.mAngleVariance = ( float )atof ( attribute->Value ()); + + if ( plugin.mAngleVariance != 0 ) { + plugin.mAngleRegister = plugin.mSize++; + } + } + else if ( text == "blendFuncSource" ) { + plugin.mBlendFuncSrc = ZLGfxEnum::MapNativeToZL ( atoi(attribute->Value())); + } + else if ( text == "blendFuncDestination" ) { + plugin.mBlendFuncDst = ZLGfxEnum::MapNativeToZL ( atoi(attribute->Value())); + } + else if ( text == "duration" ) { + plugin.mDuration = ( float )atof ( attribute->Value ()); + } + else if ( text == "emitterType" ) { + plugin.mEmitterType = ( EmitterType )atoi ( attribute->Value ()); + } + else if (text == "finishColor") { + read_n_values ( plugin.mFinishColor, attribute, 4, NULL, plugin.mSize ); + } + else if(text == "finishColorVariance") { + read_n_values ( plugin.mFinishColorVariance, attribute, 4, plugin.mFinishColorRegister, plugin.mSize ); + } + else if ( text == "finishParticleSize" ) { + plugin.mFinishSize = ( float )atof ( attribute->Value ()); + // this used to be spelled with a capital F, accept that for + // compatibility. + } + else if ( text == "finishParticleSizeVariance" || text == "FinishParticleSizeVariance" ) { + + plugin.mFinishSizeVariance = ( float )atof ( attribute->Value ()); + + if ( plugin.mFinishSizeVariance != 0 ) { + plugin.mFinishSizeRegister = plugin.mSize++; + } + } + else if ( text == "gravity" ) { + read_n_values ( plugin.mGravity, attribute, 2, NULL, plugin.mSize ); + } + else if ( text == "maxParticles" ) { + plugin.mNumParticles = atoi ( attribute->Value ()); + } + else if ( text == "maxRadius" ) { + plugin.mMaxRadius = ( float )atof ( attribute->Value ()); + } + else if ( text == "maxRadiusVariance" ) { + plugin.mMaxRadiusVariance = ( float )atof ( attribute->Value ()); + if ( plugin.mMaxRadiusVariance != 0 ) { + plugin.mMaxRadiusRegister = plugin.mSize++; + } + } + else if(text == "minRadius") { + plugin.mMinRadius = ( float )atof ( attribute->Value ()); + } + else if(text == "particleLifeSpan") { + plugin.mLifespan = ( float )atof ( attribute->Value ()); + } + else if ( text == "particleLifespanVariance" ) + { + plugin.mLifespanVariance = ( float )atof ( attribute->Value ()); + if ( plugin.mLifespanVariance != 0 ) { + plugin.mLifespanRegister = plugin.mSize++; + } + } + else if ( text == "radialAcceleration" ) { + plugin.mRadialAcceleration = ( float )atof ( attribute->Value ()); + } + else if ( text == "radialAccelVariance" ) { + plugin.mRadialAccelVariance = ( float )atof(attribute->Value ()); + if ( plugin.mRadialAccelVariance != 0 ) { + plugin.mRadialAccelRegister = plugin.mSize++; + } + } + else if ( text == "rotatePerSecond" ) { + plugin.mRotPerSecond = ( float )atof ( attribute->Value ()); + } + else if ( text == "rotatePerSecondVariance" ) { + plugin.mRotPerSecondVariance = ( float )atof ( attribute->Value ()); + } + else if(text == "rotationEnd") { + plugin.mRotEnd = ( float )atof ( attribute->Value ()); + } + else if ( text == "rotationEndVariance" ) { + plugin.mRotEndVariance = ( float )atof ( attribute->Value ()); + if ( plugin.mRotEndVariance != 0 ) { + plugin.mRotEndRegister = plugin.mSize++; + } + } + else if(text == "rotationStart") { + plugin.mRotStart = ( float )atof ( attribute->Value ()); + } + else if ( text == "rotationStartVariance" ) { + plugin.mRotStartVariance = ( float )atof ( attribute->Value ()); + if ( plugin.mRotStartVariance != 0 ) { + plugin.mRotStartRegister = plugin.mSize++; + } + } + else if ( text == "sourcePosition" ) { + read_n_values ( plugin.mSourcePos, attribute, 2, NULL, plugin.mSize ); + } + else if ( text == "sourcePositionVariance" ) { + read_n_values ( plugin.mSourcePosVariance, attribute, 2, NULL, plugin.mSize ); + } + else if ( text == "speed" ) { + plugin.mSpeed = ( float )atof ( attribute->Value ()); + } + else if ( text == "speedVariance" ) { + plugin.mSpeedVariance = ( float )atof ( attribute->Value ()); + if ( plugin.mSpeedVariance != 0 ) { + plugin.mSpeedRegister = plugin.mSize++; + } + } + else if(text == "startColor") { + read_n_values ( plugin.mStartColor, attribute, 4, NULL, plugin.mSize ); + } + else if ( text == "startColorVariance" ) { + read_n_values ( plugin.mStartColorVariance, attribute, 4, plugin.mStartColorRegister, plugin.mSize ); + } + else if ( text == "startParticleSize" ) { + plugin.mStartSize = ( float )atof ( attribute->Value ()); + } + else if ( text == "startParticleSizeVariance" ) { + plugin.mStartSizeVariance = ( float )atof ( attribute->Value ()); + if ( plugin.mStartSizeVariance != 0 ) { + plugin.mStartSizeRegister = plugin.mSize++; + } + } + else if ( text == "tangentialAcceleration" ) { + plugin.mTanAccel = ( float )atof ( attribute->Value ()); + } + else if ( text == "tangentialAccelVariance" ) { + plugin.mTanAccelVariance = ( float )atof( attribute->Value ()); + if ( plugin.mTanAccelVariance != 0 ) { + plugin.mTanAccelRegister = plugin.mSize++; + } + } + else if ( text == "texture" ) { + + plugin.mTextureName = absDirPath; + plugin.mTextureName.append ( attribute->Value ()); + +// STLString data = childElement->Attribute ( "data" ); +// if ( data.size ()) { +// printf ( "floooooob! %s\n", data.c_str ()); +// size_t len = data.base_64_decode_len (); +// if ( len ) { +// +// void* buffer = malloc ( len ); +// data.base_64_decode ( buffer, len ); +// +// ZLByteStream cryptStream; +// cryptStream.SetBuffer ( buffer, len ); +// cryptStream.SetLength ( len ); +// +// ZLMemStream plainStream; +// +// ZLDeflateReader inflater; +// +// inflater.SetWindowBits ( 16 + MAX_WBITS ); +// inflater.Open ( &cryptStream ); +// plainStream.WriteStream ( inflater ); +// inflater.Close (); +// +// len = plainStream.GetLength (); +// void* png = malloc ( len ); +// +// plainStream.Seek ( 0, SEEK_SET ); +// plainStream.ReadBytes ( png, len ); +// +// char foo [ 4 ]; +// memset ( foo, 0, sizeof ( foo )); +// memcpy ( foo, png, 3 ); +// printf ( "%s\n", foo ); +// +// MOAIByteStream stream; +// stream.Open ( png, len ); +// +// MOAIImage* image = new MOAIImage (); +// image->Load ( stream ); +// plugin.mImage.Set ( plugin, image ); +// +// free ( png ); +// free ( buffer ); +// } +// } + } + } + + plugin.mStartXRegister = plugin.mSize++; + plugin.mStartYRegister = plugin.mSize++; + + if ( plugin.mEmitterType == EMITTER_GRAVITY ) { + plugin.mDirectionXRegister = plugin.mSize++; + plugin.mDirectionYRegister = plugin.mSize++; + } + else { + plugin.mRotPerSecondRegister = plugin.mSize++; + plugin.mRadialRegister = plugin.mSize++; + } + + // Set up emitter. + float minLifespan = plugin.mLifespan - plugin.mLifespanVariance; + float maxLifespan = plugin.mLifespan + plugin.mLifespanVariance; + + minLifespan = minLifespan < 0.0f ? 0.0f : minLifespan; + + float avgLifespan = ( maxLifespan + minLifespan ) / 2.0f; + + plugin.mEmissionRate = 1.0f / ( plugin.mNumParticles / avgLifespan ); + plugin.mEmissionCount = 1; + if( plugin.mEmissionRate < 0.05 ) { + plugin.mEmissionCount = ( u32 )ceil ( 0.05 / plugin.mEmissionRate ); + plugin.mEmissionRate *= plugin.mEmissionCount; + } + + plugin.mLifespanTerm [ 0 ] = minLifespan; + plugin.mLifespanTerm [ 1 ] = maxLifespan; + } } //----------------------------------------------------------------// @@ -679,3 +770,5 @@ void MOAIParticlePexPlugin::RegisterLuaFuncs ( MOAILuaState& state ) { luaL_register( state, 0, regTable ); } + +#endif \ No newline at end of file diff --git a/src/moai-sim/MOAIParticlePexPlugin.h b/src/moai-sim/MOAIParticlePexPlugin.h index 6c14af37bd..5b4e5c1178 100644 --- a/src/moai-sim/MOAIParticlePexPlugin.h +++ b/src/moai-sim/MOAIParticlePexPlugin.h @@ -4,19 +4,17 @@ #ifndef MOAIPARTICLEPEXPLUGIN_H #define MOAIPARTICLEPEXPLUGIN_H +#if MOAI_WITH_TINYXML + #include #include #include -#if MOAI_WITH_TINYXML - #include -#endif - //================================================================// // MOAIParticlePexPlugin //================================================================// /** @lua MOAIParticlePexPlugin - @text Allows custom particle processing derived from .pex file via C language callback. + @text Allows custom particle processing derived from .pex file via C language callback. */ class MOAIParticlePexPlugin : public virtual MOAIParticlePlugin { @@ -27,90 +25,92 @@ class MOAIParticlePexPlugin : EMITTER_RADIAL, }; - u32 mNumParticles; - EmitterType mEmitterType; + u32 mNumParticles; + EmitterType mEmitterType; - float mLifespan; - float mLifespanVariance; - float mLifespanTerm[2]; + float mLifespan; + float mLifespanVariance; + float mLifespanTerm [ 2 ]; - s32 mLifespanRegister; + s32 mLifespanRegister; - float mAngle; - float mAngleVariance; - s32 mAngleRegister; + float mAngle; + float mAngleVariance; + s32 mAngleRegister; - float mStartColor[4]; - float mStartColorVariance[4]; - int mStartColorRegister[4]; + float mStartColor [ 4 ]; + float mStartColorVariance [ 4 ]; + int mStartColorRegister [ 4 ]; - float mFinishColor[4]; - float mFinishColorVariance[4]; - s32 mFinishColorRegister[4]; + float mFinishColor [ 4 ]; + float mFinishColorVariance [ 4 ]; + s32 mFinishColorRegister [ 4 ]; - float mStartSize; - float mStartSizeVariance; - s32 mStartSizeRegister; + float mStartSize; + float mStartSizeVariance; + s32 mStartSizeRegister; - float mFinishSize; - float mFinishSizeVariance; - s32 mFinishSizeRegister; + float mFinishSize; + float mFinishSizeVariance; + s32 mFinishSizeRegister; - float mGravity[2]; + float mGravity [ 2 ]; - float mMaxRadius; - float mMaxRadiusVariance; - s32 mMaxRadiusRegister; + float mMaxRadius; + float mMaxRadiusVariance; + s32 mMaxRadiusRegister; - float mMinRadius; + float mMinRadius; - float mRadialAcceleration; - float mRadialAccelVariance; - s32 mRadialAccelRegister; + float mRadialAcceleration; + float mRadialAccelVariance; + s32 mRadialAccelRegister; - float mTanAccel; - float mTanAccelVariance; - s32 mTanAccelRegister; + float mTanAccel; + float mTanAccelVariance; + s32 mTanAccelRegister; - float mRotStart; - float mRotStartVariance; - s32 mRotStartRegister; + float mRotStart; + float mRotStartVariance; + s32 mRotStartRegister; - float mRotEnd; - float mRotEndVariance; - s32 mRotEndRegister; + float mRotEnd; + float mRotEndVariance; + s32 mRotEndRegister; - float mSpeed; - float mSpeedVariance; - s32 mSpeedRegister; + float mSpeed; + float mSpeedVariance; + s32 mSpeedRegister; - float mRotPerSecond; - float mRotPerSecondVariance; + float mRotPerSecond; + float mRotPerSecondVariance; - float mSourcePos[2]; - float mSourcePosVariance[2]; + float mSourcePos [ 2 ]; + float mSourcePosVariance [ 2 ]; - float mDuration; + float mDuration; - u32 mBlendFuncSrc; - u32 mBlendFuncDst; + u32 mBlendFuncSrc; + u32 mBlendFuncDst; - STLString mTextureName; - STLString mParticlePath; + STLString mTextureName; + STLString mParticlePath; // Gravity Registers - s32 mStartXRegister; - s32 mStartYRegister; - s32 mDirectionXRegister; - s32 mDirectionYRegister; + s32 mStartXRegister; + s32 mStartYRegister; + s32 mDirectionXRegister; + s32 mDirectionYRegister; // Radial Registers - s32 mRotPerSecondRegister; - s32 mRadialRegister; + s32 mRotPerSecondRegister; + s32 mRadialRegister; // Emission information. - u32 mEmissionCount; - float mEmissionRate; + u32 mEmissionCount; + float mEmissionRate; + + //MOAILuaSharedPtr < MOAIImage > mImage; //----------------------------------------------------------------// static int _getBlendMode ( lua_State* L ); @@ -123,9 +123,8 @@ class MOAIParticlePexPlugin : static int _getTextureName ( lua_State* L ); static int _load ( lua_State* L ); -#if MOAI_WITH_TINYXML - static void Parse ( cc8* filename, MOAIParticlePexPlugin& plugin, TiXmlNode* node ); -#endif + + static void Parse ( cc8* filename, MOAIParticlePexPlugin& plugin, TiXmlNode* node ); public: @@ -141,5 +140,6 @@ class MOAIParticlePexPlugin : void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); }; - + +#endif #endif diff --git a/src/moai-sim/MOAIParticleSystem.cpp b/src/moai-sim/MOAIParticleSystem.cpp index 913276f134..43d9f23dbd 100644 --- a/src/moai-sim/MOAIParticleSystem.cpp +++ b/src/moai-sim/MOAIParticleSystem.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include @@ -377,7 +377,7 @@ void MOAIParticleSystem::Draw ( int subPrimID, float lod ) { if ( !this->mDeck ) return; if ( this->IsClear ()) return; - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); this->LoadGfxState (); this->LoadUVTransform (); @@ -387,7 +387,7 @@ void MOAIParticleSystem::Draw ( int subPrimID, float lod ) { ZLAffine3D drawingMtx; ZLAffine3D spriteMtx; - u32 maxSprites = this->mSprites.Size (); + u32 maxSprites = ( u32 )this->mSprites.Size (); u32 total = this->mSpriteTop; u32 base = 0; if ( total > maxSprites ) { @@ -406,14 +406,14 @@ void MOAIParticleSystem::Draw ( int subPrimID, float lod ) { } AKUParticleSprite& sprite = this->mSprites [ idx ]; - gfxDevice.SetPenColor ( sprite.mRed, sprite.mGreen, sprite.mBlue, sprite.mAlpha ); + gfxMgr.mGfxState.SetPenColor ( sprite.mRed, sprite.mGreen, sprite.mBlue, sprite.mAlpha ); spriteMtx.ScRoTr ( sprite.mXScl, sprite.mYScl, 1.0f, 0.0f, 0.0f, sprite.mZRot * ( float )D2R, sprite.mXLoc, sprite.mYLoc, 0.0f ); drawingMtx = this->GetLocalToWorldMtx (); drawingMtx.Prepend ( spriteMtx ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, drawingMtx ); + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::WORLD_MTX, drawingMtx ); this->mDeck->Draw ( MOAIDeckRemapper::Remap ( this->mRemapper, this->mIndex + ( u32 )sprite.mGfxID ), materials ); } @@ -520,7 +520,7 @@ void MOAIParticleSystem::OnUpdate ( double step ) { // update the particle if ( particle->mState ) { - particle->mState->ProcessParticle ( *this, *particle, step ); + particle->mState->ProcessParticle ( *this, *particle,( float )step ); } // if is still to be killed, move it to the free list, else put it back in the queue @@ -597,7 +597,7 @@ bool MOAIParticleSystem::PushParticle ( float x, float y, float dx, float dy, u3 //----------------------------------------------------------------// bool MOAIParticleSystem::PushSprite ( const AKUParticleSprite& sprite ) { - u32 size = this->mSprites.Size (); + u32 size = ( u32 )this->mSprites.Size (); if ( size && this->mDeck ) { @@ -617,7 +617,7 @@ bool MOAIParticleSystem::PushSprite ( const AKUParticleSprite& sprite ) { bounds.Scale ( scale ); float radius = bounds.GetMaxExtent () * 1.4f; // handles case when bounds are rotated - + bounds.mMin.Init ( -radius, -radius, 0.0f ); bounds.mMax.Init ( radius, radius, 0.0f ); diff --git a/src/moai-sim/MOAIParticleTimedEmitter.cpp b/src/moai-sim/MOAIParticleTimedEmitter.cpp index 74a1abc6ae..be28a7668f 100644 --- a/src/moai-sim/MOAIParticleTimedEmitter.cpp +++ b/src/moai-sim/MOAIParticleTimedEmitter.cpp @@ -57,7 +57,7 @@ MOAIParticleTimedEmitter::~MOAIParticleTimedEmitter () { //----------------------------------------------------------------// void MOAIParticleTimedEmitter::OnUpdate ( double step ) { - this->mTime += step; + this->mTime += ( float )step; if ( !this->mSystem ) return; if ( this->mTime < this->mEmitTime ) return; diff --git a/src/moai-sim/MOAIPartition.cpp b/src/moai-sim/MOAIPartition.cpp index 9b1950f4a9..0e713385cc 100644 --- a/src/moai-sim/MOAIPartition.cpp +++ b/src/moai-sim/MOAIPartition.cpp @@ -462,7 +462,7 @@ u32 MOAIPartition::AffirmInterfaceMask ( u32 typeID ) { u32 mask = this->GetInterfaceMask ( typeID ); if ( mask == 0 ) { - u32 top = this->mInterfaceIDs.Size (); + size_t top = this->mInterfaceIDs.Size (); if ( top < INTERFACE_MASK_BITS ) { this->mInterfaceIDs.Grow ( top + 1 ); this->mInterfaceIDs [ top ] = typeID; @@ -484,8 +484,8 @@ void MOAIPartition::AffirmPriority ( MOAIProp& prop ) { //----------------------------------------------------------------// void MOAIPartition::Clear () { - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { this->mLevels [ i ].Clear (); } this->mBiggies.Clear (); @@ -494,78 +494,78 @@ void MOAIPartition::Clear () { } //----------------------------------------------------------------// -u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, u32 interfaceMask, u32 queryMask ) { +u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, u32 interfaceMask, u32 queryMask ) { results.Reset (); - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { - this->mLevels [ i ].GatherProps ( results, ignore, interfaceMask, queryMask ); + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { + this->mLevels [ i ].GatherProps ( results, ignoreProp, interfaceMask, queryMask ); } - this->mBiggies.GatherProps ( results, ignore, interfaceMask, queryMask ); - this->mGlobals.GatherProps ( results, ignore, interfaceMask, queryMask ); - this->mEmpties.GatherProps ( results, ignore, interfaceMask, queryMask ); + this->mBiggies.GatherProps ( results, ignoreProp, interfaceMask, queryMask ); + this->mGlobals.GatherProps ( results, ignoreProp, interfaceMask, queryMask ); + this->mEmpties.GatherProps ( results, ignoreProp, interfaceMask, queryMask ); return results.Sort ( MOAIPartitionResultBuffer::SORT_NONE ); } //----------------------------------------------------------------// -u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ) { +u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ) { results.Reset (); - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { - this->mLevels [ i ].GatherProps ( results, ignore, point, orientation, interfaceMask, queryMask ); + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { + this->mLevels [ i ].GatherProps ( results, ignoreProp, point, orientation, interfaceMask, queryMask ); } - this->mBiggies.GatherProps ( results, ignore, point, orientation, interfaceMask, queryMask ); - this->mGlobals.GatherProps ( results, ignore, point, orientation, interfaceMask, queryMask ); + this->mBiggies.GatherProps ( results, ignoreProp, point, orientation, interfaceMask, queryMask ); + this->mGlobals.GatherProps ( results, ignoreProp, point, orientation, interfaceMask, queryMask ); return results.Sort ( MOAIPartitionResultBuffer::SORT_NONE ); } //----------------------------------------------------------------// -u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, u32 interfaceMask, u32 queryMask ) { +u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, u32 interfaceMask, u32 queryMask ) { results.Reset (); - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { - this->mLevels [ i ].GatherProps ( results, ignore, point, this->mPlaneID, interfaceMask, queryMask ); + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { + this->mLevels [ i ].GatherProps ( results, ignoreProp, point, this->mPlaneID, interfaceMask, queryMask ); } - this->mBiggies.GatherProps ( results, ignore, point, interfaceMask, queryMask ); - this->mGlobals.GatherProps ( results, ignore, interfaceMask, queryMask ); + this->mBiggies.GatherProps ( results, ignoreProp, point, interfaceMask, queryMask ); + this->mGlobals.GatherProps ( results, ignoreProp, interfaceMask, queryMask ); return results.Sort ( MOAIPartitionResultBuffer::SORT_NONE ); } //----------------------------------------------------------------// -u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, ZLBox box, u32 interfaceMask, u32 queryMask ) { +u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, ZLBox box, u32 interfaceMask, u32 queryMask ) { results.Reset (); box.Bless (); - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { - this->mLevels [ i ].GatherProps ( results, ignore, box, this->mPlaneID, interfaceMask, queryMask ); + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { + this->mLevels [ i ].GatherProps ( results, ignoreProp, box, this->mPlaneID, interfaceMask, queryMask ); } - this->mBiggies.GatherProps ( results, ignore, box, interfaceMask, queryMask ); - this->mGlobals.GatherProps ( results, ignore, interfaceMask, queryMask ); + this->mBiggies.GatherProps ( results, ignoreProp, box, interfaceMask, queryMask ); + this->mGlobals.GatherProps ( results, ignoreProp, interfaceMask, queryMask ); return results.Sort ( MOAIPartitionResultBuffer::SORT_NONE ); } //----------------------------------------------------------------// -u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLFrustum& frustum, u32 interfaceMask, u32 queryMask ) { +u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLFrustum& frustum, u32 interfaceMask, u32 queryMask ) { results.Reset (); - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { - this->mLevels [ i ].GatherProps ( results, ignore, frustum, this->mPlaneID, interfaceMask, queryMask ); + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { + this->mLevels [ i ].GatherProps ( results, ignoreProp, frustum, this->mPlaneID, interfaceMask, queryMask ); } - this->mBiggies.GatherProps ( results, ignore, frustum, interfaceMask, queryMask ); - this->mGlobals.GatherProps ( results, ignore, interfaceMask, queryMask ); + this->mBiggies.GatherProps ( results, ignoreProp, frustum, interfaceMask, queryMask ); + this->mGlobals.GatherProps ( results, ignoreProp, interfaceMask, queryMask ); return results.Sort ( MOAIPartitionResultBuffer::SORT_NONE ); } @@ -573,8 +573,8 @@ u32 MOAIPartition::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* i //----------------------------------------------------------------// u32 MOAIPartition::GetInterfaceMask ( u32 typeID ) const { - u32 total = this->mInterfaceIDs.Size (); - for ( u32 i = 0; i < total; ++i ) { + size_t total = this->mInterfaceIDs.Size (); + for ( size_t i = 0; i < total; ++i ) { if ( this->mInterfaceIDs [ i ] == typeID ) { return 1 << i; } @@ -656,8 +656,8 @@ void MOAIPartition::OnPropUpdated ( MOAIProp& prop ) { // This moves all props to the 'empties' cell void MOAIPartition::PrepareRebuild () { - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { this->mLevels [ i ].ExtractProps ( this->mEmpties, 0 ); } this->mBiggies.ExtractProps ( this->mEmpties, 0 ); @@ -763,8 +763,8 @@ void MOAIPartition::UpdateProp ( MOAIProp& prop, u32 status ) { MOAIPartitionLevel* level = 0; - u32 totalLevels = this->mLevels.Size (); - for ( u32 i = 0; i < totalLevels; ++i ) { + size_t totalLevels = this->mLevels.Size (); + for ( size_t i = 0; i < totalLevels; ++i ) { MOAIPartitionLevel* testLevel = &this->mLevels [ i ]; diff --git a/src/moai-sim/MOAIPartition.h b/src/moai-sim/MOAIPartition.h index f5083c9630..5567c0fa13 100644 --- a/src/moai-sim/MOAIPartition.h +++ b/src/moai-sim/MOAIPartition.h @@ -73,11 +73,11 @@ class MOAIPartition : //----------------------------------------------------------------// void Clear (); - u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); - u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); - u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); - u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, ZLBox box, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); - u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLFrustum& frustum, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); + u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); + u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); + u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); + u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, ZLBox box, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); + u32 GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLFrustum& frustum, u32 interfaceMask = MASK_ANY, u32 mask = MASK_ANY ); void InsertProp ( MOAIProp& prop ); bool IsEmpty ( MOAIProp& prop ); bool IsGlobal ( MOAIProp& prop ); diff --git a/src/moai-sim/MOAIPartitionCell.cpp b/src/moai-sim/MOAIPartitionCell.cpp index 70f7adae53..7648358bf7 100644 --- a/src/moai-sim/MOAIPartitionCell.cpp +++ b/src/moai-sim/MOAIPartitionCell.cpp @@ -40,13 +40,13 @@ void MOAIPartitionCell::ExtractProps ( MOAIPartitionCell& cell, MOAIPartitionLev } //----------------------------------------------------------------// -void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ) { PropIt propIt = this->mProps.Head (); for ( ; propIt; propIt = propIt->Next ()) { MOAIProp* prop = propIt->Data (); float t; - if (( prop != ignore ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { + if (( prop != ignoreProp ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { if ( !ZLSect::RayToBox( prop->mWorldBounds, point, orientation, t )) { prop->AddToSortBuffer ( results, ZLFloat::FloatToIntKey ( t )); } @@ -55,26 +55,26 @@ void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const } //----------------------------------------------------------------// -void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, u32 interfaceMask, u32 queryMask ) { PropIt propIt = this->mProps.Head (); for ( ; propIt; propIt = propIt->Next ()) { MOAIProp* prop = propIt->Data (); - if (( prop != ignore ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { + if (( prop != ignoreProp ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { prop->AddToSortBuffer ( results ); } } } //----------------------------------------------------------------// -void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLVec3D& point, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLVec3D& point, u32 interfaceMask, u32 queryMask ) { PropIt propIt = this->mProps.Head (); for ( ; propIt; propIt = propIt->Next ()) { MOAIProp* prop = propIt->Data (); - if (( prop != ignore ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { + if (( prop != ignoreProp ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { if ( prop->mWorldBounds.Contains ( point )) { if ( prop->Inside ( point, 0.0f )) { prop->AddToSortBuffer ( results ); @@ -85,13 +85,13 @@ void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const } //----------------------------------------------------------------// -void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLBox& box, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLBox& box, u32 interfaceMask, u32 queryMask ) { PropIt propIt = this->mProps.Head (); for ( ; propIt; propIt = propIt->Next ()) { MOAIProp* prop = propIt->Data (); - if (( prop != ignore ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { + if (( prop != ignoreProp ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { if ( prop->mWorldBounds.Overlap ( box )) { prop->AddToSortBuffer ( results ); } @@ -100,13 +100,13 @@ void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const } //----------------------------------------------------------------// -void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLFrustum& frustum, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionCell::GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLFrustum& frustum, u32 interfaceMask, u32 queryMask ) { PropIt propIt = this->mProps.Head (); for ( ; propIt; propIt = propIt->Next ()) { MOAIProp* prop = propIt->Data (); - if (( prop != ignore ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { + if (( prop != ignoreProp ) && ( prop->mInterfaceMask & interfaceMask ) && ( prop->mQueryMask & queryMask )) { if ( !frustum.Cull ( prop->mWorldBounds )) { prop->AddToSortBuffer ( results ); } diff --git a/src/moai-sim/MOAIPartitionCell.h b/src/moai-sim/MOAIPartitionCell.h index ac174d075d..9acd1e8c1f 100644 --- a/src/moai-sim/MOAIPartitionCell.h +++ b/src/moai-sim/MOAIPartitionCell.h @@ -25,11 +25,11 @@ class MOAIPartitionCell { //----------------------------------------------------------------// void Clear (); void ExtractProps ( MOAIPartitionCell& cell, MOAIPartitionLevel* level ); - void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLVec3D& point, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLBox& box, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignore, const ZLFrustum& frustum, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLVec3D& point, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLBox& box, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, const MOAIProp* ignoreProp, const ZLFrustum& frustum, u32 interfaceMask, u32 queryMask ); void InsertProp ( MOAIProp& prop ); void RemoveProp ( MOAIProp& prop ); void ScheduleProps (); // schedule all props in cell for update diff --git a/src/moai-sim/MOAIPartitionLevel.cpp b/src/moai-sim/MOAIPartitionLevel.cpp index ed25c8471a..ec95c0c00b 100644 --- a/src/moai-sim/MOAIPartitionLevel.cpp +++ b/src/moai-sim/MOAIPartitionLevel.cpp @@ -13,8 +13,8 @@ //----------------------------------------------------------------// void MOAIPartitionLevel::Clear () { - u32 totalCells = this->mCells.Size (); - for ( u32 i = 0; i < totalCells; ++i ) { + size_t totalCells = this->mCells.Size (); + for ( size_t i = 0; i < totalCells; ++i ) { this->mCells [ i ].Clear (); } } @@ -22,32 +22,32 @@ void MOAIPartitionLevel::Clear () { //----------------------------------------------------------------// void MOAIPartitionLevel::ExtractProps ( MOAIPartitionCell& cell, MOAIPartitionLevel* level ) { - u32 totalCells = this->mCells.Size (); - for ( u32 i = 0; i < totalCells; ++i ) { + size_t totalCells = this->mCells.Size (); + for ( size_t i = 0; i < totalCells; ++i ) { this->mCells [ i ].ExtractProps ( cell, level ); } } //----------------------------------------------------------------// -void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, u32 interfaceMask, u32 queryMask ) { - u32 totalCells = this->mCells.Size (); - for ( u32 i = 0; i < totalCells; ++i ) { - this->mCells [ i ].GatherProps ( results, ignore, interfaceMask, queryMask ); + size_t totalCells = this->mCells.Size (); + for ( size_t i = 0; i < totalCells; ++i ) { + this->mCells [ i ].GatherProps ( results, ignoreProp, interfaceMask, queryMask ); } } //----------------------------------------------------------------// -void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ) { - u32 totalCells = this->mCells.Size (); - for ( u32 i = 0; i < totalCells; ++i ) { - this->mCells [ i ].GatherProps ( results, ignore, point, orientation, interfaceMask, queryMask ); + size_t totalCells = this->mCells.Size (); + for ( size_t i = 0; i < totalCells; ++i ) { + this->mCells [ i ].GatherProps ( results, ignoreProp, point, orientation, interfaceMask, queryMask ); } } //----------------------------------------------------------------// -void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, u32 planeID, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, u32 planeID, u32 interfaceMask, u32 queryMask ) { ZLVec2D cellPoint ( 0.0f, 0.0f ); @@ -80,13 +80,13 @@ void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIP MOAICellCoord offset = this->mGridSpace.WrapCellCoord ( coord.mX + x, coord.mY - y ); int addr = this->mGridSpace.GetCellAddr ( offset ); - this->mCells [ addr ].GatherProps ( results, ignore, point, interfaceMask, queryMask ); + this->mCells [ addr ].GatherProps ( results, ignoreProp, point, interfaceMask, queryMask ); } } } //----------------------------------------------------------------// -void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLBox& box, u32 planeID, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLBox& box, u32 planeID, u32 interfaceMask, u32 queryMask ) { float halfSize = this->mCellSize * 0.5f; @@ -108,13 +108,13 @@ void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIP MOAICellCoord offset = this->mGridSpace.WrapCellCoord ( coord0.mX + x, coord0.mY + y ); u32 addr = this->mGridSpace.GetCellAddr ( offset ); - this->mCells [ addr ].GatherProps ( results, ignore, box, interfaceMask, queryMask ); + this->mCells [ addr ].GatherProps ( results, ignoreProp, box, interfaceMask, queryMask ); } } } //----------------------------------------------------------------// -void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLFrustum& frustum, u32 planeID, u32 interfaceMask, u32 queryMask ) { +void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLFrustum& frustum, u32 planeID, u32 interfaceMask, u32 queryMask ) { float halfSize = this->mCellSize * 0.5f; @@ -136,7 +136,7 @@ void MOAIPartitionLevel::GatherProps ( MOAIPartitionResultBuffer& results, MOAIP MOAICellCoord offset = this->mGridSpace.WrapCellCoord ( coord0.mX + x, coord0.mY + y ); u32 addr = this->mGridSpace.GetCellAddr ( offset ); - this->mCells [ addr ].GatherProps ( results, ignore, frustum, interfaceMask, queryMask ); + this->mCells [ addr ].GatherProps ( results, ignoreProp, frustum, interfaceMask, queryMask ); } } } diff --git a/src/moai-sim/MOAIPartitionLevel.h b/src/moai-sim/MOAIPartitionLevel.h index 3ab495d727..c9db9e8361 100644 --- a/src/moai-sim/MOAIPartitionLevel.h +++ b/src/moai-sim/MOAIPartitionLevel.h @@ -20,11 +20,11 @@ class MOAIPartitionLevel { //----------------------------------------------------------------// void Clear (); void ExtractProps ( MOAIPartitionCell& cell, MOAIPartitionLevel* level ); - void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLVec3D& point, u32 planeID, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLBox& box, u32 planeID, u32 interfaceMask, u32 queryMask ); - void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignore, const ZLFrustum& frustum, u32 planeID, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, const ZLVec3D& orientation, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLVec3D& point, u32 planeID, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLBox& box, u32 planeID, u32 interfaceMask, u32 queryMask ); + void GatherProps ( MOAIPartitionResultBuffer& results, MOAIProp* ignoreProp, const ZLFrustum& frustum, u32 planeID, u32 interfaceMask, u32 queryMask ); MOAIPartitionCell* GetCell ( MOAIProp& prop ); void Init ( float cellSize, u32 width, u32 height ); void PlaceProp ( MOAIProp& prop ); diff --git a/src/moai-sim/MOAIPath.cpp b/src/moai-sim/MOAIPath.cpp new file mode 100644 index 0000000000..31b5b37259 --- /dev/null +++ b/src/moai-sim/MOAIPath.cpp @@ -0,0 +1,199 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include + +#define DEFAULT_FLATNESS 0.125f +#define DEFAULT_ANGLE 15.0f + +//================================================================// +// local +//================================================================// + +//----------------------------------------------------------------// +// TODO: path +int MOAIPath::_bless ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPath, "U" ); + + self->Bless (); + return 0; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPath::_evaluate ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPath, "U" ); + + float t = state.GetValue < float >( 2, 0.0f ); + + ZLVec2D result = self->Evaluate ( t ); + + state.Push ( result.mX ); + state.Push ( result.mY ); + + return 2; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPath::_getLength ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPath, "U" ); + + state.Push ( self->GetLength ()); + return 1; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPath::_reserve ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPath, "U" ); + + size_t size = state.GetValue < u32 >( 2, 0 ); + self->Reserve ( size ); + return 0; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPath::_setPoint ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPath, "U" ); + + size_t idx = state.GetValue < u32 >( 2, 1 ) - 1; + float x = state.GetValue < float >( 3, 0.0f ); + float y = state.GetValue < float >( 4, 0.0f ); + + self->SetPoint ( idx, x, y ); + + return 0; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPath::_setThresholds ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPath, "U" ); + + float flatness = state.GetValue < float >( 2, DEFAULT_FLATNESS ); + float angle = state.GetValue < float >( 3, DEFAULT_ANGLE ); + + self->SetFlatness ( flatness ); + self->SetAngle ( angle ); + + return 0; +} + +//================================================================// +// MOAIPath +//================================================================// + +//----------------------------------------------------------------// +void MOAIPath::Bless () { + + size_t totalSegments = this->CountSegments (); + + this->mSegmentLengths.Init ( totalSegments ); + + this->mLength = 0.0f; + + for ( size_t i = 0; i < totalSegments; ++i ) { + + ZLCubicBezier2D curve = this->GetSegment ( i ); + + float length = curve.GetFlattenedLength ( this->mFlatness, this->mAngle ); + this->mSegmentLengths [ i ] = length; + this->mLength += length; + } +} + +//----------------------------------------------------------------// +size_t MOAIPath::CountSegments () { + + return ( this->mControlPoints.Size () - 1 ) / 3; +} + +//----------------------------------------------------------------// +ZLVec2D MOAIPath::Evaluate ( float t ) { + + ZLCubicBezier2D curve = this->GetSegmentForTime ( t, &t ); + return curve.Evaluate ( ZLFloat::Clamp ( t, 0.0f, 1.0f )); +} + +//----------------------------------------------------------------// +ZLCubicBezier2D MOAIPath::GetSegment ( size_t idx ) { + + size_t basePoint = idx > 0 ? idx * 3 : 0; + + ZLCubicBezier2D curve; + + curve.Init ( + this->mControlPoints [ basePoint ], + this->mControlPoints [ basePoint + 1 ], + this->mControlPoints [ basePoint + 2 ], + this->mControlPoints [ basePoint + 3 ] + ); + + return curve; +} + +//----------------------------------------------------------------// +ZLCubicBezier2D MOAIPath::GetSegmentForTime ( float t, float* st ) { + + size_t totalSegments = this->CountSegments (); + + t = ZLFloat::Clamp ( t, 0.0f, 1.0f ) * ( float )totalSegments; + + float s = ZLFloat::Floor ( t ); + + if ( st ) { + ( *st ) = t - s; + } + + return this->GetSegment (( size_t )s ); +} + +//----------------------------------------------------------------// +MOAIPath::MOAIPath () : + mFlatness ( DEFAULT_FLATNESS ), + mAngle ( DEFAULT_ANGLE ), + mLength ( 0.0f ) { + + RTTI_SINGLE ( MOAILuaObject ) +} + +//----------------------------------------------------------------// +MOAIPath::~MOAIPath () { +} + +//----------------------------------------------------------------// +void MOAIPath::RegisterLuaClass ( MOAILuaState& state ) { + UNUSED ( state ); +} + +//----------------------------------------------------------------// +void MOAIPath::RegisterLuaFuncs ( MOAILuaState& state ) { + + luaL_Reg regTable [] = { + { "bless", _bless }, + { "evaluate", _evaluate }, + { "getLength", _getLength }, + { "reserve", _reserve }, + { "setPoint", _setPoint }, + { "setThresholds", _setThresholds }, + { NULL, NULL } + }; + + luaL_register ( state, 0, regTable ); +} + +//----------------------------------------------------------------// +void MOAIPath::Reserve ( size_t size ) { + + this->mControlPoints.Init ( size ); +} + +//----------------------------------------------------------------// +void MOAIPath::SetPoint ( size_t idx, float x, float y ) { + + this->mControlPoints [ idx ].Init ( x, y ); +} diff --git a/src/moai-sim/MOAIPath.h b/src/moai-sim/MOAIPath.h new file mode 100644 index 0000000000..f28927c9f4 --- /dev/null +++ b/src/moai-sim/MOAIPath.h @@ -0,0 +1,56 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIPATH_H +#define MOAIPATH_H + +//================================================================// +// MOAIPath +//================================================================// +// TODO: doxygen +class MOAIPath : + public virtual MOAILuaObject { +private: + + ZLLeanArray < ZLVec2D > mControlPoints; + ZLLeanArray < float > mSegmentLengths; + + float mFlatness; + float mAngle; + + float mLength; + + //----------------------------------------------------------------// + static int _bless ( lua_State* L ); + static int _evaluate ( lua_State* L ); + static int _getLength ( lua_State* L ); + static int _reserve ( lua_State* L ); + static int _setPoint ( lua_State* L ); + static int _setThresholds ( lua_State* L ); + + //----------------------------------------------------------------// + +public: + + DECL_LUA_FACTORY ( MOAIPath ) + + GET_SET ( float, Flatness, mFlatness ) + GET_SET ( float, Angle, mAngle ) + + GET ( float, Length, mLength ) + + //----------------------------------------------------------------// + void Bless (); + size_t CountSegments (); + ZLVec2D Evaluate ( float t ); + ZLCubicBezier2D GetSegment ( size_t idx ); + ZLCubicBezier2D GetSegmentForTime ( float t, float* st = 0 ); + MOAIPath (); + ~MOAIPath (); + void RegisterLuaClass ( MOAILuaState& state ); + void RegisterLuaFuncs ( MOAILuaState& state ); + void Reserve ( size_t size ); + void SetPoint ( size_t idx, float x, float y ); +}; + +#endif diff --git a/src/moai-sim/MOAIPathFinder.cpp b/src/moai-sim/MOAIPathFinder.cpp index 2e636bb7a2..e68cb8c52f 100644 --- a/src/moai-sim/MOAIPathFinder.cpp +++ b/src/moai-sim/MOAIPathFinder.cpp @@ -341,7 +341,7 @@ float MOAIPathFinder::ComputeTerrainCost ( float moveCost, u32 terrain0, u32 ter if ( terrain0 & MOAITileFlags::HIDDEN ) return 0.0f; if ( terrain1 & MOAITileFlags::HIDDEN ) return 0.0f; - u32 total = MIN ( this->mTerrainDeck->GetVectorSize (), this->mWeights.Size ()); + u32 total = MIN ( this->mTerrainDeck->GetVectorSize (), ( u32 )this->mWeights.Size ()); float* v0 = this->mTerrainDeck->GetVector ( terrain0 & MOAITileFlags::CODE_MASK ); float* v1 = this->mTerrainDeck->GetVector ( terrain1 & MOAITileFlags::CODE_MASK ); diff --git a/src/moai-sim/MOAIPathStepper.cpp b/src/moai-sim/MOAIPathStepper.cpp new file mode 100644 index 0000000000..5d8a6efd25 --- /dev/null +++ b/src/moai-sim/MOAIPathStepper.cpp @@ -0,0 +1,190 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include + +//================================================================// +// local +//================================================================// + +//----------------------------------------------------------------// +// TODO: path +int MOAIPathStepper::_getLength ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPathStepper, "U" ); + + state.Push ( self->GetLength ()); + return 1; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPathStepper::_more ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPathStepper, "U" ); + + state.Push ( self->More ()); + return 1; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPathStepper::_next ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPathStepper, "U" ); + + state.Push ( self->Next ()); + return 2; +} + +//----------------------------------------------------------------// +// TODO: path +int MOAIPathStepper::_start ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIPathStepper, "U" ); + + MOAIPath* path = state.GetLuaObject < MOAIPath >( 2, true ); + float stepSize = state.GetValue < float >( 3, 1.0f ); + + self->Start ( *path, stepSize ); + + return 0; +} + +//================================================================// +// MOAIPathStepper +//================================================================// + +//----------------------------------------------------------------// +MOAIPathStepper::MOAIPathStepper () : + mStepCount ( 0 ), + mTotalSteps ( 0 ), + mStepSize ( 0.0f ), + mEdgeBase ( 0.0f ), + mEdgeLength ( 0.0f ), + mSegmentIdx ( 0 ), + mTotalSegments ( 0 ), + mLength ( 0.0f ) { + + RTTI_SINGLE ( MOAILuaObject ) +} + +//----------------------------------------------------------------// +MOAIPathStepper::~MOAIPathStepper () { + + this->mPath.Set ( *this, 0 ); +} + +//----------------------------------------------------------------// +bool MOAIPathStepper::More () { + + return this->mStepCount <= this->mTotalSteps; +} + +//----------------------------------------------------------------// +bool MOAIPathStepper::MoreVertices () { + + return this->mFlattener.More (); +} + +//----------------------------------------------------------------// +ZLVec2D MOAIPathStepper::Next () { + + static int count = 0; + + float elapsedLength = ( float )this->mStepCount * this->mStepSize; + + while ((( this->mEdgeBase + this->mEdgeLength ) < elapsedLength ) && this->MoreVertices ()) { + + this->mEdge [ 0 ] = this->mEdge [ 1 ]; + this->mEdge [ 1 ] = this->mEdge [ 2 ]; + this->mEdge [ 2 ] = this->NextVertex (); + + this->mEdgeBase += this->mEdgeLength; + this->mEdgeLength = this->mEdge [ 0 ].Dist ( this->mEdge [ 1 ]); + + if ((( this->mEdgeBase + this->mEdgeLength ) < elapsedLength ) && !this->MoreVertices ()) { + + this->mEdge [ 0 ] = this->mEdge [ 1 ]; + this->mEdge [ 1 ] = this->mEdge [ 2 ]; + + this->mEdgeBase += this->mEdgeLength; + this->mEdgeLength = this->mEdge [ 0 ].Dist ( this->mEdge [ 1 ]); + } + } + + float t = ZLFloat::Clamp (( elapsedLength - this->mEdgeBase ) / this->mEdgeLength, 0.0f, 1.0f ); + + ZLVec2D vec = this->mEdge [ 0 ]; + vec.Lerp ( this->mEdge [ 1 ], t ); + + this->mStepCount++; + + return vec; +} + +//----------------------------------------------------------------// +ZLVec2D MOAIPathStepper::NextVertex () { + + ZLVec2D vec = this->mFlattener.Next (); + + if ( !this->mFlattener.More ()) { + + this->mSegmentIdx++; + + if ( this->mSegmentIdx < this->mTotalSegments ) { + + this->mFlattener.Init ( this->mPath->GetSegment ( this->mSegmentIdx )); + + if ( this->mFlattener.More ()) { + this->mFlattener.Next (); // skip the first vertex + } + } + } + return vec; +} + +//----------------------------------------------------------------// +void MOAIPathStepper::RegisterLuaClass ( MOAILuaState& state ) { + UNUSED ( state ); +} + +//----------------------------------------------------------------// +void MOAIPathStepper::RegisterLuaFuncs ( MOAILuaState& state ) { + + luaL_Reg regTable [] = { + { "getLength", _getLength }, + { "more", _more }, + { "next", _next }, + { "start", _start }, + { NULL, NULL } + }; + + luaL_register ( state, 0, regTable ); +} + +//----------------------------------------------------------------// +void MOAIPathStepper::Start ( MOAIPath& path, float stepSize ) { + + this->mPath.Set ( *this, &path ); + + this->mTotalSegments = path.CountSegments (); + this->mLength = path.GetLength (); + + this->mSegmentIdx = 0; + this->mFlattener.Init ( this->mPath->GetSegment ( 0 )); + + this->mStepCount = 0; + this->mTotalSteps = ( u32 )( this->mLength / stepSize ); + this->mStepSize = stepSize; + + this->mEdgeBase = 0.0f; + this->mEdgeLength = 0.0f; + + if ( this->MoreVertices ()) { + + this->mEdge [ 0 ] = this->NextVertex (); + this->mEdge [ 1 ] = this->NextVertex (); + this->mEdge [ 2 ] = this->NextVertex (); + + this->mEdgeLength = this->mEdge [ 0 ].Dist ( this->mEdge [ 1 ]); + } +} diff --git a/src/moai-sim/MOAIPathStepper.h b/src/moai-sim/MOAIPathStepper.h new file mode 100644 index 0000000000..61368e9f14 --- /dev/null +++ b/src/moai-sim/MOAIPathStepper.h @@ -0,0 +1,63 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIPATHSTEPPER_H +#define MOAIPATHSTEPPER_H + +#include + +class MOAIPath; + +//================================================================// +// MOAIPathStepper +//================================================================// +// TODO: doxygen +class MOAIPathStepper : + public virtual MOAILuaObject { +private: + + u32 mStepCount; + u32 mTotalSteps; + + float mStepSize; + + float mEdgeBase; + float mEdgeLength; + + ZLVec2D mEdge [ 3 ]; + ZLVec2D mNormal; + + MOAILuaSharedPtr < MOAIPath> mPath; + + ZLCubicBezierFlattener2D mFlattener; + size_t mSegmentIdx; + size_t mTotalSegments; + float mLength; + + //----------------------------------------------------------------// + static int _getLength ( lua_State* L ); + static int _more ( lua_State* L ); + static int _next ( lua_State* L ); + static int _start ( lua_State* L ); + + //----------------------------------------------------------------// + bool MoreVertices (); + ZLVec2D NextVertex (); + +public: + + DECL_LUA_FACTORY ( MOAIPathStepper ) + + GET ( float, Length, mLength ) + + //----------------------------------------------------------------// + MOAIPathStepper (); + ~MOAIPathStepper (); + bool More (); + ZLVec2D Next (); + void RegisterLuaClass ( MOAILuaState& state ); + void RegisterLuaFuncs ( MOAILuaState& state ); + void Start ( MOAIPath& path, float stepSize ); +}; + +#endif diff --git a/src/moai-sim/MOAIProfilerReportBase.cpp b/src/moai-sim/MOAIProfilerReportBase.cpp index 80cc69f1f8..f811586d13 100644 --- a/src/moai-sim/MOAIProfilerReportBase.cpp +++ b/src/moai-sim/MOAIProfilerReportBase.cpp @@ -117,7 +117,8 @@ void MOAIProfilerReportBase::EnterScope ( const ZLHashedString& name ) { //----------------------------------------------------------------// void MOAIProfilerReportBase::LeaveScope ( const ZLHashedString& name, const u64 startTimeMicroSec, const u32 durationMicroSec ) { - + UNUSED ( name ); // TODO: find out why zl assert undef isn't handling this + // Sanity check assert ( mCurrentEntry->mName == name ); diff --git a/src/moai-sim/MOAIProfilerReportBox.cpp b/src/moai-sim/MOAIProfilerReportBox.cpp index ef7fc263d2..022163883b 100644 --- a/src/moai-sim/MOAIProfilerReportBox.cpp +++ b/src/moai-sim/MOAIProfilerReportBox.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include @@ -344,260 +344,260 @@ void MOAIProfilerReportBox::Draw ( int subPrimID, float lod ) { UNUSED ( subPrimID ); UNUSED ( lod ); - if ( !mFont ) return; - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - // Get memory stats - u32 availableMainMem, usedMainMem; - _GetMemoryStats ( availableMainMem, usedMainMem ); - float relativeMemUsed = availableMainMem > 0 ? (float) usedMainMem / (float) availableMainMem : 0; - - float simRate = ( float )MOAISim::Get ().GetSimDuration () * 1000.0f; - float renderRate = ( float )MOAIRenderMgr::Get ().GetRenderDuration () * 1000.0f; - size_t luaMem = MOAILuaRuntime::Get ().GetMemoryUsage (); - size_t texMem = gfxDevice.GetTextureMemoryUsage (); - - // used for drawing the memory bar - float memBarWidth = mMemoryXRange.mY - mMemoryXRange.mX; - float memUsedWidth = memBarWidth * relativeMemUsed; - - const float cellOffsetX = 2; - - // Get current state - const ZLMatrix4x4& orgUvMatrix = gfxDevice.GetUVTransform (); - const ZLMatrix4x4& orgWorldTransform = gfxDevice.GetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); - const ZLMatrix4x4& orgViewTransform = gfxDevice.GetVertexTransform ( MOAIGfxDevice::VTX_VIEW_TRANSFORM ); - const ZLMatrix4x4& orgProjTransform = gfxDevice.GetVertexTransform ( MOAIGfxDevice::VTX_PROJ_TRANSFORM ); - - MOAIBlendMode origBlendMode = gfxDevice.GetBlendMode (); - - // Set state - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_WORLD, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_VIEW_TRANSFORM ); - - float rotation = 0; - if ( mOrientation == 1 ) { - - rotation = 1.57f; - } - else if ( mOrientation == 2 ) { - - rotation = -1.57f; - } - - // Calculate projection matrix - ZLMatrix4x4 proj; - - u32 windowWidth = gfxDevice.GetWidth (); - u32 windowheight = gfxDevice.GetHeight (); - - proj.Ortho ( 2.0f / (float)windowWidth, -2.0f / (float)windowheight, 0, 1 ); - - ZLMatrix4x4 offset; - offset.Translate ( -1, 1, 0 ); - proj.Append ( offset ); - - if ( rotation != 0 ) { - - ZLMatrix4x4 rot; - rot.RotateZ ( rotation ); - proj.Multiply ( orgProjTransform, rot ); - } - - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_PROJ_TRANSFORM, proj ); - - MOAIDraw::Bind (); - - // Get some font metrics - mFontSize = mFontSize > 0 ? mFontSize : mFont->GetDefaultSize (); - MOAIGlyphSet* glyphSet = mFont->GetGlyphSet ( mFontSize ); - float fontHeight = glyphSet->GetHeight (); - mLineHeight = fontHeight + 4; - mLineOffset = fontHeight + 10; - - // Calculate vertical layout - mSummaryYRange.Init ( this->mFrame.mYMin + 2, this->mFrame.mYMin + 2 + this->mLineHeight ); - mHeaderYRange.Init ( this->mSummaryYRange.mX + mLineOffset, this->mSummaryYRange.mY + 2 + this->mLineHeight ); - mBodyYRange.Init ( this->mHeaderYRange.mX + mLineOffset, this->mFrame.mYMax ); - - // Calculate horizonatal layout - float frameWidth = this->mFrame.mXMax - this->mFrame.mXMin; - mOverviewXRange.Init ( this->mFrame.mXMin + cellOffsetX, this->mFrame.mXMin + cellOffsetX + frameWidth * 0.3f ); - mMemoryXRange.Init ( this->mOverviewXRange.mY + cellOffsetX, this->mFrame.mXMax - cellOffsetX * 2 ); - - mColumns [ COLUMN_NAME ].mX = this->mFrame.mXMin + cellOffsetX; - mColumns [ COLUMN_NAME ].mWidth = 50; - mColumns [ COLUMN_HITS ].mWidth = 4; - mColumns [ COLUMN_PERCENTAGE ].mWidth = 10; - mColumns [ COLUMN_DURATION ].mWidth = 5; - mColumns [ COLUMN_AVGDURATION ].mWidth = 5; - mColumns [ COLUMN_MINDURATION ].mWidth = 5; - mColumns [ COLUMN_MAXDURATION ].mWidth = 5; - - float widthNorm = 0; - for ( u32 i = 0; i < COLUMN_COUNT; i++ ) { - - widthNorm += mColumns [ i ].mWidth; - } - - frameWidth = this->mFrame.mXMax - 4 - mColumns [ COLUMN_NAME ].mX - cellOffsetX * COLUMN_COUNT; - - widthNorm = 1.0f / widthNorm; - for ( u32 i = 0; i < COLUMN_COUNT; i++ ) { - - mColumns [ i ].mWidth = ceil ( mColumns [ i ].mWidth * widthNorm * frameWidth ); - } - for ( u32 i = 1; i < COLUMN_COUNT; i++ ) { - - mColumns [ i ].mX = mColumns [ i - 1 ].mX + mColumns [ i - 1 ].mWidth + cellOffsetX; - } - - // Prepare immediate mode drawing - MOAIDraw::Bind (); - - gfxDevice.SetUVTransform (); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); - - gfxDevice.SetBlendMode ( ZGL_BLEND_FACTOR_SRC_ALPHA, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); - - // Draw the table background - gfxDevice.SetPenColor ( mBackgroundColor ); - MOAIDraw::DrawRectFill ( this->mFrame.mXMin, this->mFrame.mYMin, this->mFrame.mXMax, this->mFrame.mYMax, false ); - - // Draw the summary row - gfxDevice.SetPenColor ( mRowColor ); - - MOAIDraw::DrawRectFill ( mOverviewXRange.mX, mSummaryYRange.mX, mOverviewXRange.mY, mSummaryYRange.mY, false ); - - // ToDo: Cache the colors - ZLColorVec memColorLow, memColorMed, memColorHigh, memColorCur; - memColorLow.Set ( 0.25f, 0.8f, 0.25f, 0.5f ); - memColorMed.Set ( 0.7f, 0.7f, 0.25f, 0.5f ); - memColorHigh.Set ( 0.8f, 0.25f, 0.25f, 0.5f ); - - if ( relativeMemUsed < 0.5f ) { - memColorCur = memColorLow; - } - else { - if ( relativeMemUsed < 0.75f ) { - memColorCur.Lerp ( ZLInterpolate::kLinear, memColorLow, memColorMed, (relativeMemUsed - 0.5f) / 0.25f ); - } - else { - memColorCur.Lerp ( ZLInterpolate::kLinear, memColorMed, memColorHigh, (relativeMemUsed - 0.75f) / 0.25f ); - } - } - - gfxDevice.SetPenColor ( memColorCur ); - MOAIDraw::DrawRectFill ( mMemoryXRange.mX, mSummaryYRange.mX, mMemoryXRange.mX + memUsedWidth, mSummaryYRange.mY, false ); - - gfxDevice.SetPenColor ( mRowColor ); - MOAIDraw::DrawRectFill (mMemoryXRange.mX + memUsedWidth, mSummaryYRange.mX, mMemoryXRange.mY, mSummaryYRange.mY, false ); - - // Draw the rows - gfxDevice.SetPenColor ( mRowColor ); - - mCursorY = mHeaderYRange.mX; - for ( u32 i = 0; i < COLUMN_COUNT; i++ ) { - - MOAIDraw::DrawRectFill ( mColumns [ i ].mX, mCursorY, mColumns [ i ].mX + mColumns [ i ].mWidth, mCursorY + mLineHeight, false ); - } - - mCursorY += mLineOffset; - while ( mCursorY < this->mFrame.mYMax ) { - - MOAIDraw::DrawRectFill ( this->mFrame.mXMin + 2, mCursorY, this->mFrame.mXMax - 4, mCursorY + mLineHeight, false ); - mCursorY += mLineOffset; - } - - // Draw the text of the profile report - gfxDevice.SetPenColor ( mTextColor ); - - // Draw general frame information - MOAIDraw::BeginDrawString ( 1, *mFont, mFontSize, 0, 0 ); - - sprintf ( mTemp, "Perf - sim:%.1fms rnd:%.1fms", simRate, renderRate ); - MOAIDraw::DrawString ( mTemp, mOverviewXRange.mX + 3, mSummaryYRange.mX, 0, 0 ); - - sprintf ( mTemp, "Mem - lua:%ukb tex:%umb usr:%ukb used:%umb avail:%umb", (u32) (luaMem / 1024), (u32) (texMem / (1024 * 1024)),(mUserMemory / 1024), usedMainMem, availableMainMem ); - MOAIDraw::DrawString ( mTemp, mMemoryXRange.mX + 3, mSummaryYRange.mX, 0, 0 ); - - MOAIDraw::DrawString ( kCloumn_Names [ COLUMN_NAME ], mColumns [ COLUMN_NAME ].mX + 3, mHeaderYRange.mX, 0, 0 ); - - // Draw the header first - for ( u32 i = 1; i < COLUMN_COUNT; i++ ) { - - MOAIDraw::DrawString ( kCloumn_Names [ i ], mColumns [ i ].mX + 3, mHeaderYRange.mX, 0, 0 ); - } - - MOAIDraw::EndDrawString (); - - // Get the current reports and show them - MOAIProfiler& profiler = MOAIProfiler::Get (); - - float cursor = mBodyYRange.mX; - - u32 numProfileReports = profiler.GetNumProfileReports (); - for ( u32 i = 0; i < numProfileReports; i++ ) { - - MOAIProfilerReport* profileReport = profiler.LockProfileReport ( i ); - if ( profileReport ) { - - mOneOverTotalDurationMicroSec = (float) profileReport->GetTotalDurationMicroSec (); - mOneOverTotalDurationMicroSec = mOneOverTotalDurationMicroSec > 0 ? 1.0f / mOneOverTotalDurationMicroSec : 0.0f; - - gfxDevice.SetPenColor ( mTextColor ); - - // ToDo: Prefix the name of the report - - MOAIDraw::BeginDrawString ( 1, *mFont, mFontSize, 0, 0 ); - - // Draw the content - mCursorY = cursor; - profileReport->TraverseProfileEntries ( DrawEntryText, this ); - - MOAIDraw::EndDrawString (); - - - ZLColorVec col; - col.SetRGBA ( mTextColor ); - col.mA *= 0.5f; - gfxDevice.SetPenColor ( col.PackRGBA () ); - - mCursorY = cursor; - profileReport->TraverseProfileEntries ( DrawEntryVisuals, this ); - - profiler.UnlockProfileReport ( i ); - - cursor = mCursorY; - } - } - - // TODO: when profile not enabled - const float memStatX = 0.f; - const float memStatY = 0.f; - const float memStatWidth = 600.0f; - const float memStatHeight = mLineHeight; - - ZLColorVec col; - col.SetRGBA ( mRowColor ); - col.mA *= 0.5f; - gfxDevice.SetPenColor ( col ); - MOAIDraw::DrawRectFill ( memStatX, memStatY, memStatX + memStatWidth, memStatY + memStatHeight, false ); - gfxDevice.SetPenColor ( mTextColor ); - sprintf ( mTemp, "Mem - lua:%ukb usr:%ukb used:%umb avail:%umb", (u32) (luaMem / 1024), (mUserMemory / 1024), usedMainMem, availableMainMem ); - MOAIDraw::DrawString ( mTemp, memStatX, memStatY, 1, *mFont, mFontSize, 0, 0, 0, 0 ); - - // Restore render state - gfxDevice.SetUVTransform ( orgUvMatrix ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, orgWorldTransform ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_VIEW_TRANSFORM, orgViewTransform ); - gfxDevice.SetBlendMode ( origBlendMode ); - - if ( rotation != 0 ) { - - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_PROJ_TRANSFORM, orgProjTransform ); - } +// if ( !mFont ) return; +// +// MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); +// +// // Get memory stats +// u32 availableMainMem, usedMainMem; +// _GetMemoryStats ( availableMainMem, usedMainMem ); +// float relativeMemUsed = availableMainMem > 0 ? (float) usedMainMem / (float) availableMainMem : 0; +// +// float simRate = ( float )MOAISim::Get ().GetSimDuration () * 1000.0f; +// float renderRate = ( float )MOAIRenderMgr::Get ().GetRenderDuration () * 1000.0f; +// size_t luaMem = MOAILuaRuntime::Get ().GetMemoryUsage (); +// size_t texMem = gfxMgr.GetTextureMemoryUsage (); +// +// // used for drawing the memory bar +// float memBarWidth = mMemoryXRange.mY - mMemoryXRange.mX; +// float memUsedWidth = memBarWidth * relativeMemUsed; +// +// const float cellOffsetX = 2; +// +// // Get current state +// const ZLMatrix4x4& orgUvMatrix = gfxMgr.GetUVTransform (); +// const ZLMatrix4x4& orgWorldTransform = gfxMgr.GetVertexTransform ( MOAIGfxMgr::VTX_WORLD_TRANSFORM ); +// const ZLMatrix4x4& orgViewTransform = gfxMgr.GetVertexTransform ( MOAIGfxMgr::VTX_VIEW_TRANSFORM ); +// const ZLMatrix4x4& orgProjTransform = gfxMgr.GetVertexTransform ( MOAIGfxMgr::VTX_PROJ_TRANSFORM ); +// +// MOAIBlendMode origBlendMode = gfxMgr.GetBlendMode (); +// +// // Set state +// gfxMgr.SetVertexMtxMode ( MOAIGfxMgr::VTX_STAGE_WORLD, MOAIGfxMgr::VTX_STAGE_PROJ ); +// gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_VIEW_TRANSFORM ); +// +// float rotation = 0; +// if ( mOrientation == 1 ) { +// +// rotation = 1.57f; +// } +// else if ( mOrientation == 2 ) { +// +// rotation = -1.57f; +// } +// +// // Calculate projection matrix +// ZLMatrix4x4 proj; +// +// u32 windowWidth = gfxMgr.GetWidth (); +// u32 windowheight = gfxMgr.GetHeight (); +// +// proj.Ortho ( 2.0f / (float)windowWidth, -2.0f / (float)windowheight, 0, 1 ); +// +// ZLMatrix4x4 offset; +// offset.Translate ( -1, 1, 0 ); +// proj.Append ( offset ); +// +// if ( rotation != 0 ) { +// +// ZLMatrix4x4 rot; +// rot.RotateZ ( rotation ); +// proj.Multiply ( orgProjTransform, rot ); +// } +// +// gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_PROJ_TRANSFORM, proj ); +// +// MOAIDraw::Bind (); +// +// // Get some font metrics +// mFontSize = mFontSize > 0 ? mFontSize : mFont->GetDefaultSize (); +// MOAIGlyphSet* glyphSet = mFont->GetGlyphSet ( mFontSize ); +// float fontHeight = glyphSet->GetHeight (); +// mLineHeight = fontHeight + 4; +// mLineOffset = fontHeight + 10; +// +// // Calculate vertical layout +// mSummaryYRange.Init ( this->mFrame.mYMin + 2, this->mFrame.mYMin + 2 + this->mLineHeight ); +// mHeaderYRange.Init ( this->mSummaryYRange.mX + mLineOffset, this->mSummaryYRange.mY + 2 + this->mLineHeight ); +// mBodyYRange.Init ( this->mHeaderYRange.mX + mLineOffset, this->mFrame.mYMax ); +// +// // Calculate horizonatal layout +// float frameWidth = this->mFrame.mXMax - this->mFrame.mXMin; +// mOverviewXRange.Init ( this->mFrame.mXMin + cellOffsetX, this->mFrame.mXMin + cellOffsetX + frameWidth * 0.3f ); +// mMemoryXRange.Init ( this->mOverviewXRange.mY + cellOffsetX, this->mFrame.mXMax - cellOffsetX * 2 ); +// +// mColumns [ COLUMN_NAME ].mX = this->mFrame.mXMin + cellOffsetX; +// mColumns [ COLUMN_NAME ].mWidth = 50; +// mColumns [ COLUMN_HITS ].mWidth = 4; +// mColumns [ COLUMN_PERCENTAGE ].mWidth = 10; +// mColumns [ COLUMN_DURATION ].mWidth = 5; +// mColumns [ COLUMN_AVGDURATION ].mWidth = 5; +// mColumns [ COLUMN_MINDURATION ].mWidth = 5; +// mColumns [ COLUMN_MAXDURATION ].mWidth = 5; +// +// float widthNorm = 0; +// for ( u32 i = 0; i < COLUMN_COUNT; i++ ) { +// +// widthNorm += mColumns [ i ].mWidth; +// } +// +// frameWidth = this->mFrame.mXMax - 4 - mColumns [ COLUMN_NAME ].mX - cellOffsetX * COLUMN_COUNT; +// +// widthNorm = 1.0f / widthNorm; +// for ( u32 i = 0; i < COLUMN_COUNT; i++ ) { +// +// mColumns [ i ].mWidth = ceil ( mColumns [ i ].mWidth * widthNorm * frameWidth ); +// } +// for ( u32 i = 1; i < COLUMN_COUNT; i++ ) { +// +// mColumns [ i ].mX = mColumns [ i - 1 ].mX + mColumns [ i - 1 ].mWidth + cellOffsetX; +// } +// +// // Prepare immediate mode drawing +// MOAIDraw::Bind (); +// +// gfxMgr.SetUVTransform (); +// gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_WORLD_TRANSFORM ); +// +// gfxMgr.SetBlendMode ( ZGL_BLEND_FACTOR_SRC_ALPHA, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); +// +// // Draw the table background +// gfxMgr.SetPenColor ( mBackgroundColor ); +// MOAIDraw::DrawRectFill ( this->mFrame.mXMin, this->mFrame.mYMin, this->mFrame.mXMax, this->mFrame.mYMax, false ); +// +// // Draw the summary row +// gfxMgr.SetPenColor ( mRowColor ); +// +// MOAIDraw::DrawRectFill ( mOverviewXRange.mX, mSummaryYRange.mX, mOverviewXRange.mY, mSummaryYRange.mY, false ); +// +// // ToDo: Cache the colors +// ZLColorVec memColorLow, memColorMed, memColorHigh, memColorCur; +// memColorLow.Set ( 0.25f, 0.8f, 0.25f, 0.5f ); +// memColorMed.Set ( 0.7f, 0.7f, 0.25f, 0.5f ); +// memColorHigh.Set ( 0.8f, 0.25f, 0.25f, 0.5f ); +// +// if ( relativeMemUsed < 0.5f ) { +// memColorCur = memColorLow; +// } +// else { +// if ( relativeMemUsed < 0.75f ) { +// memColorCur.Lerp ( ZLInterpolate::kLinear, memColorLow, memColorMed, (relativeMemUsed - 0.5f) / 0.25f ); +// } +// else { +// memColorCur.Lerp ( ZLInterpolate::kLinear, memColorMed, memColorHigh, (relativeMemUsed - 0.75f) / 0.25f ); +// } +// } +// +// gfxMgr.SetPenColor ( memColorCur ); +// MOAIDraw::DrawRectFill ( mMemoryXRange.mX, mSummaryYRange.mX, mMemoryXRange.mX + memUsedWidth, mSummaryYRange.mY, false ); +// +// gfxMgr.SetPenColor ( mRowColor ); +// MOAIDraw::DrawRectFill (mMemoryXRange.mX + memUsedWidth, mSummaryYRange.mX, mMemoryXRange.mY, mSummaryYRange.mY, false ); +// +// // Draw the rows +// gfxMgr.SetPenColor ( mRowColor ); +// +// mCursorY = mHeaderYRange.mX; +// for ( u32 i = 0; i < COLUMN_COUNT; i++ ) { +// +// MOAIDraw::DrawRectFill ( mColumns [ i ].mX, mCursorY, mColumns [ i ].mX + mColumns [ i ].mWidth, mCursorY + mLineHeight, false ); +// } +// +// mCursorY += mLineOffset; +// while ( mCursorY < this->mFrame.mYMax ) { +// +// MOAIDraw::DrawRectFill ( this->mFrame.mXMin + 2, mCursorY, this->mFrame.mXMax - 4, mCursorY + mLineHeight, false ); +// mCursorY += mLineOffset; +// } +// +// // Draw the text of the profile report +// gfxMgr.SetPenColor ( mTextColor ); +// +// // Draw general frame information +// MOAIDraw::BeginDrawString ( 1, *mFont, mFontSize, 0, 0 ); +// +// sprintf ( mTemp, "Perf - sim:%.1fms rnd:%.1fms", simRate, renderRate ); +// MOAIDraw::DrawString ( mTemp, mOverviewXRange.mX + 3, mSummaryYRange.mX, 0, 0 ); +// +// sprintf ( mTemp, "Mem - lua:%ukb tex:%umb usr:%ukb used:%umb avail:%umb", (u32) (luaMem / 1024), (u32) (texMem / (1024 * 1024)),(mUserMemory / 1024), usedMainMem, availableMainMem ); +// MOAIDraw::DrawString ( mTemp, mMemoryXRange.mX + 3, mSummaryYRange.mX, 0, 0 ); +// +// MOAIDraw::DrawString ( kCloumn_Names [ COLUMN_NAME ], mColumns [ COLUMN_NAME ].mX + 3, mHeaderYRange.mX, 0, 0 ); +// +// // Draw the header first +// for ( u32 i = 1; i < COLUMN_COUNT; i++ ) { +// +// MOAIDraw::DrawString ( kCloumn_Names [ i ], mColumns [ i ].mX + 3, mHeaderYRange.mX, 0, 0 ); +// } +// +// MOAIDraw::EndDrawString (); +// +// // Get the current reports and show them +// MOAIProfiler& profiler = MOAIProfiler::Get (); +// +// float cursor = mBodyYRange.mX; +// +// u32 numProfileReports = profiler.GetNumProfileReports (); +// for ( u32 i = 0; i < numProfileReports; i++ ) { +// +// MOAIProfilerReport* profileReport = profiler.LockProfileReport ( i ); +// if ( profileReport ) { +// +// mOneOverTotalDurationMicroSec = (float) profileReport->GetTotalDurationMicroSec (); +// mOneOverTotalDurationMicroSec = mOneOverTotalDurationMicroSec > 0 ? 1.0f / mOneOverTotalDurationMicroSec : 0.0f; +// +// gfxMgr.SetPenColor ( mTextColor ); +// +// // ToDo: Prefix the name of the report +// +// MOAIDraw::BeginDrawString ( 1, *mFont, mFontSize, 0, 0 ); +// +// // Draw the content +// mCursorY = cursor; +// profileReport->TraverseProfileEntries ( DrawEntryText, this ); +// +// MOAIDraw::EndDrawString (); +// +// +// ZLColorVec col; +// col.SetRGBA ( mTextColor ); +// col.mA *= 0.5f; +// gfxMgr.SetPenColor ( col.PackRGBA () ); +// +// mCursorY = cursor; +// profileReport->TraverseProfileEntries ( DrawEntryVisuals, this ); +// +// profiler.UnlockProfileReport ( i ); +// +// cursor = mCursorY; +// } +// } +// +// // TODO: when profile not enabled +// const float memStatX = 0.f; +// const float memStatY = 0.f; +// const float memStatWidth = 600.0f; +// const float memStatHeight = mLineHeight; +// +// ZLColorVec col; +// col.SetRGBA ( mRowColor ); +// col.mA *= 0.5f; +// gfxMgr.SetPenColor ( col ); +// MOAIDraw::DrawRectFill ( memStatX, memStatY, memStatX + memStatWidth, memStatY + memStatHeight, false ); +// gfxMgr.SetPenColor ( mTextColor ); +// sprintf ( mTemp, "Mem - lua:%ukb usr:%ukb used:%umb avail:%umb", (u32) (luaMem / 1024), (mUserMemory / 1024), usedMainMem, availableMainMem ); +// MOAIDraw::DrawString ( mTemp, memStatX, memStatY, 1, *mFont, mFontSize, 0, 0, 0, 0 ); +// +// // Restore render state +// gfxMgr.SetUVTransform ( orgUvMatrix ); +// gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_WORLD_TRANSFORM, orgWorldTransform ); +// gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_VIEW_TRANSFORM, orgViewTransform ); +// gfxMgr.SetBlendMode ( origBlendMode ); +// +// if ( rotation != 0 ) { +// +// gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_PROJ_TRANSFORM, orgProjTransform ); +// } } //----------------------------------------------------------------// @@ -736,47 +736,47 @@ bool MOAIProfilerReportBox::_DrawEntryText ( MOAIProfilerEntry* entry ) { //----------------------------------------------------------------// bool MOAIProfilerReportBox::_DrawEntryVisuals ( MOAIProfilerEntry* entry ) { - if ( entry->mAvgDurationMicroSec > kThresholdAvgDurationMicroSec ) { - - // Calculate bounds of the frame - const float start = mColumns [ COLUMN_PERCENTAGE ].mX; - const float width = mColumns [ COLUMN_PERCENTAGE ].mWidth; - const float end = start + width; - - // Draw the relative duration of the current entry - MOAIDraw::DrawRectFill ( start + width * (1.0f - entry->mRelativeDuration), mCursorY, end, mCursorY + mLineHeight, false ); - MOAIDraw::DrawRectFill ( start + width * (1.0f - entry->mFrameRelativeDuration), mCursorY, end, mCursorY + mLineHeight, false ); - - // Prepare the graph of historic values... - float x = start; - const float step = width / (float)(MOAIProfilerEntry::NUM_SAMPLES - 1); - for ( int i = MOAIProfilerEntry::NUM_SAMPLES - 1, j = 0; i >= 0; i--, j += 2, x += step ) { - - float sample = entry->mTotalDurationSamplesMicroSec [ i ] * mOneOverTotalDurationMicroSec; - sample = min ( max ( sample, 0.0f ), 1.0f ); - - mSampleVerts [ j + 0 ] = x; - mSampleVerts [ j + 1 ] = mCursorY + mLineHeight * (1.0f - sample); - } - - // ...and draw it - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - const ZLColorVec& penColor = gfxDevice.GetPenColor (); - - MOAIDraw::DrawVertexArray2D ( mSampleVerts, MOAIProfilerEntry::NUM_SAMPLES, 0xff0000ff, ZGL_PRIM_LINE_STRIP ); - - gfxDevice.SetPenColor ( penColor ); - - // Draw the frame - ZLRect percentageRect; - percentageRect.Init ( start, mCursorY, start + width, mCursorY + mLineHeight ); - MOAIDraw::DrawRectEdges ( percentageRect, 0xffffffff ); - - // Next line - mCursorY += mLineOffset; - - return mCursorY < mBodyYRange.mY; - } +// if ( entry->mAvgDurationMicroSec > kThresholdAvgDurationMicroSec ) { +// +// // Calculate bounds of the frame +// const float start = mColumns [ COLUMN_PERCENTAGE ].mX; +// const float width = mColumns [ COLUMN_PERCENTAGE ].mWidth; +// const float end = start + width; +// +// // Draw the relative duration of the current entry +// MOAIDraw::DrawRectFill ( start + width * (1.0f - entry->mRelativeDuration), mCursorY, end, mCursorY + mLineHeight, false ); +// MOAIDraw::DrawRectFill ( start + width * (1.0f - entry->mFrameRelativeDuration), mCursorY, end, mCursorY + mLineHeight, false ); +// +// // Prepare the graph of historic values... +// float x = start; +// const float step = width / (float)(MOAIProfilerEntry::NUM_SAMPLES - 1); +// for ( int i = MOAIProfilerEntry::NUM_SAMPLES - 1, j = 0; i >= 0; i--, j += 2, x += step ) { +// +// float sample = entry->mTotalDurationSamplesMicroSec [ i ] * mOneOverTotalDurationMicroSec; +// sample = min ( max ( sample, 0.0f ), 1.0f ); +// +// mSampleVerts [ j + 0 ] = x; +// mSampleVerts [ j + 1 ] = mCursorY + mLineHeight * (1.0f - sample); +// } +// +// // ...and draw it +// MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); +// const ZLColorVec& penColor = gfxMgr.GetPenColor (); +// +// MOAIDraw::DrawVertexArray2D ( mSampleVerts, MOAIProfilerEntry::NUM_SAMPLES, 0xff0000ff, ZGL_PRIM_LINE_STRIP ); +// +// gfxMgr.SetPenColor ( penColor ); +// +// // Draw the frame +// ZLRect percentageRect; +// percentageRect.Init ( start, mCursorY, start + width, mCursorY + mLineHeight ); +// MOAIDraw::DrawRectEdges ( percentageRect, 0xffffffff ); +// +// // Next line +// mCursorY += mLineOffset; +// +// return mCursorY < mBodyYRange.mY; +// } return false; } diff --git a/src/moai-sim/MOAIProfilerScope.cpp b/src/moai-sim/MOAIProfilerScope.cpp index 5fca335023..48a61a4afa 100644 --- a/src/moai-sim/MOAIProfilerScope.cpp +++ b/src/moai-sim/MOAIProfilerScope.cpp @@ -24,6 +24,7 @@ void MOAIProfilerScope::Enter ( MOAIProfilerScope* parent, const ZLHashedString& //----------------------------------------------------------------// void MOAIProfilerScope::Leave ( const ZLHashedString& name ) { + UNUSED ( name ); // TODO: find out why zl assert undef isn't handling this assert ( this->mName == name ); diff --git a/src/moai-sim/MOAIProp.cpp b/src/moai-sim/MOAIProp.cpp index caa65e5596..9f555395af 100644 --- a/src/moai-sim/MOAIProp.cpp +++ b/src/moai-sim/MOAIProp.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -134,6 +134,23 @@ int MOAIProp::_getIndex ( lua_State* L ) { return 1; } +//----------------------------------------------------------------// +/** @lua getPartition + @text Returns the partition prop is currently held in. + + @in MOAILayer self + @out MOAIPartition partition +*/ +int MOAIProp::_getPartition ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIProp, "U" ) + + if ( self->mPartition ) { + self->mPartition->PushLuaUserdata ( state ); + return 1; + } + return 0; +} + //----------------------------------------------------------------// /** @lua getPriority @text Returns the current priority of the node or 'nil' if the @@ -630,7 +647,7 @@ bool MOAIProp::GetCellRect ( ZLRect* cellRect, ZLRect* paddedRect ) { //----------------------------------------------------------------// void MOAIProp::GetGridBoundsInView ( MOAICellCoord& c0, MOAICellCoord& c1 ) { - const ZLFrustum& frustum = MOAIGfxDevice::Get ().GetViewVolume (); + const ZLFrustum& frustum = MOAIGfxMgr::Get ().mGfxState.GetViewVolume (); ZLRect viewRect; if ( frustum.GetXYSectRect ( this->GetWorldToLocalMtx (), viewRect )) { @@ -820,6 +837,7 @@ void MOAIProp::RegisterLuaFuncs ( MOAILuaState& state ) { { "getDims", _getDims }, { "getGrid", _getGrid }, { "getIndex", _getIndex }, + { "getPartition", _getPartition }, { "getPriority", _getPriority }, { "getWorldBounds", _getWorldBounds }, { "getWorldBoundsCenter", _getWorldBoundsCenter }, diff --git a/src/moai-sim/MOAIProp.h b/src/moai-sim/MOAIProp.h index b7eb84af40..a237da181d 100644 --- a/src/moai-sim/MOAIProp.h +++ b/src/moai-sim/MOAIProp.h @@ -65,6 +65,7 @@ class MOAIProp : static int _getDims ( lua_State* L ); static int _getGrid ( lua_State* L ); static int _getIndex ( lua_State* L ); + static int _getPartition ( lua_State* L ); static int _getPriority ( lua_State* L ); static int _getWorldBounds ( lua_State* L ); static int _getWorldBoundsCenter ( lua_State* L ); diff --git a/src/moai-sim/MOAIQuadBrush.cpp b/src/moai-sim/MOAIQuadBrush.cpp index 0fcfbc4b26..2698009615 100644 --- a/src/moai-sim/MOAIQuadBrush.cpp +++ b/src/moai-sim/MOAIQuadBrush.cpp @@ -2,6 +2,7 @@ // http://getmoai.com #include "pch.h" +#include #include #include @@ -10,37 +11,33 @@ //================================================================// //----------------------------------------------------------------// -void MOAIQuadBrush::BindVertexFormat ( MOAIGfxDevice& gfxDevice ) { +void MOAIQuadBrush::BindVertexFormat ( MOAIGfxVertexCache& vertexCache ) { - gfxDevice.BindBufferedDrawing ( MOAIVertexFormatMgr::XYZWUVC ); + vertexCache.BindBufferedDrawing ( MOAIVertexFormatMgr::XYZWUVC ); } //----------------------------------------------------------------// void MOAIQuadBrush::Draw () { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV ); + MOAIGfxMgr::Get ().mVertexCache.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV ); } //----------------------------------------------------------------// void MOAIQuadBrush::Draw ( float xOff, float yOff, float zOff ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV, xOff, yOff, zOff ); + MOAIGfxMgr::Get ().mVertexCache.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV, xOff, yOff, zOff ); } //----------------------------------------------------------------// void MOAIQuadBrush::Draw ( float xOff, float yOff, float zOff, float xScale, float yScale ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV, xOff, yOff, zOff, xScale, yScale ); + MOAIGfxMgr::Get ().mVertexCache.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV, xOff, yOff, zOff, xScale, yScale ); } //----------------------------------------------------------------// void MOAIQuadBrush::Draw ( float xOff, float yOff, float zOff, float xScale, float yScale, float uOff, float vOff, float uScale, float vScale ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV, xOff, yOff, zOff, xScale, yScale, uOff, vOff, uScale, vScale ); + MOAIGfxMgr::Get ().mVertexCache.WriteQuad ( this->mModelQuad.mV, this->mUVQuad.mV, xOff, yOff, zOff, xScale, yScale, uOff, vOff, uScale, vScale ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIQuadBrush.h b/src/moai-sim/MOAIQuadBrush.h index c5a112711f..59027a18ee 100644 --- a/src/moai-sim/MOAIQuadBrush.h +++ b/src/moai-sim/MOAIQuadBrush.h @@ -3,7 +3,7 @@ #ifndef MOAIQUADBRUSH_H #define MOAIQUADBRUSH_H -#include +#include //================================================================// // MOAIQuadBrush @@ -12,11 +12,11 @@ class MOAIQuadBrush { private: //----------------------------------------------------------------// - static inline void WriteVertex ( MOAIGfxDevice& gfxDevice, const ZLVec2D& vtx, const ZLVec2D& uv ) { + static inline void WriteVertex ( MOAIGfxVertexCache& vertexCache, const ZLVec2D& vtx, const ZLVec2D& uv ) { - gfxDevice.WriteVtx ( vtx ); - gfxDevice.WriteUV ( uv ); - gfxDevice.WriteFinalColor4b (); + vertexCache.WriteVtx ( vtx ); + vertexCache.WriteUV ( uv ); + vertexCache.WritePenColor4b (); } public: @@ -25,7 +25,7 @@ class MOAIQuadBrush { ZLQuad mUVQuad; //----------------------------------------------------------------// - static void BindVertexFormat ( MOAIGfxDevice& gfxDevice ); + static void BindVertexFormat ( MOAIGfxVertexCache& vertexCache ); void Draw (); void Draw ( float xOff, float yOff, float zOff ); void Draw ( float xOff, float yOff, float zOff, float xScale, float yScale ); diff --git a/src/moai-sim/MOAIRegion.cpp b/src/moai-sim/MOAIRegion.cpp index 9d6760a425..6ae4c45ce9 100644 --- a/src/moai-sim/MOAIRegion.cpp +++ b/src/moai-sim/MOAIRegion.cpp @@ -3,7 +3,7 @@ #include "pch.h" #include -#include +#include #include #include #include @@ -14,6 +14,20 @@ // lua //================================================================// +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIRegion::_append ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIRegion, "U" ) + + MOAIRegion* regionA = state.GetLuaObject < MOAIRegion >( 2, false ); + MOAIRegion* regionB = state.GetLuaObject < MOAIRegion >( 3, false ); + + if ( regionA && regionB ) { + self->Append ( *regionA, *regionB ); + } + return 0; +} + //----------------------------------------------------------------// // TODO: doxygen int MOAIRegion::_bless ( lua_State* L ) { @@ -40,6 +54,48 @@ int MOAIRegion::_boolean ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIRegion::_clear ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIRegion, "U" ) + + self->Clear (); + return 0; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIRegion::_convexHull ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIRegion, "U" ) + + MOAIStream* stream = state.GetLuaObject < MOAIStream >( 2, true ); + + if ( stream ) { + + size_t resetCursor = stream->GetCursor (); + + size_t nVerts = state.GetValue < u32 >( 3, 0 ); + + if ( nVerts == 0 ) { + nVerts = stream->GetLength () / ZLPolygon2D::VERTEX_SIZE; + stream->Seek ( 0, SEEK_SET ); + } + + if ( nVerts > 0 ) { + + ZLSizeResult result = self->ConvexHull ( *stream, nVerts ); + + if ( result.mCode == ZL_OK ) { + state.Push (( u32 )result.mValue ); + return 1; + } + } + + stream->Seek ( resetCursor, SEEK_SET ); + } + return 0; +} + //----------------------------------------------------------------// int MOAIRegion::_copy ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIRegion, "UU" ) @@ -52,6 +108,14 @@ int MOAIRegion::_copy ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +int MOAIRegion::_countPolygons ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIRegion, "U" ) + + state.Push (( u32 )self->mPolygons.Size ()); + return 1; +} + //----------------------------------------------------------------// int MOAIRegion::_cull ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIRegion, "U" ) @@ -115,6 +179,37 @@ int MOAIRegion::_getDistance ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIRegion::_getPolygon ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIRegion, "U" ) + + u32 polygonID = state.GetValue < u32 >( 2, 1 ) - 1; + + if ( polygonID < self->mPolygons.Size ()) { + + lua_newtable ( state ); + + const ZLPolygon2D& polygon = self->mPolygons [ polygonID ]; + + size_t polygonSize = polygon.GetSize (); + for ( size_t i = 0; i < polygonSize; ++i ) { + + ZLVec2D vec = polygon.GetVertex ( i ); + + state.Push (( u32 )i + 1 ); + + lua_newtable ( state ); + state.SetField ( -1, "x", vec.mX ); + state.SetField ( -1, "y", vec.mY ); + + lua_settable ( state, -3 ); + } + return 1; + } + return 0; +} + //----------------------------------------------------------------// // TODO: doxygen int MOAIRegion::_getTriangles ( lua_State* L ) { @@ -131,7 +226,7 @@ int MOAIRegion::_getTriangles ( lua_State* L ) { u32 idxSizeInBytes = state.GetValue < u32 >( 4, 4 ); MOAIVertexFormat* format = state.GetLuaObject < MOAIVertexFormat >( 5, false ); - base = idxBuffer->GetCursor () / idxSizeInBytes; + base = ( u32 )( idxBuffer->GetCursor () / idxSizeInBytes ); totalElements = self->GetTriangles ( *format, *vtxBuffer, *idxBuffer, idxSizeInBytes ); } else { @@ -141,7 +236,7 @@ int MOAIRegion::_getTriangles ( lua_State* L ) { MOAIVertexFormat* format = state.GetLuaObject < MOAIVertexFormat >( 4, false ); if ( vtxStream && idxStream && format ) { - base = idxStream->GetCursor () / 4; + base = ( u32 )( idxStream->GetCursor () / 4 ); totalElements = self->GetTriangles ( *format, *vtxStream, *idxStream ); } } @@ -152,6 +247,37 @@ int MOAIRegion::_getTriangles ( lua_State* L ) { return 3; } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIRegion::_getVertices ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIRegion, "U" ) + + MOAIStream* stream = state.GetLuaObject < MOAIStream >( 2, true ); + + if ( stream ) { + + ZLSizeResult result = self->GetVertices ( *stream ); + + if ( result.mCode == ZL_OK ) { + state.Push (( u32 )result.mValue ); + return 1; + } + } + return 0; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIRegion::_pad ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIRegion, "U" ) + + MOAIRegion* region = state.GetLuaObject < MOAIRegion >( 2, false ); + if ( region ) { + self->Pad ( *region, state.GetValue < float >( 3, 0.0f )); + } + return 0; +} + //----------------------------------------------------------------// // TODO: doxygen int MOAIRegion::_pointInside ( lua_State* L ) { @@ -257,26 +383,26 @@ int MOAIRegion::_stroke ( lua_State* L ) { MOAIRegion* region = state.GetLuaObject < MOAIRegion >( 2, false ); - float exterior = 0.0; - bool strokeExterior = false; - - float interior = 0.0; - bool strokeInterior = false; - - if ( state.IsType ( 3, LUA_TNUMBER )) { - exterior = state.GetValue < float >( 3, 0.0f ); - strokeExterior = true; - } - - if ( strokeExterior && state.IsType ( 4, LUA_TNUMBER )) { - - interior = exterior; - strokeInterior = true; - - exterior = state.GetValue < float >( 4, 0.0f ); - } - if ( region ) { + + float exterior = 0.0; + bool strokeExterior = false; + + float interior = 0.0; + bool strokeInterior = false; + + if ( state.IsType ( 3, LUA_TNUMBER )) { + exterior = state.GetValue < float >( 3, 0.0f ); + strokeExterior = true; + } + + if ( strokeExterior && state.IsType ( 4, LUA_TNUMBER )) { + + interior = exterior; + strokeInterior = true; + + exterior = state.GetValue < float >( 4, 0.0f ); + } if ( strokeExterior || strokeInterior ) { self->Stroke ( *region, exterior, strokeExterior, interior, strokeInterior ); @@ -350,6 +476,25 @@ int MOAIRegion::AddFillContours ( SafeTesselator& tess, u32 mask ) const { return 0; // since we're not tesselating here (and thus do not have any error case) we always report no error } +//----------------------------------------------------------------// +void MOAIRegion::Append ( const MOAIRegion& regionA, const MOAIRegion& regionB ) { + + size_t sizeA = regionA.GetSize (); + size_t sizeB = regionB.GetSize (); + + this->ReservePolygons ( sizeA + sizeB ); + + for ( size_t i = 0; i < sizeA; ++i ) { + this->mPolygons [ i ].Copy ( regionA.mPolygons [ i ]); + } + + for ( size_t i = 0; i < sizeB; ++i ) { + this->mPolygons [ i + sizeA ].Copy ( regionA.mPolygons [ i + sizeA ]); + } + + this->Bless (); +} + //----------------------------------------------------------------// void MOAIRegion::Bless () { @@ -413,6 +558,12 @@ void MOAIRegion::BooleanXor ( const MOAIRegion& regionA, const MOAIRegion& regio this->CombineAndTesselate ( regionA, regionB, TESS_WINDING_ODD ); } +//----------------------------------------------------------------// +void MOAIRegion::Clear () { + + this->mPolygons.Clear (); +} + //----------------------------------------------------------------// int MOAIRegion::CombineAndTesselate ( const MOAIRegion& regionA, const MOAIRegion& regionB, int windingRule ) { @@ -431,6 +582,25 @@ int MOAIRegion::CombineAndTesselate ( const MOAIRegion& regionA, const MOAIRegio return error; } +//----------------------------------------------------------------// +ZLSizeResult MOAIRegion::ConvexHull ( ZLStream& vtxStream, size_t nVerts ) { + + ZLCleanup < MOAIRegion > cleanup ( this, &MOAIRegion::Clear ); + + this->Clear (); + + ZL_HANDLE_ERROR_CODE ( this->ReservePolygons ( 1 ), ZL_RETURN_SIZE_RESULT ( 0, CODE )) + + ZLMemStream hull; + ZLSizeResult hullSize = this->mPolygons [ 0 ].ConvexHull ( vtxStream, nVerts ); + + ZL_HANDLE_ERROR_CODE ( hullSize.mCode, ZL_RETURN_SIZE_RESULT ( 0, CODE )) + if ( hullSize < 3 ) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ) + + cleanup.Skip (); + ZL_RETURN_SIZE_RESULT ( nVerts, ZL_OK ) +} + //----------------------------------------------------------------// void MOAIRegion::Copy ( const MOAIRegion& region ) { @@ -519,49 +689,49 @@ void MOAIRegion::DrawDebug () const { static u32 POLY_CORRUPT_COLOR = ZLColor::PackRGBA ( 1.0f, 0.0f, 0.0f, 1.0f ); - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); MOAIDraw::Bind (); - u32 nPolys = this->mPolygons.Size (); - for ( u32 i = 0; i < nPolys; ++i ) { + size_t nPolys = this->mPolygons.Size (); + for ( size_t i = 0; i < nPolys; ++i ) { const ZLPolygon2D& poly = this->mPolygons [ i ]; switch ( poly.GetInfo ()) { case ZLPolygon2D::POLY_UNKNOWN: { - gfxDevice.SetPenColor ( POLY_UNKNOWN_COLOR ); - gfxDevice.SetPenWidth ( 1.0f ); + gfxMgr.mGfxState.SetPenColor ( POLY_UNKNOWN_COLOR ); + gfxMgr.mGfxState.SetPenWidth ( 1.0f ); break; } case ZLPolygon2D::POLY_COMPLEX_BIT: { - gfxDevice.SetPenColor ( POLY_COMPLEX_COLOR ); - gfxDevice.SetPenWidth ( 1.0f ); + gfxMgr.mGfxState.SetPenColor ( POLY_COMPLEX_COLOR ); + gfxMgr.mGfxState.SetPenWidth ( 1.0f ); break; } case ZLPolygon2D::POLY_ANTICLOCKWISE_CONVEX: { - gfxDevice.SetPenColor ( POLY_ANTICLOCKWISE_CONVEX_COLOR ); - gfxDevice.SetPenWidth ( 2.0f ); + gfxMgr.mGfxState.SetPenColor ( POLY_ANTICLOCKWISE_CONVEX_COLOR ); + gfxMgr.mGfxState.SetPenWidth ( 2.0f ); break; } case ZLPolygon2D::POLY_ANTICLOCKWISE_CONCAVE: { - gfxDevice.SetPenColor ( POLY_ANTICLOCKWISE_CONCAVE_COLOR ); - gfxDevice.SetPenWidth ( 2.0f ); + gfxMgr.mGfxState.SetPenColor ( POLY_ANTICLOCKWISE_CONCAVE_COLOR ); + gfxMgr.mGfxState.SetPenWidth ( 2.0f ); break; } case ZLPolygon2D::POLY_CLOCKWISE_CONVEX: { - gfxDevice.SetPenColor ( POLY_CLOCKWISE_CONVEX_COLOR ); - gfxDevice.SetPenWidth ( 1.0f ); + gfxMgr.mGfxState.SetPenColor ( POLY_CLOCKWISE_CONVEX_COLOR ); + gfxMgr.mGfxState.SetPenWidth ( 1.0f ); break; } case ZLPolygon2D::POLY_CLOCKWISE_CONCAVE: { - gfxDevice.SetPenColor ( POLY_CLOCKWISE_CONCAVE_COLOR ); - gfxDevice.SetPenWidth ( 1.0f ); + gfxMgr.mGfxState.SetPenColor ( POLY_CLOCKWISE_CONCAVE_COLOR ); + gfxMgr.mGfxState.SetPenWidth ( 1.0f ); break; } case ZLPolygon2D::POLY_CORRUPT: { - gfxDevice.SetPenColor ( POLY_CORRUPT_COLOR ); - gfxDevice.SetPenWidth ( 1.0f ); + gfxMgr.mGfxState.SetPenColor ( POLY_CORRUPT_COLOR ); + gfxMgr.mGfxState.SetPenWidth ( 1.0f ); break; } } @@ -671,10 +841,10 @@ const ZLPolygon2D& MOAIRegion::GetPolygon ( u32 idx ) const { //----------------------------------------------------------------// u32 MOAIRegion::GetTriangles ( SafeTesselator& tess ) const { - u32 nPolys = this->mPolygons.Size (); - for ( u32 i = 0; i < nPolys; ++i ) { + size_t nPolys = this->mPolygons.Size (); + for ( size_t i = 0; i < nPolys; ++i ) { const ZLPolygon2D& poly = this->mPolygons [ i ]; - tess.AddContour ( 2, poly.GetVertices (), sizeof ( ZLVec2D ), poly.GetSize ()); + tess.AddContour ( 2, poly.GetVertices (), sizeof ( ZLVec2D ), ( int )poly.GetSize ()); } return tess.Tesselate ( TESS_WINDING_NONZERO, TESS_POLYGONS, 3, 2 ); @@ -704,6 +874,28 @@ u32 MOAIRegion::GetTriangles ( MOAIVertexFormat& format, MOAIVertexBuffer& vtxBu return 0; } +//----------------------------------------------------------------// +ZLSizeResult MOAIRegion::GetVertices ( ZLStream& vtxStream ) const { + + size_t count = 0; + + size_t nPolys = this->mPolygons.Size (); + for ( size_t i = 0; i < nPolys; ++i ) { + + const ZLPolygon2D& poly = this->mPolygons [ i ]; + + size_t nVerts = poly.GetSize (); + for ( size_t j = 0; j < nVerts; ++j ) { + + const ZLVec2D& v = poly.GetVertex ( j ); + vtxStream.Write < float >( v.mX ); + vtxStream.Write < float >( v.mY ); + count++; + } + } + ZL_RETURN_SIZE_RESULT ( count, ZL_OK ) +} + //----------------------------------------------------------------// MOAIRegion::MOAIRegion () { @@ -714,10 +906,42 @@ MOAIRegion::MOAIRegion () { MOAIRegion::~MOAIRegion () { } +//----------------------------------------------------------------// +void MOAIRegion::Pad ( const MOAIRegion& region, float pad ) { + + this->Copy ( region ); + + if ( pad == 0.0f ) return; + + size_t size = region.mPolygons.Size (); + + MOAIVectorStyle style; + style.Default (); + + for ( size_t i = 0; i < size; ++i ) { + + ZLPolygon2D& polygon = region.mPolygons [ i ]; + + int nVerts = ( int )polygon.GetSize (); + + MOAIVectorLineJoin* joins = ( MOAIVectorLineJoin* )alloca ( sizeof ( MOAIVectorLineJoin ) * nVerts ); + + MOAIVectorUtil::ComputeLineJoins ( joins, polygon.GetVertices (), nVerts, false, true, false ); + + int contourVerts = MOAIVectorUtil::StrokeLine ( style, 0, joins, nVerts, pad, false ); + ZLVec2D* contour = ( ZLVec2D* )alloca ( sizeof ( ZLVec2D ) * contourVerts ); + MOAIVectorUtil::StrokeLine ( style, contour, joins, nVerts, pad, false ); + + this->mPolygons [ i ].SetVertices ( contour, contourVerts ); + } + + this->Bless (); +} + //----------------------------------------------------------------// bool MOAIRegion::PointInside ( const ZLVec2D& p, float pad ) const { - u32 nPolys = this->mPolygons.Size (); + size_t nPolys = this->mPolygons.Size (); if ( pad != 0.0f ) { float dist = 0.0f; @@ -730,7 +954,7 @@ bool MOAIRegion::PointInside ( const ZLVec2D& p, float pad ) const { bool inside = false; - for ( u32 i = 0; i < nPolys; ++i ) { + for ( size_t i = 0; i < nPolys; ++i ) { switch ( this->mPolygons [ i ].PointInside ( p )) { @@ -798,14 +1022,21 @@ void MOAIRegion::RegisterLuaClass ( MOAILuaState& state ) { void MOAIRegion::RegisterLuaFuncs ( MOAILuaState& state ) { luaL_Reg regTable [] = { + { "append", _append }, { "bless", _bless }, { "boolean", _boolean }, + { "clear", _clear }, + { "convexHull", _convexHull }, { "copy", _copy }, + { "countPolygons", _countPolygons }, { "cull", _cull }, { "drawDebug", _drawDebug }, { "edge", _edge }, { "getDistance", _getDistance }, + { "getPolygon", _getPolygon }, { "getTriangles", _getTriangles }, + { "getVertices", _getVertices }, + { "pad", _pad }, { "pointInside", _pointInside }, { "print", _print }, { "reservePolygons", _reservePolygons }, @@ -824,9 +1055,20 @@ void MOAIRegion::RegisterLuaFuncs ( MOAILuaState& state ) { } //----------------------------------------------------------------// -void MOAIRegion::ReservePolygons ( u32 size ) { +ZLResultCode MOAIRegion::ReservePolygons ( size_t size ) { + + return this->mPolygons.Init ( size ); +} + +//----------------------------------------------------------------// +ZLResultCode MOAIRegion::ReserveVertices ( size_t idx, size_t size ) { - this->mPolygons.Init ( size ); + if ( idx >= this->mPolygons.Size ()) { + + ZLResultCode result = this->mPolygons.Grow ( idx ); + if ( result != ZL_OK ) return result; + } + return this->mPolygons [ idx ].ReserveVertices ( size ); } //----------------------------------------------------------------// @@ -846,13 +1088,13 @@ void MOAIRegion::ReverseWinding ( const MOAIRegion& region ) { void MOAIRegion::SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ) { UNUSED ( serializer ); - size_t nPolys = lua_objlen ( state, -1 ); + size_t nPolys = ( int )lua_objlen ( state, -1 ); this->mPolygons.Init ( nPolys ); for ( size_t i = 0; i < nPolys; ++i ) { ZLPolygon2D& poly = this->mPolygons [ i ]; - state.GetField ( -1, i + 1 ); + state.GetField ( -1, ( int )( i + 1 )); // TODO: cast size_t len = 0; const void* vertices = lua_tolstring ( state, -1, &len ); @@ -911,7 +1153,7 @@ void MOAIRegion::Stroke ( const MOAIRegion& region, float exterior, bool strokeE for ( size_t i = 0; i < size; ++i ) { ZLPolygon2D& polygon = region.mPolygons [ i ]; - size_t nVerts = polygon.GetSize (); + int nVerts = ( int )polygon.GetSize (); MOAIVectorLineJoin* joins = ( MOAIVectorLineJoin* )alloca ( sizeof ( MOAIVectorLineJoin ) * nVerts ); diff --git a/src/moai-sim/MOAIRegion.h b/src/moai-sim/MOAIRegion.h index 1ec9200647..dbe3165af2 100644 --- a/src/moai-sim/MOAIRegion.h +++ b/src/moai-sim/MOAIRegion.h @@ -21,14 +21,21 @@ class MOAIRegion : ZLLeanArray < ZLPolygon2D > mPolygons; //----------------------------------------------------------------// + static int _append ( lua_State* L ); static int _bless ( lua_State* L ); + static int _boolean ( lua_State* L ); + static int _clear ( lua_State* L ); + static int _convexHull ( lua_State* L ); static int _copy ( lua_State* L ); + static int _countPolygons ( lua_State* L ); static int _cull ( lua_State* L ); - static int _boolean ( lua_State* L ); static int _drawDebug ( lua_State* L ); static int _edge ( lua_State* L ); static int _getDistance ( lua_State* L ); + static int _getPolygon ( lua_State* L ); static int _getTriangles ( lua_State* L ); + static int _getVertices ( lua_State* L ); + static int _pad ( lua_State* L ); static int _pointInside ( lua_State* L ); static int _print ( lua_State* L ); static int _reservePolygons ( lua_State* L ); @@ -60,17 +67,20 @@ class MOAIRegion : DECL_LUA_FACTORY ( MOAIRegion ) - GET ( size_t, Size, mPolygons.Size ()) + GET_CONST ( size_t, Size, mPolygons.Size ()) //----------------------------------------------------------------// int AddFillContours ( SafeTesselator& tess, u32 mask = 0xffffffff ) const; + void Append ( const MOAIRegion& regionA, const MOAIRegion& regionB ); void Bless (); void Boolean ( const MOAIRegion& regionA, const MOAIRegion& regionB, u32 operation ); void BooleanAnd ( const MOAIRegion& regionA, const MOAIRegion& regionB ); void BooleanNot ( const MOAIRegion& regionA, const MOAIRegion& regionB ); void BooleanOr ( const MOAIRegion& regionA, const MOAIRegion& regionB ); void BooleanXor ( const MOAIRegion& regionA, const MOAIRegion& regionB ); + void Clear (); int CombineAndTesselate ( const MOAIRegion& regionA, const MOAIRegion& regionB, int windingRule ); + ZLSizeResult ConvexHull ( ZLStream& vtxStream, size_t nVerts ); void Copy ( const MOAIRegion& region ); void Copy ( const SafeTesselator& tess ); void Copy ( const SafeTesselator& tess, ZLAffine2D& transform ); @@ -84,13 +94,16 @@ class MOAIRegion : u32 GetTriangles ( SafeTesselator& tess ) const; u32 GetTriangles ( MOAIVertexFormat& format, ZLStream& vtxStream, ZLStream& idxStream ) const; u32 GetTriangles ( MOAIVertexFormat& format, MOAIVertexBuffer& vtxBuffer, MOAIIndexBuffer& idxBuffer, u32 idxSizeInBytex ) const; + ZLSizeResult GetVertices ( ZLStream& vtxStream ) const; MOAIRegion (); ~MOAIRegion (); + void Pad ( const MOAIRegion& region, float pad ); bool PointInside ( const ZLVec2D& p, float pad ) const; void Print () const; void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); - void ReservePolygons ( u32 size ); + ZLResultCode ReservePolygons ( size_t size ); + ZLResultCode ReserveVertices ( size_t idx, size_t size ); void ReverseWinding ( const MOAIRegion& region ); void SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ); void SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ); diff --git a/src/moai-sim/MOAIRenderMgr.cpp b/src/moai-sim/MOAIRenderMgr.cpp index c7423a9930..a3a1f3e60b 100644 --- a/src/moai-sim/MOAIRenderMgr.cpp +++ b/src/moai-sim/MOAIRenderMgr.cpp @@ -2,8 +2,8 @@ // http://getmoai.com #include "pch.h" -#include -#include +#include +#include #include //================================================================// @@ -26,8 +26,8 @@ int MOAIRenderMgr::_getBufferTable ( lua_State* L ) { */ int MOAIRenderMgr::_getPerformanceDrawCount ( lua_State* L ) { - MOAIRenderMgr& device = MOAIRenderMgr::Get (); - lua_pushnumber ( L, device.mLastDrawCount ); + MOAIRenderMgr& gfxMgr = MOAIRenderMgr::Get (); + lua_pushnumber ( L, gfxMgr.mLastDrawCount ); return 1; } @@ -44,8 +44,8 @@ int MOAIRenderMgr::_setBufferTable ( lua_State* L ) { // TODO: doxygen int MOAIRenderMgr::_getRenderCount ( lua_State* L ) { - MOAIRenderMgr& device = MOAIRenderMgr::Get (); - lua_pushnumber ( L, device.mRenderCounter ); + MOAIRenderMgr& gfxMgr = MOAIRenderMgr::Get (); + lua_pushnumber ( L, gfxMgr.mRenderCounter ); return 1; } @@ -178,25 +178,28 @@ void MOAIRenderMgr::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIRenderMgr::Render () { - zglBegin (); - - MOAIGfxResourceMgr::Get ().Update (); + ZLGfxDevice::Begin (); // Measure performance double startTime = ZLDeviceTime::GetTimeInSeconds (); + + //gfxMgr.ResetDrawCount (); + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - MOAIGfxDevice& device = MOAIGfxDevice::Get (); - device.ResetDrawCount (); + ZLGfx& gfx = gfxMgr.mPipelineMgr.SelectDrawingAPI ( MOAIGfxPipelineClerk::DRAWING_PIPELINE ); + + ZGL_COMMENT ( gfx, "RENDER MGR RENDER" ); if ( this->mBufferTable ) { MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); state.Push ( this->mBufferTable ); this->RenderTable ( state, -1 ); state.Pop ( 1 ); - } + } - device.GetDefaultFrameBuffer ()->Render (); - this->mLastDrawCount = MOAIGfxDevice::Get ().GetDrawCount (); + gfxMgr.mGfxState.GetDefaultFrameBuffer ()->Render (); + //this->mLastDrawCount = MOAIGfxMgr::Get ().GetDrawCount (); this->mRenderCounter++; // Measure performance @@ -206,7 +209,10 @@ void MOAIRenderMgr::Render () { this->mFrameBuffer = 0; - zglEnd (); + gfxMgr.mVertexCache.FlushBufferedPrims (); // TODO: need to do this here? + gfxMgr.mGfxState.UnbindAll (); + + ZLGfxDevice::End (); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIScriptDeck.cpp b/src/moai-sim/MOAIScriptDeck.cpp index 9be98a35fd..f2fdd003d2 100644 --- a/src/moai-sim/MOAIScriptDeck.cpp +++ b/src/moai-sim/MOAIScriptDeck.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include @@ -120,18 +120,14 @@ ZLBox MOAIScriptDeck::ComputeMaxBounds () { //----------------------------------------------------------------// void MOAIScriptDeck::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, ZLVec3D offset, ZLVec3D scale ) { - materials.LoadGfxState ( this, idx - 1, MOAIShaderMgr::LINE_SHADER ); + if ( !materials.LoadGfxState ( this, idx - 1, MOAIShaderMgr::LINE_SHADER )) return; if ( this->mOnDraw ) { MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); if ( this->mOnDraw.PushRef ( state )) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.BindBufferedDrawing ( MOAIVertexFormatMgr::XYZWC ); - - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); + MOAIDraw::Bind (); // TODO: fix this to take all offset/scale params lua_pushnumber ( state, idx ); diff --git a/src/moai-sim/MOAISelectionMesh.cpp b/src/moai-sim/MOAISelectionMesh.cpp index 1c26478bf0..65b099b075 100644 --- a/src/moai-sim/MOAISelectionMesh.cpp +++ b/src/moai-sim/MOAISelectionMesh.cpp @@ -3,8 +3,8 @@ #include "pch.h" #include -#include -#include +#include +#include #include #include #include @@ -21,15 +21,31 @@ //----------------------------------------------------------------// // TODO: doxygen int MOAISelectionMesh::_addSelection ( lua_State* L ) { - MOAI_LUA_SETUP ( MOAISelectionMesh, "UNNN" ) - - u32 set = state.GetValue < u32 >( 2, 1 ) - 1; - u32 base = state.GetValue < u32 >( 3, 1 ) - 1; - u32 top = state.GetValue < u32 >( 4, 1 ) - 1; + MOAI_LUA_SETUP ( MOAISelectionMesh, "UNN*" ) + + u32 set = 0; + u32 base = 0; + u32 top = 0; + + if ( state.IsType ( 4, LUA_TNUMBER )) { + set = state.GetValue < u32 >( 2, 1 ) - 1; + base = state.GetValue < u32 >( 3, 1 ) - 1; + top = state.GetValue < u32 >( 4, 1 ) - 1; + } + else { + + ZLResult < u32 > result = self->AffirmSpanSet (); + if ( result.mCode != ZL_OK ) return 0; + + set = result; + base = state.GetValue < u32 >( 2, 1 ) - 1; + top = state.GetValue < u32 >( 3, 1 ) - 1; + } + self->AddSelection ( set, base, top ); - - return 0; + state.Push ( set + 1 ); + return 1; } //----------------------------------------------------------------// @@ -39,7 +55,7 @@ int MOAISelectionMesh::_clearSelection ( lua_State* L ) { u32 set = state.GetValue < u32 >( 2, 1 ) - 1; - if ( state.CheckParams ( 3, "NN" )) { + if ( state.CheckParams ( 3, "NN", false )) { u32 base = state.GetValue < u32 >( 3, 1 ) - 1; u32 top = state.GetValue < u32 >( 4, 1 ) - 1; @@ -125,7 +141,7 @@ void MOAISelectionMesh::AddSelection ( u32 set, size_t base, size_t top ) { // of the new span will be clipped. // make sure the array of sets is big enough - this->mSets.Grow ( set + 1, 1, 0 ); + this->mSets.Grow ( set, 1, 0 ); // identify the previous span in both the master and set lists. // a span is only 'previous' if its base is entirely below the new span's base. @@ -156,7 +172,7 @@ void MOAISelectionMesh::AddSelection ( u32 set, size_t base, size_t top ) { if ( prevInMaster->mTop <= top ) { // previous span only overlaps the base of the new span. - // clip it to the base and inser the new span after it + // clip it to the base and insert the new span after it // or, if it matches the new span, extend it. if ( prevInMaster->mSetID == set ) { @@ -203,6 +219,23 @@ void MOAISelectionMesh::AddSelection ( u32 set, size_t base, size_t top ) { } } +//----------------------------------------------------------------// +ZLResult < u32 > MOAISelectionMesh::AffirmSpanSet () { + + size_t top = this->mSets.Size (); + + for ( size_t i = 0; i < top; ++i ) { + if ( !this->mSets [ i ]) { + ZL_RETURN_RESULT ( u32, ( u32 )i, ZL_OK ); + } + } + + if ( this->mSets.Grow ( top ) == ZL_OK ) { + ZL_RETURN_RESULT ( u32, ( u32 )top, ZL_OK ); + } + ZL_RETURN_RESULT ( u32, ( u32 )-1, ZL_ERROR ); +} + //----------------------------------------------------------------// MOAISelectionSpan* MOAISelectionMesh::AllocSpan ( u32 set, size_t base, size_t top ) { @@ -254,6 +287,15 @@ void MOAISelectionMesh::Clear () { //----------------------------------------------------------------// void MOAISelectionMesh::ClearSelection ( u32 set ) { + + MOAIMeshSpan* cursor = this->mSets [ set ]; + while ( cursor ) { + + MOAIMeshSpan* span = cursor; + cursor = cursor->mNext; + + this->FreeSpan (( MOAISelectionSpan* )span ); + } } //----------------------------------------------------------------// @@ -274,7 +316,6 @@ void MOAISelectionMesh::ClearSelection ( u32 set, size_t base, size_t top ) { } else { - while ( cursor && ( cursor->mBase < top )) { MOAISelectionSpan* span = cursor; @@ -427,8 +468,8 @@ void MOAISelectionMesh::MergeSelection ( u32 set, u32 merge ) { if ( cursor->mSetID == merge ) { - u32 base = cursor->mBase; - u32 top = cursor->mTop; + size_t base = cursor->mBase; + size_t top = cursor->mTop; this->FreeSpan ( cursor ); cursor = this->InsertSpan ( this->AllocSpan ( set, base, top ), 0, 0 ); @@ -447,8 +488,8 @@ void MOAISelectionMesh::MergeSelection ( u32 set, u32 merge ) { MOAISelectionSpan* prevInMaster = span->mPrevInMaster; - u32 base = span->mBase; - u32 top = span->mTop; + size_t base = span->mBase; + size_t top = span->mTop; this->FreeSpan ( span ); span = this->InsertSpan ( this->AllocSpan ( set, base, top ), prevInMaster, prevInSet ); diff --git a/src/moai-sim/MOAISelectionMesh.h b/src/moai-sim/MOAISelectionMesh.h index 62ec630a2b..2a3188f759 100644 --- a/src/moai-sim/MOAISelectionMesh.h +++ b/src/moai-sim/MOAISelectionMesh.h @@ -45,6 +45,7 @@ class MOAISelectionMesh : static int _setMesh ( lua_State* L ); //----------------------------------------------------------------// + ZLResult < u32 > AffirmSpanSet (); MOAISelectionSpan* AllocSpan ( u32 set, size_t base, size_t top ); // void BooleanAnd ( u32 set, u32 a, u32 b ); // void BooleanOr ( u32 set, u32 a, u32 b ); diff --git a/src/moai-sim/MOAIShader.cpp b/src/moai-sim/MOAIShader.cpp index 8f41ece09e..b5e5c752fb 100644 --- a/src/moai-sim/MOAIShader.cpp +++ b/src/moai-sim/MOAIShader.cpp @@ -4,7 +4,7 @@ #include "pch.h" #include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ MOAIShader* MOAIShader::AffirmShader ( MOAILuaState& state, int idx ) { shader = MOAIShaderMgr::Get ().GetShader ( state.GetValue < u32 >( idx, MOAIShaderMgr::UNKNOWN_SHADER )); } else { - shader = state.GetLuaObject < MOAIShader >( 2, true ); + shader = state.GetLuaObject < MOAIShader >( idx, true ); } return shader; } @@ -55,7 +55,7 @@ bool MOAIShader::ApplyAttrOp ( u32 attrID, MOAIAttrOp& attrOp, u32 op ) { return true; case MOAIAttrOp::SET: - this->mUniformBuffers [ attrID ].SetValue ( attrOp, true ); + this->mUniformBuffers [ attrID ].SetValue ( attrOp ); return true; case MOAIAttrOp::ADD: @@ -70,29 +70,6 @@ bool MOAIShader::ApplyAttrOp ( u32 attrID, MOAIAttrOp& attrOp, u32 op ) { return false; } -//----------------------------------------------------------------// -void MOAIShader::BindUniforms () { - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIShaderProgram* program = this->mProgram; - - if ( program ) { - - u32 nUniforms = program->mUniforms.Size (); - - for ( u32 i = 0; i < nUniforms; ++i ) { - MOAIShaderUniform& uniform = program->mUniforms [ i ]; - - if ( uniform.IsValid ()) { - if ( uniform.SetValue ( this->mUniformBuffers [ i ], true )) { - gfxDevice.FlushBufferedPrims (); - uniform.Bind (); - } - } - } - } -} - //----------------------------------------------------------------// MOAIShader::MOAIShader () { @@ -133,15 +110,35 @@ void MOAIShader::SetProgram ( MOAIShaderProgram* program ) { if ( program ) { - u32 nUniforms = program->mUniforms.Size (); + size_t nUniforms = program->mUniforms.Size (); this->mUniformBuffers.Init ( nUniforms ); - for ( u32 i = 0; i < nUniforms; ++i ) { - u32 type = program->mUniforms [ i ].GetType (); + for ( size_t i = 0; i < nUniforms; ++i ) { + MOAIShaderUniformBuffer& uniformBuffer = this->mUniformBuffers [ i ]; uniformBuffer.SetType ( program->mUniforms [ i ].GetType ()); - uniformBuffer.SetValue ( program->mUniformDefaults [ i ], false ); - + uniformBuffer.SetValue ( program->mDefaults [ i ]); } } } + +//----------------------------------------------------------------// +void MOAIShader::UpdateAndBindUniforms () { + + MOAIShaderProgram* program = this->mProgram; + + if ( program ) { + + size_t nUniforms = program->mUniforms.Size (); + + for ( size_t i = 0; i < nUniforms; ++i ) { + MOAIShaderUniform& uniform = program->mUniforms [ i ]; + if (( uniform.mFlags & MOAIShaderUniform::UNIFORM_FLAG_GLOBAL ) == 0 ) { + uniform.mFlags |= uniform.SetValue ( this->mUniformBuffers [ i ]); + } + } + + program->ApplyGlobals (); + program->BindUniforms (); + } +} diff --git a/src/moai-sim/MOAIShader.h b/src/moai-sim/MOAIShader.h index bdb77f61d7..14c4a75a43 100644 --- a/src/moai-sim/MOAIShader.h +++ b/src/moai-sim/MOAIShader.h @@ -9,18 +9,31 @@ //================================================================// // MOAIShader //================================================================// -// TODO: doxygen +/** @lua MOAIShader + @text This represents the "instance" of a shader program. Its purpose + is to enable sharing of a single program across multiple sets of + uniform values and to expose uniform values as MOAINode attributes. + + As uniform values change, they will "dirty" the underlying shader + program and cause its values to re-bind prior to drawing. If minimal + re-binds are desired, simply create one shader program per shader + instance. +*/ class MOAIShader : public virtual MOAINode { protected: - friend class MOAIGfxDevice; + friend class MOAIGfxStateCache; + friend class MOAIShaderProgram; MOAILuaSharedPtr < MOAIShaderProgram > mProgram; ZLLeanArray < MOAIShaderUniformBuffer > mUniformBuffers; //----------------------------------------------------------------// - static int _setProgram ( lua_State* L ); + static int _setProgram ( lua_State* L ); + + //----------------------------------------------------------------// + void UpdateAndBindUniforms (); public: @@ -31,7 +44,6 @@ class MOAIShader : //----------------------------------------------------------------// static MOAIShader* AffirmShader ( MOAILuaState& state, int idx ); bool ApplyAttrOp ( u32 attrID, MOAIAttrOp& attrOp, u32 op ); - void BindUniforms (); MOAIShader (); ~MOAIShader (); void RegisterLuaClass ( MOAILuaState& state ); diff --git a/src/moai-sim/MOAIShaderMgr.cpp b/src/moai-sim/MOAIShaderMgr.cpp index ec661324e0..39c7e8d493 100644 --- a/src/moai-sim/MOAIShaderMgr.cpp +++ b/src/moai-sim/MOAIShaderMgr.cpp @@ -2,7 +2,7 @@ // http://getmoai.com #include "pch.h" -#include +#include #include #include #include @@ -72,12 +72,11 @@ int MOAIShaderMgr::_getShader ( lua_State* L ) { //================================================================// //----------------------------------------------------------------// -void MOAIShaderMgr::BindShader ( u32 shaderID ) { +void MOAIShaderMgr::AffirmAll () { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - MOAIShader* shader = this->GetShader ( shaderID ); - gfxDevice.SetShader ( shader ); + for ( u32 i = 0; i < TOTAL_SHADERS; ++i ) { + this->GetShader ( i ); + } } //----------------------------------------------------------------// @@ -116,8 +115,8 @@ MOAIShaderProgram* MOAIShaderMgr::GetProgram ( u32 shaderID ) { program->DeclareUniform ( 1, "ySnap", MOAIShaderUniform::UNIFORM_FLOAT ); program->ReserveGlobals ( 2 ); - program->SetGlobal ( 0, 0, MOAIShaderProgram::GLOBAL_VIEW_HALF_WIDTH ); - program->SetGlobal ( 1, 1, MOAIShaderProgram::GLOBAL_VIEW_HALF_HEIGHT ); + program->SetGlobal ( 0, 0, MOAIGfxGlobalsCache::VIEW_HALF_WIDTH ); + program->SetGlobal ( 1, 1, MOAIGfxGlobalsCache::VIEW_HALF_HEIGHT ); break; @@ -149,8 +148,8 @@ MOAIShaderProgram* MOAIShaderMgr::GetProgram ( u32 shaderID ) { program->DeclareUniform ( 1, "ySnap", MOAIShaderUniform::UNIFORM_FLOAT ); program->ReserveGlobals ( 2 ); - program->SetGlobal ( 0, 0, MOAIShaderProgram::GLOBAL_VIEW_HALF_WIDTH ); - program->SetGlobal ( 1, 1, MOAIShaderProgram::GLOBAL_VIEW_HALF_HEIGHT ); + program->SetGlobal ( 0, 0, MOAIGfxGlobalsCache::VIEW_HALF_WIDTH ); + program->SetGlobal ( 1, 1, MOAIGfxGlobalsCache::VIEW_HALF_HEIGHT ); break; @@ -189,8 +188,8 @@ MOAIShaderProgram* MOAIShaderMgr::GetProgram ( u32 shaderID ) { program->DeclareUniform ( 1, "ucolor", MOAIShaderUniform::UNIFORM_VECTOR_F4 ); program->ReserveGlobals ( 2 ); - program->SetGlobal ( 0, 0, MOAIShaderProgram::GLOBAL_WORLD_VIEW_PROJ ); - program->SetGlobal ( 1, 1, MOAIShaderProgram::GLOBAL_PEN_COLOR ); + program->SetGlobal ( 0, 0, MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX ); + program->SetGlobal ( 1, 1, MOAIGfxGlobalsCache::PEN_COLOR ); break; @@ -206,8 +205,8 @@ MOAIShaderProgram* MOAIShaderMgr::GetProgram ( u32 shaderID ) { program->DeclareUniform ( 1, "ucolor", MOAIShaderUniform::UNIFORM_VECTOR_F4 ); program->ReserveGlobals ( 2 ); - program->SetGlobal ( 0, 0, MOAIShaderProgram::GLOBAL_WORLD_VIEW_PROJ ); - program->SetGlobal ( 1, 1, MOAIShaderProgram::GLOBAL_PEN_COLOR ); + program->SetGlobal ( 0, 0, MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX ); + program->SetGlobal ( 1, 1, MOAIGfxGlobalsCache::PEN_COLOR ); break; } diff --git a/src/moai-sim/MOAIShaderMgr.h b/src/moai-sim/MOAIShaderMgr.h index 28647a107d..797249f35a 100644 --- a/src/moai-sim/MOAIShaderMgr.h +++ b/src/moai-sim/MOAIShaderMgr.h @@ -38,9 +38,10 @@ class MOAIShaderMgr : LINE_SHADER_3D, MESH_SHADER, TOTAL_SHADERS, - UNKNOWN_SHADER = 0xffffffff, }; + static const u32 UNKNOWN_SHADER = 0xffffffff; + private: MOAIShaderProgram* mPrograms [ TOTAL_SHADERS ]; @@ -55,7 +56,7 @@ class MOAIShaderMgr : DECL_LUA_SINGLETON ( MOAIShaderMgr ) //----------------------------------------------------------------// - void BindShader ( u32 shaderID ); + void AffirmAll (); MOAIShaderProgram* GetProgram ( u32 shaderID ); MOAIShader* GetShader ( u32 shaderID ); MOAIShaderMgr (); diff --git a/src/moai-sim/MOAIShaderProgram.cpp b/src/moai-sim/MOAIShaderProgram.cpp index d53c9a8b44..a966bdb0ad 100644 --- a/src/moai-sim/MOAIShaderProgram.cpp +++ b/src/moai-sim/MOAIShaderProgram.cpp @@ -4,8 +4,8 @@ #include "pch.h" #include #include -#include -#include +#include +#include #include #include @@ -178,7 +178,7 @@ int MOAIShaderProgram::_setGlobal ( lua_State* L ) { u32 idx = state.GetValue < u32 >( 2, 1 ) - 1; u32 uniformID = state.GetValue < u32 >( 3, 1 ) - 1; - u32 globalID = state.GetValue < u32 >( 4, GLOBAL_NONE ); + u32 globalID = state.GetValue < u32 >( 4, INVALID_INDEX ); self->SetGlobal ( idx, uniformID, globalID ); @@ -209,6 +209,91 @@ int MOAIShaderProgram::_setVertexAttribute ( lua_State* L ) { // MOAIShaderProgram //================================================================// +//----------------------------------------------------------------// +void MOAIShaderProgram::ApplyGlobals () { + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + ZLRect viewRect = gfxMgr.mGfxState.GetViewRect (); + + // NOTE: matrices are submitted transposed; it is up to the shader to transform vertices correctly + // vert * matrix implicitely transposes the matrix; martix * vert uses the matrix as submitted + + for ( u32 i = 0; i < this->mGlobals.Size (); ++i ) { + + const MOAIShaderProgramGlobal& global = this->mGlobals [ i ]; + + if ( global.mUniformID == INVALID_INDEX ) continue; + + MOAIShaderUniform& uniform = this->mUniforms [ global.mUniformID ]; + + switch ( global.mGlobalID ) { + + case MOAIGfxGlobalsCache::VIEW_PROJ_MTX: + case MOAIGfxGlobalsCache::WORLD_MTX: + case MOAIGfxGlobalsCache::INVERSE_WORLD_MTX: + case MOAIGfxGlobalsCache::WORLD_VIEW_MTX: + case MOAIGfxGlobalsCache::INVERSE_WORLD_VIEW_MTX: + case MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX: + + uniform.mFlags |= uniform.SetValue ( gfxMgr.mGfxState.GetMtx ( global.mGlobalID )); + break; + + case MOAIGfxGlobalsCache::PEN_COLOR: + + uniform.mFlags |= uniform.SetValue ( gfxMgr.mGfxState.GetFinalColor ()); + break; + + case MOAIGfxGlobalsCache::VIEW_HALF_HEIGHT: + + uniform.mFlags |= uniform.SetValue ( viewRect.Height () * 0.5f ); + break; + + case MOAIGfxGlobalsCache::VIEW_HALF_WIDTH: { + + uniform.mFlags |= uniform.SetValue ( viewRect.Width () * 0.5f ); + break; + } + case MOAIGfxGlobalsCache::VIEW_HEIGHT: + + uniform.mFlags |= uniform.SetValue ( viewRect.Height ()); + break; + + case MOAIGfxGlobalsCache::VIEW_WIDTH: + + uniform.mFlags |= uniform.SetValue ( viewRect.Width ()); + break; + } + } +} + +//----------------------------------------------------------------// +void MOAIShaderProgram::BindUniforms () { + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + bool flushed = false; + + for ( u32 i = 0; i < this->mUniforms.Size (); ++i ) { + MOAIShaderUniform& uniform = this->mUniforms [ i ]; + + if ( uniform.IsValid () && ( uniform.mFlags & MOAIShaderUniform::UNIFORM_FLAG_DIRTY )) { + if ( !flushed ) { + gfxMgr.mGfxState.GfxStateWillChange (); + flushed = true; + } + uniform.Bind (); + } + } + + // in multi-threaded gfx mode, drawing frames may get dropped. for this reason, we + // only clear the dirty flag once we're sure a draw frame has been completed. + if ( flushed ) { + ZLGfx& gfx = gfxMgr.GetDrawingAPI (); + gfx.Event ( this, GFX_EVENT_UPDATED_UNIFORMS, 0 ); + } +} + //----------------------------------------------------------------// void MOAIShaderProgram::Clear () { @@ -231,35 +316,33 @@ void MOAIShaderProgram::ClearUniform ( u32 idx ) { } //----------------------------------------------------------------// -u32 MOAIShaderProgram::CompileShader ( u32 type, cc8* source ) { +ZLGfxHandle* MOAIShaderProgram::CompileShader ( u32 type, cc8* source ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + ZLGfx& gfx = gfxMgr.GetDrawingAPI (); - u32 shader = zglCreateShader ( type ); + ZLGfxHandle* shader = gfx.CreateShader ( type ); - cc8* sources [ 3 ]; + STLString buffer; - sources [ 0 ] = gfxDevice.IsOpenGLES () ? OPENGL_ES_PREPROC : OPENGL_PREPROC; - if ((type == ZGL_SHADER_TYPE_FRAGMENT) && gfxDevice.IsOpenGLES() ) { - sources [ 1 ] = WEBGL_PREPROC; - } else { - sources [ 1 ] = " "; + buffer.append ( gfxMgr.IsOpenGLES () ? OPENGL_ES_PREPROC : OPENGL_PREPROC ); + if (( type == ZGL_SHADER_TYPE_FRAGMENT ) && gfxMgr.IsOpenGLES ()) { + buffer.append ( WEBGL_PREPROC ); } - sources [ 2 ] = source; + buffer.append ( source ); - zglShaderSource ( shader, 3, sources, NULL ); - zglCompileShader ( shader ); + gfx.PushSection (); - s32 status; - zglGetShaderiv ( shader, ZGL_SHADER_INFO_COMPILE_STATUS, &status ); + gfx.ShaderSource ( shader, buffer.c_str (), buffer.size ()); + gfx.CompileShader ( shader, true ); - if ( status == 0 ) { - this->PrintShaderLog ( shader ); - zglDeleteShader ( shader ); - return 0; + if ( gfx.PushErrorHandler ()) { + gfx.Delete ( shader ); } + gfx.PopSection (); + return shader; } @@ -274,7 +357,7 @@ void MOAIShaderProgram::DeclareUniform ( u32 idx, cc8* name, u32 type ) { uniform.mName = name; uniform.SetType ( type ); - MOAIShaderUniformBuffer& uniformDefault = this->mUniformDefaults [ idx ]; + MOAIShaderUniformBuffer& uniformDefault = this->mDefaults [ idx ]; uniformDefault.SetType ( type ); uniformDefault.Default (); } @@ -285,7 +368,7 @@ void MOAIShaderProgram::DeclareUniform ( u32 idx, cc8* name, u32 type, float val if ( idx < this->mUniforms.Size ()) { this->DeclareUniform ( idx, name, type ); - this->mUniformDefaults [ idx ].SetValue ( value ); + this->mDefaults [ idx ].SetValue ( value ); } } @@ -294,29 +377,28 @@ void MOAIShaderProgram::DeclareUniform ( u32 idx, cc8* name, u32 type, int value if ( idx < this->mUniforms.Size ()) { this->DeclareUniform ( idx, name, type ); - this->mUniformDefaults [ idx ].SetValue ( value ); + this->mDefaults [ idx ].SetValue ( value ); } } //----------------------------------------------------------------// -u32 MOAIShaderProgram::GetLoadingPolicy () { +u32 MOAIShaderProgram::GetGlobalsMask () { - return MOAIGfxResource::LOADING_POLICY_CPU_GPU_BIND; -} - -//----------------------------------------------------------------// -bool MOAIShaderProgram::LoadGfxState () { - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - gfxDevice.SetShader ( this ); - return true; + if ( this->mGlobals.Size () && !this->mGlobalsMask ) { + for ( u32 i = 0; i < this->mGlobals.Size (); ++i ) { + const MOAIShaderProgramGlobal& global = this->mGlobals [ i ]; + this->mGlobalsMask |= MOAIGfxGlobalsCache::GetAttrFlagForID ( global.mGlobalID ); + } + } + return this->mGlobalsMask; } //----------------------------------------------------------------// MOAIShaderProgram::MOAIShaderProgram () : mProgram ( 0 ), mVertexShader ( 0 ), - mFragmentShader ( 0 ) { + mFragmentShader ( 0 ), + mGlobalsMask ( 0 ) { RTTI_BEGIN RTTI_EXTEND ( MOAIGfxResource ) @@ -339,66 +421,69 @@ bool MOAIShaderProgram::OnCPUCreate () { void MOAIShaderProgram::OnCPUDestroy () { } +//----------------------------------------------------------------// +void MOAIShaderProgram::OnGfxEvent ( u32 event, void* userdata ) { + + if ( event == GFX_EVENT_UPDATED_UNIFORMS ) { + + // getting this event proves that the draw frame was completed. so now + // it's safe to clear the dirty flag. + + for ( u32 i = 0; i < this->mUniforms.Size (); ++i ) { + this->mUniforms [ i ].mFlags &= ~MOAIShaderUniform::UNIFORM_FLAG_DIRTY; + } + } + + MOAIGfxResource::OnGfxEvent ( event, userdata ); +} + //----------------------------------------------------------------// void MOAIShaderProgram::OnGPUBind () { // use shader program. - zglUseProgram ( this->mProgram ); - - // reload the uniform values - //for ( u32 i = 0; i < this->mUniforms.Size (); ++i ) { - // this->mUniforms [ i ].Bind (); - //} + MOAIGfxMgr::GetDrawingAPI ().UseProgram ( this->mProgram ); } //----------------------------------------------------------------// bool MOAIShaderProgram::OnGPUCreate () { + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + this->mVertexShader = this->CompileShader ( ZGL_SHADER_TYPE_VERTEX, this->mVertexShaderSource ); this->mFragmentShader = this->CompileShader ( ZGL_SHADER_TYPE_FRAGMENT, this->mFragmentShaderSource ); - this->mProgram = zglCreateProgram (); + this->mProgram = gfx.CreateProgram (); if ( !( this->mVertexShader && this->mFragmentShader && this->mProgram )) { this->Clear (); return false; } - zglAttachShader ( this->mProgram, this->mVertexShader ); - zglAttachShader ( this->mProgram, this->mFragmentShader ); + gfx.AttachShader ( this->mProgram, this->mVertexShader ); + gfx.AttachShader ( this->mProgram, this->mFragmentShader ); // bind attribute locations. // this needs to be done prior to linking. AttributeMapIt attrMapIt = this->mAttributeMap.begin (); for ( ; attrMapIt != this->mAttributeMap.end (); ++attrMapIt ) { - zglBindAttribLocation ( this->mProgram, attrMapIt->first, attrMapIt->second.str ()); + gfx.BindAttribLocation ( this->mProgram, attrMapIt->first, attrMapIt->second.str ()); } - // link program. - zglLinkProgram ( this->mProgram ); - - s32 status; - zglGetProgramiv ( this->mProgram, ZGL_PROGRAM_INFO_LINK_STATUS, &status ); - - if ( status == 0 ) { - this->PrintProgramLog ( this->mProgram ); - this->Clear (); - return false; - } + gfx.LinkProgram ( this->mProgram, true ); // get the uniform locations and clear out the names (no longer needed) for ( u32 i = 0; i < this->mUniforms.Size (); ++i ) { MOAIShaderUniform& uniform = this->mUniforms [ i ]; if ( uniform.mType != MOAIShaderUniform::UNIFORM_NONE ) { - uniform.mAddr = zglGetUniformLocation ( this->mProgram, uniform.mName ); + gfx.GetUniformLocation ( this->mProgram, uniform.mName, this, ( void* )(( size_t )i )); // TODO: cast? uniform.ClearValue (); } } - zglDeleteShader ( this->mVertexShader ); + gfx.Delete ( this->mVertexShader ); this->mVertexShader = 0; - zglDeleteShader ( this->mFragmentShader ); + gfx.Delete ( this->mFragmentShader ); this->mFragmentShader = 0; //AJV TODO - does the attribute map ever need to be cleared? @@ -408,57 +493,32 @@ bool MOAIShaderProgram::OnGPUCreate () { } //----------------------------------------------------------------// -void MOAIShaderProgram::OnGPUDestroy () { - - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_SHADER, this->mVertexShader ); - this->mVertexShader = 0; - - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_SHADER, this->mFragmentShader ); - this->mFragmentShader = 0; - - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_SHADER, this->mProgram ); - this->mProgram = 0; -} - -//----------------------------------------------------------------// -void MOAIShaderProgram::OnGPULost () { +void MOAIShaderProgram::OnGPUDeleteOrDiscard ( bool shouldDelete ) { - this->mVertexShader = 0; - this->mFragmentShader = 0; - this->mProgram = 0; + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mVertexShader, shouldDelete ); + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mFragmentShader, shouldDelete ); + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mProgram, shouldDelete ); } //----------------------------------------------------------------// void MOAIShaderProgram::OnGPUUnbind () { - zglUseProgram ( 0 ); + MOAIGfxMgr::GetDrawingAPI ().UseProgram ( 0 ); } //----------------------------------------------------------------// -void MOAIShaderProgram::PrintShaderLog ( u32 shader ) { - - s32 logLength; - zglGetShaderiv ( shader, ZGL_SHADER_INFO_LOG_LENGTH, &logLength ); +bool MOAIShaderProgram::OnGPUUpdate () { - if ( logLength > 1 ) { - char* log = ( char* )malloc ( logLength ); - zglGetShaderInfoLog ( shader, logLength, ( u32* )&logLength, log ); - MOAILogF ( 0, ZLLog::LOG_ERROR, MOAILogMessages::MOAIShader_ShaderInfoLog_S, log ); - free ( log ); - } + return true; } //----------------------------------------------------------------// -void MOAIShaderProgram::PrintProgramLog ( u32 program ) { - - s32 logLength; - zglGetProgramiv ( program, ZGL_SHADER_INFO_LOG_LENGTH, &logLength ); +void MOAIShaderProgram::OnUniformLocation ( u32 addr, void* userdata ) { - if ( logLength > 1 ) { - char* log = ( char* )malloc ( logLength ); - zglGetProgramInfoLog ( program, logLength, ( u32* )&logLength, log ); - MOAILogF ( 0, ZLLog::LOG_ERROR, MOAILogMessages::MOAIShader_ShaderInfoLog_S, log ); - free ( log ); + size_t i = ( size_t )userdata; + + if ( i < this->mUniforms.Size ()) { + this->mUniforms [ i ].mAddr = addr; } } @@ -474,16 +534,18 @@ void MOAIShaderProgram::RegisterLuaClass ( MOAILuaState& state ) { state.SetField ( -1, "UNIFORM_MATRIX_F4", ( u32 )MOAIShaderUniform::UNIFORM_MATRIX_F4 ); state.SetField ( -1, "UNIFORM_VECTOR_F4", ( u32 )MOAIShaderUniform::UNIFORM_VECTOR_F4 ); - state.SetField ( -1, "GLOBAL_NONE", ( u32 )GLOBAL_NONE ); - state.SetField ( -1, "GLOBAL_PEN_COLOR", ( u32 )GLOBAL_PEN_COLOR ); - state.SetField ( -1, "GLOBAL_VIEW_PROJ", ( u32 )GLOBAL_VIEW_PROJ ); - state.SetField ( -1, "GLOBAL_VIEW_WIDTH", ( u32 )GLOBAL_VIEW_WIDTH ); - state.SetField ( -1, "GLOBAL_VIEW_HEIGHT", ( u32 )GLOBAL_VIEW_HEIGHT ); - state.SetField ( -1, "GLOBAL_WORLD", ( u32 )GLOBAL_WORLD ); - state.SetField ( -1, "GLOBAL_WORLD_INVERSE", ( u32 )GLOBAL_WORLD_INVERSE ); - state.SetField ( -1, "GLOBAL_WORLD_VIEW", ( u32 )GLOBAL_WORLD_VIEW ); - state.SetField ( -1, "GLOBAL_WORLD_VIEW_INVERSE", ( u32 )GLOBAL_WORLD_VIEW_INVERSE ); - state.SetField ( -1, "GLOBAL_WORLD_VIEW_PROJ", ( u32 )GLOBAL_WORLD_VIEW_PROJ ); + state.SetField ( -1, "GLOBAL_WORLD_INVERSE", ( u32 )MOAIGfxGlobalsCache::INVERSE_WORLD_MTX ); + state.SetField ( -1, "GLOBAL_WORLD_VIEW_INVERSE", ( u32 )MOAIGfxGlobalsCache::INVERSE_WORLD_VIEW_MTX ); + + state.SetField ( -1, "GLOBAL_VIEW_PROJ", ( u32 )MOAIGfxGlobalsCache::VIEW_PROJ_MTX ); + state.SetField ( -1, "GLOBAL_WORLD", ( u32 )MOAIGfxGlobalsCache::WORLD_MTX ); + state.SetField ( -1, "GLOBAL_WORLD_VIEW", ( u32 )MOAIGfxGlobalsCache::WORLD_VIEW_MTX ); + state.SetField ( -1, "GLOBAL_WORLD_VIEW_PROJ", ( u32 )MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX ); + + state.SetField ( -1, "GLOBAL_PEN_COLOR", ( u32 )MOAIGfxGlobalsCache::PEN_COLOR ); + + state.SetField ( -1, "GLOBAL_VIEW_HEIGHT", ( u32 )MOAIGfxGlobalsCache::VIEW_HEIGHT ); + state.SetField ( -1, "GLOBAL_VIEW_WIDTH", ( u32 )MOAIGfxGlobalsCache::VIEW_WIDTH ); } //----------------------------------------------------------------// @@ -510,21 +572,59 @@ void MOAIShaderProgram::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIShaderProgram::ReserveGlobals ( u32 nGlobals ) { + // clear out the old globals (if any) + for ( size_t i = 0; i < this->mGlobals.Size (); ++i ) { + this->SetGlobal (( u32 )i, INVALID_INDEX, INVALID_INDEX ); // TODO: cast + } + this->mGlobals.Init ( nGlobals ); + + for ( size_t i = 0; i < nGlobals; ++i ) { + this->mGlobals [ i ].mUniformID = INVALID_INDEX; + this->mGlobals [ i ].mGlobalID = INVALID_INDEX; + } } //----------------------------------------------------------------// void MOAIShaderProgram::ReserveUniforms ( u32 nUniforms ) { this->mUniforms.Init ( nUniforms ); - this->mUniformDefaults.Init ( nUniforms ); + this->mDefaults.Init ( nUniforms ); } //----------------------------------------------------------------// void MOAIShaderProgram::SetGlobal ( u32 idx, u32 uniformID, u32 globalID ) { + MOAIShaderProgramGlobal& global = this->mGlobals [ idx ]; + + // clear out the old flag (if any ) + if ( global.mUniformID != INVALID_INDEX ) { + this->mUniforms [ global.mUniformID ].mFlags &= ~MOAIShaderUniform::UNIFORM_FLAG_GLOBAL; + } + + uniformID = globalID == INVALID_INDEX ? INVALID_INDEX : uniformID; + + if ( uniformID != INVALID_INDEX ) { + + // if the uniform is already pointed at a global, clear that global + if ( this->mUniforms [ uniformID ].mFlags & MOAIShaderUniform::UNIFORM_FLAG_GLOBAL ) { + + for ( size_t i = 0; i < this->mGlobals.Size (); ++i ) { + if ( this->mGlobals [ i ].mUniformID == uniformID ) { + this->mGlobals [ i ].mUniformID = INVALID_INDEX; + this->mGlobals [ i ].mGlobalID = INVALID_INDEX; + } + } + } + + // set the global flag + this->mUniforms [ uniformID ].mFlags |= MOAIShaderUniform::UNIFORM_FLAG_GLOBAL; + } + this->mGlobals [ idx ].mUniformID = uniformID; this->mGlobals [ idx ].mGlobalID = globalID; + + this->mGlobalsMask = 0; } //----------------------------------------------------------------// @@ -544,140 +644,3 @@ void MOAIShaderProgram::SetVertexAttribute ( u32 idx, cc8* attribute ) { this->mAttributeMap [ idx ] = attribute; } } - -//----------------------------------------------------------------// -void MOAIShaderProgram::UpdateGlobals () { - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - const ZLMatrix4x4& world = gfxDevice.mVertexTransforms [ MOAIGfxDevice::VTX_WORLD_TRANSFORM ]; - const ZLMatrix4x4& view = gfxDevice.mVertexTransforms [ MOAIGfxDevice::VTX_VIEW_TRANSFORM ]; - const ZLMatrix4x4& proj = gfxDevice.mVertexTransforms [ MOAIGfxDevice::VTX_PROJ_TRANSFORM ]; - - // TODO: all these need to be cached in the gfx state instead of recomputed every single time - // TODO: should check against the cached values in the shader to see if the uniforms need to be re-uploaded - - // NOTE: matrices are submitted transposed; it is up to the shader to transform vertices correctly - // vert * matrix implicitely transposes the matrix; martix * vert uses the matrix as submitted - - for ( u32 i = 0; i < this->mGlobals.Size (); ++i ) { - - const MOAIShaderProgramGlobal& global = this->mGlobals [ i ]; - MOAIShaderUniform& uniform = this->mUniforms [ global.mUniformID ]; - - switch ( global.mGlobalID ) { - - case GLOBAL_PEN_COLOR: { - if ( uniform.SetValue ( gfxDevice.mFinalColor, true )) { - uniform.Bind (); - } - break; - } - case GLOBAL_VIEW_PROJ: { - - ZLMatrix4x4 mtx = view; - mtx.Append ( proj ); - - if ( uniform.SetValue ( mtx, true )) { - uniform.Bind (); - } - break; - } - case GLOBAL_VIEW_WIDTH: { - if ( uniform.SetValue ( gfxDevice.mViewRect.Width ())) { - uniform.Bind (); - } - break; - } - case GLOBAL_VIEW_HEIGHT: { - if ( uniform.SetValue ( gfxDevice.mViewRect.Height ())) { - uniform.Bind (); - } - break; - } - case GLOBAL_VIEW_HALF_WIDTH: { - if ( uniform.SetValue ( gfxDevice.mViewRect.Width () * 0.5f )) { - uniform.Bind (); - } - break; - } - case GLOBAL_VIEW_HALF_HEIGHT: { - if ( uniform.SetValue ( gfxDevice.mViewRect.Height () * 0.5f )) { - uniform.Bind (); - } - break; - } - case GLOBAL_WORLD: { - if ( uniform.SetValue ( world, true )) { - uniform.Bind (); - } - break; - } - case GLOBAL_WORLD_INVERSE: { - - ZLMatrix4x4 mtx = world; - mtx.Inverse (); - - if ( uniform.SetValue ( mtx, true )) { - uniform.Bind (); - } - break; - } - case GLOBAL_WORLD_VIEW: { - - ZLMatrix4x4 mtx = world; - mtx.Append ( view ); - - if ( uniform.SetValue ( mtx, true )) { - uniform.Bind (); - } - break; - } - case GLOBAL_WORLD_VIEW_INVERSE: { - - ZLMatrix4x4 mtx = world; - mtx.Append ( view ); - mtx.Inverse (); - - if ( uniform.SetValue ( mtx, true )) { - uniform.Bind (); - } - break; - } - case GLOBAL_WORLD_VIEW_PROJ: { - - ZLMatrix4x4 mtx = world; - mtx.Append ( view ); - mtx.Append ( proj ); - - if ( uniform.SetValue ( mtx, true )) { - uniform.Bind (); - } - break; - } - } - } -} - -//----------------------------------------------------------------// -bool MOAIShaderProgram::Validate () { - - s32 logLength; - - zglValidateProgram ( this->mProgram ); - zglGetProgramiv ( this->mProgram, ZGL_PROGRAM_INFO_LOG_LENGTH, &logLength ); - - if ( logLength > 0 ) { - char* log = ( char* )malloc ( logLength ); - zglGetProgramInfoLog ( this->mProgram, logLength, ( u32* )&logLength, log ); - MOAILogF ( 0, MOAILogMessages::MOAIShader_ShaderInfoLog_S, log ); - free ( log ); - } - - s32 status; - zglGetProgramiv ( this->mProgram, ZGL_PROGRAM_INFO_VALIDATE_STATUS, &status ); - if ( status == 0 ) { - return false; - } - return true; -} diff --git a/src/moai-sim/MOAIShaderProgram.h b/src/moai-sim/MOAIShaderProgram.h index 3c8e73777f..161e312356 100644 --- a/src/moai-sim/MOAIShaderProgram.h +++ b/src/moai-sim/MOAIShaderProgram.h @@ -8,10 +8,12 @@ #include #include -#define OPENGL_PREPROC "#define LOWP\n #define MEDP\n" -#define OPENGL_ES_PREPROC "#define LOWP lowp\n #define MEDP mediump\n" +#define OPENGL_PREPROC "#define LOWP\n #define MEDP\n #define HIGHP\n" +#define OPENGL_ES_PREPROC "#define LOWP lowp\n #define MEDP mediump\n #define HIGHP highp\n" #define WEBGL_PREPROC "precision mediump int;\n precision mediump float;\n" +class MOAIShader; + //================================================================// // MOAIShaderProgramGlobal //================================================================// @@ -28,45 +30,56 @@ class MOAIShaderProgramGlobal { // MOAIShaderProgram //================================================================// /** @lua MOAIShaderProgram - @text Programmable shader class. + @text Programmable shader class. This represents the shader + program itself, which may be shared by one or more + MOAIShader instances. The shader program holds the graphics + resource, and the shader instances apply the (non-global) + uniform values. - @const UNIFORM_COLOR @const UNIFORM_FLOAT + @const UNIFORM_INDEX @const UNIFORM_INT - @const UNIFORM_NORMAL - @const UNIFORM_PEN_COLOR - @const UNIFORM_SAMPLER - @const UNIFORM_TRANSFORM - @const UNIFORM_VIEW_PROJ - @const UNIFORM_VIEW_WIDTH - @const UNIFORM_VIEW_HEIGHT - @const UNIFORM_VIEW_HALF_WIDTH - @const UNIFORM_VIEW_HALF_HEIGHT - @const UNIFORM_WORLD - @const UNIFORM_WORLD_VIEW - @const UNIFORM_WORLD_VIEW_PROJ + @const UNIFORM_MATRIX_F3 + @const UNIFORM_MATRIX_F4 + @const UNIFORM_VECTOR_F4 + + @const GLOBAL_VIEW_PROJ + @const GLOBAL_VIEW_PROJ + @const GLOBAL_VIEW_WIDTH + @const GLOBAL_VIEW_HEIGHT + @const GLOBAL_WORLD + @const GLOBAL_WORLD_INVERSE + @const GLOBAL_WORLD_VIEW + @const GLOBAL_WORLD_VIEW_INVERSE + @const GLOBAL_WORLD_VIEW_PROJ */ class MOAIShaderProgram : public MOAIGfxResource { protected: friend class MOAIShader; - // friend class MOAIShaderProgram; + friend class MOAIGfxMgr; + + enum { + GFX_EVENT_UPDATED_UNIFORMS = GFX_EVENT_TOTAL, + }; STLString mVertexShaderSource; STLString mFragmentShaderSource; - u32 mProgram; - u32 mVertexShader; - u32 mFragmentShader; + ZLGfxHandle* mProgram; + ZLGfxHandle* mVertexShader; + ZLGfxHandle* mFragmentShader; typedef STLMap < u32, STLString >::iterator AttributeMapIt; STLMap < u32, STLString > mAttributeMap; - ZLLeanArray < MOAIShaderUniform > mUniforms; - ZLLeanArray < MOAIShaderUniformBuffer > mUniformDefaults; + ZLLeanArray < MOAIShaderUniform > mUniforms; // these are the actual uniforms + ZLLeanArray < MOAIShaderUniformBuffer > mDefaults; ZLLeanArray < MOAIShaderProgramGlobal > mGlobals; + u32 mGlobalsMask; + //----------------------------------------------------------------// static int _clearUniform ( lua_State* L ); static int _declareUniform ( lua_State* L ); @@ -80,37 +93,36 @@ class MOAIShaderProgram : static int _setVertexAttribute ( lua_State* L ); //----------------------------------------------------------------// - u32 CompileShader ( u32 type, cc8* source ); - u32 GetLoadingPolicy (); - void PrintProgramLog ( u32 program ); - void PrintShaderLog ( u32 shader ); + void ApplyGlobals (); + void BindUniforms (); + ZLGfxHandle* CompileShader ( u32 type, cc8* source ); bool OnCPUCreate (); void OnCPUDestroy (); + void OnGfxEvent ( u32 event, void* userdata ); void OnGPUBind (); bool OnGPUCreate (); - void OnGPUDestroy (); - void OnGPULost (); + void OnGPUDeleteOrDiscard ( bool shouldDelete ); void OnGPUUnbind (); - bool Validate (); - + bool OnGPUUpdate (); + void OnUniformLocation ( u32 addr, void* userdata ); + public: DECL_LUA_FACTORY ( MOAIShaderProgram ) - enum { - GLOBAL_NONE, - GLOBAL_PEN_COLOR, - GLOBAL_VIEW_PROJ, - GLOBAL_VIEW_WIDTH, - GLOBAL_VIEW_HEIGHT, - GLOBAL_VIEW_HALF_WIDTH, - GLOBAL_VIEW_HALF_HEIGHT, - GLOBAL_WORLD, - GLOBAL_WORLD_INVERSE, - GLOBAL_WORLD_VIEW, - GLOBAL_WORLD_VIEW_INVERSE, - GLOBAL_WORLD_VIEW_PROJ, - }; +// enum { +// GLOBAL_PEN_COLOR, +// GLOBAL_VIEW_PROJ, +// GLOBAL_VIEW_WIDTH, +// GLOBAL_VIEW_HEIGHT, +// GLOBAL_VIEW_HALF_WIDTH, +// GLOBAL_VIEW_HALF_HEIGHT, +// GLOBAL_WORLD, +// GLOBAL_WORLD_INVERSE, +// GLOBAL_WORLD_VIEW, +// GLOBAL_WORLD_VIEW_INVERSE, +// GLOBAL_WORLD_VIEW_PROJ, +// }; //----------------------------------------------------------------// void Clear (); @@ -120,8 +132,7 @@ class MOAIShaderProgram : void DeclareUniform ( u32 idx, cc8* name, u32 type ); void DeclareUniform ( u32 idx, cc8* name, u32 type, float value ); void DeclareUniform ( u32 idx, cc8* name, u32 type, int value ); - bool IsValid (); - bool LoadGfxState (); + u32 GetGlobalsMask (); MOAIShaderProgram (); ~MOAIShaderProgram (); void RegisterLuaClass ( MOAILuaState& state ); @@ -132,7 +143,6 @@ class MOAIShaderProgram : void SetGlobal ( u32 idx, u32 uniformID, u32 globalID ); void SetSource ( cc8* vshSource, cc8* fshSource ); void SetVertexAttribute ( u32 idx, cc8* attribute ); - void UpdateGlobals (); }; #endif diff --git a/src/moai-sim/MOAIShaderUniform.cpp b/src/moai-sim/MOAIShaderUniform.cpp index 18143efa61..44c11758b5 100644 --- a/src/moai-sim/MOAIShaderUniform.cpp +++ b/src/moai-sim/MOAIShaderUniform.cpp @@ -3,6 +3,7 @@ #include "pch.h" #include +#include #include //================================================================// @@ -60,13 +61,13 @@ void MOAIShaderUniformBuffer::Default () { case MOAIShaderUniformBuffer::UNIFORM_MATRIX_F3: { ZLMatrix3x3 mtx; mtx.Ident (); - this->SetValue ( mtx, false ); + this->SetValue ( mtx ); break; } case MOAIShaderUniformBuffer::UNIFORM_MATRIX_F4: { ZLMatrix4x4 mtx; mtx.Ident (); - this->SetValue ( mtx, false ); + this->SetValue ( mtx ); break; } default: { @@ -122,14 +123,11 @@ void MOAIShaderUniformBuffer::GetValue ( MOAIAttrOp& attrOp ) { } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetBuffer ( void* buffer, size_t size, bool check ) { - - if ( check ) { - if ( memcmp ( this->mBuffer, buffer, size ) == 0 ) return false; - } +u32 MOAIShaderUniformBuffer::SetBuffer ( void* buffer, size_t size ) { + if ( memcmp ( this->mBuffer, buffer, size ) == 0 ) return 0; memcpy ( this->mBuffer, buffer, size ); - return true; + return MOAIShaderUniform::UNIFORM_FLAG_DIRTY; } //----------------------------------------------------------------// @@ -163,30 +161,30 @@ void MOAIShaderUniformBuffer::SetType ( u32 type ) { } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( float value ) { +u32 MOAIShaderUniformBuffer::SetValue ( float value ) { - bool check = this->mFloat != value; + u32 flags = this->mFloat != value ? MOAIShaderUniform::UNIFORM_FLAG_DIRTY : 0; this->mFloat = value; - return check; + return flags; } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( int value ) { +u32 MOAIShaderUniformBuffer::SetValue ( int value ) { - bool check = this->mInt != value; + u32 flags = this->mInt != value ? MOAIShaderUniform::UNIFORM_FLAG_DIRTY : 0; this->mInt = value; - return check; + return flags; } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( const MOAIAttrOp& attrOp, bool check ) { +u32 MOAIShaderUniformBuffer::SetValue ( const MOAIAttrOp& attrOp ) { switch ( attrOp.GetTypeHint ()) { case MOAIAttrOp::ATTR_TYPE_COLOR: { ZLColorVec* color = attrOp.GetValue < ZLColorVec* >( 0 ); if ( color ) { - return this->SetValue ( *color, check ); + return this->SetValue ( *color ); } break; } @@ -201,7 +199,7 @@ bool MOAIShaderUniformBuffer::SetValue ( const MOAIAttrOp& attrOp, bool check ) case MOAIAttrOp::ATTR_TYPE_TRANSFORM: { ZLAffine3D* affine = attrOp.GetValue < ZLAffine3D* >( 0 ); if ( affine ) { - return this->SetValue ( *affine, check ); + return this->SetValue ( *affine ); } break; } @@ -209,11 +207,11 @@ bool MOAIShaderUniformBuffer::SetValue ( const MOAIAttrOp& attrOp, bool check ) // TODO: } } - return false; + return 0; } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( const ZLColorVec& value, bool check ) { +u32 MOAIShaderUniformBuffer::SetValue ( const ZLColorVec& value ) { float m [ 4 ]; @@ -222,11 +220,11 @@ bool MOAIShaderUniformBuffer::SetValue ( const ZLColorVec& value, bool check ) { m [ 2 ] = value.mB; m [ 3 ] = value.mA; - return this->SetBuffer ( m, sizeof ( m ), check ); + return this->SetBuffer ( m, sizeof ( m )); } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( const ZLAffine3D& value, bool check ) { +u32 MOAIShaderUniformBuffer::SetValue ( const ZLAffine3D& value ) { assert (( this->mType == UNIFORM_MATRIX_F3 ) || ( this->mType == UNIFORM_MATRIX_F4 )); @@ -246,7 +244,7 @@ bool MOAIShaderUniformBuffer::SetValue ( const ZLAffine3D& value, bool check ) { m [ 7 ] = value.m [ AffineElem3D::C1_R2 ]; m [ 8 ] = value.m [ AffineElem3D::C2_R2 ]; - return this->SetBuffer ( m, sizeof ( m ), check ); + return this->SetBuffer ( m, sizeof ( m )); } float m [ 16 ]; @@ -271,11 +269,11 @@ bool MOAIShaderUniformBuffer::SetValue ( const ZLAffine3D& value, bool check ) { m [ 14 ] = 0.0f; m [ 15 ] = 1.0f; - return this->SetBuffer ( m, sizeof ( m ), check ); + return this->SetBuffer ( m, sizeof ( m )); } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( const ZLMatrix4x4& value, bool check ) { +u32 MOAIShaderUniformBuffer::SetValue ( const ZLMatrix4x4& value ) { assert (( this->mType == UNIFORM_MATRIX_F3 ) || ( this->mType == UNIFORM_MATRIX_F4 )); @@ -295,7 +293,7 @@ bool MOAIShaderUniformBuffer::SetValue ( const ZLMatrix4x4& value, bool check ) m [ 7 ] = value.m [ ZLMatrix4x4::C1_R2 ]; m [ 8 ] = value.m [ ZLMatrix4x4::C2_R2 ]; - return this->SetBuffer ( m, sizeof ( m ), check ); + return this->SetBuffer ( m, sizeof ( m )); } float m [ 16 ]; @@ -320,11 +318,11 @@ bool MOAIShaderUniformBuffer::SetValue ( const ZLMatrix4x4& value, bool check ) m [ 14 ] = value.m [ ZLMatrix4x4::C2_R3 ]; m [ 15 ] = value.m [ ZLMatrix4x4::C3_R3 ]; - return this->SetBuffer ( m, sizeof ( m ), check ); + return this->SetBuffer ( m, sizeof ( m )); } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( const ZLMatrix3x3& value, bool check ) { +u32 MOAIShaderUniformBuffer::SetValue ( const ZLMatrix3x3& value ) { assert (( this->mType == UNIFORM_MATRIX_F3 ) || ( this->mType == UNIFORM_MATRIX_F4 )); @@ -344,7 +342,7 @@ bool MOAIShaderUniformBuffer::SetValue ( const ZLMatrix3x3& value, bool check ) m [ 7 ] = value.m [ ZLMatrix3x3::C1_R2 ]; m [ 8 ] = value.m [ ZLMatrix3x3::C2_R2 ]; - return this->SetBuffer ( m, sizeof ( m ), check ); + return this->SetBuffer ( m, sizeof ( m )); } float m [ 16 ]; @@ -369,15 +367,15 @@ bool MOAIShaderUniformBuffer::SetValue ( const ZLMatrix3x3& value, bool check ) m [ 14 ] = 0.0f; m [ 15 ] = 1.0f; - return this->SetBuffer ( m, sizeof ( m ), check ); + return this->SetBuffer ( m, sizeof ( m )); } //----------------------------------------------------------------// -bool MOAIShaderUniformBuffer::SetValue ( const MOAIShaderUniformBuffer& uniformBuffer, bool check ) { +u32 MOAIShaderUniformBuffer::SetValue ( const MOAIShaderUniformBuffer& uniformBuffer ) { if ( this->mType == UNIFORM_FLOAT ) return this->SetValue ( uniformBuffer.mFloat ); if (( this->mType == UNIFORM_INDEX ) || ( this->mType == UNIFORM_INT )) return this->SetValue ( uniformBuffer.mInt ); - return this->SetBuffer ( uniformBuffer.mBuffer, this->mBuffer.Size (), check ); + return this->SetBuffer ( uniformBuffer.mBuffer, this->mBuffer.Size ()); } //================================================================// @@ -389,30 +387,42 @@ void MOAIShaderUniform::Bind () { if ( this->mAddr == ZGL_INVALID_UNIFORM_ADDR ) return; + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + switch ( this->mType ) { case UNIFORM_FLOAT: - zglUniform1f ( this->mAddr, this->mFloat ); + gfx.Uniform1f ( this->mAddr, this->mFloat ); break; case UNIFORM_INDEX: - zglUniform1i ( this->mAddr, this->mInt - 1 ); + gfx.Uniform1i ( this->mAddr, this->mInt - 1 ); break; case UNIFORM_INT: - zglUniform1i ( this->mAddr, this->mInt ); + gfx.Uniform1i ( this->mAddr, this->mInt ); break; case UNIFORM_MATRIX_F3: - zglUniformMatrix3fv ( this->mAddr, 1, false, ( float* )this->mBuffer.Data ()); + gfx.UniformMatrix3fv ( this->mAddr, 1, false, ( float* )this->mBuffer.Data ()); break; case UNIFORM_MATRIX_F4: - zglUniformMatrix4fv ( this->mAddr, 1, false, ( float* )this->mBuffer.Data ()); + gfx.UniformMatrix4fv ( this->mAddr, 1, false, ( float* )this->mBuffer.Data ()); break; case UNIFORM_VECTOR_F4: - zglUniform4fv ( this->mAddr, 1, ( float* )this->mBuffer.Data ()); + gfx.Uniform4fv ( this->mAddr, 1, ( float* )this->mBuffer.Data ()); break; } } + +//----------------------------------------------------------------// +MOAIShaderUniform::MOAIShaderUniform () : + mAddr ( ZGL_INVALID_UNIFORM_ADDR ), + mFlags ( UNIFORM_FLAG_DIRTY ) { +} + +//----------------------------------------------------------------// +MOAIShaderUniform::~MOAIShaderUniform () { +} diff --git a/src/moai-sim/MOAIShaderUniform.h b/src/moai-sim/MOAIShaderUniform.h index f099c72850..e1b56da2ef 100644 --- a/src/moai-sim/MOAIShaderUniform.h +++ b/src/moai-sim/MOAIShaderUniform.h @@ -10,9 +10,6 @@ class MOAIColor; class MOAITransformBase; -#define OPENGL_PREPROC "#define LOWP\n #define MEDP\n" -#define OPENGL_ES_PREPROC "#define LOWP lowp\n #define MEDP mediump\n" - //================================================================// // MOAIShaderUniformBuffer //================================================================// @@ -34,7 +31,7 @@ class MOAIShaderUniformBuffer { //----------------------------------------------------------------// void Clear (); void ClearValue (); - bool SetBuffer ( void* buffer, size_t size, bool check ); + u32 SetBuffer ( void* buffer, size_t size ); public: @@ -56,14 +53,14 @@ class MOAIShaderUniformBuffer { void GetFlags ( MOAIAttrOp& attrOp ); void GetValue ( MOAIAttrOp& attrOp ); void SetType ( u32 type ); - bool SetValue ( float value ); - bool SetValue ( int value ); - bool SetValue ( const MOAIAttrOp& attrOp, bool check ); - bool SetValue ( const ZLColorVec& value, bool check ); - bool SetValue ( const ZLAffine3D& value, bool check ); - bool SetValue ( const ZLMatrix4x4& value, bool check ); - bool SetValue ( const ZLMatrix3x3& value, bool check ); - bool SetValue ( const MOAIShaderUniformBuffer& uniformBuffer, bool check ); + u32 SetValue ( float value ); + u32 SetValue ( int value ); + u32 SetValue ( const MOAIAttrOp& attrOp ); + u32 SetValue ( const ZLColorVec& value ); + u32 SetValue ( const ZLAffine3D& value ); + u32 SetValue ( const ZLMatrix4x4& value ); + u32 SetValue ( const ZLMatrix3x3& value ); + u32 SetValue ( const MOAIShaderUniformBuffer& uniformBuffer ); }; //================================================================// @@ -76,14 +73,21 @@ class MOAIShaderUniform : friend class MOAIShader; friend class MOAIShaderProgram; - STLString mName; - u32 mAddr; // this is resolved when linking the shader - u32 mGlobal; // this may be used to select a global rendering value such as the pen color or world transform + STLString mName; + u32 mAddr; // this is resolved when linking the shader + u32 mFlags; // used by MOAIShaderProgram public: + enum { + UNIFORM_FLAG_DIRTY = 0x01, + UNIFORM_FLAG_GLOBAL = 0x02, + }; + //----------------------------------------------------------------// void Bind (); + MOAIShaderUniform (); + ~MOAIShaderUniform (); //----------------------------------------------------------------// inline bool IsValid () { diff --git a/src/moai-sim/MOAISim.cpp b/src/moai-sim/MOAISim.cpp index b99c1c07bc..c437cf2558 100644 --- a/src/moai-sim/MOAISim.cpp +++ b/src/moai-sim/MOAISim.cpp @@ -3,7 +3,7 @@ #include "pch.h" #include -#include +#include #include #include #include @@ -124,8 +124,8 @@ int MOAISim::_framesToTime ( lua_State* L ) { float frames = state.GetValue < float >( 1, 0.0f ); - MOAISim& device = MOAISim::Get (); - lua_pushnumber ( state, frames * device.mStep ); + MOAISim& sim = MOAISim::Get (); + lua_pushnumber ( state, frames * sim.mStep ); return 1; } @@ -187,7 +187,7 @@ int MOAISim::_getLoopFlags ( lua_State* L ) { @out number count */ int MOAISim::_getLuaObjectCount ( lua_State* L ) { - lua_pushnumber ( L, MOAILuaRuntime::Get ().GetObjectCount ()); + lua_pushnumber ( L, ( lua_Number )MOAILuaRuntime::Get ().GetObjectCount ()); return 1; } @@ -233,7 +233,7 @@ int MOAISim::_getMemoryUsage ( lua_State* L ) { lua_pushnumber ( L, luabytes / divisor ); lua_setfield ( L, -2, "_luagc_count" ); - count = MOAIGfxDevice::Get ().GetTextureMemoryUsage (); + count = MOAIGfxMgr::Get ().GetTextureMemoryUsage (); lua_pushnumber ( L, count / divisor ); lua_setfield ( L, -2, "texture" ); total += count; @@ -290,10 +290,10 @@ int MOAISim::_getMemoryUsage ( lua_State* L ) { int MOAISim::_getMemoryUsagePlain ( lua_State *L ) { size_t lua = MOAILuaRuntime::Get().GetMemoryUsage (); - size_t tex = MOAIGfxDevice::Get ().GetTextureMemoryUsage (); + size_t tex = MOAIGfxMgr::Get ().GetTextureMemoryUsage (); - lua_pushnumber ( L, lua ); - lua_pushnumber ( L, tex ); + lua_pushnumber ( L, ( lua_Number )lua ); + lua_pushnumber ( L, ( lua_Number )tex ); return 2; } @@ -385,7 +385,7 @@ int MOAISim::_openWindow ( lua_State* L ) { OpenWindowFunc openWindow = MOAISim::Get ().GetOpenWindowFunc (); if ( openWindow ) { - MOAIGfxDevice::Get ().SetBufferSize ( width, height ); + MOAIGfxMgr::Get ().SetBufferSize ( width, height ); openWindow ( title, width, height ); } @@ -759,7 +759,7 @@ MOAISim::MOAISim () : this->mActionMgr.Set ( *this, new MOAIActionTree ()); this->mActionTree.Set ( *this, new MOAIActionTree ()); - this->mActionMgr->Start ( *this->mActionTree, false ); + this->mActionMgr->Start ( this->mActionTree->GetDefaultParent (), false ); } //----------------------------------------------------------------// @@ -926,14 +926,14 @@ double MOAISim::SmoothStep ( double step ) { return step; } - u32 size = this->mSmoothBuffer.Size (); + size_t size = this->mSmoothBuffer.Size (); this->mSmoothBuffer [ this->mSmoothIdx++ ] = step; this->mSmoothIdx %= size; u32 count = 0; double sum = 0.0; - for ( u32 i = 0; i < size; ++i ) { + for ( size_t i = 0; i < size; ++i ) { double dt = this->mSmoothBuffer [ i ]; // Ignore long delay steps diff --git a/src/moai-sim/MOAISim.h b/src/moai-sim/MOAISim.h index 7da64cce95..72a91b0347 100644 --- a/src/moai-sim/MOAISim.h +++ b/src/moai-sim/MOAISim.h @@ -7,8 +7,8 @@ #include #include #include +#include #include -#include class MOAIProp; diff --git a/src/moai-sim/MOAISingleTexture.cpp b/src/moai-sim/MOAISingleTexture.cpp index 9472a37b9f..c7ef0bc80b 100644 --- a/src/moai-sim/MOAISingleTexture.cpp +++ b/src/moai-sim/MOAISingleTexture.cpp @@ -2,8 +2,8 @@ // http://getmoai.com #include "pch.h" -#include -#include +#include +#include #include #include @@ -25,7 +25,7 @@ int MOAISingleTexture::_getSize ( lua_State* L ) { MOAI_LUA_SETUP ( MOAISingleTexture, "U" ) - self->ForceCPUCreate (); + self->DoCPUCreate (); lua_pushnumber ( state, self->mWidth ); lua_pushnumber ( state, self->mHeight ); @@ -79,6 +79,8 @@ int MOAISingleTexture::_setFilter ( lua_State* L ) { int min = state.GetValue < int >( 2, ZGL_SAMPLE_LINEAR ); int mag = state.GetValue < int >( 3, min ); + MOAISingleTexture::CheckFilterModes ( min, mag ); + self->SetFilter ( min, mag ); return 0; @@ -106,11 +108,35 @@ int MOAISingleTexture::_setWrap ( lua_State* L ) { // MOAISingleTexture //================================================================// +//----------------------------------------------------------------// +void MOAISingleTexture::CheckFilterModes ( int min, int mag ) { + UNUSED ( min ); + UNUSED ( mag ); + + #ifdef _DEBUG + switch ( min ) { + case ZGL_SAMPLE_LINEAR_MIPMAP_LINEAR: + case ZGL_SAMPLE_LINEAR_MIPMAP_NEAREST: + case ZGL_SAMPLE_NEAREST_MIPMAP_LINEAR: + case ZGL_SAMPLE_NEAREST_MIPMAP_NEAREST: + + if ( !(( mag == ZGL_SAMPLE_LINEAR ) || ( mag == ZGL_SAMPLE_NEAREST ))) { + + ZLLog_Warning ( "WARNING: possibly incompatible filter modes; MIPMAP not supported for mag filter\n" ); + } + break; + + default: + break; + } + #endif +} + //----------------------------------------------------------------// void MOAISingleTexture::CleanupOnError () { this->mTextureSize = 0; - zglDeleteTexture ( this->mGLTexID ); + MOAIGfxMgr::GetDrawingAPI ().Delete ( this->mGLTexID ); this->mGLTexID = 0; this->mWidth = 0; this->mHeight = 0; @@ -126,7 +152,9 @@ u32 MOAISingleTexture::CountActiveUnits () { //----------------------------------------------------------------// bool MOAISingleTexture::CreateTextureFromImage ( MOAIImage& srcImage ) { - if ( !MOAIGfxDevice::Get ().GetHasContext ()) return false; + if ( !MOAIGfxMgr::Get ().GetHasContext ()) return false; + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); MOAIImage altImage; @@ -138,22 +166,23 @@ bool MOAISingleTexture::CreateTextureFromImage ( MOAIImage& srcImage ) { } if (( colorFormat != srcImage.GetColorFormat ()) || ( srcImage.GetPixelFormat () != MOAIImage::TRUECOLOR )) { - if ( !altImage.Convert ( srcImage, colorFormat, MOAIImage::TRUECOLOR )); + //if ( !altImage.Convert ( srcImage, colorFormat, MOAIImage::TRUECOLOR )); // TODO: what was this? add error handling? + altImage.Convert ( srcImage, colorFormat, MOAIImage::TRUECOLOR ); } MOAIImage& image = altImage.IsOK () ? altImage : srcImage; if ( !image.IsOK ()) return false; - MOAIGfxDevice::Get ().ClearErrors (); - this->mGLTexID = zglCreateTexture (); + //MOAIGfxMgr::Get ().ClearErrors (); + this->mGLTexID = gfx.CreateTexture (); if ( !this->mGLTexID ) return false; // get the dimensions before trying to get the OpenGL texture ID this->mWidth = image.GetWidth (); this->mHeight = image.GetHeight (); - // warn if not a power of two - if ( !image.IsPow2 ()) { + // warn if not a power of two (if we're supposed to generate mipmaps) + if ( this->ShouldGenerateMipmaps () && !image.IsPow2 ()) { MOAILogF ( 0, ZLLog::LOG_WARNING, MOAILogMessages::MOAITexture_NonPowerOfTwo_SDD, ( cc8* )this->mDebugName, this->mWidth, this->mHeight ); } @@ -210,25 +239,28 @@ bool MOAISingleTexture::CreateTextureFromImage ( MOAIImage& srcImage ) { return false; } - zglBindTexture ( this->mGLTexID ); + gfx.BindTexture ( this->mGLTexID ); - zglTexImage2D ( + gfx.TexImage2D ( 0, this->mGLInternalFormat, this->mWidth, this->mHeight, this->mGLInternalFormat, - this->mGLPixelType, - image.GetBitmap () + this->mGLPixelType, + image.GetBitmapBuffer () ); this->mTextureSize = image.GetBitmapSize (); + + // TODO: error handling +// if ( MOAIGfxMgr::Get ().LogErrors ()) { +// this->CleanupOnError (); +// return false; +// } +// else if ( this->ShouldGenerateMipmaps ()) { - if ( MOAIGfxDevice::Get ().LogErrors ()) { - this->CleanupOnError (); - return false; - } - else if ( this->ShouldGenerateMipmaps ()) { + if ( this->ShouldGenerateMipmaps ()) { u32 mipLevel = 1; @@ -237,17 +269,17 @@ bool MOAISingleTexture::CreateTextureFromImage ( MOAIImage& srcImage ) { while ( mipmap.MipReduce ()) { - zglTexImage2D ( + gfx.TexImage2D ( mipLevel++, this->mGLInternalFormat, mipmap.GetWidth (), mipmap.GetHeight (), this->mGLInternalFormat, - this->mGLPixelType, - mipmap.GetBitmap () + this->mGLPixelType, + mipmap.GetBitmapBuffer () ); - if ( MOAIGfxDevice::Get ().LogErrors ()) { + if ( MOAIGfxMgr::Get ().LogErrors ()) { this->CleanupOnError (); return false; } @@ -255,8 +287,8 @@ bool MOAISingleTexture::CreateTextureFromImage ( MOAIImage& srcImage ) { } } - MOAIGfxDevice::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize ); - this->mIsDirty = true; + //MOAIGfxMgr::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize ); + return true; } @@ -287,8 +319,7 @@ MOAISingleTexture::MOAISingleTexture () : mMinFilter ( ZGL_SAMPLE_LINEAR ), mMagFilter ( ZGL_SAMPLE_NEAREST ), mWrap ( ZGL_WRAP_MODE_CLAMP ), - mTextureSize ( 0 ), - mIsDirty ( false ) { + mTextureSize ( 0 ) { RTTI_BEGIN RTTI_EXTEND ( MOAILuaObject ) @@ -299,7 +330,7 @@ MOAISingleTexture::MOAISingleTexture () : //----------------------------------------------------------------// MOAISingleTexture::~MOAISingleTexture () { - this->OnGPUDestroy (); + this->OnGPUDeleteOrDiscard ( true ); } //----------------------------------------------------------------// @@ -313,49 +344,45 @@ void MOAISingleTexture::OnCPUDestroy () { } //----------------------------------------------------------------// -void MOAISingleTexture::OnGPUBind () { +void MOAISingleTexture::OnGfxEvent ( u32 event, void* userdata ) { - zglBindTexture ( this->mGLTexID ); - - if ( this->mIsDirty ) { - - zglTexParameteri ( ZGL_TEXTURE_WRAP_S, this->mWrap ); - zglTexParameteri ( ZGL_TEXTURE_WRAP_T, this->mWrap ); - - zglTexParameteri ( ZGL_TEXTURE_MIN_FILTER, this->mMinFilter ); - zglTexParameteri ( ZGL_TEXTURE_MAG_FILTER, this->mMagFilter ); - - this->mIsDirty = false; - } + MOAIGfxMgr::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize ); + MOAIGfxResource::OnGfxEvent ( event, userdata ); } //----------------------------------------------------------------// -void MOAISingleTexture::OnGPUDestroy () { +void MOAISingleTexture::OnGPUBind () { - if ( this->mGLTexID ) { - if ( MOAIGfxDevice::IsValid ()) { - MOAIGfxDevice::Get ().ReportTextureFree ( this->mDebugName, this->mTextureSize ); - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_TEXTURE, this->mGLTexID ); - } - } - this->mGLTexID = 0; + MOAIGfxMgr::GetDrawingAPI ().BindTexture ( this->mGLTexID ); } //----------------------------------------------------------------// -void MOAISingleTexture::OnGPULost () { +void MOAISingleTexture::OnGPUDeleteOrDiscard ( bool shouldDelete ) { - if ( this->mGLTexID ) { - if ( MOAIGfxDevice::IsValid ()) { - MOAIGfxDevice::Get ().ReportTextureFree ( this->mDebugName, this->mTextureSize ); - } + if ( this->mGLTexID && MOAIGfxMgr::IsValid ()) { + MOAIGfxMgr::Get ().ReportTextureFree ( this->mDebugName, this->mTextureSize ); } - this->mGLTexID = 0; + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mGLTexID, shouldDelete ); } //----------------------------------------------------------------// void MOAISingleTexture::OnGPUUnbind () { - zglBindTexture ( 0 ); + MOAIGfxMgr::GetDrawingAPI ().BindTexture ( 0 ); +} + +//----------------------------------------------------------------// +bool MOAISingleTexture::OnGPUUpdate () { + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + gfx.TexParameteri ( ZGL_TEXTURE_WRAP_S, this->mWrap ); + gfx.TexParameteri ( ZGL_TEXTURE_WRAP_T, this->mWrap ); + + gfx.TexParameteri ( ZGL_TEXTURE_MIN_FILTER, this->mMinFilter ); + gfx.TexParameteri ( ZGL_TEXTURE_MAG_FILTER, this->mMagFilter ); + + return true; } //----------------------------------------------------------------// @@ -429,26 +456,26 @@ void MOAISingleTexture::SetFilter ( int min, int mag ) { this->mMinFilter = min; this->mMagFilter = mag; - this->mIsDirty = true; + this->ScheduleForGPUUpdate (); } //----------------------------------------------------------------// -void MOAISingleTexture::SetTextureID ( u32 glTexID, int internalFormat, int pixelType, size_t textureSize ) { +void MOAISingleTexture::SetTextureID ( ZLGfxHandle* glTexID, int internalFormat, int pixelType, size_t textureSize ) { this->mGLTexID = glTexID; this->mGLInternalFormat = internalFormat; this->mGLPixelType = pixelType; this->mTextureSize = textureSize; - MOAIGfxDevice::Get ().ReportTextureAlloc ( this->mDebugName, textureSize ); - this->mIsDirty = true; + this->ScheduleForGPUUpdate (); } //----------------------------------------------------------------// void MOAISingleTexture::SetWrap ( int wrap ) { this->mWrap = wrap; - this->mIsDirty = true; + + this->ScheduleForGPUUpdate (); } //----------------------------------------------------------------// @@ -463,37 +490,44 @@ bool MOAISingleTexture::ShouldGenerateMipmaps () { } //----------------------------------------------------------------// -void MOAISingleTexture::UpdateTextureFromImage ( MOAIImage& image, ZLIntRect rect ) { +bool MOAISingleTexture::UpdateTextureFromImage ( MOAIImage& image, ZLIntRect rect ) { // TODO: what happens when image is an unsupported format? // if we need to generate mipmaps or the dimensions have changed, clear out the old texture if ( this->ShouldGenerateMipmaps () || ( this->mWidth != image.GetWidth ()) || ( this->mHeight != image.GetHeight ())) { - MOAIGfxDevice::Get ().ReportTextureFree ( this->mDebugName, this->mTextureSize ); - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_TEXTURE, this->mGLTexID ); - this->mGLTexID = 0; + MOAIGfxMgr::Get ().ReportTextureFree ( this->mDebugName, this->mTextureSize ); + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mGLTexID, false ); + + if ( this->CreateTextureFromImage ( image )) { + MOAIGfxMgr::Get ().ReportTextureAlloc ( this->mDebugName, this->mTextureSize ); + return true; + } + return false; } + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + // if the texture exists just update the sub-region // otherwise create a new texture from the image if ( this->mGLTexID ) { - zglBindTexture ( this->mGLTexID ); + gfx.BindTexture ( this->mGLTexID ); rect.Bless (); ZLIntRect imageRect = image.GetRect (); imageRect.Clip ( rect ); - const void* buffer = image.GetBitmap (); + ZLSharedConstBuffer* bitmapBuffer = image.GetBitmapBuffer (); MOAIImage subImage; if (( this->mWidth != ( u32 )rect.Width ()) || ( this->mHeight != ( u32 )rect.Height ())) { subImage.GetSubImage ( image, rect ); // TODO: need to convert to correct format for texture - buffer = subImage.GetBitmap (); + bitmapBuffer = subImage.GetBitmapBuffer (); } - zglTexSubImage2D ( + gfx.TexSubImage2D ( 0, rect.mXMin, rect.mYMin, @@ -501,13 +535,13 @@ void MOAISingleTexture::UpdateTextureFromImage ( MOAIImage& image, ZLIntRect rec rect.Height (), this->mGLInternalFormat, this->mGLPixelType, - buffer + bitmapBuffer ); - MOAIGfxDevice::Get ().LogErrors (); + MOAIGfxMgr::Get ().LogErrors (); + + return true; } - else { - this->CreateTextureFromImage ( image ); - } + return false; } diff --git a/src/moai-sim/MOAISingleTexture.h b/src/moai-sim/MOAISingleTexture.h index 4039a07ba6..7fb982762e 100644 --- a/src/moai-sim/MOAISingleTexture.h +++ b/src/moai-sim/MOAISingleTexture.h @@ -27,15 +27,15 @@ class MOAISingleTexture : public MOAIGfxResource { protected: - friend class MOAIGfxDevice; - friend class MOAIGfxDeviceStateCache; + friend class MOAIGfxMgr; + friend class MOAIGfxStateCache; friend class MOAIImageFormat; // debug name for memory use reporting STLString mDebugName; // GL texture - u32 mGLTexID; + ZLGfxHandle* mGLTexID; // size of the original texture u32 mWidth; @@ -58,8 +58,6 @@ class MOAISingleTexture : int mGLPixelType; size_t mTextureSize; - - bool mIsDirty; //----------------------------------------------------------------// static int _getSize ( lua_State* L ); @@ -73,27 +71,29 @@ class MOAISingleTexture : bool CreateTextureFromImage ( MOAIImage& srcImage ); bool OnCPUCreate (); void OnCPUDestroy (); + void OnGfxEvent ( u32 event, void* userdata ); void OnGPUBind (); - void OnGPUDestroy (); - void OnGPULost (); + void OnGPUDeleteOrDiscard ( bool shouldDelete ); void OnGPUUnbind (); - void SetTextureID ( u32 glTexID, int internalFormat, int pixelType, size_t textureSize ); + bool OnGPUUpdate (); + void SetTextureID ( ZLGfxHandle* glTexID, int internalFormat, int pixelType, size_t textureSize ); bool ShouldGenerateMipmaps (); - void UpdateTextureFromImage ( MOAIImage& image, ZLIntRect rect ); + bool UpdateTextureFromImage ( MOAIImage& image, ZLIntRect rect ); public: GET_SET ( cc8*, DebugName, mDebugName ); - GET ( u32, TextureID, mGLTexID ); + GET ( ZLGfxHandle*, TextureID, mGLTexID ); //----------------------------------------------------------------// + static void CheckFilterModes ( int min, int mag ); u32 CountActiveUnits (); void DeleteTexture (); u32 GetHeight (); MOAISingleTexture* GetTextureForUnit ( u32 unit ); u32 GetWidth (); bool IsValid (); - MOAISingleTexture (); + MOAISingleTexture (); ~MOAISingleTexture (); void SerializeIn ( MOAILuaState& state, MOAIDeserializer& serializer ); void SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ); diff --git a/src/moai-sim/MOAIStandardDeck.cpp b/src/moai-sim/MOAIStandardDeck.cpp index 0a5acc9209..ee4e11a931 100644 --- a/src/moai-sim/MOAIStandardDeck.cpp +++ b/src/moai-sim/MOAIStandardDeck.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/moai-sim/MOAIStaticGlyphCache.cpp b/src/moai-sim/MOAIStaticGlyphCache.cpp index b92410292f..4e64e79013 100644 --- a/src/moai-sim/MOAIStaticGlyphCache.cpp +++ b/src/moai-sim/MOAIStaticGlyphCache.cpp @@ -4,7 +4,7 @@ #include "pch.h" #include #include -#include +#include #include #include #include diff --git a/src/moai-sim/MOAIStretchPatch2D.cpp b/src/moai-sim/MOAIStretchPatch2D.cpp index dc2d97ac23..ff0120e25e 100644 --- a/src/moai-sim/MOAIStretchPatch2D.cpp +++ b/src/moai-sim/MOAIStretchPatch2D.cpp @@ -181,34 +181,33 @@ void MOAIStretchPatch2D::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, ZLVe // TODO: make use of offset and scale - materials.LoadGfxState ( this, idx - 1, MOAIShaderMgr::DECK2D_SHADER ); + if ( !materials.LoadGfxState ( this, idx - 1, MOAIShaderMgr::DECK2D_SHADER )) return; - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); - - ZLMatrix4x4 transform = gfxDevice.GetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM ); - ZLVec3D stretch = transform.GetStretch (); + ZLMatrix4x4 worldTransform = gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_MTX ); + ZLVec3D stretch = worldTransform.GetStretch (); ZLMatrix4x4 noStretch; noStretch.Scale ( 1.0f / stretch.mX, 1.0f / stretch.mY, 1.0f / stretch.mZ ); - noStretch.Append ( transform ); + noStretch.Append ( worldTransform ); + noStretch.Append ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::VIEW_PROJ_MTX ) ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, noStretch ); + gfxMgr.mVertexCache.SetVertexTransform ( noStretch ); + gfxMgr.mVertexCache.SetUVTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::UV_MTX )); this->UpdateParams (); this->DrawStretch ( idx, stretch.mX, stretch.mY ); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, transform ); + //gfxMgr.SetVertexTransform ( MOAIGfxMgr::VTX_WORLD_TRANSFORM, transform ); } //----------------------------------------------------------------// void MOAIStretchPatch2D::DrawStretch ( u32 idx, float xStretch, float yStretch ) { ZLRect uvRect; - u32 totalUVRects = this->mUVRects.Size (); + u32 totalUVRects = ( u32 )this->mUVRects.Size (); if ( totalUVRects == 0 ) { uvRect.Init ( 0.0f, 1.0f, 1.0f, 0.0f ); @@ -258,8 +257,8 @@ void MOAIStretchPatch2D::DrawStretch ( u32 idx, float xStretch, float yStretch ) yStretchPatchScale = yPatchScale; } - u32 totalRows = this->mRows.Size (); - u32 totalCols = this->mCols.Size (); + u32 totalRows = ( u32 )this->mRows.Size (); + u32 totalCols = ( u32 )this->mCols.Size (); MOAIQuadBrush quad; @@ -328,7 +327,6 @@ MOAIStretchPatch2D::MOAIStretchPatch2D () : RTTI_EXTEND ( MOAIStandardDeck ) RTTI_END - //this->SetContentMask ( MOAIProp::CAN_DRAW ); this->mRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); } @@ -392,8 +390,8 @@ void MOAIStretchPatch2D::UpdateParams () { this->mYFix = 0.0f; this->mYFlex = 0.0f; - u32 totalRows = this->mRows.Size (); - for ( u32 i = 0; i < totalRows; ++i ) { + size_t totalRows = this->mRows.Size (); + for ( size_t i = 0; i < totalRows; ++i ) { MOAIStretchPatchSpan& span = this->mRows [ i ]; if ( span.mCanStretch ) { this->mYFlex += span.mPercent; @@ -406,8 +404,8 @@ void MOAIStretchPatch2D::UpdateParams () { this->mXFix = 0.0f; this->mXFlex = 0.0f; - u32 totalCols = this->mCols.Size (); - for ( u32 i = 0; i < totalCols; ++i ) { + size_t totalCols = this->mCols.Size (); + for ( size_t i = 0; i < totalCols; ++i ) { MOAIStretchPatchSpan& span = this->mCols [ i ]; if ( span.mCanStretch ) { this->mXFlex += span.mPercent; diff --git a/src/moai-sim/MOAISurfaceDeck2D.cpp b/src/moai-sim/MOAISurfaceDeck2D.cpp index dad700a7fc..44485df0bb 100644 --- a/src/moai-sim/MOAISurfaceDeck2D.cpp +++ b/src/moai-sim/MOAISurfaceDeck2D.cpp @@ -104,12 +104,12 @@ int MOAISurfaceDeck2D::_setSurface ( lua_State* L ) { //----------------------------------------------------------------// ZLBox MOAISurfaceDeck2D::ComputeMaxBounds () { - u32 size = this->mBrushes.Size (); + size_t size = this->mBrushes.Size (); ZLRect rect; rect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); - for ( u32 i = 0; i < size; ++i ) { + for ( size_t i = 0; i < size; ++i ) { rect.Grow ( this->mBrushes [ i ].mBounds ); } @@ -297,7 +297,6 @@ ZLBox MOAISurfaceDeck2D::GetItemBounds ( u32 idx ) { MOAISurfaceDeck2D::MOAISurfaceDeck2D () { RTTI_SINGLE ( MOAIStandardDeck ) - //this->SetContentMask ( MOAIProp::CAN_DRAW_DEBUG | MOAIProp::CAN_GATHER_SURFACES ); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAITextBundle.h b/src/moai-sim/MOAITextBundle.h index 7fdf960c35..c8432597f5 100644 --- a/src/moai-sim/MOAITextBundle.h +++ b/src/moai-sim/MOAITextBundle.h @@ -70,4 +70,4 @@ class MOAITextBundle : }; -#endif \ No newline at end of file +#endif diff --git a/src/moai-sim/MOAITextDesignParser.cpp b/src/moai-sim/MOAITextDesignParser.cpp deleted file mode 100644 index 7e7584020a..0000000000 --- a/src/moai-sim/MOAITextDesignParser.cpp +++ /dev/null @@ -1,554 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================// -// MOAITextDesignParser -//================================================================// - -//----------------------------------------------------------------// -void MOAITextDesignParser::AcceptLine () { - - u32 totalLines = this->mLayout->mLines.GetTop (); - - this->mLayout->PushLine ( this->mLineSpriteID, this->mLineSize, this->mLineRect, this->mLineHeight, this->mLineAscent ); - - float lineWidth = this->mLineRect.Width (); - - this->mLayoutWidth = lineWidth > this->mLayoutWidth ? lineWidth : this->mLayoutWidth; - - if ( totalLines == 0 ) { - this->mLayoutHeightMin = 0.0f; - this->mLayoutHeightMax = this->mLineHeight; - } - else { - float min = this->mLayoutHeightMax + this->mDesigner->mLineSpacing; - float max = min + this->mLineHeight; - this->mLayoutHeightMin = min < this->mLayoutHeightMin ? min : this->mLayoutHeightMin; - this->mLayoutHeightMax = max > this->mLayoutHeightMax ? max : this->mLayoutHeightMax; - } - - // next line - this->mLineSize = 0; - this->mLineIdx = this->mTokenIdx; - this->mLineSpriteID = this->mTokenSpriteID; - this->mLineHeight = 0.0f; - this->mLineAscent = 0.0f; - - this->mPrevGlyph = 0; - - if ( this->mTokenSize ){ - - // slide the current token (if any) back to the origin - for ( u32 i = 0; i < this->mTokenSize; ++i ) { - MOAITextSprite& sprite = this->mLayout->mSprites [ this->mTokenSpriteID + i ]; - sprite.mPen.mX -= this->mTokenRect.mXMin; - } - - this->mPenX -= this->mTokenRect.mXMin; - this->mTokenRect.Init ( 0.0f, 0.0f, this->mTokenRect.Width (), this->mTokenRect.Height ()); - } - else { - this->mPenX = 0.0f; - } -} - -//----------------------------------------------------------------// -void MOAITextDesignParser::AcceptToken () { - - if ( this->mTokenSize ) { - - if ( this->mLineSize == 0 ) { - this->mLineIdx = this->mTokenIdx; - this->mLineSpriteID = this->mTokenSpriteID; - } - - if ( this->mLineSize == 0 ) { - this->mLineRect = this->mTokenRect; - } - else { - this->mLineRect.Grow ( this->mTokenRect ); - } - - this->mLineSize += this->mTokenSize; - this->mLineHeight = this->mTokenHeight > this->mLineHeight ? this->mTokenHeight : this->mLineHeight; - this->mLineAscent = this->mTokenAscent > this->mLineAscent ? this->mTokenAscent : this->mLineAscent; - - this->mTokenSize = 0; - this->mTokenIdx = this->mPrevIdx; - this->mTokenSpriteID = this->mLayout->mSprites.GetTop (); - } -} - -//----------------------------------------------------------------// -void MOAITextDesignParser::Align () { - - ZLRect layoutBounds = this->mLayout->mLayoutBounds; - ZLRect glyphBounds; - - glyphBounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); - - bool hasSprites = ( this->mLayout->mSprites.GetTop () > 0 ); - - u32 baseLine = this->mBaseLine; - u32 totalLines = this->mLayout->mLines.GetTop (); - - bool limitWidth = this->mDesigner->mLimitWidth; - bool limitHeight = this->mDesigner->mLimitHeight; - - float width = limitWidth ? this->mDesigner->mFrame.Width () : this->mLayoutWidth; - float height = limitHeight ? this->mDesigner->mFrame.Height () : this->GetLayoutHeight (); - - float layoutHeight = this->GetLayoutHeight (); - - float xMin = limitWidth ? this->mDesigner->mFrame.mXMin : 0.0f; - float xMax = xMin + width; - - float yMin = limitHeight ? this->mDesigner->mFrame.mYMin : 0.0f; - float yMax = yMin + height; - - float localXOffset = -this->Snap ( xMin + ( width * 0.5f ), this->mDesigner->mHLineSnap ); - float localYOffset = -this->Snap ( yMin + ( height * 0.5f ), this->mDesigner->mVLineSnap ); - - float penY = yMin; - - switch ( this->mDesigner->mVAlign ) { - - case MOAITextDesigner::CENTER_JUSTIFY: - penY = yMin + ( height * 0.5f ) - ( layoutHeight * 0.5f ); - break; - - case MOAITextDesigner::TOP_JUSTIFY: - penY = yMin; - break; - - case MOAITextDesigner::BOTTOM_JUSTIFY: - penY = yMax - layoutHeight; - break; - - default: - break; - } - - MOAIAnimCurve** curves = this->mDesigner->mCurves; - u32 totalCurves = this->mDesigner->mCurves.Size (); - - u32 spriteCount = 0; - - for ( u32 i = baseLine; i < totalLines; ++i ) { - - MOAITextLine& line = this->mLayout->mLines [ i ]; - ZLRect& lineRect = line.mRect; - float lineWidth = line.mRect.Width (); - - float lineX = xMin; - float lineY = penY; - - penY += line.mHeight + this->mDesigner->mLineSpacing; - - switch ( this->mDesigner->mHAlign ) { - - case MOAITextDesigner::CENTER_JUSTIFY: - lineX = xMin + ( width * 0.5f ) - ( lineWidth * 0.5f ); - break; - - case MOAITextDesigner::LEFT_JUSTIFY: - lineX = xMin; - break; - - case MOAITextDesigner::RIGHT_JUSTIFY: - lineX = xMax - lineWidth; - break; - - default: - break; - } - - lineX = this->Snap ( lineX + this->mOffset.mX, this->mDesigner->mHLineSnap ) + localXOffset; - lineY = this->Snap ( lineY + this->mOffset.mY, this->mDesigner->mVLineSnap ) + localYOffset; - - float xOff = ( lineX - lineRect.mXMin ); - float yOff = ( lineY + line.mAscent ); - - lineRect.Init ( lineX, lineY, lineX + lineWidth, lineY + line.mHeight ); - - if ( hasSprites ) { - - MOAIAnimCurve* curve = curves ? curves [( i - baseLine ) % totalCurves ] : 0; - - for ( u32 j = 0; j < line.mSize; ++j ) { - MOAITextSprite& sprite = this->mLayout->mSprites [ line.mStart + j ]; - sprite.mPen.mX += xOff; - sprite.mPen.mY += curve ? yOff + curve->GetValue (( sprite.mPen.mX - xMin ) / width ) : yOff; - - - ZLRect glyphRect = sprite.mGlyph->GetRect ( sprite.mPen.mX, sprite.mPen.mY, sprite.mScale.mX, sprite.mScale.mY ); - - const ZLRect& padding = sprite.mStyle->mPadding; - glyphRect.mXMin += padding.mXMin; - glyphRect.mYMin += padding.mYMin; - glyphRect.mXMax += padding.mXMax; - glyphRect.mYMax += padding.mYMax; - - if ( spriteCount == 0 ) { - glyphBounds = glyphRect; - } - else { - glyphBounds.Grow ( glyphRect ); - } - - spriteCount++; - } - } - - if ( i == 0 ) { - layoutBounds = lineRect; - } - else { - layoutBounds.Grow ( lineRect ); - } - } - - // center texbox in model space to make autoflip easier to implement - - this->mLayout->mXOffset = -localXOffset; - - if ( limitWidth == false ) { - - switch ( this->mDesigner->mHAlign ) { - - case MOAITextDesigner::CENTER_JUSTIFY: - this->mLayout->mXOffset = 0.0f; - break; - - case MOAITextDesigner::LEFT_JUSTIFY: - this->mLayout->mXOffset = -localXOffset; - break; - - case MOAITextDesigner::RIGHT_JUSTIFY: - this->mLayout->mXOffset = localXOffset; - break; - - default: - break; - } - } - - this->mLayout->mYOffset = -localYOffset; - - if ( limitHeight == false ) { - - switch ( this->mDesigner->mVAlign ) { - - case MOAITextDesigner::CENTER_JUSTIFY: - this->mLayout->mYOffset = 0.0f; - break; - - case MOAITextDesigner::TOP_JUSTIFY: - this->mLayout->mYOffset = localYOffset; - break; - - case MOAITextDesigner::BOTTOM_JUSTIFY: - this->mLayout->mYOffset = -localYOffset; - break; - - case MOAITextDesigner::BASELINE_JUSTIFY: { - float sign = this->mDesigner->mYFlip ? -1.0f : 1.0f; - this->mLayout->mYOffset = ( totalLines ? ( -localYOffset - this->mLayout->mLines [ 0 ].mAscent ) * sign : 0.0f ); - break; - } - - default: - break; - } - } - - this->mLayout->mGlyphBounds = glyphBounds; - this->mLayout->mLayoutBounds = layoutBounds; -} - -//----------------------------------------------------------------// -void MOAITextDesignParser::BuildLayout () { - - bool limitWidth = this->mDesigner->mLimitWidth; - bool limitHeight = this->mDesigner->mLimitHeight; - - float frameWidth = this->mDesigner->mFrame.Width (); - float frameHeight = this->mDesigner->mFrame.Height (); - - bool more = true; - while ( more ) { - - u32 c = this->NextChar (); - - float xScale = this->mDesigner->mGlyphScale * ( this->mStyle ? this->mStyle->mScale.mX : 1.0f ) * this->mDeckScale; - float yScale = this->mDesigner->mGlyphScale * ( this->mStyle ? this->mStyle->mScale.mY : 1.0f ) * this->mDeckScale; - - if ( MOAIFont::IsControl ( c )) { - - if ( c == '\n' ) { - - this->AcceptToken (); - - float newLineSize = this->mDeck->mHeight * yScale; - - this->mLineHeight = this->mLineHeight == 0.0f ? newLineSize : this->mLineHeight; - this->mLineAscent = this->mLineAscent == 0.0f ? newLineSize : this->mLineAscent; - - this->AcceptLine (); - } - else if ( c == 0 ) { - - this->AcceptToken (); - this->AcceptLine (); - - this->mMore = false; - more = false; - } - } - else { - MOAIGlyph* glyph = this->mDeck->GetGlyph ( c ); - if ( !glyph ) continue; - if ( glyph->mCode == MOAIGlyph::NULL_CODE_ID ) continue; - - // apply kerning - if ( this->mPrevGlyph ) { - MOAIKernVec kernVec = this->mPrevGlyph->GetKerning ( glyph->mCode ); - this->mPenX += kernVec.mX * xScale; - } - - this->mPrevGlyph = glyph; - - if ( MOAIFont::IsWhitespace ( c )) { - this->AcceptToken (); - } - else { - - ZLRect glyphRect = glyph->GetRect ( this->mPenX, 0.0f, xScale, yScale ); - - // handle new token - if ( this->mTokenSize == 0 ) { - this->mTokenIdx = this->mPrevIdx; - this->mTokenSpriteID = this->mLayout->mSprites.GetTop (); - this->mTokenRect = glyphRect; - this->mTokenHeight = this->mDeck->mHeight * yScale; - this->mTokenAscent = this->mDeck->mAscent * yScale; - } - - bool overrun = false; - - ZLRect tokenRect = this->mTokenRect; - tokenRect.Grow ( glyphRect ); - - if ( limitWidth ) { - overrun = frameWidth < tokenRect.mXMax; - } - - bool discard = ( this->mLineSize == 0 ) && overrun; // this is the first token in the line *and* we have overrun - - // if we're the first token in a line *and* have overrun, don't attempt to split the token - just - // discard the extra glyphs. later on this will be the place to implement fancy/custom token splitting. - if ( discard ) { - this->mOverrun = true; - } - else { - // push the sprite - this->mLayout->PushSprite ( this->mPrevIdx, *glyph, *this->mStyle, this->mPenX, 0.0f, xScale, yScale ); - this->mTokenRect = tokenRect; - this->mTokenSize++; - } - - if ( overrun ) { - this->AcceptLine (); - } - - if ( this->mDesigner->mWordBreak == MOAITextDesigner::WORD_BREAK_CHAR ) { - this->AcceptToken (); - } - } - - // advance the pen - this->mPenX += glyph->mAdvanceX * xScale; - } - - // if we overrun this->mHeight, then back up to the start of the current line - if ( limitHeight && (( this->GetLayoutHeight () + this->mTokenHeight ) > frameHeight )) { - - this->mLayout->mSprites.SetTop ( this->mLineSpriteID ); - - // if we're ending on an empty line (i.e. a newline) then throw it away - // else back up so the next page will start on the line - if ( this->mLineSize ) { - this->mIdx = this->mLineIdx; - } - else if ( this->mTokenSize ) { - this->mIdx = this->mTokenIdx; - } - else { - this->mIdx = this->mIdx; - } - - more = false; - } - } - - this->Align (); -} - -//----------------------------------------------------------------// -void MOAITextDesignParser::BuildLayout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, MOAITextDesigner& designer, cc8* str, u32 idx, ZLVec2D& offset ) { - - if ( styleMap.CountSpans () == 0 ) return; - - this->mLayout = &layout; - this->mStyleCache = &styleCache; - this->mStyleMap = &styleMap; - this->mDesigner = &designer; - - this->mStr = str; - this->mIdx = idx; - this->mPrevIdx = idx; - - this->mStyleSpan = 0; - this->mStyle = 0; - - this->mLineIdx = this->mIdx; - this->mLineSpriteID = 0; - this->mLineSize = 0; - this->mLineHeight = 0.0f; - this->mLineAscent = 0.0f; - - this->mLineRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); - - this->mTokenIdx = this->mIdx; - this->mTokenSpriteID = 0; - this->mTokenSize = 0; - this->mTokenHeight = 0.0f; - this->mTokenAscent = 0.0f; - - this->mTokenRect.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); - - this->mLayoutWidth = 0.0f; - this->mLayoutHeightMin = 0.0f; - this->mLayoutHeightMax = 0.0f; - - this->mPenX = 0.0f; - this->mOffset = offset; - this->mPrevGlyph = 0; - - this->mMore = true; - this->mOverrun = false; - - this->mBaseLine = layout.mLines.GetTop (); - - this->BuildLayout (); -} - -//----------------------------------------------------------------// -float MOAITextDesignParser::GetLayoutHeight () { - - return this->mLayoutHeightMax - this->mLayoutHeightMin; -} - -//----------------------------------------------------------------// -MOAITextDesignParser::MOAITextDesignParser () : - mDesigner ( 0 ), - mLayout ( 0 ), - mStyleCache ( 0 ), - mStyleMap ( 0 ) { -} - -//----------------------------------------------------------------// -MOAITextDesignParser::~MOAITextDesignParser () { -} - -//----------------------------------------------------------------// -bool MOAITextDesignParser::More () { - - return this->mMore; -} - -//----------------------------------------------------------------// -u32 MOAITextDesignParser::NextChar () { - - bool newSpan = false; - - if ( !this->mStyleSpan ) { - this->mStyleSpan = &this->mStyleMap->Elem ( 0 ); - this->mSpanIdx = 0; - newSpan = true; - } - - if ( this->mIdx >= this->mStyleSpan->mTop ) { - - this->mStyleSpan = 0; - - u32 totalStyles = this->mStyleMap->GetTop (); - for ( this->mSpanIdx++; this->mSpanIdx < totalStyles; this->mSpanIdx++ ) { - MOAITextStyleSpan& styleSpan = this->mStyleMap->Elem ( this->mSpanIdx ); - - if ( this->mIdx < styleSpan.mTop ) { - this->mStyleSpan = &styleSpan; - newSpan = true; - break; - } - } - } - - if ( this->mStyleSpan ) { - - if ( newSpan ) { - - MOAITextStyleState* defaultStyle = this->mStyleCache->GetStyle (); - MOAIFont* defaultFont = defaultStyle ? defaultStyle->mFont : 0; - - if ( this->mIdx < this->mStyleSpan->mBase ) { - this->mIdx = this->mStyleSpan->mBase; - } - - this->mStyle = this->mStyleSpan->mStyle; - this->mStyle = this->mStyle ? this->mStyle : defaultStyle; - if ( !this->mStyle ) return 0; // TODO: report error - - MOAIFont* font = this->mStyle->mFont; - font = font ? font : defaultFont; - if ( !font ) return 0; // TODO: report error - - this->mDeck = font->GetGlyphSet ( this->mStyle->mSize ); - if ( !this->mDeck && defaultFont ) { - this->mDeck = defaultFont->GetGlyphSet ( this->mStyle->mSize ); - } - if ( !this->mDeck ) return 0; // TODO: report error - - this->mDeckScale = this->mDeck && ( this->mStyle->mSize > 0.0f ) ? this->mStyle->mSize / this->mDeck->GetSize () : 1.0f; - } - - this->mPrevIdx = this->mIdx; - u32 c = moai_u8_nextchar ( this->mStr, &this->mIdx ); - - return c; - } - return 0; -} - -//----------------------------------------------------------------// -bool MOAITextDesignParser::Overrun () { - - return this->mMore || this->mOverrun; -} - -//----------------------------------------------------------------// -float MOAITextDesignParser::Snap ( float f, float b ) { - - return ( b > 0.0f ) ? floorf (( f / b ) + 0.5f ) * b : f; -} diff --git a/src/moai-sim/MOAITextDesignParser.h b/src/moai-sim/MOAITextDesignParser.h deleted file mode 100644 index f89192fa79..0000000000 --- a/src/moai-sim/MOAITextDesignParser.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAITEXTDESIGNPARSER_H -#define MOAITEXTDESIGNPARSER_H - -class MOAITextDesigner; -class MOAITextLayout; -class MOAITextStyle; -class MOAITextStyleCache; -class MOAITextStyleMap; -class MOAITextStyler; -class MOAITextStyleSpan; -class MOAITextStyleState; - -//================================================================// -// MOAITextDesignParser -//================================================================// -class MOAITextDesignParser { -private: - - //----------------------------------------------------------------// - // layout state - - MOAITextStyleSpan* mStyleSpan; - MOAITextStyleState* mStyle; - u32 mSpanIdx; - - int mIdx; - int mPrevIdx; - - cc8* mStr; - - MOAIGlyphSet* mDeck; - float mDeckScale; - - int mLineIdx; - u32 mLineSpriteID; - u32 mLineSize; - float mLineHeight; - float mLineAscent; - ZLRect mLineRect; - - int mTokenIdx; - u32 mTokenSpriteID; - u32 mTokenSize; - float mTokenHeight; - float mTokenAscent; - ZLRect mTokenRect; - - float mLayoutWidth; - float mLayoutHeightMin; - float mLayoutHeightMax; - - float mPenX; - ZLVec2D mOffset; - MOAIGlyph* mPrevGlyph; - bool mMore; - bool mOverrun; - - u32 mBaseLine; - - //----------------------------------------------------------------// - // layout settings - - MOAITextDesigner* mDesigner; - MOAITextLayout* mLayout; - MOAITextStyleCache* mStyleCache; - MOAITextStyleMap* mStyleMap; - - //----------------------------------------------------------------// - void AcceptLine (); - void AcceptToken (); - void Align (); - void BuildLayout (); - float GetLayoutHeight (); - u32 NextChar (); - float Snap ( float f, float b ); - -public: - - GET ( u32, Index, mIdx ) - - //----------------------------------------------------------------// - void BuildLayout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, MOAITextDesigner& designer, cc8* str, u32 idx, ZLVec2D& offset ); - MOAITextDesignParser (); - virtual ~MOAITextDesignParser (); - bool More (); - bool Overrun (); -}; - -#endif diff --git a/src/moai-sim/MOAITextDesigner.cpp b/src/moai-sim/MOAITextDesigner.cpp deleted file mode 100644 index e653f8ad9f..0000000000 --- a/src/moai-sim/MOAITextDesigner.cpp +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================// -// MOAITextDesigner -//================================================================// - -//----------------------------------------------------------------// -void MOAITextDesigner::ClearCurves () { - - for ( u32 i = 0; i < this->mCurves.Size (); ++i ) { - this->ReleaseCurve ( this->mCurves [ i ]); - } - this->mCurves.Clear (); -} - -//----------------------------------------------------------------// -void MOAITextDesigner::Layout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, cc8* str, u32 idx, ZLVec2D& offset, bool* more, u32* nextIdx, bool* overrun ) { - - MOAITextDesignParser parser; - - parser.BuildLayout ( layout, styleCache, styleMap, *this, str, idx, offset ); - layout.ApplyHighlights (); - - if ( more ) { - *more = parser.More (); - } - - if ( nextIdx ) { - *nextIdx = parser.GetIndex (); - } - - if ( overrun ) { - *overrun = parser.Overrun (); - } -} - -//----------------------------------------------------------------// -void MOAITextDesigner::Init ( const MOAITextDesigner& designer ) { - - this->ClearCurves (); - - this->mOwner = designer.mOwner; - this->mFrame = designer.mFrame; - this->mLimitWidth = designer.mLimitWidth; - this->mLimitHeight = designer.mLimitHeight; - this->mHAlign = designer.mHAlign; - this->mVAlign = designer.mVAlign; - this->mYFlip = designer.mYFlip; - this->mWordBreak = designer.mWordBreak; - this->mGlyphScale = designer.mGlyphScale; - this->mLineSpacing = designer.mLineSpacing; - - u32 totalCurves = designer.mCurves.Size (); - this->ReserveCurves ( totalCurves ); - for ( u32 i = 0; i < totalCurves; ++i ) { - this->SetCurve ( i, designer.mCurves [ i ]); - } -} - -//----------------------------------------------------------------// -MOAITextDesigner::MOAITextDesigner () : - mOwner ( 0 ), - mLimitWidth ( false ), - mLimitHeight ( false ), - mHAlign ( MOAITextDesigner::LEFT_JUSTIFY ), - mVAlign ( MOAITextDesigner::TOP_JUSTIFY ), - mYFlip ( false ), - mWordBreak ( MOAITextDesigner::WORD_BREAK_NONE ), - mGlyphScale ( 1.0f ), - mLineSpacing ( 0.0f ), - mHLineSnap ( 0.0f ), - mVLineSnap ( 0.0f ) { - - this->mFrame.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); -} - -//----------------------------------------------------------------// -MOAITextDesigner::~MOAITextDesigner () { - - this->ClearCurves (); -} - -//----------------------------------------------------------------// -void MOAITextDesigner::ReleaseCurve ( MOAIAnimCurve* curve ) { - - if ( curve ) { - if ( this->mOwner ) { - this->mOwner->LuaRelease ( curve ); - } - curve->Release (); - } -} - -//----------------------------------------------------------------// -void MOAITextDesigner::ReserveCurves ( u32 total ) { - - this->ClearCurves (); - - this->mCurves.Init ( total ); - this->mCurves.Fill ( 0 ); -} - -//----------------------------------------------------------------// -void MOAITextDesigner::RetainCurve ( MOAIAnimCurve* curve ) { - - if ( curve ) { - curve->Retain (); - if ( this->mOwner ) { - this->mOwner->LuaRetain ( curve ); - } - } -} - -//----------------------------------------------------------------// -void MOAITextDesigner::SetCurve ( u32 idx, MOAIAnimCurve* curve ) { - - if ( idx > this->mCurves.Size ()) return; - if ( this->mCurves [ idx ] == curve ) return; - - this->RetainCurve ( curve ); - this->ReleaseCurve ( this->mCurves [ idx ]); - - this->mCurves [ idx ] = curve; -} - diff --git a/src/moai-sim/MOAITextDesigner.h b/src/moai-sim/MOAITextDesigner.h deleted file mode 100644 index b989dfc8d3..0000000000 --- a/src/moai-sim/MOAITextDesigner.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAITEXTDESIGNER_H -#define MOAITEXTDESIGNER_H - -class MOAITextLayout; -class MOAITextStyle; -class MOAITextStyleCache; -class MOAITextStyleMap; -class MOAITextStyleSpan; - -//================================================================// -// MOAITextDesigner -//================================================================// -class MOAITextDesigner { -protected: - - friend class MOAITextDesignParser; - - MOAINode* mOwner; - - ZLRect mFrame; - - bool mLimitWidth; - bool mLimitHeight; - - u32 mHAlign; - u32 mVAlign; - bool mYFlip; - - u32 mWordBreak; // rule for breaking words across lines - - float mGlyphScale; - float mLineSpacing; - - float mHLineSnap; // snap lines to this boundary - float mVLineSnap; // snap lines to this boundary - - ZLLeanArray < MOAIAnimCurve* > mCurves; - - //----------------------------------------------------------------// - void ReleaseCurve ( MOAIAnimCurve* curve ); - void RetainCurve ( MOAIAnimCurve* curve ); - -public: - - enum { - BASELINE_JUSTIFY, - BOTTOM_JUSTIFY, - LEFT_JUSTIFY, - CENTER_JUSTIFY, - RIGHT_JUSTIFY, - TOP_JUSTIFY, - }; - - enum { - WORD_BREAK_NONE, - WORD_BREAK_CHAR, - }; - - GET_SET ( MOAINode*, Owner, mOwner ) - - GET_SET ( ZLRect&, Frame, mFrame ) - - GET_SET ( bool, LimitWidth, mLimitWidth ) - GET_SET ( bool, LimitHeight, mLimitHeight ) - - GET_SET ( u32, HAlign, mHAlign ) - GET_SET ( u32, VAlign, mVAlign ) - GET_SET ( bool, YFlip, mYFlip ) - - GET_SET ( u32, WordBreak, mWordBreak ) - GET_SET ( float, GlyphScale, mGlyphScale ) - GET_SET ( float, LineSpacing, mLineSpacing ) - - GET_SET ( float, HLineSnap, mHLineSnap ) - GET_SET ( float, VLineSnap, mVLineSnap ) - - //----------------------------------------------------------------// - void ClearCurves (); - void Layout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, cc8* str, u32 idx, ZLVec2D& offset, bool* more, u32* nextIdx, bool* overrun ); - void Init ( const MOAITextDesigner& designer ); - MOAITextDesigner (); - ~MOAITextDesigner (); - void ReserveCurves ( u32 total ); - void SetCurve ( u32 idx, MOAIAnimCurve* curve ); -}; - -#endif diff --git a/src/moai-sim/MOAITextLabel.cpp b/src/moai-sim/MOAITextLabel.cpp index 7d1103e5e0..1a7080f5c7 100644 --- a/src/moai-sim/MOAITextLabel.cpp +++ b/src/moai-sim/MOAITextLabel.cpp @@ -8,14 +8,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include @@ -57,8 +57,8 @@ int MOAITextLabel::_clearHighlights ( lua_State* L ) { */ int MOAITextLabel::_getAlignment ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) - state.Push ( self->mDesigner.GetHAlign ()); - state.Push ( self->mDesigner.GetVAlign ()); + state.Push ( self->mLayoutRules.GetHAlign ()); + state.Push ( self->mLayoutRules.GetVAlign ()); return 2; } @@ -71,7 +71,7 @@ int MOAITextLabel::_getAlignment ( lua_State* L ) { */ int MOAITextLabel::_getGlyphScale ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) - state.Push ( self->mDesigner.GetGlyphScale ()); + state.Push ( self->mLayoutRules.GetGlyphScale ()); return 1; } @@ -85,10 +85,27 @@ int MOAITextLabel::_getGlyphScale ( lua_State* L ) { int MOAITextLabel::_getLineSpacing ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) - lua_pushnumber ( state, self->mDesigner.GetLineSpacing ()); + lua_pushnumber ( state, self->mLayoutRules.GetLineSpacing ()); return 1; } +//----------------------------------------------------------------// +/** @lua getOverrunRules + @text Returns the overrun rules. + + @in MOAITextLabel self + @out number firstOverrunRule + @out number overrunRule +*/ +int MOAITextLabel::_getOverrunRules ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAITextLabel, "U" ) + + state.Push ( self->mLayoutRules.GetFirstOverrunRule ()); + state.Push ( self->mLayoutRules.GetOverrunRule ()); + + return 2; +} + //----------------------------------------------------------------// /** @lua getRect @text Returns the two-dimensional boundary of the text box (if any). @@ -102,12 +119,31 @@ int MOAITextLabel::_getLineSpacing ( lua_State* L ) { int MOAITextLabel::_getRect ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) - ZLRect rect = self->mDesigner.GetFrame (); + ZLRect rect = self->mLayoutRules.GetFrame (); state.Push ( rect ); return 4; } +//----------------------------------------------------------------// +/** @lua getSizingRules + @text Returns the sizing rules. + + @in MOAITextLabel self + @out number hLayoutSizingRule + @out number vLayoutSizingRule + @out number lineSizingRule +*/ +int MOAITextLabel::_getSizingRules ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAITextLabel, "U" ) + + state.Push ( self->mLayoutRules.GetHLayoutSizingRule ()); + state.Push ( self->mLayoutRules.GetVLayoutSizingRule ()); + state.Push ( self->mLayoutRules.GetLineSizingRule ()); + + return 3; +} + //----------------------------------------------------------------// /** @lua getStyle @text Returns the style associated with a name or, if no name @@ -187,7 +223,8 @@ int MOAITextLabel::_getTextBounds ( lua_State* L ) { hasRect = self->mLayout.GetBoundsForRange ( index, size, rect ); } else { - hasRect = self->mLayout.GetBounds ( rect ); + rect = self->mLayout.GetLayoutBounds (); + hasRect = true; } if ( hasRect ) { @@ -206,10 +243,10 @@ int MOAITextLabel::_getTextBounds ( lua_State* L ) { //----------------------------------------------------------------// /** @name hasOverrun - @text Returns whether there are additional glyphs that are not visible on the screen (either on next page or just thrown away). + @text Returns whether a token was truncated at the end of the text layout. @in MOAITextBox self - @out boolean overrun If there is additional text below the cursor that is not visible on the screen due to clipping (or in the next page). + @out boolean overrun Only true if a token is split across layout pages. */ int MOAITextLabel::_hasOverrun ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) @@ -263,7 +300,7 @@ int MOAITextLabel::_reserveCurves ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "UN" ) u32 total = state.GetValue < u32 >( 2, 0 ); - self->mDesigner.ReserveCurves ( total ); + self->mLayoutRules.ReserveCurves ( total ); return 0; } @@ -295,8 +332,8 @@ int MOAITextLabel::_revealAll ( lua_State* L ) { int MOAITextLabel::_setAlignment ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "UN" ) - self->mDesigner.SetHAlign ( state.GetValue < u32 >( 2, MOAITextDesigner::LEFT_JUSTIFY )); - self->mDesigner.SetVAlign ( state.GetValue < u32 >( 3, MOAITextDesigner::TOP_JUSTIFY )); + self->mLayoutRules.SetHAlign ( state.GetValue < u32 >( 2, MOAITextLayoutRules::LEFT_JUSTIFY )); + self->mLayoutRules.SetVAlign ( state.GetValue < u32 >( 3, MOAITextLayoutRules::TOP_JUSTIFY )); self->ScheduleLayout (); return 0; @@ -354,13 +391,13 @@ int MOAITextLabel::_setBounds ( lua_State* L ) { ZLRect frame; frame = bounds.GetRect ( ZLBox::PLANE_XY ); - self->mDesigner.SetFrame ( frame ); - self->mDesigner.SetLimitWidth ( true ); - self->mDesigner.SetLimitHeight ( true ); + self->mLayoutRules.SetFrame ( frame ); + self->mLayoutRules.SetLimitWidth ( true ); + self->mLayoutRules.SetLimitHeight ( true ); } else { - self->mDesigner.SetLimitWidth ( false ); - self->mDesigner.SetLimitHeight ( false ); + self->mLayoutRules.SetLimitWidth ( false ); + self->mLayoutRules.SetLimitHeight ( false ); } self->ScheduleLayout (); @@ -393,11 +430,11 @@ int MOAITextLabel::_setCurve ( lua_State* L ) { MOAIAnimCurve* curve = state.GetLuaObject < MOAIAnimCurve >( 3, true ); if ( !curve ) return 0; - self->mDesigner.SetCurve ( index, curve ); + self->mLayoutRules.SetCurve ( index, curve ); self->ScheduleLayout (); } else { - self->mDesigner.ClearCurves (); + self->mLayoutRules.ClearCurves (); self->ScheduleLayout (); } return 0; @@ -414,7 +451,7 @@ int MOAITextLabel::_setCurve ( lua_State* L ) { */ int MOAITextLabel::_setGlyphScale ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) - self->mDesigner.SetGlyphScale ( state.GetValue < float >( 2, 1.0f )); + self->mLayoutRules.SetGlyphScale ( state.GetValue < float >( 2, 1.0f )); self->ScheduleLayout (); return 0; } @@ -478,8 +515,8 @@ int MOAITextLabel::_setLineSnap ( lua_State* L ) { float hLineSnap = state.GetValue < float >( 2, 0.0f ); float vLineSnap = state.GetValue < float >( 3, hLineSnap ); - self->mDesigner.SetHLineSnap ( hLineSnap ); - self->mDesigner.SetVLineSnap ( vLineSnap ); + self->mLayoutRules.SetHLineSnap ( hLineSnap ); + self->mLayoutRules.SetVLineSnap ( vLineSnap ); self->ScheduleLayout (); return 0; @@ -499,12 +536,39 @@ int MOAITextLabel::_setLineSpacing ( lua_State* L ) { float lineSpacing = state.GetValue < float >( 2, 0.0f ); - self->mDesigner.SetLineSpacing ( lineSpacing ); + self->mLayoutRules.SetLineSpacing ( lineSpacing ); self->ScheduleLayout (); return 0; } +//----------------------------------------------------------------// +/** @lua setOverrunRule + @text Control behavior of text shaper when a token needs to be wrapped. + An alternate rule may be set for the first token on a line. + + OVERRUN_MOVE_WORD will cause the entire token to be moved to the next line. + OVERRUN_SPLIT_WORD will split the token across lines. + OVERRUN_TRUNCATE_WORD will discard the remaining characters in the token. + OVERRUN_ABORT_LAYOUT will back up to the start of the token and stop the layout. + + OVERRUN_MOVE_WORD is not permitted as the rule for the line's first token. If the + first token doesn't fit on current line, it will not fit on the next line and so on. + + @in MOAITextLabel self + @in number firstOverrunRule One of OVERRUN_SPLIT_WORD, OVERRUN_TRUNCATE_WORD, OVERRUN_ABORT_LAYOUT. Default value is OVERRUN_SPLIT_WORD. + @in number overrunRule One of OVERRUN_MOVE_WORD, OVERRUN_SPLIT_WORD, OVERRUN_TRUNCATE_WORD, OVERRUN_ABORT_LAYOUT. Default value is OVERRUN_MOVE_WORD. + @out nil +*/ +int MOAITextLabel::_setOverrunRules ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAITextLabel, "U" ) + + self->mLayoutRules.SetFirstOverrunRule ( state.GetValue < u32 >( 2, MOAITextLayoutRules::OVERRUN_SPLIT_WORD )); + self->mLayoutRules.SetOverrunRule ( state.GetValue < u32 >( 3, MOAITextLayoutRules::OVERRUN_MOVE_WORD )); + + return 0; +} + //----------------------------------------------------------------// /** @lua setRect @text Sets the rectangular area for this text box. @@ -521,10 +585,10 @@ int MOAITextLabel::_setRect ( lua_State* L ) { ZLRect rect = state.GetRect < float >( 2 ); rect.Bless (); - self->mDesigner.SetFrame ( rect ); + self->mLayoutRules.SetFrame ( rect ); - self->mDesigner.SetLimitWidth ( true ); - self->mDesigner.SetLimitHeight ( true ); + self->mLayoutRules.SetLimitWidth ( true ); + self->mLayoutRules.SetLimitHeight ( true ); self->ScheduleLayout (); @@ -543,8 +607,8 @@ int MOAITextLabel::_setRect ( lua_State* L ) { int MOAITextLabel::_setRectLimits ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) - self->mDesigner.SetLimitWidth ( state.GetValue < bool >( 2, false )); - self->mDesigner.SetLimitHeight ( state.GetValue < bool >( 3, false )); + self->mLayoutRules.SetLimitWidth ( state.GetValue < bool >( 2, false )); + self->mLayoutRules.SetLimitHeight ( state.GetValue < bool >( 3, false )); self->ScheduleLayout (); @@ -571,12 +635,38 @@ int MOAITextLabel::_setReveal ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +/** @lua setSizingRule + @text The sizing rules are used to determine the boundaries of each line for + layout and alignment purposes. The H and V layout sizing rules determine whether + the layout is based on the tight-fitting glyph boundaries or the (possibly) looser + fitting 'logical' bounds (i.e. the bounds specified by the type face, allowing for + full ascent and descent). The line sizing rule determines whether lines are spaced + from logical or glyph bounds. Note that these rules do not affect the spacing of + glyphs as they are laid out within a line, but they do affect the spacing of lines. + + @in MOAITextLabel self + @in number hLayoutSizingRule One of LOGICAL_SIZE or GLYPH_SIZE. Default is LOGICAL_SIZE. + @in number vLayoutSizingRule One of LOGICAL_SIZE or GLYPH_SIZE. Default is LOGICAL_SIZE. + @in number lineSizingRule One of LOGICAL_SIZE or GLYPH_SIZE. Default is LOGICAL_SIZE. + @out nil +*/ +int MOAITextLabel::_setSizingRules ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAITextLabel, "U" ) + + self->mLayoutRules.SetHLayoutSizingRule ( state.GetValue < u32 >( 2, MOAITextLayoutRules::LOGICAL_SIZE )); + self->mLayoutRules.SetVLayoutSizingRule ( state.GetValue < u32 >( 3, MOAITextLayoutRules::LOGICAL_SIZE )); + self->mLayoutRules.SetLineSizingRule ( state.GetValue < u32 >( 3, MOAITextLayoutRules::LOGICAL_SIZE )); + + return 0; +} + //----------------------------------------------------------------// /** @lua setSpeed @text Sets the base spool speed used when creating a spooling MOAIAction with the spool() function. @in MOAITextLabel self - @in number speed The base spooling speed. + @in number speed The base spooling speed. @out nil */ int MOAITextLabel::_setSpeed ( lua_State* L ) { @@ -655,7 +745,7 @@ int MOAITextLabel::_setStyle ( lua_State* L ) { int MOAITextLabel::_setWordBreak ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "U" ) - self->mDesigner.SetWordBreak ( state.GetValue < u32 >( 2, MOAITextDesigner::WORD_BREAK_NONE )); + //self->mLayoutRules.SetWordBreakRule ( state.GetValue < u32 >( 2, MOAITextLayoutRules::WORD_BREAK_NONE )); return 0; } @@ -673,7 +763,7 @@ int MOAITextLabel::_setWordBreak ( lua_State* L ) { int MOAITextLabel::_setYFlip ( lua_State* L ) { MOAI_LUA_SETUP ( MOAITextLabel, "UB" ) - self->mDesigner.SetYFlip ( state.GetValue < bool >( 2, false )); + self->mLayoutRules.SetYFlip ( state.GetValue < bool >( 2, false )); self->ScheduleLayout (); return 0; @@ -697,7 +787,7 @@ int MOAITextLabel::_spool ( lua_State* L ) { self->mReveal = state.GetValue < u32 >( 2, 0 ); self->mSpool = ( float )self->mReveal; - self->Start ( MOAISim::Get ().GetActionMgr (), false ); + self->Start ( 0, false ); return 1; } @@ -758,7 +848,7 @@ void MOAITextLabel::BuildLocalToWorldMtx ( ZLAffine3D& localToWorldMtx ) { this->MOAITransform::BuildLocalToWorldMtx ( localToWorldMtx ); - float yScale = this->mDesigner.GetYFlip () ? -1.0f : 1.0f; + float yScale = this->mLayoutRules.GetYFlip () ? -1.0f : 1.0f; ZLAffine3D mtx; mtx.ScRoTr ( 1.0f, yScale, 1.0f, 0.0f, 0.0f, 0.0f, this->mLayout.mXOffset, this->mLayout.mYOffset, 0.0f ); @@ -774,14 +864,14 @@ void MOAITextLabel::Draw ( int subPrimID, float lod ) { if ( this->mReveal ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); this->LoadGfxState (); this->LoadVertexTransform (); this->LoadUVTransform (); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); + gfxMgr.mVertexCache.SetUVTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::UV_MTX )); MOAIShader* shader = this->mMaterialBatch ? this->mMaterialBatch->RawGetShader ( 0 ) : 0; bool useSpriteShaders = !shader; @@ -803,43 +893,55 @@ void MOAITextLabel::DrawDebug ( int subPrimID, float lod ) { if ( !this->IsVisible ( lod )) return; if ( this->IsClear ()) return; - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIDebugLines& debugLines = MOAIDebugLines::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + ZLMatrix4x4 worldDrawingMtx = this->GetWorldDrawingMtx (); + + gfxMgr.mGfxState.SetMtx ( MOAIGfxGlobalsCache::WORLD_MTX, worldDrawingMtx ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); + + this->mLayout.DrawDebug (); MOAIDraw& draw = MOAIDraw::Get (); UNUSED ( draw ); // mystery warning in vs2008 - draw.Bind (); - ZLMatrix4x4 worldDrawingMtx = this->GetWorldDrawingMtx (); - gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, worldDrawingMtx ); + MOAIDebugLines& debugLines = MOAIDebugLines::Get (); + + if (( this->mLayout.mLayoutBounds.Area () > 0.0f ) && debugLines.Bind ( MOAIDebugLines::TEXT_BOX_LAYOUT_BOUNDS )) { + + draw.DrawRectOutline ( this->mLayout.mLayoutBounds ); + } - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); + if (( this->mLayout.mGlyphBounds.Area () > 0.0f ) && debugLines.Bind ( MOAIDebugLines::TEXT_BOX_GLYPH_BOUNDS )) { + + draw.DrawRectOutline ( this->mLayout.mGlyphBounds ); + } - if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX )) { + ZLRect frame = this->mLayoutRules.GetFrame (); - ZLRect bounds; - if ( this->mLayout.GetBounds ( bounds )) { + if ( frame.Area () > 0.0f ) { + + frame.Offset ( -this->mLayout.mXOffset, -this->mLayout.mYOffset ); + + if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX )) { - ZLRect frame = this->mDesigner.GetFrame (); + draw.DrawRectOutline ( frame ); + } - if ( this->mDesigner.GetLimitWidth ()) { - float xOffset = this->mLayout.mXOffset; - bounds.mXMin = frame.mXMin - xOffset; - bounds.mXMax = frame.mXMax - xOffset; + if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX_LIMITS )) { + + if ( this->mLayoutRules.GetLimitHeight ()) { + draw.DrawLine ( frame.mXMin, frame.mYMin, frame.mXMax, frame.mYMin ); + draw.DrawLine ( frame.mXMin, frame.mYMax, frame.mXMax, frame.mYMax ); } - if ( this->mDesigner.GetLimitHeight ()) { - float yOffset = this->mLayout.mYOffset; - bounds.mYMin = frame.mYMin - yOffset; - bounds.mYMax = frame.mYMax - yOffset; + if ( this->mLayoutRules.GetLimitWidth ()) { + draw.DrawLine ( frame.mXMin, frame.mYMin, frame.mXMin, frame.mYMax ); + draw.DrawLine ( frame.mXMax, frame.mYMin, frame.mXMax, frame.mYMax ); } - - draw.DrawRectOutline ( bounds ); } } - - this->mLayout.DrawDebug (); } //----------------------------------------------------------------// @@ -873,13 +975,13 @@ ZLMatrix4x4 MOAITextLabel::GetWorldDrawingMtx () { flip.Scale ( -1.0f, -1.0f, 1.0f ); // if there's no x-axis constraint, flip inside the glyph rect - if ( !this->mDesigner.GetLimitHeight ()) { + if ( !this->mLayoutRules.GetLimitWidth ()) { float xOffset = this->mLayout.mGlyphBounds.mXMin + this->mLayout.mGlyphBounds.mXMax; flip.m [ ZLMatrix4x4::C3_R0 ] = xOffset; } // if there's no y-axis constraint, flip inside the glyph rect - if ( !this->mDesigner.GetLimitHeight ()) { + if ( !this->mLayoutRules.GetLimitHeight ()) { float yOffset = this->mLayout.mGlyphBounds.mYMin + this->mLayout.mGlyphBounds.mYMax; flip.m [ ZLMatrix4x4::C3_R1 ] = yOffset; } @@ -919,7 +1021,7 @@ MOAITextLabel::MOAITextLabel () : RTTI_END this->mStyleCache.SetOwner ( this ); - this->mDesigner.SetOwner ( this ); + this->mLayoutRules.SetOwner ( this ); this->mBlendMode.SetBlend ( ZGL_BLEND_FACTOR_SRC_ALPHA, ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ); } @@ -972,9 +1074,9 @@ u32 MOAITextLabel::OnGetModelBounds ( ZLBox& bounds ) { ZLRect textBounds; // the tight fitting bounds of the text (if any: may be empty) bool hasBounds = this->mLayout.GetBounds ( textBounds ); - ZLRect textFrame = this->mDesigner.GetFrame (); - bool limitWidth = this->mDesigner.GetLimitWidth (); - bool limitHeight = this->mDesigner.GetLimitHeight (); + ZLRect textFrame = this->mLayoutRules.GetFrame (); + bool limitWidth = this->mLayoutRules.GetLimitWidth (); + bool limitHeight = this->mLayoutRules.GetLimitHeight (); if ( hasBounds ) { @@ -1006,7 +1108,7 @@ u32 MOAITextLabel::OnGetModelBounds ( ZLBox& bounds ) { //----------------------------------------------------------------// void MOAITextLabel::OnUpdate ( double step ) { - this->mSpool += ( this->mSpeed * step ); + this->mSpool += ( float )( this->mSpeed * step ); this->mReveal = ( u32 )this->mSpool; } @@ -1032,8 +1134,7 @@ void MOAITextLabel::RefreshLayout () { this->mStyleMap.BuildStyleMap ( this->mStyleCache, this->mText.c_str ()); - ZLVec2D offset ( 0.0f, 0.0f ); - this->mDesigner.Layout ( this->mLayout, this->mStyleCache, this->mStyleMap, this->mText.c_str (), this->mCurrentPageIdx, offset, &this->mMore, &this->mNextPageIdx, &this->mOverrun ); + this->mLayoutRules.Layout ( this->mLayout, this->mStyleCache, this->mStyleMap, this->mText.c_str (), this->mCurrentPageIdx, &this->mMore, &this->mNextPageIdx, &this->mOverrun ); } //----------------------------------------------------------------// @@ -1048,15 +1149,20 @@ void MOAITextLabel::RegisterLuaClass ( MOAILuaState& state ) { MOAIGraphicsProp::RegisterLuaClass ( state ); MOAIAction::RegisterLuaClass ( state ); - state.SetField ( -1, "WORD_BREAK_NONE", ( u32 )MOAITextDesigner::WORD_BREAK_NONE ); - state.SetField ( -1, "WORD_BREAK_CHAR", ( u32 )MOAITextDesigner::WORD_BREAK_CHAR ); + state.SetField ( -1, "OVERRUN_MOVE_WORD", ( u32 )MOAITextLayoutRules::OVERRUN_MOVE_WORD ); + state.SetField ( -1, "OVERRUN_SPLIT_WORD", ( u32 )MOAITextLayoutRules::OVERRUN_SPLIT_WORD ); + state.SetField ( -1, "OVERRUN_TRUNCATE_WORD", ( u32 )MOAITextLayoutRules::OVERRUN_TRUNCATE_WORD ); + state.SetField ( -1, "OVERRUN_ABORT_LAYOUT", ( u32 )MOAITextLayoutRules::OVERRUN_ABORT_LAYOUT ); + + state.SetField ( -1, "GLYPH_SIZE", ( u32 )MOAITextLayoutRules::GLYPH_SIZE ); + state.SetField ( -1, "LOGICAL_SIZE", ( u32 )MOAITextLayoutRules::LOGICAL_SIZE ); - state.SetField ( -1, "BASELINE_JUSTIFY", ( u32 )MOAITextDesigner::BASELINE_JUSTIFY ); - state.SetField ( -1, "BOTTOM_JUSTIFY", ( u32 )MOAITextDesigner::BOTTOM_JUSTIFY ); - state.SetField ( -1, "LEFT_JUSTIFY", ( u32 )MOAITextDesigner::LEFT_JUSTIFY ); - state.SetField ( -1, "CENTER_JUSTIFY", ( u32 )MOAITextDesigner::CENTER_JUSTIFY ); - state.SetField ( -1, "RIGHT_JUSTIFY", ( u32 )MOAITextDesigner::RIGHT_JUSTIFY ); - state.SetField ( -1, "TOP_JUSTIFY", ( u32 )MOAITextDesigner::TOP_JUSTIFY ); + state.SetField ( -1, "BASELINE_JUSTIFY", ( u32 )MOAITextLayoutRules::BASELINE_JUSTIFY ); + state.SetField ( -1, "BOTTOM_JUSTIFY", ( u32 )MOAITextLayoutRules::BOTTOM_JUSTIFY ); + state.SetField ( -1, "LEFT_JUSTIFY", ( u32 )MOAITextLayoutRules::LEFT_JUSTIFY ); + state.SetField ( -1, "CENTER_JUSTIFY", ( u32 )MOAITextLayoutRules::CENTER_JUSTIFY ); + state.SetField ( -1, "RIGHT_JUSTIFY", ( u32 )MOAITextLayoutRules::RIGHT_JUSTIFY ); + state.SetField ( -1, "TOP_JUSTIFY", ( u32 )MOAITextLayoutRules::TOP_JUSTIFY ); } //----------------------------------------------------------------// @@ -1070,7 +1176,9 @@ void MOAITextLabel::RegisterLuaFuncs ( MOAILuaState& state ) { { "getAlignment", _getAlignment }, { "getGlyphScale", _getGlyphScale }, { "getLineSpacing", _getLineSpacing }, + { "getOverrunRules", _getOverrunRules }, { "getRect", _getRect }, + { "getSizingRules", _getSizingRules }, { "getStyle", _getStyle }, { "getText", _getText }, { "getTextBounds", _getTextBounds }, @@ -1087,9 +1195,11 @@ void MOAITextLabel::RegisterLuaFuncs ( MOAILuaState& state ) { { "setLineSnap", _setLineSnap }, { "setLineSpacing", _setLineSpacing }, { "setHighlight", _setHighlight }, - { "setReveal", _setReveal }, + { "setOverrunRules", _setOverrunRules }, { "setRect", _setRect }, { "setRectLimits", _setRectLimits }, + { "setReveal", _setReveal }, + { "setSizingRules", _setSizingRules }, { "setSpeed", _setSpeed }, { "setStyle", _setStyle }, { "setText", _setText }, diff --git a/src/moai-sim/MOAITextLabel.h b/src/moai-sim/MOAITextLabel.h index 0270a5ea85..8447eca9ba 100644 --- a/src/moai-sim/MOAITextLabel.h +++ b/src/moai-sim/MOAITextLabel.h @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include @@ -135,31 +135,33 @@ class MOAITextLabel : static const u32 REVEAL_ALL = 0xffffffff; static const float DEFAULT_SPOOL_SPEED; - float mSpool; - float mSpeed; - float mThrottle; - u32 mReveal; + float mSpool; + float mSpeed; + float mThrottle; + u32 mReveal; - u32 mCurrentPageIdx; - u32 mNextPageIdx; - bool mMore; - bool mOverrun; - - MOAITextDesigner mDesigner; - MOAITextStyleCache mStyleCache; - MOAITextStyleMap mStyleMap; - MOAITextLayout mLayout; + u32 mCurrentPageIdx; + u32 mNextPageIdx; + bool mMore; + bool mOverrun; + + MOAITextLayoutRules mLayoutRules; // design params for laying out text + MOAITextStyleCache mStyleCache; // some style are anonymous and created ad hoc + MOAITextStyleMap mStyleMap; // preprocessed text broken up by style changes + MOAITextLayout mLayout; // cached glyph layout for currently visible text - STLString mText; + STLString mText; - bool mAutoFlip; + bool mAutoFlip; //----------------------------------------------------------------// static int _clearHighlights ( lua_State* L ); static int _getAlignment ( lua_State* L ); static int _getGlyphScale ( lua_State* L ); static int _getLineSpacing ( lua_State* L ); + static int _getOverrunRules ( lua_State* L ); static int _getRect ( lua_State* L ); + static int _getSizingRules ( lua_State* L ); static int _getStyle ( lua_State* L ); static int _getText ( lua_State* L ); static int _getTextBounds ( lua_State* L ); @@ -176,10 +178,12 @@ class MOAITextLabel : static int _setHighlight ( lua_State* L ); static int _setLineSnap ( lua_State* L ); static int _setLineSpacing ( lua_State* L ); + static int _setOverrunRules ( lua_State* L ); static int _setRect ( lua_State* L ); static int _setRectLimits ( lua_State* L ); static int _setReveal ( lua_State* L ); static int _setSpeed ( lua_State* L ); + static int _setSizingRules ( lua_State* L ); static int _setStyle ( lua_State* L ); static int _setText ( lua_State* L ); static int _setWordBreak ( lua_State* L ); diff --git a/src/moai-sim/MOAITextLayout.cpp b/src/moai-sim/MOAITextLayout.cpp index 6329d9ca99..af7311dfd2 100644 --- a/src/moai-sim/MOAITextLayout.cpp +++ b/src/moai-sim/MOAITextLayout.cpp @@ -7,17 +7,43 @@ #include #include #include -#include +#include #include #include #include -#include +#include +#include #include #include #include #define DEFAULT_STYLE_NAME "" +//================================================================// +// MOAITextLine +//================================================================// + +//----------------------------------------------------------------// +float MOAITextLine::GetAscent () { + + return this->mOrigin.mY - this->mLayoutBounds.mYMin; +} + +//----------------------------------------------------------------// +float MOAITextLine::GetDescent () { + + return this->mLayoutBounds.mYMax - this->mOrigin.mY; +} + +//----------------------------------------------------------------// +void MOAITextLine::Offset ( float xOff, float yOff ) { + + this->mOrigin.mX += xOff; + this->mOrigin.mY += yOff; + + this->mLayoutBounds.Offset ( xOff, yOff ); +} + //================================================================// // MOAITextLayout //================================================================// @@ -72,8 +98,8 @@ void MOAITextLayout::AddHighlight ( u32 base, u32 top, u32 color ) { //----------------------------------------------------------------// void MOAITextLayout::ApplyHighlights () { - u32 totalSprites = this->mSprites.GetTop (); - u32 spriteIdx = 0; + size_t totalSprites = this->mSprites.GetTop (); + size_t spriteIdx = 0; MOAITextHighlight* highlight = this->mHighlights; while (( spriteIdx < totalSprites ) && highlight ) { @@ -196,7 +222,7 @@ void MOAITextLayout::CompactHighlights () { } //----------------------------------------------------------------// -u32 MOAITextLayout::CountSprites () { +size_t MOAITextLayout::CountSprites () { return this->mSprites.GetTop (); } @@ -206,22 +232,22 @@ void MOAITextLayout::Draw ( u32 reveal, MOAIShader* defaultShader, bool useSprit if ( reveal ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); - ZLColorVec baseColor = gfxDevice.GetPenColor (); + ZLColorVec baseColor = gfxMgr.mGfxState.GetPenColor (); ZLColorVec blendColor; u32 rgba0 = 0xffffffff; u32 rgba1 = 0xffffffff; if ( !useSpriteShaders ) { - gfxDevice.SetShader ( defaultShader ); + if ( !gfxMgr.mGfxState.BindShader ( defaultShader )) return; } MOAIShader* currentShader = 0; - u32 size = this->mSprites.GetTop (); - for ( u32 i = 0; ( i < size ) && ( i < reveal ); ++i ) { + size_t size = this->mSprites.GetTop (); + for ( size_t i = 0; ( i < size ) && ( i < reveal ); ++i ) { const MOAITextSprite& sprite = this->mSprites [ i ]; const MOAITextStyleState* style = sprite.mStyle; @@ -232,14 +258,14 @@ void MOAITextLayout::Draw ( u32 reveal, MOAIShader* defaultShader, bool useSprit blendColor.SetRGBA ( rgba0 ); blendColor.Modulate ( baseColor ); - gfxDevice.SetPenColor ( blendColor ); + gfxMgr.mGfxState.SetPenColor ( blendColor ); } if ( useSpriteShaders ) { MOAIShader* spriteShader = sprite.mShader ? sprite.mShader : defaultShader; if ( spriteShader != currentShader ) { - gfxDevice.SetShader ( spriteShader ); + if ( !gfxMgr.mGfxState.BindShader ( spriteShader )) continue; currentShader = spriteShader; } } @@ -258,11 +284,12 @@ void MOAITextLayout::DrawDebug () { if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX_GLYPHS )) { - u32 size = this->mSprites.GetTop (); - for ( u32 i = 0; i < size; ++i ) { + size_t size = this->mSprites.GetTop (); + for ( size_t i = 0; i < size; ++i ) { const MOAITextSprite& sprite = this->mSprites [ i ]; - ZLRect glyphRect = sprite.mGlyph->GetRect ( sprite.mPen.mX, sprite.mPen.mY, sprite.mScale.mX, sprite.mScale.mY ); + // TODO: change up the way padding works - should be innate to the glyph + ZLRect glyphRect = sprite.mGlyph->GetGlyphRect ( sprite.mPen.mX, sprite.mPen.mY, sprite.mScale.mX, sprite.mScale.mY ); const ZLRect& padding = sprite.mStyle->mPadding; glyphRect.mXMin += padding.mXMin; @@ -274,27 +301,31 @@ void MOAITextLayout::DrawDebug () { } } - if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX_LAYOUT )) { + if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX_LINES_GLYPH_BOUNDS )) { - u32 totalLines = this->mLines.GetTop (); - for ( u32 i = 0; i < totalLines; ++i ) { + size_t totalLines = this->mLines.GetTop (); + for ( size_t i = 0; i < totalLines; ++i ) { MOAITextLine& line = this->mLines [ i ]; - draw.DrawRectOutline ( line.mRect ); + draw.DrawRectOutline ( line.mGlyphBounds ); } } - if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX_GLYPH_BOUNDS )) { - - draw.DrawRectOutline ( this->mGlyphBounds ); + if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX_LINES_LAYOUT_BOUNDS )) { + + size_t totalLines = this->mLines.GetTop (); + for ( size_t i = 0; i < totalLines; ++i ) { + MOAITextLine& line = this->mLines [ i ]; + draw.DrawRectOutline ( line.mLayoutBounds ); + } } if ( debugLines.Bind ( MOAIDebugLines::TEXT_BOX_BASELINES )) { - u32 totalLines = this->mLines.GetTop (); - for ( u32 i = 0; i < totalLines; ++i ) { + size_t totalLines = this->mLines.GetTop (); + for ( size_t i = 0; i < totalLines; ++i ) { MOAITextLine& line = this->mLines [ i ]; - float y = line.mRect.mYMin + line.mAscent; - draw.DrawLine ( line.mRect.mXMin, y, line.mRect.mXMax, y ); + float y = line.mOrigin.mY; + draw.DrawLine ( line.mLayoutBounds.mXMin, y, line.mLayoutBounds.mXMax, y ); } } } @@ -304,16 +335,16 @@ void MOAITextLayout::FindSpriteSpan ( u32 idx, u32 size, u32& spanIdx, u32& span spanSize = 0; - u32 top = this->mSprites.GetTop (); + size_t top = this->mSprites.GetTop (); if ( !top ) return; if ( this->mSprites [ 0 ].mIdx >= ( idx + size )) return; if ( this->mSprites [ top - 1 ].mIdx < idx ) return; - for ( u32 i = 0; i < top; ++i ) { + for ( size_t i = 0; i < top; ++i ) { MOAITextSprite& sprite = this->mSprites [ i ]; if ( sprite.mIdx >= idx ) { - spanIdx = i; + spanIdx = ( u32 )i; spanSize = 1; break; } @@ -363,7 +394,7 @@ bool MOAITextLayout::GetBoundsForRange ( u32 idx, u32 size, ZLRect& rect ) { if ( glyph.mWidth > 0.0f ) { - ZLRect glyphRect = glyph.GetRect ( sprite.mPen.mX, sprite.mPen.mY, sprite.mScale.mX, sprite.mScale.mY ); + ZLRect glyphRect = glyph.GetGlyphRect ( sprite.mPen.mX, sprite.mPen.mY, sprite.mScale.mX, sprite.mScale.mY ); // Update the glyphRect height with the size of the of the glyphset's height for // the max possible line height. @@ -400,35 +431,43 @@ MOAITextLayout::~MOAITextLayout () { } //----------------------------------------------------------------// -void MOAITextLayout::PushLine ( u32 start, u32 size, const ZLRect& rect, float height, float ascent ) { +void MOAITextLayout::PushLine ( u32 start, u32 size, const ZLVec2D& origin, const ZLRect& layoutBounds ) { + + if ( layoutBounds.mYMin == layoutBounds.mYMax ) return; MOAITextLine textLine; - textLine.mStart = start; - textLine.mSize = size; - textLine.mRect = rect; - textLine.mHeight = height; - textLine.mAscent = ascent; + textLine.mStart = start; + textLine.mSize = size; + + textLine.mOrigin = origin; + textLine.mLayoutBounds = layoutBounds; this->mLines.Push ( textLine ); } //----------------------------------------------------------------// -void MOAITextLayout::PushSprite ( u32 idx, MOAIGlyph& glyph, MOAITextStyleState& style, float x, float y, float xScale, float yScale ) { +void MOAITextLayout::PushSprite ( const MOAITextStyledChar& styledChar, float x, float y ) { + + MOAIGlyph* glyph = styledChar.mGlyph; + assert ( glyph ); + + MOAITextStyleState* style = styledChar.mStyle; + assert ( style ); MOAITextSprite textSprite; - textSprite.mIdx = idx; - textSprite.mGlyph = &glyph; - textSprite.mStyle = &style; + textSprite.mIdx = styledChar.mIdx; + textSprite.mGlyph = glyph; + textSprite.mStyle = style; textSprite.mPen.mX = x; textSprite.mPen.mY = y; - textSprite.mScale.mX = xScale; - textSprite.mScale.mY = yScale; + textSprite.mScale.mX = styledChar.mScale.mX; + textSprite.mScale.mY = styledChar.mScale.mY; - textSprite.mRGBA = style.mColor; - textSprite.mTexture = style.mFont->GetGlyphTexture ( glyph ); - textSprite.mShader = style.mShader ? style.mShader : style.mFont->GetShader (); + textSprite.mRGBA = style->mColor; + textSprite.mTexture = style->mFont->GetGlyphTexture ( *glyph ); + textSprite.mShader = style->mShader ? style->mShader : style->mFont->GetShader (); textSprite.mMask = 0; this->mSprites.Push ( textSprite ); @@ -462,8 +501,8 @@ void MOAITextLayout::Reset () { //----------------------------------------------------------------// void MOAITextLayout::ResetHighlights () { - u32 top = this->mSprites.GetTop (); - for ( u32 i = 0; i > top; ++i ) { + size_t top = this->mSprites.GetTop (); + for ( size_t i = 0; i > top; ++i ) { MOAITextSprite& sprite = this->mSprites [ i ]; sprite.mMask = sprite.mMask & ~MOAITextSprite::MASK_COLOR; } diff --git a/src/moai-sim/MOAITextLayout.h b/src/moai-sim/MOAITextLayout.h index 47b9d7726d..8a988a5334 100644 --- a/src/moai-sim/MOAITextLayout.h +++ b/src/moai-sim/MOAITextLayout.h @@ -6,10 +6,12 @@ #include #include +#include #include #include class MOAIShader; +class MOAITextStyledChar; //================================================================// // MOAITextSprite @@ -18,7 +20,7 @@ class MOAITextSprite { private: friend class MOAITextLabel; - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextLayout; MOAIGlyph* mGlyph; @@ -43,18 +45,23 @@ class MOAITextSprite { class MOAITextLine { private: - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextLabel; friend class MOAITextLayout; - u32 mStart; // index in sprite stack - u32 mSize; // number of sprites in line; - ZLRect mRect; // tight bounds of glyphs in the line - float mHeight; // total height of the line (irrespective of the glyphs) - float mAscent; // offset to the text baseline + u32 mStart; // index in sprite stack + u32 mSize; // number of sprites in line; + + ZLVec2D mOrigin; // offset to line 'hotspot' - origin of drawing + ZLRect mGlyphBounds; // tight fitting glyph bounds + ZLRect mLayoutBounds; // bounds used for layout and alignment of line public: + //----------------------------------------------------------------// + float GetAscent (); + float GetDescent (); + void Offset ( float xOff, float yOff ); }; //================================================================// @@ -78,10 +85,11 @@ class MOAITextHighlight { //================================================================// // MOAITextLayout //================================================================// +// this is a buffer that holds glyphs once they've been laid out class MOAITextLayout { private: - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextLabel; // this is the text page layout. these are the actual sprites and lines @@ -89,13 +97,13 @@ class MOAITextLayout { ZLLeanStack < MOAITextSprite, 64 > mSprites; ZLLeanStack < MOAITextLine, 8 > mLines; - ZLRect mGlyphBounds; // tight-fitting bounds including only actual glyphs - ZLRect mLayoutBounds; // includes padding for font + ZLRect mGlyphBounds; + ZLRect mLayoutBounds; // bounds used for sizing and alignment // calculated during alignment // - the text is laid out in model space with the origin at the *center* of the text frame // - centering the text makes it easy to flip the textbox by prepending a rotation or scale - // - before the main transform, apply the offset to get the correct text position + // - before the main transform, apply the offset to get the correct text position float mXOffset; float mYOffset; @@ -105,18 +113,19 @@ class MOAITextLayout { //----------------------------------------------------------------// void CompactHighlights (); void FindSpriteSpan ( u32 idx, u32 size, u32& spanIdx, u32& spanSize ); - void PushLine ( u32 start, u32 size, const ZLRect& rect, float height, float ascent ); - void PushSprite ( u32 idx, MOAIGlyph& glyph, MOAITextStyleState& style, float x, float y, float xScale, float yScale ); - void PushStyleSpan ( int base, int top, MOAITextStyle& style ); + void PushLine ( u32 start, u32 size, const ZLVec2D& origin, const ZLRect& layoutBounds ); + void PushSprite ( const MOAITextStyledChar& styledChar, float x, float y ); public: + GET ( const ZLRect&, LayoutBounds, mLayoutBounds ) + //----------------------------------------------------------------// void AddHighlight ( u32 base, u32 top, u32 color ); void ApplyHighlights (); void ClearHighlight ( u32 base, u32 top ); void ClearHighlights (); - u32 CountSprites (); + size_t CountSprites (); void Draw ( u32 reveal, MOAIShader* defaultShader, bool useSpriteShaders ); void DrawDebug (); bool GetBounds ( ZLRect& rect ); diff --git a/src/moai-sim/MOAITextLayoutEngine.cpp b/src/moai-sim/MOAITextLayoutEngine.cpp new file mode 100644 index 0000000000..6ccc0b80f3 --- /dev/null +++ b/src/moai-sim/MOAITextLayoutEngine.cpp @@ -0,0 +1,563 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================// +// MOAILayoutEngineState +//================================================================// + +//----------------------------------------------------------------// +MOAILayoutEngineState::MOAILayoutEngineState () : + mStyleSpan ( 0 ), + mSpanIdx ( 0 ), + mCharIdx ( 0 ), + mSpriteIdx ( 0 ) { +} + +//----------------------------------------------------------------// +MOAILayoutEngineState::~MOAILayoutEngineState () { +} + + +//================================================================// +// MOAITextLayoutEngine +//================================================================// + +//----------------------------------------------------------------// +void MOAITextLayoutEngine::Align () { + + u32 totalLines = ( u32 )this->mLayout->mLines.GetTop (); + + if ( totalLines == 0 ) return; + + ZLRect glyphBounds; + ZLRect layoutBounds; + + glyphBounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); + layoutBounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); + + //bool hasSprites = ( this->mLayout->mSprites.GetTop () > 0 ); + + u32 baseLine = this->mBaseLine; + + bool limitWidth = this->mLayoutRules->mLimitWidth; + bool limitHeight = this->mLayoutRules->mLimitHeight; + + // this is for alignment; text should already be within bounds, if constrained + float width = limitWidth ? this->mLayoutRules->mFrame.Width () : this->mLayoutBounds.Width (); + float height = limitHeight ? this->mLayoutRules->mFrame.Height () : this->mLayoutBounds.Height (); + + float layoutHeight = this->mLayoutBounds.Height (); + + float xMin = limitWidth ? this->mLayoutRules->mFrame.mXMin : 0.0f; + float xMax = xMin + width; + + float yMin = limitHeight ? this->mLayoutRules->mFrame.mYMin : 0.0f; + float yMax = yMin + height; + + float xOffsetToCenter = -this->Snap ( xMin + ( width * 0.5f ), this->mLayoutRules->mHLineSnap ); + float yOffsetToCenter = -this->Snap ( yMin + ( height * 0.5f ), this->mLayoutRules->mVLineSnap ); + + float adjustedLayoutYMin = yMin; + + switch ( this->mLayoutRules->mVAlign ) { + + case MOAITextLayoutRules::CENTER_JUSTIFY: + adjustedLayoutYMin = yMin + ( height * 0.5f ) - ( layoutHeight * 0.5f ); + break; + + case MOAITextLayoutRules::TOP_JUSTIFY: + adjustedLayoutYMin = yMin; + break; + + case MOAITextLayoutRules::BOTTOM_JUSTIFY: + adjustedLayoutYMin = yMax - layoutHeight; + break; + + default: + break; + } + + float lineYOffset = adjustedLayoutYMin - this->mLayoutBounds.mYMin; + + MOAIAnimCurve** curves = this->mLayoutRules->mCurves; + u32 totalCurves = ( u32 )this->mLayoutRules->mCurves.Size (); + + for ( u32 i = baseLine; i < totalLines; ++i ) { + + MOAITextLine& line = this->mLayout->mLines [ i ]; + const ZLRect& lineRect = line.mLayoutBounds; + + float lineWidth = lineRect.Width (); + //float lineHeight = lineRect.Height (); + + float adjustedLineXMin = xMin; + float adjustedLineYMin = lineRect.mYMin + lineYOffset; + + switch ( this->mLayoutRules->mHAlign ) { + + case MOAITextLayoutRules::CENTER_JUSTIFY: + adjustedLineXMin = xMin + ( width * 0.5f ) - ( lineWidth * 0.5f ); + break; + + case MOAITextLayoutRules::LEFT_JUSTIFY: + adjustedLineXMin = xMin; + break; + + case MOAITextLayoutRules::RIGHT_JUSTIFY: + adjustedLineXMin = xMax - lineWidth; + break; + + default: + break; + } + + float adjustedLineX = line.mOrigin.mX + ( adjustedLineXMin - lineRect.mXMin ); + float adjustedLineY = line.mOrigin.mY + ( adjustedLineYMin - lineRect.mYMin ); + + adjustedLineX = this->Snap ( adjustedLineX, this->mLayoutRules->mHLineSnap ) + xOffsetToCenter; + adjustedLineY = this->Snap ( adjustedLineY, this->mLayoutRules->mVLineSnap ) + yOffsetToCenter; + + float xOff = adjustedLineX - line.mOrigin.mX; + float yOff = adjustedLineY - line.mOrigin.mY; + + line.Offset ( xOff, yOff ); + + MOAIAnimCurve* curve = curves ? curves [( i - baseLine ) % totalCurves ] : 0; + + for ( u32 j = 0; j < line.mSize; ++j ) { + + MOAITextSprite& sprite = this->mLayout->mSprites [ line.mStart + j ]; + + //sprite.mPen.mX += ( line.mOrigin.mX ) - xMin; + //sprite.mPen.mY += ( line.mOrigin.mY + ( curve ? curve->GetValue (( sprite.mPen.mX - xMin ) / width ) : 0.0f )) - yMin; + + sprite.mPen.mX += xOff; + sprite.mPen.mY += line.mOrigin.mY + ( curve ? curve->GetValue (( sprite.mPen.mX - xMin ) / width ) : 0.0f ); + + //printf ( "SPRITE: %f %f\n", sprite.mPen.mX, sprite.mPen.mY ); + + ZLRect glyphRect = sprite.mGlyph->GetGlyphRect ( sprite.mPen.mX, sprite.mPen.mY, sprite.mScale.mX, sprite.mScale.mY ); + glyphRect.Inflate ( sprite.mStyle->mPadding ); + line.mGlyphBounds.Grow ( glyphRect, j > 0 ); + } + + glyphBounds.Grow ( line.mGlyphBounds, i > 0 ); + layoutBounds.Grow ( line.mLayoutBounds, i > 0 ); + } + + // center texbox in model space to make autoflip easier to implement + + this->mLayout->mXOffset = -xOffsetToCenter; + + if ( limitWidth == false ) { + + switch ( this->mLayoutRules->mHAlign ) { + + case MOAITextLayoutRules::CENTER_JUSTIFY: + this->mLayout->mXOffset = 0.0f; + break; + + case MOAITextLayoutRules::LEFT_JUSTIFY: + this->mLayout->mXOffset = -xOffsetToCenter; + break; + + case MOAITextLayoutRules::RIGHT_JUSTIFY: + this->mLayout->mXOffset = xOffsetToCenter; + break; + + default: + break; + } + } + + this->mLayout->mYOffset = -yOffsetToCenter; + + if ( limitHeight == false ) { + + switch ( this->mLayoutRules->mVAlign ) { + + case MOAITextLayoutRules::CENTER_JUSTIFY: + this->mLayout->mYOffset = 0.0f; + break; + + case MOAITextLayoutRules::TOP_JUSTIFY: + this->mLayout->mYOffset = yOffsetToCenter; + break; + + case MOAITextLayoutRules::BOTTOM_JUSTIFY: + this->mLayout->mYOffset = -yOffsetToCenter; + break; + + case MOAITextLayoutRules::BASELINE_JUSTIFY: { + float sign = this->mLayoutRules->mYFlip ? 1.0f : -1.0f; + float firstLineAscent = this->mLayout->mLines [ 0 ].GetAscent (); + this->mLayout->mYOffset = ( yOffsetToCenter + firstLineAscent ) * sign; + break; + } + + default: + break; + } + } + +// printf ( "OFFSET: %f %f\n", this->mLayout->mXOffset, this->mLayout->mYOffset ); + + this->mLayout->mGlyphBounds = glyphBounds; + this->mLayout->mLayoutBounds = layoutBounds; + +// printf ( "GLYPH BOUNDS: %f %f %f %f\n", +// this->mLayout->mGlyphBounds.mXMin, +// this->mLayout->mGlyphBounds.mYMin, +// this->mLayout->mGlyphBounds.mXMax, +// this->mLayout->mGlyphBounds.mYMax +// ); +// +// printf ( "LAYOUT BOUNDS: %f %f %f %f\n", +// this->mLayout->mLayoutBounds.mXMin, +// this->mLayout->mLayoutBounds.mYMin, +// this->mLayout->mLayoutBounds.mXMax, +// this->mLayout->mLayoutBounds.mYMax +// ); +} + +//----------------------------------------------------------------// +void MOAITextLayoutEngine::BeginChar () { + + this->CaptureRestorePoint ( RESTORE_POINT_CHAR ); +} + +//----------------------------------------------------------------// +void MOAITextLayoutEngine::BeginToken () { + + this->mRestorePoints [ RESTORE_POINT_TOKEN ] = this->mRestorePoints [ RESTORE_POINT_CHAR ]; +} + +//----------------------------------------------------------------// +void MOAITextLayoutEngine::BuildLayout () { + + //bool limitWidth = this->mLayoutRules->mLimitWidth; + //bool limitHeight = this->mLayoutRules->mLimitHeight; + + //float frameWidth = this->mLayoutRules->mFrame.Width (); + //float frameHeight = this->mLayoutRules->mFrame.Height (); + + bool more = true; + while ( more ) { + + this->CaptureRestorePoint ( RESTORE_POINT_LINE ); + + u32 startingCharIdx = this->GetCharIndex (); + + MOAITextSimpleShaper shaper; + u32 wrap = shaper.ShapeLine ( *this, *this->mLayoutRules ); + + switch ( wrap ) { + + case MOAITextLayoutRules::OVERRUN_NONE: + break; + + case MOAITextLayoutRules::OVERRUN_MOVE_WORD: + + this->Restore ( RESTORE_POINT_TOKEN ); + break; + + case MOAITextLayoutRules::OVERRUN_ABORT_LAYOUT: + + more = false; + this->Restore ( RESTORE_POINT_TOKEN ); + break; + + case MOAITextLayoutRules::OVERRUN_TRUNCATE_WORD: + case MOAITextLayoutRules::OVERRUN_SPLIT_WORD: + + this->Restore ( RESTORE_POINT_CHAR ); + break; + } + + this->mOverrun = wrap != MOAITextLayoutRules::OVERRUN_NONE; + + if ( this->GetCharIndex () > startingCharIdx ) { + + u32 result = this->PushLine (); + + if ( result != PUSH_OK ) { + this->Restore ( RESTORE_POINT_LINE ); + more = false; + } + } + else { + more = false; + } + } + + this->Align (); +} + +//----------------------------------------------------------------// +void MOAITextLayoutEngine::BuildLayout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, MOAITextLayoutRules& layoutRules, cc8* str, u32 idx ) { + + if ( styleMap.CountSpans () == 0 ) return; + + this->mLayout = &layout; + this->mStyleCache = &styleCache; + this->mStyleMap = &styleMap; + this->mLayoutRules = &layoutRules; + + this->mStr = str; + this->mCharIdx = idx; + this->mSpriteIdx = ( u32 )this->mLayout->mSprites.GetTop (); + + this->mStyleSpan = 0; + this->mSpanIdx = 0; + + this->mLayoutBounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); + this->mLineLayoutBounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); + + this->mLineSpacingBounds.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); + this->mLineSpacingCursor = 0.0f; + + this->mBaseLine = ( u32 )layout.mLines.GetTop (); + + memset ( &this->mCurrentChar, 0, sizeof ( MOAITextStyledChar )); + this->mCurrentChar.mScale.Init ( 1.0f, 1.0f ); + + this->mCurrentGlyphDeck = 0; + + this->mResetStyle = true; + this->mOverrun = false; + + this->BuildLayout (); +} + +//----------------------------------------------------------------// +void MOAITextLayoutEngine::CaptureRestorePoint ( u32 restorePointID ) { + + this->mRestorePoints [ restorePointID ] = *( MOAILayoutEngineState* )this; +} + +//----------------------------------------------------------------// +u32 MOAITextLayoutEngine::GetCharIndex () { + + return this->mCharIdx; +} + +//----------------------------------------------------------------// +u32 MOAITextLayoutEngine::GetLineSizeInSprites () { + + return ( u32 )this->mLayout->mSprites.GetTop () - this->GetLineSpriteIdx (); +} + +//----------------------------------------------------------------// +u32 MOAITextLayoutEngine::GetLineSpriteIdx () { + + return this->mRestorePoints [ RESTORE_POINT_LINE ].mSpriteIdx; +} + +//----------------------------------------------------------------// +u32 MOAITextLayoutEngine::GetSpriteIndex () { + + return ( u32 )this->mLayout->mSprites.GetTop (); // TODO: cast +} + +//----------------------------------------------------------------// +MOAITextLayoutEngine::MOAITextLayoutEngine () : + mStr ( 0 ), + mLineSpacingCursor ( 0.0f ), + mEmptyLineAscent ( 0.0f ), + mEmptyLineDescent ( 0.0f ), + mBaseLine ( 0 ), + mCurrentGlyphDeck ( 0 ), + mResetStyle ( false ), + mOverrun ( false ), + mLayoutRules ( 0 ), + mLayout ( 0 ), + mStyleCache ( 0 ), + mStyleMap ( 0 ) { +} + +//----------------------------------------------------------------// +MOAITextLayoutEngine::~MOAITextLayoutEngine () { +} + +//----------------------------------------------------------------// +bool MOAITextLayoutEngine::More () { + + return ( this->mStr && ( this->mStr [ this->mCharIdx ] != NULL )); +} + +//----------------------------------------------------------------// +MOAITextStyledChar MOAITextLayoutEngine::NextChar () { + + this->mCurrentChar.mChar = 0; // set this here so shaper will abort if we return due to an error. + + if ( !this->mStyleSpan ) { + this->mStyleSpan = &this->mStyleMap->Elem ( 0 ); + this->mSpanIdx = 0; + this->mResetStyle = true; + } + + if (( int )this->mCharIdx >= this->mStyleSpan->mTop ) { + + this->mStyleSpan = 0; + + u32 totalStyles = ( u32 )this->mStyleMap->GetTop (); + for ( this->mSpanIdx++; this->mSpanIdx < totalStyles; this->mSpanIdx++ ) { + MOAITextStyleSpan& styleSpan = this->mStyleMap->Elem ( this->mSpanIdx ); + + if (( int )this->mCharIdx < styleSpan.mTop ) { + this->mStyleSpan = &styleSpan; + this->mResetStyle = true; + break; + } + } + } + + if ( this->mStyleSpan ) { + + if ( this->mResetStyle ) { + + MOAITextStyleState* defaultStyle = this->mStyleCache->GetStyle (); + MOAIFont* defaultFont = defaultStyle ? defaultStyle->mFont : 0; + + if (( int )this->mCharIdx < this->mStyleSpan->mBase ) { + this->mCharIdx = this->mStyleSpan->mBase; + } + + MOAITextStyleState* style = 0; + + style = this->mStyleSpan->mStyle; + style = style ? style : defaultStyle; + if ( !style ) return this->mCurrentChar; // TODO: report error + + MOAIFont* font = style->mFont; + font = font ? font : defaultFont; + if ( !font ) return this->mCurrentChar; // TODO: report error + + this->mCurrentGlyphDeck = font->GetGlyphSet ( style->mSize ); + if ( !this->mCurrentGlyphDeck && defaultFont ) { + this->mCurrentGlyphDeck = defaultFont->GetGlyphSet ( style->mSize ); + } + + if ( !this->mCurrentGlyphDeck ) return this->mCurrentChar; // TODO: report error + + float deckScale = this->mCurrentGlyphDeck && ( style->mSize > 0.0f ) ? style->mSize / this->mCurrentGlyphDeck->GetSize () : 1.0f; + + this->mCurrentChar.mStyle = style; + this->mCurrentChar.mScale.mX = this->mLayoutRules->mGlyphScale * style->mScale.mX * deckScale; + this->mCurrentChar.mScale.mY = this->mLayoutRules->mGlyphScale * style->mScale.mY * deckScale; + + this->mResetStyle = false; + } + + this->mCurrentChar.mIdx = this->mCharIdx; + this->mCurrentChar.mChar = moai_u8_nextchar ( this->mStr, ( int* )&this->mCharIdx ); // advances the character index + + if ( !MOAIFont::IsControl ( this->mCurrentChar.mChar )) { + this->mCurrentChar.mGlyph = this->mCurrentGlyphDeck->GetGlyph ( this->mCurrentChar.mChar ); + } + } + return this->mCurrentChar; +} + +//----------------------------------------------------------------// +bool MOAITextLayoutEngine::Overrun () { + + return this->mOverrun; +} + +//----------------------------------------------------------------// +u32 MOAITextLayoutEngine::PushLine () { + + u32 lineSizeInSprites = this->GetLineSizeInSprites (); + + if ( lineSizeInSprites == 0 ) { + + float ascent = this->mCurrentGlyphDeck->GetAscent (); + float descent = this->mCurrentGlyphDeck->GetDescent (); + + this->mLineLayoutBounds.Init ( 0.0f, -ascent, 0.0f, descent ); + this->mLineSpacingBounds = this->mLineLayoutBounds; + } + + u32 totalLines = ( u32 )this->mLayout->mLines.GetTop (); + + float yPen = 0.0f; + + // this works because all the rectangles are first drawn with their baselines at the origin + if ( totalLines > 0 ) { + yPen = ( this->mLineSpacingCursor - this->mLineSpacingBounds.mYMin ) + this->mLayoutRules->mLineSpacing; + this->mLineLayoutBounds.Offset ( 0.0f, yPen ); + this->mLineSpacingBounds.Offset ( 0.0f, yPen ); + } + this->mLineSpacingCursor = this->mLineSpacingBounds.mYMax; + + ZLRect newLayoutBounds = this->mLayoutBounds; + newLayoutBounds.Grow ( this->mLineLayoutBounds, ( totalLines > 0 )); + + if ( this->mLayoutRules->mLimitHeight ) { + + float frameHeight = this->mLayoutRules->GetFrame ().Height (); + if ( newLayoutBounds.Height () > frameHeight ) return PUSH_OVERRUN; + } + + this->mLayout->PushLine ( this->GetLineSpriteIdx (), this->GetLineSizeInSprites (), ZLVec2D ( 0.0f, yPen ), this->mLineLayoutBounds ); + this->mLayoutBounds = newLayoutBounds; + + return PUSH_OK; +} + +//----------------------------------------------------------------// +u32 MOAITextLayoutEngine::PushSprite ( const MOAITextStyledChar& styledChar, float x, float y ) { + + float xScale = styledChar.mScale.mX; + float yScale = styledChar.mScale.mY; + + MOAIGlyph* glyph = styledChar.mGlyph; + + ZLRect glyphLayoutRect = this->mLayoutRules->GetGlyphLayoutRect ( *glyph, x, y, xScale, yScale ); + ZLRect glyphSpacingRect = this->mLayoutRules->GetGlyphSpacingRect ( *glyph, x, y, xScale, yScale ); + + if ( this->mLayoutRules->mLimitWidth ) { + float frameWidth = this->mLayoutRules->GetFrame ().Width (); + if ( glyphLayoutRect.mXMax > frameWidth ) return PUSH_OVERRUN; + } + + u32 lineSizeInSprites = this->GetLineSizeInSprites (); + + this->mLineLayoutBounds.Grow ( glyphLayoutRect, ( lineSizeInSprites > 0 )); + this->mLineSpacingBounds.Grow ( glyphSpacingRect, ( lineSizeInSprites > 0 )); + + this->mLayout->PushSprite ( styledChar, x, y ); + + this->mSpriteIdx = ( u32 )this->mLayout->mSprites.GetTop (); + + return PUSH_OK; +} + +//----------------------------------------------------------------// +void MOAITextLayoutEngine::Restore ( u32 restorePointID ) { + + *( MOAILayoutEngineState* )this = this->mRestorePoints [ restorePointID ]; + + this->mLayout->mSprites.SetTop ( this->mSpriteIdx ); + + this->mResetStyle = true; +} + +//----------------------------------------------------------------// +float MOAITextLayoutEngine::Snap ( float f, float b ) { + + return ( b > 0.0f ) ? floorf (( f / b ) + 0.5f ) * b : f; +} diff --git a/src/moai-sim/MOAITextLayoutEngine.h b/src/moai-sim/MOAITextLayoutEngine.h new file mode 100644 index 0000000000..2230a29ac3 --- /dev/null +++ b/src/moai-sim/MOAITextLayoutEngine.h @@ -0,0 +1,115 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAITEXTLAYOUTENGINE_H +#define MOAITEXTLAYOUTENGINE_H + +#include + +class MOAITextLayoutRules; +class MOAITextLayout; +class MOAITextStyle; +class MOAITextStyleCache; +class MOAITextStyleMap; +class MOAITextStyler; +class MOAITextStyleSpan; +class MOAITextStyleState; + +//================================================================// +// MOAILayoutEngineState +//================================================================// +class MOAILayoutEngineState { +protected: + + friend class MOAITextLayoutEngine; + + MOAITextStyleSpan* mStyleSpan; + u32 mSpanIdx; + + u32 mCharIdx; + u32 mSpriteIdx; + ZLRect mLineLayoutBounds; + ZLRect mLineSpacingBounds; + + //----------------------------------------------------------------// + MOAILayoutEngineState (); + ~MOAILayoutEngineState (); +}; + +//================================================================// +// MOAITextLayoutEngine +//================================================================// +// parser for producing a layout +class MOAITextLayoutEngine : + public MOAITextShaperClient, + public MOAILayoutEngineState { +private: + + enum { + RESTORE_POINT_CHAR, + RESTORE_POINT_TOKEN, + RESTORE_POINT_LINE, + TOTAL_RESTORE_POINTS, + }; + + // a note about terminology: + // *layout* bounds (as opposed to *logical*) bounds are calculated based on the + // text designer's sizing/alignment rule. they may be distinct from the glyph + // bounds, the visible bounds and the logical bounds. + + //----------------------------------------------------------------// + // layout state + + cc8* mStr; + + ZLRect mLayoutBounds; + + float mLineSpacingCursor; + float mEmptyLineAscent; + float mEmptyLineDescent; + + u32 mBaseLine; + + MOAITextStyledChar mCurrentChar; + MOAIGlyphSet* mCurrentGlyphDeck; + + MOAILayoutEngineState mRestorePoints [ TOTAL_RESTORE_POINTS ]; + + bool mResetStyle; + bool mOverrun; + + //----------------------------------------------------------------// + // layout settings + + MOAITextLayoutRules* mLayoutRules; + MOAITextLayout* mLayout; + MOAITextStyleCache* mStyleCache; + MOAITextStyleMap* mStyleMap; + + //----------------------------------------------------------------// + void Align (); + void BeginChar (); + void BeginToken (); + void BuildLayout (); + void CaptureRestorePoint ( u32 restorePointID ); + u32 GetLineSizeInSprites (); + u32 GetLineSpriteIdx (); + u32 GetSpriteIndex (); + MOAITextStyledChar NextChar (); + u32 PushLine (); + u32 PushSprite ( const MOAITextStyledChar& styledChar, float x, float y ); + void Restore ( u32 restorePointID ); + float Snap ( float f, float b ); + +public: + + //----------------------------------------------------------------// + void BuildLayout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, MOAITextLayoutRules& layoutRules, cc8* str, u32 idx ); + u32 GetCharIndex (); + MOAITextLayoutEngine (); + virtual ~MOAITextLayoutEngine (); + bool More (); + bool Overrun (); +}; + +#endif diff --git a/src/moai-sim/MOAITextLayoutRules.cpp b/src/moai-sim/MOAITextLayoutRules.cpp new file mode 100644 index 0000000000..7be1c51fb0 --- /dev/null +++ b/src/moai-sim/MOAITextLayoutRules.cpp @@ -0,0 +1,192 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================// +// MOAITextLayoutRules +//================================================================// + +//----------------------------------------------------------------// +void MOAITextLayoutRules::ClearCurves () { + + for ( u32 i = 0; i < this->mCurves.Size (); ++i ) { + this->ReleaseCurve ( this->mCurves [ i ]); + } + this->mCurves.Clear (); +} + +//----------------------------------------------------------------// +ZLRect MOAITextLayoutRules::GetGlyphRect ( const MOAIGlyph& glyph, float x, float y, float xScale, float yScale, u32 hRule, u32 vRule ) { + UNUSED ( hRule ); + + const MOAIGlyphSet& glyphSet = glyph.GetDeck (); + + ZLRect rect; + + x += ( glyph.mBearingX * xScale ); + + rect.mXMin = x; + rect.mXMax = x + ( glyph.mWidth * xScale ); + + switch ( vRule ) { + + case GLYPH_SIZE: + + y -= ( glyph.mBearingY * yScale ); + + rect.mYMin = y; + rect.mYMax = y + ( glyph.mHeight * yScale ); + break; + + case LOGICAL_SIZE: + + rect.mYMin = y - ( glyphSet.GetAscent () * yScale ), + rect.mYMax = y + ( glyphSet.GetDescent () * yScale ); + break; + + case MAXIMUM_SIZE: + case VISIBLE_SIZE: + case VISIBLE_OR_LOGICAL_SIZE: + assert ( 0 ); // TODO: unsupported + break; + } + + return rect; +} + +//----------------------------------------------------------------// +ZLRect MOAITextLayoutRules::GetGlyphLayoutRect ( const MOAIGlyph& glyph, float x, float y, float xScale, float yScale ) { + + return MOAITextLayoutRules::GetGlyphRect ( glyph, x, y, xScale, yScale, this->mHLayoutSizingRule, this->mVLayoutSizingRule ); +} + +//----------------------------------------------------------------// +ZLRect MOAITextLayoutRules::GetGlyphSpacingRect ( const MOAIGlyph& glyph, float x, float y, float xScale, float yScale ) { + + return MOAITextLayoutRules::GetGlyphRect ( glyph, x, y, xScale, yScale, this->mLineSizingRule, this->mLineSizingRule ); +} + +//----------------------------------------------------------------// +void MOAITextLayoutRules::Init ( const MOAITextLayoutRules& designer ) { + + this->ClearCurves (); + + this->mOwner = designer.mOwner; + this->mFrame = designer.mFrame; + this->mLimitWidth = designer.mLimitWidth; + this->mLimitHeight = designer.mLimitHeight; + this->mHAlign = designer.mHAlign; + this->mVAlign = designer.mVAlign; + this->mYFlip = designer.mYFlip; + this->mFirstOverrunRule = designer.mFirstOverrunRule; + this->mOverrunRule = designer.mOverrunRule; + this->mGlyphScale = designer.mGlyphScale; + this->mLineSpacing = designer.mLineSpacing; + + u32 totalCurves = ( u32 )designer.mCurves.Size (); // TODO: cast + this->ReserveCurves ( totalCurves ); + for ( u32 i = 0; i < totalCurves; ++i ) { + this->SetCurve ( i, designer.mCurves [ i ]); + } +} + +//----------------------------------------------------------------// +void MOAITextLayoutRules::Layout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, cc8* str, u32 idx, bool* more, u32* nextIdx, bool* overrun ) { + + MOAITextLayoutEngine layoutEngine; + + layoutEngine.BuildLayout ( layout, styleCache, styleMap, *this, str, idx ); + layout.ApplyHighlights (); + + if ( more ) { + *more = layoutEngine.More (); + } + + if ( nextIdx ) { + *nextIdx = layoutEngine.GetCharIndex (); + } + + if ( overrun ) { + *overrun = layoutEngine.Overrun (); + } +} + +//----------------------------------------------------------------// +MOAITextLayoutRules::MOAITextLayoutRules () : + mOwner ( 0 ), + mLimitWidth ( false ), + mLimitHeight ( false ), + mHAlign ( MOAITextLayoutRules::LEFT_JUSTIFY ), + mVAlign ( MOAITextLayoutRules::TOP_JUSTIFY ), + mYFlip ( false ), + mFirstOverrunRule ( OVERRUN_SPLIT_WORD ), + mOverrunRule ( OVERRUN_MOVE_WORD ), + mHLayoutSizingRule ( LOGICAL_SIZE ), + mVLayoutSizingRule ( LOGICAL_SIZE ), + mLineSizingRule ( LOGICAL_SIZE ), + mGlyphScale ( 1.0f ), + mLineSpacing ( 0.0f ), + mHLineSnap ( 0.0f ), + mVLineSnap ( 0.0f ) { + + this->mFrame.Init ( 0.0f, 0.0f, 0.0f, 0.0f ); +} + +//----------------------------------------------------------------// +MOAITextLayoutRules::~MOAITextLayoutRules () { + + this->ClearCurves (); +} + +//----------------------------------------------------------------// +void MOAITextLayoutRules::ReleaseCurve ( MOAIAnimCurve* curve ) { + + if ( curve ) { + if ( this->mOwner ) { + this->mOwner->LuaRelease ( curve ); + } + curve->Release (); + } +} + +//----------------------------------------------------------------// +void MOAITextLayoutRules::ReserveCurves ( u32 total ) { + + this->ClearCurves (); + + this->mCurves.Init ( total ); + this->mCurves.Fill ( 0 ); +} + +//----------------------------------------------------------------// +void MOAITextLayoutRules::RetainCurve ( MOAIAnimCurve* curve ) { + + if ( curve ) { + curve->Retain (); + if ( this->mOwner ) { + this->mOwner->LuaRetain ( curve ); + } + } +} + +//----------------------------------------------------------------// +void MOAITextLayoutRules::SetCurve ( u32 idx, MOAIAnimCurve* curve ) { + + if ( idx > this->mCurves.Size ()) return; + if ( this->mCurves [ idx ] == curve ) return; + + this->RetainCurve ( curve ); + this->ReleaseCurve ( this->mCurves [ idx ]); + + this->mCurves [ idx ] = curve; +} + diff --git a/src/moai-sim/MOAITextLayoutRules.h b/src/moai-sim/MOAITextLayoutRules.h new file mode 100644 index 0000000000..a17f2b240f --- /dev/null +++ b/src/moai-sim/MOAITextLayoutRules.h @@ -0,0 +1,117 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAITEXTLAYOUTRULES_H +#define MOAITEXTLAYOUTRULES_H + +class MOAIAnimCurve; +class MOAINode; +class MOAITextLayout; +class MOAITextStyle; +class MOAITextStyleCache; +class MOAITextStyleMap; +class MOAITextStyleSpan; + +//================================================================// +// MOAITextLayoutRules +//================================================================// +class MOAITextLayoutRules { +protected: + + friend class MOAITextLayoutEngine; + + MOAINode* mOwner; // TODO: just put here to make release/retain curve work. which sucks. kill it. + + ZLRect mFrame; + + bool mLimitWidth; + bool mLimitHeight; + + u32 mHAlign; + u32 mVAlign; + bool mYFlip; + + u32 mFirstOverrunRule; // cannot be OVERRUN_MOVE_WORD + u32 mOverrunRule; + + u32 mHLayoutSizingRule; // controls sizing *and* alignment + u32 mVLayoutSizingRule; // controls sizing *and* alignment + u32 mLineSizingRule; // selects the edge to advance from + + float mGlyphScale; + float mLineSpacing; + + float mHLineSnap; // snap lines to this boundary + float mVLineSnap; // snap lines to this boundary + + ZLLeanArray < MOAIAnimCurve* > mCurves; + + //----------------------------------------------------------------// + void ReleaseCurve ( MOAIAnimCurve* curve ); + void RetainCurve ( MOAIAnimCurve* curve ); + +public: + + enum { + BASELINE_JUSTIFY, + BOTTOM_JUSTIFY, + LEFT_JUSTIFY, + CENTER_JUSTIFY, + RIGHT_JUSTIFY, + TOP_JUSTIFY, + }; + + enum { + OVERRUN_MOVE_WORD, // not valid on first overflow + OVERRUN_SPLIT_WORD, + OVERRUN_TRUNCATE_WORD, + OVERRUN_ABORT_LAYOUT, // reverts word + + OVERRUN_NONE, // for use by the shaper only + }; + + enum { + GLYPH_SIZE, + LOGICAL_SIZE, + MAXIMUM_SIZE, // logical size plus padding + VISIBLE_SIZE, // glyph size plus padding + VISIBLE_OR_LOGICAL_SIZE, // greater of visible or logical size + }; + + GET_SET ( MOAINode*, Owner, mOwner ) + + GET_SET_CONST ( ZLRect&, Frame, mFrame ) + + GET_SET_CONST ( bool, LimitWidth, mLimitWidth ) + GET_SET_CONST ( bool, LimitHeight, mLimitHeight ) + + GET_SET_CONST ( u32, HAlign, mHAlign ) + GET_SET_CONST ( u32, VAlign, mVAlign ) + GET_SET_CONST ( bool, YFlip, mYFlip ) + + GET_SET_CONST ( u32, FirstOverrunRule, mFirstOverrunRule ) + GET_SET_CONST ( u32, OverrunRule, mOverrunRule ) + GET_SET_CONST ( float, GlyphScale, mGlyphScale ) + GET_SET_CONST ( float, LineSpacing, mLineSpacing ) + + GET_SET_CONST ( float, HLineSnap, mHLineSnap ) + GET_SET_CONST ( float, VLineSnap, mVLineSnap ) + + GET_SET_CONST ( u32, HLayoutSizingRule, mHLayoutSizingRule ) + GET_SET_CONST ( u32, VLayoutSizingRule, mVLayoutSizingRule ) + GET_SET_CONST ( u32, LineSizingRule, mLineSizingRule ) + + //----------------------------------------------------------------// + void ClearCurves (); + static ZLRect GetGlyphRect ( const MOAIGlyph& glyph, float x, float y, float xScale, float yScale, u32 hRule, u32 vRule ); + ZLRect GetGlyphLayoutRect ( const MOAIGlyph& glyph, float x, float y, float xScale, float yScale ); + ZLRect GetGlyphSpacingRect ( const MOAIGlyph& glyph, float x, float y, float xScale, float yScale ); + void Init ( const MOAITextLayoutRules& designer ); + void Layout ( MOAITextLayout& layout, MOAITextStyleCache& styleCache, MOAITextStyleMap& styleMap, cc8* str, u32 idx, bool* more, u32* nextIdx, bool* overrun ); + MOAITextLayoutRules (); + ~MOAITextLayoutRules (); + void ReserveCurves ( u32 total ); + void SetCurve ( u32 idx, MOAIAnimCurve* curve ); +}; + +#endif diff --git a/src/moai-sim/MOAITextShaper.cpp b/src/moai-sim/MOAITextShaper.cpp new file mode 100644 index 0000000000..addcd684f6 --- /dev/null +++ b/src/moai-sim/MOAITextShaper.cpp @@ -0,0 +1,102 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include +#include +#include + +//================================================================// +// MOAITextSimpleShaper +//================================================================// + +//----------------------------------------------------------------// +MOAITextSimpleShaper::MOAITextSimpleShaper () { +} + +//----------------------------------------------------------------// +MOAITextSimpleShaper::~MOAITextSimpleShaper () { +} + +//----------------------------------------------------------------// +u32 MOAITextSimpleShaper::ShapeLine ( MOAITextShaperClient& client, const MOAITextLayoutRules& layoutRules ) { + + // return one of overrun modes (in an overrun occurs) + u32 wrap = MOAITextLayoutRules::OVERRUN_NONE; + + float penX = 0.0f; + MOAIGlyph* prevGlyph = 0; + u32 tokenSize = 0; + u32 tokenCount = 0; + + // some compilers gripe if a constant is used as a loop conditional. those compilers are pussies. + bool more = true; + while ( more ) { + + // this sets restore point to start of the current character; also prepares for the next call to BeginToken () + client.BeginChar (); + + MOAITextStyledChar styledChar = client.NextChar (); + u32 c = styledChar.mChar; + + if ( MOAIFont::IsControl ( c )) break; // only /n is supported. TODO: properly support /t and /r + + MOAIGlyph* glyph = styledChar.mGlyph; + if ( !glyph ) continue; // TODO: this just omits missing glyphs. think about rendering a solid color instead. + + u32 code = glyph->GetCode (); + + if ( code == MOAIGlyph::NULL_CODE_ID ) continue; // should also handle this more better + + float xScale = styledChar.mScale.mX; + + // apply kerning + if ( prevGlyph ) { + + MOAIKernVec kernVec = prevGlyph->GetKerning ( code ); + penX += kernVec.mX * xScale; + } + + prevGlyph = glyph; + + if ( MOAIFont::IsWhitespace ( c )) { + + tokenSize = 0; // accept the token + tokenCount++; + } + else { + + // handle new token + if ( tokenSize == 0 ) { + + // sets the resume point for WRAP_TOKEN; just a copy of the + // resume point set by BeginChar () + client.BeginToken (); + + if ( wrap == MOAITextLayoutRules::OVERRUN_TRUNCATE_WORD ) { + break; + } + } + tokenSize++; + + if ( wrap == MOAITextLayoutRules::OVERRUN_NONE ) { + + u32 result = client.PushSprite ( styledChar, penX, 0.0f ); + + if ( result == MOAITextShaperClient::PUSH_OVERRUN ) { + + // there was an overrun, so we're either going to discard the last char or the last token + wrap = ( tokenCount == 0 ) ? layoutRules.GetFirstOverrunRule () : layoutRules.GetOverrunRule (); + + if (( wrap != MOAITextLayoutRules::OVERRUN_NONE ) && ( wrap != MOAITextLayoutRules::OVERRUN_TRUNCATE_WORD )) break; + } + } + } + + // advance the pen + penX += glyph->mAdvanceX * xScale; + } + + return wrap; +} diff --git a/src/moai-sim/MOAITextShaper.h b/src/moai-sim/MOAITextShaper.h new file mode 100644 index 0000000000..c64fc3da35 --- /dev/null +++ b/src/moai-sim/MOAITextShaper.h @@ -0,0 +1,78 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAITEXTSHAPER_H +#define MOAITEXTSHAPER_H + +class MOAIGlyph; +class MOAITextStyleState; + +//================================================================// +// MOAITextStyledChar +//================================================================// +// parser for producing a layout +class MOAITextStyledChar { +public: + + u32 mIdx; + u32 mChar; + MOAITextStyleState* mStyle; + MOAIGlyph* mGlyph; + ZLVec2D mScale; +}; + +//================================================================// +// MOAITextShaperClient +//================================================================// +class MOAITextShaperClient { +public: + + enum { + PUSH_OK, + PUSH_OVERRUN, + }; + + //----------------------------------------------------------------// + virtual void BeginChar () = 0; // set the resume point for characters + virtual void BeginToken () = 0; // set the resume point for tokens + MOAITextShaperClient () {} + virtual ~MOAITextShaperClient () {} + virtual MOAITextStyledChar NextChar () = 0; // read the next styled char from the input stream + virtual u32 PushSprite ( const MOAITextStyledChar& styledChar, float x, float y ) = 0; // push a visible character +}; + +//================================================================// +// MOAITextShaper +//================================================================// +class MOAITextShaper { +public: + + //----------------------------------------------------------------// + MOAITextShaper () {} + virtual ~MOAITextShaper () {} + virtual u32 ShapeLine ( MOAITextShaperClient& client, const MOAITextLayoutRules& layoutRules ) = 0; +}; + +//================================================================// +// MOAITextSimpleShaper +//================================================================// +class MOAITextSimpleShaper : + public MOAITextShaper { +private: + + int mTokenIdx; + u32 mTokenSpriteID; + u32 mTokenSize; + + //----------------------------------------------------------------// + void AcceptToken (); + +public: + + //----------------------------------------------------------------// + MOAITextSimpleShaper (); + ~MOAITextSimpleShaper (); + u32 ShapeLine ( MOAITextShaperClient& client, const MOAITextLayoutRules& layoutRules ); +}; + +#endif diff --git a/src/moai-sim/MOAITextStyle.cpp b/src/moai-sim/MOAITextStyle.cpp index d8c8071aee..2996753c70 100644 --- a/src/moai-sim/MOAITextStyle.cpp +++ b/src/moai-sim/MOAITextStyle.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/moai-sim/MOAITextStyle.h b/src/moai-sim/MOAITextStyle.h index 573dde4335..cd364d3919 100644 --- a/src/moai-sim/MOAITextStyle.h +++ b/src/moai-sim/MOAITextStyle.h @@ -16,7 +16,7 @@ class MOAITextStyleState { protected: friend class MOAITextLabel; - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextLayout; friend class MOAITextStyle; friend class MOAITextStyleParser; @@ -59,7 +59,7 @@ class MOAITextStyle : private: friend class MOAITextLabel; - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextLayout; friend class MOAITextStyleParser; friend class MOAITextStyleCache; diff --git a/src/moai-sim/MOAITextStyleCache.cpp b/src/moai-sim/MOAITextStyleCache.cpp index 0d5068e32b..e2701f2d91 100644 --- a/src/moai-sim/MOAITextStyleCache.cpp +++ b/src/moai-sim/MOAITextStyleCache.cpp @@ -90,8 +90,8 @@ void MOAITextStyleCache::Clear () { //----------------------------------------------------------------// void MOAITextStyleCache::ClearAnonymousStyles () { - u32 totalAnonymous = this->mAnonymousStyles.GetTop (); - for ( u32 i = 0; i < totalAnonymous; i++ ) { + size_t totalAnonymous = this->mAnonymousStyles.GetTop (); + for ( size_t i = 0; i < totalAnonymous; i++ ) { // TODO: replace with a pool delete this->mAnonymousStyles [ i ]; diff --git a/src/moai-sim/MOAITextStyleCache.h b/src/moai-sim/MOAITextStyleCache.h index 4b7d8cba4c..4001515358 100644 --- a/src/moai-sim/MOAITextStyleCache.h +++ b/src/moai-sim/MOAITextStyleCache.h @@ -35,7 +35,7 @@ class MOAITextStyleRef { class MOAITextStyleCache { private: - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextStyleParser; // set only if we care about LuaRelease, LuaRetain and setting dep links to styles diff --git a/src/moai-sim/MOAITextStyleMap.cpp b/src/moai-sim/MOAITextStyleMap.cpp index 9717d2065c..8506fa45a3 100644 --- a/src/moai-sim/MOAITextStyleMap.cpp +++ b/src/moai-sim/MOAITextStyleMap.cpp @@ -26,7 +26,7 @@ void MOAITextStyleMap::BuildStyleMap ( MOAITextStyleCache& styleCache, cc8* str //----------------------------------------------------------------// u32 MOAITextStyleMap::CountSpans () { - return this->GetTop (); + return ( u32 )this->GetTop (); // TODO: cast } //----------------------------------------------------------------// @@ -52,10 +52,10 @@ void MOAITextStyleMap::PushStyleSpan ( int base, int top, MOAITextStyleState& st //----------------------------------------------------------------// void MOAITextStyleMap::RefreshStyleGlyphs ( cc8* str ) { - u32 totalSpans = this->GetTop (); + size_t totalSpans = ( u32 )this->GetTop (); if ( !totalSpans ) return; - for ( u32 i = 0; i < totalSpans; ++i ) { + for ( size_t i = 0; i < totalSpans; ++i ) { MOAITextStyleSpan& span = this->Elem ( i ); int idx = span.mBase; @@ -67,7 +67,7 @@ void MOAITextStyleMap::RefreshStyleGlyphs ( cc8* str ) { // TODO: think about keeping list of currently active styles instead of iterating through everything - for ( u32 i = 0; i < totalSpans; ++i ) { + for ( size_t i = 0; i < totalSpans; ++i ) { MOAITextStyleSpan& span = this->Elem ( i ); span.mStyle->mFont->ProcessGlyphs (); } diff --git a/src/moai-sim/MOAITextStyleMap.h b/src/moai-sim/MOAITextStyleMap.h index 76a4f458ce..7ae810584b 100644 --- a/src/moai-sim/MOAITextStyleMap.h +++ b/src/moai-sim/MOAITextStyleMap.h @@ -31,7 +31,7 @@ class MOAITextStyleMap : public ZLLeanStack < MOAITextStyleSpan, 64 > { private: - friend class MOAITextDesignParser; + friend class MOAITextLayoutEngine; friend class MOAITextStyleParser; //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAITextStyleParser.cpp b/src/moai-sim/MOAITextStyleParser.cpp index 5500d7c829..62c99a0c99 100644 --- a/src/moai-sim/MOAITextStyleParser.cpp +++ b/src/moai-sim/MOAITextStyleParser.cpp @@ -180,8 +180,8 @@ void MOAITextStyleParser::Parse () { } } - u32 totalActiveStyles = this->mActiveStyles.GetTop (); - for ( u32 i = 0; i < totalActiveStyles; ++i ) { + size_t totalActiveStyles = this->mActiveStyles.GetTop (); + for ( size_t i = 0; i < totalActiveStyles; ++i ) { MOAITextStyleState* style = this->mActiveStyles [ i ]; assert ( style->mFont ); style->mFont->ProcessGlyphs (); @@ -368,7 +368,7 @@ void MOAITextStyleParser::PushStyle ( MOAITextStyleState* style ) { assert ( style ); u32 styleID = 0; - u32 totalStyles = this->mActiveStyles.GetTop (); + u32 totalStyles = ( u32 )this->mActiveStyles.GetTop (); // TODO: cast for ( ; styleID < totalStyles; ++styleID ) { if ( this->mActiveStyles [ styleID ] == style ) { break; diff --git a/src/moai-sim/MOAITextStyleParser.h b/src/moai-sim/MOAITextStyleParser.h index 6b35771e4a..d335e5d168 100644 --- a/src/moai-sim/MOAITextStyleParser.h +++ b/src/moai-sim/MOAITextStyleParser.h @@ -13,6 +13,7 @@ class MOAITextStyleMap; //================================================================// // MOAITextStyleParser //================================================================// +// parser state for producing a style map class MOAITextStyleParser { private: diff --git a/src/moai-sim/MOAITexture.cpp b/src/moai-sim/MOAITexture.cpp index 0867450883..1b1f6b9412 100644 --- a/src/moai-sim/MOAITexture.cpp +++ b/src/moai-sim/MOAITexture.cpp @@ -2,8 +2,8 @@ // http://getmoai.com #include "pch.h" -#include -#include +#include +#include #include #include #include @@ -116,7 +116,7 @@ bool MOAITexture::Init ( MOAILuaState& state, int idx ) { if ( state.IsType ( idx, LUA_TSTRING )) { cc8* filename = lua_tostring ( state, idx ); - u32 transform = state.GetValue < u32 >( idx + 1, MOAITexture::DEFAULT_TRANSFORM ); + transform = state.GetValue < u32 >( idx + 1, MOAITexture::DEFAULT_TRANSFORM ); this->Init ( filename, transform, debugName ? debugName : filename ); done = true; } @@ -161,7 +161,7 @@ void MOAITexture::Init ( MOAIImage& image, cc8* debugname, bool autoClear ) { this->mAutoClearImage = autoClear; this->mDebugName = debugname; this->FinishInit (); - this->DoCPUAffirm (); // If you do not calculated here, it is impossible to get the texture size. + this->DoCPUCreate (); // If you do not calculate here, it is impossible to get the texture size. } } @@ -179,7 +179,7 @@ void MOAITexture::Init ( MOAIImage& image, int srcX, int srcY, int width, int he this->mImage->Blit ( image, srcX, srcY, 0, 0, width, height ); this->mDebugName = debugname; this->FinishInit (); - this->DoCPUAffirm (); // If you do not calculated here, it is impossible to get the texture size. + this->DoCPUCreate (); // If you do not calculate here, it is impossible to get the texture size. } } @@ -199,7 +199,7 @@ void MOAITexture::Init ( cc8* filename, u32 transform, cc8* debugname ) { } this->mTransform = transform; this->FinishInit (); - this->DoCPUAffirm (); // If you do not calculated here, it is impossible to get the texture size. + this->DoCPUCreate (); // If you do not calculate here, it is impossible to get the texture size. } } @@ -213,7 +213,7 @@ void MOAITexture::Init ( ZLStream& stream, u32 transform, cc8* debugname ) { if ( this->mTextureData || ( this->mImage && this->mImage->IsOK ())) { this->mDebugName = debugname; this->FinishInit (); - this->DoCPUAffirm (); // If you do not calculated here, it is impossible to get the texture size. + this->DoCPUCreate (); // If you do not calculate here, it is impossible to get the texture size. } } @@ -228,7 +228,7 @@ void MOAITexture::Init ( MOAIDataBuffer& data, u32 transform, cc8* debugname ) { } //----------------------------------------------------------------// -void MOAITexture::Init ( const void* data, u32 size, u32 transform, cc8* debugname ) { +void MOAITexture::Init ( const void* data, size_t size, u32 transform, cc8* debugname ) { ZLByteStream stream; stream.SetBuffer ( data, size, size ); @@ -237,6 +237,7 @@ void MOAITexture::Init ( const void* data, u32 size, u32 transform, cc8* debugna //----------------------------------------------------------------// bool MOAITexture::LoadFromStream ( ZLStream& stream, u32 transform ) { + UNUSED ( transform ); // TODO: why is transform unused? MOAIImageFormat* format = 0; bool result = false; @@ -355,10 +356,13 @@ bool MOAITexture::OnGPUCreate () { else if ( this->mTextureDataFormat && this->mTextureData ) { success = this->mTextureDataFormat->CreateTexture ( *this, this->mTextureData, this->mTextureDataSize ); } - if ( success ) return true; - this->Clear (); - return false; + if ( !success ) { + this->Clear (); + return false; + } + + return this->OnGPUUpdate (); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAITexture.h b/src/moai-sim/MOAITexture.h index 3c253d2472..11a5695233 100644 --- a/src/moai-sim/MOAITexture.h +++ b/src/moai-sim/MOAITexture.h @@ -57,7 +57,7 @@ class MOAITexture : void Init ( cc8* filename, u32 transform, cc8* debugname = 0 ); void Init ( ZLStream& stream, u32 transform, cc8* debugname ); void Init ( MOAIDataBuffer& data, u32 transform, cc8* debugname ); - void Init ( const void* data, u32 size, u32 transform, cc8* debugname ); + void Init ( const void* data, size_t size, u32 transform, cc8* debugname ); MOAITexture (); ~MOAITexture (); void RegisterLuaClass ( MOAILuaState& state ); diff --git a/src/moai-sim/MOAITileDeck2D.cpp b/src/moai-sim/MOAITileDeck2D.cpp index 2f6c9cf8c4..a17cf5de61 100644 --- a/src/moai-sim/MOAITileDeck2D.cpp +++ b/src/moai-sim/MOAITileDeck2D.cpp @@ -242,13 +242,13 @@ void MOAITileDeck2D::DrawIndex ( u32 idx, MOAIMaterialBatch& materials, ZLVec3D idx = idx - 1; - materials.LoadGfxState ( this, idx, MOAIShaderMgr::DECK2D_SHADER ); - - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - MOAIQuadBrush::BindVertexFormat ( gfxDevice ); + if ( !materials.LoadGfxState ( this, idx, MOAIShaderMgr::DECK2D_SHADER )) return; + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + MOAIQuadBrush::BindVertexFormat ( gfxMgr.mVertexCache ); - gfxDevice.SetVertexMtxMode ( MOAIGfxDevice::VTX_STAGE_MODEL, MOAIGfxDevice::VTX_STAGE_PROJ ); - gfxDevice.SetUVMtxMode ( MOAIGfxDevice::UV_STAGE_MODEL, MOAIGfxDevice::UV_STAGE_TEXTURE ); + gfxMgr.mVertexCache.SetVertexTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::WORLD_VIEW_PROJ_MTX )); + gfxMgr.mVertexCache.SetUVTransform ( gfxMgr.mGfxState.GetMtx ( MOAIGfxGlobalsCache::UV_MTX )); MOAICellCoord coord = this->GetCellCoord ( idx ); ZLRect uvRect = this->GetTileRect ( coord ); diff --git a/src/moai-sim/MOAITouchSensor.cpp b/src/moai-sim/MOAITouchSensor.cpp index 9e4695aa94..5e0879813f 100644 --- a/src/moai-sim/MOAITouchSensor.cpp +++ b/src/moai-sim/MOAITouchSensor.cpp @@ -84,7 +84,7 @@ int MOAITouchSensor::_getCenterLoc ( lua_State* L ) { u32 count = self->mTop; if ( count == 0 ) return 0; - ZLVec2D loc; + ZLVec2D loc ( 0.0f, 0.0f ); for ( u32 i = 0; i < count; ++i ) { u32 touchID = self->mActiveStack [ i ]; diff --git a/src/moai-sim/MOAITransform.cpp b/src/moai-sim/MOAITransform.cpp index 10e1f9029a..8d873c84eb 100644 --- a/src/moai-sim/MOAITransform.cpp +++ b/src/moai-sim/MOAITransform.cpp @@ -233,7 +233,7 @@ int MOAITransform::_move ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -292,7 +292,7 @@ int MOAITransform::_moveLoc ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -342,7 +342,7 @@ int MOAITransform::_movePiv ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -392,7 +392,7 @@ int MOAITransform::_moveRot ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -442,7 +442,7 @@ int MOAITransform::_moveScl ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -505,7 +505,7 @@ int MOAITransform::_seek ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -558,7 +558,7 @@ int MOAITransform::_seekLoc ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -607,7 +607,7 @@ int MOAITransform::_seekPiv ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -656,7 +656,7 @@ int MOAITransform::_seekRot ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -705,7 +705,7 @@ int MOAITransform::_seekScl ( lua_State* L ) { ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; diff --git a/src/moai-sim/MOAIVecPathGraph.cpp b/src/moai-sim/MOAIVecPathGraph.cpp index d0b63248ef..1e2a3cdad4 100644 --- a/src/moai-sim/MOAIVecPathGraph.cpp +++ b/src/moai-sim/MOAIVecPathGraph.cpp @@ -156,7 +156,7 @@ int MOAIVecPathGraph::_setNode ( lua_State* L ) { //----------------------------------------------------------------// bool MOAIVecPathGraph::AreNeighbors ( u32 id1, u32 id2 ) { - u32 total = this->mNodes.Size (); + size_t total = this->mNodes.Size (); if ( id1 < total && id2 < total ) { return this->mNeighbors [ id1 * total + id2 ]; @@ -178,13 +178,13 @@ ZLVec3D MOAIVecPathGraph::GetNode ( u32 id ) { //----------------------------------------------------------------// u32 MOAIVecPathGraph::GetNodeCount () { - return this->mNodes.Size (); + return ( u32 )this->mNodes.Size (); } //----------------------------------------------------------------// void MOAIVecPathGraph::PushNeighbors ( MOAIPathFinder& pathFinder, int nodeID ) { - u32 total = this->mNodes.Size (); + u32 total = ( u32 )this->mNodes.Size (); // TODO: cast ZLVec3D currentNode = this->GetNode ( nodeID ); ZLVec3D targetNode = this->GetNode ( pathFinder.GetTargetNodeID ()); @@ -235,9 +235,9 @@ void MOAIVecPathGraph::ReserveNodes ( u32 total ) { //----------------------------------------------------------------// void MOAIVecPathGraph::SetNeighbors ( u32 id1, u32 id2, bool value ) { - u32 total = this->mNodes.Size (); + size_t total = this->mNodes.Size (); - if ( id1 < total && id2 < total) { + if (( id1 < total ) && ( id2 < total )) { this->mNeighbors [ id1 * total + id2 ] = value; this->mNeighbors [ id2 * total + id1 ] = value; } diff --git a/src/moai-sim/MOAIVectorSensor.h b/src/moai-sim/MOAIVectorSensor.h index 76195076bb..726420c6e3 100644 --- a/src/moai-sim/MOAIVectorSensor.h +++ b/src/moai-sim/MOAIVectorSensor.h @@ -39,4 +39,4 @@ class MOAIVectorSensor : void RegisterLuaFuncs ( MOAILuaState& state ); }; -#endif \ No newline at end of file +#endif diff --git a/src/moai-sim/MOAIVectorShape.cpp b/src/moai-sim/MOAIVectorShape.cpp index c9de75eb03..ea68cb65ee 100644 --- a/src/moai-sim/MOAIVectorShape.cpp +++ b/src/moai-sim/MOAIVectorShape.cpp @@ -129,7 +129,7 @@ void MOAIVectorShape::Stroke ( SafeTesselator& tess, const ZLVec2D* verts, int n MOAIVectorUtil::StrokeLine ( this->mStyle, contour, joins, nVerts, width, exact ); - tessAddContour ( tess.mTess, 2, contour, sizeof ( ZLVec2D ), contourVerts ); + tess.AddContour ( 2, contour, sizeof ( ZLVec2D ), contourVerts ); } //----------------------------------------------------------------// @@ -150,7 +150,8 @@ void MOAIVectorShape::StrokeBoundaries ( SafeTesselator& tess, SafeTesselator& o //----------------------------------------------------------------// int MOAIVectorShape::Tesselate ( MOAIVectorTesselator& drawing, SafeTesselator& tess ) { - + UNUSED ( drawing ); + int error = 0; if ( this->mStyle.GetFillStyle () == MOAIVectorStyle::FILL_SOLID ) { @@ -176,7 +177,7 @@ int MOAIVectorShape::Tesselate ( MOAIVectorTesselator& drawing, ZLStream& vtxStr bool isExtruded = this->mStyle.GetExtrude () > 0.0f; bool isStroked = ( this->mStyle.GetStrokeStyle () != MOAIVectorStyle::STROKE_NONE ) && ( this->mStyle.GetStrokeWidth () > 0.0f ); bool isFilled = this->mStyle.GetFillStyle () == MOAIVectorStyle::FILL_SOLID; - bool isClosed = this->IsClosed (); + //bool isClosed = this->IsClosed (); // fill solid w/ stroke // fill solid w/o stroke diff --git a/src/moai-sim/MOAIVectorStyle.cpp b/src/moai-sim/MOAIVectorStyle.cpp index 8bcb2ebcfd..a0116b540c 100644 --- a/src/moai-sim/MOAIVectorStyle.cpp +++ b/src/moai-sim/MOAIVectorStyle.cpp @@ -53,7 +53,7 @@ void MOAIVectorStyle::Default () { //----------------------------------------------------------------// float MOAIVectorStyle::GetMergeNormalsCosine () const { - return Cos ( this->mMergeNormals * D2R ); + return Cos (( float )( this->mMergeNormals * D2R )); } //----------------------------------------------------------------// diff --git a/src/moai-sim/MOAIVectorStyle.h b/src/moai-sim/MOAIVectorStyle.h index cd4b8eedda..6f16ddde54 100644 --- a/src/moai-sim/MOAIVectorStyle.h +++ b/src/moai-sim/MOAIVectorStyle.h @@ -114,7 +114,7 @@ class MOAIVectorStyle { GET_SET_CONST ( u32, FillExtraID, mFillExtraID ) GET_SET_CONST ( u32, StrokeExtraID, mStrokeExtraID ) - GET_SET_CONST ( u32, MergeNormals, mMergeNormals ) + GET_SET_CONST ( float, MergeNormals, mMergeNormals ) //----------------------------------------------------------------// void Default (); diff --git a/src/moai-sim/MOAIVectorTesselator.cpp b/src/moai-sim/MOAIVectorTesselator.cpp index 451c21201a..43f3bcee11 100644 --- a/src/moai-sim/MOAIVectorTesselator.cpp +++ b/src/moai-sim/MOAIVectorTesselator.cpp @@ -4,8 +4,9 @@ #include "pch.h" #include #include -#include +#include #include +#include #include #include #include @@ -199,6 +200,20 @@ int MOAIVectorTesselator::_pushRect ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +int MOAIVectorTesselator::_pushRegion ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIVectorTesselator, "U" ) + + MOAIRegion* region = state.GetLuaObject < MOAIRegion >( 2, true ); + + if ( region ) { + self->PushCombo (); + self->PushRegion ( *region ); + self->Finish (); + } + return 0; +} + //----------------------------------------------------------------// int MOAIVectorTesselator::_pushRotate ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIVectorTesselator, "U" ) @@ -529,7 +544,7 @@ int MOAIVectorTesselator::_tesselate ( lua_State* L ) { u32 idxSizeInBytes = state.GetValue < u32 >( 4, 4 ); MOAIVertexFormat* format = state.GetLuaObject < MOAIVertexFormat >( 5, false ); - base = idxBuffer->GetCursor () / idxSizeInBytes; + base = ( u32 )( idxBuffer->GetCursor () / idxSizeInBytes ); // TODO: cast totalElements = self->Tesselate ( *vtxBuffer, *idxBuffer, *format, idxSizeInBytes ); } else { @@ -539,7 +554,7 @@ int MOAIVectorTesselator::_tesselate ( lua_State* L ) { MOAIVertexFormat* format = state.GetLuaObject < MOAIVertexFormat >( 4, false ); if ( vtxStream && idxStream && format ) { - base = idxStream->GetCursor () / 4; + base = ( u32 )( idxStream->GetCursor () / 4 ); // TODO: cast totalElements = self->Tesselate ( *vtxStream, *idxStream, *format ); } } @@ -629,14 +644,15 @@ void MOAIVectorTesselator::ClearTransforms () { //----------------------------------------------------------------// u32 MOAIVectorTesselator::CountVertices ( const MOAIVertexFormat& format, ZLStream& vtxStream ) { - return ( vtxStream.GetLength () / format.GetVertexSize ()); + return ( u32 )( vtxStream.GetLength () / format.GetVertexSize ()); // TODO: cast } //----------------------------------------------------------------// int MOAIVectorTesselator::Finish () { - u32 vertsTop = this->mVertexStack.GetTop (); - u32 shapesTop = this->mShapeStack.GetTop (); + // TODO: check overflow + u32 vertsTop = ( u32 )this->mVertexStack.GetTop (); + u32 shapesTop = ( u32 )this->mShapeStack.GetTop (); int error = 0; @@ -736,7 +752,7 @@ void MOAIVectorTesselator::PushEllipse ( float x, float y, float xRad, float yRa } //----------------------------------------------------------------// -void MOAIVectorTesselator::PushPoly ( ZLVec2D* vertices, u32 total, bool closed ) { +void MOAIVectorTesselator::PushPoly ( const ZLVec2D* vertices, u32 total, bool closed ) { this->mPolyClosed = closed; @@ -753,6 +769,17 @@ void MOAIVectorTesselator::PushRect ( float xMin, float yMin, float xMax, float vectorRect->Init ( xMin, yMin, xMax, yMax ); } +//----------------------------------------------------------------// +void MOAIVectorTesselator::PushRegion ( const MOAIRegion& region ) { + + size_t size = region.GetSize (); + for ( size_t i = 0; i < size; ++i ) { + + const ZLPolygon2D& polygon = region.GetPolygon (( u32 )i ); + this->PushPoly ( polygon.GetVertices(), ( u32 )polygon.GetSize (), true ); // TODO: cast + } +} + //----------------------------------------------------------------// void MOAIVectorTesselator::PushRotate ( float x, float y, float r ) { @@ -791,7 +818,7 @@ u32 MOAIVectorTesselator::PushShape ( MOAIVectorShape* shape ) { shape->mStyle = this->mStyle; - u32 tag = this->mDirectory.GetTop (); + u32 tag = ( u32 )this->mDirectory.GetTop (); // TODO: cast this->mDirectory.Push ( shape ); this->mShapeStack.Push ( shape ); @@ -892,6 +919,7 @@ void MOAIVectorTesselator::RegisterLuaFuncs ( MOAILuaState& state ) { { "pushEllipse", _pushEllipse }, { "pushPoly", _pushPoly }, { "pushRect", _pushRect }, + { "pushRegion", _pushRegion }, { "pushRotate", _pushRotate }, { "pushScale", _pushScale }, { "pushSkew", _pushSkew }, @@ -966,7 +994,7 @@ int MOAIVectorTesselator::Tesselate ( SafeTesselator& tess ) { error = shape->Tesselate ( *this, tess ); if ( error ) return error; } - return this->mShapeStack.GetTop (); + return ( int )this->mShapeStack.GetTop (); // TODO: fix cast } //----------------------------------------------------------------// @@ -983,7 +1011,7 @@ int MOAIVectorTesselator::Tesselate ( MOAIRegion& region ) { region.Transform ( region, this->mStyle.mDrawingToWorld ); region.Bless (); - return region.GetSize (); + return ( int )region.GetSize (); // TODO: cast } return 0; } @@ -994,7 +1022,7 @@ int MOAIVectorTesselator::Tesselate ( ZLStream& vtxStream, ZLStream& idxStream, int error = this->Finish (); if ( error ) return -1; - int base = idxStream.GetLength (); + int base = ( int )idxStream.GetLength (); // TODO: cast this->mDepthOffset = 0.0f; @@ -1005,7 +1033,7 @@ int MOAIVectorTesselator::Tesselate ( ZLStream& vtxStream, ZLStream& idxStream, } // idx stream is 32-bits, so divide by 4 to get total indices - return ( idxStream.GetLength () - base ) >> 2; + return ( int )(( idxStream.GetLength () - base ) >> 2 ); // TODO: cast } //----------------------------------------------------------------// @@ -1221,12 +1249,12 @@ void MOAIVectorTesselator::WriteVertex ( ZLStream& stream, MOAIVertexFormat& for size_t vertexSize = format.GetVertexSize (); if ( this->mVtxExtraSize && ( this->mVtxExtraSize < vertexSize )) { - stream.Seek ( base + ( vertexSize - this->mVtxExtraSize ), SEEK_SET ); + stream.SetCursor ( base + ( vertexSize - this->mVtxExtraSize )); vertexExtraID = vertexExtraID % this->mVtxExtras.Size (); stream.WriteBytes ( this->mVtxExtras [ vertexExtraID ], this->mVtxExtraSize ); - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } format.WriteCoord ( stream, x, y, z, 1.0f ); diff --git a/src/moai-sim/MOAIVectorTesselator.h b/src/moai-sim/MOAIVectorTesselator.h index 9bb6d06623..be942193f4 100644 --- a/src/moai-sim/MOAIVectorTesselator.h +++ b/src/moai-sim/MOAIVectorTesselator.h @@ -57,6 +57,7 @@ class MOAIVectorTesselator : static int _pushEllipse ( lua_State* L ); static int _pushPoly ( lua_State* L ); static int _pushRect ( lua_State* L ); + static int _pushRegion ( lua_State* L ); static int _pushRotate ( lua_State* L ); static int _pushScale ( lua_State* L ); static int _pushSkew ( lua_State* L ); @@ -120,8 +121,9 @@ class MOAIVectorTesselator : void PushBezierVertices ( const ZLVec2D& p0, const ZLVec2D& p1, const ZLVec2D& p2, const ZLVec2D& p3 ); void PushCombo (); void PushEllipse ( float x, float y, float xRad, float yRad ); - void PushPoly ( ZLVec2D* vertices, u32 total, bool closed ); + void PushPoly ( const ZLVec2D* vertices, u32 total, bool closed ); void PushRect ( float xMin, float yMin, float xMax, float yMax ); + void PushRegion ( const MOAIRegion& region ); void PushRotate ( float x, float y, float r ); void PushScale ( float x, float y ); void PushSkew ( float yx, float xy ); diff --git a/src/moai-sim/MOAIVectorUtil.cpp b/src/moai-sim/MOAIVectorUtil.cpp index 34f51cd769..056e761ed5 100644 --- a/src/moai-sim/MOAIVectorUtil.cpp +++ b/src/moai-sim/MOAIVectorUtil.cpp @@ -10,9 +10,10 @@ #include #include #include -#include -#define TESS_PRECISION 10000 +#ifdef MOAI_COMPILER_MSVC + #pragma warning ( disable : 4611 ) +#endif //================================================================// // SafeTesselator @@ -21,15 +22,15 @@ const ZLVec3D SafeTesselator::sNormal = ZLVec3D ( 0.0f, 0.0f, 1.0f ); //----------------------------------------------------------------// -void SafeTesselator::AddContour ( int size, const void* vertices, int stride, int numVertices ) { +void SafeTesselator::AddContour ( int size, const void* vertices, int stride, size_t numVertices ) { - tessAddContour ( this->mTess, size, vertices, sizeof ( TESSreal ) * size, numVertices ); + tessAddContour ( this->mTess, size, vertices, stride, ( int )numVertices ); // TODO: check overflow } //----------------------------------------------------------------// void SafeTesselator::AddPolygon ( const ZLPolygon2D& poly ) { - tessAddContour ( this->mTess, 2, poly.GetVertices (), sizeof ( TESSreal ) * 2, poly.GetSize ()); + this->AddContour ( 2, poly.GetVertices (), sizeof ( TESSreal ) * 2, poly.GetSize ()); } //----------------------------------------------------------------// @@ -46,9 +47,10 @@ u32 SafeTesselator::GetTriangles ( MOAIVertexFormat& format, ZLStream& vtxStream for ( int i = 0; i < nelems; ++i ) { const int* tri = &elems [ i * 3 ]; - idxStream.Write < u32 >( idxBase + tri [ 0 ]); - idxStream.Write < u32 >( idxBase + tri [ 1 ]); - idxStream.Write < u32 >( idxBase + tri [ 2 ]); + // TODO: check overflow + idxStream.Write < u32 >(( u32 )( idxBase + tri [ 0 ])); + idxStream.Write < u32 >(( u32 )( idxBase + tri [ 1 ])); + idxStream.Write < u32 >(( u32 )( idxBase + tri [ 2 ])); } const float* verts = tessGetVertices ( this->mTess ); @@ -64,7 +66,7 @@ u32 SafeTesselator::GetTriangles ( MOAIVertexFormat& format, ZLStream& vtxStream } // idx stream is 32-bits, so divide by 4 to get total indices written - return ( idxStream.GetLength () - idxCursor ) >> 2; + return ( u32 )(( idxStream.GetLength () - idxCursor ) >> 2 ); // TODO: cast } //----------------------------------------------------------------// @@ -84,7 +86,7 @@ void SafeTesselator::Reset () { tessDeleteTess ( this->mTess ); } this->mTess = tessNewTess ( 0 ); - tessSetPrecision ( this->mTess, TESS_PRECISION ); + //tessSetPrecision ( this->mTess, TESS_PRECISION ); } //------------------------------------------------------------------// @@ -172,9 +174,21 @@ void MOAIVectorUtil::ComputeLineJoins ( MOAIVectorLineJoin* joins, const ZLVec2D for ( int i = start; i < max; ++i ) { - ZLVec2D n = joins [( i + top ) % nVerts ].mEdgeNorm; - n.Add ( joins [ i ].mEdgeNorm ); - n.Norm (); + int prevID = ( i + top ) % nVerts; + + ZLVec2D prevNorm = joins [ prevID ].mEdgeNorm; + ZLVec2D nextNorm = joins [ i ].mEdgeNorm; + + ZLVec2D n = prevNorm; + + if ( prevNorm.Dot ( nextNorm ) > -1.0f ) { + n.Add ( joins [ i ].mEdgeNorm ); + n.Norm (); + } + else { + n = joins [ prevID ].mEdgeVec; + n.Scale ( scale ); + } joins [ i ].mJointNorm = n; } diff --git a/src/moai-sim/MOAIVectorUtil.h b/src/moai-sim/MOAIVectorUtil.h index 3d4ce8db2d..16ccdbbb59 100644 --- a/src/moai-sim/MOAIVectorUtil.h +++ b/src/moai-sim/MOAIVectorUtil.h @@ -25,7 +25,7 @@ class SafeTesselator { struct TESStesselator* mTess; //----------------------------------------------------------------// - void AddContour ( int size, const void* vertices, int stride, int numVertices ); + void AddContour ( int size, const void* vertices, int stride, size_t numVertices ); void AddPolygon ( const ZLPolygon2D& poly ); u32 GetTriangles ( MOAIVertexFormat& format, ZLStream& vtxStream, ZLStream& idxStream ); u32 GetTriangles ( MOAIVertexFormat& format, MOAIVertexBuffer& vtxBuffer, MOAIIndexBuffer& idxBuffer, u32 idxSizeInBytes ); diff --git a/src/moai-sim/MOAIVertexArray.cpp b/src/moai-sim/MOAIVertexArray.cpp index a5178b56e8..04268799b1 100644 --- a/src/moai-sim/MOAIVertexArray.cpp +++ b/src/moai-sim/MOAIVertexArray.cpp @@ -3,14 +3,16 @@ #include "pch.h" #include -#include -#include +#include +#include +#include #include #include #include #include #include #include +#include #include //================================================================// @@ -19,15 +21,16 @@ //----------------------------------------------------------------// void MOAIVertexArrayItem::Bind ( bool useVAOs ) { + UNUSED ( useVAOs ); // TODO: why isn't zl's assert redefine taking care of this? if ( this->mBuffer && this->mFormat ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); - - gfxDevice.BindVertexBuffer ( this->mBuffer ); - gfxDevice.BindVertexFormat ( this->mFormat ); - assert (( useVAOs && this->mBuffer->IsUsingVBOs ()) || ( !useVAOs )); // buffer objects must use VBOs to work with VAOs + + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); + + gfxMgr.mGfxState.BindVertexBuffer ( this->mBuffer ); + gfxMgr.mGfxState.BindVertexFormat ( this->mFormat ); } } @@ -51,10 +54,10 @@ void MOAIVertexArrayItem::Unbind () { if ( this->mBuffer && this->mFormat ) { - MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - gfxDevice.BindVertexBuffer (); - gfxDevice.BindVertexFormat (); + gfxMgr.mGfxState.BindVertexBuffer (); + gfxMgr.mGfxState.BindVertexFormat (); } } @@ -102,7 +105,6 @@ int MOAIVertexArray::_setVertexBuffer ( lua_State* L ) { MOAIVertexFormat* format = state.GetLuaObject < MOAIVertexFormat >( baseParam++, false ); self->SetVertexBuffer ( idx, buffer, format ); - self->FinishInit (); return 0; } @@ -131,8 +133,7 @@ void MOAIVertexArray::BindVertexArrayItems () { //----------------------------------------------------------------// MOAIVertexArray::MOAIVertexArray () : - mUseVAOs ( false ), - mNeedsFlush ( false ) { + mUseVAOs ( false ) { RTTI_BEGIN RTTI_EXTEND ( MOAIGfxResource ) @@ -159,29 +160,12 @@ void MOAIVertexArray::OnCPUDestroy () { //----------------------------------------------------------------// void MOAIVertexArray::OnGPUBind () { - u32 vao = 0; - - if ( this->mUseVAOs && this->mNeedsFlush ) { + if ( this->mUseVAOs && this->mVAOs.Size ()) { - if ( !this->mVAOs.Size ()) return; - - if ( this->mNeedsFlush ) { - this->mCurrentVAO = ( this->mCurrentVAO + 1 ) % this->mVAOs.Size (); - } - vao = this->mVAOs [ this->mCurrentVAO ]; - } - - if ( vao ) { - - zglBindVertexArray ( vao ); - - if ( this->mNeedsFlush ) { - this->BindVertexArrayItems (); - this->mNeedsFlush = false; - } + ZLGfxHandle* vao = this->mVAOs [ this->mCurrentVAO ]; + MOAIGfxMgr::GetDrawingAPI ().BindVertexArray ( vao ); } else { - this->BindVertexArrayItems (); } } @@ -189,6 +173,8 @@ void MOAIVertexArray::OnGPUBind () { //----------------------------------------------------------------// bool MOAIVertexArray::OnGPUCreate () { + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + this->mUseVAOs = false; size_t totalVAOs = this->mVAOs.Size (); @@ -196,32 +182,56 @@ bool MOAIVertexArray::OnGPUCreate () { if ( totalVAOs ) { for ( size_t i = 0; i < totalVAOs; ++i ) { - u32 vao = zglCreateVertexArray (); // OK for this to return 0 - if ( !vao ) return true; - this->mVAOs [ i ] = vao; + ZLGfxHandle* vao = gfx.CreateVertexArray (); // OK for this to return 0 + if ( vao ) { + this->mVAOs [ i ] = vao; + this->mUseVAOs = true; + } } - this->mUseVAOs = true; } + + this->mCurrentVAO = 0; + this->OnGPUUpdate (); + return true; } //----------------------------------------------------------------// -void MOAIVertexArray::OnGPUDestroy () { +void MOAIVertexArray::OnGPUDeleteOrDiscard ( bool shouldDelete ) { + + for ( size_t i = 0; i < this->mVAOs.Size (); ++i ) { + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mVAOs [ i ], shouldDelete ); + } } //----------------------------------------------------------------// -void MOAIVertexArray::OnGPULost () { +void MOAIVertexArray::OnGPUUnbind () { - this->mVAOs.Fill ( 0 ); + if ( this->mUseVAOs ) { + MOAIGfxMgr::GetDrawingAPI ().BindVertexArray ( 0 ); + } + else { + this->UnbindVertexArrayItems (); + } } //----------------------------------------------------------------// -void MOAIVertexArray::OnGPUUnbind () { +bool MOAIVertexArray::OnGPUUpdate () { - if ( this->mUseVAOs ) { - zglBindVertexArray ( 0 ); + if ( !this->mUseVAOs ) return true; + if ( !this->mVAOs.Size ()) return false; + + this->mCurrentVAO = ( this->mCurrentVAO + 1 ) % this->mVAOs.Size (); + ZLGfxHandle* vao = this->mVAOs [ this->mCurrentVAO ]; + + if ( vao ) { + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + gfx.BindVertexArray ( vao ); + this->BindVertexArrayItems (); + gfx.BindVertexArray ( 0 ); + return true; } - this->UnbindVertexArrayItems (); + return false; } //----------------------------------------------------------------// @@ -248,13 +258,15 @@ void MOAIVertexArray::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// void MOAIVertexArray::ReserveVAOs ( u32 total ) { - if ( MOAIGfxResourceMgr::IsValid ()) { + if ( MOAIGfxMgr::IsValid ()) { for ( size_t i = 0; i < this->mVAOs.Size (); ++i ) { - MOAIGfxResourceMgr::Get ().PushDeleter ( MOAIGfxDeleter::DELETE_BUFFER, this->mVAOs [ i ]); + MOAIGfxResourceClerk::DeleteOrDiscardHandle ( this->mVAOs [ i ], false ); } } this->mVAOs.Init ( total ); this->mVAOs.Fill ( 0 ); + + this->FinishInit (); } //----------------------------------------------------------------// @@ -264,6 +276,8 @@ void MOAIVertexArray::ReserveVertexBuffers ( u32 total ) { this->mVertexBuffers [ i ].SetBufferAndFormat ( *this, 0, 0 ); } this->mVertexBuffers.Init ( total ); + + this->FinishInit (); } //----------------------------------------------------------------// @@ -286,16 +300,14 @@ void MOAIVertexArray::SerializeIn ( MOAILuaState& state, MOAIDeserializer& seria } state.Pop (); } - - this->mNeedsFlush = true; this->FinishInit (); } //----------------------------------------------------------------// void MOAIVertexArray::SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ) { - state.SetField < u32 >( -1, "mTotalVAOs", this->mVAOs.Size ()); - state.SetField < u32 >( -1, "mTotalVertexBuffers", this->mVertexBuffers.Size ()); + state.SetField < u32 >( -1, "mTotalVAOs", ( u32 )this->mVAOs.Size ()); + state.SetField < u32 >( -1, "mTotalVertexBuffers", ( u32 )this->mVertexBuffers.Size ()); lua_newtable ( state ); for ( u32 i = 0; i < this->mVertexBuffers.Size (); ++i ) { @@ -313,7 +325,7 @@ void MOAIVertexArray::SetVertexBuffer ( u32 idx, MOAIVertexBuffer* vtxBuffer, MO if ( this->AffirmVertexBuffers ( idx )) { this->mVertexBuffers [ idx ].SetBufferAndFormat ( *this, vtxBuffer, vtxFormat ); - this->mNeedsFlush = true; + this->ScheduleForGPUUpdate (); } } diff --git a/src/moai-sim/MOAIVertexArray.h b/src/moai-sim/MOAIVertexArray.h index 4ffaf5741e..8c99971b91 100644 --- a/src/moai-sim/MOAIVertexArray.h +++ b/src/moai-sim/MOAIVertexArray.h @@ -35,13 +35,12 @@ class MOAIVertexArray : public MOAIGfxResource { protected: - ZLLeanArray < u32 > mVAOs; // vertex array objects to bind all the vertex and buffer state + ZLLeanArray < ZLGfxHandle* > mVAOs; // vertex array objects to bind all the vertex and buffer state u32 mCurrentVAO; ZLLeanArray < MOAIVertexArrayItem > mVertexBuffers; bool mUseVAOs; - bool mNeedsFlush; //----------------------------------------------------------------// static int _reserveVAOs ( lua_State* L ); @@ -55,9 +54,9 @@ class MOAIVertexArray : void OnCPUDestroy (); // clear any CPU-side memory used by class void OnGPUBind (); // select GPU-side resource on device for use bool OnGPUCreate (); // create GPU-side resource - void OnGPUDestroy (); // schedule GPU-side resource for destruction - void OnGPULost (); // clear any handles or references to GPU-side (called by 'Abandon') + void OnGPUDeleteOrDiscard ( bool shouldDelete ); // delete or discard GPU resource void OnGPUUnbind (); // unbind GPU-side resource + bool OnGPUUpdate (); void UnbindVertexArrayItems (); public: diff --git a/src/moai-sim/MOAIVertexBuffer.cpp b/src/moai-sim/MOAIVertexBuffer.cpp index 636fc2d261..39c449e9c2 100644 --- a/src/moai-sim/MOAIVertexBuffer.cpp +++ b/src/moai-sim/MOAIVertexBuffer.cpp @@ -3,8 +3,8 @@ #include "pch.h" -#include -#include +#include +#include #include #include #include @@ -82,7 +82,7 @@ int MOAIVertexBuffer::_countElements ( lua_State* L ) { if ( state.CheckParams ( 2, "N", false )) { u32 elementSize = state.GetValue < u32 >( 2, 4 ); - totalElements = self->GetSize () / elementSize; + totalElements = ( u32 )( self->GetSize () / elementSize ); // TODO: cast } // vertex format @@ -140,9 +140,9 @@ void MOAIVertexBuffer::PrintVertices ( MOAIVertexFormat& vertexFormat ) { size_t cursor = this->GetCursor (); if ( cursor ) { - this->Seek ( 0, SEEK_SET ); + this->SetCursor ( 0 ); vertexFormat.PrintVertices ( *this, cursor ); - this->Seek ( cursor, SEEK_SET ); + this->SetCursor ( cursor ); } } diff --git a/src/moai-sim/MOAIVertexBuffer.h b/src/moai-sim/MOAIVertexBuffer.h index 35d935b3e4..f3132490f4 100644 --- a/src/moai-sim/MOAIVertexBuffer.h +++ b/src/moai-sim/MOAIVertexBuffer.h @@ -18,7 +18,7 @@ class MOAIVertexBuffer : public MOAIGfxBuffer { private: - friend class MOAIGfxDeviceBase; + friend class MOAIGfxPipelineClerk; //----------------------------------------------------------------// static int _computeBounds ( lua_State* L ); diff --git a/src/moai-sim/MOAIVertexFormat.cpp b/src/moai-sim/MOAIVertexFormat.cpp index 85988075f0..317047d94d 100644 --- a/src/moai-sim/MOAIVertexFormat.cpp +++ b/src/moai-sim/MOAIVertexFormat.cpp @@ -2,7 +2,7 @@ // http://getmoai.com #include "pch.h" -#include +#include #include #include @@ -154,14 +154,20 @@ MOAIVertexFormat* MOAIVertexFormat::AffirmVertexFormat ( MOAILuaState& state, in } //----------------------------------------------------------------// -void MOAIVertexFormat::Bind ( const void* buffer ) const { +void MOAIVertexFormat::Bind ( ZLSharedConstBuffer* buffer, bool copyBuffer ) const { + + ZLGfx& gfx = MOAIGfxMgr::GetDrawingAPI (); + + if ( copyBuffer ) { + buffer = gfx.CopyBuffer ( buffer ); + } for ( u32 i = 0; i < this->mTotalAttributes; ++i ) { const MOAIVertexAttribute& attr = this->mAttributes [ i ]; - zglVertexAttribPointer ( attr.mIndex, attr.mSize, attr.mType, attr.mNormalized, this->mVertexSize, ( const void* )(( size_t )buffer + attr.mOffset )); - zglEnableVertexAttribArray ( attr.mIndex ); + gfx.EnableVertexAttribArray ( attr.mIndex ); + gfx.VertexAttribPointer ( attr.mIndex, attr.mSize, attr.mType, attr.mNormalized, this->mVertexSize, buffer, attr.mOffset ); } } @@ -235,7 +241,7 @@ bool MOAIVertexFormat::ComputeBounds ( ZLBox& bounds, const void* buffer, size_t //----------------------------------------------------------------// bool MOAIVertexFormat::ComputeBounds ( ZLBox& bounds, ZLStream& stream, size_t size ) const { - u32 total = this->mVertexSize ? ( size / this->mVertexSize ) : 0; + u32 total = this->mVertexSize ? ( u32 )( size / this->mVertexSize ) : 0; // TODO: cast if ( !total ) return false; size_t base = stream.GetCursor (); @@ -464,7 +470,7 @@ void MOAIVertexFormat::PrintVertices ( ZLStream& stream ) const { //----------------------------------------------------------------// void MOAIVertexFormat::PrintVertices ( ZLStream& stream, size_t size ) const { - u32 total = this->mVertexSize ? ( size / this->mVertexSize ) : 0; + u32 total = this->mVertexSize ? ( u32 )( size / this->mVertexSize ) : 0; // TODO: cast if ( !total ) return; for ( u32 i = 0; i < total; ++i ) { @@ -528,9 +534,9 @@ ZLVec4D MOAIVertexFormat::ReadAttribute ( ZLStream& stream, u32 attrID, float zF const MOAIVertexAttribute& attribute = this->mAttributes [ attrID ]; size_t base = stream.GetCursor (); - stream.Seek ( base + attribute.mOffset, SEEK_SET ); + stream.SetCursor ( base + attribute.mOffset ); stream.ReadBytes ( buffer, attribute.mSizeInBytes ); - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); return this->UnpackAttribute ( buffer, attribute, zFallback, wFallback ); } @@ -596,7 +602,7 @@ void MOAIVertexFormat::RegisterLuaFuncs ( MOAILuaState& state ) { //----------------------------------------------------------------// size_t MOAIVertexFormat::SeekVertex ( ZLStream& stream, size_t base, size_t vertex ) const { - stream.Seek ( base + ( vertex * this->mVertexSize ), SEEK_SET ); + stream.SetCursor ( base + ( vertex * this->mVertexSize )); return stream.GetCursor (); } @@ -688,7 +694,7 @@ void MOAIVertexFormat::Unbind () const { for ( u32 i = 0; i < this->mTotalAttributes; ++i ) { MOAIVertexAttribute& attr = this->mAttributes [ i ]; - zglDisableVertexAttribArray ( attr.mIndex ); + MOAIGfxMgr::GetDrawingAPI ().DisableVertexAttribArray ( attr.mIndex ); } } @@ -783,7 +789,7 @@ void MOAIVertexFormat::WriteAhead ( ZLStream& stream ) const { memset ( buffer, 0, this->mVertexSize ); stream.WriteBytes ( buffer, this->mVertexSize ); - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } //----------------------------------------------------------------// @@ -799,9 +805,9 @@ void MOAIVertexFormat::WriteAttribute ( ZLStream& stream, u32 attrID, float x, f if ( size ) { size_t base = stream.GetCursor (); - stream.Seek ( base + attribute.mOffset, SEEK_SET ); + stream.SetCursor ( base + attribute.mOffset ); stream.WriteBytes ( buffer, size ); - stream.Seek ( base, SEEK_SET ); + stream.SetCursor ( base ); } } } diff --git a/src/moai-sim/MOAIVertexFormat.h b/src/moai-sim/MOAIVertexFormat.h index ad880bb2d0..893ff3f2ef 100644 --- a/src/moai-sim/MOAIVertexFormat.h +++ b/src/moai-sim/MOAIVertexFormat.h @@ -59,9 +59,9 @@ class MOAIVertexFormat : private: - friend class MOAIGfxDevice; - friend class MOAIGfxDeviceBase; - friend class MOAIGfxDeviceStateCache; + friend class MOAIGfxMgr; + friend class MOAIGfxPipelineClerk; + friend class MOAIGfxStateCache; static const u32 COLOR_SIZE = 4; static const u32 NORMAL_SIZE = 3; @@ -84,7 +84,7 @@ class MOAIVertexFormat : static int _getVertexSize ( lua_State* L ); //----------------------------------------------------------------// - void Bind ( const void* buffer ) const; + void Bind ( ZLSharedConstBuffer* buffer, bool copyBuffer ) const; static u32 GetComponentSize ( u32 size, u32 type ); static u32 GetIndexForUse ( u32 use ); static u32 GetUseForIndex ( u32 idx ); diff --git a/src/moai-sim/MOAIVertexFormatMgr.cpp b/src/moai-sim/MOAIVertexFormatMgr.cpp index b9db6f7a71..8d24d0bc8b 100644 --- a/src/moai-sim/MOAIVertexFormatMgr.cpp +++ b/src/moai-sim/MOAIVertexFormatMgr.cpp @@ -2,7 +2,7 @@ // http://getmoai.com #include "pch.h" -#include +#include #include #include diff --git a/src/moai-sim/MOAIVertexFormatMgr.h b/src/moai-sim/MOAIVertexFormatMgr.h index 60b445a01d..b71b4d03bc 100644 --- a/src/moai-sim/MOAIVertexFormatMgr.h +++ b/src/moai-sim/MOAIVertexFormatMgr.h @@ -20,9 +20,10 @@ class MOAIVertexFormatMgr : XYZWNNNC, XYZWNNNUVC, TOTAL_FORMATS, - UNKNOWN_FORMAT = 0xffffffff, }; + static const u32 UNKNOWN_FORMAT = 0xffffffff; + private: MOAIVertexFormat* mFormats [ TOTAL_FORMATS ]; diff --git a/src/moai-sim/MOAIWheelSensor.h b/src/moai-sim/MOAIWheelSensor.h index 47ab892262..d55ccd2add 100644 --- a/src/moai-sim/MOAIWheelSensor.h +++ b/src/moai-sim/MOAIWheelSensor.h @@ -40,4 +40,4 @@ class MOAIWheelSensor : void ResetState (); }; -#endif \ No newline at end of file +#endif diff --git a/src/moai-sim/headers.h b/src/moai-sim/headers.h index 6fee20dcea..ea94e07109 100644 --- a/src/moai-sim/headers.h +++ b/src/moai-sim/headers.h @@ -37,14 +37,15 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include +#include #include #include #include @@ -89,7 +90,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -158,9 +161,11 @@ #include #include #include -#include -#include #include +#include +#include +#include +#include #include #include #include diff --git a/src/moai-sim/host.cpp b/src/moai-sim/host.cpp index 68f2d31ead..32ebbba1d1 100644 --- a/src/moai-sim/host.cpp +++ b/src/moai-sim/host.cpp @@ -10,157 +10,64 @@ //================================================================// //----------------------------------------------------------------// -void AKUSimAppFinalize () { +void AKUDetectFramebuffer () { + + MOAIGfxMgr::Get ().DetectFramebuffer (); } //----------------------------------------------------------------// -void AKUSimAppInitialize () { +void AKUDetectGfxContext () { + + MOAIGfxMgr::Get ().DetectContext (); } //----------------------------------------------------------------// -void AKUSimContextInitialize () { +void AKUDiscardGfxResources () { - ZLBitBuffer::Test (); + MOAIGfxMgr::Get ().mResourceMgr.DiscardResources (); +} - MOAINodeMgr::Affirm (); - MOAIActionStackMgr::Affirm (); +//----------------------------------------------------------------// +void AKUDisplayListBeginPhase ( int phase ) { - //MOAIProfiler::Affirm (); - MOAIGfxResourceMgr::Affirm (); - MOAIGfxDevice::Affirm (); - MOAIImageFormatMgr::Affirm (); - MOAIVertexFormatMgr::Affirm (); - MOAIShaderMgr::Affirm (); - MOAIDraw::Affirm (); - MOAIDebugLines::Affirm (); - MOAIPartitionResultMgr::Affirm (); - MOAINodeMgr::Affirm (); - MOAIInputMgr::Affirm (); - MOAISim::Affirm (); - MOAIRenderMgr::Affirm (); - - // MOAI - REGISTER_LUA_CLASS ( MOAIAction ) - REGISTER_LUA_CLASS ( MOAIActionTree ) - REGISTER_LUA_CLASS ( MOAIAnim ) - REGISTER_LUA_CLASS ( MOAIAnimCurve ) - REGISTER_LUA_CLASS ( MOAIAnimCurveQuat ) - REGISTER_LUA_CLASS ( MOAIAnimCurveVec ) - REGISTER_LUA_CLASS ( MOAIBoundsDeck ) - //REGISTER_LUA_CLASS ( MOAIBspBuilder2D ) - REGISTER_LUA_CLASS ( MOAIButtonSensor ) - REGISTER_LUA_CLASS ( MOAICamera ) - REGISTER_LUA_CLASS ( MOAICameraAnchor2D ) - REGISTER_LUA_CLASS ( MOAICameraFitter2D ) - REGISTER_LUA_CLASS ( MOAICollisionProp ) - REGISTER_LUA_CLASS ( MOAICollisionWorld ) - REGISTER_LUA_CLASS ( MOAIColor ) - REGISTER_LUA_CLASS ( MOAICompassSensor ) - REGISTER_LUA_CLASS ( MOAICoroutine ) - REGISTER_LUA_CLASS ( MOAIDebugLines ) - REGISTER_LUA_CLASS ( MOAIDeckRemapper ) - REGISTER_LUA_CLASS ( MOAIDraw ) - REGISTER_LUA_CLASS ( MOAIEaseDriver ) - REGISTER_LUA_CLASS ( MOAIEaseType ) - REGISTER_LUA_CLASS ( MOAIFrameBuffer ) - REGISTER_LUA_CLASS ( MOAIFrameBufferTexture ) - REGISTER_LUA_CLASS ( MOAIGeometryWriter ) - REGISTER_LUA_CLASS ( MOAIGfxDevice ) - REGISTER_LUA_CLASS ( MOAIGfxQuad2D ) - REGISTER_LUA_CLASS ( MOAIGfxQuadDeck2D ) - REGISTER_LUA_CLASS ( MOAIGfxQuadListDeck2D ) - REGISTER_LUA_CLASS ( MOAIGfxResourceMgr ) - REGISTER_LUA_CLASS ( MOAIGraphicsProp ) - REGISTER_LUA_CLASS ( MOAIGrid ) - REGISTER_LUA_CLASS ( MOAIGridDeck2D ) - REGISTER_LUA_CLASS ( MOAIGridSpace ) - REGISTER_LUA_CLASS ( MOAIGridPathGraph ) - REGISTER_LUA_CLASS ( MOAIGridFancy ) - REGISTER_LUA_CLASS ( MOAIImage ) - REGISTER_LUA_CLASS ( MOAIImageTexture ) - REGISTER_LUA_CLASS ( MOAIIndexBuffer ) - REGISTER_LUA_CLASS ( MOAIInputDevice ) - REGISTER_LUA_CLASS ( MOAIInputMgr ) - REGISTER_LUA_CLASS ( MOAIJoystickSensor ) - REGISTER_LUA_CLASS ( MOAIKeyCode ) - REGISTER_LUA_CLASS ( MOAIKeyboardSensor ) - REGISTER_LUA_CLASS ( MOAILayer ) - //REGISTER_LUA_CLASS ( MOAILayoutFrame ) - REGISTER_LUA_CLASS ( MOAILocationSensor ) - REGISTER_LUA_CLASS ( MOAIMaterialBatch ) - REGISTER_LUA_CLASS ( MOAIMatrix ) - REGISTER_LUA_CLASS ( MOAIMesh ) - REGISTER_LUA_CLASS ( MOAIMotionSensor ) - REGISTER_LUA_CLASS ( MOAIMultiTexture ) - REGISTER_LUA_CLASS ( MOAINode ) - REGISTER_LUA_CLASS ( MOAINodeMgr ) - REGISTER_LUA_CLASS ( MOAIParticleCallbackPlugin ) - REGISTER_LUA_CLASS ( MOAIParticleDistanceEmitter ) - REGISTER_LUA_CLASS ( MOAIParticleForce ) - REGISTER_LUA_CLASS ( MOAIParticleScript ) - REGISTER_LUA_CLASS ( MOAIParticleState ) - REGISTER_LUA_CLASS ( MOAIParticleSystem ) - REGISTER_LUA_CLASS ( MOAIParticleTimedEmitter ) - REGISTER_LUA_CLASS ( MOAIPartition ) - REGISTER_LUA_CLASS ( MOAIPathFinder ) - REGISTER_LUA_CLASS ( MOAIPathTerrainDeck ) - REGISTER_LUA_CLASS ( MOAIPinTransform ) - REGISTER_LUA_CLASS ( MOAIPointerSensor ) - //REGISTER_LUA_CLASS ( MOAIProfilerReportBox ) - REGISTER_LUA_CLASS ( MOAIRegion ) - REGISTER_LUA_CLASS ( MOAIRenderMgr ) - REGISTER_LUA_CLASS ( MOAIScissorRect ) - REGISTER_LUA_CLASS ( MOAIScriptDeck ) - REGISTER_LUA_CLASS ( MOAIScriptNode ) - REGISTER_LUA_CLASS ( MOAISelectionMesh ) - REGISTER_LUA_CLASS ( MOAIShader ) - REGISTER_LUA_CLASS ( MOAIShaderMgr ) - REGISTER_LUA_CLASS ( MOAIShaderProgram ) - REGISTER_LUA_CLASS ( MOAISim ) - REGISTER_LUA_CLASS ( MOAIStretchPatch2D ) - REGISTER_LUA_CLASS ( MOAISurfaceDeck2D ) - REGISTER_LUA_CLASS ( MOAITexture ) - REGISTER_LUA_CLASS ( MOAITileDeck2D ) - REGISTER_LUA_CLASS ( MOAITimer ) - REGISTER_LUA_CLASS ( MOAITouchSensor ) - REGISTER_LUA_CLASS ( MOAITransform ) - REGISTER_LUA_CLASS ( MOAIVecPathGraph ) - REGISTER_LUA_CLASS ( MOAIVectorTesselator ) - REGISTER_LUA_CLASS ( MOAIVertexArray ) - REGISTER_LUA_CLASS ( MOAIVertexBuffer ) - REGISTER_LUA_CLASS ( MOAIVertexFormat ) - REGISTER_LUA_CLASS ( MOAIVertexFormatMgr ) - REGISTER_LUA_CLASS ( MOAIViewport ) - REGISTER_LUA_CLASS ( MOAIWheelSensor ) - - // text stuff here for now - REGISTER_LUA_CLASS ( MOAIBitmapFontReader ) - REGISTER_LUA_CLASS ( MOAIDynamicGlyphCache ) - REGISTER_LUA_CLASS ( MOAIFont ) - REGISTER_LUA_CLASS ( MOAIStaticGlyphCache ) - REGISTER_LUA_CLASS ( MOAITextBundle ) - REGISTER_LUA_CLASS ( MOAITextLabel ) - REGISTER_LUA_CLASS ( MOAITextStyle ) - - #if MOAI_WITH_TINYXML - REGISTER_LUA_CLASS ( MOAIParticlePexPlugin ) - #endif - - #if MOAI_WITH_FREETYPE - REGISTER_LUA_CLASS ( MOAIFreeTypeFontReader ) - #endif + MOAIGfxMgr::Get ().mPipelineMgr.BeginPhase ( phase ); } //----------------------------------------------------------------// -void AKUDetectFramebuffer () { +void AKUDisplayListEnable ( int list ) { - MOAIGfxDevice::Get ().DetectFramebuffer (); + MOAIGfxMgr::Get ().mPipelineMgr.EnablePipeline ( list ); } //----------------------------------------------------------------// -void AKUDetectGfxContext () { +void AKUDisplayListEndPhase ( int phase ) { + + MOAIGfxMgr::Get ().mPipelineMgr.EndPhase ( phase ); +} + +//----------------------------------------------------------------// +bool AKUDisplayListHasContent ( int list ) { + + return MOAIGfxMgr::Get ().mPipelineMgr.HasContent ( list ); +} + +//----------------------------------------------------------------// +bool AKUDisplayListIsEnabled ( int list ) { + + return MOAIGfxMgr::Get ().mPipelineMgr.IsPipelineEnabled ( list ); +} + +//----------------------------------------------------------------// +void AKUDisplayListProcess ( int list ) { - MOAIGfxDevice::Get ().DetectContext (); + MOAIGfxMgr::Get ().mPipelineMgr.ProcessPipeline ( list ); +} + +//----------------------------------------------------------------// +void AKUDisplayListPublishAndReset () { + + MOAIGfxMgr::Get ().mPipelineMgr.PublishAndReset ( MOAIGfxPipelineClerk::LOADING_PIPELINE ); + MOAIGfxMgr::Get ().mPipelineMgr.PublishAndReset ( MOAIGfxPipelineClerk::DRAWING_PIPELINE ); } //----------------------------------------------------------------// @@ -236,7 +143,7 @@ void AKUEnqueueTouchEventCancel ( int deviceID, int sensorID ) { } //----------------------------------------------------------------// -void AKUEnqueueVectorEvent ( int deviceID, int sensorID, int touchID, bool down, float x, float y, float z ) { +void AKUEnqueueVectorEvent ( int deviceID, int sensorID, float x, float y, float z ) { MOAIVectorSensor::EnqueueVectorEvent (( u8 )deviceID, ( u8 )sensorID, x, y, z ); } @@ -256,7 +163,7 @@ double AKUGetSimStep () { //----------------------------------------------------------------// int AKUIsGfxBufferOpaque () { - return MOAIGfxDevice::Get ().IsOpaque (); + return MOAIGfxMgr::Get ().IsOpaque (); } //----------------------------------------------------------------// @@ -273,6 +180,8 @@ void AKUPause ( bool pause ) { //----------------------------------------------------------------// void AKURender () { + MOAIGfxMgr::Get ().mPipelineMgr.ResetDrawingAPIs (); + MOAIGfxMgr::Get ().mResourceMgr.Update (); MOAIRenderMgr::Get ().Render (); } @@ -318,6 +227,12 @@ void AKUSetFunc_SetSimStep ( AKUSetSimStepFunc func ) { MOAISim::Get ().SetSetSimStepFunc ( func ); } +//----------------------------------------------------------------// +void AKUSetInputAutoTimestamp ( bool autotimestamp ) { + + MOAIInputMgr::Get ().SetAutotimestamp ( autotimestamp ); +} + //----------------------------------------------------------------// void AKUSetInputConfigurationName ( char const* name ) { @@ -417,7 +332,7 @@ void AKUSetInputTimestamp ( double timestamp ) { //----------------------------------------------------------------// void AKUSetOrientation ( int orientation ) { - MOAIGfxDevice::Get ().GetDefaultFrameBuffer ()->SetLandscape ( orientation == AKU_ORIENTATION_LANDSCAPE ); + MOAIGfxMgr::Get ().mGfxState.GetDefaultFrameBuffer ()->SetLandscape ( orientation == AKU_ORIENTATION_LANDSCAPE ); } //----------------------------------------------------------------// @@ -427,7 +342,7 @@ void AKUSetScreenDpi ( int dpi ) { } //----------------------------------------------------------------// -void AKUSetScreenSize ( int width, int height ) { +void AKUSetScreenSize ( int width, int height) { MOAIEnvironment::Get ().SetValue ( MOAI_ENV_horizontalResolution, width ); MOAIEnvironment::Get ().SetValue ( MOAI_ENV_verticalResolution, height ); @@ -436,17 +351,17 @@ void AKUSetScreenSize ( int width, int height ) { //----------------------------------------------------------------// void AKUSetViewSize ( int width, int height ) { - MOAIGfxDevice& device = MOAIGfxDevice::Get (); + MOAIGfxMgr& gfxMgr = MOAIGfxMgr::Get (); - u32 currentWidth = device.GetWidth (); - u32 currentHeight = device.GetHeight (); + u32 currentWidth = gfxMgr.mGfxState.GetBufferWidth (); + u32 currentHeight = gfxMgr.mGfxState.GetBufferHeight (); if (( currentWidth != ( u32 )width ) || ( currentHeight != ( u32 )height )) { - MOAIGfxDevice::Get ().SetBufferSize ( width, height ); + MOAIGfxMgr::Get ().SetBufferSize ( width, height ); MOAIScopedLuaState state = MOAILuaRuntime::Get ().State (); - if ( device.PushListener ( MOAIGfxDevice::EVENT_RESIZE, state )) { + if ( gfxMgr.PushListener ( MOAIGfxMgr::EVENT_RESIZE, state )) { lua_pushnumber ( state, width ); lua_pushnumber ( state, height ); state.DebugCall ( 2, 0 ); @@ -466,6 +381,148 @@ void AKUSetFunc_SetTextInputRect ( AKUSetTextInputRectFunc func ) { MOAISim::Get ().SetSetTextInputRectFunc ( func ); } +//----------------------------------------------------------------// +void AKUSimAppFinalize () { +} + +//----------------------------------------------------------------// +void AKUSimAppInitialize () { +} + +//----------------------------------------------------------------// +void AKUSimContextInitialize () { + + ZLBitBuffer::Test (); + + MOAINodeMgr::Affirm (); + MOAIActionStackMgr::Affirm (); + + //MOAIProfiler::Affirm (); + MOAIGfxMgr::Affirm (); + MOAIImageFormatMgr::Affirm (); + MOAIVertexFormatMgr::Affirm (); + MOAIShaderMgr::Affirm (); + MOAIDraw::Affirm (); + MOAIDebugLines::Affirm (); + MOAIPartitionResultMgr::Affirm (); + MOAINodeMgr::Affirm (); + MOAIInputMgr::Affirm (); + MOAISim::Affirm (); + MOAIRenderMgr::Affirm (); + + // MOAI + REGISTER_LUA_CLASS ( MOAIAction ) + REGISTER_LUA_CLASS ( MOAIActionTree ) + REGISTER_LUA_CLASS ( MOAIAnim ) + REGISTER_LUA_CLASS ( MOAIAnimCurve ) + REGISTER_LUA_CLASS ( MOAIAnimCurveQuat ) + REGISTER_LUA_CLASS ( MOAIAnimCurveVec ) + REGISTER_LUA_CLASS ( MOAIBoundsDeck ) + //REGISTER_LUA_CLASS ( MOAIBspBuilder2D ) + REGISTER_LUA_CLASS ( MOAIButtonSensor ) + REGISTER_LUA_CLASS ( MOAICamera ) + REGISTER_LUA_CLASS ( MOAICameraAnchor2D ) + REGISTER_LUA_CLASS ( MOAICameraFitter2D ) + REGISTER_LUA_CLASS ( MOAICollisionProp ) + REGISTER_LUA_CLASS ( MOAICollisionWorld ) + REGISTER_LUA_CLASS ( MOAIColor ) + REGISTER_LUA_CLASS ( MOAICompassSensor ) + REGISTER_LUA_CLASS ( MOAICoroutine ) + REGISTER_LUA_CLASS ( MOAIDebugLines ) + REGISTER_LUA_CLASS ( MOAIDeckRemapper ) + REGISTER_LUA_CLASS ( MOAIDraw ) + REGISTER_LUA_CLASS ( MOAIEaseDriver ) + REGISTER_LUA_CLASS ( MOAIEaseType ) + REGISTER_LUA_CLASS ( MOAIFrameBuffer ) + REGISTER_LUA_CLASS ( MOAIFrameBufferTexture ) + REGISTER_LUA_CLASS ( MOAIGeometryWriter ) + REGISTER_LUA_CLASS ( MOAIGfxMgr ) + REGISTER_LUA_CLASS ( MOAIGfxQuad2D ) + REGISTER_LUA_CLASS ( MOAIGfxQuadDeck2D ) + REGISTER_LUA_CLASS ( MOAIGfxQuadListDeck2D ) + REGISTER_LUA_CLASS ( MOAIGraphicsProp ) + REGISTER_LUA_CLASS ( MOAIGrid ) + REGISTER_LUA_CLASS ( MOAIGridDeck2D ) + REGISTER_LUA_CLASS ( MOAIGridSpace ) + REGISTER_LUA_CLASS ( MOAIGridPathGraph ) + REGISTER_LUA_CLASS ( MOAIGridFancy ) + REGISTER_LUA_CLASS ( MOAIImage ) + REGISTER_LUA_CLASS ( MOAIImageTexture ) + REGISTER_LUA_CLASS ( MOAIIndexBuffer ) + REGISTER_LUA_CLASS ( MOAIInputDevice ) + REGISTER_LUA_CLASS ( MOAIInputMgr ) + REGISTER_LUA_CLASS ( MOAIJoystickSensor ) + REGISTER_LUA_CLASS ( MOAIKeyCode ) + REGISTER_LUA_CLASS ( MOAIKeyboardSensor ) + REGISTER_LUA_CLASS ( MOAILayer ) + //REGISTER_LUA_CLASS ( MOAILayoutFrame ) + REGISTER_LUA_CLASS ( MOAILocationSensor ) + REGISTER_LUA_CLASS ( MOAIMaterialBatch ) + REGISTER_LUA_CLASS ( MOAIMatrix ) + REGISTER_LUA_CLASS ( MOAIMesh ) + REGISTER_LUA_CLASS ( MOAIMotionSensor ) + REGISTER_LUA_CLASS ( MOAIMultiTexture ) + REGISTER_LUA_CLASS ( MOAINode ) + REGISTER_LUA_CLASS ( MOAINodeMgr ) + REGISTER_LUA_CLASS ( MOAIParticleCallbackPlugin ) + REGISTER_LUA_CLASS ( MOAIParticleDistanceEmitter ) + REGISTER_LUA_CLASS ( MOAIParticleForce ) + REGISTER_LUA_CLASS ( MOAIParticleScript ) + REGISTER_LUA_CLASS ( MOAIParticleState ) + REGISTER_LUA_CLASS ( MOAIParticleSystem ) + REGISTER_LUA_CLASS ( MOAIParticleTimedEmitter ) + REGISTER_LUA_CLASS ( MOAIPartition ) + REGISTER_LUA_CLASS ( MOAIPath ) + REGISTER_LUA_CLASS ( MOAIPathFinder ) + REGISTER_LUA_CLASS ( MOAIPathStepper ) + REGISTER_LUA_CLASS ( MOAIPathTerrainDeck ) + REGISTER_LUA_CLASS ( MOAIPinTransform ) + REGISTER_LUA_CLASS ( MOAIPointerSensor ) + //REGISTER_LUA_CLASS ( MOAIProfilerReportBox ) + REGISTER_LUA_CLASS ( MOAIRegion ) + REGISTER_LUA_CLASS ( MOAIRenderMgr ) + REGISTER_LUA_CLASS ( MOAIScissorRect ) + REGISTER_LUA_CLASS ( MOAIScriptDeck ) + REGISTER_LUA_CLASS ( MOAIScriptNode ) + REGISTER_LUA_CLASS ( MOAISelectionMesh ) + REGISTER_LUA_CLASS ( MOAIShader ) + REGISTER_LUA_CLASS ( MOAIShaderMgr ) + REGISTER_LUA_CLASS ( MOAIShaderProgram ) + REGISTER_LUA_CLASS ( MOAISim ) + REGISTER_LUA_CLASS ( MOAIStretchPatch2D ) + REGISTER_LUA_CLASS ( MOAISurfaceDeck2D ) + REGISTER_LUA_CLASS ( MOAITexture ) + REGISTER_LUA_CLASS ( MOAITileDeck2D ) + REGISTER_LUA_CLASS ( MOAITimer ) + REGISTER_LUA_CLASS ( MOAITouchSensor ) + REGISTER_LUA_CLASS ( MOAITransform ) + REGISTER_LUA_CLASS ( MOAIVecPathGraph ) + REGISTER_LUA_CLASS ( MOAIVectorTesselator ) + REGISTER_LUA_CLASS ( MOAIVertexArray ) + REGISTER_LUA_CLASS ( MOAIVertexBuffer ) + REGISTER_LUA_CLASS ( MOAIVertexFormat ) + REGISTER_LUA_CLASS ( MOAIVertexFormatMgr ) + REGISTER_LUA_CLASS ( MOAIViewport ) + REGISTER_LUA_CLASS ( MOAIWheelSensor ) + + // text stuff here for now + REGISTER_LUA_CLASS ( MOAIBitmapFontReader ) + REGISTER_LUA_CLASS ( MOAIDynamicGlyphCache ) + REGISTER_LUA_CLASS ( MOAIFont ) + REGISTER_LUA_CLASS ( MOAIStaticGlyphCache ) + REGISTER_LUA_CLASS ( MOAITextBundle ) + REGISTER_LUA_CLASS ( MOAITextLabel ) + REGISTER_LUA_CLASS ( MOAITextStyle ) + + #if MOAI_WITH_TINYXML + REGISTER_LUA_CLASS ( MOAIParticlePexPlugin ) + #endif + + #if MOAI_WITH_FREETYPE + REGISTER_LUA_CLASS ( MOAIFreeTypeFontReader ) + #endif +} + //----------------------------------------------------------------// void AKUUpdate () { diff --git a/src/moai-sim/host.h b/src/moai-sim/host.h index 6a96b3c599..5474d847dc 100644 --- a/src/moai-sim/host.h +++ b/src/moai-sim/host.h @@ -15,6 +15,17 @@ enum { AKU_ORIENTATION_LANDSCAPE, }; +enum { + AKU_DISPLAY_LIST_DRAWING, + AKU_DISPLAY_LIST_LOADING, +}; + +enum { + AKU_DISPLAY_LIST_LOGIC_PHASE, + AKU_DISPLAY_LIST_LOADING_PHASE, + AKU_DISPLAY_LIST_DRAWING_PHASE, +}; + // Callbacks typedef void ( *AKUEnterFullscreenModeFunc ) (); typedef void ( *AKUExitFullscreenModeFunc ) (); @@ -32,6 +43,7 @@ AKU_API void AKUSimContextInitialize (); // management api AKU_API void AKUDetectFramebuffer (); AKU_API void AKUDetectGfxContext (); +AKU_API void AKUDiscardGfxResources (); AKU_API double AKUGetSimStep (); AKU_API int AKUIsGfxBufferOpaque (); AKU_API void AKUPause ( bool pause ); @@ -42,6 +54,15 @@ AKU_API void AKUSetScreenSize ( int width, int height ); AKU_API void AKUSetViewSize ( int width, int height ); AKU_API void AKUUpdate (); +// display list +AKU_API void AKUDisplayListBeginPhase ( int phase ); +AKU_API void AKUDisplayListEnable ( int list ); +AKU_API void AKUDisplayListEndPhase ( int phase ); +AKU_API bool AKUDisplayListHasContent ( int list ); +AKU_API bool AKUDisplayListIsEnabled ( int list ); +AKU_API void AKUDisplayListProcess ( int list ); +AKU_API void AKUDisplayListPublishAndReset (); + // callback management AKU_API void AKUSetFunc_EnterFullscreenMode ( AKUEnterFullscreenModeFunc func ); AKU_API void AKUSetFunc_ExitFullscreenMode ( AKUExitFullscreenModeFunc func ); @@ -54,6 +75,7 @@ AKU_API void AKUSetFunc_SetTextInputRect ( AKUSetTextInputRectFunc func ); // input device api AKU_API void AKUReserveInputDevices ( int total ); AKU_API void AKUReserveInputDeviceSensors ( int deviceID, int total ); +AKU_API void AKUSetInputAutoTimestamp ( bool autotimestamp ); // optional: causes the input manager to automatically assign timestamps AKU_API void AKUSetInputConfigurationName ( char const* name ); AKU_API void AKUSetInputDevice ( int deviceID, char const* name ); AKU_API void AKUSetInputDeviceHardwareInfo ( int deviceID, char const* hardwareInfo ); diff --git a/src/moai-sim/host_particles.cpp b/src/moai-sim/host_particles.cpp index bef00cb1e1..dcdc766f9c 100644 --- a/src/moai-sim/host_particles.cpp +++ b/src/moai-sim/host_particles.cpp @@ -30,7 +30,7 @@ void AKUSetParticlePreset ( const char* presetTable, const char* presetName, AKU lua_getglobal ( L, presetTable ); - if ( lua_isnil ( L, -1 )) { + if ( lua_isnil ( L, -1 )) { // TODO: nil or none? lua_newtable ( L ); lua_setglobal ( L, presetTable ); } diff --git a/src/moai-untz/MOAIUntzSampleBuffer.cpp b/src/moai-untz/MOAIUntzSampleBuffer.cpp index fcd8750b38..99564c663f 100644 --- a/src/moai-untz/MOAIUntzSampleBuffer.cpp +++ b/src/moai-untz/MOAIUntzSampleBuffer.cpp @@ -11,6 +11,48 @@ // local //================================================================// +//----------------------------------------------------------------// +/** @name getData + @text Retrieve every sample data in buffer + + @in MOAIUntzSampleBuffer self + @out table data array of sample data number ( -1 ~ 1 as sample level) +*/ +int MOAIUntzSampleBuffer::_getData ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIUntzSampleBuffer, "U" ) + + u32 arynum = self->mInfo.mTotalFrames * self->mInfo.mChannels; + lua_createtable ( L, arynum, 0 ); + for ( u32 i = 0; i < arynum; i++ ) { + lua_pushnumber ( L, self->mBuffer [ i ]); + lua_rawseti ( L, -2, i + 1 ); + } + return 1; +} + +//----------------------------------------------------------------// +/** @name getInfo + @text Returns attributes of sample buffer. + + @in MOAIUntzSampleBuffer self + @out number bps bits per sample + @out number channels number of channels (mono=1, stereo=2) + @out number frames num of total frames contained + @out number sampleRate sample rate (44100, 22050, etc.) + @out number length sound length in seconds +*/ +int MOAIUntzSampleBuffer::_getInfo ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIUntzSampleBuffer, "U" ) + + lua_pushnumber ( L, self->mInfo.mBitsPerSample ); + lua_pushnumber ( L, self->mInfo.mChannels ); + lua_pushnumber ( L, self->mInfo.mTotalFrames ); + lua_pushnumber ( L, self->mInfo.mSampleRate ); + lua_pushnumber ( L, self->mInfo.mLength ); + + return 5; +} + //----------------------------------------------------------------// /** @name load @text Loads a sound from disk. @@ -24,60 +66,58 @@ int MOAIUntzSampleBuffer::_load ( lua_State* L ) { cc8* filename = state.GetValue < cc8* >( 2, "" ); - if(!UNTZ::Sound::decode(filename, self->mInfo, (float**)&self->mBuffer)) + if ( !UNTZ::Sound::decode ( filename, self->mInfo, ( float** )&self->mBuffer )) { printf ( "error creating sample buffer\n" ); + } + return 0; +} + +//----------------------------------------------------------------// +/** @name prepareBuffer + @text Allocate internal memory for sample buffer + @in MOAIUntzSampleBuffer self + @in number channels number of channels (mono=1, stereo=2) + @in number frames number of total frames of sample + @in number sampleRate sample rate in Hz (44100 or else) + @out nil +*/ +int MOAIUntzSampleBuffer::_prepareBuffer( lua_State* L ) { + MOAI_LUA_SETUP(MOAIUntzSampleBuffer, "UNNN" ) + + u32 bitsPerSample = 32; + u32 channels = state.GetValue < u32 >( 2, 1 ); + u32 totalFrames = state.GetValue < u32 >( 3, 0 ); + u32 sampleRate = state.GetValue < u32 >( 4, 44100 ); + + double length = ( double )totalFrames / sampleRate; + size_t memSize = totalFrames * channels * 4; + + // Allocate space and copy the buffer + self->mBuffer = ( float* )new char [ memSize ]; + memset ( self->mBuffer, 0, memSize ); + + self->mInfo.mBitsPerSample = bitsPerSample; + self->mInfo.mChannels = channels; + self->mInfo.mTotalFrames = totalFrames; + self->mInfo.mSampleRate = sampleRate; + self->mInfo.mLength = length; return 0; } -/** @name getInfo - @text Returns attributes of sample buffer. - - @in MOAIUntzSampleBuffer self - @out number bps bits per sample - @out number channels number of channels (mono=1, stereo=2) - @out number frames num of total frames contained - @out number sampleRate sample rate (44100, 22050, etc.) - @out number length sound length in seconds - */ -int MOAIUntzSampleBuffer::_getInfo( lua_State* L ) { - MOAI_LUA_SETUP ( MOAIUntzSampleBuffer, "U" ); - - lua_pushnumber(L, self->mInfo.mBitsPerSample); - lua_pushnumber(L, self->mInfo.mChannels); - lua_pushnumber(L, self->mInfo.mTotalFrames); - lua_pushnumber(L, self->mInfo.mSampleRate); - lua_pushnumber(L, self->mInfo.mLength); - return 5; -} -/** @name getData - @text Retrieve every sample data in buffer - - @in MOAIUntzSampleBuffer self - @out table data array of sample data number ( -1 ~ 1 as sample level) - */ -int MOAIUntzSampleBuffer::_getData( lua_State* L ) { - MOAI_LUA_SETUP( MOAIUntzSampleBuffer, "U" ); - u32 arynum = self->mInfo.mTotalFrames * self->mInfo.mChannels; - lua_createtable(L, arynum, 0); - for(u32 i=0;imBuffer[i]); - lua_rawseti(L, -2, i+1); - } - return 1; -} +//----------------------------------------------------------------// /** @name setData - @text Write sample data into buffer - - @in MOAIUntzSampleBuffer self - @in table data array of sample data number ( -1 ~ 1 as sample level ) - @in number startIndex index of sample buffer to start copying from (1 for the first sample) - @out nil - */ - -int MOAIUntzSampleBuffer::_setData( lua_State* L ) { - MOAI_LUA_SETUP( MOAIUntzSampleBuffer, "UTN" ); + @text Write sample data into buffer + + @in MOAIUntzSampleBuffer self + @in table data array of sample data number ( -1 ~ 1 as sample level ) + @in number startIndex index of sample buffer to start copying from (1 for the first sample) + @out nil +*/ +int MOAIUntzSampleBuffer::_setData ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIUntzSampleBuffer, "UTN" ) + u32 startDataIndex = state.GetValue(3,1); int itr = state.PushTableItr(2); int idx = 0; @@ -86,66 +126,44 @@ int MOAIUntzSampleBuffer::_setData( lua_State* L ) { idx = startDataIndex - 1; - for(; state.TableItrNext(itr) && idx< maxindex; ++idx ) { - float val = state.GetValue(-1,0); + for ( ; state.TableItrNext ( itr ) && idx < maxindex; ++idx ) { + float val = state.GetValue < float> ( -1, 0 ); self->mBuffer[idx] = val; // fprintf(stderr, "value %d: %f\n", idx, val ); } return 0; } -/** name setRawData - @text Write raw sample data (array of 16bit short value) into buffer - @in MOAIUntzSampleBuffer self - @in string raw binary data that contains array of network byte ordered 16bit short value - @in number of bytes to read - @in number index of sample buffer start copying from (1 for the first sample) - @out nil - */ -int MOAIUntzSampleBuffer::_setRawData( lua_State* L ) { - MOAI_LUA_SETUP( MOAIUntzSampleBuffer, "USNN" ); - - cc8* s = state.GetValue < cc8* >( 2, "" ); - short *buf = (short*) s; - u32 l = state.GetValue(3, 0); - u32 elemnum = l / 2; - int maxindex = self->mInfo.mChannels * self->mInfo.mTotalFrames; - u32 startDataIndex = state.GetValue(3,1); + +//----------------------------------------------------------------// +/** @name setRawData + @text Write raw sample data (array of 16bit short value) into buffer - for(int idx=0; (idx+(int)startDataIndex) < maxindex && idx < (int)elemnum; ++idx ) { - float val = buf[idx] / 32767.0f; - self->mBuffer[idx] = val; - } - return 0; -} -/** @name preparBuffer - @text Allocate internal memory for sample buffer - - @in MOAIUntzSampleBuffer self - @in number channels number of channels (mono=1, stereo=2) - @in number frames number of total frames of sample - @in number sampleRate sample rate in Hz (44100 or else) - @out nil - */ -int MOAIUntzSampleBuffer::_prepareBuffer( lua_State* L ) { - MOAI_LUA_SETUP(MOAIUntzSampleBuffer, "UNNN" ); + @in MOAIUntzSampleBuffer self + @in string raw binary data that contains array of network byte ordered 16bit short value + @in number of bytes to read + @in number index of sample buffer start copying from (1 for the first sample) + @out nil +*/ +int MOAIUntzSampleBuffer::_setRawData ( lua_State* L ) { + MOAI_LUA_SETUP( MOAIUntzSampleBuffer, "USNN" ) - u32 bitsPerSample = 32; - u32 channels = state.GetValue(2,1); - u32 totalFrames = state.GetValue(3,0); - u32 sampleRate = state.GetValue(4,44100); - double length = (double) totalFrames / sampleRate; - size_t memSize = totalFrames * channels * 4; + cc8* s = state.GetValue < cc8* >( 2, "" ); + short* buf = ( short* )s; + u32 l = state.GetValue < u32 >( 3, 0 ); - // Allocate space and copy the buffer - self->mBuffer = (float*)new char[memSize]; - memset( self->mBuffer, 0, memSize ); - - self->mInfo.mBitsPerSample = bitsPerSample; - self->mInfo.mChannels = channels; - self->mInfo.mTotalFrames = totalFrames; - self->mInfo.mSampleRate = sampleRate; - self->mInfo.mLength = length; + u32 elemnum = l >> 1; + int maxindex = self->mInfo.mChannels * self->mInfo.mTotalFrames; + u32 startDataIndex = state.GetValue < u32 >( 4 , 1 ) - 1; + + for ( int idx = 0; ( idx + ( int )startDataIndex ) < maxindex && idx < ( int )elemnum; ++idx ) { + + float val = buf [ idx ]; + val = val < 0 ? ( val / 32768.0f ) : ( val / 32767.0f ); +// printf ( "bloop: %f\n", val ); + + self->mBuffer [ idx ] = val; + } return 0; } @@ -172,12 +190,12 @@ void MOAIUntzSampleBuffer::RegisterLuaClass ( MOAILuaState& state ) { void MOAIUntzSampleBuffer::RegisterLuaFuncs ( MOAILuaState& state ) { luaL_Reg regTable [] = { + { "getData", _getData }, + { "getInfo", _getInfo }, { "load", _load }, - { "getInfo", _getInfo }, - { "getData", _getData }, - { "setData", _setData }, - { "setRawData", _setRawData }, - { "prepareBuffer", _prepareBuffer }, + { "prepareBuffer", _prepareBuffer }, + { "setData", _setData }, + { "setRawData", _setRawData }, { NULL, NULL } }; diff --git a/src/moai-untz/MOAIUntzSampleBuffer.h b/src/moai-untz/MOAIUntzSampleBuffer.h index e2eac53cf8..2623a7149f 100644 --- a/src/moai-untz/MOAIUntzSampleBuffer.h +++ b/src/moai-untz/MOAIUntzSampleBuffer.h @@ -17,29 +17,30 @@ class MOAIUntzSampleBuffer : public virtual MOAILuaObject { private: - float* mBuffer; - UNTZ::SoundInfo mInfo; + + float* mBuffer; + UNTZ::SoundInfo mInfo; //----------------------------------------------------------------// - static int _load ( lua_State* L ); - static int _getInfo ( lua_State* L ); static int _getData ( lua_State* L ); + static int _getInfo ( lua_State* L ); + static int _load ( lua_State* L ); + static int _prepareBuffer ( lua_State* L ); static int _setData ( lua_State* L ); static int _setRawData ( lua_State* L ); - static int _prepareBuffer ( lua_State* L ); public: DECL_LUA_FACTORY ( MOAIUntzSampleBuffer ) - //----------------------------------------------------------------// - MOAIUntzSampleBuffer (); - ~MOAIUntzSampleBuffer (); - void RegisterLuaClass ( MOAILuaState& state ); - void RegisterLuaFuncs ( MOAILuaState& state ); + GET ( UNTZ::SoundInfo, SoundInfo, mInfo ) + GET ( float*, SampleBuffer, mBuffer ) - UNTZ::SoundInfo GetSoundInfo() { return mInfo; } - float* GetSampleBuffer() { return mBuffer; } + //----------------------------------------------------------------// + MOAIUntzSampleBuffer (); + ~MOAIUntzSampleBuffer (); + void RegisterLuaClass ( MOAILuaState& state ); + void RegisterLuaFuncs ( MOAILuaState& state ); }; #endif diff --git a/src/moai-untz/MOAIUntzSound.cpp b/src/moai-untz/MOAIUntzSound.cpp index 205b4ff589..1ab69d1715 100644 --- a/src/moai-untz/MOAIUntzSound.cpp +++ b/src/moai-untz/MOAIUntzSound.cpp @@ -195,7 +195,7 @@ int MOAIUntzSound::_moveVolume ( lua_State* L ) { action->SetLink ( 0, self, MOAIUntzSoundAttr::Pack ( ATTR_VOLUME ), volume, mode ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; @@ -267,7 +267,7 @@ int MOAIUntzSound::_seekVolume ( lua_State* L ) { action->SetLink ( 0, self, MOAIUntzSoundAttr::Pack ( ATTR_VOLUME ), volume - self->mSound->getVolume (), mode ); action->SetSpan ( delay ); - action->Start ( MOAISim::Get ().GetActionMgr (), false ); + action->Start ( 0, false ); action->PushLuaUserdata ( state ); return 1; diff --git a/src/moai-util/MOAIByteStream.cpp b/src/moai-util/MOAIByteStream.cpp index 76975518a4..a5d03d4f33 100644 --- a/src/moai-util/MOAIByteStream.cpp +++ b/src/moai-util/MOAIByteStream.cpp @@ -46,13 +46,11 @@ int MOAIByteStream::_open ( lua_State* L ) { size_t size; data = ( void* )lua_tolstring ( state, 2, &size ); self->Open ( data, size ); - } if ( state.IsType ( 2, LUA_TNUMBER )) { u32 size = state.GetValue < u32 >( 2, 0 ); self->Open ( size ); - } return 0; } diff --git a/src/moai-util/MOAIConditionVariable.cpp b/src/moai-util/MOAIConditionVariable.cpp new file mode 100644 index 0000000000..8d3b3c77dd --- /dev/null +++ b/src/moai-util/MOAIConditionVariable.cpp @@ -0,0 +1,41 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include +#include + +//================================================================// +// MOAIMutex +//================================================================// + +//----------------------------------------------------------------// +void MOAIConditionVariable::Broadcast () { + + this->mConditionImpl->Broadcast (); +} + +//----------------------------------------------------------------// +MOAIConditionVariable::MOAIConditionVariable () { + + this->mConditionImpl = new MOAIConditionVariableImpl (); +} + +//----------------------------------------------------------------// +MOAIConditionVariable::~MOAIConditionVariable () { + + delete this->mConditionImpl; +} + +//----------------------------------------------------------------// +void MOAIConditionVariable::Signal () { + + this->mConditionImpl->Signal (); +} + +//----------------------------------------------------------------// +void MOAIConditionVariable::Wait () { + + this->mConditionImpl->Wait ( *this->mMutexImpl ); +} diff --git a/src/moai-util/MOAIConditionVariable.h b/src/moai-util/MOAIConditionVariable.h new file mode 100644 index 0000000000..753e50b0b3 --- /dev/null +++ b/src/moai-util/MOAIConditionVariable.h @@ -0,0 +1,39 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAICONDITIONVARIABLE_H +#define MOAICONDITIONVARIABLE_H + +#include + +class MOAIConditionVariableImpl; + +//================================================================// +// MOAIConditionVariable +//================================================================// +class MOAIConditionVariable : + public MOAIMutex { +private: + + MOAIConditionVariableImpl* mConditionImpl; + + //----------------------------------------------------------------// + MOAIConditionVariable& operator = ( const MOAIConditionVariable& ) { + return *this; + } + + //----------------------------------------------------------------// + MOAIConditionVariable ( const MOAIConditionVariable& ) { + } + +public: + + //----------------------------------------------------------------// + void Broadcast (); + MOAIConditionVariable (); + ~MOAIConditionVariable (); + void Signal (); + void Wait (); +}; + +#endif diff --git a/src/moai-util/MOAIConditionVariable_posix.cpp b/src/moai-util/MOAIConditionVariable_posix.cpp new file mode 100644 index 0000000000..6f56b62fae --- /dev/null +++ b/src/moai-util/MOAIConditionVariable_posix.cpp @@ -0,0 +1,50 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + +#ifndef _WIN32 + +#include + +#include +#include + +//================================================================// +// MOAIConditionVariableImpl +//================================================================// + +//----------------------------------------------------------------// +void MOAIConditionVariableImpl::Broadcast () { + + pthread_cond_broadcast ( &this->mConditional ); +} + +//----------------------------------------------------------------// +MOAIConditionVariableImpl::MOAIConditionVariableImpl () { + + memset ( &this->mConditional, 0, sizeof ( pthread_cond_t )); + pthread_cond_init ( &this->mConditional, NULL ); +} + +//----------------------------------------------------------------// +MOAIConditionVariableImpl::~MOAIConditionVariableImpl () { + + pthread_cond_destroy ( &this->mConditional ); +} + +//----------------------------------------------------------------// +void MOAIConditionVariableImpl::Signal () { + + pthread_cond_signal ( &this->mConditional ); +} + +//----------------------------------------------------------------// +void MOAIConditionVariableImpl::Wait ( MOAIMutexImpl& mutexImpl ) { + + pthread_cond_wait ( &this->mConditional, &mutexImpl.mMutex ); +} + +#endif diff --git a/src/moai-util/MOAIConditionVariable_posix.h b/src/moai-util/MOAIConditionVariable_posix.h new file mode 100644 index 0000000000..a37a603acb --- /dev/null +++ b/src/moai-util/MOAIConditionVariable_posix.h @@ -0,0 +1,30 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAICONDITIONVARIABLE_POSIX_H +#define MOAICONDITIONVARIABLE_POSIX_H + +#ifndef _WIN32 + +class MOAIMutexImpl; + +//================================================================// +// MOAIConditionVariableImpl +//================================================================// +class MOAIConditionVariableImpl { +private: + + friend class MOAIConditionVariable; + + pthread_cond_t mConditional; + + //----------------------------------------------------------------// + void Broadcast (); + MOAIConditionVariableImpl (); + ~MOAIConditionVariableImpl (); + void Signal (); + void Wait ( MOAIMutexImpl& mutexImpl ); +}; + +#endif +#endif diff --git a/src/moai-util/MOAIConditionVariable_win32.cpp b/src/moai-util/MOAIConditionVariable_win32.cpp new file mode 100644 index 0000000000..23e14dffd3 --- /dev/null +++ b/src/moai-util/MOAIConditionVariable_win32.cpp @@ -0,0 +1,45 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + +#ifdef _WIN32 + +#include +#include + +//================================================================// +// MOAIConditionVariableImpl +//================================================================// + +//----------------------------------------------------------------// +void MOAIConditionVariableImpl::Broadcast () { + + WakeAllConditionVariable ( &this->mConditional ); +} + +//----------------------------------------------------------------// +MOAIConditionVariableImpl::MOAIConditionVariableImpl () { + + InitializeConditionVariable ( &this->mConditional ); +} + +//----------------------------------------------------------------// +MOAIConditionVariableImpl::~MOAIConditionVariableImpl () { +} + +//----------------------------------------------------------------// +void MOAIConditionVariableImpl::Signal () { + + WakeConditionVariable ( &this->mConditional ); +} + +//----------------------------------------------------------------// +void MOAIConditionVariableImpl::Wait ( MOAIMutexImpl& mutexImpl ) { + + SleepConditionVariableCS ( &this->mConditional, &mutexImpl.mCriticalSection, INFINITE ); +} + +#endif diff --git a/src/moai-util/MOAIConditionVariable_win32.h b/src/moai-util/MOAIConditionVariable_win32.h new file mode 100644 index 0000000000..e64014b97c --- /dev/null +++ b/src/moai-util/MOAIConditionVariable_win32.h @@ -0,0 +1,32 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAICONDITIONVARIABLE_WI32_H +#define MOAICONDITIONVARIABLE_WI32_H + +#ifdef _WIN32 + +#include + +class MOAIMutexImpl; + +//================================================================// +// MOAIConditionVariableImpl +//================================================================// +class MOAIConditionVariableImpl { +private: + + friend class MOAIConditionVariable; + + CONDITION_VARIABLE mConditional; + + //----------------------------------------------------------------// + void Broadcast (); + MOAIConditionVariableImpl (); + ~MOAIConditionVariableImpl (); + void Signal (); + void Wait ( MOAIMutexImpl& mutexImpl ); +}; + +#endif +#endif diff --git a/src/moai-util/MOAIDataBuffer.cpp b/src/moai-util/MOAIDataBuffer.cpp index 662eb9edd1..bcc69d95f7 100644 --- a/src/moai-util/MOAIDataBuffer.cpp +++ b/src/moai-util/MOAIDataBuffer.cpp @@ -124,7 +124,7 @@ int MOAIDataBuffer::_getSize ( lua_State* L ) { size_t size; self->Lock ( &bytes, &size ); - lua_pushnumber ( state, size ); + lua_pushnumber ( state, ( lua_Number )size ); self->Unlock (); @@ -271,7 +271,7 @@ int MOAIDataBuffer::_load ( lua_State* L ) { @opt number detectZip One of MOAIDataBuffer.NO_INFLATE, MOAIDataBuffer.FORCE_INFLATE, MOAIDataBuffer.INFLATE_ON_EXT @opt boolean inflateAsync 'true' to inflate on task thread. 'false' to inflate on subscriber thread. Default value is 'true.' @opt number windowBits The window bits used in the DEFLATE algorithm. Pass nil to use the default value. - @out MOAIDataIOTask task A new MOAIDataIOTask which indicates the status of the task. + @out nil */ int MOAIDataBuffer::_loadAsync ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIDataBuffer, "USU" ); @@ -285,7 +285,7 @@ int MOAIDataBuffer::_loadAsync ( lua_State* L ) { if ( !queue ) return 0; MOAIDataIOTask* task = new MOAIDataIOTask (); - task->PushLuaUserdata ( state ); + //task->PushLuaUserdata ( state ); task->Init ( filename, *self, MOAIDataIOTask::LOAD_ACTION ); task->SetCallback ( L, 4 ); @@ -295,7 +295,7 @@ int MOAIDataBuffer::_loadAsync ( lua_State* L ) { task->Start ( *queue, MOAIMainThreadTaskSubscriber::Get ()); - return 1; + return 0; } //----------------------------------------------------------------// @@ -326,7 +326,7 @@ int MOAIDataBuffer::_save ( lua_State* L ) { @in string filename The path to the file that the data should be saved to. @in MOAITaskQueue queue The queue to perform the saving operation. @opt function callback The function to be called when the asynchronous operation is complete. The MOAIDataBuffer is passed as the first parameter. - @out MOAIDataIOTask task A new MOAIDataIOTask which indicates the status of the task. + @out nil */ int MOAIDataBuffer::_saveAsync ( lua_State* L ) { MOAI_LUA_SETUP ( MOAIDataBuffer, "USU" ); @@ -338,12 +338,11 @@ int MOAIDataBuffer::_saveAsync ( lua_State* L ) { MOAIDataIOTask* task = new MOAIDataIOTask (); task->Init ( filename, *self, MOAIDataIOTask::SAVE_ACTION ); - task->PushLuaUserdata ( state ); task->SetCallback ( L, 4 ); task->Start ( *queue, MOAIMainThreadTaskSubscriber::Get ()); - return 1; + return 0; } //----------------------------------------------------------------// diff --git a/src/moai-util/MOAIDataBuffer.h b/src/moai-util/MOAIDataBuffer.h index 4fbb2bf84a..ffcb34ac02 100644 --- a/src/moai-util/MOAIDataBuffer.h +++ b/src/moai-util/MOAIDataBuffer.h @@ -80,4 +80,48 @@ class MOAIDataBuffer : void Unlock (); }; +//================================================================// +// MOAIDataBufferScopedLock +//================================================================// +class MOAIDataBufferScopedLock { +private: + + MOAIDataBuffer& mDataBuffer; + void* mBytes; + size_t mSize; + +public: + + GET ( void*, Bytes, mBytes ) + GET ( size_t, Size, mSize ) + + //----------------------------------------------------------------// + MOAIDataBufferScopedLock ( MOAIDataBuffer& buffer ) : + mDataBuffer ( buffer ) { + + this->mDataBuffer.Lock ( &this->mBytes, &this->mSize ); + } + + //----------------------------------------------------------------// + MOAIDataBufferScopedLock ( MOAIDataBuffer& buffer, void** bytes, size_t* size ) : + mDataBuffer ( buffer ) { + + this->mDataBuffer.Lock ( &this->mBytes, &this->mSize ); + + if ( bytes ) { + *bytes = this->mBytes; + } + + if ( size ) { + *size = this->mSize; + } + } + + //----------------------------------------------------------------// + ~MOAIDataBufferScopedLock () { + + this->mDataBuffer.Unlock (); + } +}; + #endif diff --git a/src/moai-util/MOAIDataIOTask.cpp b/src/moai-util/MOAIDataIOTask.cpp index 9109ddb04d..cbbef7e299 100644 --- a/src/moai-util/MOAIDataIOTask.cpp +++ b/src/moai-util/MOAIDataIOTask.cpp @@ -28,24 +28,26 @@ void MOAIDataIOTask::Execute () { void MOAIDataIOTask::Init ( cc8* filename, MOAIDataBuffer& target, u32 action ) { this->mFilename = filename; - this->mData.Set ( *this, &target ); this->mAction = action; + this->mData = ⌖ + + this->mData->LuaRetain ( this->mData ); } //----------------------------------------------------------------// MOAIDataIOTask::MOAIDataIOTask () : + mData ( 0 ), mAction ( NONE ), mInflateOnLoad ( false ), mInflateOnTaskThread ( false ), mWindowBits ( 0 ) { - - RTTI_SINGLE ( MOAITask ) } //----------------------------------------------------------------// MOAIDataIOTask::~MOAIDataIOTask () { - this->mData.Set ( *this, 0 ); + this->mData->LuaRelease ( this->mData ); + this->mData = 0; } //----------------------------------------------------------------// @@ -78,7 +80,7 @@ void MOAIDataIOTask::RegisterLuaFuncs ( MOAILuaState& state ) { void MOAIDataIOTask::SetCallback ( lua_State* L, int idx ) { MOAILuaState state ( L ); - this->mOnFinish.SetRef ( *this, state, idx ); + this->mOnFinish.SetRef ( state, idx ); } //----------------------------------------------------------------// diff --git a/src/moai-util/MOAIDataIOTask.h b/src/moai-util/MOAIDataIOTask.h index edd2bab46f..f1cf61fe42 100644 --- a/src/moai-util/MOAIDataIOTask.h +++ b/src/moai-util/MOAIDataIOTask.h @@ -15,14 +15,14 @@ class MOAIDataIOTask : public MOAITask { private: - STLString mFilename; - MOAILuaSharedPtr < MOAIDataBuffer > mData; - MOAILuaMemberRef mOnFinish; - u32 mAction; + STLString mFilename; + MOAIDataBuffer* mData; + MOAILuaStrongRef mOnFinish; + u32 mAction; - bool mInflateOnLoad; - bool mInflateOnTaskThread; - int mWindowBits; + bool mInflateOnLoad; + bool mInflateOnTaskThread; + int mWindowBits; //----------------------------------------------------------------// void Execute (); @@ -36,8 +36,6 @@ class MOAIDataIOTask : SAVE_ACTION, }; - DECL_LUA_FACTORY ( MOAIDataIOTask ) - //----------------------------------------------------------------// void Init ( cc8* filename, MOAIDataBuffer& target, u32 action ); MOAIDataIOTask (); diff --git a/src/moai-util/MOAIFileSystem.h b/src/moai-util/MOAIFileSystem.h index 85d4e90ed9..c348e4ab88 100644 --- a/src/moai-util/MOAIFileSystem.h +++ b/src/moai-util/MOAIFileSystem.h @@ -46,4 +46,5 @@ class MOAIFileSystem : void RegisterLuaClass ( MOAILuaState& state ); }; -#endif \ No newline at end of file +#endif + diff --git a/src/moai-util/MOAIFourier.cpp b/src/moai-util/MOAIFourier.cpp new file mode 100644 index 0000000000..55589ac9f4 --- /dev/null +++ b/src/moai-util/MOAIFourier.cpp @@ -0,0 +1,944 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include + +// http://madebyevan.com/dft/ +// http://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/ +// http://toxicdump.org/stuff/FourierToy.swf +// http://stackoverflow.com/questions/4364823/how-do-i-obtain-the-frequencies-of-each-value-in-a-fft +// http://code.compartmental.net/2007/03/21/fft-averages/ +// http://stackoverflow.com/questions/20408388/how-to-filter-fft-data-for-audio-visualisation +// http://www.ni.com/white-paper/4844/en/ + +#include +#include + +//kiss_fft_cfg mKissFFT; +//kiss_fftr_cfg + +enum { + KISS_FFT, + KISS_FFTR, + KISS_FFTRI, +}; + +enum { + STREAM_CCI, // 000 + STREAM_CCF, // 001 + STREAM_CRI, // 010 + STREAM_CRF, // 011 + STREAM_RCI, // 100 + STREAM_RCF, // 101 + STREAM_RRI, // 110 + STREAM_RRF, // 111 +}; + +//================================================================// +// lua +//================================================================// + +//----------------------------------------------------------------// +/** @lua countBands + @text Returns the number of bands. Only valid for OUTPUT_AVERAGE or + OUTPUT_OCTAVES. If the former, the total number of bands. If + the latter, the total number of octaves times the number of + bands per octave. + + @in MOAIFourier fourier + @out number nBands +*/ +int MOAIFourier::_countBands ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push (( u32 )self->CountBands ()); + return 1; +} + +//----------------------------------------------------------------// +/** @lua countOctaves + @text Returns the number of octaves. Only valid for OUTPUT_OCTAVES. + + @in MOAIFourier fourier + @out number nOctaves +*/ +int MOAIFourier::_countOctaves ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push (( u32 )self->CountOctaves ()); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getBinForFrequency + @text Given a frequency, returns the bin index. + + @in MOAIFourier fourier + @in number frequency + @out number bin +*/ +int MOAIFourier::_getBinForFrequency ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push (( u32 )self->GetBinForFrequency ( state.GetValue < float >( 2, 0.0f )) + 1 ); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getCenterFrequencyForBand + @text Given a band index, returns the center frequency. Size and + placement of bands depends on output mode. + + @in MOAIFourier fourier + @in number band + @out number centerFrequency +*/ +int MOAIFourier::_getCenterFrequencyForBand ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push ( self->GetCenterFrequencyForBand ( state.GetValue < u32 >( 2, 1 ) - 1 )); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getCenterFrequencyForOctave + @text Given an octave index, returns the center frequency. + + @in MOAIFourier fourier + @in number octave + @out number centerFrequency +*/ +int MOAIFourier::_getCenterFrequencyForOctave ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push ( self->GetCenterFrequencyForOctave ( state.GetValue < u32 >( 2, 1 ) - 1 )); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getFastSize + @text Return an optimal FFT size equal to or matching the given + size. + + @in MOAIFourier fourier + @in number size + @out number fastSize +*/ +int MOAIFourier::_getFastSize ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + int size = state.GetValue < int >( 2, 0 ); + + state.Push ( kiss_fft_next_fast_size ( size )); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getFrequencyForBin + @text Given a bin index, return the frequency. + + @in MOAIFourier fourier + @in number bin + @out number frequency +*/ +int MOAIFourier::_getFrequencyForBin ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push (( float )self->GetFrequencyForBin ( state.GetValue < u32 >( 2, 1 ) - 1 )); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getWidth + @text Return the total frequency width of for the FFT size. + + @in MOAIFourier fourier + @out number width +*/ +int MOAIFourier::_getWidth ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push ( self->GetWidth ()); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getWidth + @text Return the width of the given band. Size and + placement of bands depends on output mode. + + @in MOAIFourier fourier + @in number band + @out number width +*/ +int MOAIFourier::_getWidthOfBand ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push ( self->GetWidthOfBand ( state.GetValue < u32 >( 2, 1 ) - 1 )); + return 1; +} + +//----------------------------------------------------------------// +/** @lua getWidthOfOctave + @text Return the width of the given octave. + + @in MOAIFourier fourier + @in number octave + @out number width +*/ +int MOAIFourier::_getWidthOfOctave ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + state.Push ( self->GetWidthOfOctave ( state.GetValue < u32 >( 2, 1 ) - 1 )); + return 1; +} + +//----------------------------------------------------------------// +/** @lua init + @text Initialize the FFT's internal buffers. + + @in MOAIFourier fourier + @in number size FFT size; number of bins. + @in bool inverse 'true' for a inverse FFT. + + @out nil +*/ +int MOAIFourier::_init ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + u32 size = state.GetValue < u32 >( 2, 0 ); + bool inverse = state.GetValue < bool >( 3, false ); + + self->Init ( size, inverse ); + return 0; +} + +//----------------------------------------------------------------// +/** @lua setOutputType + @text Set the desired output mode of the FFT. One of MOAIFourier.OUTPUT_COMPLEX, + MOAIFourier.OUTPUT_REAL, MOAIFourier.OUTPUT_IMAGINARY, MOAIFourier.OUTPUT_AMPLITUDE, + MOAIFourier.OUTPUT_AVERAGE or MOAIFourier.OUTPUT_OCTAVES. + + The additional two parameters ('bands' and 'minOctaveBandWidth') only apply to + OUTPUT_AVERAGE and OUTPUT_OCTAVES. + + The meaning of the 'bands' is interpreted differently if type is OUTPUT_AVERAGE or + OUTPUT_OCTAVES. If OUTPUT_AVERAGE, it is the total number of bands to generate, + applied linearly over all bins. If OUTPUT_OCTAVES, it is the total number of bands + per octave. As the final number of octaves is computed based on the number of bins, + the sample rate and the minimum octave width, the total number of bands will + be the given number of bands times the result of countOctaves (). + + @in MOAIFourier fourier + @in number outputType FFT size. + @in number bands Total bands if OUTPUT_AVERAGE. Bands per octave if OUTPUT_OCTAVES. + @in number sampleRate Used for octave width calculations. + @in number minOctaveBandWidth USed for computing number of octaves. + @out nil +*/ +int MOAIFourier::_setOutputType ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + u32 outputType = state.GetValue < u32 >( 2, OUTPUT_COMPLEX ); + u32 bands = state.GetValue < u32 >( 3, 1 ); // total bands for linear average OR bands per octave + u32 sampleRate = state.GetValue < u32 >( 4, SAMPLE_RATE ); + float minOctaveBandWidth = state.GetValue < float >( 5, 0.0f ); + + self->SetOutputType ( outputType, bands, sampleRate, minOctaveBandWidth ); + return 0; +} + +//----------------------------------------------------------------// +/** @lua setWindowFunction + @text Set or clear the window function to apply. One of MOAIFourier.BARTLETT, + MOAIFourier.BARTLETT_HANN, MOAIFourier.BLACKMAN, MOAIFourier.COSINE, + MOAIFourier.GAUSS, MOAIFourier.HAMMING, MOAIFourier.HANN, MOAIFourier.LANCZOS, + MOAIFourier.RECTANGULAR, MOAIFourier.WELCH. + + BLACKMAN and GAUSS both accept an alpha parameter. + + @in MOAIFourier fourier + @opt number windowType Type of window to apply. Pass 'RECTANGULAR' or nil to clear. + @opt number alpha Alpha parameter for windows that use it (BLACKMAN and GAUSS). + @out nil +*/ +int MOAIFourier::_setWindowFunction ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "U" ) + + u32 func = state.GetValue < u32 >( 1, RECTANGULAR ); + float a = state.GetValue < float >( 4, MOAIFourier::GetDefaultWindowAlpha ( func )); + + self->SetWindowFunction ( func, a ); + return 0; +} + +//----------------------------------------------------------------// +/** @lua transform + @text Apply the FFT to the input stream and write the result to + the output stream. + + Stream types ('inStreamType' and 'outStreamType') define the sample + type held in the stream. One of MOAIFourier.SAMPLE_S8, MOAIFourier.SAMPLE_U8, + MOAIFourier.SAMPLE_S16, MOAIFourier.SAMPLE_U16, MOAIFourier.SAMPLE_S32, + MOAIFourier.SAMPLE_U32, MOAIFourier.SAMPLE_FLOAT. For audio processing, + input stream sample type will typically be SAMPLE_S16 and output stream + sample type will be SAMPLE_FLOAT. + + @in MOAIFourier fourier + @in MOAIStream inStream + @in number inStreamType + @in boolean complexIn 'true' is input stream contains both real and imaginary samples. + @in MOAIStream outStream + @in number outStreamType + @opt number inputStreamStride Number of samples to advance input stream when reading. + @opt number inputStreamAverage Number of samples to average when reading input stream. + @out nil +*/ +int MOAIFourier::_transform ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIFourier, "UUNBUN" ) + + MOAIStream* inStream = state.GetLuaObject < MOAIStream >( 2, true ); + u32 inStreamType = state.GetValue < u32 >( 3, ZLSample::SAMPLE_FLOAT ); + bool complexIn = state.GetValue < bool >( 4, false ); + MOAIStream* outStream = state.GetLuaObject < MOAIStream >( 5, true ); + u32 outStreamType = state.GetValue < u32 >( 6, ZLSample::SAMPLE_FLOAT ); + u32 stride = state.GetValue < u32 >( 7, 1 ); + u32 average = state.GetValue < u32 >( 8, 1 ); + + if ( inStream && outStream ) { + self->Transform ( *inStream, inStreamType, complexIn, *outStream, outStreamType, stride, average ); + } + return 0; +} + +//----------------------------------------------------------------// +/** @lua window + @text Given a window function and an FFT length, returns the value + of the window given a bin index. + + See the documentation for setWindowFunction () for a list of + valid window types. + + @in number windowType + @in number index + @in number length + @opt number alpha + @out nil +*/ +int MOAIFourier::_window ( lua_State* L ) { + MOAI_LUA_SETUP_CLASS ( "NNN" ) + + u32 func = state.GetValue < u32 >( 1, RECTANGULAR ); + u32 index = state.GetValue < u32 >( 2, 1 ) - 1; + u32 length = state.GetValue < u32 >( 3, 0 ); + float a = state.GetValue < float >( 4, MOAIFourier::GetDefaultWindowAlpha ( func )); + + state.Push ( MOAIFourier::Window ( func, index, length, a )); + return 1; +} + +//================================================================// +// MOAIFourier +//================================================================// + +//----------------------------------------------------------------// +void MOAIFourier::Affirm ( u32 fft ) { + + if ( fft == KISS_FFT ) { + if ( !this->mKissFFT ) { + this->Clear (); + this->mKissFFT = ( MOAIKissFft )kiss_fft_alloc (( int )this->mSize, this->mInverse ? 1 : 0, 0, 0 ); + } + } + else { + if ( !this->mKissFFTR ) { + this->Clear (); + this->mKissFFTR = ( MOAIKissFftr )kiss_fftr_alloc (( int )this->mSize, this->mInverse ? 1 : 0, 0, 0 ); + } + } +} + +//----------------------------------------------------------------// +void MOAIFourier::Clear () { + + if ( this->mKissFFT ) { + free ( this->mKissFFT ); + this->mKissFFT = 0; + } + + if ( this->mKissFFTR ) { + free ( this->mKissFFTR ); + this->mKissFFTR = 0; + } +} + +//----------------------------------------------------------------// +size_t MOAIFourier::CountBands () { + + return this->mOutputBands; +} + +//----------------------------------------------------------------// +size_t MOAIFourier::CountOctaves () { + + return this->mOutputOctaves; +} + +//----------------------------------------------------------------// +float MOAIFourier::GetFrequencyForBin ( size_t bin ) { + + return (( float )bin * ( float )this->mSampleRate ) / ( float )this->mSize; +} + +//----------------------------------------------------------------// +float MOAIFourier::GetCenterFrequencyForBand ( size_t band ) { + + if ( this->mOutputType == OUTPUT_OCTAVES ) { + + float lowerBound; + float upperBound; + + this->GetOctaveFrequencyBounds (( size_t )( band / this->mBandsPerOctave ), lowerBound, upperBound ); + + float step = ( upperBound - lowerBound ) / ( float )this->mBandsPerOctave; + + return lowerBound + (( float )( band % this->mBandsPerOctave ) * step ) + ( step * 0.5f ); + } + + float step = this->GetWidthOfBand ( band ); + + return ( float )(( band * step ) + ( step * 0.5 )); +} + +//----------------------------------------------------------------// +float MOAIFourier::GetCenterFrequencyForOctave ( size_t octave ) { + + float lowerBound; + float upperBound; + + this->GetOctaveFrequencyBounds ( octave, lowerBound, upperBound ); + + return ( upperBound - lowerBound ) * 0.5f; +} + +//----------------------------------------------------------------// +float MOAIFourier::GetDefaultWindowAlpha ( u32 func ) { + + if ( func == BLACKMAN ) return 0.16f; + if ( func == GAUSS ) return 0.25f; + + return 0.0f; +} + +//----------------------------------------------------------------// +size_t MOAIFourier::GetFastSize ( size_t size ) { + + return ( size_t )kiss_fft_next_fast_size (( int )size ); +} + +//----------------------------------------------------------------// +size_t MOAIFourier::GetBinForFrequency ( float frequency ) { + + float hBandWidth = this->GetWidth () / 2.0f; + + if ( frequency < hBandWidth ) return 0; + if ( frequency > (( float )( this->mSampleRate >> 1 ) - hBandWidth )) return this->mSize >> 1; + + return ( u32 )ZLFloat::Round (( float )this->mSize * ( frequency / ( float )this->mSampleRate )); +} + +//----------------------------------------------------------------// +void MOAIFourier::GetOctaveFrequencyBounds ( size_t octave, float& lowerBound, float& upperBound ) { + + size_t hSampleRate = this->mSampleRate >> 1; + + lowerBound = octave == 0 ? 0.0f : (( float )hSampleRate / powf ( 2.0f, ( float )( this->mOutputOctaves - octave ))); + upperBound = (( float )hSampleRate / powf ( 2.0f, ( float )( this->mOutputOctaves - octave - 1 ))); +} + +//----------------------------------------------------------------// +float MOAIFourier::GetWidth () { + + return ( 2.0f / ( float )this->mSize ) * ( this->mSampleRate / 2.0f ); +} + +//----------------------------------------------------------------// +float MOAIFourier::GetWidthOfBand ( size_t band ) { + + if ( this->mOutputType == OUTPUT_OCTAVES ) { + return this->GetWidthOfOctave (( size_t )( band / this->mBandsPerOctave )) / ( float )this->mBandsPerOctave; + } + return this->GetWidth () / ( float )this->mOutputBands; +} + +//----------------------------------------------------------------// +float MOAIFourier::GetWidthOfOctave ( size_t octave ) { + + float lowerBound; + float upperBound; + + this->GetOctaveFrequencyBounds ( octave, lowerBound, upperBound ); + + return upperBound - lowerBound; +} + +//----------------------------------------------------------------// +void MOAIFourier::Init ( size_t size, bool inverse ) { + + this->Clear (); + this->mSize = size; + this->mInverse = inverse; +} + +//----------------------------------------------------------------// +MOAIFourier::MOAIFourier () : + mSize ( 0 ), + mInverse ( false ), + mKissFFT ( 0 ), + mKissFFTR ( 0 ), + mSampleRate ( SAMPLE_RATE ), + mOutputType ( OUTPUT_COMPLEX ), + mOutputBands ( 0 ), + mOutputOctaves ( 0 ), + mBandsPerOctave ( 0 ), + mWindowFunction ( RECTANGULAR ), + mWindowAlpha ( 0.0f ) { + + RTTI_SINGLE ( MOAILuaObject ) +} + +//----------------------------------------------------------------// +MOAIFourier::~MOAIFourier () { + + this->Clear (); +} + +//----------------------------------------------------------------// +void MOAIFourier::ReadSample ( ZLStream& inStream, u32 inStreamType, bool complexIn, float& real, float& imag ) { + + real = 0.0f; + imag = 0.0f; + + ZLSample::ReadSample ( inStream, inStreamType, &real, ZLSample::SAMPLE_FLOAT ); + if ( complexIn ) { + ZLSample::ReadSample ( inStream, inStreamType, &imag, ZLSample::SAMPLE_FLOAT ); + } +} + +//----------------------------------------------------------------// +void MOAIFourier::RegisterLuaClass ( MOAILuaState& state ) { + + state.SetField ( -1, "SAMPLE_S8", ( u32 )ZLSample::SAMPLE_S8 ); + state.SetField ( -1, "SAMPLE_U8", ( u32 )ZLSample::SAMPLE_U8 ); + state.SetField ( -1, "SAMPLE_S16", ( u32 )ZLSample::SAMPLE_S16 ); + state.SetField ( -1, "SAMPLE_U16", ( u32 )ZLSample::SAMPLE_U16 ); + state.SetField ( -1, "SAMPLE_S32", ( u32 )ZLSample::SAMPLE_S32 ); + state.SetField ( -1, "SAMPLE_U32", ( u32 )ZLSample::SAMPLE_U32 ); + state.SetField ( -1, "SAMPLE_FLOAT", ( u32 )ZLSample::SAMPLE_FLOAT ); + + state.SetField ( -1, "OUTPUT_COMPLEX", ( u32 )OUTPUT_COMPLEX ); + state.SetField ( -1, "OUTPUT_REAL", ( u32 )OUTPUT_REAL ); + state.SetField ( -1, "OUTPUT_IMAGINARY", ( u32 )OUTPUT_IMAGINARY ); + state.SetField ( -1, "OUTPUT_AMPLITUDE", ( u32 )OUTPUT_AMPLITUDE ); + state.SetField ( -1, "OUTPUT_AVERAGE", ( u32 )OUTPUT_AVERAGE ); + state.SetField ( -1, "OUTPUT_OCTAVES", ( u32 )OUTPUT_OCTAVES ); + + state.SetField ( -1, "BARTLETT", ( u32 )BARTLETT ); + state.SetField ( -1, "BARTLETT_HANN", ( u32 )BARTLETT_HANN ); + state.SetField ( -1, "BLACKMAN", ( u32 )BLACKMAN ); + state.SetField ( -1, "COSINE", ( u32 )COSINE ); + state.SetField ( -1, "GAUSS", ( u32 )GAUSS ); + state.SetField ( -1, "HAMMING", ( u32 )HAMMING ); + state.SetField ( -1, "HANN", ( u32 )HANN ); + state.SetField ( -1, "LANCZOS", ( u32 )LANCZOS ); + state.SetField ( -1, "RECTANGULAR", ( u32 )RECTANGULAR ); + state.SetField ( -1, "WELCH", ( u32 )WELCH ); + + luaL_Reg regTable [] = { + { "window", _window }, + { NULL, NULL } + }; + + luaL_register ( state, 0, regTable ); +} + +//----------------------------------------------------------------// +void MOAIFourier::RegisterLuaFuncs ( MOAILuaState& state ) { + + luaL_Reg regTable [] = { + { "countBands", _countBands }, + { "countOctaves", _countOctaves }, + { "getBinForFrequency", _getBinForFrequency }, + { "getFastSize", _getFastSize }, + { "getFrequencyForIndex", _getFrequencyForBin }, + { "getWidth", _getWidth }, + { "getWidthOfBand", _getWidthOfBand }, + { "getWidthOfOctave", _getWidthOfOctave }, + { "init", _init }, + { "setOutputType", _setOutputType }, + { "setWindowFunction", _setWindowFunction }, + { "transform", _transform }, + { NULL, NULL } + }; + + luaL_register ( state, 0, regTable ); +} + +//----------------------------------------------------------------// +void MOAIFourier::SetOutputType ( u32 outputType, size_t bands, u32 sampleRate, float minOctaveBandWidth ) { + + this->mOutputType = outputType; + this->mSampleRate = sampleRate; + + if ( outputType == OUTPUT_OCTAVES ) { + + float firstFreq = this->GetFrequencyForBin ( 1 ); + minOctaveBandWidth = minOctaveBandWidth < firstFreq ? firstFreq : minOctaveBandWidth; + + float nyquist = ( float )this->mSampleRate / 2.0f; + + this->mOutputOctaves = 1; + while (( nyquist /= 2.0f ) >= minOctaveBandWidth ) { + this->mOutputOctaves++; + } + this->mBandsPerOctave = bands > 0 ? bands : 1; + this->mOutputBands = this->mOutputOctaves * this->mBandsPerOctave; + } + else { + + this->mOutputBands = bands; + this->mOutputOctaves = 0; + this->mBandsPerOctave = 0; + } +} + +//----------------------------------------------------------------// +void MOAIFourier::SetWindowFunction ( u32 func, float a ) { + + this->mWindowFunction = func; + this->mWindowAlpha = a; +} + +//----------------------------------------------------------------// +void MOAIFourier::Transform ( ZLStream& inStream, u32 inStreamType, bool complexIn, ZLStream& outStream, u32 outStreamType, size_t stride, u32 average ) { + + assert ( sizeof ( kiss_fft_scalar ) == sizeof ( float )); + + bool complexOut = (( this->mOutputType == OUTPUT_COMPLEX ) || ( this->mOutputType == OUTPUT_IMAGINARY )); + + size_t halfSize = this->mSize >> 1; + + // the way kissft is written the cases are either C to C, R to C or C to R. There appears to be no R to R. + + u32 code = (( this->mInverse ? 0 : 1 ) + ( complexOut ? 0 : 2 ) + ( complexIn ? 0 : 4 )); + + u32 fft = 0; + bool fftComplexIn = false; + bool fftComplexOut = false; + + bool halfInput = false; + bool halfOutput = false; + + switch ( code ) { + + case STREAM_CCI: + case STREAM_CCF: + case STREAM_RCI: + case STREAM_CRF: + fft = KISS_FFT; + fftComplexIn = true; + fftComplexOut = true; + break; + + case STREAM_CRI: + case STREAM_RRI: + fft = KISS_FFTRI; + fftComplexIn = true; + fftComplexOut = false; + halfInput = true; + break; + + case STREAM_RCF: + case STREAM_RRF: + fft = KISS_FFTR; + fftComplexIn = false; + fftComplexOut = true; + halfOutput = true; + break; + + default: + assert ( false ); + } + + this->Affirm ( fft ); + + void* in = alloca ( this->mSize * ( fftComplexIn ? sizeof ( kiss_fft_cpx ) : sizeof ( kiss_fft_scalar ))); + void* out = alloca ( this->mSize * ( fftComplexOut ? sizeof ( kiss_fft_cpx ) : sizeof ( kiss_fft_scalar ))); // TODO: get smarter about this size + + size_t sampleSize = ZLSample::GetSize ( inStreamType ); + + stride *= complexIn ? sampleSize * 2 : sampleSize; + + for ( size_t i = 0; i < this->mSize; ++i ) { + + float realResult = 0.0f; + float imagResult = 0.0f; + + size_t next = inStream.GetCursor () + stride; + + if ( average > 1 ) { + + float realAvg = 0.0f; + float imagAvg = 0.0f; + + float scale = 1 / ( float )average; + + for ( u32 j = 0; j < average; ++j ) { + + float real; + float imag; + + this->ReadSample ( inStream, inStreamType, complexIn, real, imag ); + + real = 0; + imag = 0; + + realAvg += real * scale; + imagAvg += imag * scale; + } + + realResult = realAvg; + imagResult = imagAvg; + } + else { + + this->ReadSample ( inStream, inStreamType, complexIn, realResult, imagResult ); + } + + float window = MOAIFourier::Window ( this->mWindowFunction, i, this->mSize, this->mWindowAlpha ); + + if ( fftComplexIn ) { + + kiss_fft_cpx* complexBuffer = ( kiss_fft_cpx* )in; + + complexBuffer [ i ].r = realResult * window; + complexBuffer [ i ].i = imagResult * window; + } + else { + + (( kiss_fft_scalar* )in )[ i ] = realResult * window; + } + + if ( inStream.GetCursor () != next ) { + inStream.Seek (( long )next, SEEK_SET ); + } + + if ( halfInput && ( i > halfSize )) break; + } + + switch ( fft ) { + + case KISS_FFT: + kiss_fft (( kiss_fft_cfg )this->mKissFFT, ( kiss_fft_cpx* )in, ( kiss_fft_cpx* )out ); + break; + + case KISS_FFTR: + kiss_fftr (( kiss_fftr_cfg )this->mKissFFTR, ( kiss_fft_scalar* )in, ( kiss_fft_cpx* )out ); + break; + + case KISS_FFTRI: + kiss_fftri (( kiss_fftr_cfg )this->mKissFFTR, ( kiss_fft_cpx* )in, ( kiss_fft_scalar* )out ); + break; + } + + float* amplitudes = 0; + + if (( this->mOutputType == OUTPUT_AMPLITUDE ) || ( this->mOutputType == OUTPUT_AMPLITUDE ) || ( this->mOutputType == OUTPUT_AMPLITUDE )) { + amplitudes = ( float* )in; // let's re-use this buffer + } + + for ( size_t i = 0; i < this->mSize; ++i ) { + + float realResult = 0.0f; + float imagResult = 0.0f; + + if ( fftComplexOut ) { + + size_t j = halfOutput ? (( i < halfSize ) ? i : halfSize - ( i % halfSize )) : i; + + kiss_fft_cpx* complexBuffer = ( kiss_fft_cpx* )out; + + realResult = complexBuffer [ j ].r; + imagResult = complexBuffer [ j ].i; + } + else { + + realResult = (( kiss_fft_scalar* )out )[ i ]; + } + + switch ( this->mOutputType ) { + + case OUTPUT_COMPLEX: + ZLSample::WriteSample ( outStream, outStreamType, &realResult, ZLSample::SAMPLE_FLOAT ); + ZLSample::WriteSample ( outStream, outStreamType, &imagResult, ZLSample::SAMPLE_FLOAT ); + break; + + case OUTPUT_REAL: + ZLSample::WriteSample ( outStream, outStreamType, &realResult, ZLSample::SAMPLE_FLOAT ); + break; + + case OUTPUT_IMAGINARY: + ZLSample::WriteSample ( outStream, outStreamType, &imagResult, ZLSample::SAMPLE_FLOAT ); + break; + + case OUTPUT_AMPLITUDE: + case OUTPUT_AVERAGE: + case OUTPUT_OCTAVES: { + + float amplitude = complexOut ? sqrtf (( realResult * realResult ) + ( imagResult * imagResult )) : ABS ( realResult ); + + if ( this->mOutputType == OUTPUT_AMPLITUDE ) { + ZLSample::WriteSample ( outStream, outStreamType, &litude, ZLSample::SAMPLE_FLOAT ); + } + else { + amplitudes = ( float* )in; + amplitudes [ i ] = amplitude; + } + break; + } + } + } + + switch ( this->mOutputType ) { + + case OUTPUT_COMPLEX: + case OUTPUT_REAL: + case OUTPUT_IMAGINARY: + case OUTPUT_AMPLITUDE: + return; + + case OUTPUT_AVERAGE: + this->WriteAverage ( amplitudes, outStream, outStreamType ); + return; + + case OUTPUT_OCTAVES: + this->WriteOctaves ( amplitudes, outStream, outStreamType ); + return; + } +} + +//----------------------------------------------------------------// +float MOAIFourier::Window ( u32 func, size_t index, size_t length, float a ) { + + double n = ( double )index; + double N = ( double )length; + + switch ( func ) { + + case BARTLETT: + + return ( float )( 1.0 - ABS (( n - (( N - 2 ) / 2.0 )) / (( N + a ) / 2.0 ))); + + case BARTLETT_HANN: { + + return ( float )( 0.62 - ( 0.48 * ABS (( n / ( N - 1 )) - 0.5 )) - ( 0.38 * cos (( TWOPI * n ) / ( N - 1 )))); + } + + case BLACKMAN: { + + double a0 = ( 1.0 - a ) / 2.0; + double a1 = 0.5; + double a2 = a / 2.0; + + return ( float )( a0 - ( a1 * cos (( TWOPI * n ) / ( N - 1 ))) + ( a2 * cos (( 4.0 * PI * n ) / ( N - 1 )))); + } + + case COSINE: + + return ( float )( cos (( PI * n ) / ( N - 1 ) - ( PI / 2.0 ))); + + case GAUSS: + + return ( float )pow ( M_E, -0.5 * pow (( n - ( N - 1 ) / 2.0 ) / ( a * ( N - 1 ) / 2.0 ), 2.0 )); + + case HAMMING: + + return ( float )( 0.54 - ( 0.46 * cos (( TWOPI * n ) / ( N - 1 )))); + + case HANN: + + return ( float )( 0.5 * ( 1.0 - cos (( TWOPI * n ) / ( N - 1 )))); + + case LANCZOS: { + + double x = (( 2 * n ) / ( N - 1 )) - 1.0; + return ( float )( sin( PI * x ) / ( PI * x )); + } + + case RECTANGULAR: + + return 1.0f; + + case WELCH: { + + double x = ( N - 1 ) / 2.0; + return ( float )( 1.0 - pow ((( n - x ) / x ), 2.0 )); + } + } + + return 1.0f; +} + +//----------------------------------------------------------------// +void MOAIFourier::WriteAverage ( float* amplitudes, ZLStream& outStream, u32 outStreamType ) { + + size_t chunkSize = this->mSize / this->mOutputBands; + + for ( size_t i = 0; i < this->mOutputBands; ++i ) { + + size_t chunk = i * chunkSize; + + float avg = 0.0f; + float div = 1.0f / ( float )chunkSize; + + for ( size_t j = 0; j < chunkSize; ++j ) { + avg += amplitudes [ chunk + j ] * div; + } + + ZLSample::WriteSample ( outStream, outStreamType, &avg, ZLSample::SAMPLE_FLOAT ); + } +} + +//----------------------------------------------------------------// +void MOAIFourier::WriteOctaves ( float* amplitudes, ZLStream& outStream, u32 outStreamType ) { + + for ( size_t i = 0; i < this->mOutputOctaves; i++ ) { + + float lowerBound; + float upperBound; + + this->GetOctaveFrequencyBounds ( i, lowerBound, upperBound ); + + float step = ( upperBound - lowerBound ) / ( float )this->mBandsPerOctave; + + float freq = lowerBound; + for ( size_t j = 0; j < this->mBandsPerOctave; ++j ) { + + size_t lowerBand = this->GetBinForFrequency ( freq ); + size_t upperBand = this->GetBinForFrequency ( freq + step ); + + float avg = 0.0f; + float div = 1.0f / ( float )( upperBand - lowerBand + 1 ); + + for ( size_t k = lowerBand; k <= upperBand; k++ ) { + avg += amplitudes [ k ] * div; + } + + ZLSample::WriteSample ( outStream, outStreamType, &avg, ZLSample::SAMPLE_FLOAT ); + + freq += step; + } + } +} diff --git a/src/moai-util/MOAIFourier.h b/src/moai-util/MOAIFourier.h new file mode 100644 index 0000000000..c1595869e4 --- /dev/null +++ b/src/moai-util/MOAIFourier.h @@ -0,0 +1,114 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef MOAIFOURIER_H +#define MOAIFOURIER_H + +#include +#include +#include + +typedef int* MOAIKissFft; +typedef int* MOAIKissFftr; + +//================================================================// +// MOAIFourier +//================================================================// +// TODO: doxygen +class MOAIFourier : + public virtual MOAILuaObject { +private: + + static const u32 SAMPLE_RATE = 44100; + + size_t mSize; + bool mInverse; + + MOAIKissFft mKissFFT; + MOAIKissFftr mKissFFTR; + + u32 mSampleRate; + + u32 mOutputType; + size_t mOutputBands; + size_t mOutputOctaves; + size_t mBandsPerOctave; + + u32 mWindowFunction; + float mWindowAlpha; + + //----------------------------------------------------------------// + static int _countBands ( lua_State* L ); + static int _countOctaves ( lua_State* L ); + static int _getBinForFrequency ( lua_State* L ); + static int _getCenterFrequencyForBand ( lua_State* L ); + static int _getCenterFrequencyForOctave ( lua_State* L ); + static int _getFastSize ( lua_State* L ); + static int _getFrequencyForBin ( lua_State* L ); + static int _getWidth ( lua_State* L ); + static int _getWidthOfBand ( lua_State* L ); + static int _getWidthOfOctave ( lua_State* L ); + static int _init ( lua_State* L ); + static int _setOutputType ( lua_State* L ); + static int _setWindowFunction ( lua_State* L ); + static int _transform ( lua_State* L ); + static int _window ( lua_State* L ); + + //----------------------------------------------------------------// + void Affirm ( u32 fft ); + void ReadSample ( ZLStream& inStream, u32 inStreamType, bool complexIn, float& real, float& imag ); + static float Window ( u32 func, size_t index, size_t length, float a = 0.0f ); + void WriteAverage ( float* amplitudes, ZLStream& outStream, u32 outStreamType ); + void WriteOctaves ( float* amplitudes, ZLStream& outStream, u32 outStreamType ); + +public: + + enum { + OUTPUT_COMPLEX, + OUTPUT_REAL, + OUTPUT_IMAGINARY, + OUTPUT_AMPLITUDE, + OUTPUT_AVERAGE, + OUTPUT_OCTAVES, + }; + + enum { + BARTLETT, + BARTLETT_HANN, + BLACKMAN, + COSINE, + GAUSS, + HAMMING, + HANN, + LANCZOS, + RECTANGULAR, + WELCH, + }; + + DECL_LUA_FACTORY ( MOAIFourier ) + + //----------------------------------------------------------------// + void Clear (); + size_t CountBands (); + size_t CountOctaves (); + size_t GetBinForFrequency ( float frequency ); + float GetCenterFrequencyForBand ( size_t band ); + float GetCenterFrequencyForOctave ( size_t octave ); + static float GetDefaultWindowAlpha ( u32 func ); + size_t GetFastSize ( size_t size ); + float GetFrequencyForBin ( size_t bin ); + void GetOctaveFrequencyBounds ( size_t octave, float& lowerBound, float& upperBound ); + float GetWidth (); + float GetWidthOfBand ( size_t band ); + float GetWidthOfOctave ( size_t octave ); + void Init ( size_t size, bool inverse ); + MOAIFourier (); + ~MOAIFourier (); + void RegisterLuaClass ( MOAILuaState& state ); + void RegisterLuaFuncs ( MOAILuaState& state ); + void SetOutputType ( u32 outputType, size_t bands, u32 sampleRate, float minOctaveBandWidth ); + void SetWindowFunction ( u32 func, float a ); + void Transform ( ZLStream& inStream, u32 inStreamType, bool complexIn, ZLStream& outStream, u32 outStreamType, size_t stride, u32 average ); +}; + +#endif diff --git a/src/moai-util/MOAIHashWriter.cpp b/src/moai-util/MOAIHashWriter.cpp index 2d6d853e4e..12f5214fac 100644 --- a/src/moai-util/MOAIHashWriter.cpp +++ b/src/moai-util/MOAIHashWriter.cpp @@ -162,10 +162,10 @@ int MOAIHashWriter::_openWhirlpool ( lua_State* L ) { #ifndef MOAI_OS_NACL self->mHashWriter = new ZLHashWriterWhirlpool (); return self->Open ( state, 2, self->mHashWriter ); + #else + state.Push ( false ); + return 1; #endif - - state.Push ( false ); - return 1; } //----------------------------------------------------------------// diff --git a/src/moai-util/MOAIJsonParser.cpp b/src/moai-util/MOAIJsonParser.cpp index 3665bd38d4..e801189b3c 100644 --- a/src/moai-util/MOAIJsonParser.cpp +++ b/src/moai-util/MOAIJsonParser.cpp @@ -36,7 +36,7 @@ void _jsonArrayToLua ( lua_State* L, json_t* json ) { if ( value ) { - lua_pushnumber ( L, i + 1 ); + lua_pushnumber ( L, ( lua_Number )( i + 1 )); _jsonToLua ( L, value ); lua_settable ( L, -3 ); } @@ -268,12 +268,12 @@ void MOAIJsonParser::RegisterLuaClass ( MOAILuaState& state ) { lua_pushlightuserdata ( state, 0 ); lua_setfield ( state, -2, "JSON_NULL" ); - state.SetField ( -1, "JSON_INDENT", JSON_INDENT ( 4 )); - state.SetField ( -1, "JSON_COMPACT", JSON_COMPACT ); - state.SetField ( -1, "JSON_ENSURE_ASCII", JSON_ENSURE_ASCII ); - state.SetField ( -1, "JSON_SORT_KEYS", JSON_SORT_KEYS ); - state.SetField ( -1, "JSON_PRESERVE_ORDER", JSON_PRESERVE_ORDER ); - state.SetField ( -1, "JSON_ENCODE_ANY", JSON_ENCODE_ANY ); + state.SetField ( -1, "JSON_INDENT", JSON_INDENT ( 4 )); + state.SetField ( -1, "JSON_COMPACT", JSON_COMPACT ); + state.SetField ( -1, "JSON_ENSURE_ASCII", JSON_ENSURE_ASCII ); + state.SetField ( -1, "JSON_SORT_KEYS", JSON_SORT_KEYS ); + state.SetField ( -1, "JSON_PRESERVE_ORDER", JSON_PRESERVE_ORDER ); + state.SetField ( -1, "JSON_ENCODE_ANY", JSON_ENCODE_ANY ); luaL_Reg regTable[] = { { "decode", _decode }, diff --git a/src/moai-util/MOAIJsonParser.h b/src/moai-util/MOAIJsonParser.h index eb1871d8a4..9634a69de7 100644 --- a/src/moai-util/MOAIJsonParser.h +++ b/src/moai-util/MOAIJsonParser.h @@ -31,4 +31,5 @@ class MOAIJsonParser : }; #endif -#endif \ No newline at end of file +#endif + diff --git a/src/moai-util/MOAILuaUtil.cpp b/src/moai-util/MOAILuaUtil.cpp index f870599664..d47ef0c1c0 100644 --- a/src/moai-util/MOAILuaUtil.cpp +++ b/src/moai-util/MOAILuaUtil.cpp @@ -1,10 +1,13 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com +#include "pch.h" +#include + +SUPPRESS_EMPTY_FILE_WARNING #ifndef MOAI_WITH_LUAJIT -#include "pch.h" + #include -#include //================================================================// // MOAILuaHeader @@ -27,31 +30,80 @@ void MOAILuaHeader::Init () { } //----------------------------------------------------------------// -void MOAILuaHeader::Read ( ZLStream& stream ) { - - this->mSignature = stream.Read < u32 >( 0 ); - this->mVersion = stream.Read < u8 >( 0 ); - this->mFormat = stream.Read < u8 >( 0 ); - this->mByteOrder = stream.Read < u8 >( 0 ); - this->mSizeOfInt = stream.Read < u8 >( 0 ); - this->mSizeOfSizeT = stream.Read < u8 >( 0 ); - this->mSizeOfInstruction = stream.Read < u8 >( 0 ); - this->mSizeOfLuaNumber = stream.Read < u8 >( 0 ); - this->mTypeOfLuaNumber = stream.Read < u8 >( 0 ); +bool MOAILuaHeader::IsBytecode () { + + return this->mSignature == SIGNATURE; +} + +//----------------------------------------------------------------// +bool MOAILuaHeader::IsCompatible ( const MOAILuaHeader& check ) const { + + return ( memcmp ( this, &check, sizeof ( MOAILuaHeader )) == 0 ); +} + +//----------------------------------------------------------------// +MOAILuaHeader::MOAILuaHeader () : + mSignature ( 0 ) { +} + +//----------------------------------------------------------------// +MOAILuaHeader::~MOAILuaHeader () { +} + +//----------------------------------------------------------------// +ZLResultCode MOAILuaHeader::Read ( ZLStream& stream ) { + + ZLResultCodeAccumulator result; + + result = stream.Read < u32 >( this->mSignature, 0 ); + result = stream.Read < u8 >( this->mVersion, 0 ); + result = stream.Read < u8 >( this->mFormat, 0 ); + result = stream.Read < u8 >( this->mByteOrder, 0 ); + result = stream.Read < u8 >( this->mSizeOfInt, 0 ); + result = stream.Read < u8 >( this->mSizeOfSizeT, 0 ); + result = stream.Read < u8 >( this->mSizeOfInstruction, 0 ); + result = stream.Read < u8 >( this->mSizeOfLuaNumber, 0 ); + result = stream.Read < u8 >( this->mTypeOfLuaNumber, 0 ); + + return result; +} + +//----------------------------------------------------------------// +ZLResultCode MOAILuaHeader::Read ( void* buffer, size_t size ) { + + if ( sizeof ( MOAILuaHeader ) <= size ) { + memcpy ( this, buffer, sizeof ( MOAILuaHeader )); + return ZL_OK; + } + return ZL_ERROR; } //----------------------------------------------------------------// -void MOAILuaHeader::Write ( ZLStream& stream ) const { - - stream.Write < u32 >( this->mSignature ); - stream.Write < u8 >( this->mVersion ); - stream.Write < u8 >( this->mFormat ); - stream.Write < u8 >( this->mByteOrder ); - stream.Write < u8 >( this->mSizeOfInt ); - stream.Write < u8 >( this->mSizeOfSizeT ); - stream.Write < u8 >( this->mSizeOfInstruction ); - stream.Write < u8 >( this->mSizeOfLuaNumber ); - stream.Write < u8 >( this->mTypeOfLuaNumber ); +ZLResultCode MOAILuaHeader::Write ( ZLStream& stream ) const { + + ZLResultCodeAccumulator result; + + result = stream.Write < u32 >( this->mSignature ).mCode; + result = stream.Write < u8 >( this->mVersion ).mCode; + result = stream.Write < u8 >( this->mFormat ).mCode; + result = stream.Write < u8 >( this->mByteOrder ).mCode; + result = stream.Write < u8 >( this->mSizeOfInt ).mCode; + result = stream.Write < u8 >( this->mSizeOfSizeT ).mCode; + result = stream.Write < u8 >( this->mSizeOfInstruction ).mCode; + result = stream.Write < u8 >( this->mSizeOfLuaNumber ).mCode; + result = stream.Write < u8 >( this->mTypeOfLuaNumber ).mCode; + + return result; +} + +//----------------------------------------------------------------// +ZLResultCode MOAILuaHeader::Write ( void* buffer, size_t size ) { + + if ( sizeof ( MOAILuaHeader ) <= size ) { + memcpy ( buffer, this, sizeof ( MOAILuaHeader )); + return ZL_OK; + } + return ZL_ERROR; } //================================================================// @@ -100,32 +152,43 @@ int MOAILuaUtil::_convert ( lua_State* L ) { @text Read the Lua bytecode header. @in string bytecode - @out table header + @out table header Returns 'nil' is no valid signature is found. */ int MOAILuaUtil::_getHeader ( lua_State* L ) { - MOAI_LUA_SETUP_SINGLE ( MOAILuaUtil, "S" ) + MOAI_LUA_SETUP_SINGLE ( MOAILuaUtil, "" ) - size_t bufflen; - cc8* buffer = lua_tolstring ( L, -1, &bufflen ); + MOAILuaHeader header; - ZLByteStream stream; - stream.SetBuffer ( buffer, bufflen, bufflen ); + if ( state.IsType ( 1, LUA_TSTRING )) { - MOAILuaHeader header; - header.Read ( stream ); + size_t bufflen; + cc8* buffer = lua_tolstring ( L, -1, &bufflen ); - lua_newtable ( state ); - state.SetField ( -1, "signature", header.mSignature ); - state.SetField ( -1, "version", header.mVersion ); - state.SetField ( -1, "format", header.mFormat ); - state.SetField ( -1, "byteOrder", header.mByteOrder ); - state.SetField ( -1, "sizeOfInt", header.mSizeOfInt ); - state.SetField ( -1, "sizeOfSizeT", header.mSizeOfSizeT ); - state.SetField ( -1, "sizeOfInstruction", header.mSizeOfInstruction ); - state.SetField ( -1, "sizeOfLuaNumber", header.mSizeOfLuaNumber ); - state.SetField ( -1, "typeOfNumber", header.mTypeOfLuaNumber ); + ZLByteStream stream; + stream.SetBuffer ( buffer, bufflen, bufflen ); - return 1; + header.Read ( stream ); + } + else { + header.Init (); + } + + if ( header.mSignature == MOAILuaHeader::SIGNATURE ) { + + lua_newtable ( state ); + state.SetField ( -1, "signature", header.mSignature ); + state.SetField ( -1, "version", header.mVersion ); + state.SetField ( -1, "format", header.mFormat ); + state.SetField ( -1, "byteOrder", header.mByteOrder ); + state.SetField ( -1, "sizeOfInt", header.mSizeOfInt ); + state.SetField ( -1, "sizeOfSizeT", header.mSizeOfSizeT ); + state.SetField ( -1, "sizeOfInstruction", header.mSizeOfInstruction ); + state.SetField ( -1, "sizeOfLuaNumber", header.mSizeOfLuaNumber ); + state.SetField ( -1, "typeOfNumber", header.mTypeOfLuaNumber ); + + return 1; + } + return 0; } //================================================================// @@ -141,7 +204,7 @@ bool MOAILuaUtil::Convert ( const MOAILuaHeader& dstFormat, ZLStream& srcStream, srcFormat.Read ( srcStream ); if ( memcmp ( &srcFormat, &dstFormat, sizeof ( MOAILuaHeader )) == 0 ) { - srcStream.Seek ( base, SEEK_SET ); + srcStream.Seek (( long )base, SEEK_SET ); return false; } @@ -208,7 +271,7 @@ void MOAILuaUtil::ConvertFunction ( const MOAILuaHeader& srcFormat, const MOAILu s64 nInstructions = this->ConvertInt ( srcFormat, dstFormat, srcStream, dstStream ); // size of instruction list if ( srcFormat.mSizeOfInstruction == dstFormat.mSizeOfInstruction ) { - dstStream.WriteStream ( srcStream, nInstructions * srcFormat.mSizeOfInstruction ); + dstStream.WriteStream ( srcStream, ( size_t )( nInstructions * srcFormat.mSizeOfInstruction )); } else { for ( s64 i = 0; i < nInstructions; ++i ) { @@ -262,10 +325,10 @@ s64 MOAILuaUtil::ConvertInt ( const MOAILuaHeader& srcFormat, const MOAILuaHeade //----------------------------------------------------------------// void MOAILuaUtil::ConvertString ( const MOAILuaHeader& srcFormat, const MOAILuaHeader& dstFormat, ZLStream& srcStream, ZLStream& dstStream ) { - size_t size = 0; + u64 size = 0; srcStream.ReadBytes ( &size, srcFormat.mSizeOfSizeT ); // TODO: respect byte order dstStream.WriteBytes ( &size, dstFormat.mSizeOfSizeT ); - dstStream.WriteStream ( srcStream, size ); + dstStream.WriteStream ( srcStream, ( size_t ) size ); } //----------------------------------------------------------------// diff --git a/src/moai-util/MOAILuaUtil.h b/src/moai-util/MOAILuaUtil.h index 279d2b7f51..74a2f00234 100644 --- a/src/moai-util/MOAILuaUtil.h +++ b/src/moai-util/MOAILuaUtil.h @@ -1,17 +1,19 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com - -#ifndef MOAI_WITH_LUAJIT //can't convert luajit bytecode #ifndef MOAILUAUTIL_H #define MOAILUAUTIL_H +#ifndef MOAI_WITH_LUAJIT //can't convert luajit bytecode + //================================================================// // MOAILuaHeader //================================================================// class MOAILuaHeader { public: - u32 mSignature; // "ESCLua" or 0x6175C41B + static const u32 SIGNATURE = 0x61754C1B; + + u32 mSignature; // "ESCLua" or 0x61754C1B u8 mVersion; // 0x51 for Lua 5.1 u8 mFormat; // 0 = official version u8 mByteOrder; // 0 = big endian, 1 = little endian @@ -22,9 +24,15 @@ class MOAILuaHeader { u8 mTypeOfLuaNumber; // 0 = floating point, 1 = integral //----------------------------------------------------------------// - void Init (); - void Read ( ZLStream& stream ); - void Write ( ZLStream& stream ) const; + void Init (); + bool IsBytecode (); + bool IsCompatible ( const MOAILuaHeader& check ) const; + MOAILuaHeader (); + ~MOAILuaHeader (); // no vtable + ZLResultCode Read ( ZLStream& stream ); + ZLResultCode Read ( void* buffer, size_t size ); + ZLResultCode Write ( ZLStream& stream ) const; + ZLResultCode Write ( void* buffer, size_t size ); }; //================================================================// @@ -61,4 +69,5 @@ class MOAILuaUtil : }; #endif -#endif \ No newline at end of file +#endif + diff --git a/src/moai-util/MOAIMemStream.cpp b/src/moai-util/MOAIMemStream.cpp index 285d8258d4..72d43da9da 100644 --- a/src/moai-util/MOAIMemStream.cpp +++ b/src/moai-util/MOAIMemStream.cpp @@ -22,6 +22,33 @@ int MOAIMemStream::_close ( lua_State* L ) { return 0; } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIMemStream::_discardAll ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIMemStream, "U" ); + + self->DiscardAll (); + return 0; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIMemStream::_discardBack ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIMemStream, "U" ); + + self->DiscardBack ( state.GetValue ( 2, self->GetCursor ())); + return 0; +} + +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIMemStream::_discardFront ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIMemStream, "U" ); + + self->DiscardFront ( state.GetValue < u32 >( 2, ( u32 )self->GetCursor ())); + return 0; +} + //----------------------------------------------------------------// // TODO: doxygen int MOAIMemStream::_getString ( lua_State* L ) { @@ -51,7 +78,7 @@ int MOAIMemStream::_getString ( lua_State* L ) { free ( str ); } - self->Seek ( cursor, SEEK_SET ); + self->Seek (( long )cursor, SEEK_SET ); return 1; } return 0; @@ -119,6 +146,9 @@ void MOAIMemStream::RegisterLuaFuncs ( MOAILuaState& state ) { luaL_Reg regTable [] = { { "close", _close }, + { "discardAll", _discardAll }, + { "discardBack", _discardBack }, + { "discardFront", _discardFront }, { "getString", _getString }, { "open", _open }, { NULL, NULL } diff --git a/src/moai-util/MOAIMemStream.h b/src/moai-util/MOAIMemStream.h index a841550b9f..a9125cb195 100644 --- a/src/moai-util/MOAIMemStream.h +++ b/src/moai-util/MOAIMemStream.h @@ -23,6 +23,9 @@ class MOAIMemStream : //----------------------------------------------------------------// static int _close ( lua_State* L ); + static int _discardAll ( lua_State* L ); + static int _discardBack ( lua_State* L ); + static int _discardFront ( lua_State* L ); static int _getString ( lua_State* L ); static int _open ( lua_State* L ); diff --git a/src/moai-util/MOAIMutex.cpp b/src/moai-util/MOAIMutex.cpp index 3c905ed33f..dfe95f877a 100644 --- a/src/moai-util/MOAIMutex.cpp +++ b/src/moai-util/MOAIMutex.cpp @@ -10,46 +10,28 @@ // MOAIMutex //================================================================// -//----------------------------------------------------------------// -void MOAIMutex::Affirm () { - - if ( !this->mImpl ) { - this->mImpl = new MOAIMutexImpl (); - this->mImpl->Init (); - } -} - -//----------------------------------------------------------------// -void MOAIMutex::Clear () { - - if ( this->mImpl ) { - delete this->mImpl; - this->mImpl = 0; - } -} - //----------------------------------------------------------------// void MOAIMutex::Lock () { - this->Affirm (); - this->mImpl->Lock (); + this->mMutexImpl->Lock (); } //----------------------------------------------------------------// -MOAIMutex::MOAIMutex () : - mImpl ( 0 ) { +MOAIMutex::MOAIMutex () { + + this->mMutexImpl = new MOAIMutexImpl (); } //----------------------------------------------------------------// MOAIMutex::~MOAIMutex () { - this->Clear (); + + delete this->mMutexImpl; } //----------------------------------------------------------------// void MOAIMutex::Unlock () { - this->Affirm (); - this->mImpl->Unlock (); + this->mMutexImpl->Unlock (); } //================================================================// diff --git a/src/moai-util/MOAIMutex.h b/src/moai-util/MOAIMutex.h index f6fbbd1e52..8a546f2564 100644 --- a/src/moai-util/MOAIMutex.h +++ b/src/moai-util/MOAIMutex.h @@ -10,26 +10,25 @@ class MOAIMutexImpl; // MOAIMutex //================================================================// class MOAIMutex { -private: +protected: - MOAIMutexImpl* mImpl; + MOAIMutexImpl* mMutexImpl; - //----------------------------------------------------------------// - void Affirm (); - void Clear (); - MOAIMutex ( const MOAIMutex& ) {} - //----------------------------------------------------------------// MOAIMutex& operator = ( const MOAIMutex& ) { return *this; } + //----------------------------------------------------------------// + MOAIMutex ( const MOAIMutex& ) { + } + public: //----------------------------------------------------------------// void Lock (); MOAIMutex (); - ~MOAIMutex (); + virtual ~MOAIMutex (); void Unlock (); }; @@ -39,13 +38,14 @@ class MOAIMutex { // TODO: rename to MOAIScopedLock? class MOAIAutoLock { private: + MOAIMutex& mMutex; public: //----------------------------------------------------------------// - MOAIAutoLock ( MOAIMutex& ); - ~MOAIAutoLock (); + MOAIAutoLock ( MOAIMutex& ); + ~MOAIAutoLock (); }; #endif diff --git a/src/moai-util/MOAIMutex_posix.cpp b/src/moai-util/MOAIMutex_posix.cpp index 20c12ee236..b51efd3d79 100644 --- a/src/moai-util/MOAIMutex_posix.cpp +++ b/src/moai-util/MOAIMutex_posix.cpp @@ -2,6 +2,9 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifndef _WIN32 #include @@ -10,12 +13,6 @@ // MOAIMutexImpl //================================================================// -//----------------------------------------------------------------// -void MOAIMutexImpl::Init () { - - pthread_mutex_init ( &this->mMutex, 0 ); -} - //----------------------------------------------------------------// void MOAIMutexImpl::Lock () { @@ -26,6 +23,7 @@ void MOAIMutexImpl::Lock () { MOAIMutexImpl::MOAIMutexImpl () { memset ( &this->mMutex, 0, sizeof ( pthread_mutex_t )); + pthread_mutex_init ( &this->mMutex, 0 ); } //----------------------------------------------------------------// diff --git a/src/moai-util/MOAIMutex_posix.h b/src/moai-util/MOAIMutex_posix.h index b3ee1b1eb5..4aae8cf696 100644 --- a/src/moai-util/MOAIMutex_posix.h +++ b/src/moai-util/MOAIMutex_posix.h @@ -15,11 +15,11 @@ class MOAIMutexImpl { private: friend class MOAIMutex; + friend class MOAIConditionVariableImpl; pthread_mutex_t mMutex; //----------------------------------------------------------------// - void Init (); void Lock (); MOAIMutexImpl (); ~MOAIMutexImpl (); diff --git a/src/moai-util/MOAIMutex_win32.cpp b/src/moai-util/MOAIMutex_win32.cpp index dd68862829..07f71d169b 100644 --- a/src/moai-util/MOAIMutex_win32.cpp +++ b/src/moai-util/MOAIMutex_win32.cpp @@ -2,6 +2,9 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifdef _WIN32 #include @@ -10,34 +13,28 @@ // MOAIMutexImpl //================================================================// -//----------------------------------------------------------------// -void MOAIMutexImpl::Init () { -} - //----------------------------------------------------------------// void MOAIMutexImpl::Lock () { - WaitForSingleObject ( mMutexHandle, INFINITE ); + EnterCriticalSection ( &this->mCriticalSection ); } //----------------------------------------------------------------// MOAIMutexImpl::MOAIMutexImpl () { - mMutexHandle = CreateMutex ( NULL, FALSE, NULL ); - assert ( mMutexHandle ); + InitializeCriticalSection ( &this->mCriticalSection ); } //----------------------------------------------------------------// MOAIMutexImpl::~MOAIMutexImpl () { - CloseHandle ( mMutexHandle ); - mMutexHandle = NULL; + DeleteCriticalSection ( &this->mCriticalSection ); } //----------------------------------------------------------------// void MOAIMutexImpl::Unlock () { - ReleaseMutex ( mMutexHandle ); + LeaveCriticalSection ( &this->mCriticalSection ); } #endif \ No newline at end of file diff --git a/src/moai-util/MOAIMutex_win32.h b/src/moai-util/MOAIMutex_win32.h index 48b08ec2a5..7c74a84757 100644 --- a/src/moai-util/MOAIMutex_win32.h +++ b/src/moai-util/MOAIMutex_win32.h @@ -16,11 +16,11 @@ class MOAIMutexImpl { private: friend class MOAIMutex; + friend class MOAIConditionVariableImpl; - HANDLE mMutexHandle; + CRITICAL_SECTION mCriticalSection; //----------------------------------------------------------------// - void Init (); void Lock (); MOAIMutexImpl (); ~MOAIMutexImpl (); diff --git a/src/moai-util/MOAIParser.cpp b/src/moai-util/MOAIParser.cpp index 995fbbdd0d..ec347d1762 100644 --- a/src/moai-util/MOAIParser.cpp +++ b/src/moai-util/MOAIParser.cpp @@ -218,8 +218,8 @@ void MOAIParser::Traverse ( ZLSyntaxNode* node ) { this->OnStartNonterminal ( node ); - u32 nChildren = node->CountChildren (); - for ( u32 i = 0; i < nChildren; ++i ) { + size_t nChildren = node->CountChildren (); + for ( size_t i = 0; i < nChildren; ++i ) { this->Traverse ( node->GetChild ( i )); } diff --git a/src/moai-util/MOAIParser.h b/src/moai-util/MOAIParser.h index e8a5375489..c841fd2059 100644 --- a/src/moai-util/MOAIParser.h +++ b/src/moai-util/MOAIParser.h @@ -53,4 +53,5 @@ class MOAIParser : }; #endif -#endif \ No newline at end of file +#endif + diff --git a/src/moai-util/MOAIStream.cpp b/src/moai-util/MOAIStream.cpp index 71d238d0f2..8298d0bbd2 100644 --- a/src/moai-util/MOAIStream.cpp +++ b/src/moai-util/MOAIStream.cpp @@ -274,6 +274,19 @@ int MOAIStream::_readU32 ( lua_State* L ) { return self->ReadValues < u32 >( state, 2 ); } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIStream::_sample ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIStream, "U" ); + + u32 sampleSize = state.GetValue < u32 >( 2, 1 ); + u32 streamType = state.GetValue < u32 >( 3, ZLSample::SAMPLE_FLOAT ); + + state.Push ( self->Sample ( streamType, sampleSize )); + + return 1; +} + //----------------------------------------------------------------// /** @lua seek @text Repositions the cursor in the stream. @@ -619,7 +632,7 @@ int MOAIStream::ReadFormat ( MOAILuaState& state, int idx ) { idx = state.AbsIndex ( idx ); cc8* format = state.GetValue < cc8* >( idx, "" ); - u32 bytes = 0; + size_t bytes = 0; u32 type = UNKNOWN; while ( format ) { @@ -656,7 +669,7 @@ int MOAIStream::ReadFormat ( MOAILuaState& state, int idx ) { } } - state.Push ( bytes ); + state.Push (( u64 )bytes ); return ( state.GetTop () - idx ); } @@ -666,6 +679,14 @@ void MOAIStream::RegisterLuaClass ( MOAILuaState& state ) { state.SetField ( -1, "SEEK_CUR", ( u32 )SEEK_CUR ); state.SetField ( -1, "SEEK_END", ( u32 )SEEK_END ); state.SetField ( -1, "SEEK_SET", ( u32 )SEEK_SET ); + + state.SetField ( -1, "SAMPLE_S8", ( u32 )ZLSample::SAMPLE_S8 ); + state.SetField ( -1, "SAMPLE_U8", ( u32 )ZLSample::SAMPLE_U8 ); + state.SetField ( -1, "SAMPLE_S16", ( u32 )ZLSample::SAMPLE_S16 ); + state.SetField ( -1, "SAMPLE_U16", ( u32 )ZLSample::SAMPLE_U16 ); + state.SetField ( -1, "SAMPLE_S32", ( u32 )ZLSample::SAMPLE_S32 ); + state.SetField ( -1, "SAMPLE_U32", ( u32 )ZLSample::SAMPLE_U32 ); + state.SetField ( -1, "SAMPLE_FLOAT", ( u32 )ZLSample::SAMPLE_FLOAT ); } //----------------------------------------------------------------// @@ -687,6 +708,7 @@ void MOAIStream::RegisterLuaFuncs ( MOAILuaState& state ) { { "readU8", _readU8 }, { "readU16", _readU16 }, { "readU32", _readU32 }, + { "sample", _sample }, { "seek", _seek }, { "write", _write }, { "write8", _write8 }, diff --git a/src/moai-util/MOAIStream.h b/src/moai-util/MOAIStream.h index 2622ac8a02..d644aa2c4e 100644 --- a/src/moai-util/MOAIStream.h +++ b/src/moai-util/MOAIStream.h @@ -49,6 +49,7 @@ class MOAIStream : static int _readU8 ( lua_State* L ); static int _readU16 ( lua_State* L ); static int _readU32 ( lua_State* L ); + static int _sample ( lua_State* L ); static int _seek ( lua_State* L ); static int _write ( lua_State* L ); static int _write8 ( lua_State* L ); diff --git a/src/moai-util/MOAIStreamAdapter.cpp b/src/moai-util/MOAIStreamAdapter.cpp index 33b58dce3d..b4b2991c63 100644 --- a/src/moai-util/MOAIStreamAdapter.cpp +++ b/src/moai-util/MOAIStreamAdapter.cpp @@ -78,9 +78,9 @@ int MOAIStreamAdapter::_openDeflateReader ( lua_State* L ) { reader->SetWindowBits ( windowBits ); - bool result = self->Open ( reader, stream ); + ZLResultCode result = self->Open ( reader, stream ); - state.Push ( result ); + state.Push ( result == ZL_OK ); return 1; } @@ -111,9 +111,9 @@ int MOAIStreamAdapter::_openDeflateWriter ( lua_State* L ) { writer->SetCompressionLevel ( level ); writer->SetWindowBits ( windowBits ); - bool result = self->Open ( writer, stream ); + ZLResultCode result = self->Open ( writer, stream ); - state.Push ( result ); + state.Push ( result == ZL_OK ); return 1; } @@ -132,6 +132,28 @@ int MOAIStreamAdapter::_openHex ( lua_State* L ) { return self->Open ( state, 2, new ZLHexAdapter ()); } +//----------------------------------------------------------------// +// TODO: doxygen +int MOAIStreamAdapter::_openRing ( lua_State* L ) { + MOAI_LUA_SETUP ( MOAIStreamAdapter, "U" ); + + MOAIStream* stream = state.GetLuaObject < MOAIStream >( 2, true ); + u32 size = state.GetValue < u32 >( 3, ( u32 )stream->GetLength ()); + + if ( size > 0 ) { + + ZLRingAdapter* adapter = new ZLRingAdapter (); + ZLResultCode result = self->Open ( adapter, stream ); + + if ( result == ZL_OK ) { + adapter->SetLength ( size ); + state.Push ( result ); + return 1; + } + } + return 0; +} + //================================================================// // MOAIStreamAdapter //================================================================// @@ -139,6 +161,8 @@ int MOAIStreamAdapter::_openHex ( lua_State* L ) { //----------------------------------------------------------------// void MOAIStreamAdapter::Clear () { + this->Close (); + if ( this->mAdapter ) { delete this->mAdapter; this->mAdapter = 0; @@ -171,7 +195,7 @@ MOAIStreamAdapter::~MOAIStreamAdapter () { } //----------------------------------------------------------------// -bool MOAIStreamAdapter::Open ( ZLStreamAdapter* adapter, MOAIStream* stream ) { +ZLResultCode MOAIStreamAdapter::Open ( ZLStreamAdapter* adapter, MOAIStream* stream ) { this->Clear (); @@ -179,9 +203,9 @@ bool MOAIStreamAdapter::Open ( ZLStreamAdapter* adapter, MOAIStream* stream ) { this->SetProxiedStream ( this->mAdapter ); this->mAdaptedStream.Set ( *this, stream ); - bool result = this->mAdapter->Open ( this->mAdaptedStream ); + ZLResultCode result = this->mAdapter->Open ( this->mAdaptedStream ); - if ( !result ) { + if ( result != ZL_OK ) { this->Close (); } return result; @@ -192,8 +216,8 @@ int MOAIStreamAdapter::Open ( MOAILuaState& state, int idx, ZLStreamAdapter* ada MOAIStream* stream = state.GetLuaObject < MOAIStream >( idx, true ); - bool result = this->Open ( adapter, stream ); - state.Push ( result ); + ZLResultCode result = this->Open ( adapter, stream ); + state.Push ( result == ZL_OK ); return 1; } @@ -218,6 +242,7 @@ void MOAIStreamAdapter::RegisterLuaFuncs ( MOAILuaState& state ) { { "openDeflateReader", _openDeflateReader }, { "openDeflateWriter", _openDeflateWriter }, { "openHex", _openHex }, + { "openRing", _openRing }, { NULL, NULL } }; diff --git a/src/moai-util/MOAIStreamAdapter.h b/src/moai-util/MOAIStreamAdapter.h index e50b275e0d..1578524f87 100644 --- a/src/moai-util/MOAIStreamAdapter.h +++ b/src/moai-util/MOAIStreamAdapter.h @@ -36,6 +36,7 @@ class MOAIStreamAdapter : static int _openDeflateReader ( lua_State* L ); static int _openDeflateWriter ( lua_State* L ); static int _openHex ( lua_State* L ); + static int _openRing ( lua_State* L ); //----------------------------------------------------------------// int Open ( MOAILuaState& state, int idx, ZLStreamAdapter* adapter ); @@ -49,7 +50,7 @@ class MOAIStreamAdapter : void Close (); // clears the stream and closes the adapter, but *doesn't* also clear the adapter MOAIStreamAdapter (); ~MOAIStreamAdapter (); - bool Open ( ZLStreamAdapter* adapter, MOAIStream* stream ); + ZLResultCode Open ( ZLStreamAdapter* adapter, MOAIStream* stream ); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); }; diff --git a/src/moai-util/MOAITask.cpp b/src/moai-util/MOAITask.cpp index f4e40bc4e2..77ec41551c 100644 --- a/src/moai-util/MOAITask.cpp +++ b/src/moai-util/MOAITask.cpp @@ -10,17 +10,17 @@ //================================================================// //----------------------------------------------------------------// -void MOAITask::LatchRelease () { - - this->mLatch.Clear (); -} +//void MOAITask::LatchRelease () { +// +// this->mLatch.Clear (); +//} //----------------------------------------------------------------// -void MOAITask::LatchRetain () { - - assert ( !this->mLatch ); - this->GetRef ( this->mLatch ); -} +//void MOAITask::LatchRetain () { +// +// assert ( !this->mLatch ); +// this->GetRef ( this->mLatch ); +//} //----------------------------------------------------------------// MOAITask::MOAITask () : diff --git a/src/moai-util/MOAITask.h b/src/moai-util/MOAITask.h index 1fc9a04443..907be090e1 100644 --- a/src/moai-util/MOAITask.h +++ b/src/moai-util/MOAITask.h @@ -13,22 +13,22 @@ class MOAITaskSubscriber; // MOAITask //================================================================// class MOAITask : - public virtual MOAILuaObject { + public virtual MOAIObject { private: - friend class MOAITaskQueue; friend class MOAITaskSubscriber; + friend class MOAITaskQueue; u32 mPriority; MOAITaskQueue* mQueue; MOAITaskSubscriber* mSubscriber; - MOAILuaMemberRef mOnFinish; - MOAILuaStrongRef mLatch; + //MOAILuaMemberRef mOnFinish; + //MOAILuaStrongRef mLatch; ZLLeanLink < MOAITask* > mLink; //----------------------------------------------------------------// - static int _setCallback ( lua_State* L ); + //static int _setCallback ( lua_State* L ); //----------------------------------------------------------------// virtual void Execute () = 0; @@ -54,8 +54,8 @@ class MOAITask : GET_SET ( u32, Priority, mPriority ) //----------------------------------------------------------------// - void LatchRelease (); - void LatchRetain (); + //void LatchRelease (); + //void LatchRetain (); MOAITask (); virtual ~MOAITask (); void RegisterLuaClass ( MOAILuaState& state ); diff --git a/src/moai-util/MOAITaskQueue.cpp b/src/moai-util/MOAITaskQueue.cpp index 00fbd53f05..73d2ba8ccd 100644 --- a/src/moai-util/MOAITaskQueue.cpp +++ b/src/moai-util/MOAITaskQueue.cpp @@ -2,22 +2,50 @@ // http://getmoai.com #include "pch.h" -#include -#include #include +#include + +//================================================================// +// MOAITaskQueue main +//================================================================// + +//----------------------------------------------------------------// +void MOAITaskQueue::_main ( void* param, MOAIThreadState& threadState ) { + UNUSED ( threadState ); + + (( MOAITaskQueue* )param )->Main (); +} //================================================================// // MOAITaskQueue //================================================================// //----------------------------------------------------------------// -MOAITaskQueue::MOAITaskQueue () { +void MOAITaskQueue::Main () { - RTTI_SINGLE ( MOAILuaObject ) + this->mCondition.Lock (); + + while ( this->mIsRunning ) { + + this->Process (); + + this->mCondition.Wait (); + } + + this->mCondition.Unlock (); +} + +//----------------------------------------------------------------// +MOAITaskQueue::MOAITaskQueue () : + mIsRunning ( false ) { + + RTTI_SINGLE ( MOAITaskQueue ) } //----------------------------------------------------------------// MOAITaskQueue::~MOAITaskQueue () { + + this->Stop (); } //----------------------------------------------------------------// @@ -30,9 +58,7 @@ void MOAITaskQueue::Process () { MOAITask* task = taskIt->Data (); taskIt = taskIt->Next (); - this->mMutex.Lock (); this->mPendingTasks.PopFront (); - this->mMutex.Unlock (); task->Execute (); @@ -42,7 +68,7 @@ void MOAITaskQueue::Process () { case MOAITask::PRIORITY_IMMEDIATE: task->Publish (); - task->LatchRelease (); + task->Release (); break; default: @@ -62,11 +88,25 @@ void MOAITaskQueue::Process () { //----------------------------------------------------------------// void MOAITaskQueue::PushTask ( MOAITask& task ) { - task.LatchRetain (); + bool start = false; - this->mMutex.Lock (); + task.Retain (); + + this->mCondition.Lock (); + this->mPendingTasks.PushBack ( task.mLink ); - this->mMutex.Unlock (); + + if ( !this->mIsRunning ) { + this->mIsRunning = true; + start = true; + } + + this->mCondition.Signal (); + this->mCondition.Unlock (); + + if ( start ) { + this->mThread.Start ( _main, this, 0 ); + } } //----------------------------------------------------------------// @@ -79,3 +119,20 @@ void MOAITaskQueue::RegisterLuaFuncs ( MOAILuaState& state ) { UNUSED ( state ); } +//----------------------------------------------------------------// +void MOAITaskQueue::Stop () { + + bool stop = false; + + this->mCondition.Lock (); + if ( this->mIsRunning ) { + this->mIsRunning = false; + stop = true; + this->mCondition.Signal (); + } + this->mCondition.Unlock (); + + if ( stop ) { + this->mThread.Join (); + } +} diff --git a/src/moai-util/MOAITaskQueue.h b/src/moai-util/MOAITaskQueue.h index 58859d28c7..cf361637ff 100644 --- a/src/moai-util/MOAITaskQueue.h +++ b/src/moai-util/MOAITaskQueue.h @@ -4,7 +4,7 @@ #ifndef MOAITASKQUEUE_H #define MOAITASKQUEUE_H -#include +#include #include #include @@ -15,19 +15,28 @@ class MOAITaskSubscriber; //================================================================// class MOAITaskQueue : public virtual MOAILuaObject { -protected: +private: friend class MOAITask; - MOAIMutex mMutex; + MOAIThread mThread; // TODO: inherit? + + MOAIConditionVariable mCondition; ZLLeanList < MOAITask* > mPendingTasks; + bool mIsRunning; + + //----------------------------------------------------------------// + static void _main ( void* param, MOAIThreadState& threadState ); //----------------------------------------------------------------// - virtual void PushTask ( MOAITask& task ); + void Main (); + void PushTask ( MOAITask& task ); void Process (); public: + friend class MOAITaskBase; + DECL_LUA_FACTORY ( MOAITaskQueue ) //----------------------------------------------------------------// @@ -35,6 +44,7 @@ class MOAITaskQueue : ~MOAITaskQueue (); void RegisterLuaClass ( MOAILuaState& state ); void RegisterLuaFuncs ( MOAILuaState& state ); + void Stop (); }; #endif diff --git a/src/moai-util/MOAITaskSubscriber.cpp b/src/moai-util/MOAITaskSubscriber.cpp index 27c293d657..b4780f3f4a 100644 --- a/src/moai-util/MOAITaskSubscriber.cpp +++ b/src/moai-util/MOAITaskSubscriber.cpp @@ -36,7 +36,7 @@ void MOAITaskSubscriber::Publish () { this->mMutex.Unlock (); task->Publish (); - task->LatchRelease (); + task->Release (); } double curTime = ZLDeviceTime::GetTimeInSeconds (); @@ -55,7 +55,7 @@ void MOAITaskSubscriber::Publish () { this->mMutex.Unlock (); task->Publish (); - task->LatchRelease (); + task->Release (); curTime = ZLDeviceTime::GetTimeInSeconds (); timeElapsed = curTime - startTime; diff --git a/src/moai-util/MOAITaskSubscriber.h b/src/moai-util/MOAITaskSubscriber.h index ea6317ae7f..3f2721724a 100644 --- a/src/moai-util/MOAITaskSubscriber.h +++ b/src/moai-util/MOAITaskSubscriber.h @@ -38,7 +38,6 @@ class MOAITaskSubscriber { double mLatentPublishDuration; //----------------------------------------------------------------// - void Process (); void PushTask ( MOAITask& task ); void PushTaskLatent ( MOAITask& task ); diff --git a/src/moai-util/MOAITaskThread.cpp b/src/moai-util/MOAITaskThread.cpp deleted file mode 100644 index 3f2766126b..0000000000 --- a/src/moai-util/MOAITaskThread.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" -#include - -//================================================================// -// MOAITaskThread main -//================================================================// - -//----------------------------------------------------------------// -void MOAITaskThread::_main ( void* param, MOAIThreadState& threadState ) { - - MOAITaskThread* taskThread = ( MOAITaskThread* )param; - - while ( threadState.IsRunning ()) { - taskThread->Process (); - MOAIThread::Sleep (); - } -} - -//================================================================// -// MOAITaskThread -//================================================================// - -//----------------------------------------------------------------// -MOAITaskThread::MOAITaskThread () { - - RTTI_SINGLE ( MOAITaskQueue ) -} - -//----------------------------------------------------------------// -MOAITaskThread::~MOAITaskThread () { - - this->Stop (); -} - -//----------------------------------------------------------------// -void MOAITaskThread::PushTask ( MOAITask& task ) { - - MOAITaskQueue::PushTask ( task ); - this->mThread.Start ( _main, this, 0 ); -} - -//----------------------------------------------------------------// -void MOAITaskThread::RegisterLuaClass ( MOAILuaState& state ) { - MOAITaskQueue::RegisterLuaClass ( state ); -} - -//----------------------------------------------------------------// -void MOAITaskThread::RegisterLuaFuncs ( MOAILuaState& state ) { - MOAITaskQueue::RegisterLuaFuncs ( state ); -} - -//----------------------------------------------------------------// -void MOAITaskThread::Stop () { - - this->mThread.Stop (); - this->mThread.Join (); -} diff --git a/src/moai-util/MOAITaskThread.h b/src/moai-util/MOAITaskThread.h deleted file mode 100644 index c6bdc4966e..0000000000 --- a/src/moai-util/MOAITaskThread.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#ifndef MOAITASKTHREAD_H -#define MOAITASKTHREAD_H - -#include -#include - -//================================================================// -// MOAITaskThread -//================================================================// -class MOAITaskThread : - public MOAITaskQueue { -private: - - MOAIThread mThread; // TODO: inherit? - - //----------------------------------------------------------------// - static void _main ( void* param, MOAIThreadState& threadState ); - - //----------------------------------------------------------------// - void PushTask ( MOAITask& task ); - -public: - - friend class MOAITaskBase; - - DECL_LUA_FACTORY ( MOAITaskThread ) - - //----------------------------------------------------------------// - MOAITaskThread (); - ~MOAITaskThread (); - void RegisterLuaClass ( MOAILuaState& state ); - void RegisterLuaFuncs ( MOAILuaState& state ); - void Stop (); -}; - -#endif diff --git a/src/moai-util/MOAIThread_posix.cpp b/src/moai-util/MOAIThread_posix.cpp index 2b55ce9ee7..453a195018 100644 --- a/src/moai-util/MOAIThread_posix.cpp +++ b/src/moai-util/MOAIThread_posix.cpp @@ -2,6 +2,9 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifndef _WIN32 #include diff --git a/src/moai-util/MOAIThread_win32.cpp b/src/moai-util/MOAIThread_win32.cpp index 36b72caa93..ba21e4dd0c 100644 --- a/src/moai-util/MOAIThread_win32.cpp +++ b/src/moai-util/MOAIThread_win32.cpp @@ -2,6 +2,9 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifdef _WIN32 #include @@ -57,6 +60,7 @@ bool MOAIThreadImpl::IsRunning () const { if ( this->mThread ) { DWORD exitCode = 0; BOOL result = GetExitCodeThread ( this->mThread, &exitCode ); + UNUSED ( result ); // TODO: should be fixed by assert undef assert ( result == TRUE ); return ( exitCode == STILL_ACTIVE ); } @@ -125,6 +129,7 @@ MOAIThreadLocalImpl::~MOAIThreadLocalImpl () { void MOAIThreadLocalImpl::SetCurrentThread ( MOAIThread* thread ) { BOOL success = ::TlsSetValue( mTlsIndex, thread ); + UNUSED ( success ); // TODO: should be fixed by assert undef assert ( success == TRUE ); } diff --git a/src/moai-util/MOAIThread_win32.h b/src/moai-util/MOAIThread_win32.h index eb68d18eb5..62538a28d1 100644 --- a/src/moai-util/MOAIThread_win32.h +++ b/src/moai-util/MOAIThread_win32.h @@ -37,7 +37,7 @@ class MOAIThreadImpl { class MOAIThreadLocalImpl { public: - DWORD mTlsIndex; + DWORD mTlsIndex; //----------------------------------------------------------------// MOAIThread* GetCurrentThread () const; diff --git a/src/moai-util/MOAIXmlParser.h b/src/moai-util/MOAIXmlParser.h index 35969a137f..68f2630a60 100644 --- a/src/moai-util/MOAIXmlParser.h +++ b/src/moai-util/MOAIXmlParser.h @@ -49,4 +49,4 @@ class MOAIXmlParser : }; #endif -#endif \ No newline at end of file +#endif diff --git a/src/moai-util/MOAIXmlWriter.h b/src/moai-util/MOAIXmlWriter.h index 4089034e16..72e5948d9d 100644 --- a/src/moai-util/MOAIXmlWriter.h +++ b/src/moai-util/MOAIXmlWriter.h @@ -46,4 +46,4 @@ class MOAIXmlWriter { //TODO: Make it work with file streams?? }; #endif -#endif \ No newline at end of file +#endif diff --git a/src/moai-util/headers.h b/src/moai-util/headers.h index a168bc6f25..b878ed393c 100644 --- a/src/moai-util/headers.h +++ b/src/moai-util/headers.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/moai-util/host.cpp b/src/moai-util/host.cpp index d1e82437c3..1785f9b49e 100644 --- a/src/moai-util/host.cpp +++ b/src/moai-util/host.cpp @@ -28,18 +28,19 @@ void AKUUtilContextInitialize () { REGISTER_LUA_CLASS ( MOAIByteStream ) REGISTER_LUA_CLASS ( MOAIDataBuffer ) REGISTER_LUA_CLASS ( MOAIDataBufferStream ) - REGISTER_LUA_CLASS ( MOAIDataIOTask ) REGISTER_LUA_CLASS ( MOAIFileStream ) REGISTER_LUA_CLASS ( MOAIFileSystem ) -#ifndef MOAI_WITH_LUAJIT - REGISTER_LUA_CLASS ( MOAILuaUtil ) -#endif + REGISTER_LUA_CLASS ( MOAIFourier ) + + #ifndef MOAI_WITH_LUAJIT + REGISTER_LUA_CLASS ( MOAILuaUtil ) + #endif + REGISTER_LUA_CLASS ( MOAIHashWriter ) REGISTER_LUA_CLASS ( MOAIMath ) REGISTER_LUA_CLASS ( MOAIMemStream ) REGISTER_LUA_CLASS ( MOAIStreamAdapter ) REGISTER_LUA_CLASS ( MOAITaskQueue ) - REGISTER_LUA_CLASS ( MOAITaskThread ) #if MOAI_WITH_JANSSON REGISTER_LUA_CLASS ( MOAIJsonParser ) diff --git a/src/zl-common/zl_platform.h b/src/zl-common/zl_platform.h index 0ed18705bd..9ecf58f58d 100644 --- a/src/zl-common/zl_platform.h +++ b/src/zl-common/zl_platform.h @@ -1,6 +1,10 @@ #ifndef ZL_PLATFORM_H #define ZL_PLATFORM_H +#if !(( defined ( DEBUG ) && defined ( _DEBUG )) || defined ( NDEBUG )) + #error DEBUG and _DEBUG or NDEBUG *must* be defined! +#endif + //http://predef.sourceforge.net/preos.html#sec19 #if defined( __APPLE__ ) && defined( __MACH__ ) @@ -82,6 +86,7 @@ #include #endif + #include #include #ifndef PATH_MAX @@ -130,6 +135,7 @@ #include #include #include + #include #include #include #include diff --git a/src/zl-common/zl_types.h b/src/zl-common/zl_types.h index bcf01a660d..13b04ab15f 100644 --- a/src/zl-common/zl_types.h +++ b/src/zl-common/zl_types.h @@ -25,4 +25,6 @@ typedef signed short s16; typedef signed int s32; typedef signed long long s64; +#define INVALID_INDEX (( uint )-1 ) + #endif diff --git a/src/zl-gfx/ZLGfx-gles.h b/src/zl-gfx/ZLGfx-gles.h new file mode 100644 index 0000000000..ce1c92037b --- /dev/null +++ b/src/zl-gfx/ZLGfx-gles.h @@ -0,0 +1,100 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLGFX_GLES_H +#define ZLGFX_GLES_H + +#ifdef MOAI_OS_WINDOWS + #define GLEW_STATIC + #include +#endif + +#ifdef MOAI_OS_OSX + //#include + #include + #include + + #define glGenVertexArrays glGenVertexArraysAPPLE + #define glBindVertexArray glBindVertexArrayAPPLE + #define glDeleteVertexArrays glDeleteVertexArraysAPPLE + +#endif + +#ifdef MOAI_OS_IPHONE + + #include + #include + #include + #include + + #define GL_WRITE_ONLY 0x88B9 + #define GL_RGBA8 GL_RGBA8_OES + + // TODO: should not have to do this + // this is to suppress a false positive error in Xcode + extern GLvoid* glMapBufferOES ( GLenum target, GLenum access ); + extern GLboolean glUnmapBufferOES ( GLenum target ); + + #define glMapBuffer glMapBufferOES + #define glUnmapBuffer glUnmapBufferOES + + // TODO: should not have to do this + // this is to suppress a false positive error in Xcode + extern GLvoid glBindVertexArrayOES ( GLuint array ); + extern GLvoid glGenVertexArraysOES ( GLsizei n, GLuint *arrays ); + extern GLvoid glDeleteVertexArraysOES ( GLsizei n, const GLuint *arrays ); + + #define glGenVertexArrays glGenVertexArraysOES + #define glBindVertexArray glBindVertexArrayOES + #define glDeleteVertexArrays glDeleteVertexArraysOES + +#endif + +#ifdef MOAI_OS_ANDROID + + #include + #include + #include + #include + //#include + + #define GL_WRITE_ONLY 0x88B9 + +#endif + +#ifdef MOAI_OS_LINUX + #ifndef MOAI_OS_NACL + #ifndef ANDROID + #include + #endif + #endif +#endif + +#ifdef MOAI_OS_NACL + #include + #include + + #define GL_RGBA8 GL_RGBA8_OES +#endif + +#ifdef MOAI_OS_HTML + #include + #include + #include + #include + #define MOAI_OS_NACL 1 + #define GL_RGBA8 GL_RGBA8_OES +#endif + +#ifdef MOAI_OS_BLACKBERRY + #include + #include + #include + #include + + #define GL_RGBA8 GL_RGBA8_OES +#endif + +#define REMAP_EXTENSION_PTR(target, ext) target = target ? target : ext; + +#endif diff --git a/src/zl-gfx/ZLGfx.cpp b/src/zl-gfx/ZLGfx.cpp new file mode 100644 index 0000000000..40d7b20093 --- /dev/null +++ b/src/zl-gfx/ZLGfx.cpp @@ -0,0 +1,108 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include + +//================================================================// +// ZLGfxListener +//================================================================// + +//----------------------------------------------------------------// +void ZLGfxListener::OnGfxEvent ( u32 event, void* userdata ) { + UNUSED ( event ); + UNUSED ( userdata ); +} + +//----------------------------------------------------------------// +void ZLGfxListener::OnReadPixels ( const ZLCopyOnWrite& copyOnWrite, void* userdata ) { + UNUSED ( copyOnWrite ); + UNUSED ( userdata ); +} + +//----------------------------------------------------------------// +void ZLGfxListener::OnUniformLocation ( u32 addr, void* userdata ) { + UNUSED ( addr ); + UNUSED ( userdata ); +} + +//----------------------------------------------------------------// +ZLGfxListener::ZLGfxListener () { +} + +//----------------------------------------------------------------// +ZLGfxListener::~ZLGfxListener () { +} + +//================================================================// +// ZLGfx +//================================================================// + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfx::CreateBuffer () { + + #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) + return 0; + #else + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::BUFFER, 0, true ), 0 ); + #endif +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfx::CreateFramebuffer () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::FRAMEBUFFER, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfx::CreateProgram () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::PROGRAM, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfx::CreateRenderbuffer () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::RENDERBUFFER, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfx::CreateShader ( u32 shaderType ) { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::SHADER, 0, true ), shaderType ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfx::CreateTexture () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::TEXTURE, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfx::CreateVertexArray () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::VERTEXARRAY, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +void ZLGfx::Delete ( ZLGfxHandle*& handle ) { + + if ( handle ) { + if ( handle->mOwns ) { + this->Delete ( handle->mType, handle->mGLID ); + } + handle = 0; + } +} + +//----------------------------------------------------------------// +void ZLGfx::Discard ( ZLGfxHandle*& handle ) { + + if ( handle ) { + delete handle; + handle = 0; + } +} diff --git a/src/zl-gfx/ZLGfx.h b/src/zl-gfx/ZLGfx.h new file mode 100644 index 0000000000..f492e28b2f --- /dev/null +++ b/src/zl-gfx/ZLGfx.h @@ -0,0 +1,205 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLGFX_H +#define ZLGFX_H + +#include +#include +#include +#include +#include +#include + +class ZLCopyOnWrite; + +// hardware PVR support is based on device +#ifdef MOAI_OS_IPHONE + #define ZGL_DEVCAPS_PVR_TEXTURE 1 +#else + #define ZGL_DEVCAPS_PVR_TEXTURE 0 +#endif + +#define ZGL_COMMENT(gfx,comment) ( gfx ).Comment ( comment ) + +//================================================================// +// ZLGfxHandle +//================================================================// +class ZLGfxHandle { +public: + + friend class ZLGfx; + friend class ZLGfxImmediate; + friend class ZLGfxRetained; + + u32 mType; + u32 mGLID; + bool mOwns; + + //----------------------------------------------------------------// + ZLGfxHandle ( u32 type, u32 glid, bool owns ) : + mType ( type ), + mGLID ( glid ), + mOwns ( owns ) { + } + +public: + + enum { + BUFFER, + FRAMEBUFFER, + PROGRAM, + SHADER, + TEXTURE, + RENDERBUFFER, + VERTEXARRAY, + }; + + //----------------------------------------------------------------// + ZLGfxHandle () {} + ~ZLGfxHandle () {} + + //----------------------------------------------------------------// + static u32 GLID ( ZLGfxHandle* handle ) { + return handle ? handle->mGLID : 0; + } +}; + +//================================================================// +// ZLGfxListener +//================================================================// +class ZLGfxListener : + public ZLSharedHandleTarget < ZLGfxListener > { +private: + + GET ( ZLGfxListener*, HandleTarget, this ) + +public: + + //----------------------------------------------------------------// + virtual void OnGfxEvent ( u32 event, void* userdata ); + virtual void OnReadPixels ( const ZLCopyOnWrite& copyOnWrite, void* userdata ); + virtual void OnUniformLocation ( u32 addr, void* userdata ); + ZLGfxListener (); + virtual ~ZLGfxListener (); +}; + +typedef ZLSharedHandle < ZLGfxListener > ZLGfxListenerHandle; + +//================================================================// +// ZLGfx +//================================================================// +class ZLGfx { + + friend class ZLGfxImmediate; + friend class ZLGfxRetained; + + //----------------------------------------------------------------// + virtual ZLGfxHandle* Create ( ZLGfxHandle* handle, u32 param ) = 0; + virtual void Delete ( u32 type, u32 glid ) = 0; + +public: + + // api for drawing + + //----------------------------------------------------------------// + virtual void ActiveTexture ( u32 textureUnit ) = 0; + virtual void AttachShader ( ZLGfxHandle* program, ZLGfxHandle* shader ) = 0; + + virtual void BindAttribLocation ( ZLGfxHandle* program, u32 index, cc8* name ) = 0; + + virtual void BindBuffer ( u32 target, ZLGfxHandle* buffer ) = 0; + virtual void BindFramebuffer ( u32 target, ZLGfxHandle* frameBuffer ) = 0; + virtual void BindRenderbuffer ( ZLGfxHandle* renderbuffer ) = 0; + virtual void BindTexture ( ZLGfxHandle* texID ) = 0; + virtual void BindVertexArray ( ZLGfxHandle* vertexArrayID ) = 0; + + virtual void BlendFunc ( u32 sourceFactor, u32 destFactor ) = 0; + virtual void BlendMode ( u32 mode ) = 0; + + virtual void BufferData ( u32 target, size_t size, ZLSharedConstBuffer* buffer, size_t offset, u32 usage ) = 0; + virtual void BufferSubData ( u32 target, size_t offset, size_t size, ZLSharedConstBuffer* buffer, size_t srcOffset ) = 0; + + virtual void CheckFramebufferStatus ( u32 target ) = 0; + + virtual void Clear ( u32 mask ) = 0; + virtual void ClearColor ( float r, float g, float b, float a ) = 0; + virtual void Color ( float r, float g, float b, float a ) = 0; + + virtual void Comment ( cc8* comment = 0 ) = 0; + + virtual void CompileShader ( ZLGfxHandle* shader, bool log ) = 0; + virtual void CompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, ZLSharedConstBuffer* buffer ) = 0; + + virtual ZLSharedConstBuffer* CopyBuffer ( ZLSharedConstBuffer* buffer ) = 0; + + ZLGfxHandle* CreateBuffer (); + ZLGfxHandle* CreateFramebuffer (); + ZLGfxHandle* CreateProgram (); + ZLGfxHandle* CreateRenderbuffer (); + ZLGfxHandle* CreateShader ( u32 shaderType ); + ZLGfxHandle* CreateTexture (); + ZLGfxHandle* CreateVertexArray (); + + virtual void CullFace ( u32 mode ) = 0; + + void Delete ( ZLGfxHandle*& handle ); + + virtual void DepthFunc ( u32 depthFunc ) = 0; + virtual void DepthMask ( bool flag ) = 0; + virtual void Disable ( u32 cap ) = 0; + virtual void DisableClientState ( u32 cap ) = 0; + virtual void DisableVertexAttribArray ( u32 index ) = 0; + + static void Discard ( ZLGfxHandle*& handle ); + + virtual void DrawArrays ( u32 primType, u32 first, u32 count ) = 0; + virtual void DrawElements ( u32 primType, u32 count, u32 indexType, ZLSharedConstBuffer* buffer, size_t offset ) = 0; + virtual void Enable ( u32 cap ) = 0; + virtual void EnableClientState ( u32 cap ) = 0; + virtual void EnableVertexAttribArray ( u32 index ) = 0; + + virtual void Event ( ZLGfxListener* listener, u32 event, void* userdata ) = 0; + + virtual void Flush ( bool finish = false ) = 0; + virtual void FramebufferRenderbuffer ( u32 target, u32 attachment, ZLGfxHandle* renderbuffer ) = 0; + virtual void FramebufferTexture2D ( u32 target, u32 attachment, ZLGfxHandle* texture, s32 level ) = 0; + + virtual ZLGfxHandle* GetCurrentFramebuffer () = 0; + virtual void GetUniformLocation ( ZLGfxHandle* program, cc8* uniformName, ZLGfxListener* listener, void* userdata ) = 0; + + virtual bool IsImmediate () = 0; + + virtual void LineWidth ( float width ) = 0; + + virtual void LinkProgram ( ZLGfxHandle* program, bool log ) = 0; + + virtual void PopSection () = 0; + virtual bool PushErrorHandler () = 0; + virtual void PushSection () = 0; + virtual bool PushSuccessHandler () = 0; + + virtual void ReadPixels ( s32 x, s32 y, u32 width, u32 height, u32 format, u32 type, u32 pixelSize, ZLGfxListener* listener, void* userdata ) = 0; + virtual void RenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) = 0; + + virtual void Scissor ( s32 x, s32 y, u32 w, u32 h ) = 0; + + virtual void ShaderSource ( ZLGfxHandle* shader, cc8* source, size_t length ) = 0; + + virtual void TexEnvi ( u32 pname, s32 param ) = 0; + virtual void TexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) = 0; + virtual void TexParameteri ( u32 pname, s32 param ) = 0; + virtual void TexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) = 0; + virtual void Uniform1f ( u32 location, float v0 ) = 0; + virtual void Uniform1i ( u32 location, s32 v0 ) = 0; + virtual void Uniform4fv ( u32 location, u32 count, const float* value ) = 0; + virtual void UniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* mtx ) = 0; + virtual void UniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* mtx ) = 0; + virtual void UseProgram ( ZLGfxHandle* program ) = 0; + virtual void VertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, ZLSharedConstBuffer* buffer, size_t offset ) = 0; + virtual void Viewport ( s32 x, s32 y, u32 w, u32 h ) = 0; + ZLGfx () {} + virtual ~ZLGfx () {} +}; + +#endif diff --git a/src/zl-gfx/ZLGfxDevice.cpp b/src/zl-gfx/ZLGfxDevice.cpp new file mode 100644 index 0000000000..20d5f30040 --- /dev/null +++ b/src/zl-gfx/ZLGfxDevice.cpp @@ -0,0 +1,179 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include +#include +#include + +//================================================================// +// globals +//================================================================// + +static u32 sMaxTextureUnits = 0; +static u32 sMaxTextureSize = 0; +static u32 sOperationDepth = 0; // this is just the counter for tracking begin/end calls + +//================================================================// +// ZLGfxDevice +//================================================================// + +//----------------------------------------------------------------// +void ZLGfxDevice::Begin () { + + //zglBegin (); +} + +//----------------------------------------------------------------// +void ZLGfxDevice::End () { + + //zglEnd (); +} + +//----------------------------------------------------------------// +void ZLGfxDevice::Finalize () { + + //zglFinalize (); +} + +//----------------------------------------------------------------// +u32 ZLGfxDevice::GetCap ( u32 cap ) { + + switch ( cap ) { + case ZGL_CAPS_MAX_TEXTURE_SIZE: + return sMaxTextureSize; + case ZGL_CAPS_MAX_TEXTURE_UNITS: + return sMaxTextureUnits; + } + return 0; +} + +//----------------------------------------------------------------// +u32 ZLGfxDevice::GetError () { + + GLenum error = glGetError (); + + switch ( error ) { + case GL_NO_ERROR: return ZGL_ERROR_NONE; + case GL_INVALID_ENUM: return ZGL_ERROR_INVALID_ENUM; + case GL_INVALID_OPERATION: return ZGL_ERROR_INVALID_OPERATION; + case GL_INVALID_VALUE: return ZGL_ERROR_INVALID_VALUE; + case GL_OUT_OF_MEMORY: return ZGL_ERROR_OUT_OF_MEMORY; + } + return ZGL_ERROR_UNKNOWN; +} + +//----------------------------------------------------------------// +cc8* ZLGfxDevice::GetErrorString ( u32 error ) { + + switch ( error ) { + case ZGL_ERROR_NONE: return "ZGL_ERROR_NONE"; + case ZGL_ERROR_INVALID_ENUM: return "ZGL_ERROR_INVALID_ENUM"; + case ZGL_ERROR_INVALID_OPERATION: return "ZGL_ERROR_INVALID_OPERATION"; + case ZGL_ERROR_INVALID_VALUE: return "ZGL_ERROR_INVALID_VALUE"; + case ZGL_ERROR_OUT_OF_MEMORY: return "ZGL_ERROR_OUT_OF_MEMORY"; + case ZGL_ERROR_STACK_OVERFLOW: return "ZGL_ERROR_STACK_OVERFLOW"; + case ZGL_ERROR_STACK_UNDERFLOW: return "ZGL_ERROR_STACK_UNDERFLOW"; + } + return ""; +} + +//----------------------------------------------------------------// +cc8* ZLGfxDevice::GetString ( u32 stringID ) { + + return ( cc8* )glGetString ( ZLGfxEnum::MapZLToNative ( stringID )); +} + +//----------------------------------------------------------------// +void ZLGfxDevice::Initialize () { + + u32 majorVersion = 0; + u32 minorVersion = 0; + + bool isOpenGLES = false; + + #ifdef __GLEW_H__ + static bool initGlew = true; + if ( initGlew ) { + glewInit (); + initGlew = false; + } + #endif + + string version = ZLGfxDevice::GetString ( ZGL_STRING_VERSION ); + std::transform ( version.begin (), version.end(), version.begin(), ::tolower ); + + string gles = "opengl es"; + + if ( version.find ( gles ) != version.npos ) { + isOpenGLES = true; + version = version.substr ( gles.length ()); + + size_t space = version.find ( ' ' ); + if ( space != version.npos ) { + version = version.substr ( space + 1 ); + } + } + else { + isOpenGLES = false; + } + + version = version.substr ( 0, 3 ); + + majorVersion = version.at ( 0 ) - '0'; + minorVersion = version.at ( 2 ) - '0'; + + #ifdef EMSCRIPTEN + isOpenGLES = true; + #endif + + #if defined ( __GLEW_H__ ) + + // if framebuffer object is not in code, check to see if it's available as + // an extension and remap to core function pointers if so + if (( isOpenGLES == false ) && ( majorVersion < 3 )) { + + if ( glewIsSupported ( "GL_EXT_framebuffer_object" )) { + + REMAP_EXTENSION_PTR ( glBindFramebuffer, glBindFramebufferEXT ) + REMAP_EXTENSION_PTR ( glCheckFramebufferStatus, glCheckFramebufferStatusEXT ) + REMAP_EXTENSION_PTR ( glDeleteFramebuffers, glDeleteFramebuffersEXT ) + REMAP_EXTENSION_PTR ( glDeleteRenderbuffers, glDeleteRenderbuffersEXT ) + REMAP_EXTENSION_PTR ( glFramebufferRenderbuffer, glFramebufferRenderbufferEXT ) + REMAP_EXTENSION_PTR ( glFramebufferTexture1D, glFramebufferTexture1DEXT ) + REMAP_EXTENSION_PTR ( glFramebufferTexture2D, glFramebufferTexture2DEXT ) + REMAP_EXTENSION_PTR ( glFramebufferTexture3D, glFramebufferTexture3DEXT ) + REMAP_EXTENSION_PTR ( glGenFramebuffers, glGenFramebuffersEXT ) + REMAP_EXTENSION_PTR ( glGenRenderbuffers, glGenRenderbuffersEXT ) + REMAP_EXTENSION_PTR ( glGenerateMipmap, glGenerateMipmapEXT ) + REMAP_EXTENSION_PTR ( glGetFramebufferAttachmentParameteriv, glGetFramebufferAttachmentParameterivEXT ) + REMAP_EXTENSION_PTR ( glGetRenderbufferParameteriv, glGetRenderbufferParameterivEXT ) + REMAP_EXTENSION_PTR ( glIsFramebuffer, glIsFramebufferEXT ) + REMAP_EXTENSION_PTR ( glIsRenderbuffer, glIsRenderbufferEXT ) + REMAP_EXTENSION_PTR ( glRenderbufferStorage, glRenderbufferStorageEXT ) + } + else { + assert ( false ); // needs framebuffer + } + } + + #endif + + int maxTextureUnits = 0; + + if ( majorVersion == 1 ) { + assert ( false ); // OpenGL ES1 no longer supported + } + else { + glGetIntegerv ( GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits ); + } + + sMaxTextureUnits = ( u32 )maxTextureUnits; + + int maxTextureSize; + glGetIntegerv ( GL_MAX_TEXTURE_SIZE, &maxTextureSize ); + sMaxTextureSize = ( u32 )maxTextureSize; +} diff --git a/src/zl-gfx/ZLGfxDevice.h b/src/zl-gfx/ZLGfxDevice.h new file mode 100644 index 0000000000..41e2c2395c --- /dev/null +++ b/src/zl-gfx/ZLGfxDevice.h @@ -0,0 +1,25 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLGFXDEVICE_H +#define ZLGFXDEVICE_H + +//================================================================// +// ZLGfxDevice +//================================================================// +class ZLGfxDevice { +public: + + //----------------------------------------------------------------// + static void Begin (); + static void End (); + static void Finalize (); + static u32 GetCap ( u32 cap ); + ZLGfxHandle* GetCurrentFramebuffer (); + static u32 GetError (); + static cc8* GetErrorString ( u32 error ); + static cc8* GetString ( u32 stringID ); + static void Initialize (); +}; + +#endif diff --git a/src/zl-gfx/ZLGfxEnum.cpp b/src/zl-gfx/ZLGfxEnum.cpp new file mode 100644 index 0000000000..2555ff9898 --- /dev/null +++ b/src/zl-gfx/ZLGfxEnum.cpp @@ -0,0 +1,1180 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include +#include + +//#include +//#include +//using namespace std; + +//#define ASSERT_OPERATION_DEPTH() ( assert ( sOperationDepth > 0 )) // Attempt to call zgl graphics method outside of operation. + +//================================================================// +// ZLGfxEnum +//================================================================// + +//----------------------------------------------------------------// +u32 ZLGfxEnum::MapNativeToZL ( u32 value ) { + + switch ( value ) { + case GL_DST_ALPHA: return ZGL_BLEND_FACTOR_DST_ALPHA; + case GL_DST_COLOR: return ZGL_BLEND_FACTOR_DST_COLOR; + case GL_ONE: return ZGL_BLEND_FACTOR_ONE; + case GL_ONE_MINUS_DST_ALPHA: return ZGL_BLEND_FACTOR_ONE_MINUS_DST_ALPHA; + case GL_ONE_MINUS_DST_COLOR: return ZGL_BLEND_FACTOR_ONE_MINUS_DST_COLOR; + case GL_ONE_MINUS_SRC_ALPHA: return ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; + case GL_ONE_MINUS_SRC_COLOR: return ZGL_BLEND_FACTOR_ONE_MINUS_SRC_COLOR; + case GL_SRC_ALPHA: return ZGL_BLEND_FACTOR_SRC_ALPHA; + case GL_SRC_ALPHA_SATURATE: return ZGL_BLEND_FACTOR_SRC_ALPHA_SATURATE; + case GL_SRC_COLOR: return ZGL_BLEND_FACTOR_SRC_COLOR; + case GL_ZERO: return ZGL_BLEND_FACTOR_ZERO; + }; + assert ( false ); + return 0; +} + +//----------------------------------------------------------------// +u32 ZLGfxEnum::MapZLToNative ( u32 value ) { + + switch ( value ) { + + case ZGL_BLEND_FACTOR_DST_ALPHA: return GL_DST_ALPHA; + case ZGL_BLEND_FACTOR_DST_COLOR: return GL_DST_COLOR; + case ZGL_BLEND_FACTOR_ONE: return GL_ONE; + case ZGL_BLEND_FACTOR_ONE_MINUS_DST_ALPHA: return GL_ONE_MINUS_DST_ALPHA; + case ZGL_BLEND_FACTOR_ONE_MINUS_DST_COLOR: return GL_ONE_MINUS_DST_COLOR; + case ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: return GL_ONE_MINUS_SRC_ALPHA; + case ZGL_BLEND_FACTOR_ONE_MINUS_SRC_COLOR: return GL_ONE_MINUS_SRC_COLOR; + case ZGL_BLEND_FACTOR_SRC_ALPHA: return GL_SRC_ALPHA; + case ZGL_BLEND_FACTOR_SRC_ALPHA_SATURATE: return GL_SRC_ALPHA_SATURATE; + case ZGL_BLEND_FACTOR_SRC_COLOR: return GL_SRC_COLOR; + case ZGL_BLEND_FACTOR_ZERO: return GL_ZERO; + + case ZGL_BLEND_MODE_ADD: return GL_FUNC_ADD; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_BLEND_MODE_MAX: return GL_MAX; + case ZGL_BLEND_MODE_MIN: return GL_MIN; + #endif + + case ZGL_BLEND_MODE_REVERSE_SUBTRACT: return GL_FUNC_REVERSE_SUBTRACT; + case ZGL_BLEND_MODE_SUBTRACT: return GL_FUNC_SUBTRACT; + + case ZGL_BUFFER_TARGET_ARRAY: return GL_ARRAY_BUFFER; + case ZGL_BUFFER_TARGET_ELEMENT_ARRAY: return GL_ELEMENT_ARRAY_BUFFER; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_BUFFER_USAGE_DYNAMIC_COPY: return GL_DYNAMIC_COPY; + #endif + + case ZGL_BUFFER_USAGE_DYNAMIC_DRAW: return GL_DYNAMIC_DRAW; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_BUFFER_USAGE_DYNAMIC_READ: return GL_DYNAMIC_READ; + case ZGL_BUFFER_USAGE_STATIC_COPY: return GL_STATIC_COPY; + #endif + + case ZGL_BUFFER_USAGE_STATIC_DRAW: return GL_STATIC_DRAW; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_BUFFER_USAGE_STATIC_READ: return GL_STATIC_READ; + case ZGL_BUFFER_USAGE_STREAM_COPY: return GL_STREAM_COPY; + #endif + + case ZGL_BUFFER_USAGE_STREAM_DRAW: return GL_STREAM_DRAW; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_BUFFER_USAGE_STREAM_READ: return GL_STREAM_READ; + #endif + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_BLACKBERRY ) + case ZGL_COMPOSE_MODULATE: return GL_MODULATE; + #endif + + case ZGL_CULL_ALL: return GL_FRONT_AND_BACK; + case ZGL_CULL_BACK: return GL_BACK; + case ZGL_CULL_FRONT: return GL_FRONT; + + case ZGL_DEPTH_ALWAYS: return GL_ALWAYS; + case ZGL_DEPTH_EQUAL: return GL_EQUAL; + case ZGL_DEPTH_LESS: return GL_LESS; + case ZGL_DEPTH_LEQUAL: return GL_LEQUAL; + case ZGL_DEPTH_GEQUAL: return GL_GEQUAL; + case ZGL_DEPTH_GREATER: return GL_GREATER; + case ZGL_DEPTH_NEVER: return GL_NEVER; + case ZGL_DEPTH_NOTEQUAL: return GL_NOTEQUAL; + + case ZGL_FRAMEBUFFER_ATTACHMENT_COLOR: return GL_COLOR_ATTACHMENT0; + case ZGL_FRAMEBUFFER_ATTACHMENT_DEPTH: return GL_DEPTH_ATTACHMENT; + case ZGL_FRAMEBUFFER_ATTACHMENT_STENCIL: return GL_STENCIL_ATTACHMENT; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_FRAMEBUFFER_TARGET_DRAW: return GL_DRAW_FRAMEBUFFER; + case ZGL_FRAMEBUFFER_TARGET_READ: return GL_READ_FRAMEBUFFER; + #endif + + case ZGL_FRAMEBUFFER_TARGET_DRAW_READ: return GL_FRAMEBUFFER; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_MATRIX_COLOR: return GL_COLOR; + case ZGL_MATRIX_MODELVIEW: return GL_MODELVIEW; + case ZGL_MATRIX_PROJECTION: return GL_PROJECTION; + #endif + + case ZGL_MATRIX_TEXTURE: return GL_TEXTURE; + + case ZGL_PIPELINE_BLEND: return GL_BLEND; + + #if !defined ( MOAI_OS_NACL ) + case ZGL_PIPELINE_COLOR_ARRAY: return GL_COLOR_ARRAY; + #endif + case ZGL_PIPELINE_CULL: return GL_CULL_FACE; + case ZGL_PIPELINE_DEPTH: return GL_DEPTH_TEST; + + #if !defined ( MOAI_OS_NACL ) + case ZGL_PIPELINE_NORMAL_ARRAY: return GL_NORMAL_ARRAY; + #endif + + case ZGL_PIPELINE_SCISSOR: return GL_SCISSOR_TEST; + case ZGL_PIPELINE_TEXTURE_2D: return GL_TEXTURE_2D; + + #if !defined ( MOAI_OS_NACL ) + case ZGL_PIPELINE_TEXTURE_COORD_ARRAY: return GL_TEXTURE_COORD_ARRAY; + case ZGL_PIPELINE_VERTEX_ARRAY: return GL_VERTEX_ARRAY; + #endif + + #if !defined ( MOAI_OS_IPHONE ) + //case ZGL_COLOR_INDEX: return GL_COLOR_INDEX; + //case ZGL_STENCIL_INDEX: return GL_STENCIL_INDEX; + #endif + + case ZGL_DEPTH_COMPONENT: return GL_DEPTH_COMPONENT; + + case ZGL_PIXEL_FORMAT_ALPHA: return GL_ALPHA; + case ZGL_PIXEL_FORMAT_LUMINANCE: return GL_LUMINANCE; + case ZGL_PIXEL_FORMAT_LUMINANCE_ALPHA: return GL_LUMINANCE_ALPHA; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_FORMAT_RED: return GL_RED; + case ZGL_PIXEL_FORMAT_RG: return GL_RG; + #endif + + case ZGL_PIXEL_FORMAT_RGB: return GL_RGB; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_FORMAT_RGB4: return GL_RGB4; + #endif + + case ZGL_PIXEL_FORMAT_RGB5_A1: return GL_RGB5_A1; + + #if defined ( MOAI_OS_ANDROID ) || defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_FORMAT_RGB565: return GL_RGB565; + #endif + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_FORMAT_RGB8: return GL_RGB8; + case ZGL_PIXEL_FORMAT_BGR: return GL_BGR; + #endif + + case ZGL_PIXEL_FORMAT_RGBA: return GL_RGBA; + case ZGL_PIXEL_FORMAT_RGBA4: return GL_RGBA4; + + #if !defined ( MOAI_OS_ANDROID ) + case ZGL_PIXEL_FORMAT_RGBA8: return GL_RGBA8; + #endif + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_FORMAT_BGRA: return GL_BGRA; + #endif + + case ZGL_PIXEL_TYPE_BYTE: return GL_BYTE; + + #ifdef MOAI_OS_IPHONE + case ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_2BPPV1_IMG: return GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; + case ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: return GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; + case ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: return GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; + case ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: return GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; + #endif + + case ZGL_PIXEL_TYPE_FLOAT: return GL_FLOAT; + case ZGL_PIXEL_TYPE_INT: return GL_INT; + case ZGL_PIXEL_TYPE_SHORT: return GL_SHORT; + case ZGL_PIXEL_TYPE_UNSIGNED_BYTE: return GL_UNSIGNED_BYTE; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_TYPE_UNSIGNED_BYTE_2_3_3_REV: return GL_UNSIGNED_BYTE_2_3_3_REV; + case ZGL_PIXEL_TYPE_UNSIGNED_BYTE_3_3_2: return GL_UNSIGNED_BYTE_3_3_2; + #endif + + case ZGL_PIXEL_TYPE_UNSIGNED_INT: return GL_UNSIGNED_INT; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8: return GL_UNSIGNED_INT_8_8_8_8; + case ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8_REV: return GL_UNSIGNED_INT_8_8_8_8_REV; + case ZGL_PIXEL_TYPE_UNSIGNED_INT_2_10_10_10_REV: return GL_UNSIGNED_INT_2_10_10_10_REV; + case ZGL_PIXEL_TYPE_UNSIGNED_INT_10_10_10_2: return GL_UNSIGNED_INT_10_10_10_2; + #endif + + case ZGL_PIXEL_TYPE_UNSIGNED_SHORT: return GL_UNSIGNED_SHORT; + case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5: return GL_UNSIGNED_SHORT_5_6_5; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5_REV: return GL_UNSIGNED_SHORT_5_6_5_REV; + #endif + + case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4: return GL_UNSIGNED_SHORT_4_4_4_4; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4_REV: return GL_UNSIGNED_SHORT_4_4_4_4_REV; + case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_1_5_5_5_REV: return GL_UNSIGNED_SHORT_1_5_5_5_REV; + #endif + + case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_5_5_1: return GL_UNSIGNED_SHORT_5_5_5_1; + + case ZGL_PRIM_LINE_LOOP: return GL_LINE_LOOP; + case ZGL_PRIM_LINE_STRIP: return GL_LINE_STRIP; + case ZGL_PRIM_LINES: return GL_LINES; + case ZGL_PRIM_POINTS: return GL_POINTS; + case ZGL_PRIM_TRIANGLE_FAN: return GL_TRIANGLE_FAN; + case ZGL_PRIM_TRIANGLE_STRIP: return GL_TRIANGLE_STRIP; + case ZGL_PRIM_TRIANGLES: return GL_TRIANGLES; + + case ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTES: return GL_ACTIVE_ATTRIBUTES; + case ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTE_MAX_LENGTH: return GL_ACTIVE_ATTRIBUTE_MAX_LENGTH; + case ZGL_PROGRAM_INFO_ACTIVE_UNIFORMS: return GL_ACTIVE_UNIFORMS; + case ZGL_PROGRAM_INFO_ACTIVE_UNIFORM_MAX_LENGTH: return GL_ACTIVE_UNIFORM_MAX_LENGTH; + case ZGL_PROGRAM_INFO_ATTACHED_SHADERS: return GL_ATTACHED_SHADERS; + case ZGL_PROGRAM_INFO_DELETE_STATUS: return GL_DELETE_STATUS; + case ZGL_PROGRAM_INFO_LOG_LENGTH: return GL_INFO_LOG_LENGTH; + case ZGL_PROGRAM_INFO_LINK_STATUS: return GL_LINK_STATUS; + case ZGL_PROGRAM_INFO_VALIDATE_STATUS: return GL_VALIDATE_STATUS; + + case ZGL_SAMPLE_LINEAR: return GL_LINEAR; + case ZGL_SAMPLE_LINEAR_MIPMAP_LINEAR: return GL_LINEAR_MIPMAP_LINEAR; + case ZGL_SAMPLE_LINEAR_MIPMAP_NEAREST: return GL_LINEAR_MIPMAP_NEAREST; + case ZGL_SAMPLE_NEAREST: return GL_NEAREST; + case ZGL_SAMPLE_NEAREST_MIPMAP_LINEAR: return GL_NEAREST_MIPMAP_LINEAR; + case ZGL_SAMPLE_NEAREST_MIPMAP_NEAREST: return GL_NEAREST_MIPMAP_NEAREST; + + case ZGL_SHADER_INFO_COMPILE_STATUS: return GL_COMPILE_STATUS; + case ZGL_SHADER_INFO_DELETE_STATUS: return GL_DELETE_STATUS; + case ZGL_SHADER_INFO_LOG_LENGTH: return GL_INFO_LOG_LENGTH; + case ZGL_SHADER_INFO_SOURCE_LENGTH: return GL_SHADER_SOURCE_LENGTH; + case ZGL_SHADER_INFO_TYPE: return GL_SHADER_TYPE; + + #if !defined ( MOAI_OS_OSX ) && !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_LINUX ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_SHADER_TYPE_TESS_CONTROL: return GL_TESS_CONTROL_SHADER; + case ZGL_SHADER_TYPE_TESS_EVALUATION: return GL_TESS_EVALUATION_SHADER; + #endif + + case ZGL_SHADER_TYPE_FRAGMENT: return GL_FRAGMENT_SHADER; + + #if !defined ( MOAI_OS_OSX ) && !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_SHADER_TYPE_GEOMETRY: return GL_GEOMETRY_SHADER; + #endif + + case ZGL_SHADER_TYPE_VERTEX: return GL_VERTEX_SHADER; + + case ZGL_STRING_VENDOR: return GL_VENDOR; + case ZGL_STRING_VERSION: return GL_VERSION; + case ZGL_STRING_RENDERER: return GL_RENDERER; + case ZGL_STRING_SHADING_LANGUAGE_VERSION: return GL_SHADING_LANGUAGE_VERSION; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_TEXTURE_BASE_LEVEL: return GL_TEXTURE_BASE_LEVEL; + case ZGL_TEXTURE_COMPARE_FUNC: return GL_TEXTURE_COMPARE_FUNC; + case ZGL_TEXTURE_COMPARE_MODE: return GL_TEXTURE_COMPARE_MODE; + //case ZGL_TEXTURE_DEPTH_STENCIL_MODE: return GL_DEPTH_STENCIL_TEXTURE_MODE; + case ZGL_TEXTURE_ENV_MODE: return GL_TEXTURE_ENV_MODE; + #endif + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_TEXTURE_LOD_BIAS: return GL_TEXTURE_LOD_BIAS; + #endif + + case ZGL_TEXTURE_MAG_FILTER: return GL_TEXTURE_MAG_FILTER; + case ZGL_TEXTURE_MIN_FILTER: return GL_TEXTURE_MIN_FILTER; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_TEXTURE_MAX_LEVEL: return GL_TEXTURE_MAX_LEVEL; + case ZGL_TEXTURE_MAX_LOD: return GL_TEXTURE_MAX_LOD; + case ZGL_TEXTURE_MIN_LOD: return GL_TEXTURE_MIN_LOD; + #endif + + #if !defined ( MOAI_OS_OSX ) && !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_LINUX ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_TEXTURE_SWIZZLE_A: return GL_TEXTURE_SWIZZLE_A; + case ZGL_TEXTURE_SWIZZLE_B: return GL_TEXTURE_SWIZZLE_B; + case ZGL_TEXTURE_SWIZZLE_G: return GL_TEXTURE_SWIZZLE_G; + case ZGL_TEXTURE_SWIZZLE_R: return GL_TEXTURE_SWIZZLE_R; + #endif + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_TEXTURE_WRAP_R: return GL_TEXTURE_WRAP_R; + #endif + + case ZGL_TEXTURE_WRAP_S: return GL_TEXTURE_WRAP_S; + case ZGL_TEXTURE_WRAP_T: return GL_TEXTURE_WRAP_T; + + case ZGL_TYPE_BYTE: return GL_BYTE; + + #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) + case ZGL_TYPE_DOUBLE: return GL_DOUBLE; + #endif + + case ZGL_TYPE_FLOAT: return GL_FLOAT; + case ZGL_TYPE_INT: return GL_INT; + case ZGL_TYPE_SHORT: return GL_SHORT; + case ZGL_TYPE_UNSIGNED_BYTE: return GL_UNSIGNED_BYTE; + case ZGL_TYPE_UNSIGNED_INT: return GL_UNSIGNED_INT; + case ZGL_TYPE_UNSIGNED_SHORT: return GL_UNSIGNED_SHORT; + + case ZGL_WRAP_MODE_CLAMP: return GL_CLAMP_TO_EDGE; + case ZGL_WRAP_MODE_REPEAT: return GL_REPEAT; + } + + assert ( false ); + return 0; +} + +/* + +//================================================================// +// setup +//================================================================// + +//----------------------------------------------------------------// +void zglBegin () { + + sOperationDepth++; +} + +//----------------------------------------------------------------// +void zglEnd () { + + ASSERT_OPERATION_DEPTH (); + sOperationDepth--; +} + +//----------------------------------------------------------------// +void zglFinalize () { +} + +//----------------------------------------------------------------// +void zglInitialize () { + + ASSERT_OPERATION_DEPTH (); + + u32 majorVersion = 0; + u32 minorVersion = 0; + + bool isOpenGLES = false; + + #ifdef __GLEW_H__ + static bool initGlew = true; + if ( initGlew ) { + glewInit (); + initGlew = false; + } + #endif + + string version = ZLGfxDevice::GetString ( ZGL_STRING_VERSION ); + std::transform ( version.begin (), version.end(), version.begin(), ::tolower ); + + string gles = "opengl es"; + + if ( version.find ( gles ) != version.npos ) { + isOpenGLES = true; + version = version.substr ( gles.length ()); + + size_t space = version.find ( ' ' ); + if ( space != version.npos ) { + version = version.substr ( space + 1 ); + } + } + else { + isOpenGLES = false; + } + + version = version.substr ( 0, 3 ); + + majorVersion = version.at ( 0 ) - '0'; + minorVersion = version.at ( 2 ) - '0'; + + #ifdef EMSCRIPTEN + isOpenGLES = true; + #endif + + #if defined ( __GLEW_H__ ) + + // if framebuffer object is not in code, check to see if it's available as + // an extension and remap to core function pointers if so + if (( isOpenGLES == false ) && ( majorVersion < 3 )) { + + if ( glewIsSupported ( "GL_EXT_framebuffer_object" )) { + + REMAP_EXTENSION_PTR ( glBindFramebuffer, glBindFramebufferEXT ) + REMAP_EXTENSION_PTR ( glCheckFramebufferStatus, glCheckFramebufferStatusEXT ) + REMAP_EXTENSION_PTR ( glDeleteFramebuffers, glDeleteFramebuffersEXT ) + REMAP_EXTENSION_PTR ( glDeleteRenderbuffers, glDeleteRenderbuffersEXT ) + REMAP_EXTENSION_PTR ( glFramebufferRenderbuffer, glFramebufferRenderbufferEXT ) + REMAP_EXTENSION_PTR ( glFramebufferTexture1D, glFramebufferTexture1DEXT ) + REMAP_EXTENSION_PTR ( glFramebufferTexture2D, glFramebufferTexture2DEXT ) + REMAP_EXTENSION_PTR ( glFramebufferTexture3D, glFramebufferTexture3DEXT ) + REMAP_EXTENSION_PTR ( glGenFramebuffers, glGenFramebuffersEXT ) + REMAP_EXTENSION_PTR ( glGenRenderbuffers, glGenRenderbuffersEXT ) + REMAP_EXTENSION_PTR ( glGenerateMipmap, glGenerateMipmapEXT ) + REMAP_EXTENSION_PTR ( glGetFramebufferAttachmentParameteriv, glGetFramebufferAttachmentParameterivEXT ) + REMAP_EXTENSION_PTR ( glGetRenderbufferParameteriv, glGetRenderbufferParameterivEXT ) + REMAP_EXTENSION_PTR ( glIsFramebuffer, glIsFramebufferEXT ) + REMAP_EXTENSION_PTR ( glIsRenderbuffer, glIsRenderbufferEXT ) + REMAP_EXTENSION_PTR ( glRenderbufferStorage, glRenderbufferStorageEXT ) + } + else { + assert ( false ); // needs framebuffer + } + } + + #endif + + int maxTextureUnits = 0; + + if ( majorVersion == 1 ) { + assert ( false ); // OpenGL ES1 no longer supported + } + else { + glGetIntegerv ( GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits ); + } + + sMaxTextureUnits = ( u32 )maxTextureUnits; + + int maxTextureSize; + glGetIntegerv ( GL_MAX_TEXTURE_SIZE, &maxTextureSize ); + sMaxTextureSize = ( u32 )maxTextureSize; +} + +//================================================================// +// gfx +//================================================================// + +//----------------------------------------------------------------// +void zglActiveTexture ( u32 textureUnit ) { + + ASSERT_OPERATION_DEPTH (); + glActiveTexture ( GL_TEXTURE0 + textureUnit ); +} + +//----------------------------------------------------------------// +void zglBlendFunc ( u32 sourceFactor, u32 destFactor ) { + + ASSERT_OPERATION_DEPTH (); + glBlendFunc ( _remapEnum ( sourceFactor ), _remapEnum ( destFactor )); +} + +//----------------------------------------------------------------// +void zglBlendMode ( u32 mode ) { + + ASSERT_OPERATION_DEPTH (); + glBlendEquation ( _remapEnum ( mode )); +} + +//----------------------------------------------------------------// +void zglClear ( u32 mask ) { + + ASSERT_OPERATION_DEPTH (); + + GLbitfield glMask = 0; + + if ( mask & ZGL_CLEAR_COLOR_BUFFER_BIT ) { + glMask |= GL_COLOR_BUFFER_BIT; + } + + if ( mask & ZGL_CLEAR_DEPTH_BUFFER_BIT ) { + glMask |= GL_DEPTH_BUFFER_BIT; + } + + if ( mask & ZGL_CLEAR_STENCIL_BUFFER_BIT ) { + glMask |= GL_STENCIL_BUFFER_BIT; + } + + glClear ( glMask ); +} + +//----------------------------------------------------------------// +void zglClearColor ( float r, float g, float b, float a ) { + + ASSERT_OPERATION_DEPTH (); + glClearColor ( r, g, b, a ); +} + +//----------------------------------------------------------------// +void zglColor ( float r, float g, float b, float a ) { + + ASSERT_OPERATION_DEPTH (); + + #if !MOAI_OS_NACL + glColor4f ( r, g, b, a ); + #endif +} + +//----------------------------------------------------------------// +void zglCullFace ( u32 mode ) { + + ASSERT_OPERATION_DEPTH (); + glCullFace ( _remapEnum ( mode )); +} + +//----------------------------------------------------------------// +void zglDeleteBuffer ( u32 buffer ) { + + ASSERT_OPERATION_DEPTH (); + if ( buffer ) { + glDeleteBuffers ( 1, &buffer ); + } +} + +//----------------------------------------------------------------// +void zglDeleteFramebuffer ( u32 buffer ) { + + ASSERT_OPERATION_DEPTH (); + if ( buffer ) { + glDeleteFramebuffers ( 1, &buffer ); + } +} + +//----------------------------------------------------------------// +void zglDeleteProgram ( u32 program ) { + + ASSERT_OPERATION_DEPTH (); + if ( program ) { + glDeleteProgram ( program ); + } +} + +//----------------------------------------------------------------// +void zglDeleteRenderbuffer ( u32 buffer ) { + + ASSERT_OPERATION_DEPTH (); + if ( buffer ) { + glDeleteRenderbuffers ( 1, &buffer ); + } +} + +//----------------------------------------------------------------// +void zglDeleteShader ( u32 shader ) { + + ASSERT_OPERATION_DEPTH (); + if ( shader ) { + glDeleteShader ( shader ); + } +} + +//----------------------------------------------------------------// +void zglDeleteTexture ( u32 texture ) { + + ASSERT_OPERATION_DEPTH (); + if ( texture ) { + glDeleteTextures ( 1, &texture ); + } +} + +//----------------------------------------------------------------// +void zglDepthFunc ( u32 depthFunc ) { + + ASSERT_OPERATION_DEPTH (); + glDepthFunc ( _remapEnum ( depthFunc )); +} + +//----------------------------------------------------------------// +void zglDepthMask ( bool flag ) { + + ASSERT_OPERATION_DEPTH (); + glDepthMask ( flag ? GL_TRUE : GL_FALSE ); +} + +//----------------------------------------------------------------// +void zglDisable ( u32 cap ) { + + ASSERT_OPERATION_DEPTH (); + glDisable ( _remapEnum ( cap )); +} + +//----------------------------------------------------------------// +void zglDrawArrays ( u32 primType, u32 first, u32 count ) { + + ASSERT_OPERATION_DEPTH (); + glDrawArrays ( _remapEnum ( primType ), ( GLint )first, ( GLsizei )count ); +} + +//----------------------------------------------------------------// +void zglDrawElements ( u32 primType, u32 count, u32 indexType, const void* indices ) { + + ASSERT_OPERATION_DEPTH (); + glDrawElements ( _remapEnum ( primType ), ( GLsizei )count, _remapEnum ( indexType ), ( const GLvoid* )indices ); +} + +//----------------------------------------------------------------// +void zglEnable ( u32 cap ) { + + ASSERT_OPERATION_DEPTH (); + glEnable ( _remapEnum ( cap )); +} + +//----------------------------------------------------------------// +void zglFlush () { + + ASSERT_OPERATION_DEPTH (); + glFlush (); +} + +//----------------------------------------------------------------// +u32 zglGetCap ( u32 cap ) { + + ASSERT_OPERATION_DEPTH (); + + switch ( cap ) { + case ZGL_CAPS_MAX_TEXTURE_SIZE: + return sMaxTextureSize; + case ZGL_CAPS_MAX_TEXTURE_UNITS: + return sMaxTextureUnits; + } + return 0; +} + +//----------------------------------------------------------------// +u32 zglGetError () { + + ASSERT_OPERATION_DEPTH (); + + GLenum error = glGetError (); + + switch ( error ) { + + case GL_NO_ERROR: return ZGL_ERROR_NONE; + + case GL_INVALID_ENUM: return ZGL_ERROR_INVALID_ENUM; + case GL_INVALID_OPERATION: return ZGL_ERROR_INVALID_OPERATION; + case GL_INVALID_VALUE: return ZGL_ERROR_INVALID_VALUE; + case GL_OUT_OF_MEMORY: return ZGL_ERROR_OUT_OF_MEMORY; + } + return ZGL_ERROR_UNKNOWN; +} + +//----------------------------------------------------------------// +cc8* zglGetErrorString ( u32 error ) { + + ASSERT_OPERATION_DEPTH (); + + switch ( error ) { + case ZGL_ERROR_NONE: return "ZGL_ERROR_NONE"; + case ZGL_ERROR_INVALID_ENUM: return "ZGL_ERROR_INVALID_ENUM"; + case ZGL_ERROR_INVALID_OPERATION: return "ZGL_ERROR_INVALID_OPERATION"; + case ZGL_ERROR_INVALID_VALUE: return "ZGL_ERROR_INVALID_VALUE"; + case ZGL_ERROR_OUT_OF_MEMORY: return "ZGL_ERROR_OUT_OF_MEMORY"; + case ZGL_ERROR_STACK_OVERFLOW: return "ZGL_ERROR_STACK_OVERFLOW"; + case ZGL_ERROR_STACK_UNDERFLOW: return "ZGL_ERROR_STACK_UNDERFLOW"; + } + return ""; +} + +//----------------------------------------------------------------// +extern cc8* zglGetString ( u32 stringID ) { + + ASSERT_OPERATION_DEPTH (); + return ( cc8* )glGetString ( _remapEnum ( stringID )); +} + +//----------------------------------------------------------------// +void zglLineWidth ( float width ) { + + ASSERT_OPERATION_DEPTH (); + glLineWidth (( GLfloat )width ); +} + +//----------------------------------------------------------------// +void zglReadPixels ( s32 x, s32 y, u32 width, u32 height, void* data ) { + + ASSERT_OPERATION_DEPTH (); + glReadPixels (( GLint )x, ( GLint )y, ( GLsizei )width, ( GLsizei )height, GL_RGBA, GL_UNSIGNED_BYTE, ( GLvoid* )data ); +} + +//----------------------------------------------------------------// +void zglScissor ( s32 x, s32 y, u32 w, u32 h ) { + + ASSERT_OPERATION_DEPTH (); + glScissor (( GLint )x, ( GLint )y, ( GLsizei )w, ( GLsizei )h ); +} + +//----------------------------------------------------------------// +void zglViewport ( s32 x, s32 y, u32 w, u32 h ) { + + ASSERT_OPERATION_DEPTH (); + glViewport (( GLint )x, ( GLint )y, ( GLsizei )w, ( GLsizei )h ); +} + +//================================================================// +// vertex format +//================================================================// + +//----------------------------------------------------------------// +void zglDisableClientState ( u32 cap ) { + + + ASSERT_OPERATION_DEPTH (); + + #if !MOAI_OS_NACL + glDisableClientState ( _remapEnum ( cap )); + #endif +} + +//----------------------------------------------------------------// +void zglDisableVertexAttribArray ( u32 index ) { + + ASSERT_OPERATION_DEPTH (); + glDisableVertexAttribArray (( GLuint )index ); +} + +//----------------------------------------------------------------// +void zglVertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, const void* pointer ) { + + ASSERT_OPERATION_DEPTH (); + + glVertexAttribPointer ( + ( GLuint )index, + ( GLint )size, + _remapEnum ( type ), + normalized ? GL_TRUE : GL_FALSE, + ( GLsizei )stride, + ( const GLvoid* )pointer + ); +} + +//----------------------------------------------------------------// +void zglEnableClientState ( u32 cap ) { + + ASSERT_OPERATION_DEPTH (); + + #if !MOAI_OS_NACL + glEnableClientState ( _remapEnum ( cap )); + #endif +} + +//----------------------------------------------------------------// +void zglEnableVertexAttribArray ( u32 index ) { + + ASSERT_OPERATION_DEPTH (); + glEnableVertexAttribArray (( GLuint )index ); +} + +//================================================================// +// shaders +//================================================================// + +//----------------------------------------------------------------// +void zglAttachShader ( u32 program, u32 shader ) { + + ASSERT_OPERATION_DEPTH (); + glAttachShader (( GLuint )program, ( GLuint )shader ); +} + +//----------------------------------------------------------------// +void zglBindAttribLocation ( u32 program, u32 index, cc8* name ) { + + ASSERT_OPERATION_DEPTH (); + glBindAttribLocation (( GLuint )program, ( GLuint )index, ( const GLchar* )name ); +} + +//----------------------------------------------------------------// +void zglCompileShader ( u32 shader ) { + + ASSERT_OPERATION_DEPTH (); + glCompileShader ( shader ); +} + +//----------------------------------------------------------------// +u32 zglCreateProgram () { + + ASSERT_OPERATION_DEPTH (); + return ( u32 )glCreateProgram (); +} + +//----------------------------------------------------------------// +u32 zglCreateShader ( u32 shaderType ) { + + ASSERT_OPERATION_DEPTH (); + return ( u32 )glCreateShader ( _remapEnum ( shaderType )); +} + +//----------------------------------------------------------------// +void zglGetProgramInfoLog ( u32 program, u32 maxLength, u32* length, char* log ) { + + ASSERT_OPERATION_DEPTH (); + glGetProgramInfoLog (( GLuint )program, ( GLsizei )maxLength, ( GLsizei* )length, ( GLchar* )log ); +} + +//----------------------------------------------------------------// +void zglGetProgramiv ( u32 program, u32 name, s32* params ) { + + ASSERT_OPERATION_DEPTH (); + glGetProgramiv (( GLuint )program, _remapEnum ( name ), ( GLint* )params ); +} + +//----------------------------------------------------------------// +void zglGetShaderInfoLog ( u32 shader, u32 maxLength, u32* length, char* log ) { + + ASSERT_OPERATION_DEPTH (); + glGetShaderInfoLog (( GLuint )shader, ( GLsizei )maxLength, ( GLsizei* )length, ( GLchar* )log ); +} + +//----------------------------------------------------------------// +void zglGetShaderiv ( u32 shader, u32 name, s32* params ) { + + ASSERT_OPERATION_DEPTH (); + glGetShaderiv (( GLuint )shader, _remapEnum ( name ), params ); +} + +//----------------------------------------------------------------// +u32 zglGetUniformLocation ( u32 program, cc8* name ) { + + ASSERT_OPERATION_DEPTH (); + return ( u32 )glGetUniformLocation (( GLuint )program, ( const GLchar* )name ); +} + +//----------------------------------------------------------------// +void zglLinkProgram ( u32 program ) { + + ASSERT_OPERATION_DEPTH (); + glLinkProgram (( GLuint )program ); +} + +//----------------------------------------------------------------// +void zglShaderSource ( u32 shader, u32 count, const char** string, const s32* length ) { + + ASSERT_OPERATION_DEPTH (); + glShaderSource (( GLuint )shader, ( GLsizei )count, ( const GLchar** )string, ( const GLint* )length ); +} + +//----------------------------------------------------------------// +void zglValidateProgram ( u32 program ) { + + ASSERT_OPERATION_DEPTH (); + glValidateProgram (( GLuint )program ); +} + +//----------------------------------------------------------------// +void zglUniform1f ( u32 location, float v0 ) { + + ASSERT_OPERATION_DEPTH (); + glUniform1f (( GLint )location, ( GLfloat )v0 ); +} + +//----------------------------------------------------------------// +void zglUniform1i ( u32 location, s32 v0 ) { + + ASSERT_OPERATION_DEPTH (); + glUniform1i (( GLint )location, ( GLint )v0 ); +} + +//----------------------------------------------------------------// +void zglUniform4fv ( u32 location, u32 count, const float* value ) { + + ASSERT_OPERATION_DEPTH (); + glUniform4fv (( GLint )location, ( GLsizei )count, ( const GLfloat* )value ); +} + +//----------------------------------------------------------------// +void zglUniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* value ) { + + ASSERT_OPERATION_DEPTH (); + glUniformMatrix3fv (( GLint )location, ( GLsizei )count, transpose ? GL_TRUE : GL_FALSE, ( const GLfloat* )value ); +} + +//----------------------------------------------------------------// +void zglUniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* value ) { + + ASSERT_OPERATION_DEPTH (); + glUniformMatrix4fv (( GLint )location, ( GLsizei )count, transpose ? GL_TRUE : GL_FALSE, ( const GLfloat* )value ); +} + +//----------------------------------------------------------------// +void zglUseProgram ( u32 program ) { + + ASSERT_OPERATION_DEPTH (); + glUseProgram (( GLuint )program ); +} + +//================================================================// +// texture +//================================================================// + +//----------------------------------------------------------------// +void zglBindTexture ( u32 texID ) { + + ASSERT_OPERATION_DEPTH (); + glBindTexture ( GL_TEXTURE_2D, ( GLuint )texID ); +} + +//----------------------------------------------------------------// +void zglCompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, const void* data ) { + + ASSERT_OPERATION_DEPTH (); + + glCompressedTexImage2D ( + GL_TEXTURE_2D, + ( GLint )level, + ( GLint )_remapEnum ( internalFormat ), + ( GLsizei )width, + ( GLsizei )height, + 0, + ( GLsizei )imageSize, + ( const GLvoid* )data + ); +} + +//----------------------------------------------------------------// +u32 zglCreateTexture () { + + ASSERT_OPERATION_DEPTH (); + + u32 textureID; + glGenTextures ( 1, ( GLuint* )&textureID ); + return textureID; +} + +//----------------------------------------------------------------// +void zglTexEnvi ( u32 pname, s32 param ) { + + ASSERT_OPERATION_DEPTH (); + + #if !MOAI_OS_NACL + glTexEnvi ( GL_TEXTURE_ENV, _remapEnum ( pname ), ( GLint )param ); + #endif +} + +//----------------------------------------------------------------// +void zglTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, const void* data ) { + + ASSERT_OPERATION_DEPTH (); + + glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 ); + + glTexImage2D ( + GL_TEXTURE_2D, + ( GLint )level, + ( GLint )_remapEnum ( internalFormat ), + ( GLsizei )width, + ( GLsizei )height, + 0, + _remapEnum ( format ), + _remapEnum ( type ), + ( const GLvoid* )data + ); +} + +//----------------------------------------------------------------// +void zglTexParameteri ( u32 pname, s32 param ) { + + ASSERT_OPERATION_DEPTH (); + glTexParameteri ( GL_TEXTURE_2D, _remapEnum ( pname ), ( GLint )_remapEnum ( param )); +} + +//----------------------------------------------------------------// +void zglTexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, const void* data ) { + + ASSERT_OPERATION_DEPTH (); + + glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 ); + + glTexSubImage2D ( + GL_TEXTURE_2D, + ( GLint )level, + ( GLint )xOffset, + ( GLint )yOffset, + ( GLsizei )width, + ( GLsizei )height, + _remapEnum ( format ), + _remapEnum ( type ), + ( const GLvoid* )data + ); +} + +//================================================================// +// framebuffer +//================================================================// + +//----------------------------------------------------------------// +void zglBindFramebuffer ( u32 target, u32 frameBuffer ) { + + ASSERT_OPERATION_DEPTH (); + glBindFramebuffer ( _remapEnum ( target ), frameBuffer ); +} + +//----------------------------------------------------------------// +void zglBindRenderbuffer ( u32 renderbuffer ) { + + ASSERT_OPERATION_DEPTH (); + glBindRenderbuffer ( GL_RENDERBUFFER, renderbuffer ); +} + +//----------------------------------------------------------------// +u32 zglCheckFramebufferStatus ( u32 target ) { + + ASSERT_OPERATION_DEPTH (); + + GLenum status = glCheckFramebufferStatus ( _remapEnum ( target )); + return status == GL_FRAMEBUFFER_COMPLETE ? ZGL_FRAMEBUFFER_STATUS_COMPLETE : 0; +} + +//----------------------------------------------------------------// +u32 zglCreateFramebuffer () { + + ASSERT_OPERATION_DEPTH (); + + u32 bufferID; + glGenFramebuffers ( 1, &bufferID ); + return bufferID; +} + +//----------------------------------------------------------------// +u32 zglCreateRenderbuffer () { + + ASSERT_OPERATION_DEPTH (); + + u32 bufferID; + glGenRenderbuffers ( 1, &bufferID ); + return bufferID; +} + +//----------------------------------------------------------------// +void zglFramebufferRenderbuffer ( u32 target, u32 attachment, u32 renderbuffer ) { + + ASSERT_OPERATION_DEPTH (); + glFramebufferRenderbuffer ( _remapEnum ( target ), _remapEnum ( attachment ), GL_RENDERBUFFER, ( GLuint )renderbuffer ); +} + +//----------------------------------------------------------------// +void zglFramebufferTexture2D ( u32 target, u32 attachment, u32 texture, s32 level ) { + + ASSERT_OPERATION_DEPTH (); + glFramebufferTexture2D ( _remapEnum ( target ), _remapEnum ( attachment ), GL_TEXTURE_2D, ( GLuint )texture, ( GLint )level ); +} + +//----------------------------------------------------------------// +u32 zglGetCurrentFramebuffer () { + + ASSERT_OPERATION_DEPTH (); + + int buffer; + glGetIntegerv ( GL_FRAMEBUFFER_BINDING, &buffer ); + return ( u32 )buffer; +} + +//----------------------------------------------------------------// +void zglRenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) { + + ASSERT_OPERATION_DEPTH (); + glRenderbufferStorage ( GL_RENDERBUFFER, _remapEnum ( internalFormat ), ( GLsizei )width, ( GLsizei )height ); +} + +//================================================================// +// buffer +//================================================================// + +//----------------------------------------------------------------// +void zglBindBuffer ( u32 target, u32 buffer ) { + + ASSERT_OPERATION_DEPTH (); + glBindBuffer ( _remapEnum ( target ), buffer ); +} + +//----------------------------------------------------------------// +void zglBufferData ( u32 target, u32 size, const void* data, u32 usage ) { + + ASSERT_OPERATION_DEPTH (); + glBufferData ( _remapEnum ( target ), ( GLsizeiptr )size, ( const GLvoid* )data, _remapEnum ( usage )); +} + +//----------------------------------------------------------------// +void zglBufferSubData ( u32 target, u32 offset, u32 size, const void* data ) { + + ASSERT_OPERATION_DEPTH (); + glBufferSubData ( _remapEnum ( target ), ( GLintptr )offset, ( GLsizeiptr )size, ( const GLvoid* )data ); +} + +//----------------------------------------------------------------// +u32 zglCreateBuffer () { + + ASSERT_OPERATION_DEPTH (); + + u32 bufferID; + glGenBuffers ( 1, &bufferID ); + return bufferID; +} + +//----------------------------------------------------------------// +void* zglMapBuffer ( u32 target ) { + + ASSERT_OPERATION_DEPTH (); + #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) + return 0; + #else + return glMapBuffer ( _remapEnum ( target ), GL_WRITE_ONLY ); + #endif +} + +//----------------------------------------------------------------// +void zglUnmapBuffer ( u32 target ) { + + ASSERT_OPERATION_DEPTH (); + #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) + return; + #else + glUnmapBuffer ( _remapEnum ( target )); + #endif +} + +//================================================================// +// vertex array +//================================================================// + +//----------------------------------------------------------------// +void zglBindVertexArray ( u32 vertexArrayID ) { + + ASSERT_OPERATION_DEPTH (); + + #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) + return; + #else + glBindVertexArray ( vertexArrayID ); + #endif +} + +//----------------------------------------------------------------// +u32 zglCreateVertexArray () { + + ASSERT_OPERATION_DEPTH (); + + #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) + return 0; + #else + u32 vertexArrayID; + glGenVertexArrays ( 1, &vertexArrayID ); + return vertexArrayID; + #endif +} + +//----------------------------------------------------------------// +void zglDeleteVertexArray ( u32 vertexArrayID ) { + + ASSERT_OPERATION_DEPTH (); + + #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) + return; + #else + glDeleteVertexArrays ( 1, &vertexArrayID ); + #endif +} + +*/ diff --git a/src/zl-gfx/ZLGfxEnum.h b/src/zl-gfx/ZLGfxEnum.h new file mode 100644 index 0000000000..7fce2cdb0e --- /dev/null +++ b/src/zl-gfx/ZLGfxEnum.h @@ -0,0 +1,246 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZL_GFX_ENUM_H +#define ZL_GFX_ENUM_H + +// hardware PVR support is based on device +#ifdef MOAI_OS_IPHONE + #define ZGL_DEVCAPS_PVR_TEXTURE 1 +#else + #define ZGL_DEVCAPS_PVR_TEXTURE 0 +#endif + +//================================================================// +// gfx +//================================================================// + +enum { + + ZGL_BLEND_FACTOR_DST_ALPHA, + ZGL_BLEND_FACTOR_DST_COLOR, + ZGL_BLEND_FACTOR_ONE, + ZGL_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, + ZGL_BLEND_FACTOR_ONE_MINUS_DST_COLOR, + ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, + ZGL_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, + ZGL_BLEND_FACTOR_SRC_ALPHA, + ZGL_BLEND_FACTOR_SRC_ALPHA_SATURATE, + ZGL_BLEND_FACTOR_SRC_COLOR, + ZGL_BLEND_FACTOR_ZERO, + + ZGL_BLEND_MODE_ADD, + ZGL_BLEND_MODE_MAX, + ZGL_BLEND_MODE_MIN, + ZGL_BLEND_MODE_REVERSE_SUBTRACT, + ZGL_BLEND_MODE_SUBTRACT, + + ZGL_BUFFER_TARGET_ARRAY, + ZGL_BUFFER_TARGET_ELEMENT_ARRAY, + + ZGL_BUFFER_USAGE_DYNAMIC_COPY, + ZGL_BUFFER_USAGE_DYNAMIC_DRAW, + ZGL_BUFFER_USAGE_DYNAMIC_READ, + ZGL_BUFFER_USAGE_STATIC_COPY, + ZGL_BUFFER_USAGE_STATIC_DRAW, + ZGL_BUFFER_USAGE_STATIC_READ, + ZGL_BUFFER_USAGE_STREAM_COPY, + ZGL_BUFFER_USAGE_STREAM_DRAW, + ZGL_BUFFER_USAGE_STREAM_READ, + + ZGL_COMPOSE_MODULATE, + + ZGL_CULL_ALL, + ZGL_CULL_BACK, + ZGL_CULL_FRONT, + + ZGL_DEPTH_ALWAYS, + ZGL_DEPTH_EQUAL, + ZGL_DEPTH_LESS, + ZGL_DEPTH_LEQUAL, + ZGL_DEPTH_GEQUAL, + ZGL_DEPTH_GREATER, + ZGL_DEPTH_NEVER, + ZGL_DEPTH_NOTEQUAL, + + ZGL_ERROR_INVALID_ENUM, + ZGL_ERROR_INVALID_OPERATION, + ZGL_ERROR_INVALID_VALUE, + ZGL_ERROR_NONE, + ZGL_ERROR_OUT_OF_MEMORY, + ZGL_ERROR_STACK_OVERFLOW, + ZGL_ERROR_STACK_UNDERFLOW, + + ZGL_ERROR_UNKNOWN, + + ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, + ZGL_FRAMEBUFFER_ATTACHMENT_DEPTH, + ZGL_FRAMEBUFFER_ATTACHMENT_STENCIL, + + ZGL_FRAMEBUFFER_STATUS_COMPLETE, + + ZGL_FRAMEBUFFER_TARGET_DRAW, + ZGL_FRAMEBUFFER_TARGET_READ, + ZGL_FRAMEBUFFER_TARGET_DRAW_READ, + + ZGL_MATRIX_COLOR, + ZGL_MATRIX_MODELVIEW, + ZGL_MATRIX_PROJECTION, + ZGL_MATRIX_TEXTURE, + + ZGL_PIPELINE_BLEND, + ZGL_PIPELINE_COLOR_ARRAY, + ZGL_PIPELINE_CULL, + ZGL_PIPELINE_DEPTH, + ZGL_PIPELINE_NORMAL_ARRAY, + ZGL_PIPELINE_SCISSOR, + ZGL_PIPELINE_TEXTURE_2D, + ZGL_PIPELINE_TEXTURE_COORD_ARRAY, + ZGL_PIPELINE_VERTEX_ARRAY, + + ZGL_COLOR_INDEX, + ZGL_STENCIL_INDEX, + ZGL_DEPTH_COMPONENT, + + ZGL_PIXEL_FORMAT_ALPHA, + ZGL_PIXEL_FORMAT_LUMINANCE, + ZGL_PIXEL_FORMAT_LUMINANCE_ALPHA, + ZGL_PIXEL_FORMAT_RED, + ZGL_PIXEL_FORMAT_RG, + ZGL_PIXEL_FORMAT_RGB, + ZGL_PIXEL_FORMAT_RGB4, + ZGL_PIXEL_FORMAT_RGB5_A1, + ZGL_PIXEL_FORMAT_RGB565, + ZGL_PIXEL_FORMAT_RGB8, + ZGL_PIXEL_FORMAT_BGR, + ZGL_PIXEL_FORMAT_RGBA, + ZGL_PIXEL_FORMAT_RGBA4, + ZGL_PIXEL_FORMAT_RGBA8, + ZGL_PIXEL_FORMAT_BGRA, + + ZGL_PIXEL_FORMAT_DEPTH_COMPONENT16, + ZGL_PIXEL_FORMAT_STENCIL_INDEX8, + + ZGL_PIXEL_TYPE_BYTE, + ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, + ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, + ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG, + ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, + ZGL_PIXEL_TYPE_FLOAT, + ZGL_PIXEL_TYPE_INT, + ZGL_PIXEL_TYPE_SHORT, + ZGL_PIXEL_TYPE_UNSIGNED_BYTE, + ZGL_PIXEL_TYPE_UNSIGNED_BYTE_2_3_3_REV, + ZGL_PIXEL_TYPE_UNSIGNED_BYTE_3_3_2, + ZGL_PIXEL_TYPE_UNSIGNED_INT, + ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8, + ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8_REV, + ZGL_PIXEL_TYPE_UNSIGNED_INT_2_10_10_10_REV, + ZGL_PIXEL_TYPE_UNSIGNED_INT_10_10_10_2, + ZGL_PIXEL_TYPE_UNSIGNED_SHORT, + ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5, + ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5_REV, + ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4, + ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4_REV, + ZGL_PIXEL_TYPE_UNSIGNED_SHORT_1_5_5_5_REV, + ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_5_5_1, + + ZGL_PRIM_LINE_LOOP, + ZGL_PRIM_LINE_STRIP, + ZGL_PRIM_LINES, + ZGL_PRIM_POINTS, + ZGL_PRIM_TRIANGLE_FAN, + ZGL_PRIM_TRIANGLE_STRIP, + ZGL_PRIM_TRIANGLES, + + ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTES, + ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTE_MAX_LENGTH, + ZGL_PROGRAM_INFO_ACTIVE_UNIFORMS, + ZGL_PROGRAM_INFO_ACTIVE_UNIFORM_MAX_LENGTH, + ZGL_PROGRAM_INFO_ATTACHED_SHADERS, + ZGL_PROGRAM_INFO_DELETE_STATUS, + ZGL_PROGRAM_INFO_LOG_LENGTH, + ZGL_PROGRAM_INFO_LINK_STATUS, + ZGL_PROGRAM_INFO_VALIDATE_STATUS, + + ZGL_SAMPLE_LINEAR, + ZGL_SAMPLE_LINEAR_MIPMAP_LINEAR, + ZGL_SAMPLE_LINEAR_MIPMAP_NEAREST, + ZGL_SAMPLE_NEAREST, + ZGL_SAMPLE_NEAREST_MIPMAP_LINEAR, + ZGL_SAMPLE_NEAREST_MIPMAP_NEAREST, + + ZGL_SHADER_INFO_COMPILE_STATUS, + ZGL_SHADER_INFO_DELETE_STATUS, + ZGL_SHADER_INFO_LOG_LENGTH, + ZGL_SHADER_INFO_SOURCE_LENGTH, + ZGL_SHADER_INFO_TYPE, + + ZGL_SHADER_TYPE_TESS_CONTROL, + ZGL_SHADER_TYPE_TESS_EVALUATION, + ZGL_SHADER_TYPE_FRAGMENT, + ZGL_SHADER_TYPE_GEOMETRY, + ZGL_SHADER_TYPE_VERTEX, + + ZGL_STRING_VENDOR, + ZGL_STRING_VERSION, + ZGL_STRING_RENDERER, + ZGL_STRING_SHADING_LANGUAGE_VERSION, + + ZGL_TEXTURE_BASE_LEVEL, + ZGL_TEXTURE_COMPARE_FUNC, + ZGL_TEXTURE_COMPARE_MODE, + //ZGL_TEXTURE_DEPTH_STENCIL_MODE, + ZGL_TEXTURE_ENV_MODE, + ZGL_TEXTURE_LOD_BIAS, + ZGL_TEXTURE_MAG_FILTER, + ZGL_TEXTURE_MIN_FILTER, + ZGL_TEXTURE_MAX_LEVEL, + ZGL_TEXTURE_MAX_LOD, + ZGL_TEXTURE_MIN_LOD, + ZGL_TEXTURE_SWIZZLE_A, + ZGL_TEXTURE_SWIZZLE_B, + ZGL_TEXTURE_SWIZZLE_G, + ZGL_TEXTURE_SWIZZLE_R, + ZGL_TEXTURE_WRAP_R, + ZGL_TEXTURE_WRAP_S, + ZGL_TEXTURE_WRAP_T, + + ZGL_TYPE_BYTE, + ZGL_TYPE_DOUBLE, + ZGL_TYPE_FLOAT, + ZGL_TYPE_INT, + ZGL_TYPE_SHORT, + ZGL_TYPE_UNSIGNED_BYTE, + ZGL_TYPE_UNSIGNED_INT, + ZGL_TYPE_UNSIGNED_SHORT, + + ZGL_WRAP_MODE_CLAMP, + ZGL_WRAP_MODE_REPEAT, +}; + +enum { + ZGL_CAPS_MAX_TEXTURE_SIZE, + ZGL_CAPS_MAX_TEXTURE_UNITS, +}; + +enum { + ZGL_CLEAR_COLOR_BUFFER_BIT = 0x01, + ZGL_CLEAR_DEPTH_BUFFER_BIT = 0x02, + ZGL_CLEAR_STENCIL_BUFFER_BIT = 0x04, +}; + +#define ZGL_INVALID_UNIFORM_ADDR (( u32 )-1 ) + +//================================================================// +// ZLGfxEnum +//================================================================// +class ZLGfxEnum { +public: + + //----------------------------------------------------------------// + static u32 MapNativeToZL ( u32 value ); + static u32 MapZLToNative ( u32 value ); +}; + +#endif diff --git a/src/zl-gfx/ZLGfxImmediate.cpp b/src/zl-gfx/ZLGfxImmediate.cpp new file mode 100644 index 0000000000..342de17e1d --- /dev/null +++ b/src/zl-gfx/ZLGfxImmediate.cpp @@ -0,0 +1,752 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +#ifdef DEBUG + #define GL_LOG_ERRORS(name) this->LogErrors ( name ); +#else + #define GL_LOG_ERRORS(name) (( void )name ); +#endif + +//================================================================// +// ZLGfxImmediate +//================================================================// + +//----------------------------------------------------------------// +void ZLGfxImmediate::ActiveTexture ( u32 textureUnit ) { + + glActiveTexture ( GL_TEXTURE0 + textureUnit ); + GL_LOG_ERRORS ( "glActiveTexture" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::AttachShader ( ZLGfxHandle* program, ZLGfxHandle* shader ) { + + glAttachShader ( program ? program->mGLID : 0, shader ? shader->mGLID : 0 ); + GL_LOG_ERRORS ( "glAttachShader" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BindAttribLocation ( ZLGfxHandle* program, u32 index, cc8* name ) { + + glBindAttribLocation ( program ? program->mGLID : 0, index, name ); + GL_LOG_ERRORS ( "glBindAttribLocation" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BindBuffer ( u32 target, ZLGfxHandle* handle ) { + + glBindBuffer ( ZLGfxEnum::MapZLToNative ( target ), handle ? handle->mGLID : 0 ); + GL_LOG_ERRORS ( "glBindBuffer" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BindFramebuffer ( u32 target, ZLGfxHandle* handle ) { + + glBindFramebuffer ( ZLGfxEnum::MapZLToNative ( target ), handle ? handle->mGLID : 0 ); + GL_LOG_ERRORS ( "glBindFramebuffer" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BindRenderbuffer ( ZLGfxHandle* handle ) { + + glBindRenderbuffer ( GL_RENDERBUFFER, handle ? handle->mGLID : 0 ); + GL_LOG_ERRORS ( "glBindRenderbuffer" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BindTexture ( ZLGfxHandle* handle ) { + + glBindTexture ( GL_TEXTURE_2D, handle ? handle->mGLID : 0 ); + GL_LOG_ERRORS ( "glBindTexture" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BindVertexArray ( ZLGfxHandle* handle ) { + + #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) + return; + #else + glBindVertexArray ( handle ? handle->mGLID : 0 ); + GL_LOG_ERRORS ( "glBindVertexArray" ) + #endif +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BlendFunc ( u32 sourceFactor, u32 destFactor ) { + + glBlendFunc ( ZLGfxEnum::MapZLToNative ( sourceFactor ), ZLGfxEnum::MapZLToNative ( destFactor )); + GL_LOG_ERRORS ( "glBlendFunc" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BlendMode ( u32 mode ) { + + glBlendEquation ( ZLGfxEnum::MapZLToNative ( mode )); + GL_LOG_ERRORS ( "glBlendEquation" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BufferData ( u32 target, size_t size, ZLSharedConstBuffer* buffer, size_t offset, u32 usage ) { + + const GLvoid* data = ( const GLvoid* )(( size_t )ZLSharedConstBuffer::GetConstData ( buffer ) + offset ); // TODO: cast + glBufferData ( ZLGfxEnum::MapZLToNative ( target ), ( GLsizeiptr )size, data, ZLGfxEnum::MapZLToNative ( usage )); + GL_LOG_ERRORS ( "glBufferData" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::BufferSubData ( u32 target, size_t offset, size_t size, ZLSharedConstBuffer* buffer, size_t srcOffset ) { + + const GLvoid* data = ( const GLvoid* )(( size_t )ZLSharedConstBuffer::GetConstData ( buffer ) + srcOffset ); + glBufferSubData ( ZLGfxEnum::MapZLToNative ( target ), ( GLintptr )offset, ( GLsizeiptr )size, data ); + GL_LOG_ERRORS ( "glBufferSubData" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::CheckFramebufferStatus ( u32 target ) { + + GLenum status = glCheckFramebufferStatus ( ZLGfxEnum::MapZLToNative ( target )); + GL_LOG_ERRORS ( "glCheckFramebufferStatus" ) + + if ( status == ZGL_FRAMEBUFFER_STATUS_COMPLETE ) { + this->mError = false; + } +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Clear ( u32 mask ) { + + GLbitfield glMask = 0; + + if ( mask & ZGL_CLEAR_COLOR_BUFFER_BIT ) { + glMask |= GL_COLOR_BUFFER_BIT; + } + + if ( mask & ZGL_CLEAR_DEPTH_BUFFER_BIT ) { + glMask |= GL_DEPTH_BUFFER_BIT; + } + + if ( mask & ZGL_CLEAR_STENCIL_BUFFER_BIT ) { + glMask |= GL_STENCIL_BUFFER_BIT; + } + + glClear ( glMask ); + GL_LOG_ERRORS ( "glClear" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::ClearColor ( float r, float g, float b, float a ) { + + glClearColor ( r, g, b, a ); + GL_LOG_ERRORS ( "glClearColor" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Color ( float r, float g, float b, float a ) { + + glColor4f ( r, g, b, a ); + GL_LOG_ERRORS ( "glColor4f" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Comment ( cc8* comment ) { + UNUSED ( comment ); +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::CompileShader ( ZLGfxHandle* shader, bool log ) { + + GLuint shaderID = ( GLuint )( shader ? shader->mGLID : 0 ); + + glCompileShader ( shaderID ); + GL_LOG_ERRORS ( "glCompileShader" ) + + s32 status; + glGetShaderiv ( shaderID, GL_COMPILE_STATUS, &status ); + GL_LOG_ERRORS ( "glGetShaderiv" ) + + if ( status == 0 ) { + + this->mError = true; + + if ( log ) { + + s32 logLength; + glGetShaderiv ( shaderID, GL_INFO_LOG_LENGTH, &logLength ); + GL_LOG_ERRORS ( "glGetShaderiv" ) + + if ( logLength > 1 ) { + char* message = ( char* )malloc ( logLength ); + + glGetShaderInfoLog ( shaderID, ( GLsizei )logLength, ( GLsizei* )&logLength, ( GLchar* )message ); + GL_LOG_ERRORS ( "glGetShaderInfoLog" ) + + printf ( "%s\n", message ); + free ( message ); + } + } + } +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::CompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, ZLSharedConstBuffer* buffer ) { + + glCompressedTexImage2D ( + GL_TEXTURE_2D, + ( GLint )level, + ( GLint )ZLGfxEnum::MapZLToNative ( internalFormat ), + ( GLsizei )width, + ( GLsizei )height, + 0, + ( GLsizei )imageSize, + ( const GLvoid* )ZLSharedConstBuffer::GetConstData ( buffer ) + ); + + GL_LOG_ERRORS ( "glCompressedTexImage2D" ) +} + +//----------------------------------------------------------------// +ZLSharedConstBuffer* ZLGfxImmediate::CopyBuffer ( ZLSharedConstBuffer* buffer ) { + + return buffer; +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxImmediate::Create ( ZLGfxHandle* handle, u32 param ) { + + if ( handle ) { + + switch ( handle->mType ) { + + case ZLGfxHandle::BUFFER: + glGenBuffers ( 1, &handle->mGLID ); + GL_LOG_ERRORS ( "glGenBuffers" ) + break; + + case ZLGfxHandle::FRAMEBUFFER: + glGenFramebuffers ( 1, &handle->mGLID ); + GL_LOG_ERRORS ( "glGenFramebuffers" ) + break; + + case ZLGfxHandle::PROGRAM: + handle->mGLID = ( u32 )glCreateProgram (); + GL_LOG_ERRORS ( "glCreateProgram" ) + break; + + case ZLGfxHandle::SHADER: + handle->mGLID = ( u32 )glCreateShader ( ZLGfxEnum::MapZLToNative ( param )); + GL_LOG_ERRORS ( "glCreateShader" ) + break; + + case ZLGfxHandle::TEXTURE: + glGenTextures ( 1, ( GLuint* )&handle->mGLID ); + GL_LOG_ERRORS ( "glGenTextures" ) + break; + + case ZLGfxHandle::RENDERBUFFER: + glGenRenderbuffers ( 1, &handle->mGLID ); + GL_LOG_ERRORS ( "glGenRenderbuffers" ) + break; + + case ZLGfxHandle::VERTEXARRAY: + #ifdef MOAI_OS_ANDROID + handle->mGLID = 0; + #else + glGenVertexArrays ( 1, &handle->mGLID ); + GL_LOG_ERRORS ( "glGenVertexArrays" ) + #endif + break; + } + } + + return handle; +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::CullFace ( u32 mode ) { + + glCullFace ( ZLGfxEnum::MapZLToNative ( mode )); + GL_LOG_ERRORS ( "glCullFace" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Delete ( u32 type, u32 glid ) { + + switch ( type ) { + + case ZLGfxHandle::BUFFER: + glDeleteBuffers ( 1, &glid ); + GL_LOG_ERRORS ( "glDeleteBuffers" ) + break; + + case ZLGfxHandle::FRAMEBUFFER: + glDeleteFramebuffers ( 1, &glid ); + GL_LOG_ERRORS ( "glDeleteFramebuffers" ) + break; + + case ZLGfxHandle::PROGRAM: { + + GLint status; + glGetProgramiv ( glid, GL_DELETE_STATUS, &status ); + GL_LOG_ERRORS ( "glGetProgramiv" ) + + if ( status == GL_FALSE ) { + glDeleteProgram ( glid ); + GL_LOG_ERRORS ( "glDeleteProgram" ) + } + break; + } + case ZLGfxHandle::SHADER: { + + GLint status; + glGetShaderiv ( glid, GL_DELETE_STATUS, &status ); + GL_LOG_ERRORS ( "glGetShaderiv" ) + + if ( status == GL_FALSE ) { + glDeleteShader ( glid ); + GL_LOG_ERRORS ( "glDeleteShader" ) + } + break; + } + case ZLGfxHandle::TEXTURE: + glDeleteTextures ( 1, &glid ); + GL_LOG_ERRORS ( "glDeleteTextures" ) + break; + + case ZLGfxHandle::RENDERBUFFER: + glDeleteRenderbuffers ( 1, &glid ); + GL_LOG_ERRORS ( "glDeleteRenderbuffers" ) + break; + + case ZLGfxHandle::VERTEXARRAY: + #if !( defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML )) + glDeleteVertexArrays ( 1, &glid ); + GL_LOG_ERRORS ( "glDeleteVertexArrays" ) + #endif + break; + } +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::DepthFunc ( u32 depthFunc ) { + + glDepthFunc ( ZLGfxEnum::MapZLToNative ( depthFunc )); + GL_LOG_ERRORS ( "glDepthFunc" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::DepthMask ( bool flag ) { + + glDepthMask ( flag ? GL_TRUE : GL_FALSE ); + GL_LOG_ERRORS ( "glDepthMask" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Disable ( u32 cap ) { + + glDisable ( ZLGfxEnum::MapZLToNative ( cap )); + GL_LOG_ERRORS ( "glDisable" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::DisableClientState ( u32 cap ) { + + #if !MOAI_OS_NACL + glDisableClientState ( ZLGfxEnum::MapZLToNative ( cap )); + GL_LOG_ERRORS ( "glDisableClientState" ) + #endif +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::DisableVertexAttribArray ( u32 index ) { + + glDisableVertexAttribArray (( GLuint )index ); + GL_LOG_ERRORS ( "glDisableVertexAttribArray" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::DrawArrays ( u32 primType, u32 first, u32 count ) { + + glDrawArrays ( ZLGfxEnum::MapZLToNative ( primType ), ( GLint )first, ( GLsizei )count ); + GL_LOG_ERRORS ( "glDrawArrays" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::DrawElements ( u32 primType, u32 count, u32 indexType, ZLSharedConstBuffer* buffer, size_t offset ) { + + glDrawElements ( + ZLGfxEnum::MapZLToNative ( primType ), + ( GLsizei )count, + ZLGfxEnum::MapZLToNative ( indexType ), + ( const GLvoid* )(( size_t )ZLSharedConstBuffer::GetConstData ( buffer ) + offset ) + ); + GL_LOG_ERRORS ( "glDrawElements" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Enable ( u32 cap ) { + + glEnable ( ZLGfxEnum::MapZLToNative ( cap )); + GL_LOG_ERRORS ( "glEnable" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::EnableClientState ( u32 cap ) { + + #if !MOAI_OS_NACL + glEnableClientState ( ZLGfxEnum::MapZLToNative ( cap )); + GL_LOG_ERRORS ( "glEnableClientState" ) + #endif +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::EnableVertexAttribArray ( u32 index ) { + + glEnableVertexAttribArray (( GLuint )index ); + GL_LOG_ERRORS ( "glEnableVertexAttribArray" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Event ( ZLGfxListener* listener, u32 event, void* userdata ) { + + if ( listener ) { + listener->OnGfxEvent ( event, userdata ); + } +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Flush ( bool finish ) { + + glFlush (); + if ( finish ) { + glFinish (); + } + GL_LOG_ERRORS ( "glFlush" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::FramebufferRenderbuffer ( u32 target, u32 attachment, ZLGfxHandle* renderbuffer ) { + + glFramebufferRenderbuffer ( + ZLGfxEnum::MapZLToNative ( target ), + ZLGfxEnum::MapZLToNative ( attachment ), + GL_RENDERBUFFER, + ( GLuint )ZLGfxHandle::GLID ( renderbuffer ) + ); + GL_LOG_ERRORS ( "glFramebufferRenderbuffer" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::FramebufferTexture2D ( u32 target, u32 attachment, ZLGfxHandle* texture, s32 level ) { + + glFramebufferTexture2D ( + ZLGfxEnum::MapZLToNative ( target ), + ZLGfxEnum::MapZLToNative ( attachment ), + GL_TEXTURE_2D, + ( GLuint )ZLGfxHandle::GLID ( texture ), + ( GLint )level + ); + GL_LOG_ERRORS ( "glFramebufferTexture2D" ) +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxImmediate::GetCurrentFramebuffer () { + + int buffer; + glGetIntegerv ( GL_FRAMEBUFFER_BINDING, &buffer ); + GL_LOG_ERRORS ( "glGetIntegerv" ) + + return new ZLGfxHandle ( ZLGfxHandle::FRAMEBUFFER, buffer, false ); +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::GetUniformLocation ( ZLGfxHandle* program, cc8* uniformName, ZLGfxListener* listener, void* userdata ) { + + if ( listener) { + u32 addr = ( u32 )glGetUniformLocation (( GLuint )ZLGfxHandle::GLID ( program ), ( const GLchar* )uniformName ); + GL_LOG_ERRORS ( "glGetUniformLocation" ) + listener->OnUniformLocation ( addr, userdata ); + } +} + +//----------------------------------------------------------------// +bool ZLGfxImmediate::IsImmediate () { + + return true; +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::LineWidth ( float width ) { + + glLineWidth (( GLfloat )width ); + GL_LOG_ERRORS ( "glLineWidth" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::LinkProgram ( ZLGfxHandle* program, bool log ) { + + GLuint programID = ( GLuint )ZLGfxHandle::GLID ( program ); + + glLinkProgram ( programID ); + GL_LOG_ERRORS ( "glLinkProgram" ) + + s32 status; + glGetProgramiv ( programID, GL_LINK_STATUS, &status ); + GL_LOG_ERRORS ( "glGetProgramiv" ) + + if ( status == 0 ) { + + this->mError = true; + + if ( log ) { + + s32 logLength; + glGetProgramiv ( programID, GL_INFO_LOG_LENGTH, &logLength ); + GL_LOG_ERRORS ( "glGetProgramiv" ) + + if ( logLength > 1 ) { + char* message = ( char* )malloc ( logLength ); + + glGetProgramInfoLog ( programID, ( GLsizei )logLength, ( GLsizei* )&logLength, ( GLchar* )message ); + GL_LOG_ERRORS ( "glGetProgramInfoLog" ) + + printf ( "%s\n", message ); + free ( message ); + } + } + } +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::LogErrors ( cc8* origin ) { + + bool hasErrors = false; + + GLenum error = ZGL_ERROR_NONE; + while (( error = ZLGfxDevice::GetError ()) != ZGL_ERROR_NONE ) { + + ZLLog_Error ( "GL ERROR: %s - %s\n", ZLGfxDevice::GetErrorString ( error ), origin ? origin : "" ); + hasErrors = true; + } + assert ( !hasErrors ); +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::PopSection () { +} + +//----------------------------------------------------------------// +bool ZLGfxImmediate::PushErrorHandler () { + + return this->mError; +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::PushSection () { + + this->mError = false; +} + +//----------------------------------------------------------------// +bool ZLGfxImmediate::PushSuccessHandler () { + + return !this->mError; +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::ReadPixels ( s32 x, s32 y, u32 width, u32 height, u32 format, u32 type, u32 pixelSize, ZLGfxListener* listener, void* userdata ) { + + if ( listener ) { + + ZLCopyOnWrite copyOnWrite; + unsigned char* buffer = ( unsigned char* )copyOnWrite.Alloc ( width * height * pixelSize ); + + glReadPixels ( + ( GLint )x, + ( GLint )y, + ( GLsizei )width, + ( GLsizei )height, + ZLGfxEnum::MapZLToNative ( format ), + ZLGfxEnum::MapZLToNative ( type ), + ( GLvoid* )buffer + ); + + //image is flipped vertically, flip it back + int index,indexInvert; + for ( u32 yFlip = 0; yFlip < ( height / 2 ); ++yFlip ) { + for ( u32 xFlip = 0; xFlip < width; ++xFlip ) { + for ( u32 i = 0; i < pixelSize; ++i ) { + + index = i + ( xFlip * pixelSize ) + ( yFlip * width * pixelSize ); + indexInvert = i + ( xFlip * pixelSize ) + (( height - 1 - yFlip ) * width * pixelSize ); + + unsigned char temp = buffer [ indexInvert ]; + buffer [ indexInvert ] = buffer [ index ]; + buffer [ index ] = temp; + } + } + } + + listener->OnReadPixels ( copyOnWrite, userdata ); + } +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::RenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) { + + glRenderbufferStorage ( GL_RENDERBUFFER, ZLGfxEnum::MapZLToNative ( internalFormat ), ( GLsizei )width, ( GLsizei )height ); + GL_LOG_ERRORS ( "glRenderbufferStorage" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Scissor ( s32 x, s32 y, u32 w, u32 h ) { + + glScissor (( GLint )x, ( GLint )y, ( GLsizei )w, ( GLsizei )h ); + GL_LOG_ERRORS ( "glScissor" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::ShaderSource ( ZLGfxHandle* shader, cc8* source, size_t length ) { + + const GLchar* stringArray [] = {( GLchar* )source }; + const GLint lengthArray [] = {( GLint )length }; + + glShaderSource (( GLuint )( shader ? shader->mGLID : 0 ), 1, stringArray, lengthArray ); + GL_LOG_ERRORS ( "glShaderSource" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::TexEnvi ( u32 pname, s32 param ) { + + #if !MOAI_OS_NACL + glTexEnvi ( GL_TEXTURE_ENV, ZLGfxEnum::MapZLToNative ( pname ), ( GLint )param ); + GL_LOG_ERRORS ( "glTexEnvi" ) + #endif +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::TexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) { + + glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 ); + GL_LOG_ERRORS ( "glPixelStorei" ) + + glTexImage2D ( + GL_TEXTURE_2D, + ( GLint )level, + ( GLint )ZLGfxEnum::MapZLToNative ( internalFormat ), + ( GLsizei )width, + ( GLsizei )height, + 0, + ZLGfxEnum::MapZLToNative ( format ), + ZLGfxEnum::MapZLToNative ( type ), + ( const GLvoid* )ZLSharedConstBuffer::GetConstData ( buffer ) + ); + GL_LOG_ERRORS ( "glTexImage2D" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::TexParameteri ( u32 pname, s32 param ) { + + glTexParameteri ( GL_TEXTURE_2D, ZLGfxEnum::MapZLToNative ( pname ), ( GLint )ZLGfxEnum::MapZLToNative ( param )); + GL_LOG_ERRORS ( "glTexParameteri" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::TexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) { + + glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 ); + GL_LOG_ERRORS ( "glPixelStorei" ) + + glTexSubImage2D ( + GL_TEXTURE_2D, + ( GLint )level, + ( GLint )xOffset, + ( GLint )yOffset, + ( GLsizei )width, + ( GLsizei )height, + ZLGfxEnum::MapZLToNative ( format ), + ZLGfxEnum::MapZLToNative ( type ), + ( const GLvoid* )ZLSharedConstBuffer::GetConstData ( buffer ) + ); + GL_LOG_ERRORS ( "glTexSubImage2D" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Uniform1f ( u32 location, float v0 ) { + + glUniform1f (( GLint )location, ( GLfloat )v0 ); + GL_LOG_ERRORS ( "glUniform1f" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Uniform1i ( u32 location, s32 v0 ) { + + glUniform1i (( GLint )location, ( GLint )v0 ); + GL_LOG_ERRORS ( "glUniform1i" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Uniform4fv ( u32 location, u32 count, const float* value ) { + + glUniform4fv (( GLint )location, ( GLsizei )count, ( const GLfloat* )value ); + GL_LOG_ERRORS ( "glUniform4fv" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::UniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* mtx ) { + + glUniformMatrix3fv (( GLint )location, ( GLsizei )count, transpose ? GL_TRUE : GL_FALSE, ( const GLfloat* )mtx ); + GL_LOG_ERRORS ( "glUniformMatrix3fv" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::UniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* mtx ) { + + glUniformMatrix4fv (( GLint )location, ( GLsizei )count, transpose ? GL_TRUE : GL_FALSE, ( const GLfloat* )mtx ); + GL_LOG_ERRORS ( "glUniformMatrix4fv" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::UseProgram ( ZLGfxHandle* program ) { + + glUseProgram (( GLuint )( program ? program->mGLID : 0 )); + GL_LOG_ERRORS ( "glUseProgram" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::VertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, ZLSharedConstBuffer* buffer, size_t offset ) { + + glVertexAttribPointer ( + ( GLuint )index, + ( GLint )size, + ZLGfxEnum::MapZLToNative ( type ), + normalized ? GL_TRUE : GL_FALSE, + ( GLsizei )stride, + ( const GLvoid* )(( size_t )ZLSharedConstBuffer::GetConstData ( buffer ) + offset ) + ); + GL_LOG_ERRORS ( "glVertexAttribPointer" ) +} + +//----------------------------------------------------------------// +void ZLGfxImmediate::Viewport ( s32 x, s32 y, u32 w, u32 h ) { + + glViewport (( GLint )x, ( GLint )y, ( GLsizei )w, ( GLsizei )h ); + GL_LOG_ERRORS ( "glViewport" ) +} + +//----------------------------------------------------------------// +ZLGfxImmediate::ZLGfxImmediate () : + mError ( false ) { +} + +//----------------------------------------------------------------// +ZLGfxImmediate::~ZLGfxImmediate () { +} diff --git a/src/zl-gfx/ZLGfxImmediate.h b/src/zl-gfx/ZLGfxImmediate.h new file mode 100644 index 0000000000..73cbae64ab --- /dev/null +++ b/src/zl-gfx/ZLGfxImmediate.h @@ -0,0 +1,122 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLGFXIMMEDIATE_H +#define ZLGFXIMMEDIATE_H + +#include + +//================================================================// +// ZLGfxImmediate +//================================================================// +class ZLGfxImmediate : + public ZLGfx { +private: + + //friend class ZLGfxRetained; + + bool mError; + + //----------------------------------------------------------------// + ZLGfxHandle* Create ( ZLGfxHandle* handle, u32 param ); + void Delete ( u32 type, u32 glid ); + void LogErrors ( cc8* origin ); + +public: + + //----------------------------------------------------------------// + void ActiveTexture ( u32 textureUnit ); + void AttachShader ( ZLGfxHandle* program, ZLGfxHandle* shader ); + + void BindAttribLocation ( ZLGfxHandle* program, u32 index, cc8* name ); + + void BindBuffer ( u32 target, ZLGfxHandle* handle ); + void BindFramebuffer ( u32 target, ZLGfxHandle* handle ); + void BindRenderbuffer ( ZLGfxHandle* handle ); + void BindTexture ( ZLGfxHandle* handle ); + void BindVertexArray ( ZLGfxHandle* handle ); + + void BlendFunc ( u32 sourceFactor, u32 destFactor ); + void BlendMode ( u32 mode ); + void BufferData ( u32 target, size_t size, ZLSharedConstBuffer* buffer, size_t offset, u32 usage ); + void BufferSubData ( u32 target, size_t offset, size_t size, ZLSharedConstBuffer* buffer, size_t srcOffset ); + + void CheckFramebufferStatus ( u32 target ); + + void Clear ( u32 mask ); + void ClearColor ( float r, float g, float b, float a ); + void Color ( float r, float g, float b, float a ); + + void Comment ( cc8* comment ); + + void CompileShader ( ZLGfxHandle* shader, bool log ); + void CompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, ZLSharedConstBuffer* buffer ); + + ZLSharedConstBuffer* CopyBuffer ( ZLSharedConstBuffer* buffer ); + + ZLGfxHandle* CreateBuffer (); + ZLGfxHandle* CreateFramebuffer (); + ZLGfxHandle* CreateProgram (); + ZLGfxHandle* CreateRenderbuffer (); + ZLGfxHandle* CreateShader ( u32 shaderType ); + ZLGfxHandle* CreateTexture (); + ZLGfxHandle* CreateVertexArray (); + + void CullFace ( u32 mode ); + + void DepthFunc ( u32 depthFunc ); + void DepthMask ( bool flag ); + void Disable ( u32 cap ); + void DisableClientState ( u32 cap ); + void DisableVertexAttribArray ( u32 index ); + void DrawArrays ( u32 primType, u32 first, u32 count ); + void DrawElements ( u32 primType, u32 count, u32 indexType, ZLSharedConstBuffer* buffer, size_t offset ); + void Enable ( u32 cap ); + void EnableClientState ( u32 cap ); + void EnableVertexAttribArray ( u32 index ); + + void Event ( ZLGfxListener* listener, u32 event, void* userdata ); + + void Flush ( bool finish ); + void FramebufferRenderbuffer ( u32 target, u32 attachment, ZLGfxHandle* renderbuffer ); + void FramebufferTexture2D ( u32 target, u32 attachment, ZLGfxHandle* texture, s32 level ); + + ZLGfxHandle* GetCurrentFramebuffer (); + void GetUniformLocation ( ZLGfxHandle* program, cc8* uniformName, ZLGfxListener* listener, void* userdata ); + + bool IsImmediate (); + + void LineWidth ( float width ); + + void LinkProgram ( ZLGfxHandle* program, bool log ); + + void PopSection (); + bool PushErrorHandler (); + void PushSection (); + bool PushSuccessHandler (); + + void ReadPixels ( s32 x, s32 y, u32 width, u32 height, u32 format, u32 type, u32 pixelSize, ZLGfxListener* listener, void* userdata ); + void RenderbufferStorage ( u32 internalFormat, u32 width, u32 height ); + + void Scissor ( s32 x, s32 y, u32 w, u32 h ); + + void ShaderSource ( ZLGfxHandle* shader, cc8* source, size_t length ); + + void TexEnvi ( u32 pname, s32 param ); + void TexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ); + void TexParameteri ( u32 pname, s32 param ); + void TexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ); + void Uniform1f ( u32 location, float v0 ); + void Uniform1i ( u32 location, s32 v0 ); + void Uniform4fv ( u32 location, u32 count, const float* value ); + void UniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* mtx ); + void UniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* mtx ); + void UseProgram ( ZLGfxHandle* program ); + void VertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, ZLSharedConstBuffer* buffer, size_t offset ); + void Viewport ( s32 x, s32 y, u32 w, u32 h ); + + ZLGfxImmediate (); + ~ZLGfxImmediate (); +}; + +#endif diff --git a/src/zl-gfx/ZLGfxLogger.cpp b/src/zl-gfx/ZLGfxLogger.cpp new file mode 100644 index 0000000000..a5fcc3dd0b --- /dev/null +++ b/src/zl-gfx/ZLGfxLogger.cpp @@ -0,0 +1,653 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include + +#define DEREF_HANDLE(handle) ( handle ? handle->mGLID : 0 ) + +//================================================================// +// ZLGfxLogger +//================================================================// + +//----------------------------------------------------------------// +void ZLGfxLogger::ActiveTexture ( u32 textureUnit ) { + + this->PrintLine ( "glActiveTexture - texture unit: %d\n", textureUnit ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::AttachShader ( ZLGfxHandle* program, ZLGfxHandle* shader ) { + + this->PrintLine ( "glAttachShader - program: %d shader: %d\n", DEREF_HANDLE ( program ), DEREF_HANDLE ( shader )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BindAttribLocation ( ZLGfxHandle* program, u32 index, cc8* name ) { + + this->PrintLine ( "glBindAttribLocation: program: %d index: %d name: %s\n", DEREF_HANDLE ( program ), index, name ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BindBuffer ( u32 target, ZLGfxHandle* handle ) { + + this->PrintLine ( "glBindBuffer - target: %d handle: %d\n", target, DEREF_HANDLE ( handle )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BindFramebuffer ( u32 target, ZLGfxHandle* handle ) { + + this->PrintLine ( "glBindFramebuffer - target: %d handle: %d\n", target, DEREF_HANDLE ( handle )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BindRenderbuffer ( ZLGfxHandle* handle ) { + + this->PrintLine ( "glBindRenderbuffer - handle: %d\n", DEREF_HANDLE ( handle )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BindTexture ( ZLGfxHandle* handle ) { + + this->PrintLine ( "glBindTexture - handle: %d\n", DEREF_HANDLE ( handle )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BindVertexArray ( ZLGfxHandle* handle ) { + + this->PrintLine ( "glBindVertexArray - handle: %d\n", DEREF_HANDLE ( handle )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BlendFunc ( u32 sourceFactor, u32 destFactor ) { + + this->PrintLine ( "glBlendFunc - sourceFactor: %d destFactor: %d\n", sourceFactor, destFactor ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BlendMode ( u32 mode ) { + + this->PrintLine ( "glBlendEquation - mode: %d\n", mode ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BufferData ( u32 target, size_t size, ZLSharedConstBuffer* buffer, size_t offset, u32 usage ) { + + const void* data = ( const void* )ZLSharedConstBuffer::GetConstData ( buffer ); + this->PrintLine ( "glBufferData - target: %d size: %d buffer: %p offset: %d usage: %d\n", target, size, data, offset, usage ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::BufferSubData ( u32 target, size_t offset, size_t size, ZLSharedConstBuffer* buffer, size_t srcOffset ) { + + const void* data = ( const void* )ZLSharedConstBuffer::GetConstData ( buffer ); + this->PrintLine ( "glBufferSubData - target: %d offset: %d size: %d buffer: %p srcOffset: %d\n", target, offset, size, data, srcOffset ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::CheckFramebufferStatus ( u32 target ) { + + this->PrintLine ( "glCheckFramebufferStatus - target: %d\n", target ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Clear ( u32 mask ) { + + this->PrintLine ( "glClear - mask: 0x%08x\n", mask ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::ClearColor ( float r, float g, float b, float a ) { + + this->PrintLine ( "glClearColor - r: %f g: %f b: %f a: %f\n", r, g, b, a ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Color ( float r, float g, float b, float a ) { + + this->PrintLine ( "glColor4f - r: %f g: %f b: %f a: %f\n", r, g, b, a ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Comment ( cc8* comment ) { + + this->PrintLine ( comment ? "COMMENT - %s\n" : "\n", comment ); + this->mCommentNo++; +} + +//----------------------------------------------------------------// +void ZLGfxLogger::CompileShader ( ZLGfxHandle* shader, bool log ) { + UNUSED ( log ); + + this->PrintLine ( "glCompileShader - shader: %d\n", DEREF_HANDLE ( shader )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::CompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, ZLSharedConstBuffer* buffer ) { + + //const void* data = ( const void* )ZLSharedConstBuffer::GetConstData ( buffer ); + + this->PrintLine ( "glCompressedTexImage2D - level: %d internalFormat: %d width: %d height: %d imageSize: %d buffer: %p\n", + level, + internalFormat, + width, + height, + imageSize, + buffer + ); +} + +//----------------------------------------------------------------// +ZLSharedConstBuffer* ZLGfxLogger::CopyBuffer ( ZLSharedConstBuffer* buffer ) { + + return buffer; +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::Create ( ZLGfxHandle* handle, u32 param ) { + + if ( handle ) { + + switch ( handle->mType ) { + + case ZLGfxHandle::BUFFER: + this->PrintLine ( "glGenBuffers\n" ); + break; + + case ZLGfxHandle::FRAMEBUFFER: + this->PrintLine ( "glGenFramebuffers\n" ); + break; + + case ZLGfxHandle::PROGRAM: + this->PrintLine ( "glCreateProgram\n" ); + break; + + case ZLGfxHandle::SHADER: + this->PrintLine ( "glCreateShader - param: %d\n", param ); + break; + + case ZLGfxHandle::TEXTURE: + this->PrintLine ( "glGenTextures\n" ); + break; + + case ZLGfxHandle::RENDERBUFFER: + this->PrintLine ( "glGenRenderbuffers\n" ); + break; + + case ZLGfxHandle::VERTEXARRAY: + #ifndef MOAI_OS_ANDROID + this->PrintLine ( "glGenVertexArrays\n" ); + #endif + break; + } + } + return 0; +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::CreateBuffer () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::BUFFER, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::CreateFramebuffer () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::FRAMEBUFFER, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::CreateProgram () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::PROGRAM, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::CreateRenderbuffer () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::RENDERBUFFER, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::CreateShader ( u32 shaderType ) { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::SHADER, 0, true ), shaderType ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::CreateTexture () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::TEXTURE, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::CreateVertexArray () { + + return this->Create ( new ZLGfxHandle ( ZLGfxHandle::VERTEXARRAY, 0, true ), 0 ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::CullFace ( u32 mode ) { + + this->PrintLine ( "glCullFace - mode: %d\n", mode ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Delete ( u32 type, u32 glid ) { + + switch ( type ) { + + case ZLGfxHandle::BUFFER: + this->PrintLine ( "glDeleteBuffers - handle: %d\n", glid ); + break; + + case ZLGfxHandle::FRAMEBUFFER: + this->PrintLine ( "glDeleteFramebuffers - handle: %d\n", glid ); + break; + + case ZLGfxHandle::PROGRAM: { + this->PrintLine ( "glDeleteProgram - handle: %d\n", glid ); + break; + } + case ZLGfxHandle::SHADER: { + this->PrintLine ( "glDeleteShader - handle: %d\n", glid ); + break; + } + case ZLGfxHandle::TEXTURE: + this->PrintLine ( "glDeleteTextures - handle: %d\n", glid ); + break; + + case ZLGfxHandle::RENDERBUFFER: + this->PrintLine ( "glDeleteRenderbuffers - handle: %d\n", glid ); + break; + + case ZLGfxHandle::VERTEXARRAY: + #ifndef MOAI_OS_ANDROID + this->PrintLine ( "glDeleteVertexArrays - handle: %d\n", glid ); + #endif + break; + } +} + +//----------------------------------------------------------------// +void ZLGfxLogger::DepthFunc ( u32 depthFunc ) { + + this->PrintLine ( "glDepthFunc - depthFunc: %d\n", depthFunc ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::DepthMask ( bool flag ) { + + this->PrintLine ( "glDepthMask - flag: %s\n", flag ? "true" : "false" ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Disable ( u32 cap ) { + + this->PrintLine ( "glDisable - cap: %d\n", cap ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::DisableClientState ( u32 cap ) { + + #if !MOAI_OS_NACL + this->PrintLine ( "glDisableClientState - cap: %d\n", cap ); + #endif +} + +//----------------------------------------------------------------// +void ZLGfxLogger::DisableVertexAttribArray ( u32 index ) { + + this->PrintLine ( "glDisableVertexAttribArray - index: %d\n", index ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::DrawArrays ( u32 primType, u32 first, u32 count ) { + + this->PrintLine ( "glDrawArrays - primType: %d first: %d count: %d\n", primType, first, count ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::DrawElements ( u32 primType, u32 count, u32 indexType, ZLSharedConstBuffer* buffer, size_t offset ) { + + const void* data = ( const void* )ZLSharedConstBuffer::GetConstData ( buffer ); + this->PrintLine ( "glDrawElements - primType: %d count: %d indexType: %p buffer: %d offset: %d\n", primType, count, indexType, data, offset ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Enable ( u32 cap ) { + + this->PrintLine ( "glEnable - cap: %d\n", cap ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::EnableClientState ( u32 cap ) { + + #if !MOAI_OS_NACL + this->PrintLine ( "glEnableClientState - cap: %d\n", cap ); + #endif +} + +//----------------------------------------------------------------// +void ZLGfxLogger::EnableVertexAttribArray ( u32 index ) { + + this->PrintLine ( "glEnableVertexAttribArray - index: %d\n", index ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Event ( ZLGfxListener* listener, u32 event, void* userdata ) { + + this->PrintLine ( "EVENT - listener: %p event: %d userdata: %p\n", listener, event, userdata ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Flush ( bool finish ) { + + this->PrintLine ( "glFlush\n" ); + + if ( finish ) { + this->PrintLine ( "glFinish\n" ); + } +} + +//----------------------------------------------------------------// +void ZLGfxLogger::FramebufferRenderbuffer ( u32 target, u32 attachment, ZLGfxHandle* renderbuffer ) { + + this->PrintLine ( "glFramebufferRenderbuffer - target: %d attachment: %d renderbuffer: %d\n", target, attachment, DEREF_HANDLE ( renderbuffer )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::FramebufferTexture2D ( u32 target, u32 attachment, ZLGfxHandle* texture, s32 level ) { + + this->PrintLine ( "glFramebufferTexture2D - target: %d attachment: %d texture: %d level: %d\n", target, attachment, DEREF_HANDLE ( texture ), level ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxLogger::GetCurrentFramebuffer () { + + this->PrintLine ( "GET CURRENT FRAMEBUFFER\n" ); + return 0; +} + +//----------------------------------------------------------------// +void ZLGfxLogger::GetUniformLocation ( ZLGfxHandle* program, cc8* uniformName, ZLGfxListener* listener, void* userdata ) { + + this->PrintLine ( "glGetUniformLocation - program: %d uniformName: %s listener: %p userdata: %p\n", DEREF_HANDLE ( program ), uniformName, listener, userdata ); +} + +//----------------------------------------------------------------// +bool ZLGfxLogger::IsImmediate () { + + return true; +} + +//----------------------------------------------------------------// +void ZLGfxLogger::LineWidth ( float width ) { + + this->PrintLine ( "glLineWidth - width: %f\n", width ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::LinkProgram ( ZLGfxHandle* program, bool log ) { + UNUSED ( log ); + + this->PrintLine ( "glLinkProgram - program: %d\n", DEREF_HANDLE ( program )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::PopSection () { + + this->PrintLine ( "POP SECTION\n" ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Print ( cc8* filename, ZLGfxRetained& gfx ) { + + this->mPrefix = ( const void* )&gfx; + + this->mFile = 0; + if ( filename ) { + this->mFile = fopen ( filename, "w" ); + assert ( this->mFile ); + } + + this->mLineNo = 0; + this->mCommentNo = 0; + + gfx.Draw ( *this ); + + if ( this->mFile ) { + fclose ( this->mFile ); + this->mFile = 0; + } +} + +//----------------------------------------------------------------// +void ZLGfxLogger::PrintLine ( cc8* format, ... ) { + + ZLLogF ( this->mFile, "%p %d: ", this->mPrefix, this->mLineNo++ ); + + va_list args; + va_start ( args, format ); + + ZLLogV ( this->mFile, format, args ); + + va_end ( args ); +} + +//----------------------------------------------------------------// +bool ZLGfxLogger::PushErrorHandler () { + + this->PrintLine ( "PUSH ERROR HANDLER\n" ); + return true; +} + +//----------------------------------------------------------------// +void ZLGfxLogger::PushSection () { + + this->PrintLine ( "PUSH SECTION\n" ); +} + +//----------------------------------------------------------------// +bool ZLGfxLogger::PushSuccessHandler () { + + this->PrintLine ( "PUSH SUCCESS HANDLER\n" ); + return true; +} + +//----------------------------------------------------------------// +void ZLGfxLogger::ReadPixels ( s32 x, s32 y, u32 width, u32 height, u32 format, u32 type, u32 pixelSize, ZLGfxListener* listener, void* userdata ) { + + this->PrintLine ( "glReadPixels - x: %d y: %d width: %d height: %d format: %d type: %d pixelSize: %d listener: %p userdata: %p\n", + x, + y, + width, + height, + format, + type, + pixelSize, + listener, + userdata + ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::RenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) { + + this->PrintLine ( "glReadPixels - internalFormat: %d width: %d height: %d\n", internalFormat, width, height ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Scissor ( s32 x, s32 y, u32 w, u32 h ) { + + this->PrintLine ( "glScissor - x: %d y: %d w: %d h: %d\n", x, y, w, h ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::ShaderSource ( ZLGfxHandle* shader, cc8* source, size_t length ) { + UNUSED ( source ); + UNUSED ( shader ); + + this->PrintLine ( "glShaderSource - length: %d\n", length ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::TexEnvi ( u32 pname, s32 param ) { + + #if !MOAI_OS_NACL + this->PrintLine ( "glTexEnvi - pname: %d param: %d\n", pname, param ); + #endif +} + +//----------------------------------------------------------------// +void ZLGfxLogger::TexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) { + + this->PrintLine ( "glPixelStorei - pname: %d param: %d\n", GL_UNPACK_ALIGNMENT, 1 ); + + const void* data = ( const void* )ZLSharedConstBuffer::GetConstData ( buffer ); + + this->PrintLine ( "glTexImage2D - level: %d internalFormat: %d width: %d height: %d format: %d type: %d buffer: %p\n", + level, + internalFormat, + width, + height, + format, + type, + data + ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::TexParameteri ( u32 pname, s32 param ) { + + this->PrintLine ( "glTexParameteri - pname: %d param: %d\n", pname, param ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::TexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) { + + this->PrintLine ( "glPixelStorei - pname: %d param: %d\n", GL_UNPACK_ALIGNMENT, 1 ); + + const void* data = ( const void* )ZLSharedConstBuffer::GetConstData ( buffer ); + + this->PrintLine ( "glTexSubImage2D - level: %d xOffset: %d yOffset: %d width: %d height: %d format: %d type: %d buffer: %p\n", + level, + xOffset, + yOffset, + width, + height, + format, + type, + data + ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Uniform1f ( u32 location, float v0 ) { + + this->PrintLine ( "glUniform1f - location: %d v0: %f\n", location, v0 ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Uniform1i ( u32 location, s32 v0 ) { + + this->PrintLine ( "glUniform1i - location: %d v0: %d\n", location, v0 ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Uniform4fv ( u32 location, u32 count, const float* value ) { + + this->PrintLine ( "glUniform4fv - location: %d count: %d\n", location, count ); + + for ( u32 i = 0; i < count; ++i ) { + const float* v = &value [ i * 4 ]; + + this->PrintLine ( " value[%d]: ", i ); + + for ( u32 j = 0; j < 4; ++j ) { + this->PrintLine ( " %f", v [ j ]); + } + } + this->PrintLine ( "\n" ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::UniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* mtx ) { + + this->PrintLine ( "glUniformMatrix3fv - location: %d count: %d transpose: %s\n", location, count, transpose ? "true" : "false" ); + + for ( u32 i = 0; i < count; ++i ) { + const float* v = &mtx [ i * 4 ]; + + this->PrintLine ( " value[%d]: ", i ); + + for ( u32 j = 0; j < 9; ++j ) { + this->PrintLine ( " %f", v [ j ]); + } + } + this->PrintLine ( "\n" ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::UniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* mtx ) { + + this->PrintLine ( "glUniformMatrix4fv - location: %d count: %d transpose: %s\n", location, count, transpose ? "true" : "false" ); + + for ( u32 i = 0; i < count; ++i ) { + const float* v = &mtx [ i * 4 ]; + + this->PrintLine ( " value[%d]: ", i ); + + for ( u32 j = 0; j < 16; ++j ) { + this->PrintLine ( " %f", v [ j ]); + } + } + this->PrintLine ( "\n" ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::UseProgram ( ZLGfxHandle* program ) { + + this->PrintLine ( "glUseProgram - program: %d\n", DEREF_HANDLE ( program )); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::VertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, ZLSharedConstBuffer* buffer, size_t offset ) { + + const void* data = ( const void* )ZLSharedConstBuffer::GetConstData ( buffer ); + + this->PrintLine ( "glVertexAttribPointer - index: %d size: %d type: %d normalized: %s stride: %d buffer: %p offset: %d\n", + index, + size, + type, + normalized ? "true" : "false", + stride, + data, + offset + ); +} + +//----------------------------------------------------------------// +void ZLGfxLogger::Viewport ( s32 x, s32 y, u32 w, u32 h ) { + + this->PrintLine ( "glViewport - x: %d y: %d w: %d h: %d\n", x, y, w, h ); +} + +//----------------------------------------------------------------// +ZLGfxLogger::ZLGfxLogger () : + mPrefix ( 0 ), + mLineNo ( 0 ), + mCommentNo ( 0 ), + mFile ( 0 ) { +} + +//----------------------------------------------------------------// +ZLGfxLogger::~ZLGfxLogger () { +} diff --git a/src/zl-gfx/ZLGfxLogger.h b/src/zl-gfx/ZLGfxLogger.h new file mode 100644 index 0000000000..2c668f470b --- /dev/null +++ b/src/zl-gfx/ZLGfxLogger.h @@ -0,0 +1,131 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLGFXLOGGER_H +#define ZLGFXLOGGER_H + +#include + +class ZLGfxRetained; + +//================================================================// +// ZLGfxLogger +//================================================================// +class ZLGfxLogger : + public ZLGfx { +private: + + const void* mPrefix; + size_t mLineNo; + size_t mCommentNo; + FILE* mFile; + + //----------------------------------------------------------------// + ZLGfxHandle* Create ( ZLGfxHandle* handle, u32 param ); + void Delete ( u32 type, u32 glid ); + void PrintLine ( cc8* format, ... ); + +public: + + GET ( size_t, CommandCount, mLineNo ); + GET ( size_t, CommentCount, mCommentNo ); + + //----------------------------------------------------------------// + void ActiveTexture ( u32 textureUnit ); + void AttachShader ( ZLGfxHandle* program, ZLGfxHandle* shader ); + + void BindAttribLocation ( ZLGfxHandle* program, u32 index, cc8* name ); + + void BindBuffer ( u32 target, ZLGfxHandle* handle ); + void BindFramebuffer ( u32 target, ZLGfxHandle* handle ); + void BindRenderbuffer ( ZLGfxHandle* handle ); + void BindTexture ( ZLGfxHandle* handle ); + void BindVertexArray ( ZLGfxHandle* handle ); + + void BlendFunc ( u32 sourceFactor, u32 destFactor ); + void BlendMode ( u32 mode ); + void BufferData ( u32 target, size_t size, ZLSharedConstBuffer* buffer, size_t offset, u32 usage ); + void BufferSubData ( u32 target, size_t offset, size_t size, ZLSharedConstBuffer* buffer, size_t srcOffset ); + + void CheckFramebufferStatus ( u32 target ); + + void Clear ( u32 mask ); + void ClearColor ( float r, float g, float b, float a ); + void Color ( float r, float g, float b, float a ); + + void Comment ( cc8* comment ); + + void CompileShader ( ZLGfxHandle* shader, bool log ); + void CompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, ZLSharedConstBuffer* buffer ); + + ZLSharedConstBuffer* CopyBuffer ( ZLSharedConstBuffer* buffer ); + + ZLGfxHandle* CreateBuffer (); + ZLGfxHandle* CreateFramebuffer (); + ZLGfxHandle* CreateProgram (); + ZLGfxHandle* CreateRenderbuffer (); + ZLGfxHandle* CreateShader ( u32 shaderType ); + ZLGfxHandle* CreateTexture (); + ZLGfxHandle* CreateVertexArray (); + + void CullFace ( u32 mode ); + + void DepthFunc ( u32 depthFunc ); + void DepthMask ( bool flag ); + void Disable ( u32 cap ); + void DisableClientState ( u32 cap ); + void DisableVertexAttribArray ( u32 index ); + void DrawArrays ( u32 primType, u32 first, u32 count ); + void DrawElements ( u32 primType, u32 count, u32 indexType, ZLSharedConstBuffer* buffer, size_t offset ); + void Enable ( u32 cap ); + void EnableClientState ( u32 cap ); + void EnableVertexAttribArray ( u32 index ); + + void Event ( ZLGfxListener* listener, u32 event, void* userdata ); + + void Flush ( bool finish ); + void FramebufferRenderbuffer ( u32 target, u32 attachment, ZLGfxHandle* renderbuffer ); + void FramebufferTexture2D ( u32 target, u32 attachment, ZLGfxHandle* texture, s32 level ); + + ZLGfxHandle* GetCurrentFramebuffer (); + void GetUniformLocation ( ZLGfxHandle* program, cc8* uniformName, ZLGfxListener* listener, void* userdata ); + + bool IsImmediate (); + + void LineWidth ( float width ); + + void LinkProgram ( ZLGfxHandle* program, bool log ); + + void PopSection (); + + void Print ( cc8* filename, ZLGfxRetained& gfx ); + + bool PushErrorHandler (); + void PushSection (); + bool PushSuccessHandler (); + + void ReadPixels ( s32 x, s32 y, u32 width, u32 height, u32 format, u32 type, u32 pixelSize, ZLGfxListener* listener, void* userdata ); + void RenderbufferStorage ( u32 internalFormat, u32 width, u32 height ); + + void Scissor ( s32 x, s32 y, u32 w, u32 h ); + + void ShaderSource ( ZLGfxHandle* shader, cc8* source, size_t length ); + + void TexEnvi ( u32 pname, s32 param ); + void TexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ); + void TexParameteri ( u32 pname, s32 param ); + void TexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ); + void Uniform1f ( u32 location, float v0 ); + void Uniform1i ( u32 location, s32 v0 ); + void Uniform4fv ( u32 location, u32 count, const float* value ); + void UniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* mtx ); + void UniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* mtx ); + void UseProgram ( ZLGfxHandle* program ); + void VertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, ZLSharedConstBuffer* buffer, size_t offset ); + void Viewport ( s32 x, s32 y, u32 w, u32 h ); + + ZLGfxLogger (); + ~ZLGfxLogger (); +}; + +#endif diff --git a/src/zl-gfx/ZLGfxRetained.cpp b/src/zl-gfx/ZLGfxRetained.cpp new file mode 100644 index 0000000000..c27d1c404b --- /dev/null +++ b/src/zl-gfx/ZLGfxRetained.cpp @@ -0,0 +1,1515 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include +#include +#include + +//================================================================// +// ZLClonedGfxBuffer +//================================================================// +class ZLClonedGfxBuffer : + public ZLSharedConstBuffer { +private: + + friend class ZLGfxRetained; + + void* mBuffer; + size_t mSize; + bool mLocal; + +public: + + GET_CONST ( void*, ConstData, mBuffer ) + GET ( size_t, Size, mSize ) + + //----------------------------------------------------------------// + void Delete () { + + if ( !this->mLocal ) { + if ( this->mBuffer ) { + free ( this->mBuffer ); + } + delete this; + } + else { + this->~ZLClonedGfxBuffer (); // placement delete + } + } + + //----------------------------------------------------------------// + ZLClonedGfxBuffer () : + mBuffer ( 0 ), + mSize ( 0 ), + mLocal ( false ) { + } + + //----------------------------------------------------------------// + ~ZLClonedGfxBuffer () { + } +}; + +//================================================================// +// ZLGfxRetainedListenerRecord +//================================================================// + +//----------------------------------------------------------------// +ZLGfxListenerRecord::ZLGfxListenerRecord () : + mListenerHandle ( 0 ), + mUserdata ( 0 ), + mCallbackID ( UNKNOWN ), + mEvent ( 0 ), + mUniformAddr ( false ) { +} + +//----------------------------------------------------------------// +ZLGfxListenerRecord::~ZLGfxListenerRecord () { +} + + +//================================================================// +// ZLGfxRetained +//================================================================// + +//----------------------------------------------------------------// +void ZLGfxRetained::ActiveTexture ( u32 textureUnit ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_ACTIVE_TEXTURE ); + this->mStream->Write < u32 >( textureUnit ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::AttachShader ( ZLGfxHandle* program, ZLGfxHandle* shader ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_ATTACH_SHADER ); + this->mStream->Write < ZLGfxHandle* >( program ); + this->mStream->Write < ZLGfxHandle* >( shader ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BindAttribLocation ( ZLGfxHandle* program, u32 index, cc8* name ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BIND_ATTRIB_LOCATION ); + this->mStream->Write < ZLGfxHandle* >( program ); + this->mStream->Write < u32 >( index ); + + size_t size = strlen ( name ); + this->mStream->Write < size_t >( size ); + this->mStream->WriteBytes ( name, size ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BindBuffer ( u32 target, ZLGfxHandle* handle ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BIND_BUFFER ); + this->mStream->Write < u32 >( target ); + this->mStream->Write < ZLGfxHandle* >( handle ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BindFramebuffer ( u32 target, ZLGfxHandle* handle ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BIND_FRAMEBUFFER ); + this->mStream->Write < u32 >( target ); + this->mStream->Write < ZLGfxHandle* >( handle ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BindRenderbuffer ( ZLGfxHandle* handle ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BIND_RENDERBUFFER ); + this->mStream->Write < ZLGfxHandle* >( handle ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BindTexture ( ZLGfxHandle* handle ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BIND_TEXTURE ); + this->mStream->Write < ZLGfxHandle* >( handle ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BindVertexArray ( ZLGfxHandle* handle ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BIND_VERTEX_ARRAY ); + this->mStream->Write < ZLGfxHandle* >( handle ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BlendFunc ( u32 sourceFactor, u32 destFactor ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BLEND_FUNC ); + this->mStream->Write < u32 >( sourceFactor ); + this->mStream->Write < u32 >( destFactor ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BlendMode ( u32 mode ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BLEND_MODE ); + this->mStream->Write < u32 >( mode ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BufferData ( u32 target, size_t size, ZLSharedConstBuffer* buffer, size_t offset, u32 usage ) { + + this->Retain ( buffer ); + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BUFFER_DATA ); + this->mStream->Write < u32 >( target ); + this->mStream->Write < size_t >( size ); + this->mStream->Write < ZLSharedConstBuffer* >( buffer ); + this->mStream->Write < size_t >( offset ); + this->mStream->Write < u32 >( usage ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::BufferSubData ( u32 target, size_t offset, size_t size, ZLSharedConstBuffer* buffer, size_t srcOffset ) { + + this->Retain ( buffer ); + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_BUFFER_SUB_DATA ); + this->mStream->Write < u32 >( target ); + this->mStream->Write < size_t >( offset ); + this->mStream->Write < size_t >( size ); + this->mStream->Write < ZLSharedConstBuffer* >( buffer ); + this->mStream->Write < size_t >( srcOffset ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::CheckFramebufferStatus ( u32 target ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_CHECK_FRAMEBUFFER_STATUS ); + this->mStream->Write < u32 >( target ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Clear ( u32 mask ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_CLEAR ); + this->mStream->Write < u32 >( mask ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::ClearColor ( float r, float g, float b, float a ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_CLEAR_COLOR ); + this->mStream->Write < float >( r ); + this->mStream->Write < float >( g ); + this->mStream->Write < float >( b ); + this->mStream->Write < float >( a ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Color ( float r, float g, float b, float a ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_COLOR ); + this->mStream->Write < float >( r ); + this->mStream->Write < float >( g ); + this->mStream->Write < float >( b ); + this->mStream->Write < float >( a ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Comment ( cc8* comment ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_COMMENT ); + + size_t size = comment ? strlen ( comment ) : 0; + this->mStream->Write < size_t >( size ); + this->mStream->WriteBytes ( comment, size ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::CompileShader ( ZLGfxHandle* shader, bool log ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_COMPILE_SHADER ); + this->mStream->Write < ZLGfxHandle* >( shader ); + this->mStream->Write < bool >( log ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::CompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, ZLSharedConstBuffer* buffer ) { + + this->Retain ( buffer ); + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_COMPRESSED_TEX_IMAGE_2D ); + this->mStream->Write < u32 >( level ); + this->mStream->Write < u32 >( internalFormat ); + this->mStream->Write < u32 >( width ); + this->mStream->Write < u32 >( height ); + this->mStream->Write < u32 >( imageSize ); + this->mStream->Write < ZLSharedConstBuffer* >( buffer ); +} + +//----------------------------------------------------------------// +ZLSharedConstBuffer* ZLGfxRetained::CopyBuffer ( ZLSharedConstBuffer* buffer ) { + + if ( buffer ) { + + ZLClonedGfxBuffer* copy = 0; + + size_t bufferSize = buffer->GetSize (); + size_t containerSize = sizeof ( ZLClonedGfxBuffer ); + size_t totalSize = bufferSize + containerSize; + + if (( this->mBufferTop + totalSize ) <= this->mBufferSize ) { + + copy = ( ZLClonedGfxBuffer* )(( size_t )this->mBuffer + this->mBufferTop ); + new ( copy ) ZLClonedGfxBuffer (); // placement new + this->mBufferTop += containerSize; + + void* bufferCopy = ( void* )(( size_t )this->mBuffer + this->mBufferTop ); + this->mBufferTop += bufferSize; + + copy->mSize = bufferSize; + copy->mBuffer = bufferCopy; + copy->mLocal = true; + } + else { + + copy = new ZLClonedGfxBuffer (); + copy->mSize = buffer->GetSize (); + copy->mBuffer = malloc ( copy->mSize ); + copy->mLocal = false; + } + + memcpy ( copy->mBuffer, buffer->GetConstData (), bufferSize ); + buffer = copy; + + this->mAllocated += totalSize; + this->mMaxAllocated = this->mMaxAllocated < this->mAllocated ? this->mAllocated : this->mMaxAllocated; + } + return buffer; +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxRetained::Create ( ZLGfxHandle* handle, u32 param ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_CREATE ); + this->mStream->Write < ZLGfxHandle* >( handle ); + this->mStream->Write < u32 >( param ); + + return handle; +} + +//----------------------------------------------------------------// +void ZLGfxRetained::CullFace ( u32 mode ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_CULL_FACE ); + this->mStream->Write < u32 >( mode ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Delete ( u32 type, u32 glid ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DELETE ); + this->mStream->Write < u32 >( type ); + this->mStream->Write < u32 >( glid ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::DepthFunc ( u32 depthFunc ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DEPTH_FUNC ); + this->mStream->Write < u32 >( depthFunc ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::DepthMask ( bool flag ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DEPTH_MASK ); + this->mStream->Write < u32 >( flag ? 1 : 0 ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Disable ( u32 cap ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DISABLE ); + this->mStream->Write < u32 >( cap ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::DisableClientState ( u32 cap ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DISABLE_CLIENT_STATE ); + this->mStream->Write < u32 >( cap ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::DisableVertexAttribArray ( u32 index ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DISABLE_VERTEX_ATTRIB_ARRAY ); + this->mStream->Write < u32 >( index ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Draw ( ZLGfx& draw ) { + + //zglBegin (); + + assert ( this->mStream ); + + size_t top = this->mStream->GetCursor (); + if ( top == 0 ) return; + + this->mStream->Seek ( 0, SEEK_SET ); + + while ( this->mStream->GetCursor () < top ) { + + u32 command = this->mStream->Read < u32 >( ZLGFX_UNKNOWN ); + + if ( command == ZLGFX_UNKNOWN ) { + printf ( "UNKOWN\n" ); + break; + } + + switch ( command ) { + + case ZLGFX_ACTIVE_TEXTURE: { + + draw.ActiveTexture ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_ATTACH_SHADER: { + + draw.AttachShader ( + this->mStream->Read < ZLGfxHandle* >( 0 ), + this->mStream->Read < ZLGfxHandle* >( 0 ) + ); + break; + } + case ZLGFX_BIND_ATTRIB_LOCATION: { + + ZLGfxHandle* handle = this->mStream->Read < ZLGfxHandle* >( 0 ); + u32 index = this->mStream->Read < u32 >( 0 ); + + size_t size = this->mStream->Read < size_t >( 0 ); + + char* name = ( char* )alloca ( size + 1 ); + this->mStream->ReadBytes ( name, size ); + name [ size ] = 0; + + draw.BindAttribLocation ( handle, index, name ); + + break; + } + case ZLGFX_BIND_BUFFER: { + + draw.BindBuffer ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < ZLGfxHandle* >( 0 ) + ); + break; + } + case ZLGFX_BIND_FRAMEBUFFER: { + + draw.BindFramebuffer ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < ZLGfxHandle* >( 0 ) + ); + break; + } + case ZLGFX_BIND_RENDERBUFFER: { + + draw.BindRenderbuffer ( + this->mStream->Read < ZLGfxHandle* >( 0 ) + ); + break; + } + case ZLGFX_BIND_TEXTURE: { + + draw.BindTexture ( + this->mStream->Read < ZLGfxHandle* >( 0 ) + ); + break; + } + case ZLGFX_BIND_VERTEX_ARRAY: { + + draw.BindVertexArray ( + this->mStream->Read < ZLGfxHandle* >( 0 ) + ); + break; + } + case ZLGFX_BLEND_FUNC: { + + draw.BlendFunc ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_BLEND_MODE: { + + draw.BlendMode ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_BUFFER_DATA: { + + u32 target = this->mStream->Read < u32 >( 0 ); + size_t size = this->mStream->Read < size_t >( 0 ); + ZLSharedConstBuffer* buffer = this->mStream->Read < ZLSharedConstBuffer* >( 0 ); + size_t offset = this->mStream->Read < size_t >( 0 ); + u32 usage = this->mStream->Read < u32 >( 0 ); + + draw.BufferData ( target, size, buffer, offset,usage ); + + break; + } + case ZLGFX_BUFFER_SUB_DATA: { + + u32 target = this->mStream->Read < u32 >( 0 ); + size_t offset = this->mStream->Read < size_t >( 0 ); + size_t size = this->mStream->Read < size_t >( 0 ); + ZLSharedConstBuffer* buffer = this->mStream->Read < ZLSharedConstBuffer* >( 0 ); + size_t srcOffset = this->mStream->Read < size_t >( 0 ); + + draw.BufferSubData ( target, offset, size, buffer, srcOffset ); + + break; + } + case ZLGFX_CHECK_FRAMEBUFFER_STATUS: { + + // TODO: GFX + //u32 target = this->mStream->Read < u32 >( 0 ); + this->mStream->Read < u32 >( 0 ); + + break; + } + case ZLGFX_CLEAR: { + + draw.Clear ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_CLEAR_COLOR: { + + draw.ClearColor ( + this->mStream->Read < float >( 0 ), + this->mStream->Read < float >( 0 ), + this->mStream->Read < float >( 0 ), + this->mStream->Read < float >( 0 ) + ); + break; + } + case ZLGFX_COLOR: { + + draw.Color ( + this->mStream->Read < float >( 0 ), + this->mStream->Read < float >( 0 ), + this->mStream->Read < float >( 0 ), + this->mStream->Read < float >( 0 ) + ); + break; + } + case ZLGFX_COMMENT: { + + size_t size = this->mStream->Read < size_t >( 0 ); + + if ( size ) { + char* comment = ( char* )alloca ( size + 1 ); + this->mStream->ReadBytes ( comment, size ); + comment [ size ] = 0; + draw.Comment ( comment ); + } + else { + draw.Comment (); + } + break; + } + case ZLGFX_COMPILE_SHADER: { + + draw.CompileShader ( + this->mStream->Read < ZLGfxHandle* >( 0 ), + this->mStream->Read < bool >( true ) + ); + break; + } + case ZLGFX_COMPRESSED_TEX_IMAGE_2D: { + + u32 level = this->mStream->Read < u32 >( 0 ); + u32 internalFormat = this->mStream->Read < u32 >( 0 ); + u32 width = this->mStream->Read < u32 >( 0 ); + u32 height = this->mStream->Read < u32 >( 0 ); + u32 imageSize = this->mStream->Read < u32 >( 0 ); + ZLSharedConstBuffer* buffer = this->mStream->Read < ZLSharedConstBuffer* >( 0 ); + + draw.CompressedTexImage2D ( level, internalFormat, width, height, imageSize, buffer ); + + break; + } + case ZLGFX_CREATE: { + + ZLGfxHandle* handle = this->mStream->Read < ZLGfxHandle* >( 0 ); + u32 param = this->mStream->Read < u32 >( 0 ); + draw.Create ( handle, param ); + break; + } + case ZLGFX_CULL_FACE: { + + draw.CullFace ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_DELETE: { + + draw.Delete ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_DEPTH_FUNC: { + + draw.DepthFunc ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_DEPTH_MASK: { + + draw.DepthMask ( + this->mStream->Read < u32 >( 0 ) == 1 + ); + break; + } + case ZLGFX_DISABLE: { + + draw.Disable ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_DISABLE_CLIENT_STATE: { + + draw.DisableClientState ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_DISABLE_VERTEX_ATTRIB_ARRAY: { + + draw.DisableVertexAttribArray ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_DRAW_ARRAYS: { + + draw.DrawArrays ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_DRAW_ELEMENTS: { + + u32 primType = this->mStream->Read < u32 >( 0 ); + u32 count = this->mStream->Read < u32 >( 0 ); + u32 indexType = this->mStream->Read < u32 >( 0 ); + ZLSharedConstBuffer* buffer = this->mStream->Read < ZLSharedConstBuffer* >( 0 ); + size_t offset = this->mStream->Read < size_t >( 0 ); + + draw.DrawElements ( primType, count, indexType, buffer, offset ); + + break; + } + case ZLGFX_ENABLE: { + + draw.Enable ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_ENABLE_CLIENT_STATE: { + + draw.EnableClientState ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_ENABLE_VERTEX_ATTRIB_ARRAY: { + + draw.EnableVertexAttribArray ( + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_EVENT: { + + u32 event = this->mStream->Read < u32 >( 0 ); + u32 listenerRecordIdx = this->mStream->Read < u32 >( 0 ); + + draw.Event ( this, event, ( void* )(( size_t )listenerRecordIdx )); + + break; + } + case ZLGFX_FLUSH: { + + bool finish = this->mStream->Read < bool >( 0 ); + + draw.Flush ( finish ); + break; + } + case ZLGFX_FRAMEBUFFER_RENDERBUFFER: { + + u32 target = this->mStream->Read < u32 >( 0 ); + u32 attachment = this->mStream->Read < u32 >( 0 ); + ZLGfxHandle* renderbuffer = this->mStream->Read < ZLGfxHandle* >( 0 ); + + draw.FramebufferRenderbuffer ( target, attachment, renderbuffer ); + + break; + } + case ZLGFX_FRAMEBUFFER_TEXTURE_2D: { + + u32 target = this->mStream->Read < u32 >( 0 ); + u32 attachment = this->mStream->Read < u32 >( 0 ); + ZLGfxHandle* texture = this->mStream->Read < ZLGfxHandle* >( 0 ); + s32 level = this->mStream->Read < s32 >( 0 ); + + draw.FramebufferTexture2D ( target, attachment, texture, level ); + + break; + } + case ZLGFX_GET_CURRENT_FRAMEBUFFER: { + + // TODO: GFX + //ZLGfxHandle* handle = this->mStream->Read < ZLGfxHandle* >( 0 ); + this->mStream->Read < ZLGfxHandle* >( 0 ); + + break; + } + case ZLGFX_GET_UNIFORM_LOCATION: { + + ZLGfxHandle* handle = this->mStream->Read < ZLGfxHandle* >( 0 ); + size_t size = this->mStream->Read < size_t >( 0 ); + + char* name = ( char* )alloca ( size + 1 ); + this->mStream->ReadBytes ( name, size ); + name [ size ] = 0; + + u32 listenerRecordIdx = this->mStream->Read < u32 >( 0 ); + + draw.GetUniformLocation ( handle, name, this, ( void* )(( size_t )listenerRecordIdx )); + + break; + } + case ZLGFX_LINE_WIDTH: { + + draw.LineWidth ( + this->mStream->Read < float >( 0 ) + ); + break; + } + case ZLGFX_LINK_PROGRAM: { + + draw.LinkProgram ( + this->mStream->Read < ZLGfxHandle* >( 0 ), + this->mStream->Read < bool >( true ) + ); + break; + } + case ZLGFX_READ_PIXELS: { + + s32 x = this->mStream->Read < s32 >( 0 ); + s32 y = this->mStream->Read < s32 >( 0 ); + + u32 width = this->mStream->Read < u32 >( 0 ); + u32 height = this->mStream->Read < u32 >( 0 ); + + u32 format = this->mStream->Read < u32 >( 0 ); + u32 type = this->mStream->Read < u32 >( 0 ); + u32 pixelSize = this->mStream->Read < u32 >( 0 ); + + u32 listenerRecordIdx = this->mStream->Read < u32 >( 0 ); + + draw.ReadPixels ( x, y, width, height, format, type, pixelSize, this, ( void* )(( size_t )listenerRecordIdx )); + + break; + } + case ZLGFX_RENDER_BUFFER_STORAGE: { + + u32 internalFormat = this->mStream->Read < u32 >( 0 ); + u32 width = this->mStream->Read < u32 >( 0 ); + u32 height = this->mStream->Read < u32 >( 0 ); + + draw.RenderbufferStorage ( internalFormat, width, height ); + + break; + } + case ZLGFX_SCISSOR: { + + draw.Scissor ( + this->mStream->Read < s32 >( 0 ), + this->mStream->Read < s32 >( 0 ), + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < u32 >( 0 ) + ); + break; + } + case ZLGFX_SHADER_SOURCE: { + + ZLGfxHandle* handle = this->mStream->Read < ZLGfxHandle* >( 0 ); + size_t length = this->mStream->Read < size_t >( 0 ); + + char* source = ( char* )alloca ( length + 1 ); + this->mStream->ReadBytes ( source, length ); + source [ length ] = 0; + + draw.ShaderSource ( + handle, + source, + length + ); + break; + } + case ZLGFX_TEX_ENVI: { + + draw.TexEnvi ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < s32 >( 0 ) + ); + break; + } + case ZLGFX_TEX_IMAGE_2D: { + + u32 level = this->mStream->Read < u32 >( 0 ); + u32 internalFormat = this->mStream->Read < u32 >( 0 ); + u32 width = this->mStream->Read < u32 >( 0 ); + u32 height = this->mStream->Read < u32 >( 0 ); + u32 format = this->mStream->Read < u32 >( 0 ); + u32 type = this->mStream->Read < u32 >( 0 ); + ZLSharedConstBuffer* buffer = this->mStream->Read < ZLSharedConstBuffer* >( 0 ); + + draw.TexImage2D ( level, internalFormat, width, height, format, type, buffer ); + + break; + } + case ZLGFX_TEX_PARAMETERI: { + + draw.TexParameteri ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < s32 >( 0 ) + ); + break; + } + case ZLGFX_TEX_SUB_IMAGE_2D: { + + u32 level = this->mStream->Read < u32 >( 0 ); + u32 xOffset = this->mStream->Read < u32 >( 0 ); + u32 yOffset = this->mStream->Read < u32 >( 0 ); + u32 width = this->mStream->Read < u32 >( 0 ); + u32 height = this->mStream->Read < u32 >( 0 ); + u32 format = this->mStream->Read < u32 >( 0 ); + u32 type = this->mStream->Read < u32 >( 0 ); + ZLSharedConstBuffer* buffer = this->mStream->Read < ZLSharedConstBuffer* >( 0 ); + + draw.TexSubImage2D ( level, xOffset, yOffset, width, height, format, type, buffer ); + + break; + } + case ZLGFX_UNIFORM_1F: { + + draw.Uniform1f ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < float >( 0 ) + ); + break; + } + case ZLGFX_UNIFORM_1I: { + + draw.Uniform1i ( + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < s32 >( 0 ) + ); + break; + } + case ZLGFX_UNIFORM_4FV: { + + u32 location = this->mStream->Read < u32 >( 0 ); + u32 count = this->mStream->Read < u32 >( 0 ); + + float vec [ 4 ]; + this->mStream->ReadBytes ( vec, sizeof ( float ) * 4 ); + + draw.Uniform4fv ( location, count, vec ); + break; + } + case ZLGFX_UNIFORM_MATRIX_3FV: { + + u32 location = this->mStream->Read < u32 >( 0 ); + u32 count = this->mStream->Read < u32 >( 0 ); + bool transpose = this->mStream->Read < bool >( false ); + + float mtx [ 9 ]; + this->mStream->ReadBytes ( &mtx, sizeof ( float ) * 9 ); + + draw.UniformMatrix3fv ( location, count, transpose, mtx ); + + break; + } + case ZLGFX_UNIFORM_MATRIX_4FV: { + + u32 location = this->mStream->Read < u32 >( 0 ); + u32 count = this->mStream->Read < u32 >( 0 ); + bool transpose = this->mStream->Read < bool >( false ); + + float mtx [ 16 ]; + this->mStream->ReadBytes ( &mtx, sizeof ( float ) * 16 ); + + draw.UniformMatrix4fv ( location, count, transpose, mtx ); + + break; + } + case ZLGFX_USE_PROGRAM: { + + draw.UseProgram ( + this->mStream->Read < ZLGfxHandle* >( 0 ) + ); + break; + } + case ZLGFX_VERTEX_ATTRIB_POINTER: { + + u32 index = this->mStream->Read < u32 >( 0 ); + u32 size = this->mStream->Read < u32 >( 0 ); + u32 type = this->mStream->Read < u32 >( 0 ); + bool normalized = this->mStream->Read < bool >( false ); + u32 stride = this->mStream->Read < u32 >( 0 ); + ZLSharedConstBuffer* buffer = this->mStream->Read < ZLSharedConstBuffer* >( 0 ); + size_t offset = this->mStream->Read < size_t >( 0 ); + + draw.VertexAttribPointer ( + index, + size, + type, + normalized, + stride, + buffer, + offset + ); + + break; + } + case ZLGFX_VIEWPORT: { + + draw.Viewport ( + this->mStream->Read < s32 >( 0 ), + this->mStream->Read < s32 >( 0 ), + this->mStream->Read < u32 >( 0 ), + this->mStream->Read < u32 >( 0 ) + ); + break; + } + } + } + + this->mStream->Seek (( long )top, SEEK_SET ); + + //zglEnd (); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::DrawArrays ( u32 primType, u32 first, u32 count ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DRAW_ARRAYS ); + this->mStream->Write < u32 >( primType ); + this->mStream->Write < u32 >( first ); + this->mStream->Write < u32 >( count ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::DrawElements ( u32 primType, u32 count, u32 indexType, ZLSharedConstBuffer* buffer, size_t offset ) { + + this->Retain ( buffer ); + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_DRAW_ELEMENTS ); + this->mStream->Write < u32 >( primType ); + this->mStream->Write < u32 >( count ); + this->mStream->Write < u32 >( indexType ); + this->mStream->Write < ZLSharedConstBuffer* >( buffer ); + this->mStream->Write < size_t >( offset ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Enable ( u32 cap ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_ENABLE ); + this->mStream->Write < u32 >( cap ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::EnableClientState ( u32 cap ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_ENABLE_CLIENT_STATE ); + this->mStream->Write < u32 >( cap ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::EnableVertexAttribArray ( u32 index ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_ENABLE_VERTEX_ATTRIB_ARRAY ); + this->mStream->Write < u32 >( index ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Event ( ZLGfxListener* listener, u32 event, void* userdata ) { + + assert ( this->mStream ); + + if ( listener ) { + + this->mStream->Write < u32 >( ZLGFX_EVENT ); + this->mStream->Write < u32 >( event ); + this->WriteListenerRecord ( listener, userdata ); + } +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Flush ( bool finish ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_FLUSH ); + this->mStream->Write < bool >( finish ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::FramebufferRenderbuffer ( u32 target, u32 attachment, ZLGfxHandle* renderbuffer ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_FRAMEBUFFER_RENDERBUFFER ); + this->mStream->Write < u32 >( target ); + this->mStream->Write < u32 >( attachment ); + this->mStream->Write < ZLGfxHandle* >( renderbuffer ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::FramebufferTexture2D ( u32 target, u32 attachment, ZLGfxHandle* texture, s32 level ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_FRAMEBUFFER_TEXTURE_2D ); + this->mStream->Write < u32 >( target ); + this->mStream->Write < u32 >( attachment ); + this->mStream->Write < ZLGfxHandle* >( texture ); + this->mStream->Write < s32 >( level ); +} + +//----------------------------------------------------------------// +ZLGfxHandle* ZLGfxRetained::GetCurrentFramebuffer () { + + assert ( this->mStream ); + + ZLGfxHandle* handle = new ZLGfxHandle ( ZLGfxHandle::FRAMEBUFFER, 0, false ); + + this->mStream->Write < u32 >( ZLGFX_GET_CURRENT_FRAMEBUFFER ); + this->mStream->Write < ZLGfxHandle* >( handle ); + + return handle; +} + +//----------------------------------------------------------------// +void ZLGfxRetained::GetUniformLocation ( ZLGfxHandle* program, cc8* uniformName, ZLGfxListener* listener, void* userdata ) { + + assert ( this->mStream ); + + if ( listener ) { + + this->mStream->Write < u32 >( ZLGFX_GET_UNIFORM_LOCATION ); + this->mStream->Write < ZLGfxHandle* >( program ); + + size_t size = strlen ( uniformName ); + this->mStream->Write < size_t >( size ); + this->mStream->WriteBytes ( uniformName, size ); + + this->WriteListenerRecord ( listener, userdata ); + } +} + +//----------------------------------------------------------------// +bool ZLGfxRetained::HasContent () { + + return ( this->mStream->GetCursor () > 0 ); +} + +//----------------------------------------------------------------// +bool ZLGfxRetained::IsImmediate () { + + return false; +} + +//----------------------------------------------------------------// +void ZLGfxRetained::LineWidth ( float width ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_LINE_WIDTH ); + this->mStream->Write < float >( width ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::LinkProgram ( ZLGfxHandle* program, bool log ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_LINK_PROGRAM ); + this->mStream->Write < ZLGfxHandle* >( program ); + this->mStream->Write < bool >( log ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::OnGfxEvent ( u32 event, void* userdata ) { + + size_t idx = ( size_t )userdata; + if ( idx < this->mListenerRecords.GetTop ()) { + ZLGfxListenerRecord& listenerRecord = this->mListenerRecords [ idx ]; + + listenerRecord.mCallbackID = ZLGfxListenerRecord::ON_EVENT; + listenerRecord.mEvent = event; + } +} + +//----------------------------------------------------------------// +void ZLGfxRetained::OnReadPixels ( const ZLCopyOnWrite& copyOnWrite, void* userdata ) { + + size_t idx = ( size_t )userdata; + if ( idx < this->mListenerRecords.GetTop ()) { + ZLGfxListenerRecord& listenerRecord = this->mListenerRecords [ idx ]; + + listenerRecord.mCallbackID = ZLGfxListenerRecord::ON_READ_PIXELS; + listenerRecord.mCopyOnWrite = copyOnWrite; + } +} + +//----------------------------------------------------------------// +void ZLGfxRetained::OnUniformLocation ( u32 addr, void* userdata ) { + + size_t idx = ( size_t )userdata; + if ( idx < this->mListenerRecords.GetTop ()) { + ZLGfxListenerRecord& listenerRecord = this->mListenerRecords [ idx ]; + + listenerRecord.mCallbackID = ZLGfxListenerRecord::ON_UNIFORM_LOCATION; + listenerRecord.mUniformAddr = addr; + } +} + +//----------------------------------------------------------------// +void ZLGfxRetained::PopSection () { +} + +//----------------------------------------------------------------// +void ZLGfxRetained::PublishEvents () { + + size_t top = this->mListenerRecords.GetTop (); + for ( size_t i = 0; i < top; ++i ) { + + ZLGfxListenerRecord& record = this->mListenerRecords [ i ]; + + ZLGfxListener* listener = record.mListenerHandle->GetTarget (); + if ( listener ) { + + switch ( record.mCallbackID ) { + + case ZLGfxListenerRecord::ON_EVENT: + listener->OnGfxEvent ( record.mEvent, record.mUserdata ); + break; + + case ZLGfxListenerRecord::ON_READ_PIXELS: + listener->OnReadPixels ( record.mCopyOnWrite, record.mUserdata ); + break; + + case ZLGfxListenerRecord::ON_UNIFORM_LOCATION: + listener->OnUniformLocation ( record.mUniformAddr, record.mUserdata ); + break; + } + } + } +} + +//----------------------------------------------------------------// +void ZLGfxRetained::PublishEventsAndReset () { + + this->PublishEvents (); + this->Reset (); +} + +//----------------------------------------------------------------// +bool ZLGfxRetained::PushErrorHandler () { + + return false; +} + +//----------------------------------------------------------------// +void ZLGfxRetained::PushSection () { +} + +//----------------------------------------------------------------// +bool ZLGfxRetained::PushSuccessHandler () { + + // TODO: gfx + + return true; +} + +//----------------------------------------------------------------// +void ZLGfxRetained::ReadPixels ( s32 x, s32 y, u32 width, u32 height, u32 format, u32 type, u32 pixelSize, ZLGfxListener* listener, void* userdata ) { + + assert ( this->mStream ); + + if ( listener ) { + + this->mStream->Write < u32 >( ZLGFX_READ_PIXELS ); + + this->mStream->Write < s32 >( x ); + this->mStream->Write < s32 >( y ); + + this->mStream->Write < u32 >( width ); + this->mStream->Write < u32 >( height ); + + this->mStream->Write < u32 >( format ); + this->mStream->Write < u32 >( type ); + this->mStream->Write < u32 >( pixelSize ); + + this->WriteListenerRecord ( listener, userdata ); + } +} + +//----------------------------------------------------------------// +void ZLGfxRetained::RenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_RENDER_BUFFER_STORAGE ); + this->mStream->Write < u32 >( internalFormat ); + this->mStream->Write < u32 >( width ); + this->mStream->Write < u32 >( height ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Reset () { + + assert ( this->mStream ); + + if ( this->mListenerRecords.GetTop () > 0 ) { + this->Abandon (); + this->mListenerRecords.Reset (); + } + + this->mStream->Seek ( 0, SEEK_SET ); + + this->mListenerRecords.Reset (); + + while ( this->mReleaseStack.GetTop ()) { + ZLRefCountedObject* object = this->mReleaseStack.Pop (); + object->Release (); + } + + if ( this->mBufferSize < this->mMaxAllocated ) { + + if ( this->mBuffer ) { + free ( this->mBuffer ); + } + + size_t paddedSize = 1; + while ( paddedSize < this->mMaxAllocated ) paddedSize = paddedSize << 0x01; + + this->mBufferSize = paddedSize; + this->mBuffer = malloc ( paddedSize ); + } + + this->mAllocated = 0; + this->mBufferTop = 0; +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Retain ( ZLRefCountedObject* object ) { + + if ( object ) { + object->Retain (); + this->mReleaseStack.Push ( object ); + } +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Scissor ( s32 x, s32 y, u32 w, u32 h ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_SCISSOR ); + this->mStream->Write < s32 >( x ); + this->mStream->Write < s32 >( y ); + this->mStream->Write < u32 >( w ); + this->mStream->Write < u32 >( h ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::ShaderSource ( ZLGfxHandle* shader, cc8* source, size_t length ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_SHADER_SOURCE ); + this->mStream->Write < ZLGfxHandle* >( shader ); + this->mStream->Write < size_t >( length ); + this->mStream->WriteBytes ( source, length ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::TexEnvi ( u32 pname, s32 param ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_TEX_ENVI ); + this->mStream->Write < u32 >( pname ); + this->mStream->Write < s32 >( param ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::TexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) { + + this->Retain ( buffer ); + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_TEX_IMAGE_2D ); + this->mStream->Write < u32 >( level ); + this->mStream->Write < u32 >( internalFormat ); + this->mStream->Write < u32 >( width ); + this->mStream->Write < u32 >( height ); + this->mStream->Write < u32 >( format ); + this->mStream->Write < u32 >( type ); + this->mStream->Write < ZLSharedConstBuffer* >( buffer ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::TexParameteri ( u32 pname, s32 param ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_TEX_PARAMETERI ); + this->mStream->Write < u32 >( pname ); + this->mStream->Write < s32 >( param ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::TexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ) { + + this->Retain ( buffer ); + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_TEX_SUB_IMAGE_2D ); + this->mStream->Write < u32 >( level ); + this->mStream->Write < s32 >( xOffset ); + this->mStream->Write < s32 >( yOffset ); + this->mStream->Write < u32 >( width ); + this->mStream->Write < u32 >( height ); + this->mStream->Write < u32 >( format ); + this->mStream->Write < u32 >( type ); + this->mStream->Write < ZLSharedConstBuffer* >( buffer ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Uniform1f ( u32 location, float v0 ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_UNIFORM_1F ); + this->mStream->Write < u32 >( location ); + this->mStream->Write < float >( v0 ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Uniform1i ( u32 location, s32 v0 ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_UNIFORM_1I ); + this->mStream->Write < u32 >( location ); + this->mStream->Write < s32 >( v0 ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Uniform4fv ( u32 location, u32 count, const float* value ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_UNIFORM_4FV ); + this->mStream->Write < u32 >( location ); + this->mStream->Write < u32 >( count ); + this->mStream->WriteBytes ( value, sizeof ( float ) * 4 ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::UniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* mtx ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_UNIFORM_MATRIX_3FV ); + this->mStream->Write < u32 >( location ); + this->mStream->Write < u32 >( count ); + this->mStream->Write < bool >( transpose ); + this->mStream->WriteBytes ( mtx, sizeof ( float ) * 9 ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::UniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* mtx ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_UNIFORM_MATRIX_4FV ); + this->mStream->Write < u32 >( location ); + this->mStream->Write < u32 >( count ); + this->mStream->Write < bool >( transpose ); + this->mStream->WriteBytes ( mtx, sizeof ( float ) * 16 ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::UseProgram ( ZLGfxHandle* program ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_USE_PROGRAM ); + this->mStream->Write < ZLGfxHandle* >( program ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::VertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, ZLSharedConstBuffer* buffer, size_t offset ) { + + this->Retain ( buffer ); + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_VERTEX_ATTRIB_POINTER ); + this->mStream->Write < u32 >( index ); + this->mStream->Write < u32 >( size ); + this->mStream->Write < u32 >( type ); + this->mStream->Write < bool >( normalized ); + this->mStream->Write < u32 >( stride ); + this->mStream->Write < ZLSharedConstBuffer* >( buffer ); + this->mStream->Write < size_t >( offset ); +} + +//----------------------------------------------------------------// +void ZLGfxRetained::Viewport ( s32 x, s32 y, u32 w, u32 h ) { + + assert ( this->mStream ); + + this->mStream->Write < u32 >( ZLGFX_VIEWPORT ); + this->mStream->Write < s32 >( x ); + this->mStream->Write < s32 >( y ); + this->mStream->Write < u32 >( w ); + this->mStream->Write < u32 >( h ); +} + +//----------------------------------------------------------------// +ZLGfxListenerRecord& ZLGfxRetained::WriteListenerRecord ( ZLGfxListener* listener, void* userdata ) { + + ZLGfxListenerHandle* listenerHandle = listener->GetRetainedHandle (); + this->mReleaseStack.Push ( listenerHandle ); + + u32 idx = ( u32 )this->mListenerRecords.GetTop (); + ZLGfxListenerRecord& record = this->mListenerRecords.Push (); + + record.mListenerHandle = listenerHandle; + record.mUserdata = userdata; + record.mCallbackID = ZLGfxListenerRecord::UNKNOWN; + record.mEvent = 0; + record.mUniformAddr = 0; + + this->mStream->Write < u32 >( idx ); + + return record; +} + +//----------------------------------------------------------------// +ZLGfxRetained::ZLGfxRetained () : + mStream ( &this->mMemStream ), + mBuffer ( 0 ), + mBufferSize ( 0 ), + mBufferTop ( 0 ), + mAllocated ( 0 ), + mMaxAllocated ( 0 ) { +} + +//----------------------------------------------------------------// +ZLGfxRetained::~ZLGfxRetained () { + + if ( this->mBuffer ) { + free ( this->mBuffer ); + } +} diff --git a/src/zl-gfx/ZLGfxRetained.h b/src/zl-gfx/ZLGfxRetained.h new file mode 100644 index 0000000000..48d7d3ffd7 --- /dev/null +++ b/src/zl-gfx/ZLGfxRetained.h @@ -0,0 +1,253 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLGFXRETAINED_H +#define ZLGFXRETAINED_H + +#include +#include +#include +#include +#include +#include + +//================================================================// +// ZLGfxListenerRecord +//================================================================// +class ZLGfxListenerRecord { +private: + + friend class ZLGfxRetained; + + enum { + ON_EVENT, + ON_READ_PIXELS, + ON_UNIFORM_LOCATION, + UNKNOWN, + }; + + ZLGfxListenerHandle* mListenerHandle; + void* mUserdata; + + u32 mCallbackID; + u32 mEvent; + u32 mUniformAddr; + + ZLCopyOnWrite mCopyOnWrite; + +public: + + //----------------------------------------------------------------// + ZLGfxListenerRecord (); + ~ZLGfxListenerRecord (); +}; + +//================================================================// +// ZLGfxRetained +//================================================================// +class ZLGfxRetained : + public ZLGfx, + public ZLGfxListener { +private: + + enum { + ZLGFX_UNKNOWN, + ZLGFX_ACTIVE_TEXTURE, + ZLGFX_ATTACH_SHADER, + ZLGFX_BIND_ATTRIB_LOCATION, + ZLGFX_BIND_BUFFER, + + ZLGFX_BIND_FRAMEBUFFER, + ZLGFX_BIND_RENDERBUFFER, + ZLGFX_BIND_TEXTURE, + ZLGFX_BIND_VERTEX_ARRAY, + ZLGFX_BLEND_FUNC, + + ZLGFX_BLEND_MODE, + ZLGFX_BUFFER_DATA, + ZLGFX_BUFFER_SUB_DATA, + ZLGFX_CHECK_FRAMEBUFFER_STATUS, + ZLGFX_CLEAR, + + ZLGFX_CLEAR_COLOR, + ZLGFX_COLOR, + ZLGFX_COMMENT, + ZLGFX_COMPILE_SHADER, + ZLGFX_COMPRESSED_TEX_IMAGE_2D, + ZLGFX_CREATE, + ZLGFX_CULL_FACE, + + ZLGFX_DELETE, + ZLGFX_DEPTH_FUNC, + ZLGFX_DEPTH_MASK, + ZLGFX_DISABLE, + ZLGFX_DISABLE_CLIENT_STATE, + + ZLGFX_DISABLE_VERTEX_ATTRIB_ARRAY, + ZLGFX_DRAW_ARRAYS, + ZLGFX_DRAW_ELEMENTS, + ZLGFX_ENABLE, + ZLGFX_ENABLE_CLIENT_STATE, + ZLGFX_ENABLE_VERTEX_ATTRIB_ARRAY, + + ZLGFX_EVENT, + + ZLGFX_FLUSH, + ZLGFX_FRAMEBUFFER_RENDERBUFFER, + ZLGFX_FRAMEBUFFER_TEXTURE_2D, + ZLGFX_GET_CURRENT_FRAMEBUFFER, + + ZLGFX_GET_UNIFORM_LOCATION, + ZLGFX_LINE_WIDTH, + ZLGFX_LINK_PROGRAM, + ZLGFX_READ_PIXELS, + ZLGFX_RENDER_BUFFER_STORAGE, + ZLGFX_SCISSOR, + + ZLGFX_SHADER_SOURCE, + ZLGFX_TEX_ENVI, + ZLGFX_TEX_IMAGE_2D, + ZLGFX_TEX_PARAMETERI, + ZLGFX_TEX_SUB_IMAGE_2D, + + ZLGFX_UNIFORM_1F, + ZLGFX_UNIFORM_1I, + ZLGFX_UNIFORM_4FV, + ZLGFX_UNIFORM_MATRIX_3FV, + ZLGFX_UNIFORM_MATRIX_4FV, + + ZLGFX_USE_PROGRAM, + ZLGFX_VERTEX_ATTRIB_POINTER, + ZLGFX_VIEWPORT, + }; + + ZLMemStream mMemStream; + ZLStream* mStream; + + void* mBuffer; + size_t mBufferSize; + size_t mBufferTop; + + size_t mAllocated; + size_t mMaxAllocated; + + ZLLeanStack < ZLRefCountedObject*, 32 > mReleaseStack; + ZLLeanStack < ZLGfxListenerRecord, 32 > mListenerRecords; + + //----------------------------------------------------------------// + ZLGfxHandle* Create ( ZLGfxHandle* handle, u32 param ); + void Delete ( u32 type, u32 glid ); + void OnGfxEvent ( u32 event, void* userdata ); + void OnReadPixels ( const ZLCopyOnWrite& copyOnWrite, void* userdata ); + void OnUniformLocation ( u32 addr, void* userdata ); + void Retain ( ZLRefCountedObject* object ); + ZLGfxListenerRecord& WriteListenerRecord ( ZLGfxListener* listener, void* userdata ); + +public: + + GET ( size_t, Length, this->mStream->GetCursor ()) + + //----------------------------------------------------------------// + void ActiveTexture ( u32 textureUnit ); + void AttachShader ( ZLGfxHandle* program, ZLGfxHandle* shader ); + + void BindAttribLocation ( ZLGfxHandle* program, u32 index, cc8* name ); + + void BindBuffer ( u32 target, ZLGfxHandle* handle ); + void BindFramebuffer ( u32 target, ZLGfxHandle* handle ); + void BindRenderbuffer ( ZLGfxHandle* handle ); + void BindTexture ( ZLGfxHandle* handle ); + void BindVertexArray ( ZLGfxHandle* handle ); + + void BlendFunc ( u32 sourceFactor, u32 destFactor ); + void BlendMode ( u32 mode ); + void BufferData ( u32 target, size_t size, ZLSharedConstBuffer* buffer, size_t offset, u32 usage ); + void BufferSubData ( u32 target, size_t offset, size_t size, ZLSharedConstBuffer* buffer, size_t srcOffset ); + + void CheckFramebufferStatus ( u32 target ); + + void Clear ( u32 mask ); + void ClearColor ( float r, float g, float b, float a ); + void Color ( float r, float g, float b, float a ); + + void Comment ( cc8* comment ); + + void CompileShader ( ZLGfxHandle* shader, bool log ); + void CompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, ZLSharedConstBuffer* buffer ); + + ZLSharedConstBuffer* CopyBuffer ( ZLSharedConstBuffer* buffer ); + + ZLGfxHandle* CreateBuffer (); + ZLGfxHandle* CreateFramebuffer (); + ZLGfxHandle* CreateProgram (); + ZLGfxHandle* CreateRenderbuffer (); + ZLGfxHandle* CreateShader ( u32 shaderType ); + ZLGfxHandle* CreateTexture (); + ZLGfxHandle* CreateVertexArray (); + + void CullFace ( u32 mode ); + + void DepthFunc ( u32 depthFunc ); + void DepthMask ( bool flag ); + void Disable ( u32 cap ); + void DisableClientState ( u32 cap ); + void DisableVertexAttribArray ( u32 index ); + void Draw ( ZLGfx& draw ); + void DrawArrays ( u32 primType, u32 first, u32 count ); + void DrawElements ( u32 primType, u32 count, u32 indexType, ZLSharedConstBuffer* buffer, size_t offset ); + void Enable ( u32 cap ); + void EnableClientState ( u32 cap ); + void EnableVertexAttribArray ( u32 index ); + + void Event ( ZLGfxListener* listener, u32 event, void* userdata ); + + void Flush ( bool finish ); + void FramebufferRenderbuffer ( u32 target, u32 attachment, ZLGfxHandle* renderbuffer ); + void FramebufferTexture2D ( u32 target, u32 attachment, ZLGfxHandle* texture, s32 level ); + + ZLGfxHandle* GetCurrentFramebuffer (); + void GetUniformLocation ( ZLGfxHandle* program, cc8* uniformName, ZLGfxListener* listener, void* userdata ); + + bool HasContent (); + + bool IsImmediate (); + + void LineWidth ( float width ); + + void LinkProgram ( ZLGfxHandle* program, bool log ); + + void PopSection (); + + void PublishEvents (); + void PublishEventsAndReset (); + + bool PushErrorHandler (); + void PushSection (); + bool PushSuccessHandler (); + + void ReadPixels ( s32 x, s32 y, u32 width, u32 height, u32 format, u32 type, u32 pixelSize, ZLGfxListener* listener, void* userdata ); + void RenderbufferStorage ( u32 internalFormat, u32 width, u32 height ); + void Reset (); + + void Scissor ( s32 x, s32 y, u32 w, u32 h ); + + void ShaderSource ( ZLGfxHandle* shader, cc8* source, size_t length ); + + void TexEnvi ( u32 pname, s32 param ); + void TexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ); + void TexParameteri ( u32 pname, s32 param ); + void TexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, ZLSharedConstBuffer* buffer ); + void Uniform1f ( u32 location, float v0 ); + void Uniform1i ( u32 location, s32 v0 ); + void Uniform4fv ( u32 location, u32 count, const float* value ); + void UniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* mtx ); + void UniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* mtx ); + void UseProgram ( ZLGfxHandle* program ); + void VertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, ZLSharedConstBuffer* buffer, size_t offset ); + void Viewport ( s32 x, s32 y, u32 w, u32 h ); + + ZLGfxRetained (); + ~ZLGfxRetained (); +}; + +#endif diff --git a/src/zl-gfx/headers.h b/src/zl-gfx/headers.h index 8a3a57a8fb..1165bff607 100644 --- a/src/zl-gfx/headers.h +++ b/src/zl-gfx/headers.h @@ -1,336 +1,16 @@ // Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. // http://getmoai.com -#ifndef ZL_GFX_H -#define ZL_GFX_H +#ifndef ZL_GFX_HEADERS_H +#define ZL_GFX_HEADERS_H #include -// hardware PVR support is based on device -#ifdef MOAI_OS_IPHONE - #define ZGL_DEVCAPS_PVR_TEXTURE 1 -#else - #define ZGL_DEVCAPS_PVR_TEXTURE 0 -#endif - -//================================================================// -// gfx -//================================================================// - -enum { - - ZGL_BLEND_FACTOR_DST_ALPHA, - ZGL_BLEND_FACTOR_DST_COLOR, - ZGL_BLEND_FACTOR_ONE, - ZGL_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, - ZGL_BLEND_FACTOR_ONE_MINUS_DST_COLOR, - ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, - ZGL_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, - ZGL_BLEND_FACTOR_SRC_ALPHA, - ZGL_BLEND_FACTOR_SRC_ALPHA_SATURATE, - ZGL_BLEND_FACTOR_SRC_COLOR, - ZGL_BLEND_FACTOR_ZERO, - - ZGL_BLEND_MODE_ADD, - ZGL_BLEND_MODE_MAX, - ZGL_BLEND_MODE_MIN, - ZGL_BLEND_MODE_REVERSE_SUBTRACT, - ZGL_BLEND_MODE_SUBTRACT, - - ZGL_BUFFER_TARGET_ARRAY, - ZGL_BUFFER_TARGET_ELEMENT_ARRAY, - - ZGL_BUFFER_USAGE_DYNAMIC_COPY, - ZGL_BUFFER_USAGE_DYNAMIC_DRAW, - ZGL_BUFFER_USAGE_DYNAMIC_READ, - ZGL_BUFFER_USAGE_STATIC_COPY, - ZGL_BUFFER_USAGE_STATIC_DRAW, - ZGL_BUFFER_USAGE_STATIC_READ, - ZGL_BUFFER_USAGE_STREAM_COPY, - ZGL_BUFFER_USAGE_STREAM_DRAW, - ZGL_BUFFER_USAGE_STREAM_READ, - - ZGL_COMPOSE_MODULATE, - - ZGL_CULL_ALL, - ZGL_CULL_BACK, - ZGL_CULL_FRONT, - - ZGL_DEPTH_ALWAYS, - ZGL_DEPTH_EQUAL, - ZGL_DEPTH_LESS, - ZGL_DEPTH_LEQUAL, - ZGL_DEPTH_GEQUAL, - ZGL_DEPTH_GREATER, - ZGL_DEPTH_NEVER, - ZGL_DEPTH_NOTEQUAL, - - ZGL_ERROR_INVALID_ENUM, - ZGL_ERROR_INVALID_OPERATION, - ZGL_ERROR_INVALID_VALUE, - ZGL_ERROR_NONE, - ZGL_ERROR_OUT_OF_MEMORY, - ZGL_ERROR_STACK_OVERFLOW, - ZGL_ERROR_STACK_UNDERFLOW, - - ZGL_ERROR_UNKNOWN, - - ZGL_FRAMEBUFFER_ATTACHMENT_COLOR, - ZGL_FRAMEBUFFER_ATTACHMENT_DEPTH, - ZGL_FRAMEBUFFER_ATTACHMENT_STENCIL, - - ZGL_FRAMEBUFFER_STATUS_COMPLETE, - - ZGL_FRAMEBUFFER_TARGET_DRAW, - ZGL_FRAMEBUFFER_TARGET_READ, - ZGL_FRAMEBUFFER_TARGET_DRAW_READ, - - ZGL_MATRIX_COLOR, - ZGL_MATRIX_MODELVIEW, - ZGL_MATRIX_PROJECTION, - ZGL_MATRIX_TEXTURE, - - ZGL_PIPELINE_BLEND, - ZGL_PIPELINE_COLOR_ARRAY, - ZGL_PIPELINE_CULL, - ZGL_PIPELINE_DEPTH, - ZGL_PIPELINE_NORMAL_ARRAY, - ZGL_PIPELINE_SCISSOR, - ZGL_PIPELINE_TEXTURE_2D, - ZGL_PIPELINE_TEXTURE_COORD_ARRAY, - ZGL_PIPELINE_VERTEX_ARRAY, - - ZGL_PIXEL_FORMAT_ALPHA, - ZGL_PIXEL_FORMAT_LUMINANCE, - ZGL_PIXEL_FORMAT_LUMINANCE_ALPHA, - ZGL_PIXEL_FORMAT_RED, - ZGL_PIXEL_FORMAT_RG, - ZGL_PIXEL_FORMAT_RGB, - ZGL_PIXEL_FORMAT_RGB4, - ZGL_PIXEL_FORMAT_RGB5_A1, - ZGL_PIXEL_FORMAT_RGB565, - ZGL_PIXEL_FORMAT_RGB8, - ZGL_PIXEL_FORMAT_BGR, - ZGL_PIXEL_FORMAT_RGBA, - ZGL_PIXEL_FORMAT_RGBA4, - ZGL_PIXEL_FORMAT_RGBA8, - ZGL_PIXEL_FORMAT_BGRA, - - ZGL_PIXEL_FORMAT_DEPTH_COMPONENT16, - ZGL_PIXEL_FORMAT_STENCIL_INDEX8, - - ZGL_PIXEL_TYPE_BYTE, - ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, - ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, - ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG, - ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, - ZGL_PIXEL_TYPE_FLOAT, - ZGL_PIXEL_TYPE_INT, - ZGL_PIXEL_TYPE_SHORT, - ZGL_PIXEL_TYPE_UNSIGNED_BYTE, - ZGL_PIXEL_TYPE_UNSIGNED_BYTE_2_3_3_REV, - ZGL_PIXEL_TYPE_UNSIGNED_BYTE_3_3_2, - ZGL_PIXEL_TYPE_UNSIGNED_INT, - ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8, - ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8_REV, - ZGL_PIXEL_TYPE_UNSIGNED_INT_2_10_10_10_REV, - ZGL_PIXEL_TYPE_UNSIGNED_INT_10_10_10_2, - ZGL_PIXEL_TYPE_UNSIGNED_SHORT, - ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5, - ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5_REV, - ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4, - ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4_REV, - ZGL_PIXEL_TYPE_UNSIGNED_SHORT_1_5_5_5_REV, - ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_5_5_1, - - ZGL_PRIM_LINE_LOOP, - ZGL_PRIM_LINE_STRIP, - ZGL_PRIM_LINES, - ZGL_PRIM_POINTS, - ZGL_PRIM_TRIANGLE_FAN, - ZGL_PRIM_TRIANGLE_STRIP, - ZGL_PRIM_TRIANGLES, - - ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTES, - ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTE_MAX_LENGTH, - ZGL_PROGRAM_INFO_ACTIVE_UNIFORMS, - ZGL_PROGRAM_INFO_ACTIVE_UNIFORM_MAX_LENGTH, - ZGL_PROGRAM_INFO_ATTACHED_SHADERS, - ZGL_PROGRAM_INFO_DELETE_STATUS, - ZGL_PROGRAM_INFO_LOG_LENGTH, - ZGL_PROGRAM_INFO_LINK_STATUS, - ZGL_PROGRAM_INFO_VALIDATE_STATUS, - - ZGL_SAMPLE_LINEAR, - ZGL_SAMPLE_LINEAR_MIPMAP_LINEAR, - ZGL_SAMPLE_LINEAR_MIPMAP_NEAREST, - ZGL_SAMPLE_NEAREST, - ZGL_SAMPLE_NEAREST_MIPMAP_LINEAR, - ZGL_SAMPLE_NEAREST_MIPMAP_NEAREST, - - ZGL_SHADER_INFO_COMPILE_STATUS, - ZGL_SHADER_INFO_DELETE_STATUS, - ZGL_SHADER_INFO_LOG_LENGTH, - ZGL_SHADER_INFO_SOURCE_LENGTH, - ZGL_SHADER_INFO_TYPE, - - ZGL_SHADER_TYPE_TESS_CONTROL, - ZGL_SHADER_TYPE_TESS_EVALUATION, - ZGL_SHADER_TYPE_FRAGMENT, - ZGL_SHADER_TYPE_GEOMETRY, - ZGL_SHADER_TYPE_VERTEX, - - ZGL_STRING_VENDOR, - ZGL_STRING_VERSION, - ZGL_STRING_RENDERER, - ZGL_STRING_SHADING_LANGUAGE_VERSION, - - ZGL_TEXTURE_BASE_LEVEL, - ZGL_TEXTURE_COMPARE_FUNC, - ZGL_TEXTURE_COMPARE_MODE, - //ZGL_TEXTURE_DEPTH_STENCIL_MODE, - ZGL_TEXTURE_ENV_MODE, - ZGL_TEXTURE_LOD_BIAS, - ZGL_TEXTURE_MAG_FILTER, - ZGL_TEXTURE_MIN_FILTER, - ZGL_TEXTURE_MAX_LEVEL, - ZGL_TEXTURE_MAX_LOD, - ZGL_TEXTURE_MIN_LOD, - ZGL_TEXTURE_SWIZZLE_A, - ZGL_TEXTURE_SWIZZLE_B, - ZGL_TEXTURE_SWIZZLE_G, - ZGL_TEXTURE_SWIZZLE_R, - ZGL_TEXTURE_WRAP_R, - ZGL_TEXTURE_WRAP_S, - ZGL_TEXTURE_WRAP_T, - - ZGL_TYPE_BYTE, - ZGL_TYPE_DOUBLE, - ZGL_TYPE_FLOAT, - ZGL_TYPE_INT, - ZGL_TYPE_SHORT, - ZGL_TYPE_UNSIGNED_BYTE, - ZGL_TYPE_UNSIGNED_INT, - ZGL_TYPE_UNSIGNED_SHORT, - - ZGL_WRAP_MODE_CLAMP, - ZGL_WRAP_MODE_REPEAT, -}; - -enum { - ZGL_CAPS_MAX_TEXTURE_SIZE, - ZGL_CAPS_MAX_TEXTURE_UNITS, -}; - -enum { - ZGL_CLEAR_COLOR_BUFFER_BIT = 0x01, - ZGL_CLEAR_DEPTH_BUFFER_BIT = 0x02, - ZGL_CLEAR_STENCIL_BUFFER_BIT = 0x04, -}; - -#define ZGL_INVALID_UNIFORM_ADDR (( u32 )-1 ) - -//----------------------------------------------------------------// -extern u32 zglMapFromGLEnum( u32 glEnum ); // don't do this; this should be local to the OpenGL implementation - -extern void zglBegin (); -extern void zglEnd (); -extern void zglFinalize (); -extern void zglInitialize (); - -//----------------------------------------------------------------// -extern void zglActiveTexture ( u32 textureUnit ); -extern void zglBlendFunc ( u32 sourceFactor, u32 destFactor ); -extern void zglBlendMode ( u32 mode ); -extern void zglClear ( u32 mask ); -extern void zglClearColor ( float r, float g, float b, float a ); -extern void zglColor ( float r, float g, float b, float a ); -extern void zglCullFace ( u32 mode ); -extern void zglDeleteBuffer ( u32 buffer ); -extern void zglDeleteFramebuffer ( u32 buffer ); -extern void zglDeleteProgram ( u32 program ); -extern void zglDeleteRenderbuffer ( u32 buffer ); -extern void zglDeleteShader ( u32 shader ); -extern void zglDeleteTexture ( u32 texture ); -extern void zglDepthFunc ( u32 depthFunc ); -extern void zglDepthMask ( bool flag ); -extern void zglDisable ( u32 cap ); -extern void zglDrawArrays ( u32 primType, u32 first, u32 count ); -extern void zglDrawElements ( u32 primType, u32 count, u32 indexType, const void* indices ); -extern void zglEnable ( u32 cap ); -extern void zglFlush (); -extern u32 zglGetCap ( u32 cap ); -extern u32 zglGetError (); -extern cc8* zglGetErrorString ( u32 error ); -extern cc8* zglGetString ( u32 stringID ); -extern void zglLineWidth ( float width ); -extern void zglReadPixels ( s32 x, s32 y, u32 width, u32 height, void* data ); -extern void zglScissor ( s32 x, s32 y, u32 w, u32 h ); -extern void zglViewport ( s32 x, s32 y, u32 w, u32 h ); - -//----------------------------------------------------------------// -extern void zglColorPointer ( u32 size, u32 type, u32 stride, const void* pointer ); -extern void zglDisableClientState ( u32 cap ); -extern void zglDisableVertexAttribArray ( u32 index ); -extern void zglNormalPointer ( u32 type, u32 stride, const void* pointer ); -extern void zglTexCoordPointer ( u32 size, u32 type, u32 stride, const void* pointer ); -extern void zglVertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, const void* pointer ); -extern void zglVertexPointer ( u32 size, u32 type, u32 stride, const void* pointer ); -extern void zglEnableClientState ( u32 cap ); -extern void zglEnableVertexAttribArray ( u32 index ); - -//----------------------------------------------------------------// -extern void zglAttachShader ( u32 program, u32 shader ); -extern void zglBindAttribLocation ( u32 program, u32 index, cc8* name ); -extern void zglCompileShader ( u32 shader ); -extern u32 zglCreateProgram (); -extern u32 zglCreateShader ( u32 shaderType ); -extern void zglGetProgramInfoLog ( u32 program, u32 maxLength, u32* length, char* log ); -extern void zglGetProgramiv ( u32 program, u32 name, s32* params ); -extern void zglGetShaderInfoLog ( u32 shader, u32 maxLength, u32* length, char* log ); -extern void zglGetShaderiv ( u32 shader, u32 name, s32* params ); -extern u32 zglGetUniformLocation ( u32 program, cc8* name ); -extern void zglLinkProgram ( u32 program ); -extern void zglShaderSource ( u32 shader, u32 count, const char** string, const s32* length ); -extern void zglValidateProgram ( u32 program ); -extern void zglUniform1f ( u32 location, float v0 ); -extern void zglUniform1i ( u32 location, s32 v0 ); -extern void zglUniform4fv ( u32 location, u32 count, const float* value ); -extern void zglUniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* value ); -extern void zglUniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* value ); -extern void zglUseProgram ( u32 program ); - -//----------------------------------------------------------------// -extern void zglBindTexture ( u32 texID ); -extern void zglCompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, const void* data ); -extern u32 zglCreateTexture (); -extern void zglTexEnvi ( u32 pname, s32 param ); -extern void zglTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, const void* data ); -extern void zglTexParameteri ( u32 pname, s32 param ); -extern void zglTexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, const void* data ); - -//----------------------------------------------------------------// -extern void zglBindFramebuffer ( u32 target, u32 frameBuffer ); -extern void zglBindRenderbuffer ( u32 renderbuffer ); -extern u32 zglCheckFramebufferStatus ( u32 target ); -extern u32 zglCreateFramebuffer (); -extern u32 zglCreateRenderbuffer (); -extern void zglFramebufferRenderbuffer ( u32 target, u32 attachment, u32 renderbuffer ); -extern void zglFramebufferTexture2D ( u32 target, u32 attachment, u32 texture, s32 level ); -extern u32 zglGetCurrentFramebuffer (); -extern void zglRenderbufferStorage ( u32 internalFormat, u32 width, u32 height ); - -//----------------------------------------------------------------// -extern void zglBindBuffer ( u32 target, u32 buffer ); -extern void zglBufferData ( u32 target, u32 size, const void* data, u32 usage ); -extern void zglBufferSubData ( u32 target, u32 offset, u32 size, const void* data ); -extern u32 zglCreateBuffer (); -extern void* zglMapBuffer ( u32 target ); -extern void zglUnmapBuffer ( u32 target ); - -//----------------------------------------------------------------// -extern void zglBindVertexArray ( u32 vertexArrayID ); -extern u32 zglCreateVertexArray (); -extern void zglDeleteVertexArray ( u32 vertexArrayID ); +#include +#include +#include +#include +#include +#include #endif diff --git a/src/zl-gfx/zl_gfx.h b/src/zl-gfx/zl_gfx.h new file mode 100644 index 0000000000..18fe49d180 --- /dev/null +++ b/src/zl-gfx/zl_gfx.h @@ -0,0 +1,110 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZL_GFX_H +#define ZL_GFX_H + +#include + +//================================================================// +// gfx +//================================================================// + +//----------------------------------------------------------------// +//extern void zglBegin (); +//extern void zglEnd (); +//extern void zglFinalize (); +//extern void zglInitialize (); + +//----------------------------------------------------------------// +//extern void zglActiveTexture ( u32 textureUnit ); +//extern void zglBlendFunc ( u32 sourceFactor, u32 destFactor ); +//extern void zglBlendMode ( u32 mode ); +//extern void zglClear ( u32 mask ); +//extern void zglClearColor ( float r, float g, float b, float a ); +//extern void zglColor ( float r, float g, float b, float a ); +//extern void zglCullFace ( u32 mode ); +//extern void zglDeleteBuffer ( u32 buffer ); +//extern void zglDeleteFramebuffer ( u32 buffer ); +//extern void zglDeleteProgram ( u32 program ); +//extern void zglDeleteRenderbuffer ( u32 buffer ); +//extern void zglDeleteShader ( u32 shader ); +//extern void zglDeleteTexture ( u32 texture ); +//extern void zglDepthFunc ( u32 depthFunc ); +//extern void zglDepthMask ( bool flag ); +//extern void zglDisable ( u32 cap ); +//extern void zglDrawArrays ( u32 primType, u32 first, u32 count ); +//extern void zglDrawElements ( u32 primType, u32 count, u32 indexType, const void* indices ); +//extern void zglEnable ( u32 cap ); +//extern void zglFlush (); +//extern u32 zglGetCap ( u32 cap ); +//extern u32 zglGetError (); +//extern cc8* zglGetErrorString ( u32 error ); +//extern cc8* zglGetString ( u32 stringID ); +//extern void zglLineWidth ( float width ); +//extern void zglReadPixels ( s32 x, s32 y, u32 width, u32 height, void* data ); +//extern void zglScissor ( s32 x, s32 y, u32 w, u32 h ); +//extern void zglViewport ( s32 x, s32 y, u32 w, u32 h ); + +//----------------------------------------------------------------// +//extern void zglDisableClientState ( u32 cap ); +//extern void zglDisableVertexAttribArray ( u32 index ); +//extern void zglVertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, const void* pointer ); +//extern void zglEnableClientState ( u32 cap ); +//extern void zglEnableVertexAttribArray ( u32 index ); + +//----------------------------------------------------------------// +//extern void zglAttachShader ( u32 program, u32 shader ); +//extern void zglBindAttribLocation ( u32 program, u32 index, cc8* name ); +//extern void zglCompileShader ( u32 shader ); +//extern u32 zglCreateProgram (); +//extern u32 zglCreateShader ( u32 shaderType ); +//extern void zglGetProgramInfoLog ( u32 program, u32 maxLength, u32* length, char* log ); +//extern void zglGetProgramiv ( u32 program, u32 name, s32* params ); +//extern void zglGetShaderInfoLog ( u32 shader, u32 maxLength, u32* length, char* log ); +//extern void zglGetShaderiv ( u32 shader, u32 name, s32* params ); +//extern u32 zglGetUniformLocation ( u32 program, cc8* name ); +//extern void zglLinkProgram ( u32 program ); +//extern void zglShaderSource ( u32 shader, u32 count, const char** string, const s32* length ); +//extern void zglValidateProgram ( u32 program ); +//extern void zglUniform1f ( u32 location, float v0 ); +//extern void zglUniform1i ( u32 location, s32 v0 ); +//extern void zglUniform4fv ( u32 location, u32 count, const float* value ); +//extern void zglUniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* value ); +//extern void zglUniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* value ); +//extern void zglUseProgram ( u32 program ); + +//----------------------------------------------------------------// +//extern void zglBindTexture ( u32 texID ); +//extern void zglCompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, const void* data ); +//extern u32 zglCreateTexture (); +//extern void zglTexEnvi ( u32 pname, s32 param ); +//extern void zglTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, const void* data ); +//extern void zglTexParameteri ( u32 pname, s32 param ); +//extern void zglTexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, const void* data ); + +//----------------------------------------------------------------// +//extern void zglBindFramebuffer ( u32 target, u32 frameBuffer ); +//extern void zglBindRenderbuffer ( u32 renderbuffer ); +//extern u32 zglCheckFramebufferStatus ( u32 target ); +//extern u32 zglCreateFramebuffer (); +//extern u32 zglCreateRenderbuffer (); +//extern void zglFramebufferRenderbuffer ( u32 target, u32 attachment, u32 renderbuffer ); +//extern void zglFramebufferTexture2D ( u32 target, u32 attachment, u32 texture, s32 level ); +//extern u32 zglGetCurrentFramebuffer (); +//extern void zglRenderbufferStorage ( u32 internalFormat, u32 width, u32 height ); + +//----------------------------------------------------------------// +//extern void zglBindBuffer ( u32 target, u32 buffer ); +//extern void zglBufferData ( u32 target, u32 size, const void* data, u32 usage ); +//extern void zglBufferSubData ( u32 target, u32 offset, u32 size, const void* data ); +//extern u32 zglCreateBuffer (); +//extern void* zglMapBuffer ( u32 target ); +//extern void zglUnmapBuffer ( u32 target ); + +//----------------------------------------------------------------// +//extern void zglBindVertexArray ( u32 vertexArrayID ); +//extern u32 zglCreateVertexArray (); +//extern void zglDeleteVertexArray ( u32 vertexArrayID ); + +#endif diff --git a/src/zl-gfx/zl_gfx_dummy.cpp b/src/zl-gfx/zl_gfx_dummy.cpp deleted file mode 100644 index 344a92abdc..0000000000 --- a/src/zl-gfx/zl_gfx_dummy.cpp +++ /dev/null @@ -1,600 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" -#include - -SUPPRESS_EMPTY_FILE_WARNING -#if MOAI_GFX_DUMMY - -//================================================================// -// enums -//================================================================// - -//----------------------------------------------------------------// -u32 zglMapFromGLEnum( u32 glEnum ) { - UNUSED ( glEnum ); - return 0; -} - -//================================================================// -// setup -//================================================================// - -//----------------------------------------------------------------// -void zglBegin () { -} - -//----------------------------------------------------------------// -void zglEnd () { -} - -//----------------------------------------------------------------// -void zglFinalize () { -} - -//----------------------------------------------------------------// -void zglInitialize () { -} - -//================================================================// -// gfx -//================================================================// - -//----------------------------------------------------------------// -void zglActiveTexture ( u32 textureUnit ) { - UNUSED ( textureUnit ); -} - -//----------------------------------------------------------------// -void zglBlendFunc ( u32 sourceFactor, u32 destFactor ) { - UNUSED ( sourceFactor ); - UNUSED ( destFactor ); -} - -//----------------------------------------------------------------// -void zglBlendMode ( u32 mode ) { - UNUSED ( mode ); -} - -//----------------------------------------------------------------// -void zglClear ( u32 mask ) { - UNUSED ( mask ); -} - -//----------------------------------------------------------------// -void zglClearColor ( float r, float g, float b, float a ) { - UNUSED ( r ); - UNUSED ( g ); - UNUSED ( b ); - UNUSED ( a ); -} - -//----------------------------------------------------------------// -void zglColor ( float r, float g, float b, float a ) { - UNUSED ( r ); - UNUSED ( g ); - UNUSED ( b ); - UNUSED ( a ); -} - -//----------------------------------------------------------------// -void zglCullFace ( u32 mode ) { - UNUSED ( mode ); -} - -//----------------------------------------------------------------// -void zglDeleteBuffer ( u32 buffer ) { - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglDeleteFramebuffer ( u32 buffer ) { - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglDeleteProgram ( u32 program ) { - UNUSED ( program ); -} - -//----------------------------------------------------------------// -void zglDeleteRenderbuffer ( u32 buffer ) { - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglDeleteShader ( u32 shader ) { - UNUSED ( shader ); -} - -//----------------------------------------------------------------// -void zglDeleteTexture ( u32 texture ) { - UNUSED ( texture ); -} - -//----------------------------------------------------------------// -void zglDepthFunc ( u32 depthFunc ) { - UNUSED ( depthFunc ); -} - -//----------------------------------------------------------------// -void zglDepthMask ( bool flag ) { - UNUSED ( flag ); -} - -//----------------------------------------------------------------// -void zglDisable ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglDrawArrays ( u32 primType, u32 first, u32 count ) { - UNUSED ( primType ); - UNUSED ( first ); - UNUSED ( count ); -} - -//----------------------------------------------------------------// -void zglDrawElements ( u32 primType, u32 count, u32 indexType, const void* indices ) { - UNUSED ( primType ); - UNUSED ( count ); - UNUSED ( indexType ); - UNUSED ( indices ); -} - -//----------------------------------------------------------------// -void zglEnable ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglFlush () { -} - -//----------------------------------------------------------------// -u32 zglGetCap ( u32 cap ) { - return 0; -} - -//----------------------------------------------------------------// -u32 zglGetError () { - return 0; -} - -//----------------------------------------------------------------// -cc8* zglGetErrorString ( u32 error ) { - UNUSED ( error ); - return ""; -} - -//----------------------------------------------------------------// -void zglGetIntegerv ( u32 name, s32* params ) { - UNUSED ( name ); - UNUSED ( params ); -} - -//----------------------------------------------------------------// -extern cc8* zglGetString ( u32 stringID ) { - UNUSED ( stringID ); - return ""; -} - -//----------------------------------------------------------------// -void zglLineWidth ( float width ) { - UNUSED ( width ); -} - -//----------------------------------------------------------------// -void zglLoadIdentity () { -} - -//----------------------------------------------------------------// -void zglLoadMatrix ( const float* matrix ) { - UNUSED ( matrix ); -} - -//----------------------------------------------------------------// -void zglMatrixMode ( u32 mode ) { - UNUSED ( mode ); -} - -//----------------------------------------------------------------// -void zglMultMatrix ( const float* matrix ) { - UNUSED ( matrix ); -} - -//----------------------------------------------------------------// -void zglPointSize ( float size ) { - UNUSED ( size ); -} - -//----------------------------------------------------------------// -void zglReadPixels ( s32 x, s32 y, u32 width, u32 height, void* data ) { - UNUSED ( x ); - UNUSED ( y ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( data ); -} - -//----------------------------------------------------------------// -void zglScissor ( s32 x, s32 y, u32 w, u32 h ) { - UNUSED ( x ); - UNUSED ( y ); - UNUSED ( w ); - UNUSED ( h ); -} - -//----------------------------------------------------------------// -void zglViewport ( s32 x, s32 y, u32 w, u32 h ) { - UNUSED ( x ); - UNUSED ( y ); - UNUSED ( w ); - UNUSED ( h ); -} - -//================================================================// -// vertex format -//================================================================// - -//----------------------------------------------------------------// -void zglColorPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglDisableClientState ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglDisableVertexAttribArray ( u32 index ) { - UNUSED ( index ); -} - -//----------------------------------------------------------------// -void zglNormalPointer ( u32 type, u32 stride, const void* pointer ) { - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglTexCoordPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglVertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, const void* pointer ) { - UNUSED ( index ); - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( normalized ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglVertexPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglEnableClientState ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglEnableVertexAttribArray ( u32 index ) { - UNUSED ( index ); -} - -//================================================================// -// shaders -//================================================================// - -//----------------------------------------------------------------// -void zglAttachShader ( u32 program, u32 shader ) { - UNUSED ( program ); - UNUSED ( shader ); -} - -//----------------------------------------------------------------// -void zglBindAttribLocation ( u32 program, u32 index, cc8* name ) { - UNUSED ( program ); - UNUSED ( index ); - UNUSED ( name ); -} - -//----------------------------------------------------------------// -void zglCompileShader ( u32 shader ) { - UNUSED ( shader ); -} - -//----------------------------------------------------------------// -u32 zglCreateProgram () { - return 0; -} - -//----------------------------------------------------------------// -u32 zglCreateShader ( u32 shaderType ) { - UNUSED ( shaderType ); - return 0; -} - -//----------------------------------------------------------------// -void zglGetProgramInfoLog ( u32 program, u32 maxLength, u32* length, char* log ) { - UNUSED ( program ); - UNUSED ( maxLength ); - UNUSED ( length ); - UNUSED ( log ); -} - -//----------------------------------------------------------------// -void zglGetProgramiv ( u32 program, u32 name, s32* params ) { - UNUSED ( program ); - UNUSED ( name ); - UNUSED ( params ); -} - -//----------------------------------------------------------------// -void zglGetShaderInfoLog ( u32 shader, u32 maxLength, u32* length, char* log ) { - UNUSED ( shader ); - UNUSED ( maxLength ); - UNUSED ( length ); - UNUSED ( log ); -} - -//----------------------------------------------------------------// -void zglGetShaderiv ( u32 shader, u32 name, s32* params ) { - UNUSED ( shader ); - UNUSED ( name ); - UNUSED ( params ); -} - -//----------------------------------------------------------------// -u32 zglGetUniformLocation ( u32 program, cc8* name ) { - UNUSED ( program ); - UNUSED ( name ); - return 0; -} - -//----------------------------------------------------------------// -void zglLinkProgram ( u32 program ) { - UNUSED ( program ); -} - -//----------------------------------------------------------------// -void zglShaderSource ( u32 shader, u32 count, const char** string, const s32* length ) { - UNUSED ( shader ); - UNUSED ( count ); - UNUSED ( string ); - UNUSED ( length ); -} - -//----------------------------------------------------------------// -void zglValidateProgram ( u32 program ) { - UNUSED ( program ); -} - -//----------------------------------------------------------------// -void zglUniform1f ( u32 location, float v0 ) { - UNUSED ( location ); - UNUSED ( v0 ); -} - -//----------------------------------------------------------------// -void zglUniform1i ( u32 location, s32 v0 ) { - UNUSED ( location ); - UNUSED ( v0 ); -} - -//----------------------------------------------------------------// -void zglUniform4fv ( u32 location, u32 count, const float* value ) { - UNUSED ( location ); - UNUSED ( count ); - UNUSED ( value ); -} - -//----------------------------------------------------------------// -void zglUniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* value ) { - UNUSED ( location ); - UNUSED ( count ); - UNUSED ( transpose ); - UNUSED ( value ); -} - -//----------------------------------------------------------------// -void zglUniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* value ) { - UNUSED ( location ); - UNUSED ( count ); - UNUSED ( transpose ); - UNUSED ( value ); -} - -//----------------------------------------------------------------// -void zglUseProgram ( u32 program ) { - UNUSED ( program ); -} - -//================================================================// -// texture -//================================================================// - -//----------------------------------------------------------------// -void zglBindTexture ( u32 texID ) { - UNUSED ( texID ); -} - -//----------------------------------------------------------------// -void zglCompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, const void* data ) { - - UNUSED ( level ); - UNUSED ( internalFormat ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( imageSize ); - UNUSED ( data ); -} - -//----------------------------------------------------------------// -u32 zglCreateTexture () { - return 0; -} - -//----------------------------------------------------------------// -void zglTexEnvi ( u32 pname, s32 param ) { - UNUSED ( pname ); - UNUSED ( param ); -} - -//----------------------------------------------------------------// -void zglTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, const void* data ) { - UNUSED ( level ); - UNUSED ( internalFormat ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( format ); - UNUSED ( type ); - UNUSED ( data ); -} - -//----------------------------------------------------------------// -void zglTexParameteri ( u32 pname, s32 param ) { - UNUSED ( pname ); - UNUSED ( param ); -} - -//----------------------------------------------------------------// -void zglTexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, const void* data ) { - UNUSED ( level ); - UNUSED ( xOffset ); - UNUSED ( yOffset ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( format ); - UNUSED ( type ); - UNUSED ( data ); -} - -//================================================================// -// framebuffer -//================================================================// - -//----------------------------------------------------------------// -void zglBindFramebuffer ( u32 target, u32 frameBuffer ) { - UNUSED ( target ); - UNUSED ( frameBuffer ); -} - -//----------------------------------------------------------------// -void zglBindRenderbuffer ( u32 renderbuffer ) { - UNUSED ( renderbuffer ); -} - -//----------------------------------------------------------------// -u32 zglCheckFramebufferStatus ( u32 target ) { - UNUSED ( target ); - return 0; -} - -//----------------------------------------------------------------// -u32 zglCreateFramebuffer () { - return 0; -} - -//----------------------------------------------------------------// -u32 zglCreateRenderbuffer () { - return 0; -} - -//----------------------------------------------------------------// -void zglFramebufferRenderbuffer ( u32 target, u32 attachment, u32 renderbuffer ) { - UNUSED ( target ); - UNUSED ( attachment ); - UNUSED ( renderbuffer ); -} - -//----------------------------------------------------------------// -void zglFramebufferTexture2D ( u32 target, u32 attachment, u32 texture, s32 level ) { - UNUSED ( target ); - UNUSED ( attachment ); - UNUSED ( texture ); - UNUSED ( level ); -} - -//----------------------------------------------------------------// -u32 zglGetCurrentFramebuffer () { - - return 0; -} - -//----------------------------------------------------------------// -void zglRenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) { - UNUSED ( internalFormat ); - UNUSED ( width ); - UNUSED ( height ); -} - -//================================================================// -// buffer -//================================================================// - -//----------------------------------------------------------------// -void zglBindBuffer ( u32 target, u32 buffer ) { - UNUSED ( target ); - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglBufferData ( u32 target, u32 size, const void* data, u32 usage ) { - UNUSED ( target ); - UNUSED ( size ); - UNUSED ( data ); - UNUSED ( usage ); -} - -//----------------------------------------------------------------// -u32 zglCreateBuffer () { - return 0; -} - -//----------------------------------------------------------------// -void* zglMapBuffer ( u32 target ) { - UNUSED ( target ); -} - -//----------------------------------------------------------------// -void zglUnmapBuffer ( u32 target ) { - UNUSED ( target ); -} - -//================================================================// -// vertex array -//================================================================// - -//----------------------------------------------------------------// -void zglBindVertexArray ( u32 vertexArrayID ) { - UNUSED ( vertexArrayID ); -} - -//----------------------------------------------------------------// -u32 zglCreateVertexArray () { -} - -//----------------------------------------------------------------// -void zglDeleteVertexArray ( u32 vertexArrayID ) { - UNUSED ( vertexArrayID ); -} - -#endif diff --git a/src/zl-gfx/zl_gfx_flascc.cpp b/src/zl-gfx/zl_gfx_flascc.cpp deleted file mode 100644 index 652cefd609..0000000000 --- a/src/zl-gfx/zl_gfx_flascc.cpp +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include "pch.h" -#include - -SUPPRESS_EMPTY_FILE_WARNING -#if MOAI_GFX_FLASCC - -//================================================================// -// setup -//================================================================// - -//----------------------------------------------------------------// -void zglBegin () { -} - -//----------------------------------------------------------------// -void zglEnd () { -} - -//----------------------------------------------------------------// -void zglFinalize () { -} - -//----------------------------------------------------------------// -void zglInitialize () { -} - -//================================================================// -// gfx -//================================================================// - -//----------------------------------------------------------------// -void zglActiveTexture ( u32 textureUnit ) { - UNUSED ( textureUnit ); -} - -//----------------------------------------------------------------// -void zglBlendFunc ( u32 sourceFactor, u32 destFactor ) { - UNUSED ( sourceFactor ); - UNUSED ( destFactor ); -} - -//----------------------------------------------------------------// -void zglBlendMode ( u32 mode ) { - UNUSED ( mode ); -} - -//----------------------------------------------------------------// -void zglClear ( u32 mask ) { - UNUSED ( mask ); -} - -//----------------------------------------------------------------// -void zglClearColor ( float r, float g, float b, float a ) { - UNUSED ( r ); - UNUSED ( g ); - UNUSED ( b ); - UNUSED ( a ); -} - -//----------------------------------------------------------------// -void zglColor ( float r, float g, float b, float a ) { - UNUSED ( r ); - UNUSED ( g ); - UNUSED ( b ); - UNUSED ( a ); -} - -//----------------------------------------------------------------// -void zglCullFace ( u32 mode ) { - UNUSED ( mode ); -} - -//----------------------------------------------------------------// -void zglDeleteBuffer ( u32 buffer ) { - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglDeleteFramebuffer ( u32 buffer ) { - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglDeleteProgram ( u32 program ) { - UNUSED ( program ); -} - -//----------------------------------------------------------------// -void zglDeleteRenderbuffer ( u32 buffer ) { - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglDeleteShader ( u32 shader ) { - UNUSED ( shader ); -} - -//----------------------------------------------------------------// -void zglDeleteTexture ( u32 texture ) { - UNUSED ( texture ); -} - -//----------------------------------------------------------------// -void zglDepthFunc ( u32 depthFunc ) { - UNUSED ( depthFunc ); -} - -//----------------------------------------------------------------// -void zglDepthMask ( bool flag ) { - UNUSED ( flag ); -} - -//----------------------------------------------------------------// -void zglDisable ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglDrawArrays ( u32 primType, u32 first, u32 count ) { - UNUSED ( primType ); - UNUSED ( first ); - UNUSED ( count ); -} - -//----------------------------------------------------------------// -void zglDrawElements ( u32 primType, u32 count, u32 indexType, const void* indices ) { - UNUSED ( primType ); - UNUSED ( count ); - UNUSED ( indexType ); - UNUSED ( indices ); -} - -//----------------------------------------------------------------// -void zglEnable ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglFlush () { -} - -//----------------------------------------------------------------// -u32 zglGetError () { - return 0; -} - -//----------------------------------------------------------------// -cc8* zglGetErrorString ( u32 error ) { - UNUSED ( error ); - return ""; -} - -//----------------------------------------------------------------// -void zglGetIntegerv ( u32 name, s32* params ) { - UNUSED ( name ); - UNUSED ( params ); -} - -//----------------------------------------------------------------// -extern cc8* zglGetString ( u32 stringID ) { - UNUSED ( stringID ); - return ""; -} - -//----------------------------------------------------------------// -void zglLineWidth ( float width ) { - UNUSED ( width ); -} - -//----------------------------------------------------------------// -void zglLoadIdentity () { -} - -//----------------------------------------------------------------// -void zglLoadMatrix ( const float* matrix ) { - UNUSED ( matrix ); -} - -//----------------------------------------------------------------// -void zglMatrixMode ( u32 mode ) { - UNUSED ( mode ); -} - -//----------------------------------------------------------------// -void zglMultMatrix ( const float* matrix ) { - UNUSED ( matrix ); -} - -//----------------------------------------------------------------// -void zglPointSize ( float size ) { - UNUSED ( size ); -} - -//----------------------------------------------------------------// -void zglReadPixels ( s32 x, s32 y, u32 width, u32 height, void* data ) { - UNUSED ( x ); - UNUSED ( y ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( data ); -} - -//----------------------------------------------------------------// -void zglScissor ( s32 x, s32 y, u32 w, u32 h ) { - UNUSED ( x ); - UNUSED ( y ); - UNUSED ( w ); - UNUSED ( h ); -} - -//----------------------------------------------------------------// -void zglViewport ( s32 x, s32 y, u32 w, u32 h ) { - UNUSED ( x ); - UNUSED ( y ); - UNUSED ( w ); - UNUSED ( h ); -} - -//================================================================// -// vertex format -//================================================================// - -//----------------------------------------------------------------// -void zglColorPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglDisableClientState ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglDisableVertexAttribArray ( u32 index ) { - UNUSED ( index ); -} - -//----------------------------------------------------------------// -void zglNormalPointer ( u32 type, u32 stride, const void* pointer ) { - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglTexCoordPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglVertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, const void* pointer ) { - UNUSED ( index ); - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( normalized ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglVertexPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - UNUSED ( size ); - UNUSED ( type ); - UNUSED ( stride ); - UNUSED ( pointer ); -} - -//----------------------------------------------------------------// -void zglEnableClientState ( u32 cap ) { - UNUSED ( cap ); -} - -//----------------------------------------------------------------// -void zglEnableVertexAttribArray ( u32 index ) { - UNUSED ( index ); -} - -//================================================================// -// shaders -//================================================================// - -//----------------------------------------------------------------// -void zglAttachShader ( u32 program, u32 shader ) { - UNUSED ( program ); - UNUSED ( shader ); -} - -//----------------------------------------------------------------// -void zglBindAttribLocation ( u32 program, u32 index, cc8* name ) { - UNUSED ( program ); - UNUSED ( index ); - UNUSED ( name ); -} - -//----------------------------------------------------------------// -void zglCompileShader ( u32 shader ) { - UNUSED ( shader ); -} - -//----------------------------------------------------------------// -u32 zglCreateProgram () { - return 0; -} - -//----------------------------------------------------------------// -u32 zglCreateShader ( u32 shaderType ) { - UNUSED ( shaderType ); - return 0; -} - -//----------------------------------------------------------------// -void zglGetProgramInfoLog ( u32 program, u32 maxLength, u32* length, char* log ) { - UNUSED ( program ); - UNUSED ( maxLength ); - UNUSED ( length ); - UNUSED ( log ); -} - -//----------------------------------------------------------------// -void zglGetProgramiv ( u32 program, u32 name, s32* params ) { - UNUSED ( program ); - UNUSED ( name ); - UNUSED ( params ); -} - -//----------------------------------------------------------------// -void zglGetShaderInfoLog ( u32 shader, u32 maxLength, u32* length, char* log ) { - UNUSED ( shader ); - UNUSED ( maxLength ); - UNUSED ( length ); - UNUSED ( log ); -} - -//----------------------------------------------------------------// -void zglGetShaderiv ( u32 shader, u32 name, s32* params ) { - UNUSED ( shader ); - UNUSED ( name ); - UNUSED ( params ); -} - -//----------------------------------------------------------------// -u32 zglGetUniformLocation ( u32 program, cc8* name ) { - UNUSED ( program ); - UNUSED ( name ); - return 0; -} - -//----------------------------------------------------------------// -void zglLinkProgram ( u32 program ) { - UNUSED ( program ); -} - -//----------------------------------------------------------------// -void zglShaderSource ( u32 shader, u32 count, const char** string, const s32* length ) { - UNUSED ( shader ); - UNUSED ( count ); - UNUSED ( string ); - UNUSED ( length ); -} - -//----------------------------------------------------------------// -void zglValidateProgram ( u32 program ) { - UNUSED ( program ); -} - -//----------------------------------------------------------------// -void zglUniform1f ( u32 location, float v0 ) { - UNUSED ( location ); - UNUSED ( v0 ); -} - -//----------------------------------------------------------------// -void zglUniform1i ( u32 location, s32 v0 ) { - UNUSED ( location ); - UNUSED ( v0 ); -} - -//----------------------------------------------------------------// -void zglUniform4fv ( u32 location, u32 count, const float* value ) { - UNUSED ( location ); - UNUSED ( count ); - UNUSED ( value ); -} - -//----------------------------------------------------------------// -void zglUniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* value ) { - UNUSED ( location ); - UNUSED ( count ); - UNUSED ( transpose ); - UNUSED ( value ); -} - -//----------------------------------------------------------------// -void zglUniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* value ) { - UNUSED ( location ); - UNUSED ( count ); - UNUSED ( transpose ); - UNUSED ( value ); -} - -//----------------------------------------------------------------// -void zglUseProgram ( u32 program ) { - UNUSED ( program ); -} - -//================================================================// -// texture -//================================================================// - -//----------------------------------------------------------------// -void zglBindTexture ( u32 texID ) { - UNUSED ( texID ); -} - -//----------------------------------------------------------------// -void zglCompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, const void* data ) { - - UNUSED ( level ); - UNUSED ( internalFormat ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( imageSize ); - UNUSED ( data ); -} - -//----------------------------------------------------------------// -u32 zglCreateTexture () { - return 0; -} - -//----------------------------------------------------------------// -void zglTexEnvi ( u32 pname, s32 param ) { - UNUSED ( pname ); - UNUSED ( param ); -} - -//----------------------------------------------------------------// -void zglTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, const void* data ) { - UNUSED ( level ); - UNUSED ( internalFormat ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( format ); - UNUSED ( type ); - UNUSED ( data ); -} - -//----------------------------------------------------------------// -void zglTexParameteri ( u32 pname, s32 param ) { - UNUSED ( pname ); - UNUSED ( param ); -} - -//----------------------------------------------------------------// -void zglTexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, const void* data ) { - UNUSED ( level ); - UNUSED ( xOffset ); - UNUSED ( yOffset ); - UNUSED ( width ); - UNUSED ( height ); - UNUSED ( format ); - UNUSED ( type ); - UNUSED ( data ); -} - -//================================================================// -// framebuffer -//================================================================// - -//----------------------------------------------------------------// -void zglBindFramebuffer ( u32 target, u32 frameBuffer ) { - UNUSED ( target ); - UNUSED ( frameBuffer ); -} - -//----------------------------------------------------------------// -void zglBindRenderbuffer ( u32 renderbuffer ) { - UNUSED ( renderbuffer ); -} - -//----------------------------------------------------------------// -u32 zglCheckFramebufferStatus ( u32 target ) { - UNUSED ( target ); - return 0; -} - -//----------------------------------------------------------------// -u32 zglCreateFramebuffer () { - return 0; -} - -//----------------------------------------------------------------// -u32 zglCreateRenderbuffer () { - return 0; -} - -//----------------------------------------------------------------// -void zglFramebufferRenderbuffer ( u32 target, u32 attachment, u32 renderbuffer ) { - UNUSED ( target ); - UNUSED ( attachment ); - UNUSED ( renderbuffer ); -} - -//----------------------------------------------------------------// -void zglFramebufferTexture2D ( u32 target, u32 attachment, u32 texture, s32 level ) { - UNUSED ( target ); - UNUSED ( attachment ); - UNUSED ( texture ); - UNUSED ( level ); -} - -//----------------------------------------------------------------// -void zglRenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) { - UNUSED ( internalFormat ); - UNUSED ( width ); - UNUSED ( height ); -} - -//================================================================// -// buffer -//================================================================// - -//----------------------------------------------------------------// -void zglBindBuffer ( u32 target, u32 buffer ) { - UNUSED ( target ); - UNUSED ( buffer ); -} - -//----------------------------------------------------------------// -void zglBufferData ( u32 target, u32 size, const void* data, u32 usage ) { - UNUSED ( target ); - UNUSED ( size ); - UNUSED ( data ); - UNUSED ( usage ); -} - -//----------------------------------------------------------------// -u32 zglCreateBuffer () { - return 0; -} - -#endif diff --git a/src/zl-gfx/zl_gfx_opengl.cpp b/src/zl-gfx/zl_gfx_opengl.cpp deleted file mode 100644 index c7322232d9..0000000000 --- a/src/zl-gfx/zl_gfx_opengl.cpp +++ /dev/null @@ -1,1329 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include -#include "pch.h" -#include - -SUPPRESS_EMPTY_FILE_WARNING - -#if MOAI_GFX_OPENGL - -#include -#include -using namespace std; - -#ifdef MOAI_OS_WINDOWS - #define GLEW_STATIC - #include -#endif - -#ifdef MOAI_OS_OSX - //#include - #include - #include - - #define glGenVertexArrays glGenVertexArraysAPPLE - #define glBindVertexArray glBindVertexArrayAPPLE - #define glDeleteVertexArrays glDeleteVertexArraysAPPLE - -#endif - -#ifdef MOAI_OS_IPHONE - - #include - #include - #include - #include - - #define GL_WRITE_ONLY 0x88B9 - #define GL_RGBA8 GL_RGBA8_OES - - // TODO: should not have to do this - // this is to suppress a false positive error in Xcode - extern GLvoid* glMapBufferOES ( GLenum target, GLenum access ); - extern GLboolean glUnmapBufferOES ( GLenum target ); - - #define glMapBuffer glMapBufferOES - #define glUnmapBuffer glUnmapBufferOES - - // TODO: should not have to do this - // this is to suppress a false positive error in Xcode - extern GLvoid glBindVertexArrayOES ( GLuint array ); - extern GLvoid glGenVertexArraysOES ( GLsizei n, GLuint *arrays ); - extern GLvoid glDeleteVertexArraysOES ( GLsizei n, const GLuint *arrays ); - - #define glGenVertexArrays glGenVertexArraysOES - #define glBindVertexArray glBindVertexArrayOES - #define glDeleteVertexArrays glDeleteVertexArraysOES - -#endif - -#ifdef MOAI_OS_ANDROID - - #include - #include - #include - #include - //#include - - #define GL_WRITE_ONLY 0x88B9 - - typedef void* ( GL_APIENTRYP PFNGLMAPBUFFEROESPROC ) ( GLenum target, GLenum access ); - typedef GLboolean ( GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC ) ( GLenum target ); - typedef void ( GL_APIENTRYP PFNGLGETBINDVERTEXARRAYPROC ) ( GLuint array ); - typedef void ( GL_APIENTRYP PFNGLGETGENVERTEXARRAYSPROC ) ( GLsizei n, GLuint* arrays ); - typedef void ( GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC ) ( GLsizei n, const GLuint* arrays ); - - //static PFNGLMAPBUFFEROESPROC glMapBuffer = ( PFNGLMAPBUFFEROESPROC )eglGetProcAddress ( "glMapBufferOES" ); - //static PFNGLUNMAPBUFFEROESPROC glUnmapBuffer = ( PFNGLUNMAPBUFFEROESPROC )eglGetProcAddress ( "glUnmapBufferOES" ); - //static PFNGLGETGENVERTEXARRAYSPROC glGenVertexArrays = ( PFNGLGETGENVERTEXARRAYSPROC )eglGetProcAddress ( "glGenVertexArraysOES" ); - //static PFNGLGETBINDVERTEXARRAYPROC glBindVertexArray = ( PFNGLGETBINDVERTEXARRAYPROC )eglGetProcAddress ( "glBindVertexArrayOES" ); - //static PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays = ( PFNGLDELETEVERTEXARRAYSPROC )eglGetProcAddress ( "glDeleteVertexArraysOES" ); - -#endif - -#ifdef MOAI_OS_LINUX - #ifndef MOAI_OS_NACL - #ifndef ANDROID - #include - #endif - #endif -#endif - -#ifdef MOAI_OS_NACL - #include - #include - - #define GL_RGBA8 GL_RGBA8_OES -#endif - -#ifdef MOAI_OS_HTML - #include - #include - #include - #include - #define MOAI_OS_NACL 1 - #define GL_RGBA8 GL_RGBA8_OES -#endif - -#ifdef MOAI_OS_BLACKBERRY - #include - #include - #include - #include - - #define GL_RGBA8 GL_RGBA8_OES -#endif - -#define REMAP_EXTENSION_PTR(target, ext) target = target ? target : ext; - -//================================================================// -// globals -//================================================================// - -static u32 sMaxTextureUnits = 0; -static u32 sMaxTextureSize = 0; -static u32 sOperationDepth = 0; // this is just the counter for tracking begin/end calls - -#define ASSERT_OPERATION_DEPTH() ( assert ( sOperationDepth > 0 )) // Attempt to call zgl graphics method outside of operation. - -//================================================================// -// enums -//================================================================// - -//----------------------------------------------------------------// -u32 zglMapFromGLEnum( u32 glEnum ) { - - switch ( glEnum ) { - case GL_DST_ALPHA: return ZGL_BLEND_FACTOR_DST_ALPHA; - case GL_DST_COLOR: return ZGL_BLEND_FACTOR_DST_COLOR; - case GL_ONE: return ZGL_BLEND_FACTOR_ONE; - case GL_ONE_MINUS_DST_ALPHA: return ZGL_BLEND_FACTOR_ONE_MINUS_DST_ALPHA; - case GL_ONE_MINUS_DST_COLOR: return ZGL_BLEND_FACTOR_ONE_MINUS_DST_COLOR; - case GL_ONE_MINUS_SRC_ALPHA: return ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; - case GL_ONE_MINUS_SRC_COLOR: return ZGL_BLEND_FACTOR_ONE_MINUS_SRC_COLOR; - case GL_SRC_ALPHA: return ZGL_BLEND_FACTOR_SRC_ALPHA; - case GL_SRC_ALPHA_SATURATE: return ZGL_BLEND_FACTOR_SRC_ALPHA_SATURATE; - case GL_SRC_COLOR: return ZGL_BLEND_FACTOR_SRC_COLOR; - case GL_ZERO: return ZGL_BLEND_FACTOR_ZERO; - }; - assert ( false ); - return 0; -} - -//----------------------------------------------------------------// -GLenum _remapEnum ( u32 zglEnum ) { - - switch ( zglEnum ) { - - case ZGL_BLEND_FACTOR_DST_ALPHA: return GL_DST_ALPHA; - case ZGL_BLEND_FACTOR_DST_COLOR: return GL_DST_COLOR; - case ZGL_BLEND_FACTOR_ONE: return GL_ONE; - case ZGL_BLEND_FACTOR_ONE_MINUS_DST_ALPHA: return GL_ONE_MINUS_DST_ALPHA; - case ZGL_BLEND_FACTOR_ONE_MINUS_DST_COLOR: return GL_ONE_MINUS_DST_COLOR; - case ZGL_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA: return GL_ONE_MINUS_SRC_ALPHA; - case ZGL_BLEND_FACTOR_ONE_MINUS_SRC_COLOR: return GL_ONE_MINUS_SRC_COLOR; - case ZGL_BLEND_FACTOR_SRC_ALPHA: return GL_SRC_ALPHA; - case ZGL_BLEND_FACTOR_SRC_ALPHA_SATURATE: return GL_SRC_ALPHA_SATURATE; - case ZGL_BLEND_FACTOR_SRC_COLOR: return GL_SRC_COLOR; - case ZGL_BLEND_FACTOR_ZERO: return GL_ZERO; - - case ZGL_BLEND_MODE_ADD: return GL_FUNC_ADD; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_BLEND_MODE_MAX: return GL_MAX; - case ZGL_BLEND_MODE_MIN: return GL_MIN; - #endif - - case ZGL_BLEND_MODE_REVERSE_SUBTRACT: return GL_FUNC_REVERSE_SUBTRACT; - case ZGL_BLEND_MODE_SUBTRACT: return GL_FUNC_SUBTRACT; - - case ZGL_BUFFER_TARGET_ARRAY: return GL_ARRAY_BUFFER; - case ZGL_BUFFER_TARGET_ELEMENT_ARRAY: return GL_ELEMENT_ARRAY_BUFFER; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_BUFFER_USAGE_DYNAMIC_COPY: return GL_DYNAMIC_COPY; - #endif - - case ZGL_BUFFER_USAGE_DYNAMIC_DRAW: return GL_DYNAMIC_DRAW; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_BUFFER_USAGE_DYNAMIC_READ: return GL_DYNAMIC_READ; - case ZGL_BUFFER_USAGE_STATIC_COPY: return GL_STATIC_COPY; - #endif - - case ZGL_BUFFER_USAGE_STATIC_DRAW: return GL_STATIC_DRAW; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_BUFFER_USAGE_STATIC_READ: return GL_STATIC_READ; - case ZGL_BUFFER_USAGE_STREAM_COPY: return GL_STREAM_COPY; - #endif - - case ZGL_BUFFER_USAGE_STREAM_DRAW: return GL_STREAM_DRAW; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_BUFFER_USAGE_STREAM_READ: return GL_STREAM_READ; - #endif - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_BLACKBERRY ) - case ZGL_COMPOSE_MODULATE: return GL_MODULATE; - #endif - - case ZGL_CULL_ALL: return GL_FRONT_AND_BACK; - case ZGL_CULL_BACK: return GL_BACK; - case ZGL_CULL_FRONT: return GL_FRONT; - - case ZGL_DEPTH_ALWAYS: return GL_ALWAYS; - case ZGL_DEPTH_EQUAL: return GL_EQUAL; - case ZGL_DEPTH_LESS: return GL_LESS; - case ZGL_DEPTH_LEQUAL: return GL_LEQUAL; - case ZGL_DEPTH_GEQUAL: return GL_GEQUAL; - case ZGL_DEPTH_GREATER: return GL_GREATER; - case ZGL_DEPTH_NEVER: return GL_NEVER; - case ZGL_DEPTH_NOTEQUAL: return GL_NOTEQUAL; - - case ZGL_FRAMEBUFFER_ATTACHMENT_COLOR: return GL_COLOR_ATTACHMENT0; - case ZGL_FRAMEBUFFER_ATTACHMENT_DEPTH: return GL_DEPTH_ATTACHMENT; - case ZGL_FRAMEBUFFER_ATTACHMENT_STENCIL: return GL_STENCIL_ATTACHMENT; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_FRAMEBUFFER_TARGET_DRAW: return GL_DRAW_FRAMEBUFFER; - case ZGL_FRAMEBUFFER_TARGET_READ: return GL_READ_FRAMEBUFFER; - #endif - - case ZGL_FRAMEBUFFER_TARGET_DRAW_READ: return GL_FRAMEBUFFER; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_MATRIX_COLOR: return GL_COLOR; - case ZGL_MATRIX_MODELVIEW: return GL_MODELVIEW; - case ZGL_MATRIX_PROJECTION: return GL_PROJECTION; - #endif - - case ZGL_MATRIX_TEXTURE: return GL_TEXTURE; - - case ZGL_PIPELINE_BLEND: return GL_BLEND; - - #if !defined ( MOAI_OS_NACL ) - case ZGL_PIPELINE_COLOR_ARRAY: return GL_COLOR_ARRAY; - #endif - case ZGL_PIPELINE_CULL: return GL_CULL_FACE; - case ZGL_PIPELINE_DEPTH: return GL_DEPTH_TEST; - - #if !defined ( MOAI_OS_NACL ) - case ZGL_PIPELINE_NORMAL_ARRAY: return GL_NORMAL_ARRAY; - #endif - - case ZGL_PIPELINE_SCISSOR: return GL_SCISSOR_TEST; - case ZGL_PIPELINE_TEXTURE_2D: return GL_TEXTURE_2D; - - #if !defined ( MOAI_OS_NACL ) - case ZGL_PIPELINE_TEXTURE_COORD_ARRAY: return GL_TEXTURE_COORD_ARRAY; - case ZGL_PIPELINE_VERTEX_ARRAY: return GL_VERTEX_ARRAY; - #endif - - case ZGL_PIXEL_FORMAT_ALPHA: return GL_ALPHA; - case ZGL_PIXEL_FORMAT_LUMINANCE: return GL_LUMINANCE; - case ZGL_PIXEL_FORMAT_LUMINANCE_ALPHA: return GL_LUMINANCE_ALPHA; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_FORMAT_RED: return GL_RED; - case ZGL_PIXEL_FORMAT_RG: return GL_RG; - #endif - - case ZGL_PIXEL_FORMAT_RGB: return GL_RGB; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_FORMAT_RGB4: return GL_RGB4; - #endif - - case ZGL_PIXEL_FORMAT_RGB5_A1: return GL_RGB5_A1; - - #if defined ( MOAI_OS_ANDROID ) || defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_FORMAT_RGB565: return GL_RGB565; - #endif - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_FORMAT_RGB8: return GL_RGB8; - case ZGL_PIXEL_FORMAT_BGR: return GL_BGR; - #endif - - case ZGL_PIXEL_FORMAT_RGBA: return GL_RGBA; - case ZGL_PIXEL_FORMAT_RGBA4: return GL_RGBA4; - - #if !defined ( MOAI_OS_ANDROID ) - case ZGL_PIXEL_FORMAT_RGBA8: return GL_RGBA8; - #endif - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_FORMAT_BGRA: return GL_BGRA; - #endif - - case ZGL_PIXEL_TYPE_BYTE: return GL_BYTE; - - #ifdef MOAI_OS_IPHONE - case ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_2BPPV1_IMG: return GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; - case ZGL_PIXEL_TYPE_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: return GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; - case ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: return GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; - case ZGL_PIXEL_TYPE_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: return GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; - #endif - - case ZGL_PIXEL_TYPE_FLOAT: return GL_FLOAT; - case ZGL_PIXEL_TYPE_INT: return GL_INT; - case ZGL_PIXEL_TYPE_SHORT: return GL_SHORT; - case ZGL_PIXEL_TYPE_UNSIGNED_BYTE: return GL_UNSIGNED_BYTE; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_TYPE_UNSIGNED_BYTE_2_3_3_REV: return GL_UNSIGNED_BYTE_2_3_3_REV; - case ZGL_PIXEL_TYPE_UNSIGNED_BYTE_3_3_2: return GL_UNSIGNED_BYTE_3_3_2; - #endif - - case ZGL_PIXEL_TYPE_UNSIGNED_INT: return GL_UNSIGNED_INT; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8: return GL_UNSIGNED_INT_8_8_8_8; - case ZGL_PIXEL_TYPE_UNSIGNED_INT_8_8_8_8_REV: return GL_UNSIGNED_INT_8_8_8_8_REV; - case ZGL_PIXEL_TYPE_UNSIGNED_INT_2_10_10_10_REV: return GL_UNSIGNED_INT_2_10_10_10_REV; - case ZGL_PIXEL_TYPE_UNSIGNED_INT_10_10_10_2: return GL_UNSIGNED_INT_10_10_10_2; - #endif - - case ZGL_PIXEL_TYPE_UNSIGNED_SHORT: return GL_UNSIGNED_SHORT; - case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5: return GL_UNSIGNED_SHORT_5_6_5; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_6_5_REV: return GL_UNSIGNED_SHORT_5_6_5_REV; - #endif - - case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4: return GL_UNSIGNED_SHORT_4_4_4_4; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_4_4_4_4_REV: return GL_UNSIGNED_SHORT_4_4_4_4_REV; - case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_1_5_5_5_REV: return GL_UNSIGNED_SHORT_1_5_5_5_REV; - #endif - - case ZGL_PIXEL_TYPE_UNSIGNED_SHORT_5_5_5_1: return GL_UNSIGNED_SHORT_5_5_5_1; - - case ZGL_PRIM_LINE_LOOP: return GL_LINE_LOOP; - case ZGL_PRIM_LINE_STRIP: return GL_LINE_STRIP; - case ZGL_PRIM_LINES: return GL_LINES; - case ZGL_PRIM_POINTS: return GL_POINTS; - case ZGL_PRIM_TRIANGLE_FAN: return GL_TRIANGLE_FAN; - case ZGL_PRIM_TRIANGLE_STRIP: return GL_TRIANGLE_STRIP; - case ZGL_PRIM_TRIANGLES: return GL_TRIANGLES; - - case ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTES: return GL_ACTIVE_ATTRIBUTES; - case ZGL_PROGRAM_INFO_ACTIVE_ATTRIBUTE_MAX_LENGTH: return GL_ACTIVE_ATTRIBUTE_MAX_LENGTH; - case ZGL_PROGRAM_INFO_ACTIVE_UNIFORMS: return GL_ACTIVE_UNIFORMS; - case ZGL_PROGRAM_INFO_ACTIVE_UNIFORM_MAX_LENGTH: return GL_ACTIVE_UNIFORM_MAX_LENGTH; - case ZGL_PROGRAM_INFO_ATTACHED_SHADERS: return GL_ATTACHED_SHADERS; - case ZGL_PROGRAM_INFO_DELETE_STATUS: return GL_DELETE_STATUS; - case ZGL_PROGRAM_INFO_LOG_LENGTH: return GL_INFO_LOG_LENGTH; - case ZGL_PROGRAM_INFO_LINK_STATUS: return GL_LINK_STATUS; - case ZGL_PROGRAM_INFO_VALIDATE_STATUS: return GL_VALIDATE_STATUS; - - case ZGL_SAMPLE_LINEAR: return GL_LINEAR; - case ZGL_SAMPLE_LINEAR_MIPMAP_LINEAR: return GL_LINEAR_MIPMAP_LINEAR; - case ZGL_SAMPLE_LINEAR_MIPMAP_NEAREST: return GL_LINEAR_MIPMAP_NEAREST; - case ZGL_SAMPLE_NEAREST: return GL_NEAREST; - case ZGL_SAMPLE_NEAREST_MIPMAP_LINEAR: return GL_NEAREST_MIPMAP_LINEAR; - case ZGL_SAMPLE_NEAREST_MIPMAP_NEAREST: return GL_NEAREST_MIPMAP_NEAREST; - - case ZGL_SHADER_INFO_COMPILE_STATUS: return GL_COMPILE_STATUS; - case ZGL_SHADER_INFO_DELETE_STATUS: return GL_DELETE_STATUS; - case ZGL_SHADER_INFO_LOG_LENGTH: return GL_INFO_LOG_LENGTH; - case ZGL_SHADER_INFO_SOURCE_LENGTH: return GL_SHADER_SOURCE_LENGTH; - case ZGL_SHADER_INFO_TYPE: return GL_SHADER_TYPE; - - #if !defined ( MOAI_OS_OSX ) && !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_LINUX ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_SHADER_TYPE_TESS_CONTROL: return GL_TESS_CONTROL_SHADER; - case ZGL_SHADER_TYPE_TESS_EVALUATION: return GL_TESS_EVALUATION_SHADER; - #endif - - case ZGL_SHADER_TYPE_FRAGMENT: return GL_FRAGMENT_SHADER; - - #if !defined ( MOAI_OS_OSX ) && !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_SHADER_TYPE_GEOMETRY: return GL_GEOMETRY_SHADER; - #endif - - case ZGL_SHADER_TYPE_VERTEX: return GL_VERTEX_SHADER; - - case ZGL_STRING_VENDOR: return GL_VENDOR; - case ZGL_STRING_VERSION: return GL_VERSION; - case ZGL_STRING_RENDERER: return GL_RENDERER; - case ZGL_STRING_SHADING_LANGUAGE_VERSION: return GL_SHADING_LANGUAGE_VERSION; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_TEXTURE_BASE_LEVEL: return GL_TEXTURE_BASE_LEVEL; - case ZGL_TEXTURE_COMPARE_FUNC: return GL_TEXTURE_COMPARE_FUNC; - case ZGL_TEXTURE_COMPARE_MODE: return GL_TEXTURE_COMPARE_MODE; - //case ZGL_TEXTURE_DEPTH_STENCIL_MODE: return GL_DEPTH_STENCIL_TEXTURE_MODE; - case ZGL_TEXTURE_ENV_MODE: return GL_TEXTURE_ENV_MODE; - #endif - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_TEXTURE_LOD_BIAS: return GL_TEXTURE_LOD_BIAS; - #endif - - case ZGL_TEXTURE_MAG_FILTER: return GL_TEXTURE_MAG_FILTER; - case ZGL_TEXTURE_MIN_FILTER: return GL_TEXTURE_MIN_FILTER; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_TEXTURE_MAX_LEVEL: return GL_TEXTURE_MAX_LEVEL; - case ZGL_TEXTURE_MAX_LOD: return GL_TEXTURE_MAX_LOD; - case ZGL_TEXTURE_MIN_LOD: return GL_TEXTURE_MIN_LOD; - #endif - - #if !defined ( MOAI_OS_OSX ) && !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_LINUX ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_TEXTURE_SWIZZLE_A: return GL_TEXTURE_SWIZZLE_A; - case ZGL_TEXTURE_SWIZZLE_B: return GL_TEXTURE_SWIZZLE_B; - case ZGL_TEXTURE_SWIZZLE_G: return GL_TEXTURE_SWIZZLE_G; - case ZGL_TEXTURE_SWIZZLE_R: return GL_TEXTURE_SWIZZLE_R; - #endif - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_TEXTURE_WRAP_R: return GL_TEXTURE_WRAP_R; - #endif - - case ZGL_TEXTURE_WRAP_S: return GL_TEXTURE_WRAP_S; - case ZGL_TEXTURE_WRAP_T: return GL_TEXTURE_WRAP_T; - - case ZGL_TYPE_BYTE: return GL_BYTE; - - #if !defined ( MOAI_OS_NACL ) && !defined ( MOAI_OS_IPHONE ) && !defined ( MOAI_OS_BLACKBERRY ) && !defined ( MOAI_OS_ANDROID ) && !defined ( MOAI_OS_HTML ) - case ZGL_TYPE_DOUBLE: return GL_DOUBLE; - #endif - - case ZGL_TYPE_FLOAT: return GL_FLOAT; - case ZGL_TYPE_INT: return GL_INT; - case ZGL_TYPE_SHORT: return GL_SHORT; - case ZGL_TYPE_UNSIGNED_BYTE: return GL_UNSIGNED_BYTE; - case ZGL_TYPE_UNSIGNED_INT: return GL_UNSIGNED_INT; - case ZGL_TYPE_UNSIGNED_SHORT: return GL_UNSIGNED_SHORT; - - case ZGL_WRAP_MODE_CLAMP: return GL_CLAMP_TO_EDGE; - case ZGL_WRAP_MODE_REPEAT: return GL_REPEAT; - } - - assert ( false ); - return 0; -} - -//================================================================// -// setup -//================================================================// - -//----------------------------------------------------------------// -void zglBegin () { - - sOperationDepth++; -} - -//----------------------------------------------------------------// -void zglEnd () { - - ASSERT_OPERATION_DEPTH (); - sOperationDepth--; -} - -//----------------------------------------------------------------// -void zglFinalize () { -} - -//----------------------------------------------------------------// -void zglInitialize () { - - ASSERT_OPERATION_DEPTH (); - - u32 majorVersion = 0; - u32 minorVersion = 0; - - bool isOpenGLES = false; - - #ifdef __GLEW_H__ - static bool initGlew = true; - if ( initGlew ) { - glewInit (); - initGlew = false; - } - #endif - - string version = zglGetString ( ZGL_STRING_VERSION ); - std::transform ( version.begin (), version.end(), version.begin(), ::tolower ); - - string gles = "opengl es"; - - if ( version.find ( gles ) != version.npos ) { - isOpenGLES = true; - version = version.substr ( gles.length ()); - - size_t space = version.find ( ' ' ); - if ( space != version.npos ) { - version = version.substr ( space + 1 ); - } - } - else { - isOpenGLES = false; - } - - version = version.substr ( 0, 3 ); - - majorVersion = version.at ( 0 ) - '0'; - minorVersion = version.at ( 2 ) - '0'; - - #ifdef EMSCRIPTEN - isOpenGLES = true; - #endif - - #if defined ( __GLEW_H__ ) - - // if framebuffer object is not in code, check to see if it's available as - // an extension and remap to core function pointers if so - if (( isOpenGLES == false ) && ( majorVersion < 3 )) { - - if ( glewIsSupported ( "GL_EXT_framebuffer_object" )) { - - REMAP_EXTENSION_PTR ( glBindFramebuffer, glBindFramebufferEXT ) - REMAP_EXTENSION_PTR ( glCheckFramebufferStatus, glCheckFramebufferStatusEXT ) - REMAP_EXTENSION_PTR ( glDeleteFramebuffers, glDeleteFramebuffersEXT ) - REMAP_EXTENSION_PTR ( glDeleteRenderbuffers, glDeleteRenderbuffersEXT ) - REMAP_EXTENSION_PTR ( glFramebufferRenderbuffer, glFramebufferRenderbufferEXT ) - REMAP_EXTENSION_PTR ( glFramebufferTexture1D, glFramebufferTexture1DEXT ) - REMAP_EXTENSION_PTR ( glFramebufferTexture2D, glFramebufferTexture2DEXT ) - REMAP_EXTENSION_PTR ( glFramebufferTexture3D, glFramebufferTexture3DEXT ) - REMAP_EXTENSION_PTR ( glGenFramebuffers, glGenFramebuffersEXT ) - REMAP_EXTENSION_PTR ( glGenRenderbuffers, glGenRenderbuffersEXT ) - REMAP_EXTENSION_PTR ( glGenerateMipmap, glGenerateMipmapEXT ) - REMAP_EXTENSION_PTR ( glGetFramebufferAttachmentParameteriv, glGetFramebufferAttachmentParameterivEXT ) - REMAP_EXTENSION_PTR ( glGetRenderbufferParameteriv, glGetRenderbufferParameterivEXT ) - REMAP_EXTENSION_PTR ( glIsFramebuffer, glIsFramebufferEXT ) - REMAP_EXTENSION_PTR ( glIsRenderbuffer, glIsRenderbufferEXT ) - REMAP_EXTENSION_PTR ( glRenderbufferStorage, glRenderbufferStorageEXT ) - } - else { - assert ( false ); // needs framebuffer - } - } - - #endif - - int maxTextureUnits = 0; - - if ( majorVersion == 1 ) { - assert ( false ); // OpenGL ES1 no longer supported - } - else { - glGetIntegerv ( GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits ); - } - - sMaxTextureUnits = ( u32 )maxTextureUnits; - - int maxTextureSize; - glGetIntegerv ( GL_MAX_TEXTURE_SIZE, &maxTextureSize ); - sMaxTextureSize = ( u32 )maxTextureSize; -} - -//================================================================// -// gfx -//================================================================// - -//----------------------------------------------------------------// -void zglActiveTexture ( u32 textureUnit ) { - - ASSERT_OPERATION_DEPTH (); - glActiveTexture ( GL_TEXTURE0 + textureUnit ); -} - -//----------------------------------------------------------------// -void zglBlendFunc ( u32 sourceFactor, u32 destFactor ) { - - ASSERT_OPERATION_DEPTH (); - glBlendFunc ( _remapEnum ( sourceFactor ), _remapEnum ( destFactor )); -} - -//----------------------------------------------------------------// -void zglBlendMode ( u32 mode ) { - - ASSERT_OPERATION_DEPTH (); - glBlendEquation ( _remapEnum ( mode )); -} - -//----------------------------------------------------------------// -void zglClear ( u32 mask ) { - - ASSERT_OPERATION_DEPTH (); - - GLbitfield glMask = 0; - - if ( mask & ZGL_CLEAR_COLOR_BUFFER_BIT ) { - glMask |= GL_COLOR_BUFFER_BIT; - } - - if ( mask & ZGL_CLEAR_DEPTH_BUFFER_BIT ) { - glMask |= GL_DEPTH_BUFFER_BIT; - } - - if ( mask & ZGL_CLEAR_STENCIL_BUFFER_BIT ) { - glMask |= GL_STENCIL_BUFFER_BIT; - } - - glClear ( glMask ); -} - -//----------------------------------------------------------------// -void zglClearColor ( float r, float g, float b, float a ) { - - ASSERT_OPERATION_DEPTH (); - glClearColor ( r, g, b, a ); -} - -//----------------------------------------------------------------// -void zglColor ( float r, float g, float b, float a ) { - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glColor4f ( r, g, b, a ); - #endif -} - -//----------------------------------------------------------------// -void zglCullFace ( u32 mode ) { - - ASSERT_OPERATION_DEPTH (); - glCullFace ( _remapEnum ( mode )); -} - -//----------------------------------------------------------------// -void zglDeleteBuffer ( u32 buffer ) { - - ASSERT_OPERATION_DEPTH (); - if ( buffer ) { - glDeleteBuffers ( 1, &buffer ); - } -} - -//----------------------------------------------------------------// -void zglDeleteFramebuffer ( u32 buffer ) { - - ASSERT_OPERATION_DEPTH (); - if ( buffer ) { - glDeleteFramebuffers ( 1, &buffer ); - } -} - -//----------------------------------------------------------------// -void zglDeleteProgram ( u32 program ) { - - ASSERT_OPERATION_DEPTH (); - if ( program ) { - glDeleteProgram ( program ); - } -} - -//----------------------------------------------------------------// -void zglDeleteRenderbuffer ( u32 buffer ) { - - ASSERT_OPERATION_DEPTH (); - if ( buffer ) { - glDeleteRenderbuffers ( 1, &buffer ); - } -} - -//----------------------------------------------------------------// -void zglDeleteShader ( u32 shader ) { - - ASSERT_OPERATION_DEPTH (); - if ( shader ) { - glDeleteShader ( shader ); - } -} - -//----------------------------------------------------------------// -void zglDeleteTexture ( u32 texture ) { - - ASSERT_OPERATION_DEPTH (); - if ( texture ) { - glDeleteTextures ( 1, &texture ); - } -} - -//----------------------------------------------------------------// -void zglDepthFunc ( u32 depthFunc ) { - - ASSERT_OPERATION_DEPTH (); - glDepthFunc ( _remapEnum ( depthFunc )); -} - -//----------------------------------------------------------------// -void zglDepthMask ( bool flag ) { - - ASSERT_OPERATION_DEPTH (); - glDepthMask ( flag ? GL_TRUE : GL_FALSE ); -} - -//----------------------------------------------------------------// -void zglDisable ( u32 cap ) { - - ASSERT_OPERATION_DEPTH (); - glDisable ( _remapEnum ( cap )); -} - -//----------------------------------------------------------------// -void zglDrawArrays ( u32 primType, u32 first, u32 count ) { - - ASSERT_OPERATION_DEPTH (); - glDrawArrays ( _remapEnum ( primType ), ( GLint )first, ( GLsizei )count ); -} - -//----------------------------------------------------------------// -void zglDrawElements ( u32 primType, u32 count, u32 indexType, const void* indices ) { - - ASSERT_OPERATION_DEPTH (); - glDrawElements ( _remapEnum ( primType ), ( GLsizei )count, _remapEnum ( indexType ), ( const GLvoid* )indices ); -} - -//----------------------------------------------------------------// -void zglEnable ( u32 cap ) { - - ASSERT_OPERATION_DEPTH (); - glEnable ( _remapEnum ( cap )); -} - -//----------------------------------------------------------------// -void zglFlush () { - - ASSERT_OPERATION_DEPTH (); - glFlush (); -} - -//----------------------------------------------------------------// -u32 zglGetCap ( u32 cap ) { - - ASSERT_OPERATION_DEPTH (); - - switch ( cap ) { - case ZGL_CAPS_MAX_TEXTURE_SIZE: - return sMaxTextureSize; - case ZGL_CAPS_MAX_TEXTURE_UNITS: - return sMaxTextureUnits; - } - return 0; -} - -//----------------------------------------------------------------// -u32 zglGetError () { - - ASSERT_OPERATION_DEPTH (); - - GLenum error = glGetError (); - - switch ( error ) { - - case GL_NO_ERROR: return ZGL_ERROR_NONE; - - case GL_INVALID_ENUM: return ZGL_ERROR_INVALID_ENUM; - case GL_INVALID_OPERATION: return ZGL_ERROR_INVALID_OPERATION; - case GL_INVALID_VALUE: return ZGL_ERROR_INVALID_VALUE; - case GL_OUT_OF_MEMORY: return ZGL_ERROR_OUT_OF_MEMORY; - } - return ZGL_ERROR_UNKNOWN; -} - -//----------------------------------------------------------------// -cc8* zglGetErrorString ( u32 error ) { - - ASSERT_OPERATION_DEPTH (); - - switch ( error ) { - case ZGL_ERROR_NONE: return "ZGL_ERROR_NONE"; - case ZGL_ERROR_INVALID_ENUM: return "ZGL_ERROR_INVALID_ENUM"; - case ZGL_ERROR_INVALID_OPERATION: return "ZGL_ERROR_INVALID_OPERATION"; - case ZGL_ERROR_INVALID_VALUE: return "ZGL_ERROR_INVALID_VALUE"; - case ZGL_ERROR_OUT_OF_MEMORY: return "ZGL_ERROR_OUT_OF_MEMORY"; - case ZGL_ERROR_STACK_OVERFLOW: return "ZGL_ERROR_STACK_OVERFLOW"; - case ZGL_ERROR_STACK_UNDERFLOW: return "ZGL_ERROR_STACK_UNDERFLOW"; - } - return ""; -} - -//----------------------------------------------------------------// -extern cc8* zglGetString ( u32 stringID ) { - - ASSERT_OPERATION_DEPTH (); - return ( cc8* )glGetString ( _remapEnum ( stringID )); -} - -//----------------------------------------------------------------// -void zglLineWidth ( float width ) { - - ASSERT_OPERATION_DEPTH (); - glLineWidth (( GLfloat )width ); -} - -//----------------------------------------------------------------// -void zglReadPixels ( s32 x, s32 y, u32 width, u32 height, void* data ) { - - ASSERT_OPERATION_DEPTH (); - glReadPixels (( GLint )x, ( GLint )y, ( GLsizei )width, ( GLsizei )height, GL_RGBA, GL_UNSIGNED_BYTE, ( GLvoid* )data ); -} - -//----------------------------------------------------------------// -void zglScissor ( s32 x, s32 y, u32 w, u32 h ) { - - ASSERT_OPERATION_DEPTH (); - glScissor (( GLint )x, ( GLint )y, ( GLsizei )w, ( GLsizei )h ); -} - -//----------------------------------------------------------------// -void zglViewport ( s32 x, s32 y, u32 w, u32 h ) { - - ASSERT_OPERATION_DEPTH (); - glViewport (( GLint )x, ( GLint )y, ( GLsizei )w, ( GLsizei )h ); -} - -//================================================================// -// vertex format -//================================================================// - -//----------------------------------------------------------------// -void zglColorPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glColorPointer (( GLint )size, _remapEnum ( type ), ( GLsizei )stride, ( const GLvoid* )pointer ); - #endif -} - -//----------------------------------------------------------------// -void zglDisableClientState ( u32 cap ) { - - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glDisableClientState ( _remapEnum ( cap )); - #endif -} - -//----------------------------------------------------------------// -void zglDisableVertexAttribArray ( u32 index ) { - - ASSERT_OPERATION_DEPTH (); - glDisableVertexAttribArray (( GLuint )index ); -} - -//----------------------------------------------------------------// -void zglNormalPointer ( u32 type, u32 stride, const void* pointer ) { - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glNormalPointer ( _remapEnum ( type ), ( GLsizei )stride, ( const GLvoid* )pointer ); - #endif -} - -//----------------------------------------------------------------// -void zglTexCoordPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glTexCoordPointer (( GLint )size, _remapEnum ( type ), ( GLsizei )stride, ( const GLvoid* )pointer ); - #endif -} - -//----------------------------------------------------------------// -void zglVertexAttribPointer ( u32 index, u32 size, u32 type, bool normalized, u32 stride, const void* pointer ) { - - ASSERT_OPERATION_DEPTH (); - - glVertexAttribPointer ( - ( GLuint )index, - ( GLint )size, - _remapEnum ( type ), - normalized ? GL_TRUE : GL_FALSE, - ( GLsizei )stride, - ( const GLvoid* )pointer - ); -} - -//----------------------------------------------------------------// -void zglVertexPointer ( u32 size, u32 type, u32 stride, const void* pointer ) { - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glVertexPointer (( GLint )size, _remapEnum ( type ), ( GLsizei )stride, ( const GLvoid* )pointer ); - #endif -} - -//----------------------------------------------------------------// -void zglEnableClientState ( u32 cap ) { - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glEnableClientState ( _remapEnum ( cap )); - #endif -} - -//----------------------------------------------------------------// -void zglEnableVertexAttribArray ( u32 index ) { - - ASSERT_OPERATION_DEPTH (); - glEnableVertexAttribArray (( GLuint )index ); -} - -//================================================================// -// shaders -//================================================================// - -//----------------------------------------------------------------// -void zglAttachShader ( u32 program, u32 shader ) { - - ASSERT_OPERATION_DEPTH (); - glAttachShader (( GLuint )program, ( GLuint )shader ); -} - -//----------------------------------------------------------------// -void zglBindAttribLocation ( u32 program, u32 index, cc8* name ) { - - ASSERT_OPERATION_DEPTH (); - glBindAttribLocation (( GLuint )program, ( GLuint )index, ( const GLchar* )name ); -} - -//----------------------------------------------------------------// -void zglCompileShader ( u32 shader ) { - - ASSERT_OPERATION_DEPTH (); - glCompileShader ( shader ); -} - -//----------------------------------------------------------------// -u32 zglCreateProgram () { - - ASSERT_OPERATION_DEPTH (); - return ( u32 )glCreateProgram (); -} - -//----------------------------------------------------------------// -u32 zglCreateShader ( u32 shaderType ) { - - ASSERT_OPERATION_DEPTH (); - return ( u32 )glCreateShader ( _remapEnum ( shaderType )); -} - -//----------------------------------------------------------------// -void zglGetProgramInfoLog ( u32 program, u32 maxLength, u32* length, char* log ) { - - ASSERT_OPERATION_DEPTH (); - glGetProgramInfoLog (( GLuint )program, ( GLsizei )maxLength, ( GLsizei* )length, ( GLchar* )log ); -} - -//----------------------------------------------------------------// -void zglGetProgramiv ( u32 program, u32 name, s32* params ) { - - ASSERT_OPERATION_DEPTH (); - glGetProgramiv (( GLuint )program, _remapEnum ( name ), ( GLint* )params ); -} - -//----------------------------------------------------------------// -void zglGetShaderInfoLog ( u32 shader, u32 maxLength, u32* length, char* log ) { - - ASSERT_OPERATION_DEPTH (); - glGetShaderInfoLog (( GLuint )shader, ( GLsizei )maxLength, ( GLsizei* )length, ( GLchar* )log ); -} - -//----------------------------------------------------------------// -void zglGetShaderiv ( u32 shader, u32 name, s32* params ) { - - ASSERT_OPERATION_DEPTH (); - glGetShaderiv (( GLuint )shader, _remapEnum ( name ), params ); -} - -//----------------------------------------------------------------// -u32 zglGetUniformLocation ( u32 program, cc8* name ) { - - ASSERT_OPERATION_DEPTH (); - return ( u32 )glGetUniformLocation (( GLuint )program, ( const GLchar* )name ); -} - -//----------------------------------------------------------------// -void zglLinkProgram ( u32 program ) { - - ASSERT_OPERATION_DEPTH (); - glLinkProgram (( GLuint )program ); -} - -//----------------------------------------------------------------// -void zglShaderSource ( u32 shader, u32 count, const char** string, const s32* length ) { - - ASSERT_OPERATION_DEPTH (); - glShaderSource (( GLuint )shader, ( GLsizei )count, ( const GLchar** )string, ( const GLint* )length ); -} - -//----------------------------------------------------------------// -void zglValidateProgram ( u32 program ) { - - ASSERT_OPERATION_DEPTH (); - glValidateProgram (( GLuint )program ); -} - -//----------------------------------------------------------------// -void zglUniform1f ( u32 location, float v0 ) { - - ASSERT_OPERATION_DEPTH (); - glUniform1f (( GLint )location, ( GLfloat )v0 ); -} - -//----------------------------------------------------------------// -void zglUniform1i ( u32 location, s32 v0 ) { - - ASSERT_OPERATION_DEPTH (); - glUniform1i (( GLint )location, ( GLint )v0 ); -} - -//----------------------------------------------------------------// -void zglUniform4fv ( u32 location, u32 count, const float* value ) { - - ASSERT_OPERATION_DEPTH (); - glUniform4fv (( GLint )location, ( GLsizei )count, ( const GLfloat* )value ); -} - -//----------------------------------------------------------------// -void zglUniformMatrix3fv ( u32 location, u32 count, bool transpose, const float* value ) { - - ASSERT_OPERATION_DEPTH (); - glUniformMatrix3fv (( GLint )location, ( GLsizei )count, transpose ? GL_TRUE : GL_FALSE, ( const GLfloat* )value ); -} - -//----------------------------------------------------------------// -void zglUniformMatrix4fv ( u32 location, u32 count, bool transpose, const float* value ) { - - ASSERT_OPERATION_DEPTH (); - glUniformMatrix4fv (( GLint )location, ( GLsizei )count, transpose ? GL_TRUE : GL_FALSE, ( const GLfloat* )value ); -} - -//----------------------------------------------------------------// -void zglUseProgram ( u32 program ) { - - ASSERT_OPERATION_DEPTH (); - glUseProgram (( GLuint )program ); -} - -//================================================================// -// texture -//================================================================// - -//----------------------------------------------------------------// -void zglBindTexture ( u32 texID ) { - - ASSERT_OPERATION_DEPTH (); - glBindTexture ( GL_TEXTURE_2D, ( GLuint )texID ); -} - -//----------------------------------------------------------------// -void zglCompressedTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 imageSize, const void* data ) { - - ASSERT_OPERATION_DEPTH (); - - glCompressedTexImage2D ( - GL_TEXTURE_2D, - ( GLint )level, - ( GLint )_remapEnum ( internalFormat ), - ( GLsizei )width, - ( GLsizei )height, - 0, - ( GLsizei )imageSize, - ( const GLvoid* )data - ); -} - -//----------------------------------------------------------------// -u32 zglCreateTexture () { - - ASSERT_OPERATION_DEPTH (); - - u32 textureID; - glGenTextures ( 1, ( GLuint* )&textureID ); - return textureID; -} - -//----------------------------------------------------------------// -void zglTexEnvi ( u32 pname, s32 param ) { - - ASSERT_OPERATION_DEPTH (); - - #if !MOAI_OS_NACL - glTexEnvi ( GL_TEXTURE_ENV, _remapEnum ( pname ), ( GLint )param ); - #endif -} - -//----------------------------------------------------------------// -void zglTexImage2D ( u32 level, u32 internalFormat, u32 width, u32 height, u32 format, u32 type, const void* data ) { - - ASSERT_OPERATION_DEPTH (); - - glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 ); - - glTexImage2D ( - GL_TEXTURE_2D, - ( GLint )level, - ( GLint )_remapEnum ( internalFormat ), - ( GLsizei )width, - ( GLsizei )height, - 0, - _remapEnum ( format ), - _remapEnum ( type ), - ( const GLvoid* )data - ); -} - -//----------------------------------------------------------------// -void zglTexParameteri ( u32 pname, s32 param ) { - - ASSERT_OPERATION_DEPTH (); - glTexParameteri ( GL_TEXTURE_2D, _remapEnum ( pname ), ( GLint )_remapEnum ( param )); -} - -//----------------------------------------------------------------// -void zglTexSubImage2D ( u32 level, s32 xOffset, s32 yOffset, u32 width, u32 height, u32 format, u32 type, const void* data ) { - - ASSERT_OPERATION_DEPTH (); - - glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 ); - - glTexSubImage2D ( - GL_TEXTURE_2D, - ( GLint )level, - ( GLint )xOffset, - ( GLint )yOffset, - ( GLsizei )width, - ( GLsizei )height, - _remapEnum ( format ), - _remapEnum ( type ), - ( const GLvoid* )data - ); -} - -//================================================================// -// framebuffer -//================================================================// - -//----------------------------------------------------------------// -void zglBindFramebuffer ( u32 target, u32 frameBuffer ) { - - ASSERT_OPERATION_DEPTH (); - glBindFramebuffer ( _remapEnum ( target ), frameBuffer ); -} - -//----------------------------------------------------------------// -void zglBindRenderbuffer ( u32 renderbuffer ) { - - ASSERT_OPERATION_DEPTH (); - glBindRenderbuffer ( GL_RENDERBUFFER, renderbuffer ); -} - -//----------------------------------------------------------------// -u32 zglCheckFramebufferStatus ( u32 target ) { - - ASSERT_OPERATION_DEPTH (); - - GLenum status = glCheckFramebufferStatus ( _remapEnum ( target )); - return status == GL_FRAMEBUFFER_COMPLETE ? ZGL_FRAMEBUFFER_STATUS_COMPLETE : 0; -} - -//----------------------------------------------------------------// -u32 zglCreateFramebuffer () { - - ASSERT_OPERATION_DEPTH (); - - u32 bufferID; - glGenFramebuffers ( 1, &bufferID ); - return bufferID; -} - -//----------------------------------------------------------------// -u32 zglCreateRenderbuffer () { - - ASSERT_OPERATION_DEPTH (); - - u32 bufferID; - glGenRenderbuffers ( 1, &bufferID ); - return bufferID; -} - -//----------------------------------------------------------------// -void zglFramebufferRenderbuffer ( u32 target, u32 attachment, u32 renderbuffer ) { - - ASSERT_OPERATION_DEPTH (); - glFramebufferRenderbuffer ( _remapEnum ( target ), _remapEnum ( attachment ), GL_RENDERBUFFER, ( GLuint )renderbuffer ); -} - -//----------------------------------------------------------------// -void zglFramebufferTexture2D ( u32 target, u32 attachment, u32 texture, s32 level ) { - - ASSERT_OPERATION_DEPTH (); - glFramebufferTexture2D ( _remapEnum ( target ), _remapEnum ( attachment ), GL_TEXTURE_2D, ( GLuint )texture, ( GLint )level ); -} - -//----------------------------------------------------------------// -u32 zglGetCurrentFramebuffer () { - - ASSERT_OPERATION_DEPTH (); - - int buffer; - glGetIntegerv ( GL_FRAMEBUFFER_BINDING, &buffer ); - return ( u32 )buffer; -} - -//----------------------------------------------------------------// -void zglRenderbufferStorage ( u32 internalFormat, u32 width, u32 height ) { - - ASSERT_OPERATION_DEPTH (); - glRenderbufferStorage ( GL_RENDERBUFFER, _remapEnum ( internalFormat ), ( GLsizei )width, ( GLsizei )height ); -} - -//================================================================// -// buffer -//================================================================// - -//----------------------------------------------------------------// -void zglBindBuffer ( u32 target, u32 buffer ) { - - ASSERT_OPERATION_DEPTH (); - glBindBuffer ( _remapEnum ( target ), buffer ); -} - -//----------------------------------------------------------------// -void zglBufferData ( u32 target, u32 size, const void* data, u32 usage ) { - - ASSERT_OPERATION_DEPTH (); - glBufferData ( _remapEnum ( target ), ( GLsizeiptr )size, ( const GLvoid* )data, _remapEnum ( usage )); -} - -//----------------------------------------------------------------// -void zglBufferSubData ( u32 target, u32 offset, u32 size, const void* data ) { - - ASSERT_OPERATION_DEPTH (); - glBufferSubData ( _remapEnum ( target ), ( GLintptr )offset, ( GLsizeiptr )size, ( const GLvoid* )data ); -} - -//----------------------------------------------------------------// -u32 zglCreateBuffer () { - - ASSERT_OPERATION_DEPTH (); - - u32 bufferID; - glGenBuffers ( 1, &bufferID ); - return bufferID; -} - -//----------------------------------------------------------------// -void* zglMapBuffer ( u32 target ) { - - ASSERT_OPERATION_DEPTH (); - #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) - return 0; - #else - return glMapBuffer ( _remapEnum ( target ), GL_WRITE_ONLY ); - #endif -} - -//----------------------------------------------------------------// -void zglUnmapBuffer ( u32 target ) { - - ASSERT_OPERATION_DEPTH (); - #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) - return; - #else - glUnmapBuffer ( _remapEnum ( target )); - #endif -} - -//================================================================// -// vertex array -//================================================================// - -//----------------------------------------------------------------// -void zglBindVertexArray ( u32 vertexArrayID ) { - - ASSERT_OPERATION_DEPTH (); - - #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) - return; - #else - glBindVertexArray ( vertexArrayID ); - #endif -} - -//----------------------------------------------------------------// -u32 zglCreateVertexArray () { - - ASSERT_OPERATION_DEPTH (); - - #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) - return 0; - #else - u32 vertexArrayID; - glGenVertexArrays ( 1, &vertexArrayID ); - return vertexArrayID; - #endif -} - -//----------------------------------------------------------------// -void zglDeleteVertexArray ( u32 vertexArrayID ) { - - ASSERT_OPERATION_DEPTH (); - - #if defined( MOAI_OS_ANDROID ) || defined( MOAI_OS_HTML ) - return; - #else - glDeleteVertexArrays ( 1, &vertexArrayID ); - #endif -} - -#endif diff --git a/src/zl-util/STLMap.h b/src/zl-util/STLMap.h index bfb7deee24..7ca2230f5d 100644 --- a/src/zl-util/STLMap.h +++ b/src/zl-util/STLMap.h @@ -54,7 +54,7 @@ class STLMap < KEY, TYPE*, COMPARE > : typedef typename map < KEY, TYPE* >::iterator iterator; //----------------------------------------------------------------// - bool contains ( const KEY& key ) { + bool contains ( const KEY& key ) const { return ( this->find ( key ) != this->end ()); } diff --git a/src/zl-util/STLString.cpp b/src/zl-util/STLString.cpp index 1a6d657ddb..5cb249aa4d 100644 --- a/src/zl-util/STLString.cpp +++ b/src/zl-util/STLString.cpp @@ -203,46 +203,12 @@ void STLString::write ( cc8* format, ... ) { //----------------------------------------------------------------// void STLString::write_var ( cc8* format, va_list args ) { - static const u32 BUFFER_SIZE = 1024; - char stackBuffer [ BUFFER_SIZE ]; - char* buffer = stackBuffer; - int buffSize = BUFFER_SIZE; - - int result; - - for ( ;; ) { - - va_list copy; - va_copy ( copy, args ); - result = vsnprintf ( buffer, buffSize, format, copy ); - va_end ( copy ); - - // thanks to http://perfec.to/vsnprintf/ for a discussion of vsnprintf portability issues - if (( result == buffSize ) || ( result == -1 ) || ( result == buffSize - 1 )) { - buffSize = buffSize << 1; - } - else if ( result > buffSize ) { - buffSize = ( size_t )result + 2; - } - else { - break; - } - - if ( buffer == stackBuffer ) { - buffer = 0; - } - - if ( buffer ) { - buffer = ( char* )realloc ( buffer, buffSize ); - } - else { - buffer = ( char* )malloc ( buffSize ); - } - } + char buffer [ 1024 ]; + char* str = zl_vsnprintf_alloc ( buffer, sizeof ( buffer ), format, args ); this->append ( buffer ); - if ( buffer != stackBuffer ) { + if ( buffer != str ) { free ( buffer ); } } diff --git a/src/zl-util/ZLAdapterInfo_posix.cpp b/src/zl-util/ZLAdapterInfo_posix.cpp index c044429038..db4635b053 100644 --- a/src/zl-util/ZLAdapterInfo_posix.cpp +++ b/src/zl-util/ZLAdapterInfo_posix.cpp @@ -25,6 +25,8 @@ #include "pch.h" +SUPPRESS_EMPTY_FILE_WARNING + #ifndef _WIN32 #include diff --git a/src/zl-util/ZLAdapterInfo_win32.cpp b/src/zl-util/ZLAdapterInfo_win32.cpp index 513c39e399..65cce9c49b 100644 --- a/src/zl-util/ZLAdapterInfo_win32.cpp +++ b/src/zl-util/ZLAdapterInfo_win32.cpp @@ -3,6 +3,8 @@ #include "pch.h" +SUPPRESS_EMPTY_FILE_WARNING + #ifdef _WIN32 #include diff --git a/src/zl-util/ZLBase64Reader.cpp b/src/zl-util/ZLBase64Reader.cpp index 03a6648aa1..eb956afc4f 100644 --- a/src/zl-util/ZLBase64Reader.cpp +++ b/src/zl-util/ZLBase64Reader.cpp @@ -12,7 +12,7 @@ // returns an approx. len no smaller than actual decoded size size_t ZLBase64Reader::EstimateDecodedLength ( size_t encodedLength ) { - return 3 * ( size_t )ceilf (( double )encodedLength / 4.0 ); // should not need ceil + return 3 * ( size_t )ceil (( double )encodedLength / 4.0 ); // should not need ceil } //----------------------------------------------------------------// @@ -29,7 +29,7 @@ void ZLBase64Reader::OnClose () { } //----------------------------------------------------------------// -size_t ZLBase64Reader::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLBase64Reader::ReadBytes ( void* buffer, size_t size ) { size_t remainder = size; while ( remainder ) { @@ -61,14 +61,14 @@ size_t ZLBase64Reader::ReadBytes ( void* buffer, size_t size ) { } } - return size - remainder; + ZL_RETURN_SIZE_RESULT ( size - remainder, ZL_OK ); } //----------------------------------------------------------------// -int ZLBase64Reader::SetCursor ( long offset ) { +ZLResultCode ZLBase64Reader::SetCursor ( size_t offset ) { - this->mCursor = offset; - return 0; + this->mCursor = offset; // TODO: check bounds and report error + return ZL_OK; } //----------------------------------------------------------------// @@ -81,7 +81,7 @@ void ZLBase64Reader::SyncBlock () { this->mBlockID = blockID; size_t cryptBlockAddr = ( blockID * ZLBase64Encoder::CRYPT_BLOCK_SIZE ) + this->mBase; - this->mProxiedStream->Seek ( cryptBlockAddr, SEEK_SET ); + this->mProxiedStream->Seek (( long )cryptBlockAddr, SEEK_SET ); u8 cryptBlock [ ZLBase64Encoder::CRYPT_BLOCK_SIZE ]; this->mEncoder.FormatCryptBlock ( cryptBlock ); diff --git a/src/zl-util/ZLBase64Reader.h b/src/zl-util/ZLBase64Reader.h index e09d76c751..820ebaee43 100644 --- a/src/zl-util/ZLBase64Reader.h +++ b/src/zl-util/ZLBase64Reader.h @@ -21,7 +21,7 @@ class ZLBase64Reader : //----------------------------------------------------------------// void OnClose (); - size_t ReadBytes ( void* buffer, size_t size ); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); void SyncBlock (); public: @@ -29,9 +29,9 @@ class ZLBase64Reader : //----------------------------------------------------------------// static size_t EstimateDecodedLength ( size_t encodedLength ); u32 GetCaps (); - int SetCursor ( long offset ); + int SetCursor ( size_t offset ); ZLBase64Reader (); ~ZLBase64Reader (); }; -#endif \ No newline at end of file +#endif diff --git a/src/zl-util/ZLBase64Writer.cpp b/src/zl-util/ZLBase64Writer.cpp index cf1d64713b..839860e892 100644 --- a/src/zl-util/ZLBase64Writer.cpp +++ b/src/zl-util/ZLBase64Writer.cpp @@ -12,7 +12,7 @@ // returns an approx. len no smaller than actual encoded size size_t ZLBase64Writer::EstimateEncodedLength ( size_t plainLength ) { - return 4 * ( size_t )ceilf (( double )plainLength / 3.0 ); + return 4 * ( size_t )ceil (( double )plainLength / 3.0 ); } //----------------------------------------------------------------// @@ -41,14 +41,14 @@ void ZLBase64Writer::OnClose () { } //----------------------------------------------------------------// -bool ZLBase64Writer::OnOpen () { +ZLResultCode ZLBase64Writer::OnOpen () { this->mEncoder.FormatPlainBlock ( this->mPlainBlock ); - return true; + return ZL_OK; } //----------------------------------------------------------------// -size_t ZLBase64Writer::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLBase64Writer::WriteBytes ( const void* buffer, size_t size ) { u8 crypt [ ZLBase64Encoder::CRYPT_BLOCK_SIZE ]; @@ -56,8 +56,8 @@ size_t ZLBase64Writer::WriteBytes ( const void* buffer, size_t size ) { while ( remainder ) { // space remaining in current block - u32 blockCursor = this->mCursor % ZLBase64Encoder::PLAIN_BLOCK_SIZE; - u32 blockRemainder = ZLBase64Encoder::PLAIN_BLOCK_SIZE - blockCursor; + size_t blockCursor = this->mCursor % ZLBase64Encoder::PLAIN_BLOCK_SIZE; + size_t blockRemainder = ZLBase64Encoder::PLAIN_BLOCK_SIZE - blockCursor; size_t copySize = remainder; if ( copySize > blockRemainder ) { @@ -87,7 +87,8 @@ size_t ZLBase64Writer::WriteBytes ( const void* buffer, size_t size ) { if ( this->mLength < this->mCursor ) { this->mLength = this->mCursor; } - return size - remainder; + + ZL_RETURN_SIZE_RESULT ( size - remainder, ZL_OK ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLBase64Writer.h b/src/zl-util/ZLBase64Writer.h index 30e9394582..1a397c89ee 100644 --- a/src/zl-util/ZLBase64Writer.h +++ b/src/zl-util/ZLBase64Writer.h @@ -19,8 +19,8 @@ class ZLBase64Writer : //----------------------------------------------------------------// void OnClose (); - bool OnOpen (); - size_t WriteBytes ( const void* buffer, size_t size ); + ZLResultCode OnOpen (); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); public: diff --git a/src/zl-util/ZLBitBuffer.cpp b/src/zl-util/ZLBitBuffer.cpp index bc32df3f14..25a6d9fea0 100644 --- a/src/zl-util/ZLBitBuffer.cpp +++ b/src/zl-util/ZLBitBuffer.cpp @@ -64,12 +64,12 @@ void decode_bin ( void* buffer, cc8* str ) { u8* bytes = ( u8* )buffer; for ( size_t i = 0; str [ i ]; ++i ) { - u32 bit = str [ i ] == '1' ? 1 : 0; + size_t bit = str [ i ] == '1' ? 1 : 0; - u32 byte = i >> 3; - u32 shift = i & 0x07; + size_t byte = i >> 3; + size_t shift = i & 0x07; - bytes [ byte ] = ( bytes [ byte ] & ~( 1 << shift )) | ( bit << shift ); + bytes [ byte ] = ( u8 )(( bytes [ byte ] & ~( 1 << shift )) | ( bit << shift )); } } @@ -82,10 +82,10 @@ void print_bin ( const void* buffer, size_t size ) { for ( size_t i = 0; i < size; ++i ) { - u32 byte = i >> 3; - u32 shift = i & 0x07; + size_t byte = i >> 3; + size_t shift = i & 0x07; - u32 bit = ( bytes [ byte ] & ( 1 << shift )); + size_t bit = ( bytes [ byte ] & ( 1 << shift )); str.write ( bit ? "1" : "0" ); } @@ -140,7 +140,7 @@ void ZLBitBuffer::Blit ( void* dest, size_t destX, const void* src, size_t srcX, // we don't have to bitshift; just handle the two edges (if any) and memcopy the rest - size_t mod = srcMod; + u32 mod = srcMod; if ( mod ) { u32 b = 8 - mod; @@ -190,10 +190,10 @@ void ZLBitBuffer::Blit ( void* dest, size_t destX, const void* src, size_t srcX, srcValue = ( srcValue + ( *srcBytes << ( 8 - srcMod ))) & mask; } - destBytes [ 0 ] = ( *destBytes & ~( mask << destMod )) | ( srcValue << destMod ); + destBytes [ 0 ] = ( u8 )(( *destBytes & ~( mask << destMod )) | ( srcValue << destMod )); if (( destMod + n ) > 8 ) { - destBytes [ 1 ] = ( destBytes [ 1 ] & ~( mask >> ( 8 - destMod ))) | ( srcValue >> ( 8 - destMod )); + destBytes [ 1 ] = ( u8 )(( destBytes [ 1 ] & ~( mask >> ( 8 - destMod ))) | ( srcValue >> ( 8 - destMod ))); } } } @@ -325,7 +325,6 @@ u32 ZLBitBuffer::GetValue ( const void* buffer, size_t x, u32 bitDepth ) { } return value; } - return 0; } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLByteStream.cpp b/src/zl-util/ZLByteStream.cpp index 29b210303a..588284c989 100644 --- a/src/zl-util/ZLByteStream.cpp +++ b/src/zl-util/ZLByteStream.cpp @@ -61,18 +61,15 @@ void* ZLByteStream::GetWriteBuffer () { } //----------------------------------------------------------------// -size_t ZLByteStream::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLByteStream::ReadBytes ( void* buffer, size_t size ) { - if (( this->mCursor + size ) > this->mLength ) { - size = this->mLength - this->mCursor; - } + size_t readSize = (( this->mCursor + size ) > this->mLength ) ? ( this->mLength - this->mCursor ) : size; - if ( size ) { - memcpy ( buffer, &(( u8* )this->mReadBuffer )[ this->mCursor ], size ); - this->mCursor += size; + if ( readSize ) { + memcpy ( buffer, &(( u8* )this->mReadBuffer )[ this->mCursor ], readSize ); + this->mCursor += readSize; } - - return size; + ZL_RETURN_SIZE_RESULT ( readSize, ZL_OK ); } //----------------------------------------------------------------// @@ -95,36 +92,34 @@ void ZLByteStream::SetBuffer ( const void* buffer, size_t size, size_t length ) } //----------------------------------------------------------------// -int ZLByteStream::SetCursor ( long offset ) { +ZLResultCode ZLByteStream::SetCursor ( size_t offset ) { - this->mCursor = offset > 0 ? offset : 0; - return 0; + if ( this->mLength < offset ) return ZL_ERROR; + + this->mCursor = offset; + return ZL_OK; } //----------------------------------------------------------------// -size_t ZLByteStream::SetLength ( size_t length ) { +ZLSizeResult ZLByteStream::SetLength ( size_t length ) { - length = length > this->mCapacity ? this->mCapacity : length; - this->mLength = length; - return length; + this->mLength = length > this->mCapacity ? this->mCapacity : length; + ZL_RETURN_SIZE_RESULT ( length, length <= this->mCapacity ? ZL_OK : ZL_ERROR ); } //----------------------------------------------------------------// -size_t ZLByteStream::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLByteStream::WriteBytes ( const void* buffer, size_t size ) { - if (( this->mCursor + size ) > this->mCapacity ) { - size = this->mCapacity - this->mCursor; - } + size_t writeSize = (( this->mCursor + size ) > this->mCapacity ) ? ( this->mCapacity - this->mCursor ) : size; - if ( size ) { - memcpy ( &(( u8* )this->mWriteBuffer )[ this->mCursor ], buffer, size ); - this->mCursor += size; + if ( writeSize ) { + memcpy ( &(( u8* )this->mWriteBuffer )[ this->mCursor ], buffer, writeSize ); + this->mCursor += writeSize; if ( this->mLength < this->mCursor ) { this->mLength = this->mCursor; } - return size; } - return 0; + ZL_RETURN_SIZE_RESULT ( writeSize, ZL_OK ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLByteStream.h b/src/zl-util/ZLByteStream.h index 51cb2cc796..4e37d0ffcb 100644 --- a/src/zl-util/ZLByteStream.h +++ b/src/zl-util/ZLByteStream.h @@ -20,7 +20,7 @@ class ZLByteStream : size_t mCapacity; //----------------------------------------------------------------// - int SetCursor ( long offset ); + ZLResultCode SetCursor ( size_t offset ); public: @@ -32,11 +32,11 @@ class ZLByteStream : size_t GetLength (); const void* GetReadBuffer (); void* GetWriteBuffer (); - size_t ReadBytes ( void* buffer, size_t size ); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); void SetBuffer ( void* buffer, size_t size, size_t length = 0 ); void SetBuffer ( const void* buffer, size_t size, size_t length = 0 ); - size_t SetLength ( size_t length ); - size_t WriteBytes ( const void* buffer, size_t size ); + ZLSizeResult SetLength ( size_t length ); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); void WriteBytesUnsafe ( const void* buffer, size_t size ); ZLByteStream (); ~ZLByteStream (); diff --git a/src/zl-util/ZLCleanup.h b/src/zl-util/ZLCleanup.h new file mode 100644 index 0000000000..2ee1427918 --- /dev/null +++ b/src/zl-util/ZLCleanup.h @@ -0,0 +1,45 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLCLEANUP_H +#define ZLCLEANUP_H + +//================================================================// +// ZLCleanup +//================================================================// +template < typename TYPE > +class ZLCleanup { +protected: + + typedef void ( TYPE::*SelectorType )(); + + TYPE* mTarget; + SelectorType mSelector; + +public: + + //----------------------------------------------------------------// + virtual void Skip () { + this->mTarget = 0; + this->mSelector = 0; + } + + //----------------------------------------------------------------// + ZLCleanup ( TYPE* target, SelectorType selector ) : + mTarget ( target ), + mSelector ( selector ) { + + assert ( target ); + assert ( selector ); + } + + //----------------------------------------------------------------// + ~ZLCleanup () { + + if ( this->mTarget && this->mSelector ) { + ( this->mTarget->*this->mSelector )(); + } + } +}; + +#endif diff --git a/src/zl-util/ZLColor.cpp b/src/zl-util/ZLColor.cpp index 8035593621..fe4446fb97 100644 --- a/src/zl-util/ZLColor.cpp +++ b/src/zl-util/ZLColor.cpp @@ -50,10 +50,10 @@ u32 ZLColor::AddAndClamp ( u32 c0, u32 c1 ) { u32 r32; u8* rb32 = ( u8* )&r32; - rb32 [ R_BYTE ] = r > 0xff ? 0xff : r; - rb32 [ G_BYTE ] = g > 0xff ? 0xff : g; - rb32 [ B_BYTE ] = b > 0xff ? 0xff : b; - rb32 [ A_BYTE ] = a > 0xff ? 0xff : a; + rb32 [ R_BYTE ] = r > 0xff ? 0xff : ( u8 )r; + rb32 [ G_BYTE ] = g > 0xff ? 0xff : ( u8 )g; + rb32 [ B_BYTE ] = b > 0xff ? 0xff : ( u8 )b; + rb32 [ A_BYTE ] = a > 0xff ? 0xff : ( u8 )a; return r32; } @@ -811,8 +811,7 @@ void ZLColor::PremultiplyAlpha ( void* colors, ColorFormat format, u32 nColors ) for ( u32 i = 0; i < nColors; ++i ) { color = *( u32* )colors; alpha = ( color >> 0x18 ) & 0xFF; - *( u16* )colors = ( u16 )( (( color & 0xFF ) * alpha ) >> 0x08 ) + - ( alpha << 0x08 ); + *( u16* )colors = ( u16 )(((( color & 0xFF ) * alpha ) >> 0x08 ) + ( alpha << 0x08 )); colors = ( void* )(( size_t )colors + 2 ); } break; @@ -890,11 +889,14 @@ ZLColorVec ZLColor::Set ( u32 c0 ) { } //----------------------------------------------------------------// +// TODO: WTF is this? u32 ZLColor::Set ( u32 c0, u8 b, u8 v ) { - + UNUSED ( b ); + UNUSED ( v ); + u32 r32 = c0; - u8* rb32 = ( u8* )&r32; - + //u8* rb32 = ( u8* )&r32; + return r32; } @@ -1005,10 +1007,10 @@ u32 ZLColor::SubAndClamp ( u32 c0, u32 c1 ) { u32 r32; u8* rb32 = ( u8* )&r32; - rb32 [ R_BYTE ] = r > 0xff ? 0 : r; - rb32 [ G_BYTE ] = g > 0xff ? 0 : g; - rb32 [ B_BYTE ] = b > 0xff ? 0 : b; - rb32 [ A_BYTE ] = a > 0xff ? 0 : a; + rb32 [ R_BYTE ] = r > 0xff ? 0 : ( u8 )r; + rb32 [ G_BYTE ] = g > 0xff ? 0 : ( u8 )g; + rb32 [ B_BYTE ] = b > 0xff ? 0 : ( u8 )b; + rb32 [ A_BYTE ] = a > 0xff ? 0 : ( u8 )a; return r32; } @@ -1051,10 +1053,16 @@ void ZLColorVec::AddAndClamp ( const ZLColorVec& c ) { this->mB += c.mB; this->mA += c.mA; - this->mR = this->mR < 1.0f ? this->mR : 1.0f; - this->mG = this->mG < 1.0f ? this->mG : 1.0f; - this->mB = this->mB < 1.0f ? this->mB : 1.0f; - this->mA = this->mA < 1.0f ? this->mA : 1.0f; + this->Clamp (); +} + +//----------------------------------------------------------------// +void ZLColorVec::Clamp () { + + this->mR = ZLFloat::Clamp ( this->mR, 0.0f, 1.0f ); + this->mG = ZLFloat::Clamp ( this->mG, 0.0f, 1.0f ); + this->mB = ZLFloat::Clamp ( this->mB, 0.0f, 1.0f ); + this->mA = ZLFloat::Clamp ( this->mA, 0.0f, 1.0f ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLColor.h b/src/zl-util/ZLColor.h index b6cfd2e8d9..a0912fee1c 100644 --- a/src/zl-util/ZLColor.h +++ b/src/zl-util/ZLColor.h @@ -9,13 +9,13 @@ class ZLColorVec; class ZLColorBlendFunc; -#define LUMA_601_R 0.299 -#define LUMA_601_G 0.587 -#define LUMA_601_B 0.114 +#define LUMA_601_R 0.299f +#define LUMA_601_G 0.587f +#define LUMA_601_B 0.114f -#define LUMA_709_R 0.2126 -#define LUMA_709_G 0.7152 -#define LUMA_709_B 0.0722 +#define LUMA_709_R 0.2126f +#define LUMA_709_G 0.7152f +#define LUMA_709_B 0.0722f //================================================================// // ZLColor @@ -125,6 +125,7 @@ class ZLColorVec { //----------------------------------------------------------------// void Add ( const ZLColorVec& c ); void AddAndClamp ( const ZLColorVec& c ); + void Clamp (); bool Compare ( const ZLColorVec& c ); bool Compare ( const ZLColorVec& c, float res ); void FromHSV ( float h, float s, float v ); diff --git a/src/zl-util/ZLCopyOnWrite.cpp b/src/zl-util/ZLCopyOnWrite.cpp new file mode 100644 index 0000000000..c62693425a --- /dev/null +++ b/src/zl-util/ZLCopyOnWrite.cpp @@ -0,0 +1,286 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include + +//================================================================// +// ZLCopyOnWriteBuffer +//================================================================// + +//----------------------------------------------------------------// +ZLCopyOnWriteBuffer::ZLCopyOnWriteBuffer () : + mBuffer ( 0 ), + mSize ( 0 ), + mLength ( 0 ) { +} + +//----------------------------------------------------------------// +ZLCopyOnWriteBuffer::~ZLCopyOnWriteBuffer () { + + if ( this->mBuffer ) { + free ( this->mBuffer ); + } +} + +//================================================================// +// ZLCopyOnWrite +//================================================================// + +//----------------------------------------------------------------// +void* ZLCopyOnWrite::Alloc ( size_t size ) { + + this->Free (); + if ( !size ) return 0; + + if ( !this->mInternal ) { + + this->mInternal = new ZLCopyOnWriteBuffer (); + this->mInternal->Retain (); + } + + void* buffer = malloc ( size ); + + if ( buffer ) { + this->mInternal->mBuffer = buffer; + this->mInternal->mSize = size; + this->mInternal->mLength = size; + } + return buffer; +} + +//----------------------------------------------------------------// +void* ZLCopyOnWrite::Alloc ( size_t size, u8 fill ) { + + void* buffer = this->Alloc ( size ); + if ( buffer ) { + memset ( buffer, fill, size ); + } + return buffer; +} + +//----------------------------------------------------------------// +void* ZLCopyOnWrite::Alloc ( size_t size, const void* fill ) { + + void* buffer = this->Alloc ( size ); + if ( buffer ) { + memcpy ( buffer, fill, size ); + } + return buffer; +} + +//----------------------------------------------------------------// +void ZLCopyOnWrite::Assign ( const ZLCopyOnWrite& assign ) { + + if ( this->mInternal != assign.mInternal ) { + + this->Free (); + + this->mInternal = assign.mInternal; + + if ( this->mInternal ) { + this->mInternal->Retain (); + } + } + this->mCursor = assign.mCursor; +} + +//----------------------------------------------------------------// +void ZLCopyOnWrite::Free () { + + this->mCursor = 0; + + if ( this->mInternal ) { + this->mInternal->Release (); + this->mInternal = 0; + } +} + +//----------------------------------------------------------------// +const void* ZLCopyOnWrite::GetBuffer () const { + + return this->mInternal ? this->mInternal->mBuffer : 0; +} + +//----------------------------------------------------------------// +u32 ZLCopyOnWrite::GetCaps () { + + return CAN_READ | CAN_WRITE | CAN_SEEK; +} + +//----------------------------------------------------------------// +size_t ZLCopyOnWrite::GetCursor () { + + return this->mCursor; +} + +//----------------------------------------------------------------// +size_t ZLCopyOnWrite::GetLength () { + + return this->mInternal ? this->mInternal->mLength : 0; +} + +//----------------------------------------------------------------// +size_t ZLCopyOnWrite::GetSize () const { + + return this->mInternal ? this->mInternal->mSize : 0; +} + +//----------------------------------------------------------------// +void* ZLCopyOnWrite::Invalidate () { + + // if the internal buffer has been referenced by more than one client, + // we're going to abandon it and create a new internal buffer + + if (( this->mInternal ) && ( this->mInternal->GetRefCount () > 1 )) { + + // original buffer + ZLCopyOnWriteBuffer* original = this->mInternal; + + // new buffer to hold locally + this->mInternal = new ( ZLCopyOnWriteBuffer ); + this->mInternal->Retain (); + + // grab the original buffer + this->mInternal->mBuffer = malloc ( original->mSize ); + this->mInternal->mSize = original->mSize; + this->mInternal->mLength = original->mLength; + + // just copy the length (as we don't need the entire buffer) + assert ( this->mInternal->mBuffer ); + memcpy ( this->mInternal->mBuffer, original->mBuffer, original->mLength ); + + // one less client for the original + original->Release (); + } + return this->mInternal ? this->mInternal->mBuffer : 0; +} + +//----------------------------------------------------------------// +ZLSizeResult ZLCopyOnWrite::ReadBytes ( void* buffer, size_t size ) { + + ZLCopyOnWriteBuffer* internal = this->mInternal; + size_t readSize = 0; + + if ( internal ) { + + readSize = (( this->mCursor + size ) > internal->mLength ) ? ( internal->mLength - this->mCursor ) : size; + + if ( readSize ) { + memcpy ( buffer, ( const void* )(( size_t )internal->mBuffer + this->mCursor ), readSize ); + this->mCursor += readSize; + } + } + ZL_RETURN_SIZE_RESULT ( readSize, ZL_OK ); +} + +//----------------------------------------------------------------// +void* ZLCopyOnWrite::Reserve ( size_t size ) { + + void* buffer = this->Alloc ( size ); + this->SetLength ( size ); + return buffer; +} + +//----------------------------------------------------------------// +ZLResultCode ZLCopyOnWrite::SetCursor ( size_t offset ) { + + size_t length = this->GetLength (); + + if (( offset < 0 ) || ( length < ( size_t )offset )) return ZL_ERROR; + + this->mCursor = offset; + return 0; +} + +//----------------------------------------------------------------// +ZLSizeResult ZLCopyOnWrite::SetLength ( size_t length ) { + + ZLCopyOnWriteBuffer* internal = this->mInternal; + + if ( internal ) { + + length = length > internal->mLength ? internal->mLength : length; + + if ( length< internal->mLength ) { + this->Invalidate (); + } + internal->mLength = length; + + if ( this->mCursor > length ) { + this->mCursor = length; + } + ZL_RETURN_SIZE_RESULT ( length, ZL_OK ); + } + ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); +} + +//----------------------------------------------------------------// +ZLSizeResult ZLCopyOnWrite::WriteBytes ( const void* buffer, size_t size ) { + + ZLCopyOnWriteBuffer* internal = this->mInternal; + size_t writeSize = 0; + + if ( internal ) { + + if ( this->mCursor < internal->mLength ) { + this->Invalidate (); + } + + writeSize = (( this->mCursor + size ) > internal->mSize ) ? ( internal->mSize - this->mCursor ) : size; + + if ( writeSize ) { + memcpy (( void* )(( size_t )internal->mBuffer + this->mCursor ), buffer, writeSize ); + this->mCursor += writeSize; + if ( internal->mLength < this->mCursor ) { + internal->mLength = this->mCursor; + } + } + } + ZL_RETURN_SIZE_RESULT ( writeSize, ZL_OK ); +} + +//----------------------------------------------------------------// +ZLCopyOnWrite::ZLCopyOnWrite () : + mInternal ( 0 ), + mCursor ( 0 ) { +} + +//----------------------------------------------------------------// +ZLCopyOnWrite::ZLCopyOnWrite ( size_t size ) : + mInternal ( 0 ), + mCursor ( 0 ) { + + this->Alloc ( size ); +} + +//----------------------------------------------------------------// +ZLCopyOnWrite::ZLCopyOnWrite ( size_t size, u8 fill ) : + mInternal ( 0 ), + mCursor ( 0 ) { + + this->Alloc ( size, fill ); +} + +//----------------------------------------------------------------// +ZLCopyOnWrite::ZLCopyOnWrite ( size_t size, const void* fill ) : + mInternal ( 0 ), + mCursor ( 0 ) { + + this->Alloc ( size, fill ); +} + +//----------------------------------------------------------------// +ZLCopyOnWrite::ZLCopyOnWrite ( const ZLCopyOnWrite& copy ) : + mInternal ( 0 ), + mCursor ( 0 ) { + + this->Assign ( copy ); +} + +//----------------------------------------------------------------// +ZLCopyOnWrite::~ZLCopyOnWrite () { + + this->Free (); +} diff --git a/src/zl-util/ZLCopyOnWrite.h b/src/zl-util/ZLCopyOnWrite.h new file mode 100644 index 0000000000..d05af321da --- /dev/null +++ b/src/zl-util/ZLCopyOnWrite.h @@ -0,0 +1,79 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLCOPYONWRITE_H +#define ZLCOPYONWRITE_H + +#include +#include + +//================================================================// +// ZLCopyOnWriteBuffer +//================================================================// +class ZLCopyOnWriteBuffer : + public ZLSharedMutableBuffer { +private: + + friend class ZLCopyOnWrite; + + void* mBuffer; + size_t mSize; + size_t mLength; + +public: + + GET_CONST ( void*, ConstData, mBuffer ) + GET ( void*, MutableData, mBuffer ) + GET ( size_t, Size, mLength ) + + //----------------------------------------------------------------// + ZLCopyOnWriteBuffer (); + ~ZLCopyOnWriteBuffer (); +}; + +//================================================================// +// ZLCopyOnWrite +//================================================================// +class ZLCopyOnWrite : + public virtual ZLStream { +private: + + ZLCopyOnWriteBuffer* mInternal; + size_t mCursor; + +public: + + GET ( ZLSharedConstBuffer*, SharedConstBuffer, mInternal ) + + //----------------------------------------------------------------// + void* Alloc ( size_t size ); + void* Alloc ( size_t size, u8 fill ); + void* Alloc ( size_t size, const void* fill ); + void Assign ( const ZLCopyOnWrite& assign ); + void Free (); + const void* GetBuffer () const; + u32 GetCaps (); + size_t GetCursor (); + size_t GetLength (); + size_t GetSize () const; + void* Invalidate (); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); + void* Reserve ( size_t size ); + ZLResultCode SetCursor ( size_t offset ); + ZLSizeResult SetLength ( size_t length ); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); + ZLCopyOnWrite (); + ZLCopyOnWrite ( size_t size ); + ZLCopyOnWrite ( size_t size, u8 fill ); + ZLCopyOnWrite ( size_t size, const void* fill ); + ZLCopyOnWrite ( const ZLCopyOnWrite& assign ); + ~ZLCopyOnWrite (); + + //----------------------------------------------------------------// + inline ZLCopyOnWrite& operator= ( const ZLCopyOnWrite& rhs ) { + this->Assign ( rhs ); + return *this; + } +}; + +#endif diff --git a/src/zl-util/ZLCubicBezier2D.cpp b/src/zl-util/ZLCubicBezier2D.cpp new file mode 100644 index 0000000000..f8997225e8 --- /dev/null +++ b/src/zl-util/ZLCubicBezier2D.cpp @@ -0,0 +1,566 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include + +//================================================================// +// ZLCubicBezier2D +//================================================================// + +//----------------------------------------------------------------// +float ZLCubicBezier2D::Angle () { + // Compute angle between (p0,p1) and (p2,p3) + + float dx0 = this->mP1.mX - this->mP0.mX; + float dy0 = this->mP1.mY - this->mP0.mY; + float dx1 = this->mP3.mX - this->mP2.mX; + float dy1 = this->mP3.mY - this->mP2.mY; + + float angle = ( float )atan2 ( ABS (( dx0 * dy1 ) - ( dy0 * dx1 )), ( dx0 * dx1 ) + ( dy0 * dy1 )); + return angle; +} + +//----------------------------------------------------------------// +void ZLCubicBezier2D::Bless () { + + //if ( this->mP0.Equals ( this->mP1 )) this->mP1 = this->mP2; + //if ( this->mP3.Equals ( this->mP2 )) this->mP2 = this->mP1; + + if ( this->mP0.Equals ( this->mP1 )) this->mP1 = this->mP2; + if ( this->mP1.Equals ( this->mP2 )) this->mP2 = this->mP3; + if ( this->mP0.Equals ( this->mP1 )) this->mP1 = this->mP2; +} + +//----------------------------------------------------------------// +ZLVec2D ZLCubicBezier2D::Evaluate ( float t ) const { + + float tM = 1.0f - t; + + float b = tM * tM; + float c = t * t; + float d = c * t; + float a = b * tM; + + b *= 3.0f * t; + c *= 3.0f * tM; + + ZLVec2D v; + + v.mX = a * this->mP0.mX + b * this->mP1.mX + c * this->mP2.mX + d * this->mP3.mX; + v.mY = a * this->mP0.mY + b * this->mP1.mY + c * this->mP2.mY + d * this->mP3.mY; + + return v; +} + +//----------------------------------------------------------------// +void ZLCubicBezier2D::FindInflectionDomain ( float t, float& t0, float& t1, float flatness ) const { + + // for a given inflection point, find the domain around the point where + // the curve is 'flat' and can be approximated by a line + + const float EPSILON = 1e-5f; + const float POWER = 1.0f/3.0f; + + t0 = t; + t1 = 1; + + // TODO: need to use split instead of segment since we don't care about left? + ZLCubicBezier2D right; + + // why not just use segment for both? + if ( fabs ( t - 1.0 ) > EPSILON ) { + ZLCubicBezier2D left; + this->Split ( t, left, right ); + } + else { + right = this->Split ( 1.0f, 2.0f ); + } + + float dx = right.mP1.mX - right.mP0.mX; + float dy = right.mP1.mY - right.mP0.mY; + + float norm = Sqrt (( dx * dx ) + ( dy * dy )); + + if ( norm != 0.0f ) { + + float s4 = ( float )fabs ((( this->mP3.mX - this->mP0.mX ) * dy ) - (( this->mP3.mY - this->mP0.mY ) * dx )) / norm; + float tf = ( float )pow ( flatness / s4, POWER ); + + if ( ABS ( t - 1.0f ) > EPSILON ) { + t0 = t - tf * ( 1.0f - t ); + t1 = t + tf * ( 1.0f - t ); + } + else { + t0 = 1.0f - ( float )( EPSILON * tf ); + t1 = 1.0f + ( float )( EPSILON * tf ); + } + } +} + +//----------------------------------------------------------------// +u32 ZLCubicBezier2D::FindInflections ( float& t0, float& t1 ) const { + + const ZLVec2D& p0 = this->mP0; + const ZLVec2D& p1 = this->mP1; + const ZLVec2D& p2 = this->mP2; + const ZLVec2D& p3 = this->mP3; + + // math from 'Precise Flattening of Cubic Bezier Segments' + // ~ Hain, Ahmad, Langan + + /// A, B, C - first three coefficients of f(t) via the Bezier matrix + + float ax = -p0.mX + ( 3.0f * p1.mX ) - ( 3.0f * p2.mX ) + p3.mX; + float ay = -p0.mY + ( 3.0f * p1.mY ) - ( 3.0f * p2.mY ) + p3.mY; + + float bx = ( 3.0f * p0.mX ) - ( 6.0f * p1.mX ) + ( 3.0f * p2.mX ); + float by = ( 3.0f * p0.mY ) - ( 6.0f * p1.mY ) + ( 3.0f * p2.mY ); + + float cx = -( 3.0f * p0.mX ) + ( 3.0f * p1.mX ); + float cy = -( 3.0f * p0.mY ) + ( 3.0f * p1.mY ); + + // At inflection points the component of the acceleration (second + // derivative of position) perpendicular to the velocity (first + // derivative of position) is zero; the cross product of the + // two vectors is zero. Thus: + + // 6*(ay*bx-ax*by)*t^2 + 6*(ay*cx-ax*cy)*t + 2*(by*cx-bx*cy) + + // Solving for this quadratic equation yields the parametric + // positions t0 and t1 of the inflection points, if they exist. + + float ab = ( ay * bx ) - ( ax * by ); + float ac = ( ay * cx ) - ( ax * cy ); + float bc = ( by * cx ) - ( bx * cy ); + + // Dont want a straight line if P0.x == P1.x or P0.y == P1.y + if ( cx == 0.0f || cy == 0.0f ) { + return NONE; + } + + if (( ac == 0.0f ) || ( bc == 0.0f )) { + return DEGENERATE; + } + + if ( ab == 0.0f ) { + t0 = -bc / ( 3.0f * ac ); + return ONE_INFLECTION; + } + + float tcusp = -0.5f * ( ac / ab ); + float d = ( tcusp * tcusp ) - ( bc / ( 3.0f * ab )); + + if ( d > 0.0f ) { + + d = Sqrt ( d ); + + t0 = tcusp - d; + t1 = tcusp + d; + + return TWO_INFLECTIONS; + } + + if ( d == 0.0f ) { + t0 = tcusp; + return ONE_CUSP; + } + + return NONE; +} + +//----------------------------------------------------------------// +void ZLCubicBezier2D::Flatten ( ZLAbstractVertexWriter2D& writer, float flatness, float angle ) const { + + ZLCubicBezierFlattener2D flattener; + flattener.Init ( *this, flatness, angle ); + + while ( flattener.More ()) { + writer.WriteVertex ( flattener.Next ()); + } +} + +//----------------------------------------------------------------// +float ZLCubicBezier2D::GetFlattenedLength ( float flatness, float angle ) { + + float length = 0.0f; + + ZLCubicBezierFlattener2D flattener; + flattener.Init ( *this, flatness, angle ); + + if ( flattener.More ()) { + + ZLVec2D v0 = flattener.Next (); + + while ( flattener.More ()) { + + ZLVec2D v1 = flattener.Next (); + length += v0.Dist ( v1 ); + v0 = v1; + } + } + + return length; +} + +//----------------------------------------------------------------// +size_t ZLCubicBezier2D::GetFlattenedSize ( float flatness, float angle ) { + + size_t size = 0; + + ZLCubicBezierFlattener2D flattener; + flattener.Init ( *this, flatness, angle ); + + for ( ; flattener.More (); flattener.Next (), size++ ); + + return size; +} + +//----------------------------------------------------------------// +void ZLCubicBezier2D::Split ( float t, ZLCubicBezier2D& left, ZLCubicBezier2D& right ) const { + + // Split curve at t into left and right cubic bezier curves + + left.mP0 = this->mP0; + + left.mP1 = ZLVec2D::Lerp ( this->mP0, this->mP1, t ); + left.mP2 = ZLVec2D::Lerp ( this->mP1, this->mP2, t ); + + right.mP2 = ZLVec2D::Lerp ( this->mP2, this->mP3, t ); + right.mP1 = ZLVec2D::Lerp ( left.mP2, right.mP2, t ); + + left.mP2 = ZLVec2D::Lerp ( left.mP1, left.mP2, t ); + left.mP3 = ZLVec2D::Lerp ( left.mP2, right.mP1, t ); + + right.mP0 = left.mP3; + right.mP3 = this->mP3; +} + +//----------------------------------------------------------------// +ZLCubicBezier2D ZLCubicBezier2D::Split ( float t0, float t1 ) const { + // Extract a segment of t curve + + float u0 = 1.0f - t0; + float u1 = 1.0f - t1; + + ZLVec2D a = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP0, ( u0 * u0 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( 2.0f * t0 * u0 )), ZLVec2D::Scale ( this->mP2, ( t0 * t0 )))); + ZLVec2D b = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP0, ( u1 * u1 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( 2.0f * t1 * u1 )), ZLVec2D::Scale ( this->mP2, ( t1 * t1 )))); + ZLVec2D c = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( u0 * u0 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP2, ( 2.0f * t0 * u0 )), ZLVec2D::Scale ( this->mP3, ( t0 * t0 )))); + ZLVec2D d = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( u1 * u1 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP2, ( 2.0f * t1 * u1 )), ZLVec2D::Scale ( this->mP3, ( t1 * t1 )))); + + ZLCubicBezier2D segment; + + segment.mP0 = ZLVec2D::Add ( ZLVec2D::Scale ( a, u0 ), ZLVec2D::Scale ( c, t0 )); + segment.mP1 = ZLVec2D::Add ( ZLVec2D::Scale ( a, u1 ), ZLVec2D::Scale ( c, t1 )); + segment.mP2 = ZLVec2D::Add ( ZLVec2D::Scale ( b, u0 ), ZLVec2D::Scale ( d, t0 )); + segment.mP3 = ZLVec2D::Add ( ZLVec2D::Scale ( b, u1 ), ZLVec2D::Scale ( d, t1 )); + + return segment; +} + +//================================================================// +// ZLCubicBezierFlattener2D +//================================================================// + +//----------------------------------------------------------------// +void ZLCubicBezierFlattener2D::Init ( const ZLCubicBezier2D& curve, float flatness, float angle ) { + + // cribbed from https://github.com/rougier/gl-bezier + + this->mFlatness = flatness; + this->mAngleInRadians = ( float )( angle * D2R ); + + this->mCurveIdx = 0; + this->mVertexIdx = 0; + this->mCommandIdx = 0; + + float cusp = 0.0f; + + float t0_minus = -1.0f; + float t0_plus = -1.0f; + + float t1_minus = 2.0f; + float t1_plus = 2.0f; + + float inflection0; + float inflection1; + + u32 inflections = curve.FindInflections ( inflection0, inflection1 ); + + switch ( inflections ) { + + case ZLCubicBezier2D::ONE_CUSP: { + cusp = inflection0; + break; + } + + case ZLCubicBezier2D::TWO_INFLECTIONS: { + curve.FindInflectionDomain ( inflection0, t0_minus, t0_plus, flatness ); + curve.FindInflectionDomain ( inflection1, t1_minus, t1_plus, flatness ); + break; + + } + + case ZLCubicBezier2D::ONE_INFLECTION: { + curve.FindInflectionDomain ( inflection0, t0_minus, t0_plus, flatness ); + break; + } + + case ZLCubicBezier2D::DEGENERATE: { + this->PushCommand ( curve.mP0 ); // add first point + this->PushCommand ( curve.mP3 ); // add last point + break; + } + } + + if ( inflections != ZLCubicBezier2D::DEGENERATE ) { + + // Split the two domains if they overlap + if (( t0_minus < t1_minus ) && ( t1_minus < t0_plus )) { + t0_plus = t1_minus; + t1_minus = t0_plus; + } + + bool t0_out = ( t0_plus < 0.0f ) || ( t0_minus > 1.0f ); + bool t1_out = ( t1_plus < 0.0f ) || ( t1_minus > 1.0f ); + + bool t0_t1_cross = t1_minus < t0_plus; + + // Make sure the possible out domain is always t1 + // (this will save some specific tests below) + if ( t0_out ) { + + t0_minus = t1_minus; + t0_plus = t1_plus; + t0_out = t1_out; + + t1_minus = 2.0f; + t1_plus = 2.0f; + t1_out = true; + } + + bool t0_in = ( 0.0f < t0_minus ) && ( t0_minus < t0_plus ) && ( t0_plus < 1.0f ); + bool t0_cross_start = ( t0_minus < 0.0f ) && ( 0.0f < t0_plus ) && ( t0_plus < 1.0f ); + bool t0_cross_end = ( 0.0f < t0_minus ) && ( t0_minus < 1.0f ) && ( 1.0f < t0_plus ); + bool t0_cross = t0_cross_start || t0_cross_end; + + bool t1_in = ( 0.0f < t1_minus ) && ( t1_minus < t1_plus ) && ( t1_plus < 1.0f ); + bool t1_cross_end = ( 0.0f < t1_minus ) && ( t1_minus < 1.0f ) && ( 1.0f < t1_plus ); + + this->PushCommand ( curve.mP0 ); // add first point + + ZLCubicBezier2D left; + ZLCubicBezier2D right; + + if ( inflections == ZLCubicBezier2D::ONE_CUSP ) { + + // 3 commands + // 2 curves + // 1 vertex + + curve.Split ( inflection0, left, right ); + this->PushCommand ( left ); + this->PushCommand ( curve.Evaluate ( inflection0 )); // the inflection point + this->PushCommand ( right ); + } + else { + + if ( t0_out && t1_out ) { + + // 1 commands + // 1 curves + + // No inflection points + this->PushCommand ( curve ); + } + else if (( t0_in || t0_cross ) && t1_out ) { + + // One inflection point + if ( t0_cross_start ) { + + // 2 commands + // 1 curve + // 1 vertex + + this->PushCommand ( curve.Evaluate ( t0_plus )); + curve.Split ( t0_plus, left, right ); + this->PushCommand ( right ); + } + else if ( t0_cross_end ) { + + // 2 commands + // 1 curve + // 1 vertex + + curve.Split ( t0_minus, left, right ); + this->PushCommand ( left ); + this->PushCommand ( curve.Evaluate ( t0_minus ) ); + } + else { + + // 4 commands + // 2 curves + // 2 vertices + + curve.Split ( t0_minus, left, right ); + this->PushCommand ( left ); + + this->PushCommand ( curve.Evaluate ( t0_minus )); + this->PushCommand ( curve.Evaluate ( t0_plus )); + + curve.Split ( t0_plus, left, right ); + this->PushCommand ( right ); + } + } + else if (( t0_in || t0_cross_start ) && ( t1_in || t1_cross_end )) { + + // Two inflection points + + // max 7 commands + // max 3 curves + // max 4 vertices + + if ( !t0_cross_start ) { + + // 2 commands + // 1 curve + // 1 vertex + + curve.Split ( t0_minus, left, right ); + this->PushCommand ( left ); + this->PushCommand ( curve.Evaluate ( t0_minus )); + } + + if ( t0_t1_cross ) { + + // 2 commands + // 2 vertices + + this->PushCommand ( curve.Evaluate ( t1_minus )); + this->PushCommand ( curve.Evaluate ( t0_plus )); + } + else { + + // 3 commands + // 1 curve + // 2 vertices + + this->PushCommand ( curve.Evaluate ( t0_plus )); + ZLCubicBezier2D middle = curve.Split ( t0_plus, t1_minus ); + this->PushCommand ( middle ); + this->PushCommand ( curve.Evaluate ( t1_minus )); + } + + if ( !t1_cross_end ) { + + // 2 commands + // 1 curve + // 1 vertex + + this->PushCommand ( curve.Evaluate ( t1_plus )); + curve.Split ( t1_plus, left, right ); + this->PushCommand ( right ); + } + } + } + + this->PushCommand ( curve.mP3 ); + } + + assert ( this->mCommandIdx ); + + this->mTotalCommands = this->mCommandIdx; + + this->mCurveIdx = 0; + this->mVertexIdx = 0; + this->mCommandIdx = 0; + + this->mIsProcessingCurve = false; +} + +//----------------------------------------------------------------// +bool ZLCubicBezierFlattener2D::More () { + + return this->mCommandIdx < this->mTotalCommands; +} + +//----------------------------------------------------------------// +ZLVec2D ZLCubicBezierFlattener2D::Next () { + + if ( this->mCommandIdx >= this->mTotalCommands ) { + return this->mLastVertex; + } + + if ( !this->mIsProcessingCurve ) { + + u32 command = this->mCommands [ this->mCommandIdx++ ]; + + if ( command == COMMAND_VERTEX ) { + return this->mVertices [ this->mVertexIdx++ ]; + } + + // must be a curve + assert ( command == COMMAND_CURVE ); + + this->mIsProcessingCurve = true; + this->mCurve = this->mCurves [ this->mCurveIdx++ ]; + this->mCurve.Bless (); + } + + const ZLCubicBezier2D& curve = this->mCurve; + + float dx = curve.mP1.mX - curve.mP0.mX; + float dy = curve.mP1.mY - curve.mP0.mY; + + float norm = Sqrt (( dx * dx ) + ( dy * dy )); + float s3 = ( float )fabs ((( curve.mP2.mX - curve.mP0.mX ) * dy ) - (( curve.mP2.mY - curve.mP0.mY ) * dx )) / norm; + float t = 2.0f * Sqrt ( this->mFlatness /( 3.0f * s3 )); + + if (( norm == 0.0f ) || ( s3 == 0.0f ) || ( t > 1.0f )) { + this->mIsProcessingCurve = false; + this->mLastVertex = this->mCurve.mP3; + return this->mLastVertex; + } + + ZLCubicBezier2D left; + ZLCubicBezier2D right; + + // check if angle is below tolerance + for ( u32 i = 0; i < 50; ++i ) { // TODO: make param; min of t better? + curve.Split ( t, left, right ); + if ( left.Angle () > this->mAngleInRadians ) { + t /= 1.75f; // magic numbers, yay + } + else { + break; + } + } + + this->mCurve = right; + this->mLastVertex = right.mP0; + return this->mLastVertex; +} + +//----------------------------------------------------------------// +void ZLCubicBezierFlattener2D::PushCommand ( const ZLCubicBezier2D& curve ) { + + this->mCurves [ this->mCurveIdx++ ] = curve; + this->mCommands [ this->mCommandIdx++ ] = COMMAND_CURVE; +} + +//----------------------------------------------------------------// +void ZLCubicBezierFlattener2D::PushCommand ( const ZLVec2D& vertex ) { + + this->mVertices [ this->mVertexIdx++ ] = vertex; + this->mCommands [ this->mCommandIdx++ ] = COMMAND_VERTEX; +} + +//----------------------------------------------------------------// +ZLCubicBezierFlattener2D::ZLCubicBezierFlattener2D () : + mTotalCommands ( 0 ) { +} + +//----------------------------------------------------------------// +ZLCubicBezierFlattener2D::~ZLCubicBezierFlattener2D () { +} diff --git a/src/zl-util/ZLCubicBezier2D.h b/src/zl-util/ZLCubicBezier2D.h new file mode 100644 index 0000000000..581f19a564 --- /dev/null +++ b/src/zl-util/ZLCubicBezier2D.h @@ -0,0 +1,104 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLCUBICBEZIER2D_H +#define ZLCUBICBEZIER2D_H + +#include + +//================================================================// +// ZLAbstractVertexWriter2D +//================================================================// +// TODO: this should be moved someplace more general +class ZLAbstractVertexWriter2D { +public: + + //----------------------------------------------------------------// + virtual void WriteVertex ( const ZLVec2D& v ) = 0; + ZLAbstractVertexWriter2D () {}; + virtual ~ZLAbstractVertexWriter2D () {}; +}; + +//================================================================// +// ZLCubicBezier2D +//================================================================// +class ZLCubicBezier2D : + public ZLCubicCurve2D { +private: + + //----------------------------------------------------------------// + void FlattenProgressive ( ZLAbstractVertexWriter2D& writer, float flatness = 0.125f, float angle = 15.0f ) const; + +public: + + enum { + NONE, + ONE_INFLECTION, + TWO_INFLECTIONS, + ONE_CUSP, + DEGENERATE, + }; + + //----------------------------------------------------------------// + float Angle (); + void Bless (); + ZLVec2D Evaluate ( float t ) const; + void FindInflectionDomain ( float t, float& t0, float& t1, float flatness = 0.25f ) const; + u32 FindInflections ( float& t0, float& t1 ) const; + void Flatten ( ZLAbstractVertexWriter2D& writer, float flatness = 0.125f, float angle = 15.0f ) const; + float GetFlattenedLength ( float flatness = 0.125f, float angle = 15.0f ); + size_t GetFlattenedSize ( float flatness = 0.125f, float angle = 15.0f ); + void Split ( float t, ZLCubicBezier2D& left, ZLCubicBezier2D& right ) const; + ZLCubicBezier2D Split ( float t0, float t1 ) const; +}; + +//================================================================// +// ZLCubicBezierFlattener2D +//================================================================// +class ZLCubicBezierFlattener2D { +private: + + friend class ZLCubicBezier2D; + + static const u32 MAX_CURVES = 3; + static const u32 MAX_VERTICES = 6; + static const u32 MAX_COMMANDS = 9; + + enum { + COMMAND_CURVE, + COMMAND_VERTEX, + }; + + ZLCubicBezier2D mCurves [ MAX_CURVES ]; + ZLVec2D mVertices [ MAX_VERTICES ]; + u32 mCommands [ MAX_COMMANDS ]; + + u32 mCurveIdx; + u32 mVertexIdx; + u32 mCommandIdx; + + u32 mTotalCommands; + + float mFlatness; + float mAngleInRadians; + + bool mIsProcessingCurve; + ZLCubicBezier2D mCurve; + + ZLVec2D mLastVertex; + + //----------------------------------------------------------------// + void PushCommand ( const ZLCubicBezier2D& curve ); + void PushCommand ( const ZLVec2D& vertex ); + +public: + + //----------------------------------------------------------------// + void Init ( const ZLCubicBezier2D& curve, float flatness = 0.125f, float angle = 15.0f ); + bool More (); + ZLVec2D Next (); + ZLCubicBezierFlattener2D (); + ~ZLCubicBezierFlattener2D (); +}; + +#endif diff --git a/src/zl-util/ZLCurve.cpp b/src/zl-util/ZLCurve.cpp index 3b375315ce..04c21222eb 100644 --- a/src/zl-util/ZLCurve.cpp +++ b/src/zl-util/ZLCurve.cpp @@ -97,468 +97,6 @@ ZLVec2D ZLCatmullRom2D::Evaluate ( float t ) const { return p; } -//================================================================// -// ZLCubicBezier2D -//================================================================// - -//----------------------------------------------------------------// -float ZLCubicBezier2D::Angle () { - // Compute angle between (p0,p1) and (p2,p3) - - float dx0 = this->mP1.mX - this->mP0.mX; - float dy0 = this->mP1.mY - this->mP0.mY; - float dx1 = this->mP3.mX - this->mP2.mX; - float dy1 = this->mP3.mY - this->mP2.mY; - - float angle = ( float )atan2 ( ABS (( dx0 * dy1 ) - ( dy0 * dx1 )), ( dx0 * dx1 ) + ( dy0 * dy1 )); - return angle; -} - -//----------------------------------------------------------------// -void ZLCubicBezier2D::Bless () { - - //if ( this->mP0.Equals ( this->mP1 )) this->mP1 = this->mP2; - //if ( this->mP3.Equals ( this->mP2 )) this->mP2 = this->mP1; - - if ( this->mP0.Equals ( this->mP1 )) this->mP1 = this->mP2; - if ( this->mP1.Equals ( this->mP2 )) this->mP2 = this->mP3; - if ( this->mP0.Equals ( this->mP1 )) this->mP1 = this->mP2; -} - -//----------------------------------------------------------------// -ZLVec2D ZLCubicBezier2D::Evaluate ( float t ) const { - - float tM = 1.0f - t; - - float b = tM * tM; - float c = t * t; - float d = c * t; - float a = b * tM; - - b *= 3.0f * t; - c *= 3.0f * tM; - - ZLVec2D v; - - v.mX = a * this->mP0.mX + b * this->mP1.mX + c * this->mP2.mX + d * this->mP3.mX; - v.mY = a * this->mP0.mY + b * this->mP1.mY + c * this->mP2.mY + d * this->mP3.mY; - - return v; -} - -//----------------------------------------------------------------// -void ZLCubicBezier2D::FindInflectionDomain ( float t, float& t0, float& t1, float flatness ) const { - - // for a given inflection point, find the domain around the point where - // the curve is 'flat' and can be approximated by a line - - const float EPSILON = 1e-5f; - const float POWER = 1.0f/3.0f; - - t0 = t; - t1 = 1; - - // TODO: need to use split instead of segmetn since we don't care about left? - ZLCubicBezier2D right; - - // why not just use segment for both? - if ( fabs ( t - 1.0 ) > EPSILON ) { - ZLCubicBezier2D left; - this->Split ( t, left, right ); - } - else { - right = this->Split ( 1.0f, 2.0f ); - } - - float dx = right.mP1.mX - right.mP0.mX; - float dy = right.mP1.mY - right.mP0.mY; - - float norm = Sqrt (( dx * dx ) + ( dy * dy )); - - if ( norm != 0.0f ) { - - float s4 = ( float )fabs ((( this->mP3.mX - this->mP0.mX ) * dy ) - (( this->mP3.mY - this->mP0.mY ) * dx )) / norm; - float tf = ( float )pow ( flatness / s4, POWER ); - - if ( ABS ( t - 1.0f ) > EPSILON ) { - t0 = t - tf * ( 1.0f - t ); - t1 = t + tf * ( 1.0f - t ); - } - else { - t0 = 1.0f - ( float )( EPSILON * tf ); - t1 = 1.0f + ( float )( EPSILON * tf ); - } - } -} - -//----------------------------------------------------------------// -u32 ZLCubicBezier2D::FindInflections ( float& t0, float& t1 ) const { - - const ZLVec2D& p0 = this->mP0; - const ZLVec2D& p1 = this->mP1; - const ZLVec2D& p2 = this->mP2; - const ZLVec2D& p3 = this->mP3; - - // math from 'Precise Flattening of Cubic Bezier Segments' - // ~ Hain, Ahmad, Langan - - /// A, B, C - first three coefficients of f(t) via the Bezier matrix - - float ax = -p0.mX + ( 3.0f * p1.mX ) - ( 3.0f * p2.mX ) + p3.mX; - float ay = -p0.mY + ( 3.0f * p1.mY ) - ( 3.0f * p2.mY ) + p3.mY; - - float bx = ( 3.0f * p0.mX ) - ( 6.0f * p1.mX ) + ( 3.0f * p2.mX ); - float by = ( 3.0f * p0.mY ) - ( 6.0f * p1.mY ) + ( 3.0f * p2.mY ); - - float cx = -( 3.0f * p0.mX ) + ( 3.0f * p1.mX ); - float cy = -( 3.0f * p0.mY ) + ( 3.0f * p1.mY ); - - // At inflection points the component of the acceleration (second - // derivative of position) perpendicular to the velocity (first - // derivative of position) is zero; the cross product of the - // two vectors is zero. Thus: - - // 6*(ay*bx-ax*by)*t^2 + 6*(ay*cx-ax*cy)*t + 2*(by*cx-bx*cy) - - // Solving for this quadratic equation yields the parametric - // positions t0 and t1 of the inflection points, if they exist. - - float ab = ( ay * bx ) - ( ax * by ); - float ac = ( ay * cx ) - ( ax * cy ); - float bc = ( by * cx ) - ( bx * cy ); - - // Dont want a straight line if P0.x == P1.x or P0.y == P1.y - if ( cx == 0.0f || cy == 0.0f ) { - return NONE; - } - - if (( ac == 0.0f ) || ( bc == 0.0f )) { - return DEGENERATE; - } - - if ( ab == 0.0f ) { - t0 = -bc / ( 3.0f * ac ); - return ONE_INFLECTION; - } - - float tcusp = -0.5f * ( ac / ab ); - float d = ( tcusp * tcusp ) - ( bc / ( 3.0f * ab )); - - if ( d > 0.0f ) { - - d = Sqrt ( d ); - - t0 = tcusp - d; - t1 = tcusp + d; - - return TWO_INFLECTIONS; - } - - if ( d == 0.0f ) { - t0 = tcusp; - return ONE_CUSP; - } - - return NONE; -} - -//----------------------------------------------------------------// -void ZLCubicBezier2D::Flatten ( ZLAbstractVertexWriter2D& writer, float flatness, float angle ) const { - - // cribbed from https://github.com/rougier/gl-bezier - - float cusp = 0.0f; - - float t0_minus = -1.0f; - float t0_plus = -1.0f; - - float t1_minus = 2.0f; - float t1_plus = 2.0f; - - float inflection0; - float inflection1; - u32 inflections = this->FindInflections ( inflection0, inflection1 ); - - switch ( inflections ) { - case ONE_CUSP: { - cusp = inflection0; - break; - } - case TWO_INFLECTIONS: { - this->FindInflectionDomain ( inflection0, t0_minus, t0_plus, flatness ); - this->FindInflectionDomain ( inflection1, t1_minus, t1_plus, flatness ); - break; - - } - case ONE_INFLECTION: { - this->FindInflectionDomain ( inflection0, t0_minus, t0_plus, flatness ); - break; - } - case DEGENERATE: { - writer.WriteVertex ( this->mP0 ); // add first point - writer.WriteVertex ( this->mP3 ); // add last point - return; - } - } - - // Split the two domains if they overlap - if (( t0_minus < t1_minus ) && ( t1_minus < t0_plus )) { - t0_plus = t1_minus; - t1_minus = t0_plus; - } - - bool t0_out = ( t0_plus < 0.0f ) || ( t0_minus > 1.0f ); - bool t1_out = ( t1_plus < 0.0f ) || ( t1_minus > 1.0f ); - - bool t0_t1_cross = t1_minus < t0_plus; - - // Make sure the possible out domain is always t1 - // (this will save some specific tests below) - if ( t0_out ) { - - t0_minus = t1_minus; - t0_plus = t1_plus; - t0_out = t1_out; - - t1_minus = 2.0f; - t1_plus = 2.0f; - t1_out = true; - } - - bool t0_in = ( 0.0f < t0_minus ) && ( t0_minus < t0_plus ) && ( t0_plus < 1.0f ); - bool t0_cross_start = ( t0_minus < 0.0f ) && ( 0.0f < t0_plus ) && ( t0_plus < 1.0f ); - bool t0_cross_end = ( 0.0f < t0_minus ) && ( t0_minus < 1.0f ) && ( 1.0f < t0_plus ); - bool t0_cross = t0_cross_start || t0_cross_end; - - bool t1_in = ( 0.0f < t1_minus ) && ( t1_minus < t1_plus ) && ( t1_plus < 1.0f ); - //bool t1_cross_start = ( t1_minus < 0.0f ) && ( 0.0f < t1_plus ) && ( t1_plus < 1.0f ); - bool t1_cross_end = ( 0.0f < t1_minus ) && ( t1_minus < 1.0f ) && ( 1.0f < t1_plus ); - //bool t1_cross = t1_cross_start || t1_cross_end; - - writer.WriteVertex ( this->mP0 ); // add first point - - ZLCubicBezier2D left; - ZLCubicBezier2D right; - - if ( inflections == ONE_CUSP ) { - - this->Split ( inflection0, left, right ); - left.FlattenProgressive ( writer, flatness, angle ); - writer.WriteVertex ( this->Evaluate ( inflection0 )); // the inflection point - right.FlattenProgressive ( writer, flatness, angle ); - } - else { - - if ( t0_out && t1_out ) { - // No inflection points - this->FlattenProgressive ( writer, flatness, angle ); - } - else if (( t0_in || t0_cross ) && t1_out ) { - // One inflection point - if ( t0_cross_start ) { - writer.WriteVertex ( this->Evaluate ( t0_plus )); - this->Split ( t0_plus, left, right ); - right.FlattenProgressive ( writer, flatness, angle ); - } - else if ( t0_cross_end ) { - this->Split ( t0_minus, left, right ); - left.FlattenProgressive ( writer, flatness, angle ); - writer.WriteVertex ( this->Evaluate ( t0_minus ) ); - } - else { - this->Split ( t0_minus, left, right ); - left.FlattenProgressive ( writer, flatness, angle ); - - writer.WriteVertex ( this->Evaluate ( t0_minus ) ); - writer.WriteVertex ( this->Evaluate ( t0_plus ) ); - - this->Split ( t0_plus, left, right ); - right.FlattenProgressive ( writer, flatness, angle ); - } - } - else if (( t0_in || t0_cross_start ) && ( t1_in || t1_cross_end )) { - // Two inflection points - if ( !t0_cross_start ) { - this->Split ( t0_minus, left, right ); - left.FlattenProgressive ( writer, flatness, angle ); - writer.WriteVertex ( this->Evaluate ( t0_minus ) ); - } - - if ( t0_t1_cross ) { - writer.WriteVertex ( this->Evaluate ( t1_minus ) ); - writer.WriteVertex ( this->Evaluate ( t0_plus ) ); - } - else { - writer.WriteVertex ( this->Evaluate ( t0_plus ) ); - ZLCubicBezier2D middle = this->Split ( t0_plus, t1_minus ); - middle.FlattenProgressive ( writer, flatness, angle ); - writer.WriteVertex ( this->Evaluate ( t1_minus ) ); - } - - if ( !t1_cross_end ) { - writer.WriteVertex ( this->Evaluate ( t1_plus ) ); - this->Split ( t1_plus, left, right ); - right.FlattenProgressive ( writer, flatness, angle ); - } - } - } - - writer.WriteVertex ( this->mP3 ); - -// switch ( inflections ) { -// -// case NONE: { -// this->FlattenProgressive ( writer, flatness, angle ); -// break; -// } -// case ONE_CUSP: { -// -// this->Split ( inflection0, left, right ); -// left.FlattenProgressive ( writer, flatness, angle ); -// writer.WriteVertex ( this->Evaluate ( inflection0 )); // the inflection point -// right.FlattenProgressive ( writer, flatness, angle ); -// break; -// } -// case ONE_INFLECTION: { -// -// if ( t0_cross_start ) { -// writer.WriteVertex ( this->Evaluate ( t0_plus )); -// this->Split ( t0_plus, left, right ); -// right.FlattenProgressive ( writer, flatness, angle ); -// } -// else if ( t0_cross_end ) { -// this->Split ( t0_minus, left, right ); -// left.FlattenProgressive ( writer, flatness, angle ); -// writer.WriteVertex ( this->Evaluate ( t0_minus ) ); -// } -// else { -// this->Split ( t0_minus, left, right ); -// left.FlattenProgressive ( writer, flatness, angle ); -// -// writer.WriteVertex ( this->Evaluate ( t0_minus ) ); -// writer.WriteVertex ( this->Evaluate ( t0_plus ) ); -// -// this->Split ( t0_plus, left, right ); -// right.FlattenProgressive ( writer, flatness, angle ); -// } -// break; -// } -// case TWO_INFLECTIONS: { -// -// if ( !t0_cross_start ) { -// this->Split ( t0_minus, left, right ); -// left.FlattenProgressive ( writer, flatness, angle ); -// writer.WriteVertex ( this->Evaluate ( t0_minus ) ); -// } -// -// if ( t0_t1_cross ) { -// writer.WriteVertex ( this->Evaluate ( t1_minus ) ); -// writer.WriteVertex ( this->Evaluate ( t0_plus ) ); -// } -// else { -// writer.WriteVertex ( this->Evaluate ( t0_plus ) ); -// ZLCubicBezier2D middle = this->Split ( t0_plus, t1_minus ); -// middle.FlattenProgressive ( writer, flatness, angle ); -// writer.WriteVertex ( this->Evaluate ( t1_minus ) ); -// } -// -// if ( !t1_cross_end ) { -// writer.WriteVertex ( this->Evaluate ( t1_plus ) ); -// this->Split ( t1_plus, left, right ); -// right.FlattenProgressive ( writer, flatness, angle ); -// } -// break; -// } -// } -} - -//----------------------------------------------------------------// -void ZLCubicBezier2D::FlattenProgressive ( ZLAbstractVertexWriter2D& writer, float flatness, float angle ) const { - - angle *= ( float )D2R; - ZLCubicBezier2D curve = *this; - curve.Bless (); - - bool more = true; - while ( more ) { - - float dx = curve.mP1.mX - curve.mP0.mX; - float dy = curve.mP1.mY - curve.mP0.mY; - - float norm = Sqrt (( dx * dx ) + ( dy * dy )); - if ( norm == 0.0f ) { - break; - } - - float s3 = ( float )fabs ((( curve.mP2.mX - curve.mP0.mX ) * dy ) - (( curve.mP2.mY - curve.mP0.mY ) * dx )) / norm; - if ( s3 == 0.0f ) break; - - float t = 2.0f * Sqrt ( flatness /( 3.0f * s3 )); - if ( t > 1.0f )break; - - ZLCubicBezier2D left; - ZLCubicBezier2D right; - - // check if angle is below tolerance - for ( u32 i = 0; i < 50; ++i ) { // TODO: make param; min of t better? - curve.Split ( t, left, right ); - if ( left.Angle () > angle ) { - t /= 1.75; // magic numbers, yay - } - else { - break; - } - } - - curve = right; - writer.WriteVertex ( curve.mP0 ); - } - - writer.WriteVertex ( curve.mP3 ); -} - -//----------------------------------------------------------------// -void ZLCubicBezier2D::Split ( float t, ZLCubicBezier2D& left, ZLCubicBezier2D& right ) const { - - // Split curve at t into left and right cubic bezier curves - - left.mP0 = this->mP0; - - left.mP1 = ZLVec2D::Lerp ( this->mP0, this->mP1, t ); - left.mP2 = ZLVec2D::Lerp ( this->mP1, this->mP2, t ); - - right.mP2 = ZLVec2D::Lerp ( this->mP2, this->mP3, t ); - right.mP1 = ZLVec2D::Lerp ( left.mP2, right.mP2, t ); - - left.mP2 = ZLVec2D::Lerp ( left.mP1, left.mP2, t ); - left.mP3 = ZLVec2D::Lerp ( left.mP2, right.mP1, t ); - - right.mP0 = left.mP3; - right.mP3 = this->mP3; -} - -//----------------------------------------------------------------// -ZLCubicBezier2D ZLCubicBezier2D::Split ( float t0, float t1 ) const { - // Extract a segment of t curve - - float u0 = 1.0f - t0; - float u1 = 1.0f - t1; - - ZLVec2D a = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP0, ( u0 * u0 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( 2.0f * t0 * u0 )), ZLVec2D::Scale ( this->mP2, ( t0 * t0 )))); - ZLVec2D b = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP0, ( u1 * u1 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( 2.0f * t1 * u1 )), ZLVec2D::Scale ( this->mP2, ( t1 * t1 )))); - ZLVec2D c = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( u0 * u0 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP2, ( 2.0f * t0 * u0 )), ZLVec2D::Scale ( this->mP3, ( t0 * t0 )))); - ZLVec2D d = ZLVec2D::Add ( ZLVec2D::Scale ( this->mP1, ( u1 * u1 )), ZLVec2D::Add ( ZLVec2D::Scale ( this->mP2, ( 2.0f * t1 * u1 )), ZLVec2D::Scale ( this->mP3, ( t1 * t1 )))); - - ZLCubicBezier2D segment; - - segment.mP0 = ZLVec2D::Add ( ZLVec2D::Scale ( a, u0 ), ZLVec2D::Scale ( c, t0 )); - segment.mP1 = ZLVec2D::Add ( ZLVec2D::Scale ( a, u1 ), ZLVec2D::Scale ( c, t1 )); - segment.mP2 = ZLVec2D::Add ( ZLVec2D::Scale ( b, u0 ), ZLVec2D::Scale ( d, t0 )); - segment.mP3 = ZLVec2D::Add ( ZLVec2D::Scale ( b, u1 ), ZLVec2D::Scale ( d, t1 )); - - return segment; -} - //================================================================// // ZLQuadraticBezier2D //================================================================// diff --git a/src/zl-util/ZLCurve.h b/src/zl-util/ZLCurve.h index b64037a77f..4b17a871d0 100644 --- a/src/zl-util/ZLCurve.h +++ b/src/zl-util/ZLCurve.h @@ -6,19 +6,6 @@ #include -//================================================================// -// ZLAbstractVertexWriter2D -//================================================================// -// TODO: this should be moved someplace more general -class ZLAbstractVertexWriter2D { -public: - - //----------------------------------------------------------------// - virtual void WriteVertex ( const ZLVec2D& v ) = 0; - ZLAbstractVertexWriter2D () {}; - virtual ~ZLAbstractVertexWriter2D () {}; -}; - //================================================================// // ZLCurve1D //================================================================// @@ -113,41 +100,6 @@ class ZLCatmullRom2D : ZLVec2D Evaluate ( float t ) const; }; -//================================================================// -// ZLCubicBezier2D -//================================================================// -class ZLCubicBezier2D : - public ZLCubicCurve2D { -public: - - typedef void ( *AddVertFunc )( const ZLVec2D& vert, void* userdata ); - -private: - - //----------------------------------------------------------------// - void Bless (); - void FindInflectionDomain ( float t, float& t0, float& t1, float flatness = 0.25f ) const; - u32 FindInflections ( float& t0, float& t1 ) const; - void FlattenProgressive ( ZLAbstractVertexWriter2D& writer, float flatness = 0.125f, float angle = 15.0f ) const; - -public: - - enum { - NONE, - ONE_INFLECTION, - TWO_INFLECTIONS, - ONE_CUSP, - DEGENERATE, - }; - - //----------------------------------------------------------------// - float Angle (); - ZLVec2D Evaluate ( float t ) const; - void Flatten ( ZLAbstractVertexWriter2D& writer, float flatness = 0.125f, float angle = 15.0f ) const; - void Split ( float t, ZLCubicBezier2D& left, ZLCubicBezier2D& right ) const; - ZLCubicBezier2D Split ( float t0, float t1 ) const; -}; - //================================================================// // ZLQuadraticBezier2D //================================================================// diff --git a/src/zl-util/ZLDeflateReader.cpp b/src/zl-util/ZLDeflateReader.cpp index e127bee09a..2bf9d0bd6b 100644 --- a/src/zl-util/ZLDeflateReader.cpp +++ b/src/zl-util/ZLDeflateReader.cpp @@ -66,7 +66,7 @@ size_t ZLDeflateReader::Inflate ( void* dest, size_t size ) { z_stream* stream = &this->mZStream; stream->next_out = ( Bytef* )dest; - stream->avail_out = size; + stream->avail_out = ( uInt )size; size_t totalRead = 0; while ( totalRead < size ) { @@ -77,7 +77,7 @@ size_t ZLDeflateReader::Inflate ( void* dest, size_t size ) { if ( available <= 0 ) break; stream->next_in = ( Bytef* )this->mInputChunk; - stream->avail_in = available; + stream->avail_in = ( uInt )available; } size_t totalOut = stream->total_out; @@ -127,11 +127,11 @@ void ZLDeflateReader::OnClose () { } //----------------------------------------------------------------// -bool ZLDeflateReader::OnOpen () { +ZLResultCode ZLDeflateReader::OnOpen () { memset ( &this->mZStream, 0, sizeof ( z_stream )); int result = inflateInit2 ( &this->mZStream, mWindowBits ); - if ( result != Z_OK ) return false; + if ( result != Z_OK ) return ZLResultCode ( ZL_ERROR ); this->mInputChunk = malloc ( ZL_DEFLATE_READER_CHUNK_SIZE ); @@ -144,16 +144,14 @@ bool ZLDeflateReader::OnOpen () { this->mChunk [ 1 ].mCache = ( void* )(( size_t )this->mCache + ZL_DEFLATE_READER_CHUNK_SIZE ); this->mChunk [ 1 ].mChunkID = -1; - return true; + return ZLResultCode ( ZL_OK ); } //----------------------------------------------------------------// -size_t ZLDeflateReader::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLDeflateReader::ReadBytes ( void* buffer, size_t size ) { ZLStreamChunk* chunk; size_t remaining = size; - - if ( !remaining ) return size; while ( remaining ) { @@ -162,7 +160,7 @@ size_t ZLDeflateReader::ReadBytes ( void* buffer, size_t size ) { size_t chunkID = ( size_t )( this->mCursor / ZL_DEFLATE_READER_CHUNK_SIZE ); int sign = chunkID & 1 ? 1 : 0; - this->AffirmChunk ( chunkID ); + this->AffirmChunk (( int )chunkID ); if ( this->mLength && ( this->mCursor >= this->mLength )) { this->mCursor = this->mLength; @@ -183,7 +181,7 @@ size_t ZLDeflateReader::ReadBytes ( void* buffer, size_t size ) { remaining -= read; buffer = ( void* )(( size_t )buffer + read ); } - return size - remaining; + ZL_RETURN_SIZE_RESULT ( size - remaining, ZL_OK ); } //----------------------------------------------------------------// @@ -198,16 +196,16 @@ int ZLDeflateReader::ResetZipStream () { inflateEnd ( &this->mZStream ); this->mZStream = newStream; - this->mProxiedStream->Seek ( this->mBase, SEEK_SET ); + this->mProxiedStream->Seek (( long )this->mBase, SEEK_SET ); return 0; } //----------------------------------------------------------------// -int ZLDeflateReader::SetCursor ( long offset ) { +ZLResultCode ZLDeflateReader::SetCursor ( size_t offset ) { - this->mCursor = offset; - return 0; + this->mCursor = offset; // TODO: check bounds and report error + return ZL_OK; } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLDeflateReader.h b/src/zl-util/ZLDeflateReader.h index d8c092a052..583e630ecf 100644 --- a/src/zl-util/ZLDeflateReader.h +++ b/src/zl-util/ZLDeflateReader.h @@ -48,8 +48,8 @@ class ZLDeflateReader : size_t Inflate ( void* dest, size_t size ); void InflateChunk ( ZLStreamChunk& chunk ); void OnClose (); - bool OnOpen (); - size_t ReadBytes ( void* buffer, size_t size ); + ZLResultCode OnOpen (); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); int ResetZipStream (); public: @@ -58,9 +58,10 @@ class ZLDeflateReader : //----------------------------------------------------------------// u32 GetCaps (); - int SetCursor ( long offset ); + int SetCursor ( size_t offset ); ZLDeflateReader (); ~ZLDeflateReader (); }; -#endif \ No newline at end of file +#endif + diff --git a/src/zl-util/ZLDeflateWriter.cpp b/src/zl-util/ZLDeflateWriter.cpp index cdf89a43ff..9082d62e89 100644 --- a/src/zl-util/ZLDeflateWriter.cpp +++ b/src/zl-util/ZLDeflateWriter.cpp @@ -16,21 +16,21 @@ u32 ZLDeflateWriter::GetCaps () { } //----------------------------------------------------------------// -size_t ZLDeflateWriter::Deflate ( const void* src, size_t size ) { +ZLSizeResult ZLDeflateWriter::Deflate ( const void* src, size_t size ) { char buffer [ ZL_DEFLATE_WRITER_CHUNK_SIZE ]; size_t bufferSize = ZL_DEFLATE_WRITER_CHUNK_SIZE; z_stream* stream = &this->mZStream; stream->next_in = ( Bytef* )src; - stream->avail_in = size; + stream->avail_in = ( uInt )size; int flush = size ? Z_NO_FLUSH : Z_FINISH; do { stream->next_out = ( Bytef* )buffer; - stream->avail_out = bufferSize; + stream->avail_out = ( uInt )bufferSize; int result = deflate ( stream, flush ); @@ -46,13 +46,14 @@ size_t ZLDeflateWriter::Deflate ( const void* src, size_t size ) { if ( result != Z_OK ) { if ( result != Z_STREAM_END ) { printf ( "%s\n", ZLZip::GetErrMsg ( result )); + ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); } break; } } while ( stream->avail_out == 0 ); - return size - stream->avail_in; + ZL_RETURN_SIZE_RESULT ( size - stream->avail_in, stream->avail_in ? ZL_OK : ZL_ERROR ); } //----------------------------------------------------------------// @@ -70,29 +71,33 @@ void ZLDeflateWriter::OnClose () { } //----------------------------------------------------------------// -bool ZLDeflateWriter::OnOpen () { +ZLResultCode ZLDeflateWriter::OnOpen () { memset ( &this->mZStream, 0, sizeof ( z_stream )); int result = deflateInit2 ( &this->mZStream, this->mCompressionLevel, Z_DEFLATED, this->mWindowBits, 7, Z_DEFAULT_STRATEGY ); - if ( result != Z_OK ) return false; + if ( result != Z_OK ) return ZL_ERROR; - return true; + return ZL_OK; } //----------------------------------------------------------------// -size_t ZLDeflateWriter::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLDeflateWriter::WriteBytes ( const void* buffer, size_t size ) { if ( size ) { - size = this->Deflate ( buffer, size ); + ZLSizeResult result = this->Deflate ( buffer, size ); - this->mCursor += size; - if ( this->mLength < this->mCursor ) { - this->mLength = this->mCursor; + if ( result.mCode == ZL_OK ) { + + this->mCursor += size; + if ( this->mLength < this->mCursor ) { + this->mLength = this->mCursor; + } + return result; } } - return 0; + ZL_RETURN_SIZE_RESULT ( 0, ZL_OK ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLDeflateWriter.h b/src/zl-util/ZLDeflateWriter.h index 9fe783881c..78e258b0aa 100644 --- a/src/zl-util/ZLDeflateWriter.h +++ b/src/zl-util/ZLDeflateWriter.h @@ -23,10 +23,10 @@ class ZLDeflateWriter : int mWindowBits; //----------------------------------------------------------------// - size_t Deflate ( const void* src, size_t size ); + ZLSizeResult Deflate ( const void* src, size_t size ); void OnClose (); - bool OnOpen (); - size_t WriteBytes ( const void* buffer, size_t size ); + ZLResultCode OnOpen (); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); public: diff --git a/src/zl-util/ZLDeviceTime_apple.cpp b/src/zl-util/ZLDeviceTime_apple.cpp index 2436e383b1..7ea1e5cb83 100644 --- a/src/zl-util/ZLDeviceTime_apple.cpp +++ b/src/zl-util/ZLDeviceTime_apple.cpp @@ -20,6 +20,9 @@ */ #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifdef __APPLE__ #include diff --git a/src/zl-util/ZLDeviceTime_posix.cpp b/src/zl-util/ZLDeviceTime_posix.cpp index e81bf5e41b..d20aed03b2 100644 --- a/src/zl-util/ZLDeviceTime_posix.cpp +++ b/src/zl-util/ZLDeviceTime_posix.cpp @@ -20,6 +20,9 @@ */ #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #if defined ( __linux ) | defined ( __FLASCC__ ) | defined ( __QNX__ ) | defined ( __EMSCRIPTEN__ ) #include diff --git a/src/zl-util/ZLDeviceTime_win32.cpp b/src/zl-util/ZLDeviceTime_win32.cpp index 45e2e4aff0..284c4fec34 100644 --- a/src/zl-util/ZLDeviceTime_win32.cpp +++ b/src/zl-util/ZLDeviceTime_win32.cpp @@ -2,6 +2,9 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifdef _WIN32 #include diff --git a/src/zl-util/ZLFileStream.cpp b/src/zl-util/ZLFileStream.cpp index 8f74195eae..f7aac45b42 100644 --- a/src/zl-util/ZLFileStream.cpp +++ b/src/zl-util/ZLFileStream.cpp @@ -145,33 +145,33 @@ bool ZLFileStream::OpenWrite ( cc8* filename ) { } //----------------------------------------------------------------// -size_t ZLFileStream::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLFileStream::ReadBytes ( void* buffer, size_t size ) { - return zl_fread ( buffer, 1, size, this->mFile ); + ZL_RETURN_SIZE_RESULT ( zl_fread ( buffer, 1, size, this->mFile ), ZL_OK ); } //----------------------------------------------------------------// -int ZLFileStream::SetCursor ( long offset ) { +ZLResultCode ZLFileStream::SetCursor ( size_t offset ) { - return zl_fseek ( this->mFile, offset, SEEK_SET ); + return zl_fseek ( this->mFile, ( long )offset, SEEK_SET ) == 0 ? ZL_OK : ZL_ERROR; } //----------------------------------------------------------------// -size_t ZLFileStream::SetLength ( size_t length ) { +ZLSizeResult ZLFileStream::SetLength ( size_t length ) { UNUSED ( length ); - return 0; + ZL_RETURN_SIZE_RESULT ( 0, ZL_UNSUPPORTED ); } //----------------------------------------------------------------// -size_t ZLFileStream::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLFileStream::WriteBytes ( const void* buffer, size_t size ) { - size_t result = zl_fwrite ( buffer, 1, size, this->mFile ); + size_t writeSize = zl_fwrite ( buffer, 1, size, this->mFile ); size_t cursor = ( size_t )zl_ftell ( this->mFile ); if ( cursor > this->mLength ) { this->mLength = cursor; } - return result; + ZL_RETURN_SIZE_RESULT ( writeSize, ZL_OK ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLFileStream.h b/src/zl-util/ZLFileStream.h index 62ef482e14..e5ed55092f 100644 --- a/src/zl-util/ZLFileStream.h +++ b/src/zl-util/ZLFileStream.h @@ -18,7 +18,7 @@ class ZLFileStream : u32 mCaps; //----------------------------------------------------------------// - int SetCursor ( long offset ); + ZLResultCode SetCursor ( size_t offset ); public: @@ -34,21 +34,21 @@ class ZLFileStream : static const u32 DEFAULT_FILE_MODE = READ; //----------------------------------------------------------------// - void Close (); - void Flush (); - u32 GetCaps (); - size_t GetCursor (); - ZLFILE* GetFile (); - size_t GetLength (); - bool IsOpen (); - bool Open ( cc8* filename, u32 mode ); - bool OpenRead ( cc8* filename ); - bool OpenWrite ( cc8* filename ); - size_t ReadBytes ( void* buffer, size_t size ); - virtual size_t SetLength ( size_t length ); - size_t WriteBytes ( const void* buffer, size_t size ); - ZLFileStream (); - ~ZLFileStream (); + void Close (); + void Flush (); + u32 GetCaps (); + size_t GetCursor (); + ZLFILE* GetFile (); + size_t GetLength (); + bool IsOpen (); + bool Open ( cc8* filename, u32 mode ); + bool OpenRead ( cc8* filename ); + bool OpenWrite ( cc8* filename ); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); + ZLSizeResult SetLength ( size_t length ); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); + ZLFileStream (); + ~ZLFileStream (); }; #endif diff --git a/src/zl-util/ZLFileSys.cpp b/src/zl-util/ZLFileSys.cpp index 03bf483eaf..2e53497de6 100644 --- a/src/zl-util/ZLFileSys.cpp +++ b/src/zl-util/ZLFileSys.cpp @@ -100,6 +100,9 @@ bool ZLFileSys::Copy ( cc8* path, cc8* newPath ) { //----------------------------------------------------------------// bool ZLFileSys::DeleteDirectory ( cc8* path, bool force, bool recursive ) { + // TODO: check to see if user is trying to delete parent of working dir + // TODO: better return codes? (partial recursive delete, for example) + if ( ZLFileSys::CheckPathExists ( path ) == false ) return true; int result = zl_rmdir ( path ); @@ -108,7 +111,8 @@ bool ZLFileSys::DeleteDirectory ( cc8* path, bool force, bool recursive ) { if ( !( force || recursive )) return false; STLString currentDir = ZLFileSys::GetCurrentPath (); - ZLFileSys::SetCurrentPath ( path ); + + if ( !ZLFileSys::SetCurrentPath ( path )) return false; ZLDirectoryItr dirItr; diff --git a/src/zl-util/ZLFloat.h b/src/zl-util/ZLFloat.h index be0808772f..36884036e3 100644 --- a/src/zl-util/ZLFloat.h +++ b/src/zl-util/ZLFloat.h @@ -83,14 +83,7 @@ class ZLFloat { //----------------------------------------------------------------// static inline float Clamp ( float n, float l, float u ) { - if ( n < l ) { - return l; - } - else if ( n > u ) { - return u; - } - - return n; + return n < l ? l : ( n > u ? u : n ); } //----------------------------------------------------------------// @@ -228,6 +221,22 @@ class ZLFloat { return d * m; } + //----------------------------------------------------------------// + static float Normalize ( float* f, size_t size ) { + + float sum = 0; + + for ( size_t i = 0; i < size; ++i ) { + sum += f [ i ]; + } + + for ( size_t i = 0; i < size; ++i ) { + f [ i ] /= sum; + } + + return sum; + } + //----------------------------------------------------------------// static inline float Rand () { diff --git a/src/zl-util/ZLFrustumFitter.cpp b/src/zl-util/ZLFrustumFitter.cpp index bfd3fcf4b0..f724fcd7da 100644 --- a/src/zl-util/ZLFrustumFitter.cpp +++ b/src/zl-util/ZLFrustumFitter.cpp @@ -110,7 +110,7 @@ void ZLFrustumFitter::Init ( const ZLRect& viewRect, const ZLRect& fitRect, floa float hHeight = viewRect.Height () * 0.5f; float distToNearPlane = hWidth * Cot ( hFov * 0.5f * ( float )D2R ); - float aspect = hWidth / ( viewRect.Height () * 0.5f ); + //float aspect = hWidth / ( viewRect.Height () * 0.5f ); this->mIsDirty = false; this->mNeedsInit = true; diff --git a/src/zl-util/ZLHashWriter.cpp b/src/zl-util/ZLHashWriter.cpp index a76bf5de36..11927b2dc7 100644 --- a/src/zl-util/ZLHashWriter.cpp +++ b/src/zl-util/ZLHashWriter.cpp @@ -56,7 +56,7 @@ void ZLHashWriter::OnClose () { } //----------------------------------------------------------------// -bool ZLHashWriter::OnOpen () { +ZLResultCode ZLHashWriter::OnOpen () { this->InitHash (); @@ -67,30 +67,32 @@ bool ZLHashWriter::OnOpen () { for ( u32 i = 0; i < blockSize; ++i ) { xorKey [ i ] = key [ i ] ^ 0x36; } - this->WriteBytes ( xorKey, blockSize ); + return ( this->WriteBytes ( xorKey, blockSize ).mCode == ZL_OK ) ? ZL_OK : ZL_ERROR; } - - return true; + return ZL_OK; } //----------------------------------------------------------------// -size_t ZLHashWriter::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLHashWriter::WriteBytes ( const void* buffer, size_t size ) { + + size_t writeSize = size; // Pass the write through to stream if ( this->mProxiedStream ) { - size = this->mProxiedStream->WriteBytes( buffer, size ); + writeSize = this->mProxiedStream->WriteBytes( buffer, writeSize ); } // Update the hash - if ( size ) { - this->HashBytes ( buffer, size ); + if ( writeSize ) { + this->HashBytes ( buffer, writeSize ); } - this->mCursor += size; + this->mCursor += writeSize; if ( this->mLength < this->mCursor ) { this->mLength = this->mCursor; } - return size; + + ZL_RETURN_SIZE_RESULT ( writeSize, ZL_OK ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLHashWriter.h b/src/zl-util/ZLHashWriter.h index 3c45a3daad..60fd5b1f78 100644 --- a/src/zl-util/ZLHashWriter.h +++ b/src/zl-util/ZLHashWriter.h @@ -19,8 +19,8 @@ class ZLHashWriter : virtual void FinalizeHash () = 0; virtual void InitHash () = 0; void OnClose (); - bool OnOpen (); - size_t WriteBytes ( const void* buffer, size_t size ); + ZLResultCode OnOpen (); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); public: diff --git a/src/zl-util/ZLHashWriterAdler32.cpp b/src/zl-util/ZLHashWriterAdler32.cpp index c760449c8c..56620d716e 100644 --- a/src/zl-util/ZLHashWriterAdler32.cpp +++ b/src/zl-util/ZLHashWriterAdler32.cpp @@ -38,7 +38,7 @@ size_t ZLHashWriterAdler32::GetHashSize () { //----------------------------------------------------------------// void ZLHashWriterAdler32::HashBytes ( const void* buffer, size_t size ) { - this->mSum = adler32 ( this->mSum, ( Bytef* )buffer, size ); + this->mSum = ( u32 )adler32 ( this->mSum, ( Bytef* )buffer, ( uInt )size ); this->mHash [ 0 ] = ( this->mSum >> 24 ) & 0x000000ff; this->mHash [ 1 ] = ( this->mSum >> 16 ) & 0x000000ff; diff --git a/src/zl-util/ZLHashWriterCRC32.cpp b/src/zl-util/ZLHashWriterCRC32.cpp index 69ab4dd259..f0fd3a139f 100644 --- a/src/zl-util/ZLHashWriterCRC32.cpp +++ b/src/zl-util/ZLHashWriterCRC32.cpp @@ -105,7 +105,7 @@ void ZLHashWriterCRC32::HashBytes ( const void* buffer, size_t size ) { break; } case CRC32B: { - this->mSum = crc32 ( this->mSum, ( Bytef* )buffer, size ); + this->mSum = ( u32 )crc32 ( this->mSum, ( Bytef* )buffer, ( uInt )size ); break; } } diff --git a/src/zl-util/ZLHashedString.cpp b/src/zl-util/ZLHashedString.cpp index 9a73c70da9..1a6af9ffa1 100644 --- a/src/zl-util/ZLHashedString.cpp +++ b/src/zl-util/ZLHashedString.cpp @@ -25,11 +25,11 @@ //} //----------------------------------------------------------------// -u32 ZLHashedString::Hash ( cc8* szKey, const u32 nLength, const u32 seed ) { +u32 ZLHashedString::Hash ( cc8* szKey, size_t nLength, const u32 seed ) { u32 hash = seed; - for ( u32 i = 0; i < nLength; ++i ) { + for ( size_t i = 0; i < nLength; ++i ) { hash = ( hash ^ szKey [ i ]) * FNV_prime; } @@ -47,7 +47,7 @@ u32 ZLHashedString::Hash ( cc8* szKey, const u32 nLength, const u32 seed ) { //================================================================// //----------------------------------------------------------------// -ZLHashedString::ZLHashedStringEntry::ZLHashedStringEntry ( cc8* name, const u32 nameLength, const u32 hash ) : +ZLHashedString::ZLHashedStringEntry::ZLHashedStringEntry ( cc8* name, size_t nameLength, const u32 hash ) : mName ( 0 ), mHash ( hash ) { @@ -89,7 +89,7 @@ const ZLHashedString::ZLHashedStringEntry& ZLHashedString::GetHashedStringEntry } //----------------------------------------------------------------// -u32 ZLHashedString::GetStringHash ( cc8* str, u32 strLength ) { +u32 ZLHashedString::GetStringHash ( cc8* str, size_t strLength ) { u32 hash = 0; diff --git a/src/zl-util/ZLHashedString.h b/src/zl-util/ZLHashedString.h index 26c0c00b49..1085dd60ae 100644 --- a/src/zl-util/ZLHashedString.h +++ b/src/zl-util/ZLHashedString.h @@ -23,7 +23,7 @@ class ZLHashedString { u32 mHash; //----------------------------------------------------------------// - ZLHashedStringEntry ( cc8* name, const u32 nameLength, const u32 hash ); + ZLHashedStringEntry ( cc8* name, size_t nameLength, const u32 hash ); ZLHashedStringEntry ( const ZLHashedStringEntry& other ); ~ZLHashedStringEntry (); }; @@ -44,8 +44,8 @@ class ZLHashedString { GET_CONST ( u32, Hash, mHashedString->mHash ) //----------------------------------------------------------------// - static u32 GetStringHash ( cc8* str, u32 strLength ); - static u32 Hash ( cc8* szKey, const u32 nLength, const u32 seed = FNV_seed ); + static u32 GetStringHash ( cc8* str, size_t strLength ); + static u32 Hash ( cc8* szKey, size_t nLength, const u32 seed = FNV_seed ); ZLHashedString (); ZLHashedString ( cc8* name ); ZLHashedString ( const ZLHashedString& other ); diff --git a/src/zl-util/ZLHexAdapter.cpp b/src/zl-util/ZLHexAdapter.cpp index d0f99fa91f..fd68d7b5c4 100644 --- a/src/zl-util/ZLHexAdapter.cpp +++ b/src/zl-util/ZLHexAdapter.cpp @@ -37,9 +37,9 @@ u8 ZLHexAdapter::HexToByte ( u32 c ) { } //----------------------------------------------------------------// -size_t ZLHexAdapter::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLHexAdapter::ReadBytes ( void* buffer, size_t size ) { - if ( !this->mProxiedStream ) return 0; + if ( !this->mProxiedStream ) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); char hexByte [ 2 ]; @@ -48,7 +48,7 @@ size_t ZLHexAdapter::ReadBytes ( void* buffer, size_t size ) { size_t result = this->mProxiedStream->ReadBytes ( hexByte, 2 ); if ( result != 2 ) { - return i; + ZL_RETURN_SIZE_RESULT ( i, ZL_OK ); } u32 hi = ZLHexAdapter::HexToByte ( hexByte [ 0 ]); @@ -56,13 +56,13 @@ size_t ZLHexAdapter::ReadBytes ( void* buffer, size_t size ) { bytes [ i ] = ( u8 )(( hi << 4 ) + lo ); } - return size; + ZL_RETURN_SIZE_RESULT ( size, ZL_OK ); } //----------------------------------------------------------------// -size_t ZLHexAdapter::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLHexAdapter::WriteBytes ( const void* buffer, size_t size ) { - if ( !this->mProxiedStream ) return 0; + if ( !this->mProxiedStream ) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); const char* hexTable = "0123456789abcdef"; char hexByte [ 2 ]; @@ -77,14 +77,14 @@ size_t ZLHexAdapter::WriteBytes ( const void* buffer, size_t size ) { size_t result = this->mProxiedStream->WriteBytes ( hexByte, 2 ); if ( result != 2 ) { - return i; + ZL_RETURN_SIZE_RESULT ( i, ZL_OK ); } } if ( this->mLength < this->mCursor ) { this->mLength = this->mCursor; } - return size; + ZL_RETURN_SIZE_RESULT ( size, ZL_OK ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLHexAdapter.h b/src/zl-util/ZLHexAdapter.h index 660c63c701..9df618bf79 100644 --- a/src/zl-util/ZLHexAdapter.h +++ b/src/zl-util/ZLHexAdapter.h @@ -13,8 +13,8 @@ class ZLHexAdapter : public ZLStreamAdapter { //----------------------------------------------------------------// - size_t ReadBytes ( void* buffer, size_t size ); - size_t WriteBytes ( const void* buffer, size_t size ); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); public: diff --git a/src/zl-util/ZLInterpolate.cpp b/src/zl-util/ZLInterpolate.cpp index 2a202debc2..28e427c03c 100644 --- a/src/zl-util/ZLInterpolate.cpp +++ b/src/zl-util/ZLInterpolate.cpp @@ -167,28 +167,28 @@ float ZLInterpolate::Curve ( u32 mode, float t ) { //................................................................ case kSineEaseIn: - return sinf ( t * M_PI_2 ); + return ( float )sin ( t * M_PI_2 ); //................................................................ case kSineEaseOut: - return 1.0f - cosf ( t * M_PI_2 ); + return 1.0f - ( float )cos ( t * M_PI_2 ); //................................................................ case kSineSmooth: - return 0.5f - 0.5f * cosf ( t * M_PI ); + return 0.5f - 0.5f * ( float )cos ( t * M_PI ); //................................................................ case kCircEaseIn: t = t - 1.0f; - return sqrtf ( 1.0f - t * t ); + return ( float )sqrt ( 1.0f - t * t ); //................................................................ case kCircEaseOut: - return 1.0f - sqrtf ( 1.0f - t * t ); + return 1.0f - ( float )sqrt ( 1.0f - t * t ); //................................................................ case kCircSmooth: @@ -215,10 +215,9 @@ float ZLInterpolate::Curve ( u32 mode, float t ) { return 7.5625f * t * t + 0.9375f; } else { - t = t - 2.625 / 2.75f; + t = t - 2.625f / 2.75f; return 7.5625f * t * t + 0.984375f; } - return 0.0f; //................................................................ case kBounceOut: @@ -248,7 +247,7 @@ float ZLInterpolate::Curve ( u32 mode, float t ) { p = 0.3f; s = 0.25f * p; - return 1.0f + powf ( 2.0f, -10.f * t ) * sinf ( (t - s) * (2.0f * M_PI) / p ); + return ( float )( 1.0 + pow ( 2.0, -10.0 * t ) * sin (( t - s ) * ( 2.0 * M_PI ) / p )); //................................................................ case kElasticOut: @@ -264,7 +263,7 @@ float ZLInterpolate::Curve ( u32 mode, float t ) { p = 0.3f; s = 0.25f * p; t = t - 1.0f; - return -powf ( 2.0f, 10.f * t ) * sinf ( (t - s) * (2.0f * M_PI) / p ); + return ( float )( -pow ( 2.0f, 10.f * t ) * sin (( t - s ) * ( 2.0f * M_PI ) / p )); //................................................................ case kElasticSmooth: @@ -283,10 +282,10 @@ float ZLInterpolate::Curve ( u32 mode, float t ) { if ( t < 1.0f ) { t = t - 1.0f; - return -0.5f * ( powf ( 2.0f, 10.f * t ) * sinf ( (t - s) * (2.0f * M_PI) / p ) ); + return ( float )( -0.5 * ( pow ( 2.0f, 10.0 * t ) * sin (( t - s ) * ( 2.0 * M_PI ) / p ))); } t = t - 1.0f; - return 1.0f + 0.5f * ( powf ( 2.0f, -10.f * t ) * sinf ( (t - s) * (2.0f * M_PI) / p ) ); + return ( float )( 1.0 + 0.5 * ( pow ( 2.0f, -10.0 * t ) * sin (( t - s ) * ( 2.0 * M_PI ) / p ))); //................................................................ case kBackEaseIn: diff --git a/src/zl-util/ZLIntersect.cpp b/src/zl-util/ZLIntersect.cpp index 5e3aeb4d92..c61300f98d 100644 --- a/src/zl-util/ZLIntersect.cpp +++ b/src/zl-util/ZLIntersect.cpp @@ -118,8 +118,6 @@ u32 ZLSect::PlaneToPlane ( const ZLPlane3D& p0, const ZLPlane3D& p1, ZLVec3D& lo vec = ZLVec3D::Cross ( p0.mNorm, p1.mNorm ); if ( vec.LengthSqrd () < FLT_EPSILON ) return SECT_PARALLEL; - - u32 component; float absX = ABS ( vec.mX ); float absY = ABS ( vec.mY ); diff --git a/src/zl-util/ZLLeanArray.h b/src/zl-util/ZLLeanArray.h index f0868751bf..4cce2351d5 100644 --- a/src/zl-util/ZLLeanArray.h +++ b/src/zl-util/ZLLeanArray.h @@ -4,6 +4,16 @@ #ifndef ZLLEANARRAY_H #define ZLLEANARRAY_H +#include + +#define ZL_DECLARE_SCOPED_BUFFER(name,type,size,stackAllocMax) \ + ZLLeanArray < u8 > _##name##_array; \ + type* name = ( type* )( size <= stackAllocMax ? alloca ( size ) : 0 ); \ + if ( !name ) { \ + _##name##_array.Init ( size ); \ + name = ( type* )_##name##_array.Data (); \ + } + //================================================================// // ZLLeanArray //================================================================// @@ -14,18 +24,6 @@ class ZLLeanArray { size_t mSize; TYPE* mData; - //----------------------------------------------------------------// - virtual void Alloc ( size_t size ) { - - this->mData = new TYPE [ size ]; - } - - //----------------------------------------------------------------// - virtual void Free () { - - delete [] this->mData; - } - public: //----------------------------------------------------------------// @@ -47,21 +45,17 @@ class ZLLeanArray { } //----------------------------------------------------------------// - virtual void Clear () { + void Clear () { - if ( this->mSize && this->mData ) { - this->Free (); - } - - this->mData = 0; - this->mSize = 0; + this->Resize ( 0 ); } //----------------------------------------------------------------// - void CloneFrom ( const ZLLeanArray < TYPE >& src ) { + ZLResultCode CloneFrom ( const ZLLeanArray < TYPE >& src ) { - this->Init ( src.mSize ); + if ( this->Init ( src.mSize ) != ZL_OK ) return ZL_ALLOCATION_ERROR; this->CopyFrom ( src ); + return ZL_OK; } //----------------------------------------------------------------// @@ -97,89 +91,88 @@ class ZLLeanArray { } //----------------------------------------------------------------// - void Grow ( size_t size ) { + ZLResultCode Grow ( size_t size ) { if ( size > this->mSize ) { - this->Resize ( size ); + return this->Resize ( size ); } + return ZL_OK; } //----------------------------------------------------------------// - void Grow ( size_t size, size_t chunkSize ) { + ZLResultCode Grow ( size_t size, size_t chunkSize ) { size_t chunks = ( size / chunkSize ) + 1; - this->Grow ( chunks * chunkSize ); + return this->Grow ( chunks * chunkSize ); } //----------------------------------------------------------------// - void Grow ( size_t size, size_t chunkSize, const TYPE& value ) { + ZLResultCode Grow ( size_t size, size_t chunkSize, const TYPE& value ) { size_t chunks = ( size / chunkSize ) + 1; size_t newSize = chunks * chunkSize; if ( newSize > this->mSize ) { - this->Resize ( newSize, value ); + return this->Resize ( newSize, value ); } + return ZL_OK; } //----------------------------------------------------------------// - bool Init ( size_t size ) { - - this->Clear (); + ZLResultCode Init ( size_t size ) { - if ( !size ) return true; - - this->Alloc ( size ); - if ( !this->mData ) return false; - - this->mSize = size; - return true; + return this->Resize ( size ); } //----------------------------------------------------------------// void Nullify () { + mData = 0; mSize = 0; } //----------------------------------------------------------------// - void Resize ( size_t size ) { + virtual ZLResultCode Resize ( size_t size ) { if ( this->mSize != size ) { - size_t oldSize = this->mSize; - TYPE* oldArray = this->mData; - - this->mSize = 0; - this->mData = 0; + TYPE* data = 0; if ( size ) { - this->Alloc ( size ); - this->mSize = size; + + data = new TYPE [ size ]; + if ( !data ) return ZL_ALLOCATION_ERROR; + + size_t total = ( this->mSize < size ) ? this->mSize : size; - for ( size_t i = 0; (( i < size ) && ( i < oldSize )); ++i ) { - this->mData [ i ] = oldArray [ i ]; + for ( size_t i = 0; i < total; ++i ) { + data [ i ] = this->mData [ i ]; } } - if ( oldArray ) { - delete [] oldArray; + if ( this->mData ) { + delete [] this->mData; } + + this->mData = data; + this->mSize = size; } + return ZL_OK; } //----------------------------------------------------------------// - void Resize ( size_t size, const TYPE& value ) { + ZLResultCode Resize ( size_t size, const TYPE& value ) { size_t oldSize = this->mSize; - this->Resize ( size ); + if ( this->Resize ( size ) != ZL_OK ) return ZL_ALLOCATION_ERROR; if ( size >= oldSize ) { for ( size_t i = oldSize; i < size; ++i ) { this->mData [ i ] = value; } } + return ZL_OK; } //----------------------------------------------------------------// @@ -229,6 +222,22 @@ class ZLLeanArray { return this->mSize; } + //----------------------------------------------------------------// + virtual void Take ( ZLLeanArray < TYPE >& src ) { + + if ( this->mData != src.mData ) { + + if ( this->mData ) { + this->Clear (); + } + + this->mSize = src.mSize; + this->mData = src.mData; + src.mSize = 0; + src.mData = 0; + } + } + //----------------------------------------------------------------// ZLLeanArray () : mSize ( 0 ), diff --git a/src/zl-util/ZLLeanList.h b/src/zl-util/ZLLeanList.h index bcce08c44d..2343add091 100644 --- a/src/zl-util/ZLLeanList.h +++ b/src/zl-util/ZLLeanList.h @@ -4,6 +4,8 @@ #ifndef ZLLEANLIST_H #define ZLLEANLIST_H +#include + template < typename TYPE > class ZLLeanList; template < typename TYPE > class ZLList; @@ -24,6 +26,16 @@ class ZLLeanLink { friend class ZLLeanList < TYPE >; friend class ZLList < TYPE >; + //----------------------------------------------------------------// + inline void operator = ( const TYPE& data ) { + this->mData = data; + } + + //----------------------------------------------------------------// + inline operator const TYPE& () const { + return this->mData; + } + //----------------------------------------------------------------// inline TYPE& Data () { return this->mData; @@ -97,6 +109,16 @@ class ZLLeanList { assert ( this->mTail ); return this->mTail->Data (); } + + //----------------------------------------------------------------// + inline TYPE& Back ( ZLResultCode& result ) { + if ( this->mTail ) { + result = ZL_OK; + return this->mTail->Data (); + } + result = ZL_ERROR; + return ZLTypeID < TYPE >::DummyRef (); + } //----------------------------------------------------------------// void Clear () { @@ -109,7 +131,6 @@ class ZLLeanList { clear->mNext = 0; clear->mList = 0; } - this->mCount = 0; this->mHead = 0; this->mTail = 0; @@ -150,6 +171,71 @@ class ZLLeanList { return this->mHead->Data (); } + //----------------------------------------------------------------// + inline TYPE& Front ( ZLResultCode& result ) { + if ( this->mTail ) { + result = ZL_OK; + return this->mHead->Data (); + } + result = ZL_ERROR; + return ZLTypeID < TYPE >::DummyRef (); + } + + //----------------------------------------------------------------// + inline ZLLeanLink < TYPE >* Head () { + return ( this->mHead ) ? this->mHead : 0; + } + + //----------------------------------------------------------------// + ZLResultCode InsertAfter ( ZLLeanLink < TYPE >& cursor, ZLLeanLink < TYPE >& link ) { + + if ( cursor->mList != this ) return ZL_ERROR; + + link.Remove (); + + if ( cursor.mNext ) { + + link.mPrev = &cursor; + link.mNext = cursor.mNext; + + link.mPrev->mNext = &link; + link.mNext->mPrev = &link; + } + else { + this->PushBack ( link ); + } + + link.mList = this; + ++this->mCount; + + return ZL_OK; + } + + //----------------------------------------------------------------// + ZLResultCode InsertBefore ( ZLLeanLink < TYPE >& cursor, ZLLeanLink < TYPE >& link ) { + + if ( cursor->mList != this ) return ZL_ERROR; + + link.Remove (); + + if ( cursor.mPrev ) { + + link.mPrev = cursor.mPrev; + link.mNext = &cursor; + + link.mPrev->mNext = &link; + link.mNext->mPrev = &link; + } + else { + this->PushFront ( link ); + } + + link.mList = this; + ++this->mCount; + + return ZL_OK; + } + //----------------------------------------------------------------// void Join ( ZLLeanList < TYPE >& a, ZLLeanList < TYPE >& b ) { @@ -210,70 +296,29 @@ class ZLLeanList { } //----------------------------------------------------------------// - inline ZLLeanLink < TYPE >* Head () { - return ( this->mHead ) ? this->mHead : 0; - } - - //----------------------------------------------------------------// - void InsertAfter ( ZLLeanLink < TYPE >& cursor, ZLLeanLink < TYPE >& link ) { - - link.Remove (); - - if ( cursor.mNext ) { - - link.mPrev = &cursor; - link.mNext = cursor.mNext; - - link.mPrev->mNext = &link; - link.mNext->mPrev = &link; - } - else { - this->PushBack ( link ); - } - - link.mList = this; - ++this->mCount; - } - - //----------------------------------------------------------------// - void InsertBefore ( ZLLeanLink < TYPE >& cursor, ZLLeanLink < TYPE >& link ) { - - link.Remove (); - - if ( cursor.mPrev ) { - - link.mPrev = cursor.mPrev; - link.mNext = &cursor; - - link.mPrev->mNext = &link; - link.mNext->mPrev = &link; - } - else { - this->PushFront ( link ); - } - - link.mList = this; - ++this->mCount; - } - - //----------------------------------------------------------------// - void PopBack () { + ZLLeanLink < TYPE >* PopBack () { - if ( this->mTail ) { - this->Remove ( *this->mTail ); + ZLLeanLink < TYPE >* tail = this->mTail; + + if ( tail ) { + this->Remove ( *tail ); } + return tail; } //----------------------------------------------------------------// - void PopFront () { + ZLLeanLink < TYPE >* PopFront () { - if ( this->mHead ) { - this->Remove ( *this->mHead ); + ZLLeanLink < TYPE >* head = this->mTail; + + if ( head ) { + this->Remove ( *head ); } + return head; } //----------------------------------------------------------------// - void PushBack ( ZLLeanLink < TYPE >& link ) { + ZLLeanLink < TYPE >* PushBack ( ZLLeanLink < TYPE >& link ) { link.Remove (); @@ -292,10 +337,12 @@ class ZLLeanList { link.mList = this; ++this->mCount; + + return &link; } //----------------------------------------------------------------// - void PushFront ( ZLLeanLink < TYPE >& link ) { + ZLLeanLink < TYPE >* PushFront ( ZLLeanLink < TYPE >& link ) { link.Remove (); @@ -314,6 +361,8 @@ class ZLLeanList { link.mList = this; ++this->mCount; + + return &link; } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLLeanPool.h b/src/zl-util/ZLLeanPool.h index 5a27f6d1cf..d2e1dd92c1 100644 --- a/src/zl-util/ZLLeanPool.h +++ b/src/zl-util/ZLLeanPool.h @@ -57,6 +57,11 @@ class ZLLeanPool { //----------------------------------------------------------------// void Clear () { + size_t top = this->mChunks.GetTop (); + for ( size_t i = 0; i < top; ++i ) { + free ( this->mChunks [ i ]); + } + this->mChunks.Clear (); this->mFree.Clear (); } @@ -65,7 +70,7 @@ class ZLLeanPool { void Free ( TYPE* type ) { if ( type ) { - type->TYPE::~TYPE (); + type->~TYPE (); this->mFree.Push ( type ); } } diff --git a/src/zl-util/ZLLeanStack.h b/src/zl-util/ZLLeanStack.h index e7b7efdc7d..1ec9c492a2 100644 --- a/src/zl-util/ZLLeanStack.h +++ b/src/zl-util/ZLLeanStack.h @@ -5,6 +5,7 @@ #define ZLLEANSTACK_H #include +#include //================================================================// // ZLLeanStack @@ -12,49 +13,105 @@ template < typename TYPE, size_t CHUNKSIZE = 64 > class ZLLeanStack : public ZLLeanArray < TYPE > { -private: +protected: size_t mTop; public: //----------------------------------------------------------------// - void Clear () { - - this->ZLLeanArray < TYPE >::Clear (); - this->mTop = 0; + size_t GetTop () const { + + return this->mTop; } //----------------------------------------------------------------// - size_t GetTop () const { + TYPE Pop () { - return this->mTop; + if ( this->mTop ) { + TYPE value = this->mData [ --this->mTop ]; // Note the pre-decrement + this->mData [ this->mTop ].~TYPE (); + return value; + } + assert ( false ); + return ZLTypeID < TYPE >::Dummy (); } //----------------------------------------------------------------// - TYPE& Pop () { + // may cause copy constructor to be called twice + TYPE Pop ( ZLResultCode& result ) { if ( this->mTop ) { - return this->mData [ --this->mTop ]; + result = ZL_OK; + TYPE value = this->mData [ --this->mTop ]; // Note the pre-decrement + this->mData [ this->mTop ].~TYPE (); + return value; } - assert ( false ); - return this->mData [ 0 ]; + result = ZL_ERROR; + return ZLTypeID < TYPE >::Dummy (); + } + + //----------------------------------------------------------------// + // guarantee no more than one call to copy constructor + ZLResultCode Pop ( TYPE* value ) { + + if ( this->mTop ) { + if ( value ) { + *value = this->mData [ this->mTop - 1 ]; + } + this->mData [ --this->mTop ].~TYPE (); // Note the pre-decrement + return ZL_OK; + } + return ZL_ERROR; } //----------------------------------------------------------------// TYPE& Push () { + + ZLResultCode result = this->Grow ( this->mTop + 1, CHUNKSIZE ); + + UNUSED ( result ); + assert ( result == ZL_OK ); + + new ( &this->mData [ this->mTop ]) TYPE (); // placement new + return this->mData [ this->mTop++ ]; // Note the post-increment + } - this->Grow ( ++this->mTop, CHUNKSIZE ); - return this->mData [ this->mTop - 1 ]; + //----------------------------------------------------------------// + TYPE& Push ( ZLResultCode& result ) { + + if ( this->Grow ( this->mTop + 1, CHUNKSIZE ) != ZL_OK ) { + result = ZL_ALLOCATION_ERROR; + return ZLTypeID < TYPE >::DummyRef (); + } + result = ZL_OK; + + new ( &this->mData [ this->mTop ]) TYPE (); // placement new + return this->mData [ this->mTop++ ]; // Note the post-increment } //----------------------------------------------------------------// TYPE& Push ( const TYPE& type ) { - size_t idx = this->mTop; - this->Grow ( ++this->mTop, CHUNKSIZE ); - this->mData [ idx ] = type; - return this->mData [ idx ]; + ZLResultCode result = this->Grow ( this->mTop + 1, CHUNKSIZE ); + UNUSED ( result ); // TODO: why isn't assert () redefine working here? + + assert ( result == ZL_OK ); + + new ( &this->mData [ this->mTop ]) TYPE ( type ); // placement copy constructor + return this->mData [ this->mTop++ ]; // Note the post-increment + } + + //----------------------------------------------------------------// + TYPE& Push ( const TYPE& type, ZLResultCode& result ) { + + if ( this->Grow ( this->mTop + 1, CHUNKSIZE ) != ZL_OK ) { + result = ZL_ALLOCATION_ERROR; + return ZLTypeID < TYPE >::DummyRef (); + } + result = ZL_OK; + new ( &this->mData [ this->mTop ]) TYPE ( type ); // placement copy constructor + return this->mData [ this->mTop++ ]; // Note the post-increment } //----------------------------------------------------------------// @@ -63,17 +120,57 @@ class ZLLeanStack : } //----------------------------------------------------------------// - void SetTop ( size_t top ) { + ZLResultCode Resize ( size_t size ) { + + if ( this->mSize != size ) { + + TYPE* data = 0; + size_t top = 0; + + if ( size ) { + + data = ( TYPE* )malloc ( size * sizeof ( TYPE )); + if ( !data ) return ZL_ALLOCATION_ERROR; + + top = ( this->mTop < size ) ? this->mTop : size; + + for ( size_t i = 0; i < top; ++i ) { + new ( &data [ i ]) TYPE ( this->mData [ i ]); // placement new + } + } + + if ( this->mData ) { + for ( size_t i = this->mTop; i > 0; --i ) { + this->mData [ i - 1 ].~TYPE (); + } + free ( this->mData ); + } + + this->mData = data; + this->mSize = size; + this->mTop = top; + } + return ZL_OK; + } - this->Grow ( top, CHUNKSIZE ); + //----------------------------------------------------------------// + ZLResultCode SetTop ( size_t top ) { + + if ( this->Grow ( top, CHUNKSIZE ) != ZL_OK ) return ZL_ALLOCATION_ERROR; this->mTop = top; + return ZL_OK; } //----------------------------------------------------------------// - void SetTop ( size_t top, const TYPE& value ) { + ZLResultCode SetTop ( size_t top, const TYPE& value ) { - this->Grow ( top, CHUNKSIZE, value ); + if ( this->Grow ( top, CHUNKSIZE, value ) != ZL_OK ) return ZL_ALLOCATION_ERROR; this->mTop = top; + + for ( size_t i = 0; i < this->mTop; ++i ) { + new ( &this->mData [ i ]) TYPE (); + } + return ZL_OK; } //----------------------------------------------------------------// @@ -82,6 +179,15 @@ class ZLLeanStack : return this->mData [ this->mTop - 1 ]; } + //----------------------------------------------------------------// + TYPE& Top ( ZLResultCode& result ) { + if ( this->mTop == 0 ) { + result = ZL_ERROR; + return ZLTypeID < TYPE >::DummyRef (); + } + return this->mData [ this->mTop - 1 ]; + } + //----------------------------------------------------------------// ZLLeanStack () : mTop ( 0 ) { @@ -89,6 +195,7 @@ class ZLLeanStack : //----------------------------------------------------------------// ~ZLLeanStack () { + this->Resize ( 0 ); } }; diff --git a/src/zl-util/ZLLexStream.cpp b/src/zl-util/ZLLexStream.cpp index b763e210d1..48a490c477 100644 --- a/src/zl-util/ZLLexStream.cpp +++ b/src/zl-util/ZLLexStream.cpp @@ -29,51 +29,65 @@ size_t ZLLexStream::GetLength () { } //----------------------------------------------------------------// -size_t ZLLexStream::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLLexStream::ReadBytes ( void* buffer, size_t size ) { size_t cursor = this->GetCursor (); - size_t length = this->GetLength (); - if (( cursor + size ) > length ) { - size = length - cursor; - } + + size_t readSize = (( cursor + size ) > length ) ? ( length - cursor ) : size; u8* bytes = ( u8* )buffer; - for ( u32 i = 0; i < size; ++i ) { + for ( u32 i = 0; i < readSize; ++i ) { bytes [ i ] = this->ReadByte (); } - return size; + ZL_RETURN_SIZE_RESULT ( readSize, ZL_OK ); } //----------------------------------------------------------------// -u8 ZLLexStream::ReadByte () { +ZLCharResult ZLLexStream::ReadByte () { - assert ( this->mStream ); + if ( !this->mStream ) ZL_RETURN_CHAR_RESULT ( 0, ZL_ERROR ); + u8 value = this->mStream->Read < u8 >( 0 ); if ( value == '\n' ) { this->mLine++; } - return value; + ZL_RETURN_CHAR_RESULT ( value, ZL_OK ); } //----------------------------------------------------------------// -int ZLLexStream::SetCursor ( long offset ) { +ZLResultCode ZLLexStream::SetCursor ( size_t offset ) { + + if ( !( this->mStream && ( this->GetCaps () & ( CAN_READ | CAN_WRITE )))) return ZL_ERROR; - offset = offset - (long) this->GetCursor (); + size_t restoreCursor = this->GetCursor (); + size_t restoreLine = this->mLine; + + if ( this->GetLength () < offset ) return ZL_ERROR; - if ( offset > 0 ) { - for ( long i = 0; i < offset; ++i ) { + // TODO: test this + + if ( restoreCursor <= offset ) { + for ( size_t i = restoreCursor; i < offset; ++i ) { this->ReadByte (); } } else { - offset = -offset; - for ( long i = 0; i < offset; ++i ) { + for ( size_t i = offset; i < restoreCursor; ++i ) { this->UnreadByte (); } } - return 0; + + // instead of checking each byte, we'll check the final cursor position + // if it isn't where we expected it to be, reset and return an error + if ( this->mStream->GetCursor () != ( size_t )offset ) { + + this->mStream->SetCursor ( restoreCursor ); + this->mLine = restoreLine; + return ZL_ERROR; + } + return ZL_OK; } //----------------------------------------------------------------// @@ -83,9 +97,9 @@ void ZLLexStream::SetStream ( ZLStream* stream ) { } //----------------------------------------------------------------// -u8 ZLLexStream::UnreadByte () { +ZLCharResult ZLLexStream::UnreadByte () { - assert ( this->mStream ); + if ( !this->mStream ) ZL_RETURN_CHAR_RESULT ( 0, ZL_ERROR ); this->mStream->Seek ( -1, SEEK_CUR ); u8 value = this->mStream->Read < u8 >( 0 ); @@ -94,7 +108,7 @@ u8 ZLLexStream::UnreadByte () { if ( value == '\n' ) { this->mLine--; } - return value; + ZL_RETURN_CHAR_RESULT ( value, ZL_OK ); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLLexStream.h b/src/zl-util/ZLLexStream.h index 5fa8ab4170..4ef96ffb5d 100644 --- a/src/zl-util/ZLLexStream.h +++ b/src/zl-util/ZLLexStream.h @@ -22,22 +22,22 @@ class ZLLexStream : size_t mLine; //----------------------------------------------------------------// - u8 ReadByte (); - int SetCursor ( long offset ); - u8 UnreadByte (); + ZLCharResult ReadByte (); + ZLResultCode SetCursor ( size_t offset ); + ZLCharResult UnreadByte (); public: GET ( size_t, Line, mLine ) //----------------------------------------------------------------// - u32 GetCaps (); - size_t GetCursor (); - size_t GetLength (); - size_t ReadBytes ( void* buffer, size_t size ); - void SetStream ( ZLStream* stream ); - ZLLexStream (); - ~ZLLexStream (); + u32 GetCaps (); + size_t GetCursor (); + size_t GetLength (); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); + void SetStream ( ZLStream* stream ); + ZLLexStream (); + ~ZLLexStream (); }; #endif diff --git a/src/zl-util/ZLLog.cpp b/src/zl-util/ZLLog.cpp index c03c52fcfd..16c4a9826a 100644 --- a/src/zl-util/ZLLog.cpp +++ b/src/zl-util/ZLLog.cpp @@ -51,7 +51,7 @@ void ZLLog::LogV ( u32 level, FILE* file, cc8* format, va_list args ) { if ( sLogFunc ) { - sLogFunc ( format, args, sLogFuncUserdata ); + sLogFunc ( level, format, args, sLogFuncUserdata ); } else { diff --git a/src/zl-util/ZLLog.h b/src/zl-util/ZLLog.h index 700eb0c8e0..bea25003eb 100644 --- a/src/zl-util/ZLLog.h +++ b/src/zl-util/ZLLog.h @@ -32,7 +32,7 @@ class ZLLog { static u32 sLogLevel; static FILE* sConsoleRedirect; - typedef void ( *LogFunc )( cc8* format, va_list args, void* userdata ); + typedef void ( *LogFunc )( u32 level, cc8* format, va_list args, void* userdata ); static LogFunc sLogFunc; static void* sLogFuncUserdata; @@ -52,21 +52,27 @@ class ZLLog { static void SetRedirect ( FILE* file ); }; +#define ZLLog(format,...) ZLLog::LogF ( ZLLog::LOG_REPORT, ZLLog::CONSOLE, format, ##__VA_ARGS__ ) #define ZLLogF(file,format,...) ZLLog::LogF ( ZLLog::LOG_REPORT, file, format, ##__VA_ARGS__ ) #define ZLLogV(file,format,args) ZLLog::LogV ( ZLLog::LOG_REPORT, file, format, args ) +#define ZLLog_Debug(format,...) ZLLog::LogF ( ZLLog::LOG_DEBUG, ZLLog::CONSOLE, format, ##__VA_ARGS__ ) #define ZLLog_DebugF(file,format,...) ZLLog::LogF ( ZLLog::LOG_DEBUG, file, format, ##__VA_ARGS__ ) #define ZLLog_DebugV(file,format,args) ZLLog::LogV ( ZLLog::LOG_DEBUG, file, format, args ) +#define ZLLog_Status(format,...) ZLLog::LogF ( ZLLog::LOG_STATUS, ZLLog::CONSOLE, format, ##__VA_ARGS__ ) #define ZLLog_StatusF(file,format,...) ZLLog::LogF ( ZLLog::LOG_STATUS, file, format, ##__VA_ARGS__ ) #define ZLLog_StatusV(file,format,args) ZLLog::LogV ( ZLLog::LOG_STATUS, file, format, args ) +#define ZLLog_Warning(format,...) ZLLog::LogF ( ZLLog::LOG_WARNING, ZLLog::CONSOLE, format, ##__VA_ARGS__ ) #define ZLLog_WarningF(file,format,...) ZLLog::LogF ( ZLLog::LOG_WARNING, file, format, ##__VA_ARGS__ ) #define ZLLog_WarningV(file,format,args) ZLLog::LogV ( ZLLog::LOG_WARNING, file, format, args ) +#define ZLLog_Error(format,...) ZLLog::LogF ( ZLLog::LOG_ERROR, ZLLog::CONSOLE, format, ##__VA_ARGS__ ) #define ZLLog_ErrorF(file,format,...) ZLLog::LogF ( ZLLog::LOG_ERROR, file, format, ##__VA_ARGS__ ) #define ZLLog_ErrorV(file,format,args) ZLLog::LogV ( ZLLog::LOG_ERROR, file, format, args ) +#define ZLLog_Fatal(format,...) ZLLog::LogF ( ZLLog::LOG_FATAL, ZLLog::CONSOLE, format, ##__VA_ARGS__ ) #define ZLLog_FatalF(file,format,...) ZLLog::LogF ( ZLLog::LOG_FATAL, file, format, ##__VA_ARGS__ ) #define ZLLog_FatalV(file,format,args) ZLLog::LogV ( ZLLog::LOG_FATAL, file, format, args ) diff --git a/src/zl-util/ZLMatrix3x3.h b/src/zl-util/ZLMatrix3x3.h index 0d3c891d67..371dfb4fb6 100644 --- a/src/zl-util/ZLMatrix3x3.h +++ b/src/zl-util/ZLMatrix3x3.h @@ -5,8 +5,10 @@ #define ZLMATRIX3X3_H #include +#include #include #include +#include //================================================================// // ZLMetaMatrix3x3 @@ -476,4 +478,5 @@ class ZLMetaMatrix3x3 { typedef ZLMetaMatrix3x3 < float > ZLMatrix3x3; -#endif \ No newline at end of file +#endif + diff --git a/src/zl-util/ZLMatrix4x4.h b/src/zl-util/ZLMatrix4x4.h index 367d94390f..b9a905dd6a 100644 --- a/src/zl-util/ZLMatrix4x4.h +++ b/src/zl-util/ZLMatrix4x4.h @@ -1151,4 +1151,4 @@ class ZLMetaMatrix4x4 { typedef ZLMetaMatrix4x4 < float > ZLMatrix4x4; typedef ZLMetaMatrix4x4 < double > ZLDoubleMatrix4x4; -#endif \ No newline at end of file +#endif diff --git a/src/zl-util/ZLMemStream.cpp b/src/zl-util/ZLMemStream.cpp index e8a6b02fa8..d6564141ed 100644 --- a/src/zl-util/ZLMemStream.cpp +++ b/src/zl-util/ZLMemStream.cpp @@ -16,7 +16,7 @@ //----------------------------------------------------------------// void ZLMemStream::Clear () { - this->ClearChunks (); + this->mChunks.Clear (); this->mGuestBuffer = 0; this->mGuestBufferSize = 0; @@ -25,29 +25,21 @@ void ZLMemStream::Clear () { this->mLength = 0; } -//----------------------------------------------------------------// -void ZLMemStream::ClearChunks () { - - if ( this->mChunks ) { - for ( size_t i = 0; i < this->mTotalChunks; ++i ) { - free ( this->mChunks [ i ]); - } - this->mChunks.Clear (); - this->mTotalChunks = 0; - } -} - //----------------------------------------------------------------// void ZLMemStream::Compact () { + size_t totalChunks = this->mChunks.Size (); + size_t chunks = ( size_t )( this->mLength / this->mChunkSize ) + 1; - if ( chunks < this->mTotalChunks ) { - - for ( size_t i = chunks; i < this->mTotalChunks; ++i ) { - free ( this->mChunks [ i ]); + if ( chunks < totalChunks ) { + + ZLLeanArray < ZLLeanArray < u8 > > temp; + temp.Init ( chunks ); + + for ( size_t i = 0; i < chunks; ++i ) { + temp [ i ].Take ( this->mChunks [ i ]); } - this->mChunks.Resize ( chunks ); - this->mTotalChunks = chunks; + this->mChunks.Take ( temp ); } } @@ -57,6 +49,12 @@ void ZLMemStream::DiscardAll () { this->DiscardFront ( this->mLength ); } +//----------------------------------------------------------------// +void ZLMemStream::DiscardBack () { + + this->DiscardBack ( this->mLength - this->mCursor ); +} + //----------------------------------------------------------------// void ZLMemStream::DiscardBack ( size_t size ) { @@ -73,6 +71,12 @@ void ZLMemStream::DiscardBack ( size_t size ) { } } +//----------------------------------------------------------------// +void ZLMemStream::DiscardFront () { + + this->DiscardFront ( this->mCursor ); +} + //----------------------------------------------------------------// void ZLMemStream::DiscardFront ( size_t size ) { @@ -85,7 +89,7 @@ void ZLMemStream::DiscardFront ( size_t size ) { return; } - if ( !this->mGuestBuffer ) { + if ( this->mGuestBuffer ) { // it's safe to discard any portion of the guest buffer this->mBase += size; @@ -121,7 +125,9 @@ size_t ZLMemStream::GetLength () { } //----------------------------------------------------------------// -size_t ZLMemStream::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLMemStream::ReadBytes ( void* buffer, size_t size ) { + + if ( size == 0 ) ZL_RETURN_SIZE_RESULT ( 0, ZL_OK ); size_t cursor0 = this->mBase + this->mCursor; size_t cursor1 = cursor0 + size; @@ -132,81 +138,93 @@ size_t ZLMemStream::ReadBytes ( void* buffer, size_t size ) { cursor1 = top; } - if ( size == 0 ) return 0; + if ( cursor0 == cursor1 ) ZL_RETURN_SIZE_RESULT ( 0, ZL_OK ); // if there's a guest buffer, use it + // if the guest buffer exists, it is guaranteed to be a large enough size if ( this->mGuestBuffer ) { memcpy ( buffer, &(( u8* )this->mGuestBuffer )[ cursor0 ], size ); this->mCursor += size; - return size; } + else { + + assert ( this->mChunks ); - assert ( this->mChunks ); - - size_t chunk0 = ( size_t )( cursor0 / this->mChunkSize ); - size_t chunk1 = ( size_t )( cursor1 / this->mChunkSize ); + size_t chunk0 = ( size_t )( cursor0 / this->mChunkSize ); + size_t chunk1 = ( size_t )( cursor1 / this->mChunkSize ); - size_t offset0 = cursor0 - ( chunk0 * this->mChunkSize ); - size_t offset1 = cursor1 - ( chunk1 * this->mChunkSize ); + size_t offset0 = cursor0 - ( chunk0 * this->mChunkSize ); + size_t offset1 = cursor1 - ( chunk1 * this->mChunkSize ); - void* src = ( void* )(( size_t )this->mChunks [ chunk0 ] + offset0 ); - void* dest = buffer; + void* src = ( void* )(( size_t )this->mChunks [ chunk0 ].Data () + offset0 ); + void* dest = buffer; - if ( chunk0 == chunk1 ) { - - memcpy ( dest, src, offset1 - offset0 ); - } - else { - - memcpy ( dest, src, this->mChunkSize - offset0 ); - dest = ( void* )(( size_t )dest + this->mChunkSize - offset0 ); - - for ( size_t i = ( chunk0 + 1 ); i < chunk1; ++i ) { - memcpy ( dest, this->mChunks [ i ], this->mChunkSize ); - dest = ( void* )(( size_t )dest + this->mChunkSize ); + if ( chunk0 == chunk1 ) { + + memcpy ( dest, src, offset1 - offset0 ); + } + else { + + memcpy ( dest, src, this->mChunkSize - offset0 ); + dest = ( void* )(( size_t )dest + this->mChunkSize - offset0 ); + + for ( size_t i = ( chunk0 + 1 ); i < chunk1; ++i ) { + memcpy ( dest, this->mChunks [ i ], this->mChunkSize ); + dest = ( void* )(( size_t )dest + this->mChunkSize ); + } + memcpy ( dest, this->mChunks [ chunk1 ], offset1 ); } - memcpy ( dest, this->mChunks [ chunk1 ], offset1 ); - } - this->mCursor = cursor1 - this->mBase; - return size; + this->mCursor = cursor1 - this->mBase; + } + + ZL_RETURN_SIZE_RESULT ( size, ZL_OK ); } //----------------------------------------------------------------// -void ZLMemStream::Reserve ( size_t length ) { +ZLResultCode ZLMemStream::Reserve ( size_t length ) { + + size_t totalChunks = this->mChunks.Size (); // already have some buffer large enough to accomodate length, so bail - if ( length <= this->mLength ) return; + if ( length <= this->mLength ) return ZL_OK; if ( this->mGuestBuffer ) { // guest buffer can accomodate new length even if there's an offset, so bail - if ( length <= ( this->mGuestBufferSize - this->mBase )) return; + if ( length <= ( this->mGuestBufferSize - this->mBase )) return ZL_OK; if ( length <= this->mGuestBufferSize ) { // guest buffer can accomodate new length but only if there's no offset, so shift the contents of the guest buffer and bail memmove ( this->mGuestBuffer, ( void* )(( size_t )this->mGuestBuffer + this->mBase ), this->mLength ); this->mBase = 0; - return; - } - else { - // pop the guest buffer - this->SetGuestBuffer ( 0, 0 ); + return ZL_OK; } } size_t top = this->mBase + length; - size_t totalChunks = ( top / this->mChunkSize ) + 1; - if ( totalChunks <= this->mTotalChunks ) return; + size_t neededChunks = ( top / this->mChunkSize ) + 1; + if ( neededChunks <= totalChunks ) return ZL_OK; - this->mChunks.Grow ( totalChunks ); + ZLLeanArray < ZLLeanArray < u8 > > temp; + if ( temp.Init ( neededChunks ) != ZL_OK ) return ZL_ALLOCATION_ERROR; - for ( size_t i = this->mTotalChunks; i < totalChunks; ++i ) { - this->mChunks [ i ] = malloc ( this->mChunkSize ); + for ( size_t i = totalChunks; i < neededChunks; ++i ) { + if ( temp [ i ].Init ( this->mChunkSize )) return ZL_ALLOCATION_ERROR; } - this->mTotalChunks = totalChunks; + // we made it this far, so we're through the woods: no more allocations + // it is now OK to mutate internal state + + for ( size_t i = 0; i < totalChunks; ++i ) { + temp [ i ].Take ( this->mChunks [ i ]); + } + + this->SetGuestBuffer ( 0, 0 ); // won't need the guest buffer any more + + this->mChunks.Take ( temp ); + return ZL_OK; } //----------------------------------------------------------------// @@ -218,10 +236,12 @@ void ZLMemStream::SetChunkSize ( size_t chunkSize ) { } //----------------------------------------------------------------// -int ZLMemStream::SetCursor ( long offset ) { +ZLResultCode ZLMemStream::SetCursor ( size_t offset ) { - this->mCursor = offset > 0 ? offset : 0; - return 0; + if (( offset < 0 ) || ( this->mLength < offset )) return ZL_ERROR; + + this->mCursor = offset; + return ZL_OK; } //----------------------------------------------------------------// @@ -230,48 +250,52 @@ void ZLMemStream::SetGuestBuffer ( void* guestBuffer, size_t guestBufferSize ) { // if guest buffer will not be large enough to accomodate contents of stream... if ( guestBufferSize < this->mLength ) { - // clear these out - this->mGuestBuffer = 0; - this->mGuestBufferSize = 0; - // copy contents of the old guest buffer to chunks if ( this->mGuestBuffer ) { + void* buffer = this->mGuestBuffer; + + // clear these out + this->mGuestBuffer = 0; + this->mGuestBufferSize = 0; + this->WriteBytes ( buffer, this->mLength ); } } else { - // this will also copy from the existing guest buffer, if any - this->ReadBytes ( guestBuffer, this->mLength ); - - // don't need chunks (if any) - this->ClearChunks (); - + if ( guestBuffer ) { + + // this will also copy from the existing guest buffer, if any + this->ReadBytes ( guestBuffer, this->mLength ); + + // don't need chunks (if any) + this->mChunks.Clear (); + } this->mGuestBuffer = guestBuffer; this->mGuestBufferSize = guestBufferSize; } } //----------------------------------------------------------------// -size_t ZLMemStream::SetLength ( size_t length ) { +ZLSizeResult ZLMemStream::SetLength ( size_t length ) { if ( length < this->mLength ) { this->DiscardBack ( this->mLength - length ); } else { - this->Reserve ( length ); + if ( this->Reserve ( length ) != ZL_OK ) ZL_RETURN_SIZE_RESULT ( 0, ZL_ALLOCATION_ERROR ); this->mLength = length; } - return length; + ZL_RETURN_SIZE_RESULT ( length, ZL_OK ); } //----------------------------------------------------------------// -size_t ZLMemStream::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLMemStream::WriteBytes ( const void* buffer, size_t size ) { - if ( !size ) return 0; + if ( !size ) ZL_RETURN_SIZE_RESULT ( 0, ZL_OK ); - this->Reserve ( this->mCursor + size ); + if ( this->Reserve ( this->mCursor + size ) != ZL_OK ) ZL_RETURN_SIZE_RESULT ( 0, ZL_ALLOCATION_ERROR ); size_t cursor0 = this->mBase + this->mCursor; size_t cursor1 = cursor0 + size; @@ -282,39 +306,41 @@ size_t ZLMemStream::WriteBytes ( const void* buffer, size_t size ) { if ( this->mLength < this->mCursor ) { this->mLength = this->mCursor; } - return size; } + else { - size_t chunk0 = ( size_t )( cursor0 / this->mChunkSize ); - size_t chunk1 = ( size_t )( cursor1 / this->mChunkSize ); + size_t chunk0 = ( size_t )( cursor0 / this->mChunkSize ); + size_t chunk1 = ( size_t )( cursor1 / this->mChunkSize ); - size_t offset0 = cursor0 - ( chunk0 * this->mChunkSize ); - size_t offset1 = cursor1 - ( chunk1 * this->mChunkSize ); + size_t offset0 = cursor0 - ( chunk0 * this->mChunkSize ); + size_t offset1 = cursor1 - ( chunk1 * this->mChunkSize ); - void* dest = ( void* )(( size_t )this->mChunks [ chunk0 ] + offset0 ); - const void* src = buffer; + void* dest = ( void* )(( size_t )this->mChunks [ chunk0 ].Data () + offset0 ); + const void* src = buffer; - if ( chunk0 == chunk1 ) { - - memcpy ( dest, src, offset1 - offset0 ); - } - else { - - memcpy ( dest, src, this->mChunkSize - offset0 ); - src = ( void* )(( size_t )src + this->mChunkSize - offset0 ); + if ( chunk0 == chunk1 ) { - for ( size_t i = ( chunk0 + 1 ); i < chunk1; ++i ) { - memcpy ( this->mChunks [ i ], src, this->mChunkSize ); - src = ( void* )(( size_t )src + this->mChunkSize ); + memcpy ( dest, src, offset1 - offset0 ); + } + else { + + memcpy ( dest, src, this->mChunkSize - offset0 ); + src = ( void* )(( size_t )src + this->mChunkSize - offset0 ); + + for ( size_t i = ( chunk0 + 1 ); i < chunk1; ++i ) { + memcpy ( this->mChunks [ i ], src, this->mChunkSize ); + src = ( void* )(( size_t )src + this->mChunkSize ); + } + memcpy ( this->mChunks [ chunk1 ], src, offset1 ); } - memcpy ( this->mChunks [ chunk1 ], src, offset1 ); - } - this->mCursor = cursor1 - this->mBase; - if ( this->mLength < this->mCursor ) { - this->mLength = this->mCursor; + this->mCursor = cursor1 - this->mBase; + if ( this->mLength < this->mCursor ) { + this->mLength = this->mCursor; + } } - return size; + + ZL_RETURN_SIZE_RESULT ( size, ZL_OK ); } //----------------------------------------------------------------// @@ -322,7 +348,6 @@ ZLMemStream::ZLMemStream () : mGuestBuffer ( 0 ), mGuestBufferSize ( 0 ), mChunkSize ( DEFAULT_CHUNK_SIZE ), - mTotalChunks ( 0 ), mBase ( 0 ), mCursor ( 0 ), mLength ( 0 ) { diff --git a/src/zl-util/ZLMemStream.h b/src/zl-util/ZLMemStream.h index 942c133a78..0f7ccd9818 100644 --- a/src/zl-util/ZLMemStream.h +++ b/src/zl-util/ZLMemStream.h @@ -24,17 +24,14 @@ class ZLMemStream : size_t mGuestBufferSize; size_t mChunkSize; - size_t mTotalChunks; - ZLLeanArray < void* > mChunks; + ZLLeanArray < ZLLeanArray < u8 > > mChunks; - size_t mBase; // offset into base chunk (in the event of DiscardFront); never larger than chunk size + size_t mBase; // offset into first chunk (in the event of DiscardFront); never larger than chunk size size_t mCursor; // current position in stream size_t mLength; // current length of stream //----------------------------------------------------------------// - void ClearChunks (); - int SetCursor ( long offset ); public: @@ -44,17 +41,20 @@ class ZLMemStream : void Clear (); void Compact (); void DiscardAll (); + void DiscardBack (); void DiscardBack ( size_t size ); + void DiscardFront (); void DiscardFront ( size_t size ); u32 GetCaps (); size_t GetCursor (); size_t GetLength (); - size_t ReadBytes ( void* buffer, size_t size ); - void Reserve ( size_t length ); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); + ZLResultCode Reserve ( size_t length ); void SetChunkSize ( size_t chunkSize ); + ZLResultCode SetCursor ( size_t offset ); void SetGuestBuffer ( void* guestBuffer, size_t guestBufferSize ); - size_t SetLength ( size_t length ); - size_t WriteBytes ( const void* buffer, size_t size ); + ZLSizeResult SetLength ( size_t length ); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); ZLMemStream (); ~ZLMemStream (); }; diff --git a/src/zl-util/ZLParser.cpp b/src/zl-util/ZLParser.cpp index 388b5ea22f..b8647a93b9 100644 --- a/src/zl-util/ZLParser.cpp +++ b/src/zl-util/ZLParser.cpp @@ -220,7 +220,7 @@ u32 ZLParser::ParseToken ( ZLDfaToken* token, bool trimReductions ) { head.mSymbol = ruleResult; // Create the syntax node and initialize it... - u32 handleSize = rule.mRuleSymbols.Size (); + size_t handleSize = rule.mRuleSymbols.Size (); u16 prevStateID = this->mTokenStack.back ().mLALRStateID; diff --git a/src/zl-util/ZLPolygon2D.cpp b/src/zl-util/ZLPolygon2D.cpp new file mode 100644 index 0000000000..0c82b2b590 --- /dev/null +++ b/src/zl-util/ZLPolygon2D.cpp @@ -0,0 +1,569 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include +#include +#include +#include + +typedef ZLRadixKey32 < ZLVec2D > ZLRadixVec2D; + +//================================================================// +// ZLPolygon2D +//================================================================// + +//----------------------------------------------------------------// +u32 ZLPolygon2D::Analyze () { + + size_t totalVerts = this->mVertices.Size (); + if ( totalVerts < 3 ) return POLY_CORRUPT; + + u32 status = POLY_KNOWN_BIT; + + //float sign = 0.0; + + size_t countPositive = 0; + size_t countNegative = 0; + + float area = 0.0; + + for ( size_t i = 0; i < totalVerts; i++ ) { + + size_t nextIndex = ( i + 1 ) % totalVerts; + + ZLVec2D& p0 = this->mVertices [ i ]; + ZLVec2D& p1 = this->mVertices [ nextIndex ]; + ZLVec2D& p2 = this->mVertices [( i + 2 ) % totalVerts ]; + + area += p0.Cross ( p1 ); + + ZLVec2D v0 = p1; + v0.Sub ( p0 ); + + ZLVec2D v1 = p2; + v1.Sub ( p1 ); + + float z = v0.Cross ( v1 ); + if ( z > 0.0 ) { + countPositive++; + } + else if ( z < 0.0f ) { + countNegative++; + } + else { + continue; + } + + // we're going to brute force this here for now + // TODO: check number of edges and do something efficient (Shamos-Hoey, for example) + if ( i >= 2 ) { + + for ( size_t j = nextIndex == 0 ? 1 : 0; j < ( i - 1 ); ++j ) { + + ZLVec2D& q0 = this->mVertices [ j ]; + ZLVec2D& q1 = this->mVertices [ j + 1 ]; + + if ( ZLSect::LineToLine ( p0, p1, q0, q1 ) == ZLSect::SECT_HIT ) { + return POLY_COMPLEX; + } + } + } + } + + this->mArea = ABS ( area / 2 ); + + if ( countPositive == countNegative ) { + + return POLY_CORRUPT; + } + else { + + if ( countPositive < countNegative ) { + status |= POLY_CLOCKWISE_BIT; + } + + // both not 0; we're concave + if ( countPositive && countNegative ) { + status |= POLY_CONCAVE_BIT; + } + } + return status; +} + +//----------------------------------------------------------------// +size_t ZLPolygon2D::Bless () { + + size_t totalVerts = this->mVertices.Size (); + + if ( totalVerts < 3 ) { + this->mInfo = POLY_CORRUPT; + return this->mInfo; + } + + this->mBounds.Init (this->mVertices [ 0 ]); + + for ( size_t i = 1; i < totalVerts; ++i ) { + ZLVec2D& point = this->mVertices [ i ]; + this->mBounds.Grow ( point ); + } + + this->mInfo = this->Analyze (); + return this->mInfo; +} + +//----------------------------------------------------------------// +bool ZLPolygon2D::Check ( u32 check ) const { + + switch ( check ) { + + case HAS_AREA: return ( this->mInfo & POLY_KNOWN_BIT ) && !( this->mInfo & ( POLY_COMPLEX_BIT | POLY_CORRUPT_BIT )); + case HAS_NO_AREA: return ( this->mInfo & POLY_KNOWN_BIT ) && ( this->mInfo & ( POLY_COMPLEX_BIT | POLY_CORRUPT_BIT )); + + case IS_COMPLEX: return this->mInfo == POLY_COMPLEX; + case IS_CORRUPT: return this->mInfo == POLY_CORRUPT; + case IS_KNOWN: return this->mInfo != POLY_UNKNOWN; + case IS_UNKNOWN: return this->mInfo == POLY_UNKNOWN; + + case IS_CONVEX: return (( this->mInfo & SHAPE_MASK ) == POLY_KNOWN_BIT ); + case IS_CONCAVE: return (( this->mInfo & SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CONCAVE_BIT )); + + case IS_CLOCKWISE: return (( this->mInfo & WINDING_MASK ) == ( POLY_KNOWN_BIT | POLY_CLOCKWISE_BIT )); + case IS_ANTICLOCKWISE: return (( this->mInfo & WINDING_MASK ) == POLY_KNOWN_BIT ); + + case IS_CLOCKWISE_CONVEX: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CLOCKWISE_BIT )); + case IS_CLOCKWISE_CONCAVE: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CLOCKWISE_BIT | POLY_CONCAVE_BIT )); + + case IS_ANTICLOCKWISE_CONVEX: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT )); + case IS_ANTICLOCKWISE_CONCAVE: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CONCAVE_BIT )); + } + return false; +} + +//----------------------------------------------------------------// +void ZLPolygon2D::Clear () { + + this->mVertices.Clear (); + this->mInfo = POLY_UNKNOWN; +} + +//----------------------------------------------------------------// +//ZLSizeResult ZLPolygon2D::ConcaveHull ( ZLStream& input, size_t nPoints, int maxEdges, int maxPasses, float minIndent ) { +// +// size_t reset = input.GetCursor (); +// +// this->ConvexHull ( input, nPoints ); +// +// size_t inputSize = nPoints * sizeof ( ZLVec2D ); +// +// ZL_DECLARE_SCOPED_BUFFER ( points, ZLVec2D, inputSize, 1024 ) +// +// input.Seek ( reset, SEEK_SET ); +// input.ReadBytes ( points, inputSize ); +// +// // passes +// for ( size_t i = 0; i < ( size_t )maxPasses; ++i ) { +// +// // cull exterior and face points +// size_t nInside = 0; +// for ( size_t j = 0; j < nPoints; ++j ) { +// +// if ( this->PointInside ( points [ j ]) == POINT_INSIDE ) { +// points [ nInside ] = points [ j ]; +// nInside++; +// } +// } +// nPoints = nInside; +// +// size_t nVerts = this->mVertices.Size (); +// for ( size_t i = 0; i < nVerts; i++ ) { +// +// ZLVec2D& p1 = this->mVertices [ i ]; +// ZLVec2D& p2 = this->mVertices [( i + 1 ) % nVerts ]; +// } +// } +// +// //nPoints = interior.GetLength () / sizeof ( ZLVec2D ); +// interior.Seek ( 0, SEEK_SET ); +//} + +//----------------------------------------------------------------// +ZLSizeResult ZLPolygon2D::ConvexHull ( ZLStream& input, size_t nPoints, u32 sort ) { + + this->Clear (); + + size_t size = nPoints * sizeof ( ZLVec2D ); + + ZL_DECLARE_SCOPED_BUFFER ( points, ZLVec2D, size, 1024 ) + ZL_DECLARE_SCOPED_BUFFER ( hull, ZLVec2D, 2 * size, 1024 ) + if ( !hull ) ZL_RETURN_SIZE_RESULT ( 0, ZL_ALLOCATION_ERROR ) + + ZLSizeResult readResult = input.ReadBytes ( points, size ); + ZL_RETURN_SIZE_RESULT_IF_NOT_EQUAL ( readResult, size, 0, CODE ) + + ZLSizeResult chainResult = ZLPolygon2D::MonotoneChain ( hull, points, nPoints, sort ); + + if ( chainResult.mCode == ZL_OK ) { + + this->Clear (); + ZL_HANDLE_ERROR_CODE ( this->ReserveVertices ( chainResult ), ZL_RETURN_SIZE_RESULT ( 0, ZL_ALLOCATION_ERROR )) + + memcpy ( this->mVertices, hull, chainResult * sizeof ( ZLVec2D )); + + this->Bless (); + } + return chainResult; +} + +//----------------------------------------------------------------// +void ZLPolygon2D::Copy ( const ZLPolygon2D& src ) { + + this->Clear (); + + this->mInfo = src.mInfo; + this->mBounds = src.mBounds; + + this->mVertices.Init ( src.mVertices.Size ()); + this->mVertices.CopyFrom ( src.mVertices ); +} + +//----------------------------------------------------------------// +bool ZLPolygon2D::GetDistance ( const ZLVec2D& point, float& d ) const { + + ZLVec2D p; + return this->GetDistance ( point, d, p ); +} + + +//----------------------------------------------------------------// +bool ZLPolygon2D::GetDistance ( const ZLVec2D& point, float& d, ZLVec2D& p ) const { + UNUSED ( d ); + + bool foundResult = false; + + size_t totalVerts = this->mVertices.Size (); + + for ( size_t i = 0; i < totalVerts; ++i ) { + + ZLVec2D& e0 = this->mVertices [ i ]; + ZLVec2D& e1 = this->mVertices [( i + 1 ) % totalVerts ]; + + // get the edge vector + ZLVec2D n = ZLVec2D::Sub ( e1, e0 ); + + // distance of edges and point along edge + float edgeDist0 = n.Dot ( e0 ); + float edgeDist1 = n.Dot ( e1 ); + float edgeDist = n.Dot ( point ); + + ZLVec2D candidateP; + + // if point lies inside edge + if (( edgeDist0 <= edgeDist ) && ( edgeDist <= edgeDist1 )) { + // snap the point onto the edge + + // edge normal + n.Rotate90Anticlockwise (); + n.NormSafe (); + + // snap + candidateP = ZLVec2D::Add ( point, n, n.Dot ( e0 ) - n.Dot ( point )); + } + else { + // snap point to closest end point + candidateP = ( edgeDist < edgeDist0 ) ? e0 : e1; + } + + float candidateD = candidateP.Dist ( point ); + + if (( !foundResult ) || ( candidateD < d )) { + + d = candidateD; + p = candidateP; + + foundResult = true; + } + } + return foundResult; +} + +//----------------------------------------------------------------// +cc8* ZLPolygon2D::GetInfoString () const { + + return ZLPolygon2D::GetInfoString ( this->mInfo ); +} + +//----------------------------------------------------------------// +cc8* ZLPolygon2D::GetInfoString ( u32 info ) { + + switch ( info ) { + case POLY_UNKNOWN: return "POLY_UNKNOWN"; + case POLY_COMPLEX: return "POLY_COMPLEX"; + case POLY_ANTICLOCKWISE_CONVEX: return "POLY_ANTICLOCKWISE_CONVEX"; + case POLY_ANTICLOCKWISE_CONCAVE: return "POLY_ANTICLOCKWISE_CONCAVE"; + case POLY_CLOCKWISE_CONVEX: return "POLY_CLOCKWISE_CONVEX"; + case POLY_CLOCKWISE_CONCAVE: return "POLY_CLOCKWISE_CONCAVE"; + case POLY_CORRUPT: return "POLY_CORRUPT"; + }; + return ""; +} + +//----------------------------------------------------------------// +const ZLVec2D& ZLPolygon2D::GetVertex ( size_t idx ) const { + + size_t size = this->mVertices.Size (); + assert ( size ); + + return this->mVertices [ idx % size ]; +} + +//----------------------------------------------------------------// +void ZLPolygon2D::InitAsRect ( const ZLRect& rect ) { + + this->mVertices.Init ( 4 ); + + this->mVertices [ 0 ].mX = rect.mXMin; + this->mVertices [ 0 ].mY = rect.mYMin; + + this->mVertices [ 1 ].mX = rect.mXMax; + this->mVertices [ 1 ].mY = rect.mYMin; + + this->mVertices [ 2 ].mX = rect.mXMax; + this->mVertices [ 2 ].mY = rect.mYMax; + + this->mVertices [ 3 ].mX = rect.mXMin; + this->mVertices [ 3 ].mY = rect.mYMax; + + this->mInfo = POLY_UNKNOWN; +} + +//----------------------------------------------------------------// +ZLSizeResult ZLPolygon2D::MonotoneChain ( ZLVec2D* hull, ZLVec2D* points, size_t nPoints, u32 sort ) { + + size_t nHull = 0; + size_t size = nPoints * sizeof ( ZLVec2D ); + + switch ( sort ) { + + case SORT_RADIX: { + + ZL_DECLARE_SCOPED_BUFFER ( radixBuffer, ZLRadixVec2D, 2 * size, 1024 ) + if ( !radixBuffer ) ZL_RETURN_SIZE_RESULT ( 0, ZL_ALLOCATION_ERROR ); + + ZLRadixVec2D* swapBuffer = ( ZLRadixVec2D* )(( size_t )radixBuffer + size ); + + for ( size_t i = 0; i < nPoints; ++i ) { + const ZLVec2D& p = points [ i ]; + radixBuffer [ i ].mData = p; + radixBuffer [ i ].mKey = ZLFloat::FloatToIntKey (( p.mX * ( float )nPoints ) + p.mY ); // sort by x then y + } + + radixBuffer = RadixSort32 < ZLRadixVec2D >( radixBuffer, swapBuffer, nPoints ); + + for ( size_t i = 0; i < nPoints; ++i ) { + points [ i ] = radixBuffer [ i ].mData; + } + return ZLPolygon2D::MonotoneChain ( hull, points, nPoints, SORT_NONE ); + } + + case SORT_CSTDLIB: { + + qsort ( points, nPoints, sizeof ( ZLVec2D ), ZLPolygon2D::MonotoneChainComp ); + return ZLPolygon2D::MonotoneChain ( hull, points, nPoints, SORT_NONE ); + } + + case SORT_NONE: + default: { + + for ( size_t i = 0; i < nPoints; i++ ) { + while ( nHull >= 2 && hull [ nHull - 2 ].CrossJoint ( hull [ nHull - 1 ], points [ i ]) <= 0 ) nHull--; + hull [ nHull++ ] = points [ i ]; + } + + for ( size_t i = nPoints - 2, t = nHull + 1; i != ( size_t )-1; i-- ) { + while ( nHull >= t && hull [ nHull - 2 ].CrossJoint ( hull [ nHull - 1 ], points [ i ]) <= 0 ) nHull--; + hull [ nHull++ ] = points [ i ]; + } + } + } + + ZL_RETURN_SIZE_RESULT ( nHull - 1, ZL_OK ); +} + +//----------------------------------------------------------------// +int ZLPolygon2D::MonotoneChainComp ( const void* p1, const void* p2 ) { + + const ZLVec2D* v0 = ( ZLVec2D* )p1; + const ZLVec2D* v1 = ( ZLVec2D* )p2; + + if ( v0->mX < v1->mX ) return -1; + if ( v0->mX > v1->mX ) return 1; + + if ( v0->mY < v1->mY ) return -1; + if ( v0->mY > v1->mY ) return 1; + + return 0; +} + +//----------------------------------------------------------------// +u32 ZLPolygon2D::PointInside ( const ZLVec2D& p, float pad ) const { + + if ( pad != 0.0f ) { + + float dist = 0.0f; + + if ( this->GetDistance ( p, dist )) { + if ( dist <= ABS ( pad ) ) { + return pad < 0.0f ? POINT_OUTSIDE : POINT_ON_EDGE; + } + } + } + + bool inPoly = false; // start off assuming it _isn't_ in the polygon + + if ( this->mBounds.Contains ( p )) { + + float x = p.mX; + float y = p.mY; + + size_t totalVerts = this->mVertices.Size (); + for ( size_t i = 0; i < totalVerts; i++ ) { + + ZLVec2D& p1 = this->mVertices [ i ]; + ZLVec2D& p2 = this->mVertices [( i + 1 ) % totalVerts ]; + + // Components of points + float p1X = p1.mX; + float p1Y = p1.mY; + float p2X = p2.mX; + float p2Y = p2.mY; + + // Segment is behind point, so skip + if ( x > MAX ( p1X, p2X )) continue; + + // Special case if edge is parallel + if ( p1Y == p2Y ) { + if (( p1Y == y ) && (( x <= p1X ) || ( x <= p2X ))) return POINT_ON_EDGE; + continue; + } + + // Reject line segs above, below or horizontal + if ( y <= MIN ( p1Y, p2Y )) continue; + if ( y > MAX ( p1Y, p2Y )) continue; + + // x intersect w/ line seg + float xIntersect = (( y - p1Y ) * ( p2X - p1X ) / ( p2Y - p1Y )) + p1X; + + // If we're on the line, return true + if ( x == xIntersect ) return POINT_ON_EDGE; + + // If point is to the left of or on line, toggle state + if ( p1X == p2X || x <= xIntersect ) { + inPoly = !inPoly; // Crossed an edge, so flip the state + } + } + } + + return inPoly ? POINT_INSIDE : POINT_OUTSIDE; +} + +//----------------------------------------------------------------// +ZLResultCode ZLPolygon2D::ReserveVertices ( size_t total ) { + + this->mInfo = POLY_UNKNOWN; + return this->mVertices.Init ( total ); +} + +//----------------------------------------------------------------// +void ZLPolygon2D::ReverseWinding () { + + size_t nVerts = this->mVertices.Size (); + size_t nSwaps = nVerts >> 1; + + for ( size_t i = 0; i < nSwaps; ++i ) { + + size_t j = nVerts - i - 1; + + + ZLVec2D& v0 = this->mVertices [ i ]; + ZLVec2D& v1 = this->mVertices [ j ]; + + ZLVec2D swap = v0; + + v0 = v1; + v1 = swap; + } + + if ( this->mInfo & POLY_KNOWN_BIT ) { + this->mInfo ^= POLY_CLOCKWISE_BIT; + } +} + +//----------------------------------------------------------------// +void ZLPolygon2D::SetVert ( size_t idx, const ZLVec2D& v ) { + + this->mVertices [ idx ] = v; + this->mInfo = POLY_UNKNOWN; +} + +//----------------------------------------------------------------// +void ZLPolygon2D::SetVert ( size_t idx, float x, float y ) { + + ZLVec2D& vert = this->mVertices [ idx ]; + + vert.mX = x; + vert.mY = y; + + this->mInfo = POLY_UNKNOWN; +} + +//----------------------------------------------------------------// +void ZLPolygon2D::SetVertices ( const ZLVec2D* vertices, size_t total ) { + + this->ReserveVertices ( total ); + memcpy ( this->mVertices.Data (), vertices, sizeof ( ZLVec2D ) * total ); +} + +//----------------------------------------------------------------// +void ZLPolygon2D::Snap ( float xSnap, float ySnap ) { + + size_t totalVerts = this->mVertices.Size (); + for ( size_t i = 0; i < totalVerts; i++ ) { + + ZLVec2D& vert = this->mVertices [ i ]; + + vert.mX = xSnap == 0.0f ? vert.mX : floorf (( vert.mX / xSnap ) + 0.5f ) * xSnap; + vert.mY = ySnap == 0.0f ? vert.mY : floorf (( vert.mY / ySnap ) + 0.5f ) * ySnap; + } +} + +//----------------------------------------------------------------// +void ZLPolygon2D::Transform ( const ZLAffine2D& matrix ) { + + size_t totalVerts = this->mVertices.Size (); + for ( size_t i = 0; i < totalVerts; i++ ) { + matrix.Transform ( this->mVertices [ i ]); + } + + if ( this->mInfo != POLY_UNKNOWN ) { + + float c0r0 = matrix.m [ ZLAffine2D::C0_R0 ]; + float c1r1 = matrix.m [ ZLAffine2D::C1_R1 ]; + + if ((( c0r0 < 0.0f ) || ( c1r1 > 0.0f )) || (( c0r0 > 0.0f ) || ( c1r1 < 0.0f ))) { + this->mInfo ^= POLY_CLOCKWISE_BIT; + } + } +} + +//----------------------------------------------------------------// +ZLPolygon2D::ZLPolygon2D () : + mInfo ( POLY_UNKNOWN ), + mArea ( 0 ) { +} + +//----------------------------------------------------------------// +ZLPolygon2D::~ZLPolygon2D () { +} + diff --git a/src/zl-util/ZLPolygon2D.h b/src/zl-util/ZLPolygon2D.h index f533f8a54e..f3af84dce1 100644 --- a/src/zl-util/ZLPolygon2D.h +++ b/src/zl-util/ZLPolygon2D.h @@ -4,14 +4,16 @@ #ifndef ZLPOLYGON2D_H #define ZLPOLYGON2D_H -#include +#include #include +#include +#include +#include //================================================================// -// ZLMetaPolygon2D +// ZLPolygon2D //================================================================// -template < typename TYPE > -class ZLMetaPolygon2D { +class ZLPolygon2D { public: static const u32 POLY_KNOWN_BIT = 0x01; @@ -62,438 +64,59 @@ class ZLMetaPolygon2D { IS_ANTICLOCKWISE_CONCAVE, }; + typedef float VertexComponentType; + static const size_t VERTEX_SIZE = 2 * sizeof ( VertexComponentType ); + + enum { + SORT_NONE, + SORT_RADIX, + SORT_CSTDLIB, + }; + private: u32 mInfo; - TYPE mArea; - ZLMetaRect < TYPE > mBounds; - ZLLeanArray < ZLMetaVec2D < TYPE > > mVertices; + float mArea; + ZLRect mBounds; + ZLLeanArray < ZLVec2D > mVertices; //----------------------------------------------------------------// - u32 Analyze () { - - u32 totalVerts = this->mVertices.Size (); - if ( totalVerts < 3 ) return POLY_CORRUPT; - - u32 status = POLY_KNOWN_BIT; - - TYPE sign = 0.0; - - u32 countPositive = 0; - u32 countNegative = 0; - - TYPE area = 0.0; - - for ( u32 i = 0; i < totalVerts; i++ ) { - - u32 nextIndex = ( i + 1 ) % totalVerts; - - ZLMetaVec2D < TYPE >& p0 = this->mVertices [ i ]; - ZLMetaVec2D < TYPE >& p1 = this->mVertices [ nextIndex ]; - ZLMetaVec2D < TYPE >& p2 = this->mVertices [( i + 2 ) % totalVerts ]; - - area += p0.Cross ( p1 ); - - ZLMetaVec2D < TYPE > v0 = p1; - v0.Sub ( p0 ); - - ZLMetaVec2D < TYPE > v1 = p2; - v1.Sub ( p1 ); - - TYPE z = v0.Cross ( v1 ); - if ( z > 0.0 ) { - countPositive++; - } - else if ( z < 0.0f ) { - countNegative++; - } - - // we're going to brute force this here for now - // TODO: check number of edges and do something efficient (Shamos-Hoey, for example) - if ( i >= 2 ) { - - for ( u32 j = nextIndex == 0 ? 1 : 0; j < ( i - 1 ); ++j ) { - - ZLMetaVec2D < TYPE >& q0 = this->mVertices [ j ]; - ZLMetaVec2D < TYPE >& q1 = this->mVertices [ j + 1 ]; - - if ( ZLSect::LineToLine ( p0, p1, q0, q1 ) == ZLSect::SECT_HIT ) { - return POLY_COMPLEX; - } - } - } - } - - this->mArea = ABS ( area / 2 ); - - if ( countPositive == countNegative ) { - - return POLY_CORRUPT; - } - else { - - if ( countPositive < countNegative ) { - status |= POLY_CLOCKWISE_BIT; - } - - // both not 0; we're concave - if ( countPositive && countNegative ) { - status |= POLY_CONCAVE_BIT; - } - } - return status; - } + u32 Analyze (); + static ZLSizeResult MonotoneChain ( ZLVec2D* hull, ZLVec2D* points, size_t nPoints, u32 sort = SORT_CSTDLIB ); // hull buffer *must* be at least 2x the size of points + static int MonotoneChainComp ( const void* p1, const void* p2 ); public: - GET_CONST ( ZLMetaRect < TYPE >&, Bounds, mBounds ) + GET_CONST ( ZLRect&, Bounds, mBounds ) GET_CONST ( u32, Info, mInfo ) - GET_CONST ( TYPE, Area, mArea ) + GET_CONST ( float, Area, mArea ) - GET_CONST ( ZLMetaVec2D < TYPE >*, Vertices, this->mVertices.Data ()) + GET_CONST ( ZLVec2D*, Vertices, this->mVertices.Data ()) GET_CONST ( size_t, Size, this->mVertices.Size ()) //----------------------------------------------------------------// - u32 Bless () { - - u32 totalVerts = this->mVertices.Size (); - - if ( totalVerts < 3 ) { - this->mInfo = POLY_CORRUPT; - return this->mInfo; - } - - this->mBounds.Init (this->mVertices [ 0 ]); - - for ( u32 i = 1; i < totalVerts; ++i ) { - ZLMetaVec2D < TYPE >& point = this->mVertices [ i ]; - this->mBounds.Grow ( point ); - } - - this->mInfo = this->Analyze (); - return this->mInfo; - } - - //----------------------------------------------------------------// - bool Check ( u32 check ) const { - - switch ( check ) { - - case HAS_AREA: return ( this->mInfo & POLY_KNOWN_BIT ) && !( this->mInfo & ( POLY_COMPLEX_BIT | POLY_CORRUPT_BIT )); - case HAS_NO_AREA: return ( this->mInfo & POLY_KNOWN_BIT ) && ( this->mInfo & ( POLY_COMPLEX_BIT | POLY_CORRUPT_BIT )); - - case IS_COMPLEX: return this->mInfo == POLY_COMPLEX; - case IS_CORRUPT: return this->mInfo == POLY_CORRUPT; - case IS_KNOWN: return this->mInfo != POLY_UNKNOWN; - case IS_UNKNOWN: return this->mInfo == POLY_UNKNOWN; - - case IS_CONVEX: return (( this->mInfo & SHAPE_MASK ) == POLY_KNOWN_BIT ); - case IS_CONCAVE: return (( this->mInfo & SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CONCAVE_BIT )); - - case IS_CLOCKWISE: return (( this->mInfo & WINDING_MASK ) == ( POLY_KNOWN_BIT | POLY_CLOCKWISE_BIT )); - case IS_ANTICLOCKWISE: return (( this->mInfo & WINDING_MASK ) == POLY_KNOWN_BIT ); - - case IS_CLOCKWISE_CONVEX: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CLOCKWISE_BIT )); - case IS_CLOCKWISE_CONCAVE: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CLOCKWISE_BIT | POLY_CONCAVE_BIT )); - - case IS_ANTICLOCKWISE_CONVEX: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT )); - case IS_ANTICLOCKWISE_CONCAVE: return (( this->mInfo & WINDING_SHAPE_MASK ) == ( POLY_KNOWN_BIT | POLY_CONCAVE_BIT )); - } - return false; - } - - //----------------------------------------------------------------// - void Clear () { - - this->mVertices.Clear (); - this->mInfo = POLY_UNKNOWN; - } - - //----------------------------------------------------------------// - void Copy ( const ZLMetaPolygon2D < TYPE >& src ) { - - this->Clear (); - - this->mInfo = src.mInfo; - this->mBounds = src.mBounds; - - this->mVertices.Init ( src.mVertices.Size ()); - this->mVertices.CopyFrom ( src.mVertices ); - } - - //----------------------------------------------------------------// - bool GetDistance ( const ZLMetaVec2D < TYPE >& point, float& d ) const { - - ZLMetaVec2D < TYPE > p; - return this->GetDistance ( point, d, p ); - } - - - //----------------------------------------------------------------// - bool GetDistance ( const ZLMetaVec2D < TYPE >& point, float& d, ZLMetaVec2D < TYPE >& p ) const { - UNUSED ( d ); - - bool foundResult = false; - - size_t totalVerts = this->mVertices.Size (); - - for ( size_t i = 0; i < totalVerts; ++i ) { - - ZLMetaVec2D < TYPE >& e0 = this->mVertices [ i ]; - ZLMetaVec2D < TYPE >& e1 = this->mVertices [( i + 1 ) % totalVerts ]; - - // get the edge vector - ZLMetaVec2D < TYPE > n = ZLMetaVec2D < TYPE >::Sub ( e1, e0 ); - - // distance of edges and point along edge - float edgeDist0 = n.Dot ( e0 ); - float edgeDist1 = n.Dot ( e1 ); - float edgeDist = n.Dot ( point ); - - ZLMetaVec2D < TYPE > candidateP; - - // if point lies inside edge - if (( edgeDist0 <= edgeDist ) && ( edgeDist <= edgeDist1 )) { - // snap the point onto the edge - - // edge normal - n.Rotate90Anticlockwise (); - n.NormSafe (); - - // snap - candidateP = ZLMetaVec2D < TYPE >::Add ( point, n, n.Dot ( e0 ) - n.Dot ( point )); - } - else { - // snap point to closest end point - candidateP = ( edgeDist < edgeDist0 ) ? e0 : e1; - } - - float candidateD = candidateP.Dist ( point ); - - if (( !foundResult ) || ( candidateD < d )) { - - d = candidateD; - p = candidateP; - - foundResult = true; - } - } - return foundResult; - } - - //----------------------------------------------------------------// - cc8* GetInfoString () const { - - return ZLMetaPolygon2D < TYPE >::GetInfoString ( this->mInfo ); - } - - //----------------------------------------------------------------// - static cc8* GetInfoString ( u32 info ) { - - switch ( info ) { - case POLY_UNKNOWN: return "POLY_UNKNOWN"; - case POLY_COMPLEX: return "POLY_COMPLEX"; - case POLY_ANTICLOCKWISE_CONVEX: return "POLY_ANTICLOCKWISE_CONVEX"; - case POLY_ANTICLOCKWISE_CONCAVE: return "POLY_ANTICLOCKWISE_CONCAVE"; - case POLY_CLOCKWISE_CONVEX: return "POLY_CLOCKWISE_CONVEX"; - case POLY_CLOCKWISE_CONCAVE: return "POLY_CLOCKWISE_CONCAVE"; - case POLY_CORRUPT: return "POLY_CORRUPT"; - }; - return ""; - } - - //----------------------------------------------------------------// - const ZLVec2D& GetVertex ( u32 idx ) const { - - size_t size = this->mVertices.Size (); - assert ( size ); - - return this->mVertices [ idx % size ]; - } - - //----------------------------------------------------------------// - void InitAsRect ( const ZLMetaRect < TYPE >& rect ) { - - this->mVertices.Init ( 4 ); - - this [ 0 ].mX = rect.mXMin; - this [ 0 ].mY = rect.mYMin; - - this [ 1 ].mX = rect.mXMax; - this [ 1 ].mY = rect.mYMin; - - this [ 2 ].mX = rect.mXMax; - this [ 2 ].mY = rect.mYMax; - - this [ 3 ].mX = rect.mXMin; - this [ 3 ].mY = rect.mYMax; - - this->mInfo = POLY_UNKNOWN; - } - - //----------------------------------------------------------------// - u32 PointInside ( const ZLMetaVec2D < TYPE >& p, TYPE pad = 0.0f ) const { - - if ( pad != 0.0f ) { - - TYPE dist = 0.0f; - - if ( this->GetDistance ( p, dist )) { - if ( dist <= ABS ( pad ) ) { - return pad < 0.0f ? POINT_OUTSIDE : POINT_ON_EDGE; - } - } - } - - bool inPoly = false; // start off assuming it _isn't_ in the polygon - - if ( this->mBounds.Contains ( p )) { - - TYPE x = p.mX; - TYPE y = p.mY; - - u32 totalVerts = this->mVertices.Size (); - for ( u32 i = 0; i < totalVerts; i++ ) { - - ZLMetaVec2D < TYPE >& p1 = this->mVertices [ i ]; - ZLMetaVec2D < TYPE >& p2 = this->mVertices [( i + 1 ) % totalVerts ]; - - // Components of points - TYPE p1X = p1.mX; - TYPE p1Y = p1.mY; - TYPE p2X = p2.mX; - TYPE p2Y = p2.mY; - - // Segment is behind point, so skip - if ( x > MAX ( p1X, p2X )) continue; - - // Special case if edge is parallel - if ( p1Y == p2Y ) { - if (( p1Y == y ) && (( x <= p1X ) || ( x <= p2X ))) return POINT_ON_EDGE; - continue; - } - - // Reject line segs above, below or horizontal - if ( y <= MIN ( p1Y, p2Y )) continue; - if ( y > MAX ( p1Y, p2Y )) continue; - - // x intersect w/ line seg - TYPE xIntersect = (( y - p1Y ) * ( p2X - p1X ) / ( p2Y - p1Y )) + p1X; - - // If we're on the line, return true - if ( x == xIntersect ) return POINT_ON_EDGE; - - // If point is to the left of or on line, toggle state - if ( p1X == p2X || x <= xIntersect ) { - inPoly = !inPoly; // Crossed an edge, so flip the state - } - } - } - - return inPoly ? POINT_INSIDE : POINT_OUTSIDE; - } - - //----------------------------------------------------------------// - void ReserveVertices ( size_t total ) { - - this->mVertices.Init ( total ); - this->mInfo = POLY_UNKNOWN; - } - - //----------------------------------------------------------------// - void ReverseWinding () { - - size_t nVerts = this->mVertices.Size (); - size_t nSwaps = nVerts >> 1; - - for ( size_t i = 0; i < nSwaps; ++i ) { - - size_t j = nVerts - i - 1; - - - ZLMetaVec2D < TYPE >& v0 = this->mVertices [ i ]; - ZLMetaVec2D < TYPE >& v1 = this->mVertices [ j ]; - - ZLMetaVec2D < TYPE > swap = v0; - - v0 = v1; - v1 = swap; - } - - if ( this->mInfo & POLY_KNOWN_BIT ) { - this->mInfo ^= POLY_CLOCKWISE_BIT; - } - } - - //----------------------------------------------------------------// - void SetVert ( u32 id, const ZLMetaVec2D < TYPE >& v ) { - - this->mVertices [ id ] = v; - this->mInfo = POLY_UNKNOWN; - } - - //----------------------------------------------------------------// - void SetVert ( u32 id, TYPE x, TYPE y ) { - - ZLMetaVec2D < TYPE >& vert = this->mVertices [ id ]; - - vert.mX = x; - vert.mY = y; - - this->mInfo = POLY_UNKNOWN; - } - - //----------------------------------------------------------------// - void SetVertices ( const ZLMetaVec2D < TYPE >* vertices, size_t total ) { - - this->ReserveVertices ( total ); - memcpy ( this->mVertices.Data (), vertices, sizeof ( ZLMetaVec2D < TYPE > ) * total ); - } - - //----------------------------------------------------------------// - void Snap ( float xSnap, float ySnap ) { - - u32 totalVerts = this->mVertices.Size (); - for ( u32 i = 0; i < totalVerts; i++ ) { - - ZLMetaVec2D < TYPE >& vert = this->mVertices [ i ]; - - vert.mX = xSnap == 0.0f ? vert.mX : floorf (( vert.mX / xSnap ) + 0.5f ) * xSnap; - vert.mY = ySnap == 0.0f ? vert.mY : floorf (( vert.mY / ySnap ) + 0.5f ) * ySnap; - } - } - - //----------------------------------------------------------------// - void Transform ( const ZLMetaAffine2D < TYPE >& matrix ) { - - u32 totalVerts = this->mVertices.Size (); - for ( u32 i = 0; i < totalVerts; i++ ) { - matrix.Transform ( this->mVertices [ i ]); - } - - if ( this->mInfo != POLY_UNKNOWN ) { - - TYPE c0r0 = matrix.m [ ZLMetaAffine2D < TYPE >::C0_R0 ]; - TYPE c1r1 = matrix.m [ ZLMetaAffine2D < TYPE >::C1_R1 ]; - - if ((( c0r0 < 0.0f ) || ( c1r1 > 0.0f )) || (( c0r0 > 0.0f ) || ( c1r1 < 0.0f ))) { - this->mInfo ^= POLY_CLOCKWISE_BIT; - } - } - } - - //----------------------------------------------------------------// - ZLMetaPolygon2D () : - mInfo ( POLY_UNKNOWN ), - mArea ( 0.0f ) { - } - - //----------------------------------------------------------------// - ~ZLMetaPolygon2D () { - } + size_t Bless (); + bool Check ( u32 check ) const; + void Clear (); + //ZLSizeResult ConcaveHull ( ZLStream& input, size_t nPoints, int maxEdges, int maxPasses, float minIndent ); + ZLSizeResult ConvexHull ( ZLStream& input, size_t nPoints, u32 sort = SORT_CSTDLIB ); + void Copy ( const ZLPolygon2D& src ); + bool GetDistance ( const ZLVec2D& point, float& d ) const; + bool GetDistance ( const ZLVec2D& point, float& d, ZLVec2D& p ) const; + cc8* GetInfoString () const; + static cc8* GetInfoString ( u32 info ); + const ZLVec2D& GetVertex ( size_t idx ) const; + void InitAsRect ( const ZLRect& rect ); + u32 PointInside ( const ZLVec2D& p, float pad = 0.0f ) const; + ZLResultCode ReserveVertices ( size_t total ); + void ReverseWinding (); + void SetVert ( size_t idx, const ZLVec2D& v ); + void SetVert ( size_t idx, float x, float y ); + void SetVertices ( const ZLVec2D* vertices, size_t total ); + void Snap ( float xSnap, float ySnap ); + void Transform ( const ZLAffine2D& matrix ); + ZLPolygon2D (); + ~ZLPolygon2D (); }; -typedef ZLMetaPolygon2D < float > ZLPolygon2D; -typedef ZLMetaPolygon2D < double > ZLPolygon2D64; - #endif diff --git a/src/zl-util/ZLQuaternion.h b/src/zl-util/ZLQuaternion.h index c9cac89413..9dc06048c3 100644 --- a/src/zl-util/ZLQuaternion.h +++ b/src/zl-util/ZLQuaternion.h @@ -57,4 +57,5 @@ class ZLQuaternion { ZLVec3D Transform ( ZLVec3D loc ) const; }; -#endif \ No newline at end of file +#endif + diff --git a/src/zl-util/ZLRect.h b/src/zl-util/ZLRect.h index bb37b01e5c..c96461c1e6 100644 --- a/src/zl-util/ZLRect.h +++ b/src/zl-util/ZLRect.h @@ -69,6 +69,15 @@ class ZLMetaRect { } } + //----------------------------------------------------------------// + void Clear () { + + this->mXMin = 0; + this->mYMin = 0; + this->mXMax = 0; + this->mYMax = 0; + } + //----------------------------------------------------------------// void Clip ( ZLMetaRect < TYPE >& rect ) const { @@ -508,13 +517,23 @@ class ZLMetaRect { //----------------------------------------------------------------// template < typename PARAM_TYPE > - void Grow ( const ZLMetaRect < PARAM_TYPE >& rect ) { + void Grow ( const ZLMetaRect < PARAM_TYPE >& rect, bool grow = true ) { - if ( this->mXMin > ( TYPE )rect.mXMin ) this->mXMin = ( TYPE )rect.mXMin; - if ( this->mXMax < ( TYPE )rect.mXMax ) this->mXMax = ( TYPE )rect.mXMax; - - if ( this->mYMin > ( TYPE )rect.mYMin ) this->mYMin = ( TYPE )rect.mYMin; - if ( this->mYMax < ( TYPE )rect.mYMax ) this->mYMax = ( TYPE )rect.mYMax; + if ( grow ) { + + if ( this->mXMin > ( TYPE )rect.mXMin ) this->mXMin = ( TYPE )rect.mXMin; + if ( this->mXMax < ( TYPE )rect.mXMax ) this->mXMax = ( TYPE )rect.mXMax; + + if ( this->mYMin > ( TYPE )rect.mYMin ) this->mYMin = ( TYPE )rect.mYMin; + if ( this->mYMax < ( TYPE )rect.mYMax ) this->mYMax = ( TYPE )rect.mYMax; + } + else { + + this->mXMin = ( TYPE )rect.mXMin; + this->mXMax = ( TYPE )rect.mXMax; + this->mYMin = ( TYPE )rect.mYMin; + this->mYMax = ( TYPE )rect.mYMax; + } } //----------------------------------------------------------------// @@ -532,6 +551,21 @@ class ZLMetaRect { this->mYMax += size; } + //----------------------------------------------------------------// + void Inflate ( const ZLMetaRect < TYPE >& pad ) { + + this->mXMin += pad.mXMin; + this->mYMin += pad.mYMin; + this->mXMax += pad.mXMax; + this->mYMax += pad.mYMax; + } + + //----------------------------------------------------------------// + void Init () { + + this->Clear (); + } + //----------------------------------------------------------------// template < typename PARAM_TYPE > void Init ( const ZLMetaVec2D < PARAM_TYPE >& point ) { @@ -607,6 +641,17 @@ class ZLMetaRect { return ( this->mYMax < this->mYMin ); } + + //----------------------------------------------------------------// + bool IsEqual ( const ZLMetaRect < TYPE >& rect ) { + + return ( + ( this->mXMin == rect.mXMin ) && + ( this->mYMin == rect.mYMin ) && + ( this->mXMax == rect.mXMax ) && + ( this->mYMax == rect.mYMax ) + ); + } //----------------------------------------------------------------// void Offset ( TYPE xOff, TYPE yOff ) { diff --git a/src/zl-util/ZLRefCountedObject.cpp b/src/zl-util/ZLRefCountedObject.cpp new file mode 100644 index 0000000000..06a10b41d9 --- /dev/null +++ b/src/zl-util/ZLRefCountedObject.cpp @@ -0,0 +1,43 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" + +#include + +//================================================================// +// ZLRefCountedObject +//================================================================// + +//----------------------------------------------------------------// +void ZLRefCountedObject::Delete () { + + delete ( this ); +} + +//----------------------------------------------------------------// +void ZLRefCountedObject::Release () { + + if ( this->mRefCount > 0 ) { + this->mRefCount--; + } + + if ( this->mRefCount == 0 ) { + this->Delete (); + } +} + +//----------------------------------------------------------------// +void ZLRefCountedObject::Retain () { + + this->mRefCount++; +} + +//----------------------------------------------------------------// +ZLRefCountedObject::ZLRefCountedObject () : + mRefCount ( 0 ) { +} + +//----------------------------------------------------------------// +ZLRefCountedObject::~ZLRefCountedObject () { +} diff --git a/src/zl-util/ZLRefCountedObject.h b/src/zl-util/ZLRefCountedObject.h new file mode 100644 index 0000000000..e4d1a0695f --- /dev/null +++ b/src/zl-util/ZLRefCountedObject.h @@ -0,0 +1,66 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLREFCOUNTEDOBJECT_H +#define ZLREFCOUNTEDOBJECT_H + +#include + +//================================================================// +// ZLRefCountedObject +//================================================================// +class ZLRefCountedObject { +private: + + u32 mRefCount; + +protected: + + //----------------------------------------------------------------// + virtual void Delete (); + +public: + + GET ( u32, RefCount, mRefCount ) + + //----------------------------------------------------------------// + virtual void Release (); + virtual void Retain (); + ZLRefCountedObject (); + virtual ~ZLRefCountedObject (); +}; + +//================================================================// +// ZLSharedConstBuffer +//================================================================// +class ZLSharedConstBuffer : + public ZLRefCountedObject { +public: + + virtual const void* GetConstData () const = 0; + virtual size_t GetSize () = 0; + + //----------------------------------------------------------------// + static inline const void* GetConstData ( const ZLSharedConstBuffer* buffer ) { + + return buffer ? buffer->GetConstData () : 0; + } +}; + +//================================================================// +// ZLSharedMutableBuffer +//================================================================// +class ZLSharedMutableBuffer : + public ZLSharedConstBuffer { +public: + + virtual void* GetMutableData () = 0; + + //----------------------------------------------------------------// + static inline void* GetMutableData ( ZLSharedMutableBuffer* buffer ) { + + return buffer ? buffer->GetMutableData () : 0; + } +}; + +#endif diff --git a/src/zl-util/ZLResult.h b/src/zl-util/ZLResult.h new file mode 100644 index 0000000000..1100c6ffaa --- /dev/null +++ b/src/zl-util/ZLResult.h @@ -0,0 +1,125 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLRESULT_H +#define ZLRESULT_H + +#include + +#define ZL_RETURN_RESULT(type,value,code) { \ + ZLResult < type > __result; \ + __result.mValue = value; \ + __result.mCode = code; \ + return __result; \ +} + +#define ZL_RETURN_BOOL_RESULT(value,code) ZL_RETURN_RESULT ( bool, value, code ) +#define ZL_RETURN_CHAR_RESULT(value,code) ZL_RETURN_RESULT ( u8, value, code ) +#define ZL_RETURN_DOUBLE_RESULT(value,code) ZL_RETURN_RESULT ( double, value, code ) +#define ZL_RETURN_FLOAT_RESULT(value,code) ZL_RETURN_RESULT ( float, value, code ) +#define ZL_RETURN_INT_RESULT(value,code) ZL_RETURN_RESULT ( int, value, code ) +#define ZL_RETURN_SIZE_RESULT(value,code) ZL_RETURN_RESULT ( size_t, value, code ) +#define ZL_RETURN_STRING_RESULT(value,code) ZL_RETURN_RESULT ( STLString, value, code ) + +#define ZL_HANDLE_ERROR_CODE(code,handler) { \ + ZLResultCode CODE = code; \ + if ( CODE != ZL_OK ) { \ + handler; \ + } \ +} + +#define ZL_HANDLE_ERROR_RESULT(result,handler) ZL_HANDLE_ERROR_CODE ( result.mCode, handler ) + +#define ZL_RETURN_IF_NOT_EQUAL(result,expected,type,value,code) { \ + ZLResultCode CODE = result.mCode; \ + if ( CODE != ZL_OK ) ZL_RETURN_RESULT ( type, value, CODE ) \ + if ( result.mValue != expected ) ZL_RETURN_RESULT ( type, value, code ) \ +} + +#define ZL_RETURN_BOOL_RESULT_IF_NOT_EQUAL(result,expected,value,code) ZL_RETURN_IF_NOT_EQUAL ( result, expected, bool, value, code ) +#define ZL_RETURN_CHAR_RESULT_IF_NOT_EQUAL(result,expected,value,code) ZL_RETURN_IF_NOT_EQUAL ( result, expected, u8, value, code ) +#define ZL_RETURN_DOUBLE_RESULT_IF_NOT_EQUAL(result,expected,value,code) ZL_RETURN_IF_NOT_EQUAL ( result, expected, double, value, code ) +#define ZL_RETURN_FLOAT_RESULT_IF_NOT_EQUAL(result,expected,value,code) ZL_RETURN_IF_NOT_EQUAL ( result, expected, float, value, code ) +#define ZL_RETURN_INT_RESULT_IF_NOT_EQUAL(result,expected,value,code) ZL_RETURN_IF_NOT_EQUAL ( result, expected, int, value, code ) +#define ZL_RETURN_SIZE_RESULT_IF_NOT_EQUAL(result,expected,value,code) ZL_RETURN_IF_NOT_EQUAL ( result, expected, size_t, value, code ) +#define ZL_RETURN_STRING_RESULT_IF_NOT_EQUAL(result,expected,value,code) ZL_RETURN_IF_NOT_EQUAL ( result, expected, STLString, value, code ) + +enum { + ZL_OK, + ZL_ERROR, + ZL_ALLOCATION_ERROR, + ZL_RANGE_ERROR, + ZL_UNSUPPORTED, + ZL_TOTAL_ERRORS, +}; + +typedef int ZLResultCode; + +//================================================================// +// ZLResultBase +//================================================================// +class ZLResultBase { +public: + + ZLResultCode mCode; +}; + +//================================================================// +// ZLResult +//================================================================// +template < typename TYPE > +class ZLResult : + public ZLResultBase { +public: + + TYPE mValue; + + //----------------------------------------------------------------// + inline operator const TYPE& () const { + assert ( this->mCode == ZL_OK ); + return this->mValue; + } +}; + +//================================================================// +// ZLResultCodeAccumulator +//================================================================// +class ZLResultCodeAccumulator { +private: + + ZLResultCode mCode; + +public: + + //----------------------------------------------------------------// + inline operator const int () const { + return this->mCode; + } + + //----------------------------------------------------------------// + inline void operator = ( int code ) { + this->mCode = code != ZL_OK ? code : this->mCode; + } + + //----------------------------------------------------------------// + inline int Reset () { + int code = this->mCode; + this->mCode = ZL_OK; + return code; + } + + //----------------------------------------------------------------// + ZLResultCodeAccumulator () : + mCode ( ZL_OK ) { + } +}; + +typedef ZLResult < bool > ZLBoolResult; +typedef ZLResult < u8 > ZLCharResult; +typedef ZLResult < double > ZLDoubleResult; +typedef ZLResult < float > ZLFloatResult; +typedef ZLResult < int > ZLIntResult; +typedef ZLResult < size_t > ZLSizeResult; +typedef ZLResult < STLString > ZLStringResult; + +#endif diff --git a/src/zl-util/ZLRingAdapter.cpp b/src/zl-util/ZLRingAdapter.cpp new file mode 100644 index 0000000000..90c18646c5 --- /dev/null +++ b/src/zl-util/ZLRingAdapter.cpp @@ -0,0 +1,97 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include + +//================================================================// +// ZLHexAdapter +//================================================================// + +//----------------------------------------------------------------// +size_t ZLRingAdapter::GetCursor () { + + return this->mCursor - this->mBase; +} + +//----------------------------------------------------------------// +bool ZLRingAdapter::IsAtEnd () { + + return this->mLength <= 0; +} + +//----------------------------------------------------------------// +ZLSizeResult ZLRingAdapter::Process ( void* readBuffer, const void* writeBuffer, size_t size ) { + + if ( !( this->mProxiedStream && ( readBuffer || writeBuffer ))) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); + + size_t bytes = 0; + + while ( bytes < size ) { + + size_t available = this->mLength - this->mCursor; + + if ( available == 0 ) { + + if ( this->mProxiedStream->SetCursor ( this->mBase ) != 0 ) break; + + this->mCursor = 0; + available = this->mLength; + } + + size_t chunkSize = size <= available ? size : available; + + size_t result = 0; + + if ( readBuffer ) { + result = this->mProxiedStream->ReadBytes ( readBuffer, chunkSize ); + } + else { + result = this->mProxiedStream->WriteBytes ( writeBuffer, chunkSize ); + } + + this->mCursor += result; + bytes += result; + + if ( result < chunkSize ) break; + } + ZL_RETURN_SIZE_RESULT ( bytes, ZL_OK ); +} + +//----------------------------------------------------------------// +ZLSizeResult ZLRingAdapter::ReadBytes ( void* buffer, size_t size ) { + + return this->Process ( buffer, 0, size ); +} + +//----------------------------------------------------------------// +ZLResultCode ZLRingAdapter::SetCursor ( size_t offset ) { + + if ( !this->mProxiedStream ) return ZL_ERROR; + + offset = offset % this->mLength; + if ( this->mProxiedStream->SetCursor ( this->mBase + offset ) != ZL_OK ) return ZL_ERROR; + this->mCursor = offset; + return ZL_OK; +} + +//----------------------------------------------------------------// +ZLSizeResult ZLRingAdapter::SetLength ( size_t length ) { + + this->mLength = length; + ZL_RETURN_SIZE_RESULT ( this->mLength, ZL_OK ); +} + +//----------------------------------------------------------------// +ZLSizeResult ZLRingAdapter::WriteBytes ( const void* buffer, size_t size ) { + + return this->Process ( 0, buffer, size ); +} + +//----------------------------------------------------------------// +ZLRingAdapter::ZLRingAdapter () { +} + +//----------------------------------------------------------------// +ZLRingAdapter::~ZLRingAdapter () { +} diff --git a/src/zl-util/ZLRingAdapter.h b/src/zl-util/ZLRingAdapter.h new file mode 100644 index 0000000000..d0b6787760 --- /dev/null +++ b/src/zl-util/ZLRingAdapter.h @@ -0,0 +1,32 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLRINGADAPTER_H +#define ZLRINGADAPTER_H + +#include + +//================================================================// +// ZLRingAdapter +//================================================================// +class ZLRingAdapter : + public ZLStreamAdapter { +protected: + + //----------------------------------------------------------------// + ZLSizeResult Process ( void* readBuffer, const void* writeBuffer, size_t size ); + +public: + + //----------------------------------------------------------------// + size_t GetCursor (); + bool IsAtEnd (); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); + int SetCursor ( size_t offset ); + ZLSizeResult SetLength ( size_t length ); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); + ZLRingAdapter (); + ~ZLRingAdapter (); +}; + +#endif diff --git a/src/zl-util/ZLSample.cpp b/src/zl-util/ZLSample.cpp new file mode 100644 index 0000000000..d1017f481b --- /dev/null +++ b/src/zl-util/ZLSample.cpp @@ -0,0 +1,134 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#include "pch.h" +#include +#include + +//================================================================// +// ZLSample +//================================================================// + +//----------------------------------------------------------------// +size_t ZLSample::Convert ( u32 sourceType, const void* source, u32 destType, void* dest ) { + + assert (( sourceType != SAMPLE_UNKNOWN ) && ( destType != SAMPLE_UNKNOWN )); + + size_t sourceSize = ZLSample::GetSize ( sourceType ); + + if ( sourceType == destType ) { + memcpy ( dest, source, sourceSize ); + return sourceSize; + } + + float sample = 0.0f; + + switch ( sourceType ) { + + case SAMPLE_S8: + sample = (( float )*( s8* )source ) / ( float )0x7f; + break; + + case SAMPLE_U8: + sample = ((( float )*( u8* )source ) / ( float )0x7f ) - 1.0f; + break; + + case SAMPLE_S16: + sample = (( float )*( s16* )source ) / ( float )0x7fff; + break; + + case SAMPLE_U16: + sample = ((( float )*( u16* )source ) / ( float )0x7fff ) - 1.0f; + break; + + case SAMPLE_S32: + sample = (( float )*( s32* )source ) / ( float )0x7fffffff; + break; + + case SAMPLE_U32: + sample = ((( float )*( u32* )source ) / ( float )0x7fffffff ) - 1.0f; + break; + + case SAMPLE_FLOAT: + sample = *( float* )source; + break; + } + + switch ( destType ) { + + case SAMPLE_S8: + *( s8* )dest = ( s8 )( sample * ( float )0x7f ); + return 1; + + case SAMPLE_U8: + *( u8* )dest = ( u8 )(( sample + 1.0f ) * ( float )0x7f ); + return 1; + + case SAMPLE_S16: + *( s16* )dest = ( s16 )( sample * ( float )0x7fff ); + return 2; + + case SAMPLE_U16: + *( u16* )dest = ( u16 )(( sample + 1.0f ) * ( float )0x7fff ); + return 2; + + case SAMPLE_S32: + *( s32* )dest = ( s32 )( sample * ( float )0x7fffffff ); + return 4; + + case SAMPLE_U32: + *( u32* )dest = ( u32 )(( sample + 1.0f ) * ( float )0x7fffffff ); + return 4; + + case SAMPLE_FLOAT: + *( float* )dest = sample; + return 4; + } + + return 0; +} + +//----------------------------------------------------------------// +size_t ZLSample::GetSize ( u32 type ) { + + switch ( type ) { + + case SAMPLE_S8: + case SAMPLE_U8: + return 8; + + case SAMPLE_S16: + case SAMPLE_U16: + return 2; + + case SAMPLE_S32: + case SAMPLE_U32: + case SAMPLE_FLOAT: + return 4; + + case SAMPLE_UNKNOWN: + default: + return 0; + } +} + +//----------------------------------------------------------------// +size_t ZLSample::ReadSample ( ZLStream& stream, u32 streamType, void* buffer, u32 bufferType ) { + + size_t result = stream.ReadBytes ( buffer, ZLSample::GetSize ( streamType )); + if ( result ) { + ZLSample::Convert ( streamType, buffer, bufferType, buffer ); + } + return result; +} + +//----------------------------------------------------------------// +size_t ZLSample::WriteSample ( ZLStream& stream, u32 streamType, const void* buffer, u32 bufferType ) { + + if ( streamType == bufferType ) { + return stream.WriteBytes ( buffer, ZLSample::GetSize ( streamType )); + } + u8 temp [ SAMPLE_BUFFER_SIZE ]; + size_t size = ZLSample::Convert ( bufferType, buffer, streamType, temp ); + return stream.WriteBytes ( temp, size ); +} diff --git a/src/zl-util/ZLSample.h b/src/zl-util/ZLSample.h new file mode 100644 index 0000000000..0b9a2c3873 --- /dev/null +++ b/src/zl-util/ZLSample.h @@ -0,0 +1,37 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLSAMPLE_H +#define ZLSAMPLE_H + +#include + +class ZLStream; + +//================================================================// +// ZLSample +//================================================================// +class ZLSample { +public: + + static const u32 SAMPLE_BUFFER_SIZE = 4; + + enum { + SAMPLE_S8, + SAMPLE_U8, + SAMPLE_S16, + SAMPLE_U16, + SAMPLE_S32, + SAMPLE_U32, + SAMPLE_FLOAT, + SAMPLE_UNKNOWN, + }; + + //----------------------------------------------------------------// + static size_t Convert ( u32 sourceType, const void* source, u32 destType, void* dest ); + static size_t GetSize ( u32 type ); + static size_t ReadSample ( ZLStream& stream, u32 streamType, void* buffer, u32 bufferType ); + static size_t WriteSample ( ZLStream& stream, u32 streamType, const void* buffer, u32 bufferType ); +}; + +#endif diff --git a/src/zl-util/ZLSharedHandle.h b/src/zl-util/ZLSharedHandle.h new file mode 100644 index 0000000000..ac751a997c --- /dev/null +++ b/src/zl-util/ZLSharedHandle.h @@ -0,0 +1,106 @@ +// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. +// http://getmoai.com + +#ifndef ZLHANDLE_H +#define ZLHANDLE_H + +#include + +template < typename TYPE > class ZLSharedHandleTarget; + +//================================================================// +// ZLSharedHandle +//================================================================// +template < typename TYPE > +class ZLSharedHandle : + public ZLRefCountedObject { +private: + + friend class ZLSharedHandleTarget < TYPE >; + + TYPE* mTarget; + + //----------------------------------------------------------------// + static TYPE* Deref ( ZLSharedHandle < TYPE >* handle ) { + + return handle ? handle->mTarget : 0; + } + + //----------------------------------------------------------------// + ZLSharedHandle () : + mTarget ( 0 ) { + } + + //----------------------------------------------------------------// + ~ZLSharedHandle () { + } + +public: + + GET ( TYPE*, Target, mTarget ) + +}; + +//================================================================// +// ZLSharedHandleTarget +//================================================================// +template < typename TYPE > +class ZLSharedHandleTarget { +private: + + ZLSharedHandle < TYPE >* mHandle; + +protected: + + //----------------------------------------------------------------// + void Affirm () { + + if ( !this->mHandle ) { + this->mHandle = new ZLSharedHandle < TYPE > (); + this->mHandle->Retain (); + this->mHandle->mTarget = this->GetHandleTarget (); + assert ( this->mHandle ); + } + } + + //----------------------------------------------------------------// + virtual TYPE* GetHandleTarget () = 0; + +public: + + //----------------------------------------------------------------// + void Abandon () { + + if ( this->mHandle ) { + this->mHandle->mTarget = 0; + this->mHandle->Release (); + this->mHandle = 0; + } + + this->Affirm (); + } + + //----------------------------------------------------------------// + ZLSharedHandle < TYPE >* GetRetainedHandle () { + + this->Affirm (); + this->mHandle->Retain (); + return this->mHandle; + } + + //----------------------------------------------------------------// + ZLSharedHandleTarget () : + mHandle ( 0 ) { + } + + //----------------------------------------------------------------// + virtual ~ZLSharedHandleTarget () { + + if ( this->mHandle ) { + this->mHandle->mTarget = 0; + this->mHandle->Release (); + } + } +}; + +#endif diff --git a/src/zl-util/ZLStream.cpp b/src/zl-util/ZLStream.cpp index 6cba11c64e..5e771f2bef 100644 --- a/src/zl-util/ZLStream.cpp +++ b/src/zl-util/ZLStream.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -16,13 +17,13 @@ bool ZLStream::CheckCaps ( u32 flags ) { } //----------------------------------------------------------------// -size_t ZLStream::Collapse ( size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ) { +ZLSizeResult ZLStream::Collapse ( size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ) { return this->Collapse ( *this, clipBase, clipSize, chunkSize, size, invert ); } //----------------------------------------------------------------// -size_t ZLStream::Collapse ( ZLStream& source, size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ) { +ZLSizeResult ZLStream::Collapse ( ZLStream& source, size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ) { if (( clipBase + clipSize ) > chunkSize ) { clipSize = ( clipBase < chunkSize ) ? ( clipBase + clipSize ) - chunkSize : 0; @@ -55,8 +56,8 @@ size_t ZLStream::Collapse ( ZLStream& source, size_t clipBase, size_t clipSize, do { - source.Seek ( srcCursor, SEEK_SET ); - readSize = source.ReadBytes ( buffer, (( totalRead + chunkSize ) > size ) ? size - totalRead : chunkSize ); + source.Seek (( long )srcCursor, SEEK_SET ); + readSize = source.ReadBytes ( buffer, (( totalRead + chunkSize ) > size ) ? size - totalRead : chunkSize ).mValue; srcCursor += readSize; totalRead += readSize; @@ -89,8 +90,8 @@ size_t ZLStream::Collapse ( ZLStream& source, size_t clipBase, size_t clipSize, if ( writeSize == 0 ) break; - this->Seek ( dstCursor, SEEK_SET ); - if ( this->WriteBytes ( buffer, writeSize ) < writeSize ) break; + this->Seek (( long )dstCursor, SEEK_SET ); + if ( this->WriteBytes ( buffer, writeSize ).mValue < writeSize ) break; dstCursor += writeSize; } while ( readSize == chunkSize ); // if we've read less than the buffer size (for any reason), then we're done @@ -99,7 +100,7 @@ size_t ZLStream::Collapse ( ZLStream& source, size_t clipBase, size_t clipSize, free ( memBuffer ); } - return this->GetCursor () - dstStart; + ZL_RETURN_SIZE_RESULT ( this->GetCursor () - dstStart, ZL_OK ); } //----------------------------------------------------------------// @@ -122,33 +123,37 @@ bool ZLStream::IsAtEnd () { } //----------------------------------------------------------------// -size_t ZLStream::PeekBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLStream::PeekBytes ( void* buffer, size_t size ) { - if ( !( this->GetCaps () & ( CAN_READ | CAN_SEEK ))) return 0; + if ( !( this->GetCaps () & ( CAN_READ | CAN_SEEK ))) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); + + ZLSizeResult result; size_t cursor = this->GetCursor (); - size = this->ReadBytes ( buffer, size ); - this->Seek ( cursor, SEEK_SET ); - return size; + result = this->ReadBytes ( buffer, size ); + this->Seek (( long )cursor, SEEK_SET ); + return result; } //----------------------------------------------------------------// -size_t ZLStream::Print ( cc8* format, ... ) { +ZLSizeResult ZLStream::Print ( cc8* format, ... ) { + + ZLSizeResult result; va_list args; va_start ( args, format ); - size_t size = this->Print ( format, args ); + result = this->Print ( format, args ); va_end ( args ); - return size; + return result; } //----------------------------------------------------------------// -size_t ZLStream::Print ( cc8* format, va_list args ) { +ZLSizeResult ZLStream::Print ( cc8* format, va_list args ) { - if ( !( this->GetCaps () & CAN_WRITE )) return 0; + if ( !( this->GetCaps () & CAN_WRITE )) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); static const size_t BUFFER_SIZE = 1024; char stackBuffer [ BUFFER_SIZE ]; @@ -189,31 +194,32 @@ size_t ZLStream::Print ( cc8* format, va_list args ) { size_t size = 0; if ( result > 0 ) { - size = this->WriteBytes ( buffer, ( size_t )result ); + size = this->WriteBytes ( buffer, ( size_t )result ).mValue; } if ( buffer != stackBuffer ) { free ( buffer ); } - return size; + ZL_RETURN_SIZE_RESULT ( size, ZL_OK ); } //----------------------------------------------------------------// -template <> bool ZLStream::Read < bool >( bool value ) { - u8 result = this->Read < u8 >( value ? 1 : 0 ); - return ( result > 0 ); +template <> ZLResult < bool > ZLStream::Read < bool >( bool value ) { + ZLResult < u8 > result = this->Read < u8 >( value ? 1 : 0 ); + ZL_RETURN_BOOL_RESULT ( result.mValue > 0, result.mCode ); } //----------------------------------------------------------------// -size_t ZLStream::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLStream::ReadBytes ( void* buffer, size_t size ) { UNUSED ( buffer ); UNUSED ( size ); - return 0; + + ZL_RETURN_SIZE_RESULT ( 0, ZL_UNSUPPORTED ); } //----------------------------------------------------------------// -STLString ZLStream::ReadString ( size_t size ) { +ZLStringResult ZLStream::ReadString ( size_t size ) { STLString str; @@ -235,14 +241,14 @@ STLString ZLStream::ReadString ( size_t size ) { free ( buffer ); } } - return str; + ZL_RETURN_STRING_RESULT ( str, ZL_OK ); } //----------------------------------------------------------------// -STLString ZLStream::ReadToken ( cc8* delimiters ) { +ZLStringResult ZLStream::ReadToken ( cc8* delimiters ) { STLString str; - if ( this->IsAtEnd ()) return str; + if ( this->IsAtEnd ()) ZL_RETURN_STRING_RESULT ( str, ZL_OK ); char stackBuffer [ LOCAL_BUFFER ]; @@ -255,7 +261,7 @@ STLString ZLStream::ReadToken ( cc8* delimiters ) { do { - c = this->Read < char >( 0 ); + c = this->Read < char >( 0 ).mValue; if ( delimiters && c ) { @@ -302,7 +308,25 @@ STLString ZLStream::ReadToken ( cc8* delimiters ) { size -= readSize; } } - return str; + ZL_RETURN_STRING_RESULT ( str, ZL_OK ); +} + +//----------------------------------------------------------------// +float ZLStream::Sample ( u32 streamType, size_t sampleSize ) { + + float accum = 0.0f; + + for ( size_t i = 0; i < sampleSize; ++i ) { + + float sample; + + size_t result = ZLSample::ReadSample ( *this, streamType, &sample, ZLSample::SAMPLE_FLOAT ); + UNUSED ( result ); // TODO: why isn't assert undef taking care of this? + assert ( result ); + + accum += sample / ( float )sampleSize; + } + return accum; } //----------------------------------------------------------------// @@ -330,43 +354,42 @@ int ZLStream::Seek ( long offset, int origin ) { } } - if ( absCursor > cursor ) { - if (( length == UNKNOWN_SIZE ) || ( absCursor > length )) return -1; - } +// if ( absCursor > cursor ) { +// if (( length == UNKNOWN_SIZE ) || ( absCursor > length )) return -1; +// } return ( absCursor != cursor ) ? this->SetCursor ( absCursor ) : 0; } //----------------------------------------------------------------// -int ZLStream::SetCursor ( long offset ) { +ZLResultCode ZLStream::SetCursor ( size_t offset ) { UNUSED ( offset ); - return -1; + return ZL_UNSUPPORTED; } //----------------------------------------------------------------// -size_t ZLStream::SetLength ( size_t length ) { +ZLSizeResult ZLStream::SetLength ( size_t length ) { UNUSED ( length ); - return 0; + ZL_RETURN_SIZE_RESULT ( 0, ZL_UNSUPPORTED ); } //----------------------------------------------------------------// -template <> void ZLStream::Write < bool >( bool value ) { +template <> ZLSizeResult ZLStream::Write < bool >( bool value ) { u8 boolByte = ( value ) ? 1 : 0; - this->Write < u8 >( boolByte ); + return this->Write < u8 >( boolByte ); } //----------------------------------------------------------------// -size_t ZLStream::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLStream::WriteBytes ( const void* buffer, size_t size ) { UNUSED ( buffer ); UNUSED ( size ); - return 0; + ZL_RETURN_SIZE_RESULT ( 0, ZL_UNSUPPORTED ); } //----------------------------------------------------------------// -size_t ZLStream::WriteStream ( ZLStream& source ) { +ZLSizeResult ZLStream::WriteStream ( ZLStream& source ) { - if ( !( source.GetCaps () & CAN_READ )) return 0; - if ( !( this->GetCaps () & CAN_WRITE )) return 0; + if ( !(( source.GetCaps () & CAN_READ ) && ( this->GetCaps () & CAN_WRITE ))) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); u8 buffer [ LOCAL_BUFFER ]; @@ -376,28 +399,27 @@ size_t ZLStream::WriteStream ( ZLStream& source ) { do { - readSize = source.ReadBytes ( buffer, LOCAL_BUFFER ); + readSize = source.ReadBytes ( buffer, LOCAL_BUFFER ).mValue; if ( readSize ) { - writeSize = this->WriteBytes ( buffer, readSize ); + writeSize = this->WriteBytes ( buffer, readSize ).mValue; total += writeSize; if ( writeSize != readSize ) break; } } while ( readSize == LOCAL_BUFFER ); - return total; + ZL_RETURN_SIZE_RESULT ( total, ZL_OK ); } //----------------------------------------------------------------// -size_t ZLStream::WriteStream ( ZLStream& source, size_t size ) { +ZLSizeResult ZLStream::WriteStream ( ZLStream& source, size_t size ) { - if ( !( source.GetCaps () & CAN_READ )) return 0; - if ( !( this->GetCaps () & CAN_WRITE )) return 0; + if ( !(( source.GetCaps () & CAN_READ ) && ( this->GetCaps () & CAN_WRITE ))) ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); if ( this == &source ) { size_t cursor = this->GetCursor (); - this->Seek ( cursor + size, SEEK_SET ); - return this->GetCursor () - cursor; + this->Seek (( long )( cursor + size ), SEEK_SET ); + ZL_RETURN_SIZE_RESULT ( this->GetCursor () - cursor, ZL_OK ); } u8 buffer [ LOCAL_BUFFER ]; @@ -407,15 +429,15 @@ size_t ZLStream::WriteStream ( ZLStream& source, size_t size ) { do { - readSize = source.ReadBytes ( buffer, (( total + LOCAL_BUFFER ) > size ) ? size - total : LOCAL_BUFFER ); + readSize = source.ReadBytes ( buffer, (( total + LOCAL_BUFFER ) > size ) ? size - total : LOCAL_BUFFER ).mValue; if ( readSize ) { - total += this->WriteBytes ( buffer, readSize ); + total += this->WriteBytes ( buffer, readSize ).mValue; } } while ( readSize == LOCAL_BUFFER ); - return total; + ZL_RETURN_SIZE_RESULT ( total, ZL_OK ) } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLStream.h b/src/zl-util/ZLStream.h index cfb525f35a..99bb98c715 100644 --- a/src/zl-util/ZLStream.h +++ b/src/zl-util/ZLStream.h @@ -5,6 +5,7 @@ #define ZLSTREAM_H #include +#include //================================================================// // ZLStream @@ -24,50 +25,62 @@ class ZLStream { }; //----------------------------------------------------------------// - bool CheckCaps ( u32 flags ); - size_t Collapse ( size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ); - size_t Collapse ( ZLStream& source, size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ); - virtual void Compact (); - virtual void Flush (); - virtual u32 GetCaps () = 0; - virtual size_t GetCursor () = 0; - virtual size_t GetLength (); - virtual bool IsAtEnd (); - size_t PeekBytes ( void* buffer, size_t size ); - size_t Print ( cc8* format, ... ); - size_t Print ( cc8* format, va_list args ); - virtual size_t ReadBytes ( void* buffer, size_t size ); - STLString ReadString ( size_t size ); - STLString ReadToken ( cc8* delimiters = 0 ); - int Seek ( long offset, int origin = SEEK_SET ); - virtual int SetCursor ( long offset ); - virtual size_t SetLength ( size_t length ); - virtual size_t WriteBytes ( const void* buffer, size_t size ); - size_t WriteStream ( ZLStream& source ); - size_t WriteStream ( ZLStream& source, size_t size ); - ZLStream (); - virtual ~ZLStream (); + bool CheckCaps ( u32 flags ); + ZLSizeResult Collapse ( size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ); + ZLSizeResult Collapse ( ZLStream& source, size_t clipBase, size_t clipSize, size_t chunkSize, size_t size, bool invert ); + virtual void Compact (); + virtual void Flush (); + virtual u32 GetCaps () = 0; + virtual size_t GetCursor () = 0; + virtual size_t GetLength (); + virtual bool IsAtEnd (); + ZLSizeResult PeekBytes ( void* buffer, size_t size ); + ZLSizeResult Print ( cc8* format, ... ); + ZLSizeResult Print ( cc8* format, va_list args ); + virtual ZLSizeResult ReadBytes ( void* buffer, size_t size ); + ZLStringResult ReadString ( size_t size ); + ZLStringResult ReadToken ( cc8* delimiters = 0 ); + float Sample ( u32 streamType, size_t sampleSize ); + int Seek ( long offset, int origin = SEEK_SET ); + virtual ZLResultCode SetCursor ( size_t offset ); + virtual ZLSizeResult SetLength ( size_t length ); + virtual ZLSizeResult WriteBytes ( const void* buffer, size_t size ); + ZLSizeResult WriteStream ( ZLStream& source ); + ZLSizeResult WriteStream ( ZLStream& source, size_t size ); + ZLStream (); + virtual ~ZLStream (); //----------------------------------------------------------------// template < typename TYPE > - TYPE Read ( TYPE value ) { + ZLResult < TYPE > Read ( TYPE fallback ) { TYPE temp; - size_t result = this->ReadBytes ( &temp, sizeof ( TYPE )); - if ( result == sizeof ( TYPE )) { + if ( this->ReadBytes ( &temp, sizeof ( TYPE )).mValue == sizeof ( TYPE )) { + ZL_RETURN_RESULT ( TYPE, temp, ZL_OK ); + } + ZL_RETURN_RESULT ( TYPE, fallback, ZL_ERROR ); + } + + //----------------------------------------------------------------// + template < typename TYPE > + ZLResultCode Read ( TYPE& value, const TYPE& fallback ) { + TYPE temp; + if ( this->ReadBytes ( &temp, sizeof ( TYPE )).mValue == sizeof ( TYPE )) { value = temp; + return ZL_OK; } - return value; + value = fallback; + return ZL_ERROR; } //----------------------------------------------------------------// template < typename TYPE > - void Write ( TYPE value ) { - this->WriteBytes ( &value, sizeof ( TYPE )); + ZLSizeResult Write ( TYPE value ) { + return this->WriteBytes ( &value, sizeof ( TYPE )); } }; //----------------------------------------------------------------// -template <> bool ZLStream::Read < bool > ( bool value ); -template <> void ZLStream::Write < bool > ( bool value ); +template <> ZLResult < bool > ZLStream::Read < bool > ( bool value ); +template <> ZLSizeResult ZLStream::Write < bool > ( bool value ); #endif diff --git a/src/zl-util/ZLStreamAdapter.cpp b/src/zl-util/ZLStreamAdapter.cpp index 91ec8abc16..c6d0f0feb1 100644 --- a/src/zl-util/ZLStreamAdapter.cpp +++ b/src/zl-util/ZLStreamAdapter.cpp @@ -25,7 +25,7 @@ void ZLStreamProxy::Flush () { //----------------------------------------------------------------// u32 ZLStreamProxy::GetCaps () { - return this->mProxiedStream ? this->mProxiedStream->GetCaps () : 0; + return this->mProxiedStream ? this->mProxiedStream->GetCaps () : CAN_WRITE; } //----------------------------------------------------------------// @@ -43,31 +43,34 @@ size_t ZLStreamProxy::GetLength () { //----------------------------------------------------------------// bool ZLStreamProxy::IsAtEnd () { - return this->mProxiedStream ? this->mProxiedStream->GetLength () : true; + return this->mProxiedStream ? this->mProxiedStream->GetLength () > 0 : true; // TODO: does this make sense? } //----------------------------------------------------------------// -size_t ZLStreamProxy::ReadBytes ( void* buffer, size_t size ) { +ZLSizeResult ZLStreamProxy::ReadBytes ( void* buffer, size_t size ) { - return this->mProxiedStream ? this->mProxiedStream->ReadBytes ( buffer, size ) : 0; + if ( this->mProxiedStream ) return this->mProxiedStream->ReadBytes ( buffer, size ); + ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); } //----------------------------------------------------------------// -int ZLStreamProxy::SetCursor ( long offset ) { +ZLResultCode ZLStreamProxy::SetCursor ( size_t offset ) { - return this->mProxiedStream ? this->mProxiedStream->SetCursor ( offset ) : -1; + return this->mProxiedStream ? this->mProxiedStream->SetCursor ( offset ) : ZL_ERROR; } //----------------------------------------------------------------// -size_t ZLStreamProxy::SetLength ( size_t length ) { +ZLSizeResult ZLStreamProxy::SetLength ( size_t length ) { - return this->mProxiedStream ? this->mProxiedStream->SetLength ( length ) : 0; + if ( this->mProxiedStream ) return this->mProxiedStream->SetLength ( length ); + ZL_RETURN_SIZE_RESULT ( 0, ZL_ERROR ); } //----------------------------------------------------------------// -size_t ZLStreamProxy::WriteBytes ( const void* buffer, size_t size ) { +ZLSizeResult ZLStreamProxy::WriteBytes ( const void* buffer, size_t size ) { - return this->mProxiedStream ? this->mProxiedStream->WriteBytes ( buffer, size ) : 0; + if ( this->mProxiedStream ) return this->mProxiedStream->WriteBytes ( buffer, size ); + ZL_RETURN_SIZE_RESULT ( size, ZL_OK ); // this is deliberate; an open proxy to an empty stream should just throw writes away } //----------------------------------------------------------------// @@ -120,13 +123,13 @@ void ZLStreamAdapter::OnClose () { } //----------------------------------------------------------------// -bool ZLStreamAdapter::OnOpen () { +ZLResultCode ZLStreamAdapter::OnOpen () { - return true; + return ZL_OK; } //----------------------------------------------------------------// -bool ZLStreamAdapter::Open ( ZLStream* stream ) { +ZLResultCode ZLStreamAdapter::Open ( ZLStream* stream ) { this->Close (); @@ -136,11 +139,11 @@ bool ZLStreamAdapter::Open ( ZLStream* stream ) { this->mBase = stream->GetCursor (); } - this->mIsOpen = this->OnOpen (); + this->mIsOpen = ( this->OnOpen () == ZL_OK ); if ( !this->mIsOpen ) { this->Close (); } - return this->mIsOpen; + return this->mIsOpen ? ZL_OK : ZL_ERROR; } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLStreamAdapter.h b/src/zl-util/ZLStreamAdapter.h index 6584663c65..fb10ea646b 100644 --- a/src/zl-util/ZLStreamAdapter.h +++ b/src/zl-util/ZLStreamAdapter.h @@ -27,10 +27,10 @@ class ZLStreamProxy : size_t GetCursor (); size_t GetLength (); bool IsAtEnd (); - size_t ReadBytes ( void* buffer, size_t size ); - int SetCursor ( long offset ); - size_t SetLength ( size_t length ); - size_t WriteBytes ( const void* buffer, size_t size ); + ZLSizeResult ReadBytes ( void* buffer, size_t size ); + ZLResultCode SetCursor ( size_t offset ); + ZLSizeResult SetLength ( size_t length ); + ZLSizeResult WriteBytes ( const void* buffer, size_t size ); ZLStreamProxy (); ~ZLStreamProxy (); }; @@ -50,19 +50,19 @@ class ZLStreamAdapter : bool mIsOpen; //----------------------------------------------------------------// - virtual void OnClose (); - virtual bool OnOpen (); + virtual void OnClose (); + virtual ZLResultCode OnOpen (); public: //----------------------------------------------------------------// - void Close (); - size_t GetCursor (); - size_t GetLength (); - bool IsAtEnd (); - bool Open ( ZLStream* stream ); - ZLStreamAdapter (); - ~ZLStreamAdapter (); + void Close (); + size_t GetCursor (); + size_t GetLength (); + bool IsAtEnd (); + ZLResultCode Open ( ZLStream* stream ); + ZLStreamAdapter (); + ~ZLStreamAdapter (); }; #endif diff --git a/src/zl-util/ZLSyntaxNode.cpp b/src/zl-util/ZLSyntaxNode.cpp index a095446988..399a6c94dc 100644 --- a/src/zl-util/ZLSyntaxNode.cpp +++ b/src/zl-util/ZLSyntaxNode.cpp @@ -9,13 +9,13 @@ //================================================================// //----------------------------------------------------------------// -u32 ZLSyntaxNode::CountChildren () { +size_t ZLSyntaxNode::CountChildren () { return this->mChildren.Size (); } //----------------------------------------------------------------// -ZLSyntaxNode* ZLSyntaxNode::GetChild ( u32 i ) { +ZLSyntaxNode* ZLSyntaxNode::GetChild ( size_t i ) { if ( i < this->mChildren.Size ()) { return this->mChildren [ i ]; @@ -54,7 +54,7 @@ void ZLSyntaxNode::Print ( u32 indent, u32 offset ) { if ( this->mChildren.Size ()) { printf ( "%s <%d>\n", this->mName.c_str (), this->mID ); - for ( u32 i = 0; i < this->mChildren.Size (); ++i ) + for ( size_t i = 0; i < this->mChildren.Size (); ++i ) this->mChildren [ i ]->Print ( indent + offset, offset ); } else { @@ -69,7 +69,7 @@ ZLSyntaxNode::ZLSyntaxNode () { //----------------------------------------------------------------// ZLSyntaxNode::~ZLSyntaxNode () { - for ( u32 i = 0; i < this->mChildren.Size (); ++i ) { + for ( size_t i = 0; i < this->mChildren.Size (); ++i ) { delete this->mChildren [ i ]; } } diff --git a/src/zl-util/ZLSyntaxNode.h b/src/zl-util/ZLSyntaxNode.h index 3f00e28e25..147a129928 100644 --- a/src/zl-util/ZLSyntaxNode.h +++ b/src/zl-util/ZLSyntaxNode.h @@ -32,8 +32,8 @@ class ZLSyntaxNode { GET ( STLString, Terminal, mTerminal ) //----------------------------------------------------------------// - u32 CountChildren (); - ZLSyntaxNode* GetChild ( u32 i ); + size_t CountChildren (); + ZLSyntaxNode* GetChild ( size_t i ); double GetNumber (); STLString GetText (); bool IsNonterminal (); diff --git a/src/zl-util/ZLSyntaxScanner.cpp b/src/zl-util/ZLSyntaxScanner.cpp index bf874d2763..c0fe07c373 100644 --- a/src/zl-util/ZLSyntaxScanner.cpp +++ b/src/zl-util/ZLSyntaxScanner.cpp @@ -16,8 +16,8 @@ void ZLSyntaxScanner::ScanSyntax ( ZLSyntaxNode* node ) { if ( node->IsNonterminal ()) { - u32 nChildren = node->CountChildren (); - for ( u32 i = 0; i < nChildren; ++i ) { + size_t nChildren = node->CountChildren (); + for ( size_t i = 0; i < nChildren; ++i ) { this->ScanSyntax ( node->GetChild ( i )); } this->OnRule ( node->GetID (), *node ); diff --git a/src/zl-util/ZLTypeID.h b/src/zl-util/ZLTypeID.h index c4525dddbd..6c8d6963f7 100644 --- a/src/zl-util/ZLTypeID.h +++ b/src/zl-util/ZLTypeID.h @@ -25,6 +25,23 @@ class ZLTypeID : public ZLTypeIDBase { public: + //----------------------------------------------------------------// + static const TYPE& Dummy () { + + static TYPE dummy = TYPE (); + return dummy; + } + + //----------------------------------------------------------------// + static TYPE& DummyRef () { + + // intent is to create an object that will crash if accessed. + // on system withouth memory protection (are there sill any?) this + // should be redefined to just return a statically declared sentinel. + + return *( TYPE* )0; + } + //----------------------------------------------------------------// static u32 GetID ( void ) { diff --git a/src/zl-util/ZLUnique_linux.cpp b/src/zl-util/ZLUnique_linux.cpp index 3911434cc3..a668b657ec 100644 --- a/src/zl-util/ZLUnique_linux.cpp +++ b/src/zl-util/ZLUnique_linux.cpp @@ -2,6 +2,9 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifndef _WIN32 #include diff --git a/src/zl-util/ZLUnique_win32.cpp b/src/zl-util/ZLUnique_win32.cpp index a2b70e5597..6962d841e7 100644 --- a/src/zl-util/ZLUnique_win32.cpp +++ b/src/zl-util/ZLUnique_win32.cpp @@ -2,10 +2,14 @@ // http://getmoai.com #include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #ifdef _WIN32 #include +#pragma warning ( disable:4267 ) #pragma warning ( disable:4512 ) #pragma warning ( disable:4355 ) diff --git a/src/zl-util/ZLVec2D.h b/src/zl-util/ZLVec2D.h index 4d6d45a61f..82123d1c5f 100644 --- a/src/zl-util/ZLVec2D.h +++ b/src/zl-util/ZLVec2D.h @@ -93,7 +93,7 @@ class ZLMetaVec2D { } //----------------------------------------------------------------// - // V = V x vec + // V x vec TYPE Cross ( const ZLMetaVec2D < TYPE >& vec ) const { return ( mX * vec.mY ) - ( mY * vec.mX ); @@ -105,6 +105,20 @@ class ZLMetaVec2D { return ( v0.mX * v1.mY ) - ( v0.mY * v1.mX ); } + //----------------------------------------------------------------// + // ( v0 - V ) x ( v1 - V ) + TYPE CrossJoint ( const ZLMetaVec2D < TYPE >& v0, const ZLMetaVec2D < TYPE >& v1 ) { + + return (( v0.mX - mX ) * ( v1.mY - mY )) - (( v0.mY - mY ) * ( v1.mX - mX )); + } + + //----------------------------------------------------------------// + // ( v1 - V0 ) x ( v2 - V0 ) + static TYPE CrossJoint ( const ZLMetaVec2D < TYPE >& v0, const ZLMetaVec2D < TYPE >& v1, const ZLMetaVec2D < TYPE >& v2 ) { + + return (( v1.mX - v0.mX ) * ( v2.mY - v0.mY )) - (( v1.mY - v0.mY ) * ( v2.mX - v0.mX )); + } + //----------------------------------------------------------------// bool Compare ( const ZLMetaVec2D < TYPE >& point ) { @@ -222,12 +236,12 @@ class ZLMetaVec2D { //----------------------------------------------------------------// // |V| float Length () { - return sqrtf (( mX * mX ) + ( mY * mY )); + return sqrtf (( float )(( mX * mX ) + ( mY * mY ))); } //----------------------------------------------------------------// float LengthSquared () const { - return ( mX * mX ) + ( mY * mY ); + return ( float )(( mX * mX ) + ( mY * mY )); } //----------------------------------------------------------------// diff --git a/src/zl-util/ZLXmlReader.cpp b/src/zl-util/ZLXmlReader.cpp index a87a2c013a..41f9c62988 100644 --- a/src/zl-util/ZLXmlReader.cpp +++ b/src/zl-util/ZLXmlReader.cpp @@ -8,6 +8,9 @@ SUPPRESS_EMPTY_FILE_WARNING #if MOAI_WITH_EXPAT +#define XML_STATIC +#include + //================================================================// // ZLXmlElement //================================================================// @@ -66,7 +69,7 @@ void ZLXmlReader::_onText ( void *userData, const char* text, int len ) { void ZLXmlReader::Clear () { if ( this->mParser ) { - XML_ParserFree ( this->mParser ); + XML_ParserFree (( XML_Parser )this->mParser ); this->mParser = 0; } this->mStream = 0; @@ -93,7 +96,7 @@ ZLXmlElement* ZLXmlReader::GetElement () { //----------------------------------------------------------------// int ZLXmlReader::GetLineNumber () { - return XML_GetCurrentLineNumber ( this->mParser ); + return XML_GetCurrentLineNumber (( XML_Parser )this->mParser ); } //----------------------------------------------------------------// @@ -151,7 +154,7 @@ ZLXmlElement* ZLXmlReader::Parse () { switch ( status ) { case XML_STATUS_OK: { - this->mInputLen = this->mStream->ReadBytes ( this->mBuffer, BUFFER_SIZE ); + this->mInputLen = ( int )this->mStream->ReadBytes ( this->mBuffer, BUFFER_SIZE ); if ( !this->mInputLen ) { this->mEvent = DONE; this->SetElement ( 0 ); @@ -169,8 +172,8 @@ ZLXmlElement* ZLXmlReader::Parse () { case XML_STATUS_ERROR: { fprintf ( stderr, "%s at line %d\n", - XML_ErrorString ( XML_GetErrorCode ( this->mParser )), - ( int )XML_GetCurrentLineNumber ( this->mParser ) + XML_ErrorString ( XML_GetErrorCode (( XML_Parser )this->mParser )), + ( int )XML_GetCurrentLineNumber (( XML_Parser )this->mParser ) ); this->mEvent = XML_ERROR; this->SetElement ( 0 ); @@ -215,25 +218,25 @@ ZLXmlElement* ZLXmlReader::PushElement ( cc8* name ) { } //----------------------------------------------------------------// -XML_Status ZLXmlReader::Resume () { +int ZLXmlReader::Resume () { this->mSuspended = false; this->mEvent = NONE; XML_ParsingStatus parsingStatus; - XML_GetParsingStatus ( this->mParser, &parsingStatus ); + XML_GetParsingStatus (( XML_Parser )this->mParser, &parsingStatus ); XML_Status status; if ( parsingStatus.parsing == XML_SUSPENDED ) { - status = XML_ResumeParser ( this->mParser ); + status = XML_ResumeParser (( XML_Parser )this->mParser ); } else { bool final = this->mInputLen < BUFFER_SIZE; - status = XML_Parse ( this->mParser, this->mBuffer, this->mInputLen, final ); + status = XML_Parse (( XML_Parser )this->mParser, this->mBuffer, this->mInputLen, final ); } - return status; + return ( int )status; } //----------------------------------------------------------------// @@ -252,19 +255,19 @@ void ZLXmlReader::SetStream ( ZLStream& stream ) { this->mStream = &stream; - this->mParser = XML_ParserCreate ( NULL ); - XML_SetUserData ( this->mParser, this ); - XML_SetElementHandler ( this->mParser, _onElementBegin, _onElementEnd ); - XML_SetCharacterDataHandler ( this->mParser, _onText ); + this->mParser = ( ZLXmlParser )XML_ParserCreate ( NULL ); + XML_SetUserData (( XML_Parser )this->mParser, this ); + XML_SetElementHandler (( XML_Parser )this->mParser, _onElementBegin, _onElementEnd ); + XML_SetCharacterDataHandler (( XML_Parser )this->mParser, _onText ); - this->mInputLen = this->mStream->ReadBytes ( this->mBuffer, BUFFER_SIZE ); + this->mInputLen = ( int )this->mStream->ReadBytes ( this->mBuffer, BUFFER_SIZE ); } //----------------------------------------------------------------// void ZLXmlReader::Suspend ( u32 event ) { this->mEvent = event; - XML_StopParser ( this->mParser, XML_TRUE ); + XML_StopParser (( XML_Parser )this->mParser, XML_TRUE ); this->mSuspended = true; } diff --git a/src/zl-util/ZLXmlReader.h b/src/zl-util/ZLXmlReader.h index a633a80370..6569ededa8 100644 --- a/src/zl-util/ZLXmlReader.h +++ b/src/zl-util/ZLXmlReader.h @@ -6,7 +6,6 @@ #if MOAI_WITH_EXPAT -#include #include #include #include @@ -14,6 +13,8 @@ class ZLStream; +typedef int* ZLXmlParser; + //================================================================// // ZLXmlElement //================================================================// @@ -61,11 +62,11 @@ class ZLXmlReader { enum { BUFFER_SIZE = 512, }; - - XML_Parser mParser; + + ZLXmlParser mParser; ZLStream* mStream; - u32 mInputLen; + int mInputLen; char mBuffer [ BUFFER_SIZE ]; STLList < ZLXmlElement* > mElementStack; @@ -86,7 +87,7 @@ class ZLXmlReader { void OnText ( const char* text, int len ); ZLXmlElement* PopElement (); ZLXmlElement* PushElement ( cc8* name ); - XML_Status Resume (); + int Resume (); void SetElement ( ZLXmlElement* element ); void Suspend ( u32 event ); @@ -115,4 +116,5 @@ class ZLXmlReader { }; #endif -#endif \ No newline at end of file +#endif + diff --git a/src/zl-util/ZLZip.cpp b/src/zl-util/ZLZip.cpp index f6f5bc7f96..f6a600b830 100644 --- a/src/zl-util/ZLZip.cpp +++ b/src/zl-util/ZLZip.cpp @@ -58,7 +58,7 @@ int ZLZip::Deflate ( ZLStream& source, ZLStream& dest, int level ) { // compress until end of file do { - strm.avail_in = source.ReadBytes ( in, CHUNKSIZE ); + strm.avail_in = ( uInt )source.ReadBytes ( in, CHUNKSIZE ); strm.next_in = ( Bytef* )in; flush = source.IsAtEnd () ? Z_FINISH : Z_NO_FLUSH; @@ -152,7 +152,7 @@ int ZLZip::Inflate ( ZLStream& source, ZLStream& dest ) { /* decompress until deflate stream ends or end of file */ do { - strm.avail_in = source.ReadBytes ( in, CHUNKSIZE ); + strm.avail_in = ( uInt )source.ReadBytes ( in, CHUNKSIZE ); strm.next_in = ( Bytef* )in; if ( strm.avail_in == 0 ) break; diff --git a/src/zl-util/ZLZipFile.cpp b/src/zl-util/ZLZipFile.cpp index 183b5f4bc5..43c8d58588 100644 --- a/src/zl-util/ZLZipFile.cpp +++ b/src/zl-util/ZLZipFile.cpp @@ -45,7 +45,7 @@ bool ZLZipEntry::SerializeIn ( ZLStream& stream ) { this->mName = stream.ReadString ( nameLen ); this->mExtra = stream.ReadString ( extraLen ); - this->mDataAddr = stream.GetCursor (); + this->mDataAddr = ( u32 )stream.GetCursor (); stream.Seek ( this->mCompressedSize, SEEK_CUR ); if ( this->mBitFlag & BIT_HAS_DESCRIPTOR ) { @@ -93,13 +93,13 @@ void ZLZipFile::Close () { } //----------------------------------------------------------------// -ZLZipEntry& ZLZipFile::GetEntry ( u32 idx ) { +ZLZipEntry& ZLZipFile::GetEntry ( size_t idx ) { return *this->mEntryTable [ idx ]; } //----------------------------------------------------------------// -u32 ZLZipFile::GetTotal () { +size_t ZLZipFile::GetTotal () { return this->mEntryTable.Size (); } @@ -107,7 +107,7 @@ u32 ZLZipFile::GetTotal () { //----------------------------------------------------------------// int ZLZipFile::Inflate () { - u32 total = this->mEntryTable.Size (); + u32 total = ( u32 )this->mEntryTable.Size (); for ( u32 i = 0; i < total; ++i ) { ZLFileStream stream; diff --git a/src/zl-util/ZLZipFile.h b/src/zl-util/ZLZipFile.h index 0561dafd66..ef4d549ed5 100644 --- a/src/zl-util/ZLZipFile.h +++ b/src/zl-util/ZLZipFile.h @@ -91,13 +91,13 @@ class ZLZipFile { public: //----------------------------------------------------------------// - void Close (); - ZLZipEntry& GetEntry ( u32 idx ); - u32 GetTotal (); - int Inflate (); - void Open ( ZLStream& stream ); - ZLZipFile (); - virtual ~ZLZipFile (); + void Close (); + ZLZipEntry& GetEntry ( size_t idx ); + size_t GetTotal (); + int Inflate (); + void Open ( ZLStream& stream ); + ZLZipFile (); + virtual ~ZLZipFile (); }; #endif diff --git a/src/zl-util/headers.h b/src/zl-util/headers.h index cf93813285..bc800f343c 100644 --- a/src/zl-util/headers.h +++ b/src/zl-util/headers.h @@ -14,8 +14,8 @@ #include #include -#include #include +#include #include #include #include @@ -26,7 +26,10 @@ #include #include #include +#include #include +#include +#include #include #include #include @@ -74,7 +77,12 @@ #include #include #include +#include +#include #include +#include +#include +#include #include #include #include diff --git a/src/zl-util/zl_socket.h b/src/zl-util/zl_socket.h index ca04ab0918..cbc707a578 100644 --- a/src/zl-util/zl_socket.h +++ b/src/zl-util/zl_socket.h @@ -49,10 +49,10 @@ #endif enum { - IO_DONE = 0, /* operation completed successfully */ - IO_TIMEOUT = -1, /* operation timed out */ - IO_CLOSED = -2, /* the connection has been closed */ - IO_UNKNOWN = -3 + ZL_IO_DONE = 0, /* operation completed successfully */ + ZL_IO_TIMEOUT = -1, /* operation timed out */ + ZL_IO_CLOSED = -2, /* the connection has been closed */ + ZL_IO_UNKNOWN = -3 }; typedef struct in_addr zl_inaddr; diff --git a/src/zl-util/zl_usocket.cpp b/src/zl-util/zl_usocket.cpp index 9fa6c5f88f..8e8e403d89 100644 --- a/src/zl-util/zl_usocket.cpp +++ b/src/zl-util/zl_usocket.cpp @@ -25,8 +25,14 @@ #include "pch.h" +SUPPRESS_EMPTY_FILE_WARNING + +#ifndef _WIN32 + #include #include +#include +#include #ifdef ZL_SOCKET_POLL @@ -444,3 +450,5 @@ int zl_socket_waitfd ( zl_socket n, int sw, double tm ) { if ( sw == WAITFD_C && FD_ISSET ( n, &rfds )) return IO_CLOSED; return IO_DONE; } + +#endif diff --git a/src/zl-util/zl_usocket.h b/src/zl-util/zl_usocket.h index 2ab655151f..ac110b430c 100644 --- a/src/zl-util/zl_usocket.h +++ b/src/zl-util/zl_usocket.h @@ -26,6 +26,8 @@ #ifndef ZL_USOCKET_H #define ZL_USOCKET_H +#ifndef _WIN32 + #include #include #include @@ -40,6 +42,7 @@ typedef int zl_socket; -#define SOCKET_INVALID ( -1 ) +#define ZL_SOCKET_INVALID ( -1 ) #endif +#endif diff --git a/src/zl-util/zl_wsocket.cpp b/src/zl-util/zl_wsocket.cpp index e726260d66..fed25a2340 100644 --- a/src/zl-util/zl_wsocket.cpp +++ b/src/zl-util/zl_wsocket.cpp @@ -24,6 +24,7 @@ // http://getmoai.com SUPPRESS_EMPTY_FILE_WARNING + #ifdef _WIN32 /*=========================================================================*\ @@ -35,9 +36,14 @@ SUPPRESS_EMPTY_FILE_WARNING * * RCS ID: $Id: wsocket.c,v 1.36 2007/06/11 23:44:54 diego Exp $ \*=========================================================================*/ + +#include "pch.h" + +SUPPRESS_EMPTY_FILE_WARNING + #include -#include "zl_socket.h" +#include #include /* WinSock doesn't have a strerror... */ @@ -80,7 +86,7 @@ int zl_socket_waitfd(zl_socket* ps, int sw, double tm) { fd_set rfds, wfds, efds, *rp = NULL, *wp = NULL, *ep = NULL; struct timeval tv, *tp = NULL; double t; - if (tm == 0.0) return IO_TIMEOUT; /* optimize timeout == 0 case */ + if (tm == 0.0) return ZL_IO_TIMEOUT; /* optimize timeout == 0 case */ if (sw & WAITFD_R) { FD_ZERO(&rfds); FD_SET(*ps, &rfds); @@ -97,9 +103,9 @@ int zl_socket_waitfd(zl_socket* ps, int sw, double tm) { } ret = select(0, rp, wp, ep, tp); if (ret == -1) return WSAGetLastError(); - if (ret == 0) return IO_TIMEOUT; - if (sw == WAITFD_C && FD_ISSET(*ps, &efds)) return IO_CLOSED; - return IO_DONE; + if (ret == 0) return ZL_IO_TIMEOUT; + if (sw == WAITFD_C && FD_ISSET(*ps, &efds)) return ZL_IO_CLOSED; + return ZL_IO_DONE; } /*-------------------------------------------------------------------------*\ @@ -159,7 +165,7 @@ void zl_socket_shutdown(zl_socket* ps, int how) { \*-------------------------------------------------------------------------*/ int zl_socket_create(zl_socket* ps, int domain, int type, int protocol) { *ps = socket(domain, type, protocol); - if (*ps != SOCKET_INVALID) return IO_DONE; + if (*ps != SOCKET_INVALID) return ZL_IO_DONE; else return WSAGetLastError(); } @@ -169,25 +175,25 @@ int zl_socket_create(zl_socket* ps, int domain, int type, int protocol) { int zl_socket_connect(zl_socket* ps, zl_sockaddr *addr, socklen_t len, double tm) { int err; /* don't call on closed socket */ - if (*ps == SOCKET_INVALID) return IO_CLOSED; + if (*ps == SOCKET_INVALID) return ZL_IO_CLOSED; /* ask system to connect */ - if (connect(*ps, addr, len) == 0) return IO_DONE; + if (connect(*ps, addr, len) == 0) return ZL_IO_DONE; /* make sure the system is trying to connect */ err = WSAGetLastError(); if (err != WSAEWOULDBLOCK && err != WSAEINPROGRESS) return err; /* zero timeout case optimization */ - if (tm == 0.0) return IO_TIMEOUT; + if (tm == 0.0) return ZL_IO_TIMEOUT; /* we wait until something happens */ err = zl_socket_waitfd(ps, WAITFD_C, tm); - if (err == IO_CLOSED) { - int len = sizeof(err); + if (err == ZL_IO_CLOSED) { + int errlen = sizeof(err); /* give windows time to set the error (yes, disgusting) */ Sleep(10); /* find out why we failed */ - getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &len); + getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &errlen); /* we KNOW there was an error. if 'why' is 0, we will return * "unknown error", but it's not really our fault */ - return err > 0? err: IO_UNKNOWN; + return err > 0? err: ZL_IO_UNKNOWN; } else return err; } @@ -196,7 +202,7 @@ int zl_socket_connect(zl_socket* ps, zl_sockaddr *addr, socklen_t len, double tm * Binds or returns error message \*-------------------------------------------------------------------------*/ int zl_socket_bind(zl_socket* ps, zl_sockaddr *addr, socklen_t len) { - int err = IO_DONE; + int err = ZL_IO_DONE; zl_socket_setblocking(ps); if (bind(*ps, addr, len) < 0) err = WSAGetLastError(); zl_socket_setnonblocking(ps); @@ -207,7 +213,7 @@ int zl_socket_bind(zl_socket* ps, zl_sockaddr *addr, socklen_t len) { * \*-------------------------------------------------------------------------*/ int zl_socket_listen(zl_socket* ps, int backlog) { - int err = IO_DONE; + int err = ZL_IO_DONE; zl_socket_setblocking(ps); if (listen(*ps, backlog) < 0) err = WSAGetLastError(); zl_socket_setnonblocking(ps); @@ -221,22 +227,22 @@ int zl_socket_accept(zl_socket* ps, zl_socket* pa, zl_sockaddr *addr, socklen_t double tm) { zl_sockaddr daddr; socklen_t dlen = sizeof(daddr); - if (*ps == SOCKET_INVALID) return IO_CLOSED; + if (*ps == SOCKET_INVALID) return ZL_IO_CLOSED; if (!addr) addr = &daddr; if (!len) len = &dlen; for ( ;; ) { int err; /* try to get client socket */ - if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE; + if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return ZL_IO_DONE; /* find out why we failed */ err = WSAGetLastError(); /* if we failed because there was no connectoin, keep trying */ if (err != WSAEWOULDBLOCK && err != WSAECONNABORTED) return err; /* call select to avoid busy wait */ - if ((err = zl_socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; + if ((err = zl_socket_waitfd(ps, WAITFD_R, tm)) != ZL_IO_DONE) return err; } /* can't reach here */ - return IO_UNKNOWN; + //return ZL_IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ @@ -251,7 +257,7 @@ int zl_socket_send(zl_socket* ps, const char *data, size_t count, int err; *sent = 0; /* avoid making system calls on closed sockets */ - if (*ps == SOCKET_INVALID) return IO_CLOSED; + if (*ps == SOCKET_INVALID) return ZL_IO_CLOSED; /* loop until we send something or we give up on error */ for ( ;; ) { /* try to send something */ @@ -259,17 +265,17 @@ int zl_socket_send(zl_socket* ps, const char *data, size_t count, /* if we sent something, we are done */ if (put > 0) { *sent = put; - return IO_DONE; + return ZL_IO_DONE; } /* deal with failure */ err = WSAGetLastError(); /* we can only proceed if there was no serious error */ if (err != WSAEWOULDBLOCK) return err; /* avoid busy wait */ - if ((err = zl_socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; + if ((err = zl_socket_waitfd(ps, WAITFD_W, tm)) != ZL_IO_DONE) return err; } /* can't reach here */ - return IO_UNKNOWN; + //return ZL_IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ @@ -280,18 +286,18 @@ int zl_socket_sendto(zl_socket* ps, const char *data, size_t count, size_t *sent { int err; *sent = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; + if (*ps == SOCKET_INVALID) return ZL_IO_CLOSED; for ( ;; ) { int put = sendto(*ps, data, (int) count, 0, addr, len); if (put > 0) { *sent = put; - return IO_DONE; + return ZL_IO_DONE; } err = WSAGetLastError(); if (err != WSAEWOULDBLOCK) return err; - if ((err = zl_socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err; + if ((err = zl_socket_waitfd(ps, WAITFD_W, tm)) != ZL_IO_DONE) return err; } - return IO_UNKNOWN; + //return ZL_IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ @@ -300,19 +306,19 @@ int zl_socket_sendto(zl_socket* ps, const char *data, size_t count, size_t *sent int zl_socket_recv(zl_socket* ps, char *data, size_t count, size_t *got, double tm) { int err; *got = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; + if (*ps == SOCKET_INVALID) return ZL_IO_CLOSED; for ( ;; ) { int taken = recv(*ps, data, (int) count, 0); if (taken > 0) { *got = taken; - return IO_DONE; + return ZL_IO_DONE; } - if (taken == 0) return IO_CLOSED; + if (taken == 0) return ZL_IO_CLOSED; err = WSAGetLastError(); if (err != WSAEWOULDBLOCK) return err; - if ((err = zl_socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; + if ((err = zl_socket_waitfd(ps, WAITFD_R, tm)) != ZL_IO_DONE) return err; } - return IO_UNKNOWN; + //return ZL_IO_UNKNOWN; } /*-------------------------------------------------------------------------*\ @@ -322,19 +328,19 @@ int zl_socket_recvfrom(zl_socket* ps, char *data, size_t count, size_t *got, zl_sockaddr *addr, socklen_t *len, double tm) { int err; *got = 0; - if (*ps == SOCKET_INVALID) return IO_CLOSED; + if (*ps == SOCKET_INVALID) return ZL_IO_CLOSED; for ( ;; ) { int taken = recvfrom(*ps, data, (int) count, 0, addr, len); if (taken > 0) { *got = taken; - return IO_DONE; + return ZL_IO_DONE; } - if (taken == 0) return IO_CLOSED; + if (taken == 0) return ZL_IO_CLOSED; err = WSAGetLastError(); if (err != WSAEWOULDBLOCK) return err; - if ((err = zl_socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; + if ((err = zl_socket_waitfd(ps, WAITFD_R, tm)) != ZL_IO_DONE) return err; } - return IO_UNKNOWN; + //return ZL_IO_UNKNOWN; } @@ -343,13 +349,13 @@ int zl_socket_recvfrom(zl_socket* ps, char *data, size_t count, size_t *got, \*-------------------------------------------------------------------------*/ int zl_socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) { *hp = gethostbyaddr(addr, len, AF_INET); - if (*hp) return IO_DONE; + if (*hp) return ZL_IO_DONE; else return WSAGetLastError(); } int zl_socket_gethostbyname(const char *addr, struct hostent **hp) { *hp = gethostbyname(addr); - if (*hp) return IO_DONE; + if (*hp) return ZL_IO_DONE; else return WSAGetLastError(); } @@ -358,17 +364,17 @@ int zl_socket_gethostbyname(const char *addr, struct hostent **hp) { \*-------------------------------------------------------------------------*/ //----------------------------------------------------------------// -cc8* zl_io_strerror(int err) { +cc8* zl_ZL_IO_strerror(int err) { switch (err) { - case IO_DONE: return NULL; - case IO_CLOSED: return "closed"; - case IO_TIMEOUT: return "timeout"; + case ZL_IO_DONE: return NULL; + case ZL_IO_CLOSED: return "closed"; + case ZL_IO_TIMEOUT: return "timeout"; default: return "unknown error"; } } const char *socket_hoststrerror(int err) { - if (err <= 0) return zl_io_strerror(err); + if (err <= 0) return zl_ZL_IO_strerror(err); switch (err) { case WSAHOST_NOT_FOUND: return "host not found"; default: return wstrerror(err); @@ -376,7 +382,7 @@ const char *socket_hoststrerror(int err) { } const char *socket_strerror(int err) { - if (err <= 0) return zl_io_strerror(err); + if (err <= 0) return zl_ZL_IO_strerror(err); switch (err) { case WSAEADDRINUSE: return "address already in use"; case WSAECONNREFUSED: return "connection refused"; diff --git a/src/zl-vfs/ZLVfsFile.cpp b/src/zl-vfs/ZLVfsFile.cpp index f1a8021f66..1516fa3134 100644 --- a/src/zl-vfs/ZLVfsFile.cpp +++ b/src/zl-vfs/ZLVfsFile.cpp @@ -332,18 +332,18 @@ int ZLVfsFile::TryLock () { // TODO: cross platform if ( !this->mIsZip ) { - #ifdef MOAI_COMPILER_MSVC - OVERLAPPED olp; - olp.Offset = 0; - olp.OffsetHigh = 0; - olp.hEvent = 0; - BOOL res = LockFileEx((HANDLE)_get_osfhandle(_fileno(this->mPtr.mFile)), LOCKFILE_FAIL_IMMEDIATELY |LOCKFILE_EXCLUSIVE_LOCK, 0, 0, 0, &olp); - return (res == FALSE) ? 1 : 0; - #else - return ftrylockfile(this->mPtr.mFile); - #endif + #ifdef MOAI_COMPILER_MSVC + OVERLAPPED olp; + olp.Offset = 0; + olp.OffsetHigh = 0; + olp.hEvent = 0; + BOOL res = LockFileEx((HANDLE)_get_osfhandle(_fileno(this->mPtr.mFile)), LOCKFILE_FAIL_IMMEDIATELY |LOCKFILE_EXCLUSIVE_LOCK, 0, 0, 0, &olp); + return ( res == FALSE ) ? 1 : 0; + #else + return ftrylockfile(this->mPtr.mFile); + #endif } - + return 1; } //----------------------------------------------------------------// @@ -351,12 +351,13 @@ void ZLVfsFile::Unlock () { // TODO: cross platform if ( !this->mIsZip ) { + #ifdef MOAI_COMPILER_MSVC OVERLAPPED olp; olp.Offset = 0; olp.OffsetHigh = 0; olp.hEvent = 0; - BOOL res = UnlockFileEx((HANDLE)_get_osfhandle(_fileno(this->mPtr.mFile)), 0, 0, 0, &olp); + UnlockFileEx (( HANDLE )_get_osfhandle ( _fileno ( this->mPtr.mFile )), 0, 0, 0, &olp ); #else funlockfile ( this->mPtr.mFile ); #endif diff --git a/src/zl-vfs/ZLVfsFileSystem.cpp b/src/zl-vfs/ZLVfsFileSystem.cpp index c5cf9e1c29..29f9a52b57 100644 --- a/src/zl-vfs/ZLVfsFileSystem.cpp +++ b/src/zl-vfs/ZLVfsFileSystem.cpp @@ -39,7 +39,7 @@ FILE* ZLVfsVirtualPathInfo::Open () { if ( !file ) goto error; // seek to the base of the zip file header - if ( fseek ( file, this->mOffsetToHeader, SEEK_SET )) goto error; + if ( fseek ( file, ( long )this->mOffsetToHeader, SEEK_SET )) goto error; // read local header ZLVfsZipFileHeader fileHeader; @@ -343,8 +343,8 @@ std::string ZLVfsFileSystem::GetRelativePath ( const char* path, const char* bas string workpath = base ? base : this->GetWorkingPath (); - int depth = 0; - int same; + size_t depth = 0; + size_t same; string abspath = this->GetAbsoluteFilePath ( path ); @@ -354,7 +354,7 @@ std::string ZLVfsFileSystem::GetRelativePath ( const char* path, const char* bas } // count the number of steps up in the current directory - for ( int i = same; workpath [ i ]; ++i ) { + for ( size_t i = same; workpath [ i ]; ++i ) { if ( base [ i ] == '/' ) { depth++; } @@ -362,7 +362,7 @@ std::string ZLVfsFileSystem::GetRelativePath ( const char* path, const char* bas string relPath; - for ( int i = 0; i < depth; ++i ) { + for ( size_t i = 0; i < depth; ++i ) { relPath.append ( "../" ); } @@ -434,7 +434,7 @@ void ZLVfsFileSystem::Init () { char* result = getcwd ( buffer, FILENAME_MAX ); assert ( result ); - this->mWorkingPath = this->NormalizeDirPath ( buffer ); + this->mWorkingPath = this->NormalizeDirPath ( result ); #endif } @@ -494,7 +494,7 @@ int ZLVfsFileSystem::MountVirtual ( const char* path, const char* archive ) { virtualPath = cursor; cursor = cursor->mNext; - if ( strcmp_ignore_case ( virtualPath->mPath.c_str (), path ) == 0 ) { + if ( zl_strcmp_ignore_case ( virtualPath->mPath.c_str (), path ) == 0 ) { delete virtualPath; } else { diff --git a/src/zl-vfs/ZLVfsZipArchive.cpp b/src/zl-vfs/ZLVfsZipArchive.cpp index 8ea3dbd9e8..a95830ba6b 100644 --- a/src/zl-vfs/ZLVfsZipArchive.cpp +++ b/src/zl-vfs/ZLVfsZipArchive.cpp @@ -26,7 +26,7 @@ int ZLVfsZipArchiveHeader::FindAndRead ( FILE* file, size_t* offset ) { size_t cursor; char buffer [ SCAN_BUFFER_SIZE ]; size_t scansize; - int i; + size_t i; if ( !file ) return -1; @@ -42,7 +42,7 @@ int ZLVfsZipArchiveHeader::FindAndRead ( FILE* file, size_t* offset ) { scansize = (( cursor + SCAN_BUFFER_SIZE ) > filelen ) ? filelen - cursor : SCAN_BUFFER_SIZE; - fseek ( file, cursor, SEEK_SET ); + fseek ( file, ( long )cursor, SEEK_SET ); fread ( buffer, scansize, 1, file ); for ( i = scansize - 4; i >= 0; --i ) { @@ -54,7 +54,7 @@ int ZLVfsZipArchiveHeader::FindAndRead ( FILE* file, size_t* offset ) { ( *offset ) = cursor + i; } - fseek ( file, cursor + i, SEEK_SET ); + fseek ( file, ( long )( cursor + i ), SEEK_SET ); fread ( &this->mSignature, 4, 1, file ); fread ( &this->mDiskNumber, 2, 1, file ); @@ -65,7 +65,7 @@ int ZLVfsZipArchiveHeader::FindAndRead ( FILE* file, size_t* offset ) { fread ( &this->mCDAddr, 4, 1, file ); fread ( &this->mCommentLength, 2, 1, file ); - this->mDataOffset = ( cursor + i ) - ( this->mCDSize + this->mCDAddr ); // saved for use in loading the entry files + this->mDataOffset = ( u32 )(( cursor + i ) - ( this->mCDSize + this->mCDAddr )); // saved for use in loading the entry files this->mCDAddr += this->mDataOffset; return 0; @@ -125,6 +125,8 @@ int ZLVfsZipEntryHeader::Read ( FILE* file, u32 dataOffset ) { //----------------------------------------------------------------// int ZLVfsZipEntryHeader::StripTimestampsAndSkip ( FILE* file, size_t* fileHeaderAddr ) { + UNUSED ( file ); + UNUSED ( fileHeaderAddr ); /* unsigned long signature; @@ -263,7 +265,7 @@ ZLVfsZipFileDir* ZLVfsZipFileDir::AffirmSubDir ( const char* path, size_t len ) ZLVfsZipFileDir* dir = this->mChildDirs; for ( ; dir; dir = dir->mNext ) { - if ( count_same_nocase ( dir->mName.c_str (), path ) == len ) return dir; + if ( zl_count_same_nocase ( dir->mName.c_str (), path ) == len ) return dir; } dir = new ZLVfsZipFileDir (); @@ -367,7 +369,7 @@ ZLVfsZipFileDir* ZLVfsZipArchive::FindDir ( char const* path ) { ZLVfsZipFileDir* cursor = dir->mChildDirs; for ( ; cursor; cursor = cursor->mNext ) { - if ( count_same_nocase ( cursor->mName.c_str (), path ) == cursor->mName.length ()) { + if ( zl_count_same_nocase ( cursor->mName.c_str (), path ) == cursor->mName.length ()) { dir = cursor; break; } @@ -391,7 +393,7 @@ ZLVfsZipFileEntry* ZLVfsZipArchive::FindEntry ( char const* filename ) { ZLVfsZipFileDir* dir; ZLVfsZipFileEntry* entry; - int i; + size_t i; if ( !filename ) return 0; @@ -410,7 +412,7 @@ ZLVfsZipFileEntry* ZLVfsZipArchive::FindEntry ( char const* filename ) { entry = dir->mChildFiles; for ( ; entry; entry = entry->mNext ) { - if ( strcmp_ignore_case ( entry->mName.c_str (), filename ) == 0 ) break; + if ( zl_strcmp_ignore_case ( entry->mName.c_str (), filename ) == 0 ) break; } return entry; @@ -557,7 +559,7 @@ int ZLVfsZipArchive::StripTimestamps ( const char* infilename, const char* outfi assert ( header.mStartDisk == 0 ); assert ( header.mTotalDiskEntries == header.mTotalEntries ); - size_t* fileHeaderAddrTable = ( size_t* )alloca ( header.mTotalEntries * sizeof ( size_t )); + u32* fileHeaderAddrTable = ( u32* )alloca ( header.mTotalEntries * sizeof ( u32 )); // copy the files fseek ( infile, header.mCDAddr, SEEK_SET ); @@ -579,22 +581,22 @@ int ZLVfsZipArchive::StripTimestamps ( const char* infilename, const char* outfi fileHeader.mExtraFieldLength = 0; fileHeader.mFlag ^= ( 1 << 3 ); // clear bit 3 - fileHeaderAddrTable [ i ] = ftell ( outfile ); + fileHeaderAddrTable [ i ] = ( u32 )ftell ( outfile ); fileHeader.Write ( outfile ); - for ( size_t i = 0; i < fileHeader.mNameLength; ++i ) { + for ( size_t j = 0; j < fileHeader.mNameLength; ++j ) { putc ( getc ( infile ), outfile ); } - fseek ( infile, skip, SEEK_CUR ); + fseek ( infile, ( long )skip, SEEK_CUR ); size_t size = fileHeader.mCompression == 0 ? fileHeader.mUncompressedSize : fileHeader.mCompressedSize; - for ( size_t i = 0; i < size; ++i ) { + for ( size_t j = 0; j < size; ++j ) { putc ( getc ( infile ), outfile ); } - fseek ( infile, resumeAddr, SEEK_SET ); + fseek ( infile, ( long )resumeAddr, SEEK_SET ); } size_t directoryStartAddr = ftell ( outfile ); @@ -617,18 +619,18 @@ int ZLVfsZipArchive::StripTimestamps ( const char* infilename, const char* outfi entryHeader.Write ( outfile ); - for ( size_t i = 0; i < entryHeader.mNameLength; ++i ) { + for ( size_t j = 0; j < entryHeader.mNameLength; ++j ) { putc ( getc ( infile ), outfile ); } - fseek ( infile, skip, SEEK_CUR ); + fseek ( infile, ( long )skip, SEEK_CUR ); } size_t directoryEndAddr = ftell ( outfile ); // copy the header - header.mCDAddr = directoryStartAddr; - header.mCDSize = directoryEndAddr - directoryStartAddr; + header.mCDAddr = ( u32 )directoryStartAddr; + header.mCDSize = ( u32 ) ( directoryEndAddr - directoryStartAddr ); header.mCommentLength = 0; header.Write ( outfile ); diff --git a/src/zl-vfs/ZLVfsZipStream.cpp b/src/zl-vfs/ZLVfsZipStream.cpp index c60d6aa3bf..4175e0fb90 100644 --- a/src/zl-vfs/ZLVfsZipStream.cpp +++ b/src/zl-vfs/ZLVfsZipStream.cpp @@ -40,7 +40,7 @@ void ZLVfsZipStream::AffirmBlock () { } } else { - fseek ( this->mFile, this->mBaseAddr + block->mBase, SEEK_SET ); + fseek ( this->mFile, ( long )( this->mBaseAddr + block->mBase ), SEEK_SET ); // Should hopefully never happen, except maybe the edge case? if (block->mBase >= mEntry->mUncompressedSize) { block->mSize = 0; @@ -95,7 +95,7 @@ int ZLVfsZipStream::FullyCache () { } else { - fseek ( this->mFile, this->mBaseAddr, SEEK_SET ); + fseek ( this->mFile, ( long )this->mBaseAddr, SEEK_SET ); fread ( this->mFileBuffer, 1, this->mFileBufferSize, this->mFile ); } @@ -122,7 +122,7 @@ size_t ZLVfsZipStream::Inflate ( void* dest, size_t size, void* buffer, size_t b if ( !size ) return 0; stream->next_out = ( Bytef* )dest; - stream->avail_out = size; + stream->avail_out = ( uInt )size; while ( totalRead < size ) { @@ -140,7 +140,7 @@ size_t ZLVfsZipStream::Inflate ( void* dest, size_t size, void* buffer, size_t b this->mCompressedCursor += cacheSize; stream->next_in = ( Bytef* )buffer; - stream->avail_in = cacheSize; + stream->avail_in = ( uInt )cacheSize; } } @@ -315,7 +315,7 @@ int ZLVfsZipStream::ResetZipStream () { z_stream newStream; memset ( &newStream, 0, sizeof ( z_stream )); - result = fseek ( file, this->mBaseAddr, SEEK_SET ); + result = fseek ( file, ( long )this->mBaseAddr, SEEK_SET ); if ( result ) return -1; result = inflateInit2 ( &newStream, -MAX_WBITS ); diff --git a/src/zl-vfs/assert.h b/src/zl-vfs/assert.h index 3cd61731b3..6b29d74eb4 100644 --- a/src/zl-vfs/assert.h +++ b/src/zl-vfs/assert.h @@ -5,7 +5,7 @@ #define ZL_ASSERT_H #ifdef __cplusplus - extern "C" { + extern "C" { #endif #include @@ -19,11 +19,11 @@ //================================================================// //----------------------------------------------------------------// -extern void zl_handle_assert ( const char* condition, const char* funcname, const char* filename, int lineno ); -extern jmp_buf* zl_set_assert_jmp_buf ( jmp_buf* env ); +extern void zl_handle_assert ( const char* condition, const char* funcname, const char* filename, int lineno ); +extern jmp_buf* zl_set_assert_jmp_buf ( jmp_buf* env ); #ifdef __cplusplus - } + } #endif #endif @@ -35,10 +35,13 @@ extern jmp_buf* zl_set_assert_jmp_buf ( jmp_buf* env ); #undef __assert #undef assert -#if (defined(NDEBUG) && !defined(MOAI_KEEP_ASSERT)) - #define __assert(x) (( void )0 ) - #define assert(x) (( void )0 ) +#ifdef NDEBUG + //for vs2015 currently break command line build + //#define __assert(x) (( void )sizeof ( x )) + //#define assert(x) (( void )sizeof ( x )) + #define __assert(x) (( void ) 0 ) + #define assert(x) (( void ) 0 ) #else - #define __assert zl_assert - #define assert zl_assert -#endif + #define __assert zl_assert + #define assert zl_assert +#endif \ No newline at end of file diff --git a/src/zl-vfs/headers.cpp b/src/zl-vfs/headers.cpp index 7c1c220efc..330b5f0b54 100644 --- a/src/zl-vfs/headers.cpp +++ b/src/zl-vfs/headers.cpp @@ -34,7 +34,7 @@ #include "NaClFile.h" #endif -#ifdef ANDROID +#ifdef MOAI_OS_ANDROID #include #endif @@ -43,6 +43,15 @@ using namespace std; +//----------------------------------------------------------------// +void _out_of_memory () { + + zl_printf ( "FATAL: Ran out of memory. Aborting.\n" ); + zl_printf ( "NOTE: Provide your own OOM handler by calling zl_set_out_of_memory_func ().\n" ); + + abort (); +} + //================================================================// // ZLTlsfPool //================================================================// @@ -57,9 +66,9 @@ typedef struct ZLTlsfPool { // zlcore //================================================================// -ZLFILE* zl_stderr = 0; -ZLFILE* zl_stdin = 0; -ZLFILE* zl_stdout = 0; +ZLFILE* zl_stderr = 0; +ZLFILE* zl_stdin = 0; +ZLFILE* zl_stdout = 0; //----------------------------------------------------------------// int zl_affirm_path ( const char* path ) { @@ -185,7 +194,7 @@ int zl_get_stat ( char const* path, zl_stat* filestat ) { ZLVfsZipFileEntry* entry; const char *filename = localpath; - int i = strlen ( filename ) - 2; + size_t i = strlen ( filename ) - 2; result = stat ( mount->mArchive->mFilename.c_str (), &s ); @@ -200,7 +209,7 @@ int zl_get_stat ( char const* path, zl_stat* filestat ) { entry = parentDir->mChildFiles; for ( ; entry; entry = entry->mNext ) { - if ( strcmp_ignore_case ( entry->mName.c_str (), filename ) == 0 ) break; + if ( zl_strcmp_ignore_case ( entry->mName.c_str (), filename ) == 0 ) break; } if ( entry ) { @@ -217,7 +226,7 @@ int zl_get_stat ( char const* path, zl_stat* filestat ) { dirname.append ( "/" ); } for ( ; dir; dir = dir->mNext ) { - if ( strcmp_ignore_case ( dir->mName.c_str (), dirname.c_str ()) == 0 ) break; + if ( zl_strcmp_ignore_case ( dir->mName.c_str (), dirname.c_str ()) == 0 ) break; } if ( dir ) { @@ -306,19 +315,32 @@ int zl_rmdir ( const char* path ) { // stdlib //================================================================// -static ZLTlsfPool* sTlsfPool = 0; +static zl_out_of_memory_func sOutOtMemoryHandler = _out_of_memory; +static ZLTlsfPool* sTlsfPool = 0; //----------------------------------------------------------------// void* zl_calloc ( size_t num, size_t size ) { + void* ptr = 0; + if ( sTlsfPool ) { - void* ptr = tlsf_malloc ( sTlsfPool->mPool, num * size ); + ptr = tlsf_malloc ( sTlsfPool->mPool, num * size ); if ( ptr ) { memset ( ptr, 0, num * size ); } - return ptr; } - return calloc ( num, size ); + else { + ptr = calloc ( num, size ); + } + + if ( !ptr ) { + if ( !sOutOtMemoryHandler ) { + abort (); + } + sOutOtMemoryHandler (); + } + + return ptr; } //----------------------------------------------------------------// @@ -335,19 +357,37 @@ void zl_free ( void* ptr ) { //----------------------------------------------------------------// void* zl_malloc ( size_t size ) { - if ( sTlsfPool ) { - return tlsf_malloc ( sTlsfPool->mPool, size ); + void* ptr = sTlsfPool ? tlsf_malloc ( sTlsfPool->mPool, size ) : malloc ( size ); + + if ( !ptr ) { + if ( !sOutOtMemoryHandler ) { + abort (); + } + sOutOtMemoryHandler (); } - return malloc ( size ); + + return ptr; } //----------------------------------------------------------------// void* zl_realloc ( void* ptr, size_t size ) { - if ( sTlsfPool ) { - return tlsf_realloc ( sTlsfPool->mPool, ptr, size ); + ptr = sTlsfPool ? tlsf_realloc ( sTlsfPool->mPool, ptr, size ) : realloc ( ptr, size ); + + if ( !ptr ) { + if ( !sOutOtMemoryHandler ) { + abort (); + } + sOutOtMemoryHandler (); } - return realloc ( ptr, size ); + + return ptr; +} + +//----------------------------------------------------------------// +void zl_set_out_of_memory_func ( zl_out_of_memory_func handler ) { + + sOutOtMemoryHandler = handler; } //----------------------------------------------------------------// @@ -571,11 +611,7 @@ int zl_fputs ( const char* string, ZLFILE* fp ) { if (( fp == 0 ) || ( fp == zl_stdout )) { - #ifdef ANDROID - return __android_log_print ( ANDROID_LOG_INFO, "MoaiLog", "%s", string ); - #else - return printf ( "%s", string ); - #endif + zl_puts ( string ); } else { @@ -777,11 +813,7 @@ int zl_putc ( int character, ZLFILE* fp ) { //----------------------------------------------------------------// int zl_puts ( const char* string ) { - #ifdef ANDROID - return __android_log_print ( ANDROID_LOG_INFO, "MoaiLog", "%s\n", string ); - #else - return printf ( "%s\n", string ); - #endif + return zl_printf ( "%s\n", string ); } //----------------------------------------------------------------// @@ -865,10 +897,23 @@ int zl_vfprintf ( ZLFILE* fp, const char* format, va_list arg ) { if (( fp == 0 ) || ( fp == zl_stdout )) { - #ifdef ANDROID + #ifdef MOAI_OS_ANDROID return __android_log_vprint ( ANDROID_LOG_INFO, "MoaiLog", format, arg ); #else + #ifdef MOAI_OS_WINDOWS + + char buffer [ 1024 ]; + char* str = zl_vsnprintf_alloc ( buffer, sizeof ( buffer ), format, arg ); + OutputDebugString ( str ); + + if ( str != buffer ) { + free ( str ); + } + + #endif + return vprintf ( format, arg ); + #endif } else { diff --git a/src/zl-vfs/headers.h b/src/zl-vfs/headers.h index 559f86c05e..2cc1bfbcd7 100644 --- a/src/zl-vfs/headers.h +++ b/src/zl-vfs/headers.h @@ -5,12 +5,16 @@ #define ZL_H #include + #include +#include #ifdef __cplusplus extern "C" { #endif +typedef void ( *zl_out_of_memory_func )(); + //================================================================// // zl_stat //================================================================// @@ -30,9 +34,9 @@ typedef struct zl_stat { // zlcore //================================================================// -typedef void ZLDIR; -typedef void ZLFILE; -typedef void ZL_TLSF_POOL; +typedef int ZLDIR; +typedef int ZLFILE; +typedef int ZL_TLSF_POOL; extern ZLFILE* zl_stderr; extern ZLFILE* zl_stdin; @@ -63,6 +67,7 @@ extern void* zl_calloc ( size_t num, size_t size ); extern void zl_free ( void* ptr ); extern void* zl_malloc ( size_t size ); extern void* zl_realloc ( void* ptr, size_t size ); +extern void zl_set_out_of_memory_func ( zl_out_of_memory_func handler ); extern ZL_TLSF_POOL* zl_tlsf_create_pool ( size_t bytes ); extern void zl_tlsf_destroy_pool ( ZL_TLSF_POOL* opaque ); extern ZL_TLSF_POOL* zl_tlsf_get_pool ( void ); @@ -104,7 +109,7 @@ extern ZLFILE* zl_popen ( const char *command, const char *mode ); extern int zl_printf ( const char* format, ... ); extern int zl_putc ( int character, ZLFILE* fp ); extern int zl_puts ( const char* string ); -extern int zl_remove ( const char* path ); +extern int zl_remove ( const char* path ); extern int zl_rename ( const char* oldname, const char* newname ); extern void zl_rewind ( ZLFILE* fp ); extern void zl_setbuf ( ZLFILE* fp, char* buffer ); @@ -136,4 +141,4 @@ extern int zl_vprintf ( const char* format, va_list arg ); } #endif -#endif \ No newline at end of file +#endif diff --git a/src/zl-vfs/zl_replace.h b/src/zl-vfs/zl_replace.h index 72808bc8fa..a6d85623b8 100644 --- a/src/zl-vfs/zl_replace.h +++ b/src/zl-vfs/zl_replace.h @@ -5,10 +5,11 @@ #define ZL_REPLACE_H // include these here to invoke headerguards; make sure they don't get re-included later and undo our work -#include +#include #include #include +#include #include #include diff --git a/src/zl-vfs/zl_util.cpp b/src/zl-vfs/zl_util.cpp index c4be263df5..553820682d 100644 --- a/src/zl-vfs/zl_util.cpp +++ b/src/zl-vfs/zl_util.cpp @@ -10,7 +10,7 @@ //================================================================// //----------------------------------------------------------------// -size_t count_same ( char const* str0, char const* str1 ) { +size_t zl_count_same ( char const* str0, char const* str1 ) { size_t c; for ( c = 0; str0 [ c ] && str1 [ c ] && ( str0 [ c ] == str1 [ c ]); ++c ); @@ -18,7 +18,7 @@ size_t count_same ( char const* str0, char const* str1 ) { } //----------------------------------------------------------------// -size_t count_same_nocase ( char const* str0, char const* str1 ) { +size_t zl_count_same_nocase ( char const* str0, char const* str1 ) { size_t c; for ( c = 0; str0 [ c ] && str1 [ c ]; ++c ) { @@ -32,11 +32,52 @@ size_t count_same_nocase ( char const* str0, char const* str1 ) { } //----------------------------------------------------------------// -int strcmp_ignore_case ( char const* str0, char const* str1 ) { +int zl_strcmp_ignore_case ( char const* str0, char const* str1 ) { - #ifdef _WIN32 + #ifdef MOAI_OS_WINDOWS return stricmp ( str0, str1 ); #else return strcasecmp ( str0, str1 ); #endif } + +//----------------------------------------------------------------// +char* zl_vsnprintf_alloc ( char* s, size_t n, const char* format, va_list arg ) { + + char* buffer = s; + int buffSize = ( int )n; + + int result; + + for ( ;; ) { + + va_list copy; + va_copy ( copy, arg ); + result = vsnprintf ( buffer, buffSize, format, copy ); + va_end ( copy ); + + // thanks to http://perfec.to/vsnprintf/ for a discussion of vsnprintf portability issues + if (( result == buffSize ) || ( result == -1 ) || ( result == buffSize - 1 )) { + buffSize = buffSize << 1; + } + else if ( result > buffSize ) { + buffSize = ( size_t )result + 2; + } + else { + break; + } + + if ( buffer == s ) { + buffer = 0; + } + + if ( buffer ) { + buffer = ( char* )realloc ( buffer, buffSize ); + } + else { + buffer = ( char* )malloc ( buffSize ); + } + } + + return buffer; +} diff --git a/src/zl-vfs/zl_util.h b/src/zl-vfs/zl_util.h index 467171b718..ed1baec3c5 100644 --- a/src/zl-vfs/zl_util.h +++ b/src/zl-vfs/zl_util.h @@ -9,8 +9,9 @@ //================================================================// //----------------------------------------------------------------// -extern size_t count_same ( char const* str0, char const* str1 ); -extern size_t count_same_nocase ( char const* str0, char const* str1 ); -extern int strcmp_ignore_case ( char const* str0, char const* str1 ); +extern size_t zl_count_same ( char const* str0, char const* str1 ); +extern size_t zl_count_same_nocase ( char const* str0, char const* str1 ); +extern int zl_strcmp_ignore_case ( char const* str0, char const* str1 ); +extern char* zl_vsnprintf_alloc ( char* s, size_t n, const char* format, va_list arg ); #endif diff --git a/util/android-studio/Moai/moai-deltadna/AndroidManifest.xml b/util/android-studio/Moai/moai-deltadna/AndroidManifest.xml new file mode 100644 index 0000000000..80e3e0d1ce --- /dev/null +++ b/util/android-studio/Moai/moai-deltadna/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/util/android-studio/Moai/moai-deltadna/build.gradle b/util/android-studio/Moai/moai-deltadna/build.gradle new file mode 100644 index 0000000000..069e294d4c --- /dev/null +++ b/util/android-studio/Moai/moai-deltadna/build.gradle @@ -0,0 +1,36 @@ +apply plugin: 'com.android.library' + +android { + compileSdkVersion 22 + buildToolsVersion "22.0.1" + + defaultConfig { + minSdkVersion 17 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs += '@MOAI_SDK_HOME@src/moai-android-deltadna' + } + } +} + +repositories { + mavenCentral() +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:22.1.1' + compile files('@MOAI_SDK_HOME@3rdparty-android/deltadna-v3.3.6/lib/dd_android_sdk.jar') + compile project(':moai-core') +} diff --git a/util/android-studio/Moai/moai-deltadna/proguard-rules.pro b/util/android-studio/Moai/moai-deltadna/proguard-rules.pro new file mode 100644 index 0000000000..dafb72ef25 --- /dev/null +++ b/util/android-studio/Moai/moai-deltadna/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /Users/patrick/Library/Android/sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/util/android-studio/Moai/settings.gradle b/util/android-studio/Moai/settings.gradle index 4c14712180..a6379fd224 100644 --- a/util/android-studio/Moai/settings.gradle +++ b/util/android-studio/Moai/settings.gradle @@ -4,6 +4,7 @@ include ':moai-amazonbilling' include ':moai-chartboost' include ':moai-core' include ':moai-crittercism' +include ':moai-deltadna' include ':moai-facebook' include ':moai-flurry' include ':moai-fortumo' diff --git a/util/ant-host/config.lua b/util/ant-host/config.lua new file mode 100644 index 0000000000..4e1dd3b234 --- /dev/null +++ b/util/ant-host/config.lua @@ -0,0 +1,74 @@ +ANDROID_PLATFORM_TARGET = "android-17" +OS_BRAND = "Android" + +MODULES = { + + adcolony = { + lib = MOAI_SDK_HOME .. '3rdparty-android/adcolony-2.0.6', + src = MOAI_SDK_HOME .. 'src/moai-android-adcolony', + }, + + amazon_billing = { + lib = MOAI_SDK_HOME .. '3rdparty-android/amazon-billing-1.0.3', + src = MOAI_SDK_HOME .. 'src/moai-android-amazon-billing', + }, + + chartboost = { + lib = MOAI_SDK_HOME .. '3rdparty-android/chartboost-5.1.1', + src = MOAI_SDK_HOME .. 'src/moai-android-chartboost', + }, + + contrib = { + lib = MOAI_SDK_HOME .. '3rdparty-android/contrib', + }, + + crittercism = { + lib = MOAI_SDK_HOME .. '3rdparty-android/crittercism-4.4.0', + src = MOAI_SDK_HOME .. 'src/moai-android-crittercism', + }, + + deltadna = { + lib = MOAI_SDK_HOME .. '3rdparty-android/deltadna-v3.3.6', + src = MOAI_SDK_HOME .. 'src/moai-android-deltadna', + }, + + facebook = { + lib = MOAI_SDK_HOME .. '3rdparty-android/facebook-v4.4.1', + src = MOAI_SDK_HOME .. 'src/moai-android-facebook', + }, + + flurry = { + lib = MOAI_SDK_HOME .. '3rdparty-android/flurry-3.3.4', + src = MOAI_SDK_HOME .. 'src/moai-android-flurry', + }, + + google_billing = { + lib = MOAI_SDK_HOME .. '3rdparty-android/google-billing-v3', + src = MOAI_SDK_HOME .. 'src/moai-android-google-billing', + }, + + google_play = { + lib = MOAI_SDK_HOME .. '3rdparty-android/google-play-services', + src = MOAI_SDK_HOME .. 'src/moai-android-google-play-services', + }, + + google_push = { + lib = MOAI_SDK_HOME .. '3rdparty-android/google-push', + src = MOAI_SDK_HOME .. 'src/moai-android-google-push', + }, + + moai = { + src = MOAI_SDK_HOME .. 'src/moai-android', + bin = MOAI_SDK_HOME .. 'ant/libmoai/libs/armeabi-v7a/libmoai.so', + }, + + tapjoy = { + lib = MOAI_SDK_HOME .. '3rdparty-android/tapjoy-9.1.5', + src = MOAI_SDK_HOME .. 'src/moai-android-tapjoy', + }, + + vungle = { + lib = MOAI_SDK_HOME .. '3rdparty-android/vungle-1.3.11', + src = MOAI_SDK_HOME .. 'src/moai-android-vungle', + }, +} diff --git a/util/ant-libmoai/Android.mk b/util/ant-libmoai/Android.mk index 1c1f0b7ce6..1731e030d4 100644 --- a/util/ant-libmoai/Android.mk +++ b/util/ant-libmoai/Android.mk @@ -32,6 +32,7 @@ MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/expat-2.1.0/amiga MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/expat-2.1.0/lib MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/expat-2.1.0/xmlwf + MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/kissfft MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/jansson-2.7/src MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/lua-5.1.3/src MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/ooid-0.99 @@ -42,6 +43,7 @@ MY_HEADER_SEARCH_PATHS += $(MOAI_SDK_HOME)/3rdparty/zlib-1.2.3 MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-contrib.mk + MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-kissfft.mk MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-expat.mk MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-json.mk MY_INCLUDES += $(MOAI_SDK_HOME)/util/ant-libmoai/modules/3rdparty-lua.mk diff --git a/util/ant-libmoai/Application.mk b/util/ant-libmoai/Application.mk index d21ae38572..01d8c43426 100644 --- a/util/ant-libmoai/Application.mk +++ b/util/ant-libmoai/Application.mk @@ -5,10 +5,7 @@ #================================================================# #================================================================# - #temp fix should use line below just el capitan generate incorrect list of abi - #APP_ABI := @MY_ARM_ARCH@ - #================================================================# - APP_ABI := armeabi-v7a x86 + APP_ABI := @MY_ARM_ARCH@ APP_CFLAGS := -w -DANDROID_NDK -DDISABLE_IMPORTGL APP_PLATFORM := @MY_APP_PLATFORM@ APP_STL := gnustl_static diff --git a/util/ant-libmoai/MoaiTarget.mk b/util/ant-libmoai/MoaiTarget.mk index 572d826e3a..5180096390 100644 --- a/util/ant-libmoai/MoaiTarget.mk +++ b/util/ant-libmoai/MoaiTarget.mk @@ -19,7 +19,7 @@ LOCAL_SRC_FILES += src/jni.cpp LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/host-modules/*.cpp) LOCAL_SRC_FILES += src/aku_plugins.cpp -LOCAL_STATIC_LIBRARIES := @STATIC_LIBRARIES@ libmoai-util libmoai-core libzl-core libcontrib libexpat libjson liblua libsfmt libsqlite libtinyxml libzl-vfs libzlib libcpufeatures +LOCAL_STATIC_LIBRARIES := @STATIC_LIBRARIES@ libmoai-util libmoai-core libzl-core libcontrib libexpat libjson liblua libsfmt libsqlite libtinyxml libzl-vfs libzlib libcpufeatures libkissfft LOCAL_WHOLE_STATIC_LIBRARIES := @WHOLE_STATIC_LIBRARIES@ libmoai-core include $(BUILD_SHARED_LIBRARY) diff --git a/util/ant-libmoai/config.lua b/util/ant-libmoai/config.lua index e82cdba9aa..3aedebbc7c 100644 --- a/util/ant-libmoai/config.lua +++ b/util/ant-libmoai/config.lua @@ -10,7 +10,7 @@ SETTINGS = { LIB_NAME = 'moai', MY_ARM_MODE = 'arm', MY_ARM_ARCH = 'armeabi-v7a arm64-v8a x86', - MY_APP_PLATFORM = 'android-10', + MY_APP_PLATFORM = 'android-21', } MODULES = { @@ -98,7 +98,7 @@ MODULES = { STATIC_LIBRARIES = 'libbox2d libmoai-box2d', }, - + ---------------------------------------------------------------- CHARTBOOST = { @@ -168,7 +168,28 @@ MODULES = { STATIC_LIBRARIES = 'libmoai-crypto libzl-crypto libcrypto-a libcrypto-b libcrypto-c libcrypto-d', }, + + ---------------------------------------------------------------- + DELTADNA = { + + PREPROCESSOR_FLAG = 'AKU_WITH_ANDROID_DELTADNA', + NAMESPACE = 'com.moaisdk.deltadna', + HEADER_SEARCH_PATHS = { + }, + + MAKE = { + '$(MOAI_SDK_HOME)/util/ant-libmoai/modules/moai-deltadna.mk', + }, + + JAVA = { + MOAI_SDK_HOME .. '3rdparty-android/deltadna-v3.3.6', + MOAI_SDK_HOME .. 'src/moai-android-deltadna', + }, + + STATIC_LIBRARIES = 'libmoai-deltadna', + }, + ---------------------------------------------------------------- FACEBOOK = { @@ -214,6 +235,7 @@ MODULES = { ---------------------------------------------------------------- --[[ + FMOD_EX = { PREPROCESSOR_FLAG = 'AKU_WITH_FMOD_EX', @@ -238,7 +260,7 @@ MODULES = { ---------------------------------------------------------------- GOOGLE_PLAY_SERVICES = { - PREPROCESSOR_FLAG = 'AKU_WITH_ANDROID_GOOGLE_PLAY', + PREPROCESSOR_FLAG = 'AKU_WITH_ANDROID_GOOGLE_PLAY_SERVICES', NAMESPACE = 'com.moaisdk.googleplayservices', HEADER_SEARCH_PATHS = { @@ -463,7 +485,7 @@ MODULES = { STATIC_LIBRARIES = 'libmoai-sim libfreetype libtess libzl-gfx', }, - + ---------------------------------------------------------------- TAPJOY = { @@ -532,7 +554,7 @@ MODULES = { STATIC_LIBRARIES = 'libogg libvorbis libuntz libmoai-untz', }, - + ---------------------------------------------------------------- VUNGLE = { @@ -581,6 +603,7 @@ TARGETS = { 'BOX2D', 'CHARTBOOST', 'CRYPTO', + 'DELTADNA', 'FACEBOOK', 'FLURRY', 'GOOGLE_PLAY_SERVICES', @@ -609,6 +632,7 @@ STATIC_LINK_ORDER = { 'libmoai-adcolony', 'libmoai-chartboost', 'libmoai-crittercism', + 'libmoai-deltadna', 'libmoai-facebook', 'libmoai-flurry', 'libmoai-google-play-services', @@ -616,8 +640,6 @@ STATIC_LINK_ORDER = { 'libmoai-twitter', 'libmoai-vungle', - 'libmoai-chartboost', - -- moai 'libmoai-android', 'libmoai-box2d', diff --git a/util/ant-libmoai/main.lua b/util/ant-libmoai/main.lua index c602938ddc..9efd88291a 100644 --- a/util/ant-libmoai/main.lua +++ b/util/ant-libmoai/main.lua @@ -72,7 +72,7 @@ FOLDERS = { } JAVA = { - NAMESPACE = 'com.ziplinegames.moai', + NAMESPACE = 'com.moaisdk', PLATFORM = 'Android', } diff --git a/util/ant-libmoai/modules/3rdparty-contrib.mk b/util/ant-libmoai/modules/3rdparty-contrib.mk index e1f15961bc..fd501da853 100644 --- a/util/ant-libmoai/modules/3rdparty-contrib.mk +++ b/util/ant-libmoai/modules/3rdparty-contrib.mk @@ -14,6 +14,6 @@ LOCAL_CFLAGS += -fvisibility=hidden LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/contrib/moai_utf8.c LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/contrib/moai_whirlpool.c -LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/contrib/edtaa3func.c +LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/contrib/moai_edtaa3func.c include $(BUILD_STATIC_LIBRARY) diff --git a/util/ant-libmoai/modules/3rdparty-kissfft.mk b/util/ant-libmoai/modules/3rdparty-kissfft.mk new file mode 100644 index 0000000000..da96ce930f --- /dev/null +++ b/util/ant-libmoai/modules/3rdparty-kissfft.mk @@ -0,0 +1,18 @@ +#================================================================# +# Copyright (c) 2010-2011 Zipline Games, Inc. +# All Rights Reserved. +# http://getmoai.com +#================================================================# + +include $(CLEAR_VARS) + +LOCAL_MODULE := kissfft +LOCAL_ARM_MODE := $(MY_ARM_MODE) +LOCAL_CFLAGS += -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h +LOCAL_CFLAGS += -fvisibility=hidden + +LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) +LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/kissfft/tools/kiss_fftr.c +LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/kissfft/kiss_fft.c + +include $(BUILD_STATIC_LIBRARY) \ No newline at end of file diff --git a/util/ant-libmoai/modules/3rdparty-ssl.mk b/util/ant-libmoai/modules/3rdparty-ssl.mk index cfb97ae5c7..52642fbbac 100644 --- a/util/ant-libmoai/modules/3rdparty-ssl.mk +++ b/util/ant-libmoai/modules/3rdparty-ssl.mk @@ -13,6 +13,9 @@ LOCAL_CFLAGS += -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h LOCAL_CFLAGS += -fvisibility=hidden LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) +LOCAL_C_INCLUDES += '$(MOAI_SDK_HOME)/3rdparty/openssl-1.0.0m' +LOCAL_C_INCLUDES += '$(MOAI_SDK_HOME)/3rdparty/openssl-1.0.0m/crypto' + LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/openssl-1.0.0m/ssl/bio_ssl.c LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/openssl-1.0.0m/ssl/d1_both.c LOCAL_SRC_FILES += $(MOAI_SDK_HOME)/3rdparty/openssl-1.0.0m/ssl/d1_clnt.c diff --git a/util/ant-libmoai/modules/moai-chipmunk.mk b/util/ant-libmoai/modules/moai-chipmunk.mk deleted file mode 100644 index 2e7ce0800b..0000000000 --- a/util/ant-libmoai/modules/moai-chipmunk.mk +++ /dev/null @@ -1,16 +0,0 @@ -#================================================================# -# Copyright (c) 2010-2011 Zipline Games, Inc. -# All Rights Reserved. -# http://getmoai.com -#================================================================# - -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-chipmunk -LOCAL_ARM_MODE := $(MY_ARM_MODE) -LOCAL_CFLAGS := $(MY_LOCAL_CFLAGS) -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h -fvisibility=hidden - -LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) -LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/moai-chipmunk/*.cpp) - -include $(BUILD_STATIC_LIBRARY) diff --git a/util/ant-libmoai/modules/moai-deltadna.mk b/util/ant-libmoai/modules/moai-deltadna.mk new file mode 100644 index 0000000000..fb4808ba9e --- /dev/null +++ b/util/ant-libmoai/modules/moai-deltadna.mk @@ -0,0 +1,16 @@ +#================================================================# +# Copyright (c) 2010-2011 Zipline Games, Inc. +# All Rights Reserved. +# http://getmoai.com +#================================================================# + +include $(CLEAR_VARS) + +LOCAL_MODULE := moai-deltadna +LOCAL_ARM_MODE := $(MY_ARM_MODE) +LOCAL_CFLAGS := $(MY_LOCAL_CFLAGS) -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h -fvisibility=hidden + +LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) +LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/moai-android-deltadna/*.cpp) + +include $(BUILD_STATIC_LIBRARY) diff --git a/util/ant-libmoai/modules/moai-http-client.mk b/util/ant-libmoai/modules/moai-http-client.mk index d98ae27d93..c6c17d4065 100644 --- a/util/ant-libmoai/modules/moai-http-client.mk +++ b/util/ant-libmoai/modules/moai-http-client.mk @@ -11,6 +11,8 @@ LOCAL_ARM_MODE := $(MY_ARM_MODE) LOCAL_CFLAGS := $(MY_LOCAL_CFLAGS) -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h -fvisibility=hidden LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) +LOCAL_C_INCLUDES += '$(MOAI_SDK_HOME)/3rdparty/openssl-1.0.0m' + LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/moai-http-client/*.cpp) include $(BUILD_STATIC_LIBRARY) diff --git a/util/ant-libmoai/modules/moai-sim.mk b/util/ant-libmoai/modules/moai-sim.mk index 67e537b983..968f0e5396 100644 --- a/util/ant-libmoai/modules/moai-sim.mk +++ b/util/ant-libmoai/modules/moai-sim.mk @@ -4,13 +4,13 @@ # http://getmoai.com #================================================================# -include $(CLEAR_VARS) + include $(CLEAR_VARS) -LOCAL_MODULE := moai-sim -LOCAL_ARM_MODE := $(MY_ARM_MODE) -LOCAL_CFLAGS := $(MY_LOCAL_CFLAGS) -DMOAI_WITH_LIBWEBP=0 -DMOAI_WITH_LIBPVR=1 -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h -fvisibility=hidden + LOCAL_MODULE := moai-sim + LOCAL_ARM_MODE := $(MY_ARM_MODE) + LOCAL_CFLAGS := $(MY_LOCAL_CFLAGS) -DMOAI_WITH_LIBWEBP=1 -DMOAI_WITH_LIBPVR=1 -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h -fvisibility=hidden -fpermissive -LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) -LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/moai-sim/*.cpp) + LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) + LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/moai-sim/*.cpp) -include $(BUILD_STATIC_LIBRARY) + include $(BUILD_STATIC_LIBRARY) diff --git a/util/ant-libmoai/modules/zl-gfx.mk b/util/ant-libmoai/modules/zl-gfx.mk index f474eb0ea6..ffb65e7e60 100644 --- a/util/ant-libmoai/modules/zl-gfx.mk +++ b/util/ant-libmoai/modules/zl-gfx.mk @@ -12,6 +12,6 @@ LOCAL_CFLAGS := -include $(MOAI_SDK_HOME)/src/zl-vfs/zl_replace.h LOCAL_CFLAGS += -fvisibility=hidden LOCAL_C_INCLUDES := $(MY_HEADER_SEARCH_PATHS) -LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/zl-gfx/zl_gfx_opengl.cpp) +LOCAL_SRC_FILES += $(wildcard $(MOAI_SDK_HOME)/src/zl-gfx/*.cpp) include $(BUILD_STATIC_LIBRARY) \ No newline at end of file diff --git a/util/build/build-ios-simulator.sh b/util/build/build-ios-simulator.sh index 513ee776b8..c73ecf9323 100755 --- a/util/build/build-ios-simulator.sh +++ b/util/build/build-ios-simulator.sh @@ -4,7 +4,7 @@ set -e # exit on error pushd $(dirname "${0}")/../../xcode > /dev/null -xcodebuild -derivedDataPath build -configuration Release -workspace moai.xcworkspace -scheme libmoai-ios-all -sdk iphonesimulator || exit 1 -xcodebuild -derivedDataPath build -configuration Release -workspace moai.xcworkspace -scheme moai-ios -sdk iphonesimulator || exit 1 +xcodebuild -derivedDataPath build -configuration Release -workspace moai.xcworkspace -scheme libmoai-ios-all -sdk iphonesimulator PLATFORM_NAME=iphonesimulator || exit 1 +xcodebuild -derivedDataPath build -configuration Release -workspace moai.xcworkspace -scheme moai-ios -sdk iphonesimulator PLATFORM_NAME=iphonesimulator || exit 1 popd > /dev/null \ No newline at end of file diff --git a/util/build/build-ios.sh b/util/build/build-ios.sh index f0ca0161a6..15a77aec26 100755 --- a/util/build/build-ios.sh +++ b/util/build/build-ios.sh @@ -33,7 +33,7 @@ cp -a ./build/Build/Products/Release-universal/*.a $IOS_LIB #--------------------------------------------------------------- # build ios static -xcodebuild -derivedDataPath build -configuration Release -workspace moai.xcworkspace -scheme moai-ios-static -sdk iphonesimulator || exit 1 +xcodebuild -derivedDataPath build -configuration Release -workspace moai.xcworkspace -scheme moai-ios-static -sdk iphonesimulator PLATFORM_NAME=iphonesimulator || exit 1 xcodebuild -derivedDataPath build -configuration Release -workspace moai.xcworkspace -scheme moai-ios-static -sdk iphoneos || exit 1 diff --git a/util/environment/wut.txt b/util/environment/wut.txt new file mode 100644 index 0000000000..0752692b80 --- /dev/null +++ b/util/environment/wut.txt @@ -0,0 +1,5 @@ +pito environment + This command will give you the needed environment variables to use pito. + Example: + /absolute/path/to/moai_sdk/util/pito environment + (Follow instructions) diff --git a/util/help/help.txt b/util/help/help.txt new file mode 100644 index 0000000000..ac3d83e768 --- /dev/null +++ b/util/help/help.txt @@ -0,0 +1,2 @@ +pito help + Print help doc for command. diff --git a/util/help/main.lua b/util/help/main.lua new file mode 100644 index 0000000000..1b0662ecb3 --- /dev/null +++ b/util/help/main.lua @@ -0,0 +1,50 @@ +--============================================================== +-- args +--============================================================== + +local UTIL_DIR = string.format ( '%s%s/', MOAI_SDK_HOME, 'util' ) + +---------------------------------------------------------------- +local checkHelp = function ( command ) + + if command then + local filename = string.format ( '%s%s/help.txt', UTIL_DIR, command ) + return MOAIFileSystem.checkFileExists ( filename ), filename + end + + return false +end + +---------------------------------------------------------------- +local printHelp = function ( command ) + + local exists, filename = checkHelp ( command ) + + if exists then + + local help = MOAIFileSystem.loadFile ( filename ) + + if help then + help = string.match ( help, '^%s*(.-)%s*$' ) + print ( help ) + print () + end + end +end + +command = arg [ 4 ] + +if checkHelp ( command ) then + + printHelp ( command ) +else + + print ( 'pito - the MOAI toolbelt - general usage:' ) + print () + + local directories = MOAIFileSystem.listDirectories ( UTIL_DIR ) + + for i, directory in ipairs ( directories ) do + printHelp ( directory ) + end +end diff --git a/host-templates/android/studio/MoaiTemplate/.gitignore b/util/host-android-gradle/MoaiTemplate/.gitignore similarity index 100% rename from host-templates/android/studio/MoaiTemplate/.gitignore rename to util/host-android-gradle/MoaiTemplate/.gitignore diff --git a/host-templates/android/studio/MoaiTemplate/MoaiTemplate.iml b/util/host-android-gradle/MoaiTemplate/MoaiTemplate.iml similarity index 100% rename from host-templates/android/studio/MoaiTemplate/MoaiTemplate.iml rename to util/host-android-gradle/MoaiTemplate/MoaiTemplate.iml diff --git a/host-templates/android/studio/MoaiTemplate/Readme.md b/util/host-android-gradle/MoaiTemplate/Readme.md similarity index 100% rename from host-templates/android/studio/MoaiTemplate/Readme.md rename to util/host-android-gradle/MoaiTemplate/Readme.md diff --git a/host-templates/android/studio/MoaiTemplate/app/.gitignore b/util/host-android-gradle/MoaiTemplate/app/.gitignore similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/.gitignore rename to util/host-android-gradle/MoaiTemplate/app/.gitignore diff --git a/host-templates/android/studio/MoaiTemplate/app/bootstrap/bootstrap.lua b/util/host-android-gradle/MoaiTemplate/app/bootstrap/bootstrap.lua similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/bootstrap/bootstrap.lua rename to util/host-android-gradle/MoaiTemplate/app/bootstrap/bootstrap.lua diff --git a/host-templates/android/studio/MoaiTemplate/app/bootstrap/init.lua b/util/host-android-gradle/MoaiTemplate/app/bootstrap/init.lua similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/bootstrap/init.lua rename to util/host-android-gradle/MoaiTemplate/app/bootstrap/init.lua diff --git a/host-templates/android/studio/MoaiTemplate/app/build.gradle b/util/host-android-gradle/MoaiTemplate/app/build.gradle similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/build.gradle rename to util/host-android-gradle/MoaiTemplate/app/build.gradle diff --git a/host-templates/android/studio/MoaiTemplate/app/moai.gradle b/util/host-android-gradle/MoaiTemplate/app/moai.gradle similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/moai.gradle rename to util/host-android-gradle/MoaiTemplate/app/moai.gradle diff --git a/host-templates/android/studio/MoaiTemplate/app/proguard-rules.pro b/util/host-android-gradle/MoaiTemplate/app/proguard-rules.pro similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/proguard-rules.pro rename to util/host-android-gradle/MoaiTemplate/app/proguard-rules.pro diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/AndroidManifest.xml b/util/host-android-gradle/MoaiTemplate/app/src/main/AndroidManifest.xml similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/AndroidManifest.xml rename to util/host-android-gradle/MoaiTemplate/app/src/main/AndroidManifest.xml diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Android.mk b/util/host-android-gradle/MoaiTemplate/app/src/main/jni/Android.mk similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/jni/Android.mk rename to util/host-android-gradle/MoaiTemplate/app/src/main/jni/Android.mk diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Application.mk b/util/host-android-gradle/MoaiTemplate/app/src/main/jni/Application.mk similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/jni/Application.mk rename to util/host-android-gradle/MoaiTemplate/app/src/main/jni/Application.mk diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/MoaiModules.mk b/util/host-android-gradle/MoaiTemplate/app/src/main/jni/MoaiModules.mk similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/jni/MoaiModules.mk rename to util/host-android-gradle/MoaiTemplate/app/src/main/jni/MoaiModules.mk diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/jni.cpp b/util/host-android-gradle/MoaiTemplate/app/src/main/jni/jni.cpp similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/jni/jni.cpp rename to util/host-android-gradle/MoaiTemplate/app/src/main/jni/jni.cpp diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-hdpi/icon.png b/util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-hdpi/icon.png similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-hdpi/icon.png rename to util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-hdpi/icon.png diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-mdpi/icon.png b/util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-mdpi/icon.png similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-mdpi/icon.png rename to util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-mdpi/icon.png diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xhdpi/icon.png b/util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-xhdpi/icon.png similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xhdpi/icon.png rename to util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-xhdpi/icon.png diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xxhdpi/icon.png b/util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-xxhdpi/icon.png similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xxhdpi/icon.png rename to util/host-android-gradle/MoaiTemplate/app/src/main/res/drawable-xxhdpi/icon.png diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/values/strings.xml b/util/host-android-gradle/MoaiTemplate/app/src/main/res/values/strings.xml similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/res/values/strings.xml rename to util/host-android-gradle/MoaiTemplate/app/src/main/res/values/strings.xml diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/values/styles.xml b/util/host-android-gradle/MoaiTemplate/app/src/main/res/values/styles.xml similarity index 100% rename from host-templates/android/studio/MoaiTemplate/app/src/main/res/values/styles.xml rename to util/host-android-gradle/MoaiTemplate/app/src/main/res/values/styles.xml diff --git a/host-templates/android/studio/MoaiTemplate/build.bat b/util/host-android-gradle/MoaiTemplate/build.bat similarity index 100% rename from host-templates/android/studio/MoaiTemplate/build.bat rename to util/host-android-gradle/MoaiTemplate/build.bat diff --git a/host-templates/android/studio/MoaiTemplate/build.gradle b/util/host-android-gradle/MoaiTemplate/build.gradle similarity index 100% rename from host-templates/android/studio/MoaiTemplate/build.gradle rename to util/host-android-gradle/MoaiTemplate/build.gradle diff --git a/host-templates/android/studio/MoaiTemplate/build.sh b/util/host-android-gradle/MoaiTemplate/build.sh similarity index 100% rename from host-templates/android/studio/MoaiTemplate/build.sh rename to util/host-android-gradle/MoaiTemplate/build.sh diff --git a/host-templates/android/studio/MoaiTemplate/gradle.properties b/util/host-android-gradle/MoaiTemplate/gradle.properties similarity index 100% rename from host-templates/android/studio/MoaiTemplate/gradle.properties rename to util/host-android-gradle/MoaiTemplate/gradle.properties diff --git a/host-templates/android/studio/MoaiTemplate/gradle/wrapper/gradle-wrapper.jar b/util/host-android-gradle/MoaiTemplate/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from host-templates/android/studio/MoaiTemplate/gradle/wrapper/gradle-wrapper.jar rename to util/host-android-gradle/MoaiTemplate/gradle/wrapper/gradle-wrapper.jar diff --git a/host-templates/android/studio/MoaiTemplate/gradle/wrapper/gradle-wrapper.properties b/util/host-android-gradle/MoaiTemplate/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from host-templates/android/studio/MoaiTemplate/gradle/wrapper/gradle-wrapper.properties rename to util/host-android-gradle/MoaiTemplate/gradle/wrapper/gradle-wrapper.properties diff --git a/host-templates/android/studio/MoaiTemplate/gradlew b/util/host-android-gradle/MoaiTemplate/gradlew similarity index 100% rename from host-templates/android/studio/MoaiTemplate/gradlew rename to util/host-android-gradle/MoaiTemplate/gradlew diff --git a/host-templates/android/studio/MoaiTemplate/gradlew.bat b/util/host-android-gradle/MoaiTemplate/gradlew.bat similarity index 100% rename from host-templates/android/studio/MoaiTemplate/gradlew.bat rename to util/host-android-gradle/MoaiTemplate/gradlew.bat diff --git a/host-templates/android/studio/MoaiTemplate/local.properties.template b/util/host-android-gradle/MoaiTemplate/local.properties.template similarity index 100% rename from host-templates/android/studio/MoaiTemplate/local.properties.template rename to util/host-android-gradle/MoaiTemplate/local.properties.template diff --git a/host-templates/android/studio/MoaiTemplate/moaisettings.gradle b/util/host-android-gradle/MoaiTemplate/moaisettings.gradle similarity index 100% rename from host-templates/android/studio/MoaiTemplate/moaisettings.gradle rename to util/host-android-gradle/MoaiTemplate/moaisettings.gradle diff --git a/host-templates/android/studio/MoaiTemplate/run.bat b/util/host-android-gradle/MoaiTemplate/run.bat similarity index 100% rename from host-templates/android/studio/MoaiTemplate/run.bat rename to util/host-android-gradle/MoaiTemplate/run.bat diff --git a/host-templates/android/studio/MoaiTemplate/run.sh b/util/host-android-gradle/MoaiTemplate/run.sh similarity index 100% rename from host-templates/android/studio/MoaiTemplate/run.sh rename to util/host-android-gradle/MoaiTemplate/run.sh diff --git a/host-templates/android/studio/MoaiTemplate/settings.gradle b/util/host-android-gradle/MoaiTemplate/settings.gradle similarity index 100% rename from host-templates/android/studio/MoaiTemplate/settings.gradle rename to util/host-android-gradle/MoaiTemplate/settings.gradle diff --git a/host-templates/html/README.md b/util/host-html/html/README.md similarity index 100% rename from host-templates/html/README.md rename to util/host-html/html/README.md diff --git a/host-templates/html/build.bat b/util/host-html/html/build.bat similarity index 100% rename from host-templates/html/build.bat rename to util/host-html/html/build.bat diff --git a/host-templates/html/build.sh b/util/host-html/html/build.sh similarity index 100% rename from host-templates/html/build.sh rename to util/host-html/html/build.sh diff --git a/host-templates/html/buildrom.bat b/util/host-html/html/buildrom.bat similarity index 100% rename from host-templates/html/buildrom.bat rename to util/host-html/html/buildrom.bat diff --git a/host-templates/html/buildrom.sh b/util/host-html/html/buildrom.sh similarity index 100% rename from host-templates/html/buildrom.sh rename to util/host-html/html/buildrom.sh diff --git a/host-templates/html/file_packager.lua b/util/host-html/html/file_packager.lua similarity index 100% rename from host-templates/html/file_packager.lua rename to util/host-html/html/file_packager.lua diff --git a/host-templates/html/run.bat b/util/host-html/html/run.bat similarity index 100% rename from host-templates/html/run.bat rename to util/host-html/html/run.bat diff --git a/host-templates/html/run.sh b/util/host-html/html/run.sh similarity index 100% rename from host-templates/html/run.sh rename to util/host-html/html/run.sh diff --git a/host-templates/html/www/background.jpg b/util/host-html/html/www/background.jpg similarity index 100% rename from host-templates/html/www/background.jpg rename to util/host-html/html/www/background.jpg diff --git a/host-templates/html/www/css/style.css b/util/host-html/html/www/css/style.css similarity index 100% rename from host-templates/html/www/css/style.css rename to util/host-html/html/www/css/style.css diff --git a/host-templates/html/www/howler.js b/util/host-html/html/www/howler.js similarity index 100% rename from host-templates/html/www/howler.js rename to util/host-html/html/www/howler.js diff --git a/host-templates/html/www/index.html b/util/host-html/html/www/index.html similarity index 100% rename from host-templates/html/www/index.html rename to util/host-html/html/www/index.html diff --git a/host-templates/html/www/moai.html b/util/host-html/html/www/moai.html similarity index 100% rename from host-templates/html/www/moai.html rename to util/host-html/html/www/moai.html diff --git a/host-templates/html/www/moaihost.js b/util/host-html/html/www/moaihost.js similarity index 100% rename from host-templates/html/www/moaihost.js rename to util/host-html/html/www/moaihost.js diff --git a/host-templates/html/www/moailogo-white.svg b/util/host-html/html/www/moailogo-white.svg similarity index 100% rename from host-templates/html/www/moailogo-white.svg rename to util/host-html/html/www/moailogo-white.svg diff --git a/host-templates/html/www/vendor/font-awesome-4.0.3/css/font-awesome.css b/util/host-html/html/www/vendor/font-awesome-4.0.3/css/font-awesome.css similarity index 100% rename from host-templates/html/www/vendor/font-awesome-4.0.3/css/font-awesome.css rename to util/host-html/html/www/vendor/font-awesome-4.0.3/css/font-awesome.css diff --git a/host-templates/html/www/vendor/font-awesome-4.0.3/css/font-awesome.min.css b/util/host-html/html/www/vendor/font-awesome-4.0.3/css/font-awesome.min.css similarity index 100% rename from host-templates/html/www/vendor/font-awesome-4.0.3/css/font-awesome.min.css rename to util/host-html/html/www/vendor/font-awesome-4.0.3/css/font-awesome.min.css diff --git a/host-templates/html/www/vendor/font-awesome-4.0.3/fonts/FontAwesome.otf b/util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/FontAwesome.otf similarity index 100% rename from host-templates/html/www/vendor/font-awesome-4.0.3/fonts/FontAwesome.otf rename to util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/FontAwesome.otf diff --git a/host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.eot b/util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.eot similarity index 100% rename from host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.eot rename to util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.eot diff --git a/host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.svg b/util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.svg similarity index 100% rename from host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.svg rename to util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.svg diff --git a/host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.ttf b/util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.ttf similarity index 100% rename from host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.ttf rename to util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.ttf diff --git a/host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.woff b/util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.woff similarity index 100% rename from host-templates/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.woff rename to util/host-html/html/www/vendor/font-awesome-4.0.3/fonts/fontawesome-webfont.woff diff --git a/host-templates/html/www/vendor/jquery-1.10.2.js b/util/host-html/html/www/vendor/jquery-1.10.2.js similarity index 100% rename from host-templates/html/www/vendor/jquery-1.10.2.js rename to util/host-html/html/www/vendor/jquery-1.10.2.js diff --git a/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.pbxproj b/util/host-ios/Moai Template/Moai Template.xcodeproj/project.pbxproj similarity index 100% rename from host-templates/ios/Moai Template/Moai Template.xcodeproj/project.pbxproj rename to util/host-ios/Moai Template/Moai Template.xcodeproj/project.pbxproj diff --git a/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/util/host-ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from host-templates/ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to util/host-ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout b/util/host-ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout similarity index 100% rename from host-templates/ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout rename to util/host-ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout diff --git a/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/MoaiTemplate.xccheckout b/util/host-ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/MoaiTemplate.xccheckout similarity index 100% rename from host-templates/ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/MoaiTemplate.xccheckout rename to util/host-ios/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/MoaiTemplate.xccheckout diff --git a/host-templates/ios/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme b/util/host-ios/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme similarity index 100% rename from host-templates/ios/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme rename to util/host-ios/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme diff --git a/host-templates/ios/Moai Template/Readme.md b/util/host-ios/Moai Template/Readme.md similarity index 100% rename from host-templates/ios/Moai Template/Readme.md rename to util/host-ios/Moai Template/Readme.md diff --git a/host-templates/ios/Moai Template/build.sh b/util/host-ios/Moai Template/build.sh similarity index 100% rename from host-templates/ios/Moai Template/build.sh rename to util/host-ios/Moai Template/build.sh diff --git a/host-templates/ios/Moai Template/main.lua b/util/host-ios/Moai Template/main.lua similarity index 100% rename from host-templates/ios/Moai Template/main.lua rename to util/host-ios/Moai Template/main.lua diff --git a/host-templates/ios/Moai Template/res/Default-568h@2x.png b/util/host-ios/Moai Template/res/Default-568h@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Default-568h@2x.png rename to util/host-ios/Moai Template/res/Default-568h@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Contents.json b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Contents.json rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-120.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-120.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-120.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-120.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x-1.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/AppIcon.appiconset/Icon@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Contents.json b/util/host-ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Contents.json similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Contents.json rename to util/host-ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Contents.json diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png diff --git a/host-templates/ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default@2x.png b/util/host-ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default@2x.png similarity index 100% rename from host-templates/ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default@2x.png rename to util/host-ios/Moai Template/res/Images.xcassets/LaunchImage.launchimage/Default@2x.png diff --git a/host-templates/ios/Moai Template/res/Info.plist b/util/host-ios/Moai Template/res/Info.plist similarity index 100% rename from host-templates/ios/Moai Template/res/Info.plist rename to util/host-ios/Moai Template/res/Info.plist diff --git a/host-templates/ios/Moai Template/run.sh b/util/host-ios/Moai Template/run.sh similarity index 100% rename from host-templates/ios/Moai Template/run.sh rename to util/host-ios/Moai Template/run.sh diff --git a/host-templates/linux/Readme.md b/util/host-linux/linux/Readme.md similarity index 100% rename from host-templates/linux/Readme.md rename to util/host-linux/linux/Readme.md diff --git a/host-templates/linux/build.sh b/util/host-linux/linux/build.sh similarity index 100% rename from host-templates/linux/build.sh rename to util/host-linux/linux/build.sh diff --git a/host-templates/linux/cmake/CMakeLists.txt b/util/host-linux/linux/cmake/CMakeLists.txt similarity index 100% rename from host-templates/linux/cmake/CMakeLists.txt rename to util/host-linux/linux/cmake/CMakeLists.txt diff --git a/host-templates/linux/cmake/FindXCB.cmake b/util/host-linux/linux/cmake/FindXCB.cmake similarity index 100% rename from host-templates/linux/cmake/FindXCB.cmake rename to util/host-linux/linux/cmake/FindXCB.cmake diff --git a/host-templates/linux/cmake/host-modules/CMakeLists.txt b/util/host-linux/linux/cmake/host-modules/CMakeLists.txt similarity index 100% rename from host-templates/linux/cmake/host-modules/CMakeLists.txt rename to util/host-linux/linux/cmake/host-modules/CMakeLists.txt diff --git a/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.pbxproj b/util/host-osx-app/Moai Template/Moai Template.xcodeproj/project.pbxproj similarity index 100% rename from host-templates/osx/Moai Template/Moai Template.xcodeproj/project.pbxproj rename to util/host-osx-app/Moai Template/Moai Template.xcodeproj/project.pbxproj diff --git a/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/util/host-osx-app/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to util/host-osx-app/Moai Template/Moai Template.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout b/util/host-osx-app/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout similarity index 100% rename from host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout rename to util/host-osx-app/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout diff --git a/host-templates/osx/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme b/util/host-osx-app/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme similarity index 100% rename from host-templates/osx/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme rename to util/host-osx-app/Moai Template/Moai Template.xcodeproj/xcshareddata/xcschemes/Moai Template.xcscheme diff --git a/host-templates/osx/Moai Template/Readme.md b/util/host-osx-app/Moai Template/Readme.md similarity index 100% rename from host-templates/osx/Moai Template/Readme.md rename to util/host-osx-app/Moai Template/Readme.md diff --git a/host-templates/osx/Moai Template/app/Icon-120.png b/util/host-osx-app/Moai Template/app/Icon-120.png similarity index 100% rename from host-templates/osx/Moai Template/app/Icon-120.png rename to util/host-osx-app/Moai Template/app/Icon-120.png diff --git a/host-templates/osx/Moai Template/app/Moai Template-Info.plist b/util/host-osx-app/Moai Template/app/Moai Template-Info.plist similarity index 100% rename from host-templates/osx/Moai Template/app/Moai Template-Info.plist rename to util/host-osx-app/Moai Template/app/Moai Template-Info.plist diff --git a/host-templates/osx/Moai Template/app/en.lproj/Credits.rtf b/util/host-osx-app/Moai Template/app/en.lproj/Credits.rtf similarity index 100% rename from host-templates/osx/Moai Template/app/en.lproj/Credits.rtf rename to util/host-osx-app/Moai Template/app/en.lproj/Credits.rtf diff --git a/host-templates/osx/Moai Template/app/en.lproj/InfoPlist.strings b/util/host-osx-app/Moai Template/app/en.lproj/InfoPlist.strings similarity index 100% rename from host-templates/osx/Moai Template/app/en.lproj/InfoPlist.strings rename to util/host-osx-app/Moai Template/app/en.lproj/InfoPlist.strings diff --git a/host-templates/osx/Moai Template/bootstrap.lua b/util/host-osx-app/Moai Template/bootstrap.lua similarity index 100% rename from host-templates/osx/Moai Template/bootstrap.lua rename to util/host-osx-app/Moai Template/bootstrap.lua diff --git a/host-templates/osx/Moai Template/build.sh b/util/host-osx-app/Moai Template/build.sh similarity index 100% rename from host-templates/osx/Moai Template/build.sh rename to util/host-osx-app/Moai Template/build.sh diff --git a/host-templates/osx/Moai Template/run.sh b/util/host-osx-app/Moai Template/run.sh similarity index 100% rename from host-templates/osx/Moai Template/run.sh rename to util/host-osx-app/Moai Template/run.sh diff --git a/host-templates/windows/vs2012/Moai.sln b/util/host-windows-vs2012/vs2012/Moai.sln similarity index 100% rename from host-templates/windows/vs2012/Moai.sln rename to util/host-windows-vs2012/vs2012/Moai.sln diff --git a/host-templates/windows/vs2012/Moai.vcxproj b/util/host-windows-vs2012/vs2012/Moai.vcxproj similarity index 100% rename from host-templates/windows/vs2012/Moai.vcxproj rename to util/host-windows-vs2012/vs2012/Moai.vcxproj diff --git a/host-templates/windows/vs2012/Moai.vcxproj.filters b/util/host-windows-vs2012/vs2012/Moai.vcxproj.filters similarity index 100% rename from host-templates/windows/vs2012/Moai.vcxproj.filters rename to util/host-windows-vs2012/vs2012/Moai.vcxproj.filters diff --git a/host-templates/windows/vs2012/build.bat b/util/host-windows-vs2012/vs2012/build.bat similarity index 100% rename from host-templates/windows/vs2012/build.bat rename to util/host-windows-vs2012/vs2012/build.bat diff --git a/host-templates/windows/vs2013/Moai.rc b/util/host-windows-vs2013/vs2013/Moai.rc similarity index 100% rename from host-templates/windows/vs2013/Moai.rc rename to util/host-windows-vs2013/vs2013/Moai.rc diff --git a/host-templates/windows/vs2013/Moai.sln b/util/host-windows-vs2013/vs2013/Moai.sln similarity index 100% rename from host-templates/windows/vs2013/Moai.sln rename to util/host-windows-vs2013/vs2013/Moai.sln diff --git a/host-templates/windows/vs2013/Moai.vcxproj b/util/host-windows-vs2013/vs2013/Moai.vcxproj similarity index 100% rename from host-templates/windows/vs2013/Moai.vcxproj rename to util/host-windows-vs2013/vs2013/Moai.vcxproj diff --git a/host-templates/windows/vs2013/Moai.vcxproj.filters b/util/host-windows-vs2013/vs2013/Moai.vcxproj.filters similarity index 100% rename from host-templates/windows/vs2013/Moai.vcxproj.filters rename to util/host-windows-vs2013/vs2013/Moai.vcxproj.filters diff --git a/host-templates/windows/vs2013/Readme.md b/util/host-windows-vs2013/vs2013/Readme.md similarity index 100% rename from host-templates/windows/vs2013/Readme.md rename to util/host-windows-vs2013/vs2013/Readme.md diff --git a/host-templates/windows/vs2013/appicon.ico b/util/host-windows-vs2013/vs2013/appicon.ico similarity index 100% rename from host-templates/windows/vs2013/appicon.ico rename to util/host-windows-vs2013/vs2013/appicon.ico diff --git a/host-templates/windows/vs2013/build.bat b/util/host-windows-vs2013/vs2013/build.bat similarity index 100% rename from host-templates/windows/vs2013/build.bat rename to util/host-windows-vs2013/vs2013/build.bat diff --git a/host-templates/windows/vs2013/resource.h b/util/host-windows-vs2013/vs2013/resource.h similarity index 100% rename from host-templates/windows/vs2013/resource.h rename to util/host-windows-vs2013/vs2013/resource.h diff --git a/host-templates/windows/vs2013/run.bat b/util/host-windows-vs2013/vs2013/run.bat similarity index 100% rename from host-templates/windows/vs2013/run.bat rename to util/host-windows-vs2013/vs2013/run.bat diff --git a/util/host/help.txt b/util/host/help.txt new file mode 100644 index 0000000000..3991363efe --- /dev/null +++ b/util/host/help.txt @@ -0,0 +1,14 @@ +pito host + Subcommands: + host list - Lists available hosts + host init - Creates a template host config file used by subsequent commands + host build - Creates (if it doesn't exist) in hosts folder, and + (re)builds the host named . + host run - Creates (if it doesn't exists) in hosts folder, + (re)builds and runs the host named . + host create - Creates the host in the hosts folder (removing old + host) based on latest config settings. + Example: + cd newMOAIProject && pito host create ios && \ + pito host create android-studio && \ + pito host create host osx-app && #etc. \ No newline at end of file diff --git a/util/make-lua-docs/help.txt b/util/make-lua-docs/help.txt new file mode 100644 index 0000000000..d03abedd76 --- /dev/null +++ b/util/make-lua-docs/help.txt @@ -0,0 +1,2 @@ +pito make-lua-docs + Creates compact documentation for the Lua-side of the MOAI API. \ No newline at end of file diff --git a/util/package-cmake-sdk/bin/.gitignore b/util/package-cmake-sdk/bin/.gitignore new file mode 100644 index 0000000000..dc3da10431 --- /dev/null +++ b/util/package-cmake-sdk/bin/.gitignore @@ -0,0 +1,2 @@ +ios/ +osx/ diff --git a/bin/api-reference-parser/.bundle/config b/util/package-cmake-sdk/bin/api-reference-parser/.bundle/config similarity index 100% rename from bin/api-reference-parser/.bundle/config rename to util/package-cmake-sdk/bin/api-reference-parser/.bundle/config diff --git a/bin/api-reference-parser/Gemfile b/util/package-cmake-sdk/bin/api-reference-parser/Gemfile similarity index 100% rename from bin/api-reference-parser/Gemfile rename to util/package-cmake-sdk/bin/api-reference-parser/Gemfile diff --git a/bin/api-reference-parser/Gemfile.lock b/util/package-cmake-sdk/bin/api-reference-parser/Gemfile.lock similarity index 100% rename from bin/api-reference-parser/Gemfile.lock rename to util/package-cmake-sdk/bin/api-reference-parser/Gemfile.lock diff --git a/bin/api-reference-parser/intro_page.haml b/util/package-cmake-sdk/bin/api-reference-parser/intro_page.haml similarity index 100% rename from bin/api-reference-parser/intro_page.haml rename to util/package-cmake-sdk/bin/api-reference-parser/intro_page.haml diff --git a/bin/api-reference-parser/lib/moai_api_parser.rb b/util/package-cmake-sdk/bin/api-reference-parser/lib/moai_api_parser.rb similarity index 100% rename from bin/api-reference-parser/lib/moai_api_parser.rb rename to util/package-cmake-sdk/bin/api-reference-parser/lib/moai_api_parser.rb diff --git a/bin/api-reference-parser/lua-parsers/header-files.lua b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/header-files.lua similarity index 100% rename from bin/api-reference-parser/lua-parsers/header-files.lua rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/header-files.lua diff --git a/bin/api-reference-parser/lua-parsers/luadox/build.bat b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/build.bat similarity index 100% rename from bin/api-reference-parser/lua-parsers/luadox/build.bat rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/build.bat diff --git a/bin/api-reference-parser/lua-parsers/luadox/luadox.cgt b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/luadox.cgt similarity index 100% rename from bin/api-reference-parser/lua-parsers/luadox/luadox.cgt rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/luadox.cgt diff --git a/bin/api-reference-parser/lua-parsers/luadox/luadox.grm b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/luadox.grm similarity index 100% rename from bin/api-reference-parser/lua-parsers/luadox/luadox.grm rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/luadox.grm diff --git a/bin/api-reference-parser/lua-parsers/luadox/luadox.log b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/luadox.log similarity index 100% rename from bin/api-reference-parser/lua-parsers/luadox/luadox.log rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/luadox/luadox.log diff --git a/bin/api-reference-parser/lua-parsers/predox/build.bat b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/build.bat similarity index 100% rename from bin/api-reference-parser/lua-parsers/predox/build.bat rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/build.bat diff --git a/bin/api-reference-parser/lua-parsers/predox/predox.cgt b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/predox.cgt similarity index 100% rename from bin/api-reference-parser/lua-parsers/predox/predox.cgt rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/predox.cgt diff --git a/bin/api-reference-parser/lua-parsers/predox/predox.grm b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/predox.grm similarity index 100% rename from bin/api-reference-parser/lua-parsers/predox/predox.grm rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/predox.grm diff --git a/bin/api-reference-parser/lua-parsers/predox/predox.log b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/predox.log similarity index 100% rename from bin/api-reference-parser/lua-parsers/predox/predox.log rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/predox/predox.log diff --git a/bin/api-reference-parser/lua-parsers/source-files-cpp.lua b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/source-files-cpp.lua similarity index 100% rename from bin/api-reference-parser/lua-parsers/source-files-cpp.lua rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/source-files-cpp.lua diff --git a/bin/api-reference-parser/lua-parsers/source-files-mm.lua b/util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/source-files-mm.lua similarity index 100% rename from bin/api-reference-parser/lua-parsers/source-files-mm.lua rename to util/package-cmake-sdk/bin/api-reference-parser/lua-parsers/source-files-mm.lua diff --git a/bin/api-reference-parser/moai-api-doxygen.cfg b/util/package-cmake-sdk/bin/api-reference-parser/moai-api-doxygen.cfg similarity index 100% rename from bin/api-reference-parser/moai-api-doxygen.cfg rename to util/package-cmake-sdk/bin/api-reference-parser/moai-api-doxygen.cfg diff --git a/bin/api-reference-parser/parse.rb b/util/package-cmake-sdk/bin/api-reference-parser/parse.rb similarity index 100% rename from bin/api-reference-parser/parse.rb rename to util/package-cmake-sdk/bin/api-reference-parser/parse.rb diff --git a/bin/build-all-linux.sh b/util/package-cmake-sdk/bin/build-all-linux.sh similarity index 100% rename from bin/build-all-linux.sh rename to util/package-cmake-sdk/bin/build-all-linux.sh diff --git a/bin/build-all-osx.sh b/util/package-cmake-sdk/bin/build-all-osx.sh similarity index 100% rename from bin/build-all-osx.sh rename to util/package-cmake-sdk/bin/build-all-osx.sh diff --git a/bin/build-all-windows.bat b/util/package-cmake-sdk/bin/build-all-windows.bat similarity index 100% rename from bin/build-all-windows.bat rename to util/package-cmake-sdk/bin/build-all-windows.bat diff --git a/bin/build-android.bat b/util/package-cmake-sdk/bin/build-android.bat similarity index 100% rename from bin/build-android.bat rename to util/package-cmake-sdk/bin/build-android.bat diff --git a/bin/build-android.sh b/util/package-cmake-sdk/bin/build-android.sh similarity index 100% rename from bin/build-android.sh rename to util/package-cmake-sdk/bin/build-android.sh diff --git a/bin/build-chrome.sh b/util/package-cmake-sdk/bin/build-chrome.sh similarity index 100% rename from bin/build-chrome.sh rename to util/package-cmake-sdk/bin/build-chrome.sh diff --git a/bin/build-docs.sh b/util/package-cmake-sdk/bin/build-docs.sh similarity index 100% rename from bin/build-docs.sh rename to util/package-cmake-sdk/bin/build-docs.sh diff --git a/bin/build-html.bat b/util/package-cmake-sdk/bin/build-html.bat similarity index 100% rename from bin/build-html.bat rename to util/package-cmake-sdk/bin/build-html.bat diff --git a/bin/build-html.sh b/util/package-cmake-sdk/bin/build-html.sh similarity index 100% rename from bin/build-html.sh rename to util/package-cmake-sdk/bin/build-html.sh diff --git a/bin/build-ios.sh b/util/package-cmake-sdk/bin/build-ios.sh similarity index 100% rename from bin/build-ios.sh rename to util/package-cmake-sdk/bin/build-ios.sh diff --git a/bin/build-linux.sh b/util/package-cmake-sdk/bin/build-linux.sh similarity index 100% rename from bin/build-linux.sh rename to util/package-cmake-sdk/bin/build-linux.sh diff --git a/bin/build-osx.sh b/util/package-cmake-sdk/bin/build-osx.sh similarity index 100% rename from bin/build-osx.sh rename to util/package-cmake-sdk/bin/build-osx.sh diff --git a/bin/build-windows.bat b/util/package-cmake-sdk/bin/build-windows.bat similarity index 100% rename from bin/build-windows.bat rename to util/package-cmake-sdk/bin/build-windows.bat diff --git a/bin/ci-android.sh b/util/package-cmake-sdk/bin/ci-android.sh similarity index 100% rename from bin/ci-android.sh rename to util/package-cmake-sdk/bin/ci-android.sh diff --git a/bin/ci-linux.sh b/util/package-cmake-sdk/bin/ci-linux.sh similarity index 100% rename from bin/ci-linux.sh rename to util/package-cmake-sdk/bin/ci-linux.sh diff --git a/bin/ci-osx.sh b/util/package-cmake-sdk/bin/ci-osx.sh similarity index 100% rename from bin/ci-osx.sh rename to util/package-cmake-sdk/bin/ci-osx.sh diff --git a/bin/ci-windows.bat b/util/package-cmake-sdk/bin/ci-windows.bat similarity index 100% rename from bin/ci-windows.bat rename to util/package-cmake-sdk/bin/ci-windows.bat diff --git a/bin/create-host-ios.sh b/util/package-cmake-sdk/bin/create-host-ios.sh similarity index 100% rename from bin/create-host-ios.sh rename to util/package-cmake-sdk/bin/create-host-ios.sh diff --git a/bin/create-host-osx.sh b/util/package-cmake-sdk/bin/create-host-osx.sh similarity index 100% rename from bin/create-host-osx.sh rename to util/package-cmake-sdk/bin/create-host-osx.sh diff --git a/bin/create-projects-osx.sh b/util/package-cmake-sdk/bin/create-projects-osx.sh similarity index 100% rename from bin/create-projects-osx.sh rename to util/package-cmake-sdk/bin/create-projects-osx.sh diff --git a/bin/create-projects-win.bat b/util/package-cmake-sdk/bin/create-projects-win.bat similarity index 100% rename from bin/create-projects-win.bat rename to util/package-cmake-sdk/bin/create-projects-win.bat diff --git a/bin/env-linux.sh b/util/package-cmake-sdk/bin/env-linux.sh similarity index 100% rename from bin/env-linux.sh rename to util/package-cmake-sdk/bin/env-linux.sh diff --git a/bin/env-local.bat.template b/util/package-cmake-sdk/bin/env-local.bat.template similarity index 100% rename from bin/env-local.bat.template rename to util/package-cmake-sdk/bin/env-local.bat.template diff --git a/bin/env-osx.sh b/util/package-cmake-sdk/bin/env-osx.sh similarity index 100% rename from bin/env-osx.sh rename to util/package-cmake-sdk/bin/env-osx.sh diff --git a/bin/env-win.bat b/util/package-cmake-sdk/bin/env-win.bat similarity index 100% rename from bin/env-win.bat rename to util/package-cmake-sdk/bin/env-win.bat diff --git a/bin/replace-run-scripts.sh b/util/package-cmake-sdk/bin/replace-run-scripts.sh similarity index 100% rename from bin/replace-run-scripts.sh rename to util/package-cmake-sdk/bin/replace-run-scripts.sh diff --git a/samples/anim-basic/run.bat b/util/package-cmake-sdk/bin/run-scripts/run.bat similarity index 100% rename from samples/anim-basic/run.bat rename to util/package-cmake-sdk/bin/run-scripts/run.bat diff --git a/samples/anim-basic/run.sh b/util/package-cmake-sdk/bin/run-scripts/run.sh similarity index 100% rename from samples/anim-basic/run.sh rename to util/package-cmake-sdk/bin/run-scripts/run.sh diff --git a/util/package-cmake-sdk/help.txt b/util/package-cmake-sdk/help.txt new file mode 100644 index 0000000000..ce6dc580fe --- /dev/null +++ b/util/package-cmake-sdk/help.txt @@ -0,0 +1,5 @@ +pito package-cmake-sdk + Creates a distributable SDK based on cmake-driven MOAI build. + Example: + cd newMOAIProject && pito package-cmake-sdk + find moai-sdk/ #&etc. \ No newline at end of file diff --git a/util/package-sdk/help.txt b/util/package-sdk/help.txt new file mode 100644 index 0000000000..e26bddea33 --- /dev/null +++ b/util/package-sdk/help.txt @@ -0,0 +1,2 @@ +pito package-sdk + Create the standard release of the MOAI SDK. \ No newline at end of file diff --git a/util/package-sdk/prepare-sdk-osx.sh b/util/package-sdk/prepare-sdk-osx.sh index 72e9019023..f79f8e33ae 100755 --- a/util/package-sdk/prepare-sdk-osx.sh +++ b/util/package-sdk/prepare-sdk-osx.sh @@ -12,7 +12,7 @@ echo $MOAI_SDK_ROOT #./libmoai-build.sh cd $MOAI_SDK_ROOT/util/build -./build-ios.sh -./build-osx.sh +./build-ios.sh || exit 1 +./build-osx.sh || exit 1 popd > /dev/null diff --git a/util/pito b/util/pito index 3758823521..bd4b4be580 100755 --- a/util/pito +++ b/util/pito @@ -62,16 +62,6 @@ then fi fi -case ${1} in - wut*) - echo " MOAI SDK location: $MOAI_SDK_HOME" - echo " MOAI binary location: $MOAI_SDK_BIN" - echo -n " pito toolbelt location: " && which pito - echo - exit 0 - ;; -esac - # call pito.lua shift set $INVOKE_DIR $MOAI_SDK_HOME $MOAI_CMD $@ diff --git a/util/pito.lua b/util/pito.lua index f3231db4d3..31a4a56772 100644 --- a/util/pito.lua +++ b/util/pito.lua @@ -7,107 +7,40 @@ require ( 'http' ) INVOKE_DIR = MOAIFileSystem.getAbsoluteDirectoryPath ( arg [ 1 ]) MOAI_SDK_HOME = MOAIFileSystem.getAbsoluteDirectoryPath ( arg [ 2 ]) -MOAI_CMD = arg [ 3 ] -SCRIPT_DIR = string.format ( '%sutil/%s/', MOAI_SDK_HOME, MOAI_CMD or "help" ) -local usageText={} -usageText["wut"] = [[ - pito wut - Contemplate your pito. -]] +local HELP = { + [ 'help' ] = true, + [ '?' ] = true, + [ '-?' ] = true, + [ '--?' ] = true, +} -usageText["environment"] = [[ - pito environment - This command will give you the needed environment variables to use pito. - Example: - /absolute/path/to/moai_sdk/util/pito environment - (Follow instructions) -]] - -usageText["init"] = [[ - pito init - Run from your project folder to initialize a pito-managed set of host projects. - Creates a hostconfig.lua file, which you must edit to describe your MOAI project. - Example: - mkdir newMOAIProject && cd newMOAIProject # use the toolbelt in a new project - pito init - vi hostconfig.lua #&etc. -]] - -usageText["host"] = [[ - pito host - Subcommands: - host list - Lists available hosts - host init - Creates a template host config file used by subsequent commands - host build - Creates (if it doesn't exist) in hosts folder, and - (re)builds the host named . - host run - Creates (if it doesn't exists) in hosts folder, - (re)builds and runs the host named . - host create - Creates the host in the hosts folder (removing old - host) based on latest config settings. - Example: - cd newMOAIProject && pito host create ios && \ - pito host create android-studio && \ - pito host create host osx-app && #etc. -]] - -usageText["make-lua-docs"] = [[ - pito make-lua-docs - Creates compact documentation for the Lua-side of the MOAI API. -]] - -usageText["make-cpp-docs"] = [[ - pito make-cpp-docs - Creates compact documentation from the MOAI C/C++ codebase. - Example: - cd newMOAIProject && pito make-cpp-docs - find moai-sdk/ #&etc. -]] - -usageText["package-cmake-sdk"] = [[ - pito package-cmake-sdk - Creates a distributable SDK based on cmake-driven MOAI build. - Example: - cd newMOAIProject && pito package-cmake-sdk - find moai-sdk/ #&etc. -]] +---------------------------------------------------------------- +local isCommand = function ( param ) + return param and MOAIFileSystem.checkFileExists ( string.format ( '%sutil/%s/main.lua', MOAI_SDK_HOME, param )) +end -usageText["package-sdk"] = [[ - pito package-sdk - Create the standard release of the MOAI SDK. -]] +local param1 = arg [ 3 ] or '' +local param2 = arg [ 4 ] or '' -usageText["run-samples"] = [[ - pito run-samples - Run the MOAI samples. -]] +if not arg [ 3 ] or HELP [ arg [ 3 ]] then -usageText["run-tests"] = [[ - pito run-tests - Run the Test suite. -]] + arg [ 3 ] = 'help' +end -usageText["sdk-version"] = [[ - pito sdk-version - Obtain the MOAI SDK Version info for the current configuration. -]] +if isCommand ( arg [ 3 ]) then -function usage(subSection) - print ("pito - the MOAI toolbelt - ", subSection or "general usage:") - if (subSection) and (usageText[subSection]) then - print(usageText[subSection]) - else - for i,v in pairs(usageText) do - print(v) - end + if arg [ 4 ] and HELP [ arg [ 4 ]] then + arg [ 4 ] = arg [ 3 ] + arg [ 3 ] = 'help' end -end -MOAIFileSystem.setWorkingDirectory ( SCRIPT_DIR ) + MOAI_CMD = arg [ 3 ] + SCRIPT_DIR = string.format ( '%sutil/%s/', MOAI_SDK_HOME, MOAI_CMD ) -if MOAIFileSystem.checkFileExists('main.lua') then - dofile ( 'main.lua' ) + MOAIFileSystem.setWorkingDirectory ( SCRIPT_DIR ) + dofile ( 'main.lua' ) else - usage() -end + print ( 'could not find command:', arg [ 3 ]) +end diff --git a/util/run-sample/help.txt b/util/run-sample/help.txt new file mode 100644 index 0000000000..de2b396cce --- /dev/null +++ b/util/run-sample/help.txt @@ -0,0 +1,2 @@ +pito run-sample + Runs a MOAI sample. \ No newline at end of file diff --git a/util/run-sample/main.lua b/util/run-sample/main.lua index 4e74cbea15..e9f8176e86 100644 --- a/util/run-sample/main.lua +++ b/util/run-sample/main.lua @@ -11,7 +11,7 @@ local SAMPLES_DIRECTORY = MOAI_SDK_HOME .. '/samples/' local gCount = MOAIFileSystem.checkFileExists ( STATE_FILENAME ) and dofile ( STATE_FILENAME ).count or 1 local gMarked = MOAIFileSystem.checkFileExists ( MARKED_FILENAME ) and dofile ( MARKED_FILENAME ) or {} -local gDirectories = MOAIFileSystem.listDirectories ( SAMPLES_DIRECTORY ); +local gDirectories = MOAIFileSystem.listDirectories ( SAMPLES_DIRECTORY ) local PREV = -1 local NONE = 0 diff --git a/util/run-tests/help.txt b/util/run-tests/help.txt new file mode 100644 index 0000000000..1cccfac28f --- /dev/null +++ b/util/run-tests/help.txt @@ -0,0 +1,2 @@ +pito run-tests + Run the Test suite. \ No newline at end of file diff --git a/util/sdk-version/help.txt b/util/sdk-version/help.txt new file mode 100644 index 0000000000..2eb9c03ddc --- /dev/null +++ b/util/sdk-version/help.txt @@ -0,0 +1,2 @@ +pito sdk-version + Obtain the MOAI SDK Version info for the current configuration. \ No newline at end of file diff --git a/util/wut/help.txt b/util/wut/help.txt new file mode 100644 index 0000000000..7d9afa247a --- /dev/null +++ b/util/wut/help.txt @@ -0,0 +1,2 @@ +pito wut + Contemplate your pito. diff --git a/util/wut/main.lua b/util/wut/main.lua new file mode 100644 index 0000000000..e5d38d30d0 --- /dev/null +++ b/util/wut/main.lua @@ -0,0 +1,3 @@ +require ( 'util' ) + +util.moaiexec ( './wut.sh' ) \ No newline at end of file diff --git a/util/wut/wut.sh b/util/wut/wut.sh new file mode 100755 index 0000000000..cebb72ec95 --- /dev/null +++ b/util/wut/wut.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo " MOAI SDK location: $MOAI_SDK_HOME" +echo " MOAI binary location: $MOAI_SDK_BIN" +echo -n " pito toolbelt location: " && which pito +echo diff --git a/version.txt b/version.txt deleted file mode 100644 index dcc93307ce..0000000000 --- a/version.txt +++ /dev/null @@ -1,5 +0,0 @@ -Moai SDK -Version 1.5 -Revision 1 - ---file is generated automatically; do not edit-- diff --git a/vs2008/.gitignore b/vs2008/.gitignore deleted file mode 100644 index adf2e14e86..0000000000 --- a/vs2008/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -bin/ -Win32/ -x64/ -Debug*/ -Release*/ -CodeAnalyst/ -*.user -*.ncb -*.suo -*.cache \ No newline at end of file diff --git a/vs2008/README.txt b/vs2008/README.txt deleted file mode 100644 index 481d57e56d..0000000000 --- a/vs2008/README.txt +++ /dev/null @@ -1,17 +0,0 @@ ----------------------------------------------------------------------------------------------------------------------------- -To build moaiext-untz: - -Visual Studio 2008 -1) Install the latest Direct X SDK -2) Click on the menu command Tools->Options->Projects and Solutions->VC++ Directories -3) Edit the value of Include files to include C:\Program Files\Microsoft DirectX SDK (June 2010)\Include -4) Edit the value of Library files to include C:\Program Files\Microsoft DirectX SDK (June 2010)\Lib\x86 - ----------------------------------------------------------------------------------------------------------------------------- -To build moaiext-fmod: - -Visual Studio 2008 -1) Install the latest Direct X SDK -2) Click on the menu command Tools->Options->Projects and Solutions->VC++ Directories -3) Edit the value of Include files to include C:\Program Files\FMOD SoundSystem\FMOD Programmers API Win32\api\inc -4) Edit the value of Library files to include C:\Program Files\FMOD SoundSystem\FMOD Programmers API Win32\api\lib \ No newline at end of file diff --git a/vs2008/box2d/box2d.vcproj b/vs2008/box2d/box2d.vcproj deleted file mode 100644 index cf2e3ac8fe..0000000000 --- a/vs2008/box2d/box2d.vcproj +++ /dev/null @@ -1,1237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/buildvm/buildvm-post.bat b/vs2008/buildvm/buildvm-post.bat deleted file mode 100644 index 0ccf14e4dc..0000000000 --- a/vs2008/buildvm/buildvm-post.bat +++ /dev/null @@ -1,15 +0,0 @@ -set buildvm=%1 -set outdir=%2 - -if not exist %outdir% mkdir -p %outdir% - -set src=..\..\3rdparty\luajit-2.0.1\src -set sources=%src%\lib_base.c %src%\lib_math.c %src%\lib_bit.c %src%\lib_string.c %src%\lib_table.c %src%\lib_io.c %src%\lib_os.c %src%\lib_package.c %src%\lib_debug.c %src%\lib_jit.c %src%\lib_ffi.c - -%buildvm% -m peobj -o %outdir%\lj_vm.obj %sources% -%buildvm% -m bcdef -o %outdir%\lj_bcdef.h %sources% -%buildvm% -m ffdef -o %outdir%\lj_ffdef.h %sources% -%buildvm% -m libdef -o %outdir%\lj_libdef.h %sources% -%buildvm% -m recdef -o %outdir%\lj_recdef.h %sources% -%buildvm% -m vmdef -o %outdir%\vmdef.lua %sources% -%buildvm% -m folddef -o %outdir%\lj_folddef.h %src%\lj_opt_fold.c diff --git a/vs2008/buildvm/buildvm.vcproj b/vs2008/buildvm/buildvm.vcproj deleted file mode 100644 index 7c3ad4e8ee..0000000000 --- a/vs2008/buildvm/buildvm.vcproj +++ /dev/null @@ -1,1022 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/chipmunk/chipmunk.vcproj b/vs2008/chipmunk/chipmunk.vcproj deleted file mode 100644 index f39ac3e028..0000000000 --- a/vs2008/chipmunk/chipmunk.vcproj +++ /dev/null @@ -1,1081 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/contrib/contrib.vcproj b/vs2008/contrib/contrib.vcproj deleted file mode 100644 index 4e16d0efc5..0000000000 --- a/vs2008/contrib/contrib.vcproj +++ /dev/null @@ -1,855 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/expat/expat.vcproj b/vs2008/expat/expat.vcproj deleted file mode 100644 index f239917cfe..0000000000 --- a/vs2008/expat/expat.vcproj +++ /dev/null @@ -1,929 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/freetype/freetype.vcproj b/vs2008/freetype/freetype.vcproj deleted file mode 100644 index 53445afa6b..0000000000 --- a/vs2008/freetype/freetype.vcproj +++ /dev/null @@ -1,4483 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/glew/glew.vcproj b/vs2008/glew/glew.vcproj deleted file mode 100644 index 1a6957f3a8..0000000000 --- a/vs2008/glew/glew.vcproj +++ /dev/null @@ -1,847 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/glewinfo/glewinfo.vcproj b/vs2008/glewinfo/glewinfo.vcproj deleted file mode 100644 index 6af35a7511..0000000000 --- a/vs2008/glewinfo/glewinfo.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/hexdump/hexdump.vcproj b/vs2008/hexdump/hexdump.vcproj deleted file mode 100644 index 54f40940a4..0000000000 --- a/vs2008/hexdump/hexdump.vcproj +++ /dev/null @@ -1,1041 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/jansson/jansson.vcproj b/vs2008/jansson/jansson.vcproj deleted file mode 100644 index f24bbed50f..0000000000 --- a/vs2008/jansson/jansson.vcproj +++ /dev/null @@ -1,1178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libcares/libcares.vcproj b/vs2008/libcares/libcares.vcproj deleted file mode 100644 index 6cfe5b1bce..0000000000 --- a/vs2008/libcares/libcares.vcproj +++ /dev/null @@ -1,1307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libcrypto/libcrypto.vcproj b/vs2008/libcrypto/libcrypto.vcproj deleted file mode 100644 index f0bd53f570..0000000000 --- a/vs2008/libcrypto/libcrypto.vcproj +++ /dev/null @@ -1,3386 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libcurl/libcurl.vcproj b/vs2008/libcurl/libcurl.vcproj deleted file mode 100644 index 2d24c343b2..0000000000 --- a/vs2008/libcurl/libcurl.vcproj +++ /dev/null @@ -1,1588 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libjpg/libjpg.vcproj b/vs2008/libjpg/libjpg.vcproj deleted file mode 100644 index 7635101afa..0000000000 --- a/vs2008/libjpg/libjpg.vcproj +++ /dev/null @@ -1,1073 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libogg/libogg.vcproj b/vs2008/libogg/libogg.vcproj deleted file mode 100644 index 9a444677cb..0000000000 --- a/vs2008/libogg/libogg.vcproj +++ /dev/null @@ -1,873 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libpng/libpng.vcproj b/vs2008/libpng/libpng.vcproj deleted file mode 100644 index 88b18b9d85..0000000000 --- a/vs2008/libpng/libpng.vcproj +++ /dev/null @@ -1,933 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libraries.txt b/vs2008/libraries.txt deleted file mode 100644 index 238968959c..0000000000 --- a/vs2008/libraries.txt +++ /dev/null @@ -1,114 +0,0 @@ - --- lua 5.1 - -lua-lib-5.1.lib -moai-lib-luaext.lib - --- lua 5.2 - -lua-lib-5.2.lib - --- luajit - -luajit-lib.lib -moai-lib-luaext.lib - --- FMOD - -fmodexL_vc.lib -fmod_event_netL.lib -moai-lib-fmod-designer.lib - --- common - -box2d.lib -contrib.lib -chipmunk.lib -expat.lib -freetype.lib -glew.lib -jansson.lib -libcrypto.lib -libcurl.lib -libjpg.lib -libogg.lib -libpng.lib -libssl.lib -libtess.lib -libvorbis.lib -luaext.lib -moai-lib-box2d.lib -moai-lib-chipmunk.lib -moai-lib-core.lib -moai-lib-crypto.lib -moai-lib-harness.lib -moai-lib-http-client.lib -moai-lib-http-server.lib -moai-lib-sim.lib -moai-lib-untz.lib -moai-lib-util.lib -mongoose.lib -sdl.lib -sfmt.lib -sqlite.lib -tinyxml.lib -tlsf.lib -untz.lib -zlib.lib -zl-lib-crypto.lib -zl-lib-gfx.lib -zl-lib-util.lib -zl-lib-vfs.lib -dsound.lib -strmiids.lib -advapi32.lib -comctl32.lib -oleaut32.lib -opengl32.lib -rpcrt4.lib -winmm.lib -wldap32.lib -ws2_32.lib -wsock32.lib -iphlpapi.lib -psapi.lib -imm32.lib -version.lib - --- server - -contrib.lib -expat.lib -jansson.lib -libcrypto.lib -libcurl.lib -libssl.lib -luaext.lib -moai-lib-core.lib -moai-lib-crypto.lib -moai-lib-http-client.lib -moai-lib-http-server.lib -moai-lib-util.lib -mongoose.lib -sfmt.lib -sqlite.lib -tinyxml.lib -tlsf.lib -zlib.lib -zl-lib-crypto.lib -zl-lib-util.lib -zl-lib-vfs.lib -strmiids.lib -advapi32.lib -comctl32.lib -oleaut32.lib -opengl32.lib -rpcrt4.lib -winmm.lib -wldap32.lib -ws2_32.lib -wsock32.lib -iphlpapi.lib -psapi.lib -imm32.lib -version.lib \ No newline at end of file diff --git a/vs2008/libssl/libssl.vcproj b/vs2008/libssl/libssl.vcproj deleted file mode 100644 index d4d0e50158..0000000000 --- a/vs2008/libssl/libssl.vcproj +++ /dev/null @@ -1,1067 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libtess/libtess.vcproj b/vs2008/libtess/libtess.vcproj deleted file mode 100644 index d6c499b5b9..0000000000 --- a/vs2008/libtess/libtess.vcproj +++ /dev/null @@ -1,899 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/libvorbis/libvorbis.vcproj b/vs2008/libvorbis/libvorbis.vcproj deleted file mode 100644 index eb3b1b0091..0000000000 --- a/vs2008/libvorbis/libvorbis.vcproj +++ /dev/null @@ -1,1141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/lua-5.1/lua-5.1.vcproj b/vs2008/lua-5.1/lua-5.1.vcproj deleted file mode 100644 index 9e0dd272df..0000000000 --- a/vs2008/lua-5.1/lua-5.1.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/lua-5.2/lua-5.2.vcproj b/vs2008/lua-5.2/lua-5.2.vcproj deleted file mode 100644 index b606c05b59..0000000000 --- a/vs2008/lua-5.2/lua-5.2.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/lua-dll/lua-5.1.3.def b/vs2008/lua-dll/lua-5.1.3.def deleted file mode 100644 index 1fc50258b3..0000000000 --- a/vs2008/lua-dll/lua-5.1.3.def +++ /dev/null @@ -1,130 +0,0 @@ -EXPORTS - lua_tolstring - lua_typename - lua_pushfstring - lua_pushvfstring - lua_getlocal - lua_getupvalue - lua_setlocal - lua_setupvalue - lua_topointer - lua_iscfunction - lua_isnumber - lua_isstring - lua_isuserdata - lua_toboolean - lua_type - lua_equal - lua_lessthan - lua_rawequal - lua_checkstack - lua_cpcall - lua_error - lua_getmetatable - lua_gettop - lua_load - lua_next - lua_pcall - lua_pushthread - lua_setfenv - lua_setmetatable - lua_resume - lua_status - lua_yield - lua_dump - lua_gc - lua_gethook - lua_gethookcount - lua_gethookmask - lua_getinfo - lua_getstack - lua_sethook - lua_getallocf - lua_tocfunction - lua_atpanic - lua_tointeger - lua_tonumber - lua_tothread - lua_newstate - lua_newthread - lua_objlen - lua_touserdata - lua_close - lua_call - lua_concat - lua_createtable - lua_getfenv - lua_getfield - lua_gettable - lua_insert - lua_pushboolean - lua_pushcclosure - lua_pushinteger - lua_pushlightuserdata - lua_pushlstring - lua_pushnil - lua_pushnumber - lua_pushstring - lua_pushvalue - lua_rawget - lua_rawgeti - lua_rawset - lua_rawseti - lua_remove - lua_replace - lua_setfield - lua_settable - lua_settop - lua_xmove - lua_newuserdata - lua_setallocf - luaL_prepbuffer - luaL_checklstring - luaL_findtable - luaL_gsub - luaL_optlstring - luaL_newmetatable - luaL_argerror - luaL_callmeta - luaL_checkoption - luaL_error - luaL_getmetafield - luaL_loadbuffer - luaL_loadfile - luaL_loadstring - luaL_ref - luaL_typerror - luaL_checkinteger - luaL_optinteger - luaL_checknumber - luaL_optnumber - luaL_newstate - luaL_openlib - luaL_addlstring - luaL_addstring - luaL_addvalue - luaL_buffinit - luaL_checkany - luaL_checkstack - luaL_checktype - luaL_pushresult - luaL_register - luaL_unref - luaL_where - luaL_checkudata - luaopen_base - luaopen_debug - luaopen_io - luaopen_math - luaopen_os - luaopen_package - luaopen_string - luaopen_table - luaL_openlibs - luaU_dump - luaM_toobig - luaM_realloc_ - luaS_newlstr - luaD_growstack - luaF_newproto - \ No newline at end of file diff --git a/vs2008/lua-dll/lua-dll.vcproj b/vs2008/lua-dll/lua-dll.vcproj deleted file mode 100644 index 4d2f07a894..0000000000 --- a/vs2008/lua-dll/lua-dll.vcproj +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/lua-lib-5.1/lua-lib-5.1.vcproj b/vs2008/lua-lib-5.1/lua-lib-5.1.vcproj deleted file mode 100644 index af22ad3628..0000000000 --- a/vs2008/lua-lib-5.1/lua-lib-5.1.vcproj +++ /dev/null @@ -1,1063 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/lua-lib-5.2/lua-lib-5.2.vcproj b/vs2008/lua-lib-5.2/lua-lib-5.2.vcproj deleted file mode 100644 index f0fc3b6bb9..0000000000 --- a/vs2008/lua-lib-5.2/lua-lib-5.2.vcproj +++ /dev/null @@ -1,1079 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/luac-5.1/luac-5.1.vcproj b/vs2008/luac-5.1/luac-5.1.vcproj deleted file mode 100644 index 7f12156e1f..0000000000 --- a/vs2008/luac-5.1/luac-5.1.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/luac-5.2/luac-5.2.vcproj b/vs2008/luac-5.2/luac-5.2.vcproj deleted file mode 100644 index 00f00fca1d..0000000000 --- a/vs2008/luac-5.2/luac-5.2.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/luaext/luaext.vcproj b/vs2008/luaext/luaext.vcproj deleted file mode 100644 index dee9277eac..0000000000 --- a/vs2008/luaext/luaext.vcproj +++ /dev/null @@ -1,1214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/luajit-lib/luajit-lib.vcproj b/vs2008/luajit-lib/luajit-lib.vcproj deleted file mode 100644 index 4895fc081b..0000000000 --- a/vs2008/luajit-lib/luajit-lib.vcproj +++ /dev/null @@ -1,1119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/luajit/luajit.vcproj b/vs2008/luajit/luajit.vcproj deleted file mode 100644 index c81e172914..0000000000 --- a/vs2008/luajit/luajit.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/minilua/minilua-post.bat b/vs2008/minilua/minilua-post.bat deleted file mode 100644 index e108ede8e8..0000000000 --- a/vs2008/minilua/minilua-post.bat +++ /dev/null @@ -1,6 +0,0 @@ -set minilua=%1 -set outdir=%2 -set luajit=..\..\3rdparty\luajit-2.0.1 - -if not exist %outdir% mkdir -p %outdir% -%minilua% %luajit%\dynasm\dynasm.lua -LN -D WIN -D JIT -D FFI -o %outdir%\buildvm_arch.h %luajit%\src\vm_x86.dasc diff --git a/vs2008/minilua/minilua.vcproj b/vs2008/minilua/minilua.vcproj deleted file mode 100644 index a12feb8fd2..0000000000 --- a/vs2008/minilua/minilua.vcproj +++ /dev/null @@ -1,1002 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-exe-fmod/moai-fmod.vcproj b/vs2008/moai-exe-fmod/moai-fmod.vcproj deleted file mode 100644 index 5f4eba26ac..0000000000 --- a/vs2008/moai-exe-fmod/moai-fmod.vcproj +++ /dev/null @@ -1,1083 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-exe-server/moai-server.vcproj b/vs2008/moai-exe-server/moai-server.vcproj deleted file mode 100644 index b4fcfe62a8..0000000000 --- a/vs2008/moai-exe-server/moai-server.vcproj +++ /dev/null @@ -1,1082 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-exe-test/moai-test.vcproj b/vs2008/moai-exe-test/moai-test.vcproj deleted file mode 100644 index fd935e4bff..0000000000 --- a/vs2008/moai-exe-test/moai-test.vcproj +++ /dev/null @@ -1,1086 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-exe/moai.vcproj b/vs2008/moai-exe/moai.vcproj deleted file mode 100644 index f455397537..0000000000 --- a/vs2008/moai-exe/moai.vcproj +++ /dev/null @@ -1,1077 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-box2d/moai-lib-box2d.vcproj b/vs2008/moai-lib-box2d/moai-lib-box2d.vcproj deleted file mode 100644 index 57f3608a26..0000000000 --- a/vs2008/moai-lib-box2d/moai-lib-box2d.vcproj +++ /dev/null @@ -1,1143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-chipmunk/moai-lib-chipmunk.vcproj b/vs2008/moai-lib-chipmunk/moai-lib-chipmunk.vcproj deleted file mode 100644 index dcaa99935b..0000000000 --- a/vs2008/moai-lib-chipmunk/moai-lib-chipmunk.vcproj +++ /dev/null @@ -1,1071 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-core/moai-lib-core.vcproj b/vs2008/moai-lib-core/moai-lib-core.vcproj deleted file mode 100644 index 6de413cb4c..0000000000 --- a/vs2008/moai-lib-core/moai-lib-core.vcproj +++ /dev/null @@ -1,1184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-crypto/moai-lib-crypto.vcproj b/vs2008/moai-lib-crypto/moai-lib-crypto.vcproj deleted file mode 100644 index 116022d98a..0000000000 --- a/vs2008/moai-lib-crypto/moai-lib-crypto.vcproj +++ /dev/null @@ -1,976 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-fmod-designer/moai-lib-fmod-designer.vcproj b/vs2008/moai-lib-fmod-designer/moai-lib-fmod-designer.vcproj deleted file mode 100644 index 5a6806c61c..0000000000 --- a/vs2008/moai-lib-fmod-designer/moai-lib-fmod-designer.vcproj +++ /dev/null @@ -1,1034 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-fmod-ex/moai-lib-fmod-ex.vcproj b/vs2008/moai-lib-fmod-ex/moai-lib-fmod-ex.vcproj deleted file mode 100644 index a01cba6351..0000000000 --- a/vs2008/moai-lib-fmod-ex/moai-lib-fmod-ex.vcproj +++ /dev/null @@ -1,922 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-harness/moai-lib-harness.vcproj b/vs2008/moai-lib-harness/moai-lib-harness.vcproj deleted file mode 100644 index 50c6daa0b2..0000000000 --- a/vs2008/moai-lib-harness/moai-lib-harness.vcproj +++ /dev/null @@ -1,900 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-http-client/moai-lib-http-client.vcproj b/vs2008/moai-lib-http-client/moai-lib-http-client.vcproj deleted file mode 100644 index fca3f1044a..0000000000 --- a/vs2008/moai-lib-http-client/moai-lib-http-client.vcproj +++ /dev/null @@ -1,1052 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-http-server/moai-lib-http-server.vcproj b/vs2008/moai-lib-http-server/moai-lib-http-server.vcproj deleted file mode 100644 index f59adc5cb6..0000000000 --- a/vs2008/moai-lib-http-server/moai-lib-http-server.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-luaext/moai-lib-luaext.vcproj b/vs2008/moai-lib-luaext/moai-lib-luaext.vcproj deleted file mode 100644 index 6faabc9f46..0000000000 --- a/vs2008/moai-lib-luaext/moai-lib-luaext.vcproj +++ /dev/null @@ -1,898 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-sim/moai-engine.vcproj b/vs2008/moai-lib-sim/moai-engine.vcproj deleted file mode 100644 index e0c9854018..0000000000 --- a/vs2008/moai-lib-sim/moai-engine.vcproj +++ /dev/null @@ -1,2348 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-test/moai-lib-test.vcproj b/vs2008/moai-lib-test/moai-lib-test.vcproj deleted file mode 100644 index 8ce731453a..0000000000 --- a/vs2008/moai-lib-test/moai-lib-test.vcproj +++ /dev/null @@ -1,930 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-untz/moai-lib-untz.vcproj b/vs2008/moai-lib-untz/moai-lib-untz.vcproj deleted file mode 100644 index 88198c5c89..0000000000 --- a/vs2008/moai-lib-untz/moai-lib-untz.vcproj +++ /dev/null @@ -1,922 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai-lib-util/moai-lib-util.vcproj b/vs2008/moai-lib-util/moai-lib-util.vcproj deleted file mode 100644 index a11e5623fc..0000000000 --- a/vs2008/moai-lib-util/moai-lib-util.vcproj +++ /dev/null @@ -1,1212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/moai.sln b/vs2008/moai.sln deleted file mode 100644 index 3b5e60bb45..0000000000 --- a/vs2008/moai.sln +++ /dev/null @@ -1,1874 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rd Party", "3rd Party", "{3C05055B-3444-43CB-8793-D469F0D40706}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "box2d", "box2d\box2d.vcproj", "{AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chipmunk", "chipmunk\chipmunk.vcproj", "{2C12AE60-0D24-4200-99BB-CB49CBA3003F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "contrib", "contrib\contrib.vcproj", "{562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expat", "expat\expat.vcproj", "{860D46BC-EC6B-43C3-B335-3479F096FB1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype\freetype.vcproj", "{97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "glew\glew.vcproj", "{48580411-0A48-46F9-87A6-CF5C9B81D146}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jansson", "jansson\jansson.vcproj", "{52496C82-2EDB-4649-8509-451891F6A3DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcrypto", "libcrypto\libcrypto.vcproj", "{956FFE71-66F4-457C-8C88-9F075E4FDE27}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl\libcurl.vcproj", "{41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpg", "libjpg\libjpg.vcproj", "{1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libogg\libogg.vcproj", "{3986E679-6E11-4B7A-A00D-9669DEDBBC1E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng\libpng.vcproj", "{E4BFD291-B8CF-4D71-9E86-658CD227428D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssl", "libssl\libssl.vcproj", "{D0F1C892-57F4-4758-A2EE-BFB58DB20987}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtess", "libtess\libtess.vcproj", "{467B8E24-6EA0-4696-9623-8D711DFD95C5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbis", "libvorbis\libvorbis.vcproj", "{CBD64DDC-70CE-470B-B5ED-E12B59196EE7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luaext", "luaext\luaext.vcproj", "{51007BE8-C720-4A9F-A1BF-C2AA31179E02}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib-5.1", "lua-lib-5.1\lua-lib-5.1.vcproj", "{71F4FF55-2018-4950-9820-251D7C3CDD31}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib-5.2", "lua-lib-5.2\lua-lib-5.2.vcproj", "{7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mongoose", "mongoose\mongoose.vcproj", "{D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdl", "sdl\sdl.vcproj", "{AD871809-7119-436F-A8AA-2EAF63B35A3C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfmt", "sfmt\sfmt.vcproj", "{1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite", "sqlite\sqlite.vcproj", "{A9935050-2E54-4674-80F8-CFC45A2C106A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml", "tinyxml\tinyxml.vcproj", "{991EBC54-28FF-44A1-863E-E70617782825}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tlsf", "tlsf\tlsf.vcproj", "{1E78302D-CF63-4922-8113-DCCD24F94087}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "untz", "untz\untz.vcproj", "{76508AAD-7030-4FD2-9D05-99184AF2BAF5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcproj", "{E6C55A0C-B5B7-4963-8F77-19F1624B9F47}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{E2D67AF9-792C-4F3B-B969-4914EFF4B03F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-box2d", "moai-lib-box2d\moai-lib-box2d.vcproj", "{BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-chipmunk", "moai-lib-chipmunk\moai-lib-chipmunk.vcproj", "{899650A9-86F0-42DF-90D3-E046F4EC2092}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-core", "moai-lib-core\moai-lib-core.vcproj", "{AA2BD0BE-D174-4F8F-A7F7-B924128FED00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-crypto", "moai-lib-crypto\moai-lib-crypto.vcproj", "{842BEF89-E89B-46E9-99A4-83804FE60E85}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-fmod-designer", "moai-lib-fmod-designer\moai-lib-fmod-designer.vcproj", "{7B02E245-7904-4DAA-AD0C-2C9CE881F35B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-fmod-ex", "moai-lib-fmod-ex\moai-lib-fmod-ex.vcproj", "{E91C1EC3-9421-41F1-95C8-77E4F796F6E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-harness", "moai-lib-harness\moai-lib-harness.vcproj", "{397A08C8-EF50-470A-9100-5C78FC0F332D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-luaext", "moai-lib-luaext\moai-lib-luaext.vcproj", "{30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-http-client", "moai-lib-http-client\moai-lib-http-client.vcproj", "{CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-http-server", "moai-lib-http-server\moai-lib-http-server.vcproj", "{327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-sim", "moai-lib-sim\moai-engine.vcproj", "{FA856173-3823-4FFF-8207-32DB9C1711FA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-test", "moai-lib-test\moai-lib-test.vcproj", "{6B898B13-E6F1-473C-A020-328DA0D50FB9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-untz", "moai-lib-untz\moai-lib-untz.vcproj", "{C699BB79-8F3F-48A3-A06A-2D4E0EA73360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-util", "moai-lib-util\moai-lib-util.vcproj", "{9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-crypto", "zl-lib-crypto\zl-lib-crypto.vcproj", "{963DCE50-D972-4A89-8FC0-63FC781D0A17}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-gfx", "zl-lib-gfx\zl-lib-gfx.vcproj", "{15EA6761-E3C5-4035-97EE-4F74A5ACEE96}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-util", "zl-lib-util\zl-lib-util.vcproj", "{E97A3E3D-01D5-4210-BCA0-A6D816624F1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-vfs", "zl-lib-vfs\zl-lib-vfs.vcproj", "{1E2D4A61-74EA-46FB-896D-6926DBCA43D0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{15EA2916-A80B-49D1-8489-93D12ED9D969}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-5.1", "lua-5.1\lua-5.1.vcproj", "{CCE1639A-B6FD-4144-A309-741B55DC835D}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {71F4FF55-2018-4950-9820-251D7C3CDD31} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-5.2", "lua-5.2\lua-5.2.vcproj", "{1058A5FD-6F00-4D33-BBDC-274077672B1B}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luac-5.1", "luac-5.1\luac-5.1.vcproj", "{3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {71F4FF55-2018-4950-9820-251D7C3CDD31} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luac-5.2", "luac-5.2\luac-5.2.vcproj", "{01540EF6-65BB-486D-AE7F-02845FDCA479}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LuaJIT", "LuaJIT", "{F4E9AE38-D526-42DC-B307-9C9D973C4BCD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minilua", "minilua\minilua.vcproj", "{0ADB3D95-A750-4A3F-B2EB-560A7E29C465}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "buildvm", "buildvm\buildvm.vcproj", "{157EB94D-71FA-4E48-A230-6196B1DF1B6C}" - ProjectSection(ProjectDependencies) = postProject - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465} = {0ADB3D95-A750-4A3F-B2EB-560A7E29C465} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luajit", "luajit\luajit.vcproj", "{ECCF265E-EB98-45B6-BDB9-FF826302BF5E}" - ProjectSection(ProjectDependencies) = postProject - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luajit-lib", "luajit-lib\luajit-lib.vcproj", "{2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}" - ProjectSection(ProjectDependencies) = postProject - {157EB94D-71FA-4E48-A230-6196B1DF1B6C} = {157EB94D-71FA-4E48-A230-6196B1DF1B6C} - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Moai", "Moai", "{EE001E46-5A97-4A19-BC07-0F4E176C023A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai", "moai-exe\moai.vcproj", "{83DE7C0A-667A-4B75-8D00-B575501BC289}" - ProjectSection(ProjectDependencies) = postProject - {AD871809-7119-436F-A8AA-2EAF63B35A3C} = {AD871809-7119-436F-A8AA-2EAF63B35A3C} - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} - {48580411-0A48-46F9-87A6-CF5C9B81D146} = {48580411-0A48-46F9-87A6-CF5C9B81D146} - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} - {467B8E24-6EA0-4696-9623-8D711DFD95C5} = {467B8E24-6EA0-4696-9623-8D711DFD95C5} - {1E78302D-CF63-4922-8113-DCCD24F94087} = {1E78302D-CF63-4922-8113-DCCD24F94087} - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} = {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} - {A9935050-2E54-4674-80F8-CFC45A2C106A} = {A9935050-2E54-4674-80F8-CFC45A2C106A} - {963DCE50-D972-4A89-8FC0-63FC781D0A17} = {963DCE50-D972-4A89-8FC0-63FC781D0A17} - {991EBC54-28FF-44A1-863E-E70617782825} = {991EBC54-28FF-44A1-863E-E70617782825} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {71F4FF55-2018-4950-9820-251D7C3CDD31} - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} = {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} - {2C12AE60-0D24-4200-99BB-CB49CBA3003F} = {2C12AE60-0D24-4200-99BB-CB49CBA3003F} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} = {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} - {956FFE71-66F4-457C-8C88-9F075E4FDE27} = {956FFE71-66F4-457C-8C88-9F075E4FDE27} - {FA856173-3823-4FFF-8207-32DB9C1711FA} = {FA856173-3823-4FFF-8207-32DB9C1711FA} - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} = {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} = {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} = {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} - {52496C82-2EDB-4649-8509-451891F6A3DE} = {52496C82-2EDB-4649-8509-451891F6A3DE} - {842BEF89-E89B-46E9-99A4-83804FE60E85} = {842BEF89-E89B-46E9-99A4-83804FE60E85} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} = {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} - {E4BFD291-B8CF-4D71-9E86-658CD227428D} = {E4BFD291-B8CF-4D71-9E86-658CD227428D} - {D0F1C892-57F4-4758-A2EE-BFB58DB20987} = {D0F1C892-57F4-4758-A2EE-BFB58DB20987} - {899650A9-86F0-42DF-90D3-E046F4EC2092} = {899650A9-86F0-42DF-90D3-E046F4EC2092} - {76508AAD-7030-4FD2-9D05-99184AF2BAF5} = {76508AAD-7030-4FD2-9D05-99184AF2BAF5} - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} - {860D46BC-EC6B-43C3-B335-3479F096FB1B} = {860D46BC-EC6B-43C3-B335-3479F096FB1B} - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} - {397A08C8-EF50-470A-9100-5C78FC0F332D} = {397A08C8-EF50-470A-9100-5C78FC0F332D} - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} = {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} = {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} - {51007BE8-C720-4A9F-A1BF-C2AA31179E02} = {51007BE8-C720-4A9F-A1BF-C2AA31179E02} - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} = {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} = {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-fmod", "moai-exe-fmod\moai-fmod.vcproj", "{50162269-783B-46FA-A636-ACA4CAF31EE0}" - ProjectSection(ProjectDependencies) = postProject - {AD871809-7119-436F-A8AA-2EAF63B35A3C} = {AD871809-7119-436F-A8AA-2EAF63B35A3C} - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} - {48580411-0A48-46F9-87A6-CF5C9B81D146} = {48580411-0A48-46F9-87A6-CF5C9B81D146} - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} - {467B8E24-6EA0-4696-9623-8D711DFD95C5} = {467B8E24-6EA0-4696-9623-8D711DFD95C5} - {1E78302D-CF63-4922-8113-DCCD24F94087} = {1E78302D-CF63-4922-8113-DCCD24F94087} - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} = {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B} = {7B02E245-7904-4DAA-AD0C-2C9CE881F35B} - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} - {A9935050-2E54-4674-80F8-CFC45A2C106A} = {A9935050-2E54-4674-80F8-CFC45A2C106A} - {963DCE50-D972-4A89-8FC0-63FC781D0A17} = {963DCE50-D972-4A89-8FC0-63FC781D0A17} - {991EBC54-28FF-44A1-863E-E70617782825} = {991EBC54-28FF-44A1-863E-E70617782825} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {71F4FF55-2018-4950-9820-251D7C3CDD31} - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} = {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} - {2C12AE60-0D24-4200-99BB-CB49CBA3003F} = {2C12AE60-0D24-4200-99BB-CB49CBA3003F} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} = {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} - {956FFE71-66F4-457C-8C88-9F075E4FDE27} = {956FFE71-66F4-457C-8C88-9F075E4FDE27} - {FA856173-3823-4FFF-8207-32DB9C1711FA} = {FA856173-3823-4FFF-8207-32DB9C1711FA} - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} = {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} - {52496C82-2EDB-4649-8509-451891F6A3DE} = {52496C82-2EDB-4649-8509-451891F6A3DE} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} = {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} - {E4BFD291-B8CF-4D71-9E86-658CD227428D} = {E4BFD291-B8CF-4D71-9E86-658CD227428D} - {D0F1C892-57F4-4758-A2EE-BFB58DB20987} = {D0F1C892-57F4-4758-A2EE-BFB58DB20987} - {899650A9-86F0-42DF-90D3-E046F4EC2092} = {899650A9-86F0-42DF-90D3-E046F4EC2092} - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} - {860D46BC-EC6B-43C3-B335-3479F096FB1B} = {860D46BC-EC6B-43C3-B335-3479F096FB1B} - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} - {397A08C8-EF50-470A-9100-5C78FC0F332D} = {397A08C8-EF50-470A-9100-5C78FC0F332D} - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} = {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} - {51007BE8-C720-4A9F-A1BF-C2AA31179E02} = {51007BE8-C720-4A9F-A1BF-C2AA31179E02} - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} = {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} = {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-server", "moai-exe-server\moai-server.vcproj", "{4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} - {1E78302D-CF63-4922-8113-DCCD24F94087} = {1E78302D-CF63-4922-8113-DCCD24F94087} - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} - {A9935050-2E54-4674-80F8-CFC45A2C106A} = {A9935050-2E54-4674-80F8-CFC45A2C106A} - {963DCE50-D972-4A89-8FC0-63FC781D0A17} = {963DCE50-D972-4A89-8FC0-63FC781D0A17} - {991EBC54-28FF-44A1-863E-E70617782825} = {991EBC54-28FF-44A1-863E-E70617782825} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {71F4FF55-2018-4950-9820-251D7C3CDD31} - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} = {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} = {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} - {956FFE71-66F4-457C-8C88-9F075E4FDE27} = {956FFE71-66F4-457C-8C88-9F075E4FDE27} - {52496C82-2EDB-4649-8509-451891F6A3DE} = {52496C82-2EDB-4649-8509-451891F6A3DE} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} = {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} - {D0F1C892-57F4-4758-A2EE-BFB58DB20987} = {D0F1C892-57F4-4758-A2EE-BFB58DB20987} - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} - {860D46BC-EC6B-43C3-B335-3479F096FB1B} = {860D46BC-EC6B-43C3-B335-3479F096FB1B} - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} = {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} = {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-test", "moai-exe-test\moai-test.vcproj", "{E2A74094-D98E-40F2-9123-6E12BD6BBB5D}" - ProjectSection(ProjectDependencies) = postProject - {AD871809-7119-436F-A8AA-2EAF63B35A3C} = {AD871809-7119-436F-A8AA-2EAF63B35A3C} - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} - {48580411-0A48-46F9-87A6-CF5C9B81D146} = {48580411-0A48-46F9-87A6-CF5C9B81D146} - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} - {6B898B13-E6F1-473C-A020-328DA0D50FB9} = {6B898B13-E6F1-473C-A020-328DA0D50FB9} - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} - {467B8E24-6EA0-4696-9623-8D711DFD95C5} = {467B8E24-6EA0-4696-9623-8D711DFD95C5} - {1E78302D-CF63-4922-8113-DCCD24F94087} = {1E78302D-CF63-4922-8113-DCCD24F94087} - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} = {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} - {A9935050-2E54-4674-80F8-CFC45A2C106A} = {A9935050-2E54-4674-80F8-CFC45A2C106A} - {963DCE50-D972-4A89-8FC0-63FC781D0A17} = {963DCE50-D972-4A89-8FC0-63FC781D0A17} - {991EBC54-28FF-44A1-863E-E70617782825} = {991EBC54-28FF-44A1-863E-E70617782825} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {71F4FF55-2018-4950-9820-251D7C3CDD31} - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} = {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} - {2C12AE60-0D24-4200-99BB-CB49CBA3003F} = {2C12AE60-0D24-4200-99BB-CB49CBA3003F} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} = {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} - {956FFE71-66F4-457C-8C88-9F075E4FDE27} = {956FFE71-66F4-457C-8C88-9F075E4FDE27} - {FA856173-3823-4FFF-8207-32DB9C1711FA} = {FA856173-3823-4FFF-8207-32DB9C1711FA} - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} = {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} = {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} = {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} - {52496C82-2EDB-4649-8509-451891F6A3DE} = {52496C82-2EDB-4649-8509-451891F6A3DE} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} = {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} - {E4BFD291-B8CF-4D71-9E86-658CD227428D} = {E4BFD291-B8CF-4D71-9E86-658CD227428D} - {D0F1C892-57F4-4758-A2EE-BFB58DB20987} = {D0F1C892-57F4-4758-A2EE-BFB58DB20987} - {899650A9-86F0-42DF-90D3-E046F4EC2092} = {899650A9-86F0-42DF-90D3-E046F4EC2092} - {76508AAD-7030-4FD2-9D05-99184AF2BAF5} = {76508AAD-7030-4FD2-9D05-99184AF2BAF5} - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} - {860D46BC-EC6B-43C3-B335-3479F096FB1B} = {860D46BC-EC6B-43C3-B335-3479F096FB1B} - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} - {397A08C8-EF50-470A-9100-5C78FC0F332D} = {397A08C8-EF50-470A-9100-5C78FC0F332D} - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} = {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} = {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} = {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} = {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Util", "Util", "{0A0F956C-BC16-4A42-939E-6EA89A1F142E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glewinfo", "glewinfo\glewinfo.vcproj", "{D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {48580411-0A48-46F9-87A6-CF5C9B81D146} = {48580411-0A48-46F9-87A6-CF5C9B81D146} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hexdump", "hexdump\hexdump.vcproj", "{F83A5925-1AD8-4D5D-A134-85AFF1466766}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "visualinfo", "visualinfo\visualinfo.vcproj", "{CC196C96-AE3D-4E3A-A405-620F83104EB7}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {48580411-0A48-46F9-87A6-CF5C9B81D146} = {48580411-0A48-46F9-87A6-CF5C9B81D146} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "work", "work\work.vcproj", "{A130115C-B50F-436E-8C90-4243E310DC9C}" - ProjectSection(ProjectDependencies) = postProject - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} - {6B898B13-E6F1-473C-A020-328DA0D50FB9} = {6B898B13-E6F1-473C-A020-328DA0D50FB9} - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} - {FA856173-3823-4FFF-8207-32DB9C1711FA} = {FA856173-3823-4FFF-8207-32DB9C1711FA} - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} = {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} - {899650A9-86F0-42DF-90D3-E046F4EC2092} = {899650A9-86F0-42DF-90D3-E046F4EC2092} - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} - {397A08C8-EF50-470A-9100-5C78FC0F332D} = {397A08C8-EF50-470A-9100-5C78FC0F332D} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug-Lua-5.1|Win32 = Debug-Lua-5.1|Win32 - Debug-Lua-5.1|x64 = Debug-Lua-5.1|x64 - Debug-Lua-5.2|Win32 = Debug-Lua-5.2|Win32 - Debug-Lua-5.2|x64 = Debug-Lua-5.2|x64 - Debug-LuaJIT|Win32 = Debug-LuaJIT|Win32 - Debug-LuaJIT|x64 = Debug-LuaJIT|x64 - Release-Lua-5.1|Win32 = Release-Lua-5.1|Win32 - Release-Lua-5.1|x64 = Release-Lua-5.1|x64 - Release-Lua-5.2|Win32 = Release-Lua-5.2|Win32 - Release-Lua-5.2|x64 = Release-Lua-5.2|x64 - Release-LuaJIT|Win32 = Release-LuaJIT|Win32 - Release-LuaJIT|x64 = Release-LuaJIT|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {467B8E24-6EA0-4696-9623-8D711DFD95C5}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {842BEF89-E89B-46E9-99A4-83804FE60E85}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {963DCE50-D972-4A89-8FC0-63FC781D0A17}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} = {3C05055B-3444-43CB-8793-D469F0D40706} - {2C12AE60-0D24-4200-99BB-CB49CBA3003F} = {3C05055B-3444-43CB-8793-D469F0D40706} - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} = {3C05055B-3444-43CB-8793-D469F0D40706} - {860D46BC-EC6B-43C3-B335-3479F096FB1B} = {3C05055B-3444-43CB-8793-D469F0D40706} - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} = {3C05055B-3444-43CB-8793-D469F0D40706} - {48580411-0A48-46F9-87A6-CF5C9B81D146} = {3C05055B-3444-43CB-8793-D469F0D40706} - {52496C82-2EDB-4649-8509-451891F6A3DE} = {3C05055B-3444-43CB-8793-D469F0D40706} - {956FFE71-66F4-457C-8C88-9F075E4FDE27} = {3C05055B-3444-43CB-8793-D469F0D40706} - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} = {3C05055B-3444-43CB-8793-D469F0D40706} - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} = {3C05055B-3444-43CB-8793-D469F0D40706} - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} = {3C05055B-3444-43CB-8793-D469F0D40706} - {E4BFD291-B8CF-4D71-9E86-658CD227428D} = {3C05055B-3444-43CB-8793-D469F0D40706} - {D0F1C892-57F4-4758-A2EE-BFB58DB20987} = {3C05055B-3444-43CB-8793-D469F0D40706} - {467B8E24-6EA0-4696-9623-8D711DFD95C5} = {3C05055B-3444-43CB-8793-D469F0D40706} - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} = {3C05055B-3444-43CB-8793-D469F0D40706} - {51007BE8-C720-4A9F-A1BF-C2AA31179E02} = {3C05055B-3444-43CB-8793-D469F0D40706} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {3C05055B-3444-43CB-8793-D469F0D40706} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {3C05055B-3444-43CB-8793-D469F0D40706} - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} = {3C05055B-3444-43CB-8793-D469F0D40706} - {AD871809-7119-436F-A8AA-2EAF63B35A3C} = {3C05055B-3444-43CB-8793-D469F0D40706} - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} = {3C05055B-3444-43CB-8793-D469F0D40706} - {A9935050-2E54-4674-80F8-CFC45A2C106A} = {3C05055B-3444-43CB-8793-D469F0D40706} - {991EBC54-28FF-44A1-863E-E70617782825} = {3C05055B-3444-43CB-8793-D469F0D40706} - {1E78302D-CF63-4922-8113-DCCD24F94087} = {3C05055B-3444-43CB-8793-D469F0D40706} - {76508AAD-7030-4FD2-9D05-99184AF2BAF5} = {3C05055B-3444-43CB-8793-D469F0D40706} - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {3C05055B-3444-43CB-8793-D469F0D40706} - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {899650A9-86F0-42DF-90D3-E046F4EC2092} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {842BEF89-E89B-46E9-99A4-83804FE60E85} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {397A08C8-EF50-470A-9100-5C78FC0F332D} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {FA856173-3823-4FFF-8207-32DB9C1711FA} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {6B898B13-E6F1-473C-A020-328DA0D50FB9} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {963DCE50-D972-4A89-8FC0-63FC781D0A17} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {CCE1639A-B6FD-4144-A309-741B55DC835D} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {1058A5FD-6F00-4D33-BBDC-274077672B1B} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {01540EF6-65BB-486D-AE7F-02845FDCA479} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {157EB94D-71FA-4E48-A230-6196B1DF1B6C} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {83DE7C0A-667A-4B75-8D00-B575501BC289} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {50162269-783B-46FA-A636-ACA4CAF31EE0} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - {F83A5925-1AD8-4D5D-A134-85AFF1466766} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - {CC196C96-AE3D-4E3A-A405-620F83104EB7} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - {A130115C-B50F-436E-8C90-4243E310DC9C} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - AMDCaProjectFile = C:\Documents and Settings\Patrick\My Documents\git\moai\vs2008\CodeAnalyst\moai.caw - AMDCaPersistentStartup = moai (Utilities\moai) - AMDCaPersistentConfig = Debug|Win32 - EndGlobalSection -EndGlobal diff --git a/vs2008/mongoose/mongoose.vcproj b/vs2008/mongoose/mongoose.vcproj deleted file mode 100644 index 6ef0da9856..0000000000 --- a/vs2008/mongoose/mongoose.vcproj +++ /dev/null @@ -1,841 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/sdl/sdl.vcproj b/vs2008/sdl/sdl.vcproj deleted file mode 100644 index 4fd79a5857..0000000000 --- a/vs2008/sdl/sdl.vcproj +++ /dev/null @@ -1,1795 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/sfmt/sfmt.vcproj b/vs2008/sfmt/sfmt.vcproj deleted file mode 100644 index 5d0602d690..0000000000 --- a/vs2008/sfmt/sfmt.vcproj +++ /dev/null @@ -1,897 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/sqlite/sqlite.vcproj b/vs2008/sqlite/sqlite.vcproj deleted file mode 100644 index a7fbf67198..0000000000 --- a/vs2008/sqlite/sqlite.vcproj +++ /dev/null @@ -1,863 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/tinyxml/tinyxml.vcproj b/vs2008/tinyxml/tinyxml.vcproj deleted file mode 100644 index 1449a5ea83..0000000000 --- a/vs2008/tinyxml/tinyxml.vcproj +++ /dev/null @@ -1,861 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/tlsf/tlsf.vcproj b/vs2008/tlsf/tlsf.vcproj deleted file mode 100644 index e955620b31..0000000000 --- a/vs2008/tlsf/tlsf.vcproj +++ /dev/null @@ -1,839 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/untz/untz.vcproj b/vs2008/untz/untz.vcproj deleted file mode 100644 index 7a1efcc3ca..0000000000 --- a/vs2008/untz/untz.vcproj +++ /dev/null @@ -1,1112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/visualinfo/visualinfo.vcproj b/vs2008/visualinfo/visualinfo.vcproj deleted file mode 100644 index 308b188b31..0000000000 --- a/vs2008/visualinfo/visualinfo.vcproj +++ /dev/null @@ -1,1020 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/work/work.vcproj b/vs2008/work/work.vcproj deleted file mode 100644 index 3094eb1f94..0000000000 --- a/vs2008/work/work.vcproj +++ /dev/null @@ -1,1114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/zl-lib-crypto/zl-lib-crypto.vcproj b/vs2008/zl-lib-crypto/zl-lib-crypto.vcproj deleted file mode 100644 index d738108311..0000000000 --- a/vs2008/zl-lib-crypto/zl-lib-crypto.vcproj +++ /dev/null @@ -1,1106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/zl-lib-gfx/zl-lib-gfx.vcproj b/vs2008/zl-lib-gfx/zl-lib-gfx.vcproj deleted file mode 100644 index d31103ded0..0000000000 --- a/vs2008/zl-lib-gfx/zl-lib-gfx.vcproj +++ /dev/null @@ -1,1022 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/zl-lib-util/zl-lib-util.vcproj b/vs2008/zl-lib-util/zl-lib-util.vcproj deleted file mode 100644 index b1a376fa4a..0000000000 --- a/vs2008/zl-lib-util/zl-lib-util.vcproj +++ /dev/null @@ -1,1614 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/zl-lib-vfs/zl-lib-vfs.vcproj b/vs2008/zl-lib-vfs/zl-lib-vfs.vcproj deleted file mode 100644 index 51774d9eeb..0000000000 --- a/vs2008/zl-lib-vfs/zl-lib-vfs.vcproj +++ /dev/null @@ -1,1106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2008/zlib/zlib.vcproj b/vs2008/zlib/zlib.vcproj deleted file mode 100644 index 830d42d62b..0000000000 --- a/vs2008/zlib/zlib.vcproj +++ /dev/null @@ -1,925 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2010/.gitignore b/vs2010/.gitignore deleted file mode 100644 index ecded4bfad..0000000000 --- a/vs2010/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -bin/ -ipch/ -Win32/ -x64/ -Debug*/ -Release*/ -CodeAnalyst/ -*.vcproj -*.opensdf -*.user -*.ncb -*.suo -*.sdf \ No newline at end of file diff --git a/vs2010/README.txt b/vs2010/README.txt deleted file mode 100644 index ccf42b7916..0000000000 --- a/vs2010/README.txt +++ /dev/null @@ -1,42 +0,0 @@ ----------------------------------------------------------------------------------------------------------------------------- -To build moaiext-untz: - -Visual Studio 2010 -1) Install the latest Direct X SDK -2) Click on the menu command View->Other Windows->Property Manager -3) In Property Manager, open box2d->Debug | Win32->Microsoft.Cpp.Win32.user -4) In the resulting pop-up window, click Common Properties->VC++ Directories -5) Edit the value of Include Directories to include C:\Program Files\Microsoft DirectX SDK (June 2010)\Include -6) Edit the value of Library Directories to include C:\Program Files\Microsoft DirectX SDK (June 2010)\Lib\x86 - ----------------------------------------------------------------------------------------------------------------------------- -To build moaiext-fmod: - -Visual Studio 2010 -1) Install the latest Direct X SDK -2) Click on the menu command View->Other Windows->Property Manager -3) In Property Manager, open box2d->Debug | Win32->Microsoft.Cpp.Win32.user -4) In the resulting pop-up window, click Common Properties->VC++ Directories -5) Edit the value of Include Directories to include C:\Program Files\FMOD SoundSystem\FMOD Programmers API Win32\api\inc -6) Edit the value of Library Directories to include C:\Program Files\FMOD SoundSystem\FMOD Programmers API Win32\api\lib - ----------------------------------------------------------------------------------------------------------------------------- -March 1, 2011 - -There is apparently a bug in vs2010 requiring a patch: - -http://connect.microsoft.com/VisualStudio/feedback/details/638534/unresolved-externals-when-build-a-vc-project-with-chained-static-lib-dependencies - -"When we are trying to build exe or dll projects that reference a static lib project that references another static lib project, building the solution will fail to link the exe project with unresolved externals that should be resolved by linking the lowest level dependency. -For example, ExeProject has a project reference on LibA. LibA has a project reference on LibB. Linking will fail with missing symbols from LibB. -Rebuilding the solution will succeed." - -And here's the patch: - -Open %ProgramsFile%\MSBuild\Microsoft.cpp\v4.0\Microsoft.CPPBuild.Targets. Look for the line below: - - - -Add ResolvedLinkLib to the DependsOnTargets like this: - - \ No newline at end of file diff --git a/vs2010/box2d/box2d.vcxproj b/vs2010/box2d/box2d.vcxproj deleted file mode 100644 index d95e72c261..0000000000 --- a/vs2010/box2d/box2d.vcxproj +++ /dev/null @@ -1,623 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} - box2d - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\box2d-2.2.1;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/box2d/box2d.vcxproj.filters b/vs2010/box2d/box2d.vcxproj.filters deleted file mode 100644 index e17a7ed249..0000000000 --- a/vs2010/box2d/box2d.vcxproj.filters +++ /dev/null @@ -1,301 +0,0 @@ - - - - - {7c70d25b-d854-4eb3-af95-c5894b1946d6} - - - {0b34f63b-6114-4e4e-a40f-0d7c39834f95} - - - {947cbe5d-cb4c-430f-b7c6-320ec3c4a6af} - - - {82c36a64-e425-4902-8740-36425288a3f1} - - - {98726924-cfb3-49ed-aef4-be4f9c86b4ce} - - - {f129471d-38ee-49dd-9176-5a65cfa12f6e} - - - {71e5f545-81ee-460b-aa3a-1a9b2db69637} - - - - - Collision - - - Collision - - - Collision - - - Collision - - - Collision - - - Collision - - - Collision - - - Collision - - - Collision\Shapes - - - Collision\Shapes - - - Collision\Shapes - - - Collision\Shapes - - - Common - - - Common - - - Common - - - Common - - - Common - - - Common - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Rope - - - - - Collision - - - Collision - - - Collision - - - Collision - - - Collision - - - Collision\Shapes - - - Collision\Shapes - - - Collision\Shapes - - - Collision\Shapes - - - Collision\Shapes - - - Common - - - Common - - - Common - - - Common - - - Common - - - Common - - - Common - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Contacts - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Dynamics\Joints - - - Rope - - - - \ No newline at end of file diff --git a/vs2010/buildvm/buildvm-post.bat b/vs2010/buildvm/buildvm-post.bat deleted file mode 100644 index 0ccf14e4dc..0000000000 --- a/vs2010/buildvm/buildvm-post.bat +++ /dev/null @@ -1,15 +0,0 @@ -set buildvm=%1 -set outdir=%2 - -if not exist %outdir% mkdir -p %outdir% - -set src=..\..\3rdparty\luajit-2.0.1\src -set sources=%src%\lib_base.c %src%\lib_math.c %src%\lib_bit.c %src%\lib_string.c %src%\lib_table.c %src%\lib_io.c %src%\lib_os.c %src%\lib_package.c %src%\lib_debug.c %src%\lib_jit.c %src%\lib_ffi.c - -%buildvm% -m peobj -o %outdir%\lj_vm.obj %sources% -%buildvm% -m bcdef -o %outdir%\lj_bcdef.h %sources% -%buildvm% -m ffdef -o %outdir%\lj_ffdef.h %sources% -%buildvm% -m libdef -o %outdir%\lj_libdef.h %sources% -%buildvm% -m recdef -o %outdir%\lj_recdef.h %sources% -%buildvm% -m vmdef -o %outdir%\vmdef.lua %sources% -%buildvm% -m folddef -o %outdir%\lj_folddef.h %src%\lj_opt_fold.c diff --git a/vs2010/buildvm/buildvm.vcxproj b/vs2010/buildvm/buildvm.vcxproj deleted file mode 100644 index 23ef3f559b..0000000000 --- a/vs2010/buildvm/buildvm.vcxproj +++ /dev/null @@ -1,646 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {157EB94D-71FA-4E48-A230-6196B1DF1B6C} - buildvm - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - - - - - - - - - - - {0adb3d95-a750-4a3f-b2eb-560a7e29c465} - false - - - - - - \ No newline at end of file diff --git a/vs2010/chipmunk/chipmunk.vcxproj b/vs2010/chipmunk/chipmunk.vcxproj deleted file mode 100644 index 5a82693e44..0000000000 --- a/vs2010/chipmunk/chipmunk.vcxproj +++ /dev/null @@ -1,599 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {2C12AE60-0D24-4200-99BB-CB49CBA3003F} - chipmunk - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\chipmunk-5.3.4\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/chipmunk/chipmunk.vcxproj.filters b/vs2010/chipmunk/chipmunk.vcxproj.filters deleted file mode 100644 index 95e8843a90..0000000000 --- a/vs2010/chipmunk/chipmunk.vcxproj.filters +++ /dev/null @@ -1,113 +0,0 @@ - - - - - {23dc5c33-0415-42b4-8255-a3eb74da5c76} - - - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - - - - - - - - - - - - - - - - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - constraints - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/contrib/contrib.vcxproj b/vs2010/contrib/contrib.vcxproj deleted file mode 100644 index 1d30a1a6c8..0000000000 --- a/vs2010/contrib/contrib.vcxproj +++ /dev/null @@ -1,518 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} - contrib - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/expat/expat.vcxproj b/vs2010/expat/expat.vcxproj deleted file mode 100644 index 92fd850aa3..0000000000 --- a/vs2010/expat/expat.vcxproj +++ /dev/null @@ -1,538 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {860D46BC-EC6B-43C3-B335-3479F096FB1B} - expat - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/freetype/freetype.vcxproj b/vs2010/freetype/freetype.vcxproj deleted file mode 100644 index 7cb5ed06bd..0000000000 --- a/vs2010/freetype/freetype.vcxproj +++ /dev/null @@ -1,1567 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} - - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - StaticLibrary - false - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - false - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - false - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - false - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - false - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - false - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - X64 - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - false - - - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/glew/glew.vcxproj b/vs2010/glew/glew.vcxproj deleted file mode 100644 index fc5996f8cc..0000000000 --- a/vs2010/glew/glew.vcxproj +++ /dev/null @@ -1,492 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {48580411-0A48-46F9-87A6-CF5C9B81D146} - glew - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/glewinfo/glewinfo.vcxproj b/vs2010/glewinfo/glewinfo.vcxproj deleted file mode 100644 index bd670eab66..0000000000 --- a/vs2010/glewinfo/glewinfo.vcxproj +++ /dev/null @@ -1,677 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3} - glewinfo - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - {48580411-0a48-46f9-87a6-cf5c9b81d146} - false - - - {1e2d4a61-74ea-46fb-896d-6926dbca43d0} - false - - - {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} - false - - - - - - \ No newline at end of file diff --git a/vs2010/hexdump/hexdump.vcxproj b/vs2010/hexdump/hexdump.vcxproj deleted file mode 100644 index bc3b6a3815..0000000000 --- a/vs2010/hexdump/hexdump.vcxproj +++ /dev/null @@ -1,704 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {F83A5925-1AD8-4D5D-A134-85AFF1466766} - hexdump - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - {e97a3e3d-01d5-4210-bca0-a6d816624f1a} - false - - - {1e2d4a61-74ea-46fb-896d-6926dbca43d0} - false - - - {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} - false - - - - - - \ No newline at end of file diff --git a/vs2010/hexdump/main.cpp b/vs2010/hexdump/main.cpp deleted file mode 100644 index a772774450..0000000000 --- a/vs2010/hexdump/main.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved. -// http://getmoai.com - -#include - -static char smPathBuffer [ PATH_MAX ]; - -//----------------------------------------------------------------// -void _dumpAsCPPHeader ( cc8* name, void* data, u32 size, u32 columns ) { - - FILE* file; - u32 count; - u8 buffer; - - sprintf ( smPathBuffer, "%s.h", name ); - file = fopen ( smPathBuffer, "w" ); - assert ( file ); - - fprintf ( file, "#ifndef _%s_H\n", name ); - fprintf ( file, "#define _%s_H\n", name ); - - fprintf ( file, "\n" ); - fprintf ( file, "#define %s_SIZE 0x%08X\n", name, ( uint )size ); - fprintf ( file, "\n" ); - - fprintf ( file, "unsigned char %s [] = {\n\t", name ); - - for ( count = 0; count < size; count ++ ) { - if ( count ) { - if ( !( count % 12 )) fprintf ( file, "\n\t" ); - else fprintf ( file, " " ); - } - - buffer = (( u8* )data )[count]; - fprintf ( file, "0x%02X,", buffer ); - }; - - if ((( count - 1 ) % 12 )) fprintf ( file, "\n" ); - fprintf ( file, "};\n" ); - - fprintf ( file, "\n" ); - - fprintf ( file, "#endif\n" ); - - fclose ( file ); -} - -//----------------------------------------------------------------// -int main ( int argc, char** argv ) { - - if ( argc < 3 ) return 0; - - cc8* infile = argv [ 1 ]; - cc8* outfile = argv [ 2 ]; - - ZLFileStream file; - file.OpenRead ( infile ); - - size_t size = file.GetLength (); - void* data = malloc ( size ); - file.ReadBytes ( data, size ); - - _dumpAsCPPHeader ( outfile, data, size, 16 ); - - free ( data ); - return 0; -} diff --git a/vs2010/jansson/jansson.vcxproj b/vs2010/jansson/jansson.vcxproj deleted file mode 100644 index 4dfdee3bdb..0000000000 --- a/vs2010/jansson/jansson.vcxproj +++ /dev/null @@ -1,700 +0,0 @@ - - - - - Debug - Lua 5.2 - Win32 - - - Debug - Lua 5.2 - x64 - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {52496C82-2EDB-4649-8509-451891F6A3DE} - jansson - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - Application - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - Application - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - false - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - NotSet - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - false - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - Disabled - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - false - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - NotSet - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - false - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - false - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - NotSet - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - false - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - ..\..\src;..\..\3rdparty\jansson-2.1\src-win32;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/libcrypto/libcrypto.vcxproj b/vs2010/libcrypto/libcrypto.vcxproj deleted file mode 100644 index f6d8788616..0000000000 --- a/vs2010/libcrypto/libcrypto.vcxproj +++ /dev/null @@ -1,1112 +0,0 @@ - - - - - Debug - Lua 5.2 - Win32 - - - Debug - Lua 5.2 - x64 - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {956FFE71-66F4-457C-8C88-9F075E4FDE27} - libcrypto - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - Application - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/libcrypto/libcrypto.vcxproj.filters b/vs2010/libcrypto/libcrypto.vcxproj.filters deleted file mode 100644 index 2b7e73ea6c..0000000000 --- a/vs2010/libcrypto/libcrypto.vcxproj.filters +++ /dev/null @@ -1,1649 +0,0 @@ - - - - - {d6c480e0-64e1-49d8-9e19-851a388e1f53} - - - {6dc20c53-0d0a-4081-8fa4-b514748c39a0} - - - {dde45d06-d1df-48a5-9f91-c881a7ddad9d} - - - {cd5d582f-3445-477f-8e42-e0c9c8032bcf} - - - {63b9e0c5-ae4f-4b03-8ae2-76ee1cd44867} - - - {c6e68c3a-cccb-4fe5-9a4b-efbed40f7fbf} - - - {b6c37592-a07c-4f12-b9dc-93563b9c625e} - - - {5f93f782-fcb8-4d37-ba09-cd5c69c858d0} - - - {393e918b-221d-4cd2-ad71-e84d349ab696} - - - {3dbf93dd-7220-4615-a7cd-993bd198f38f} - - - {97378466-4c67-479a-bc69-0f64f0f7dba7} - - - {87ca39c6-27c5-44b6-a66b-08e0e7951253} - - - {a26a5829-48c7-4269-968d-b7bf4874352d} - - - {342c46b9-1f4d-46c5-8bd2-95cdcb02170f} - - - {91e1d939-1d60-4433-9f86-4a88234cc709} - - - {301cc97b-888c-4e0e-b9bc-26ffab2669a7} - - - {da0656ab-23a0-4674-823f-fa40bb4f8574} - - - {27d588d9-04df-4ebe-af13-93dc83ee1834} - - - {667572d9-3c75-4650-86d6-52bab81942de} - - - {11da3ac6-547f-41dc-bc63-958baa9af258} - - - {fec1eebf-cb0f-4099-9311-84548feb3f2a} - - - {bd7ac231-71ce-454a-9047-f73816e4c75b} - - - {d516b3c8-81f8-4696-aad8-d9f301d1888a} - - - {0ac750d6-2233-4aec-81ab-3081da9a7a6e} - - - {2957d51e-6d6a-4c61-b251-19499f7a3c28} - - - {47b8c8b3-9a53-4c86-9eb8-ec06d8854b72} - - - {6e8d8729-c0dd-4d63-95ec-e1d21b91cbf1} - - - {de8db171-712d-4b6f-a24a-d68fcd4a740c} - - - {46100ce3-a1db-4839-b20e-9253ad31c7bf} - - - {e6a8ac76-c4af-4a05-b854-ec69d0c4ae3a} - - - {94ce6c4f-d88e-44eb-84c9-cbabf6df17db} - - - {ab91e436-e20a-49fe-95c0-b44480afd2ca} - - - {aff7d767-95b8-43cb-933d-661d40202ca7} - - - {f3064978-d4ff-4296-8134-46010fec333d} - - - {18b22eeb-8415-4f8f-8c18-fff16764b1d1} - - - - - aes - - - aes - - - des - - - des - - - des - - - des - - - des - - - comp - - - rc2 - - - rc2 - - - rc4 - - - rc4 - - - md5 - - - md5 - - - sha - - - sha - - - md4 - - - md4 - - - rand - - - rand - - - x509 - - - x509 - - - evp - - - evp - - - ocsp - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - stack - - - stack - - - bn - - - bn - - - bn - - - lhash - - - objects - - - objects - - - objects - - - objects - - - buffer - - - rsa - - - rsa - - - hmac - - - pem - - - pem - - - dsa - - - dsa - - - dh - - - pkcs7 - - - x509v3 - - - x509v3 - - - x509v3 - - - conf - - - conf - - - conf - - - pkcs12 - - - ts - - - txt_db - - - pqueue - - - - - - - - aes - - - aes - - - aes - - - aes - - - aes - - - aes - - - aes - - - aes - - - aes - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - des - - - comp - - - comp - - - comp - - - comp - - - rc2 - - - rc2 - - - rc2 - - - rc2 - - - rc2 - - - rc4 - - - rc4 - - - md5 - - - md5 - - - sha - - - sha - - - sha - - - sha - - - sha - - - sha - - - md4 - - - md4 - - - rand - - - rand - - - rand - - - rand - - - rand - - - rand - - - rand - - - rand - - - rand - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - x509 - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - bio - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - evp - - - err - - - err - - - err - - - ocsp - - - ocsp - - - ocsp - - - ocsp - - - ocsp - - - ocsp - - - ocsp - - - ocsp - - - ocsp - - - ui - - - ui - - - ui - - - ui - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - asn1 - - - stack - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - bn - - - lhash - - - lhash - - - objects - - - objects - - - objects - - - objects - - - objects - - - buffer - - - buffer - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - rsa - - - hmac - - - hmac - - - hmac - - - pem - - - pem - - - pem - - - pem - - - pem - - - pem - - - pem - - - pem - - - pem - - - pem - - - pem - - - pem - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dsa - - - dh - - - dh - - - dh - - - dh - - - dh - - - dh - - - dh - - - dh - - - dh - - - dh - - - pkcs7 - - - pkcs7 - - - pkcs7 - - - pkcs7 - - - pkcs7 - - - pkcs7 - - - pkcs7 - - - pkcs7 - - - pkcs7 - - - modes - - - modes - - - modes - - - modes - - - modes - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - x509v3 - - - conf - - - conf - - - conf - - - conf - - - conf - - - conf - - - conf - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - pkcs12 - - - dso - - - dso - - - dso - - - dso - - - dso - - - dso - - - dso - - - dso - - - dso - - - ts - - - ts - - - ts - - - ts - - - ts - - - ts - - - ts - - - ts - - - ts - - - ts - - - ts - - - txt_db - - - pqueue - - - - - - - - - - - - - - - - - bio - - - bio - - - err - - - dso - - - \ No newline at end of file diff --git a/vs2010/libcurl/libcurl.vcxproj b/vs2010/libcurl/libcurl.vcxproj deleted file mode 100644 index 76f7b92ade..0000000000 --- a/vs2010/libcurl/libcurl.vcxproj +++ /dev/null @@ -1,833 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} - libcurl - Win32Proj - - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/libjpg/libjpg.vcxproj b/vs2010/libjpg/libjpg.vcxproj deleted file mode 100644 index 0261209eb4..0000000000 --- a/vs2010/libjpg/libjpg.vcxproj +++ /dev/null @@ -1,574 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} - libjpg - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/libogg/libogg.vcxproj b/vs2010/libogg/libogg.vcxproj deleted file mode 100644 index 3bdc7f2031..0000000000 --- a/vs2010/libogg/libogg.vcxproj +++ /dev/null @@ -1,524 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} - libogg - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/libpng/libpng.vcxproj b/vs2010/libpng/libpng.vcxproj deleted file mode 100644 index a0d4fd0c0a..0000000000 --- a/vs2010/libpng/libpng.vcxproj +++ /dev/null @@ -1,539 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {E4BFD291-B8CF-4D71-9E86-658CD227428D} - libpng - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/libssl/libssl.vcxproj b/vs2010/libssl/libssl.vcxproj deleted file mode 100644 index 2cbbb24c6b..0000000000 --- a/vs2010/libssl/libssl.vcxproj +++ /dev/null @@ -1,577 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {D0F1C892-57F4-4758-A2EE-BFB58DB20987} - libssl - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - 4068;%(DisableSpecificWarnings) - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/libvorbis/libvorbis.vcxproj b/vs2010/libvorbis/libvorbis.vcxproj deleted file mode 100644 index a3dc98c431..0000000000 --- a/vs2010/libvorbis/libvorbis.vcxproj +++ /dev/null @@ -1,586 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} - libvorbis - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/lua-5.1/lua-5.1.vcxproj b/vs2010/lua-5.1/lua-5.1.vcxproj deleted file mode 100644 index dc2406d2b2..0000000000 --- a/vs2010/lua-5.1/lua-5.1.vcxproj +++ /dev/null @@ -1,679 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {CCE1639A-B6FD-4144-A309-741B55DC835D} - lua-5.1 - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - {71f4ff55-2018-4950-9820-251d7c3cdd31} - false - - - {1e2d4a61-74ea-46fb-896d-6926dbca43d0} - false - - - {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} - false - - - - - - \ No newline at end of file diff --git a/vs2010/lua-5.2/lua-5.2.vcxproj b/vs2010/lua-5.2/lua-5.2.vcxproj deleted file mode 100644 index 773c9c9eca..0000000000 --- a/vs2010/lua-5.2/lua-5.2.vcxproj +++ /dev/null @@ -1,667 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {1058A5FD-6F00-4D33-BBDC-274077672B1B} - lua-5.2 - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - - \ No newline at end of file diff --git a/vs2010/lua-dll/lua-5.1.3.def b/vs2010/lua-dll/lua-5.1.3.def deleted file mode 100644 index 1fc50258b3..0000000000 --- a/vs2010/lua-dll/lua-5.1.3.def +++ /dev/null @@ -1,130 +0,0 @@ -EXPORTS - lua_tolstring - lua_typename - lua_pushfstring - lua_pushvfstring - lua_getlocal - lua_getupvalue - lua_setlocal - lua_setupvalue - lua_topointer - lua_iscfunction - lua_isnumber - lua_isstring - lua_isuserdata - lua_toboolean - lua_type - lua_equal - lua_lessthan - lua_rawequal - lua_checkstack - lua_cpcall - lua_error - lua_getmetatable - lua_gettop - lua_load - lua_next - lua_pcall - lua_pushthread - lua_setfenv - lua_setmetatable - lua_resume - lua_status - lua_yield - lua_dump - lua_gc - lua_gethook - lua_gethookcount - lua_gethookmask - lua_getinfo - lua_getstack - lua_sethook - lua_getallocf - lua_tocfunction - lua_atpanic - lua_tointeger - lua_tonumber - lua_tothread - lua_newstate - lua_newthread - lua_objlen - lua_touserdata - lua_close - lua_call - lua_concat - lua_createtable - lua_getfenv - lua_getfield - lua_gettable - lua_insert - lua_pushboolean - lua_pushcclosure - lua_pushinteger - lua_pushlightuserdata - lua_pushlstring - lua_pushnil - lua_pushnumber - lua_pushstring - lua_pushvalue - lua_rawget - lua_rawgeti - lua_rawset - lua_rawseti - lua_remove - lua_replace - lua_setfield - lua_settable - lua_settop - lua_xmove - lua_newuserdata - lua_setallocf - luaL_prepbuffer - luaL_checklstring - luaL_findtable - luaL_gsub - luaL_optlstring - luaL_newmetatable - luaL_argerror - luaL_callmeta - luaL_checkoption - luaL_error - luaL_getmetafield - luaL_loadbuffer - luaL_loadfile - luaL_loadstring - luaL_ref - luaL_typerror - luaL_checkinteger - luaL_optinteger - luaL_checknumber - luaL_optnumber - luaL_newstate - luaL_openlib - luaL_addlstring - luaL_addstring - luaL_addvalue - luaL_buffinit - luaL_checkany - luaL_checkstack - luaL_checktype - luaL_pushresult - luaL_register - luaL_unref - luaL_where - luaL_checkudata - luaopen_base - luaopen_debug - luaopen_io - luaopen_math - luaopen_os - luaopen_package - luaopen_string - luaopen_table - luaL_openlibs - luaU_dump - luaM_toobig - luaM_realloc_ - luaS_newlstr - luaD_growstack - luaF_newproto - \ No newline at end of file diff --git a/vs2010/lua-lib-5.1/lua-lib-5.1.vcxproj b/vs2010/lua-lib-5.1/lua-lib-5.1.vcxproj deleted file mode 100644 index 32f1611b26..0000000000 --- a/vs2010/lua-lib-5.1/lua-lib-5.1.vcxproj +++ /dev/null @@ -1,567 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {71F4FF55-2018-4950-9820-251D7C3CDD31} - lua-lib-5.1 - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/lua-lib-5.2/lua-lib-5.2.vcxproj b/vs2010/lua-lib-5.2/lua-lib-5.2.vcxproj deleted file mode 100644 index 6ff0fdc3d8..0000000000 --- a/vs2010/lua-lib-5.2/lua-lib-5.2.vcxproj +++ /dev/null @@ -1,571 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - lua-lib-5.2 - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/luac-5.1/luac-5.1.vcxproj b/vs2010/luac-5.1/luac-5.1.vcxproj deleted file mode 100644 index ae3126feab..0000000000 --- a/vs2010/luac-5.1/luac-5.1.vcxproj +++ /dev/null @@ -1,679 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E} - luac-5.1 - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)luac.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)luac.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - {71f4ff55-2018-4950-9820-251d7c3cdd31} - false - - - {1e2d4a61-74ea-46fb-896d-6926dbca43d0} - false - - - {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} - false - - - - - - \ No newline at end of file diff --git a/vs2010/luac-5.2/luac-5.2.vcxproj b/vs2010/luac-5.2/luac-5.2.vcxproj deleted file mode 100644 index 03a5a8c400..0000000000 --- a/vs2010/luac-5.2/luac-5.2.vcxproj +++ /dev/null @@ -1,667 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {01540EF6-65BB-486D-AE7F-02845FDCA479} - luac-5.2 - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)luac.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)luac.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)luac.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)luac.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - - \ No newline at end of file diff --git a/vs2010/luaext/luaext.vcxproj b/vs2010/luaext/luaext.vcxproj deleted file mode 100644 index e39691ac4b..0000000000 --- a/vs2010/luaext/luaext.vcxproj +++ /dev/null @@ -1,677 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {51007BE8-C720-4A9F-A1BF-C2AA31179E02} - luaext - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - NotSet - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - false - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - NotSet - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - false - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - NotSet - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - false - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;AKU_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - false - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) - $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) - false - $(ProjectDir)exports.def - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - - - - - - - - - - - - - - - - - - - ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) - ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) - ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) - ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) - ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) - ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/luajit-lib/luajit-lib.vcxproj b/vs2010/luajit-lib/luajit-lib.vcxproj deleted file mode 100644 index e0deddd705..0000000000 --- a/vs2010/luajit-lib/luajit-lib.vcxproj +++ /dev/null @@ -1,627 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} - luajit-lib - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - Full - true - Size - true - false - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - Full - true - Size - true - false - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - Full - true - Size - true - false - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Full - true - Size - true - $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - lj_vm.obj;%(AdditionalDependencies) - $(TargetDir)luajit;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {157eb94d-71fa-4e48-a230-6196b1df1b6c} - false - - - - - - \ No newline at end of file diff --git a/vs2010/luajit/luajit.vcxproj b/vs2010/luajit/luajit.vcxproj deleted file mode 100644 index 16552e5006..0000000000 --- a/vs2010/luajit/luajit.vcxproj +++ /dev/null @@ -1,671 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E} - luajit - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - $(OutDir)lua.exe - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - {2bbf2db4-fdc4-478a-be1b-9ba2c14ce237} - false - - - - - - \ No newline at end of file diff --git a/vs2010/minilua/minilua-post.bat b/vs2010/minilua/minilua-post.bat deleted file mode 100644 index e108ede8e8..0000000000 --- a/vs2010/minilua/minilua-post.bat +++ /dev/null @@ -1,6 +0,0 @@ -set minilua=%1 -set outdir=%2 -set luajit=..\..\3rdparty\luajit-2.0.1 - -if not exist %outdir% mkdir -p %outdir% -%minilua% %luajit%\dynasm\dynasm.lua -LN -D WIN -D JIT -D FFI -o %outdir%\buildvm_arch.h %luajit%\src\vm_x86.dasc diff --git a/vs2010/minilua/minilua.vcxproj b/vs2010/minilua/minilua.vcxproj deleted file mode 100644 index 3dbb49decf..0000000000 --- a/vs2010/minilua/minilua.vcxproj +++ /dev/null @@ -1,633 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465} - minilua - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Disabled - %(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - X64 - - - Full - true - Size - true - %(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - - - false - - - %(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit - - - - - - - - - \ No newline at end of file diff --git a/vs2010/moai-exe-server/moai-server.vcxproj b/vs2010/moai-exe-server/moai-server.vcxproj deleted file mode 100644 index 77936dde84..0000000000 --- a/vs2010/moai-exe-server/moai-server.vcxproj +++ /dev/null @@ -1,728 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2} - moai-server-lua-5.1 - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=0;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=0;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=0;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=0;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - - - - - - - {ab0dd232-1af9-4b16-a0f2-5ebf32250f6b} - - - {aa2bd0be-d174-4f8f-a7f7-b924128fed00} - - - {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} - - - {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} - - - {30d318c3-18a8-40b4-adac-3360cdcb4dd4} - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - - - - - - \ No newline at end of file diff --git a/vs2010/moai-exe-test/moai-test.vcxproj b/vs2010/moai-exe-test/moai-test.vcxproj deleted file mode 100644 index 8c04720ab2..0000000000 --- a/vs2010/moai-exe-test/moai-test.vcxproj +++ /dev/null @@ -1,744 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D} - moai-test-lua-5.1 - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_LUAEXT=0;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_LUAEXT=0;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_LUAEXT=0;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_LUAEXT=0;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - - - - - - - - - - - - - - - - - {baaf0611-4ba9-4bdd-9d83-822f3b23aba3} - - - {899650a9-86f0-42df-90d3-e046f4ec2092} - - - {aa2bd0be-d174-4f8f-a7f7-b924128fed00} - - - {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} - - - {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} - - - {30d318c3-18a8-40b4-adac-3360cdcb4dd4} - - - {fa856173-3823-4fff-8207-32db9c1711fa} - - - {6b898b13-e6f1-473c-a020-328da0d50fb9} - - - {c699bb79-8f3f-48a3-a06a-2d4e0ea73360} - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - - - {ad871809-7119-436f-a8aa-2eaf63b35a3c} - - - - - - \ No newline at end of file diff --git a/vs2010/moai-exe/moai.vcxproj b/vs2010/moai-exe/moai.vcxproj deleted file mode 100644 index 2aec658388..0000000000 --- a/vs2010/moai-exe/moai.vcxproj +++ /dev/null @@ -1,732 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {83DE7C0A-667A-4B75-8D00-B575501BC289} - moai-lua-5.1 - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_LUAEXT=0;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;AKU_WITH_LUAEXT=0;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_LUAEXT=0;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;AKU_WITH_LUAEXT=0;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - - - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - - - - - - - - - - - - - - - - - {baaf0611-4ba9-4bdd-9d83-822f3b23aba3} - - - {899650a9-86f0-42df-90d3-e046f4ec2092} - - - {aa2bd0be-d174-4f8f-a7f7-b924128fed00} - - - {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} - - - {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} - - - {30d318c3-18a8-40b4-adac-3360cdcb4dd4} - - - {fa856173-3823-4fff-8207-32db9c1711fa} - - - {c699bb79-8f3f-48a3-a06a-2d4e0ea73360} - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - - - {ad871809-7119-436f-a8aa-2eaf63b35a3c} - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-box2d/moai-lib-box2d.vcxproj b/vs2010/moai-lib-box2d/moai-lib-box2d.vcxproj deleted file mode 100644 index 51fd3aef0c..0000000000 --- a/vs2010/moai-lib-box2d/moai-lib-box2d.vcxproj +++ /dev/null @@ -1,712 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} - moai-lib-box2d - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - box2d.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - box2d.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - box2d.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - box2d.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - box2d.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - box2d.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - box2d.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - box2d.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - box2d.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - box2d.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - box2d.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - box2d.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - {ab0dd232-1af9-4b16-a0f2-5ebf32250f6b} - false - - - {fa856173-3823-4fff-8207-32db9c1711fa} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-chipmunk/moai-lib-chipmunk.vcxproj b/vs2010/moai-lib-chipmunk/moai-lib-chipmunk.vcxproj deleted file mode 100644 index c36066b4bb..0000000000 --- a/vs2010/moai-lib-chipmunk/moai-lib-chipmunk.vcxproj +++ /dev/null @@ -1,694 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {899650A9-86F0-42DF-90D3-E046F4EC2092} - moai-lib-chipmunk - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - chipmunk.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - chipmunk.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - chipmunk.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - chipmunk.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - chipmunk.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - chipmunk.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - chipmunk.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - chipmunk.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - chipmunk.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - chipmunk.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - chipmunk.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - chipmunk.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - {2c12ae60-0d24-4200-99bb-cb49cba3003f} - false - - - {fa856173-3823-4fff-8207-32db9c1711fa} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-core/moai-lib-core.vcxproj b/vs2010/moai-lib-core/moai-lib-core.vcxproj deleted file mode 100644 index 4af3e9e4aa..0000000000 --- a/vs2010/moai-lib-core/moai-lib-core.vcxproj +++ /dev/null @@ -1,729 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} - moai-lib-core-lua-5.1 - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - lua-lib-5.1.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - lua-lib-5.1.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - lua-lib-5.1.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - lua-lib-5.1.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - lua-lib-5.2.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - lua-lib-5.2.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - lua-lib-5.2.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - lua-lib-5.2.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luajit-lib.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luajit-lib.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - luajit-lib.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - luajit-lib.lib;zlib.lib;zl-lib-util.lib;zl-lib-vfs.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - {71f4ff55-2018-4950-9820-251d7c3cdd31} - false - - - {7f4f2d90-99b8-45a2-a089-cbc3df5f34b9} - false - - - {51007be8-c720-4a9f-a1bf-c2aa31179e02} - false - - - {2bbf2db4-fdc4-478a-be1b-9ba2c14ce237} - false - - - {e97a3e3d-01d5-4210-bca0-a6d816624f1a} - false - - - {1e2d4a61-74ea-46fb-896d-6926dbca43d0} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-http-client/moai-lib-http-client.vcxproj b/vs2010/moai-lib-http-client/moai-lib-http-client.vcxproj deleted file mode 100644 index 9e7e6fb540..0000000000 --- a/vs2010/moai-lib-http-client/moai-lib-http-client.vcxproj +++ /dev/null @@ -1,681 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} - moai-lib-http-client - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libcurl.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libcares.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - libcurl.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - libcares.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libcurl.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libcares.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - libcurl.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - libcares.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libcurl.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libcares.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - libcurl.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - libcares.lib;libcurl.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - {41beb1cb-88c0-4c0f-b24e-f5871cf9ee49} - false - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-http-server/moai-lib-http-server.vcxproj b/vs2010/moai-lib-http-server/moai-lib-http-server.vcxproj deleted file mode 100644 index cc3171eae3..0000000000 --- a/vs2010/moai-lib-http-server/moai-lib-http-server.vcxproj +++ /dev/null @@ -1,673 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} - moai-lib-http-server - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - mongoose.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - mongoose.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - mongoose.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - mongoose.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - mongoose.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - mongoose.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - mongoose.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - mongoose.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - mongoose.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - mongoose.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - mongoose.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - mongoose.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - - {d7555f5d-ecfb-4a80-bab6-7a549f19f9a7} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-luaext/moai-lib-luaext.vcxproj b/vs2010/moai-lib-luaext/moai-lib-luaext.vcxproj deleted file mode 100644 index a4b56509b0..0000000000 --- a/vs2010/moai-lib-luaext/moai-lib-luaext.vcxproj +++ /dev/null @@ -1,594 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} - moai-lib-luaext - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - luaext.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-sim/moai-engine.vcxproj b/vs2010/moai-lib-sim/moai-engine.vcxproj deleted file mode 100644 index 604362285d..0000000000 --- a/vs2010/moai-lib-sim/moai-engine.vcxproj +++ /dev/null @@ -1,951 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - moai-lib-sim - {FA856173-3823-4FFF-8207-32DB9C1711FA} - moai-lib-sim - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - freetype.lib;zl-lib-gfx.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - freetype.lib;glew.lib;zl-lib-gfx.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {97d147f3-4dbc-45cd-87eb-6c90eb6efe21} - false - - - {48580411-0a48-46f9-87a6-cf5c9b81d146} - false - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - - {15ea6761-e3c5-4035-97ee-4f74a5acee96} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-sim/moai-engine.vcxproj.filters b/vs2010/moai-lib-sim/moai-engine.vcxproj.filters deleted file mode 100644 index 6602bb2333..0000000000 --- a/vs2010/moai-lib-sim/moai-engine.vcxproj.filters +++ /dev/null @@ -1,895 +0,0 @@ - - - - - {ba17a1a4-fa7c-4073-8f91-57e8ec8a70a3} - - - {85116861-6a89-4d14-a89a-d3e50356df60} - - - {43d76d67-f075-4624-93c1-3d11d55ed4b9} - - - {d294cb72-beb1-415c-87d0-da41f6592c90} - - - {43c61fae-d827-4788-8af8-46be92b8de97} - - - {f83be7b1-d4d2-4d05-9a24-6eacbc9485c0} - - - {d7cfe3f4-9e8d-42ad-913b-ccfd8001524a} - - - {57b19275-cbf4-45db-a6d8-19b759c0a6c0} - - - {fe266c7a-3af2-4989-ae48-01cf85414c4f} - - - {c9421e62-d5f3-4c36-847a-22d075840800} - - - {a15e9f22-4fe4-47f3-a78d-4c1fcfd9c24e} - - - {29e63eaa-7c3e-4fe4-858e-63444b44e084} - - - {5c837ea4-de29-41cb-bb1b-320308e75e40} - - - {bd700d13-9e62-43ea-ba4f-877ef48f56f9} - - - {f4ab8ae5-2f23-4159-b4b7-04e187889cc4} - - - {1811a509-0376-4b94-9995-d747f628f055} - - - {7dbec36e-18a9-4a18-9600-e8ce480f6eb3} - - - {cc4de5c8-b896-48d0-bf2d-30764e74611a} - - - {3f54e247-57ac-4a90-9f40-b8d7fba10602} - - - {0244b9ab-69a3-4ae4-b72f-dd601e7b8302} - - - {84655189-d3fc-48b9-aae3-5986ae40af31} - - - {b9e518e8-5f57-4ce4-95be-aabb672d0379} - - - {6027aae3-a95c-4247-80e7-04d421f0c538} - - - {5ce2e89a-938c-42cf-82cc-05555a82e7be} - - - - - action - - - action - - - action - - - action - - - action - - - anim - - - anim - - - anim - - - anim - - - anim - - - anim - - - anim - - - layer - - - layer - - - layer - - - widgets - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - grid - - - grid - - - grid - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - partition - - - partition - - - partition - - - partition - - - partition - - - partition - - - sim - - - particles - - - particles - - - particles - - - particles - - - particles - - - particles - - - particles - - - particles\plugins - - - particles\plugins - - - particles\plugins - - - node - - - node - - - node - - - transform - - - transform - - - transform - - - prop - - - prop - - - prop - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - camera - - - camera - - - camera - - - camera - - - environment - - - pathfinding - - - pathfinding - - - pathfinding - - - pathfinding - - - texture - - - texture - - - texture - - - texture - - - texture - - - collision - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - text - - - text - - - text - - - text - - - text - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - - - - pathfinding - - - - - action - - - action - - - action - - - action - - - action - - - anim - - - anim - - - anim - - - anim - - - anim - - - anim - - - anim - - - layer - - - layer - - - layer - - - widgets - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - gfx\shaders - - - grid - - - grid - - - grid - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - input - - - partition - - - partition - - - partition - - - partition - - - partition - - - partition - - - sim - - - particles - - - particles - - - particles - - - particles - - - particles - - - particles - - - particles - - - particles - - - particles\plugins - - - particles\plugins - - - particles\plugins - - - node - - - node - - - node - - - node - - - transform - - - transform - - - transform - - - prop - - - prop - - - prop - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - deck - - - camera - - - camera - - - camera - - - camera - - - environment - - - pathfinding - - - pathfinding - - - pathfinding - - - pathfinding - - - texture - - - texture - - - texture - - - texture - - - texture - - - collision - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - profiler - - - text - - - text - - - text - - - text - - - text - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - font - - - - - - - pathfinding - - - \ No newline at end of file diff --git a/vs2010/moai-lib-test/moai-lib-test.vcxproj b/vs2010/moai-lib-test/moai-lib-test.vcxproj deleted file mode 100644 index 4f60ce852c..0000000000 --- a/vs2010/moai-lib-test/moai-lib-test.vcxproj +++ /dev/null @@ -1,595 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {6B898B13-E6F1-473C-A020-328DA0D50FB9} - moai-lib-test - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - - - - - - - - - - - - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-untz/moai-lib-untz.vcxproj b/vs2010/moai-lib-untz/moai-lib-untz.vcxproj deleted file mode 100644 index ec48963501..0000000000 --- a/vs2010/moai-lib-untz/moai-lib-untz.vcxproj +++ /dev/null @@ -1,618 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} - moai-lib-untz - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_EXPORT;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_EXPORT;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - MinSpace - Size - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - false - - - $(OutDir)$(ProjectName).pdb - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - Cdecl - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - libogg.lib;libvorbis.lib;untz.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\win32\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - - - - - - - - - - - - - - - - {3986e679-6e11-4b7a-a00d-9669dedbbc1e} - false - - - {cbd64ddc-70ce-470b-b5ed-e12b59196ee7} - false - - - {fa856173-3823-4fff-8207-32db9c1711fa} - false - - - {76508aad-7030-4fd2-9d05-99184af2baf5} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai-lib-util/moai-lib-util.vcxproj b/vs2010/moai-lib-util/moai-lib-util.vcxproj deleted file mode 100644 index e69e1f5963..0000000000 --- a/vs2010/moai-lib-util/moai-lib-util.vcxproj +++ /dev/null @@ -1,708 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} - moai-lib-util - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - iphlpapi.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - iphlpapi.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;$(TargetDir)luajit;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;$(TargetDir)luajit;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - iphlpapi.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;$(TargetDir)luajit;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\luajit-2.0.1\src;$(TargetDir)luajit;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) - WIN32;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - {aa2bd0be-d174-4f8f-a7f7-b924128fed00} - false - - - - - - \ No newline at end of file diff --git a/vs2010/moai.sln b/vs2010/moai.sln deleted file mode 100644 index 5011db2feb..0000000000 --- a/vs2010/moai.sln +++ /dev/null @@ -1,1592 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rd Party", "3rd Party", "{3C05055B-3444-43CB-8793-D469F0D40706}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{E2D67AF9-792C-4F3B-B969-4914EFF4B03F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{15EA2916-A80B-49D1-8489-93D12ED9D969}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LuaJIT", "LuaJIT", "{F4E9AE38-D526-42DC-B307-9C9D973C4BCD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Moai", "Moai", "{EE001E46-5A97-4A19-BC07-0F4E176C023A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Util", "Util", "{0A0F956C-BC16-4A42-939E-6EA89A1F142E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "box2d", "box2d\box2d.vcxproj", "{AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chipmunk", "chipmunk\chipmunk.vcxproj", "{2C12AE60-0D24-4200-99BB-CB49CBA3003F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "contrib", "contrib\contrib.vcxproj", "{562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expat", "expat\expat.vcxproj", "{860D46BC-EC6B-43C3-B335-3479F096FB1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype\freetype.vcxproj", "{97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "glew\glew.vcxproj", "{48580411-0A48-46F9-87A6-CF5C9B81D146}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jansson", "jansson\jansson.vcxproj", "{52496C82-2EDB-4649-8509-451891F6A3DE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcrypto", "libcrypto\libcrypto.vcxproj", "{956FFE71-66F4-457C-8C88-9F075E4FDE27}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl\libcurl.vcxproj", "{41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpg", "libjpg\libjpg.vcxproj", "{1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libogg\libogg.vcxproj", "{3986E679-6E11-4B7A-A00D-9669DEDBBC1E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng\libpng.vcxproj", "{E4BFD291-B8CF-4D71-9E86-658CD227428D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssl", "libssl\libssl.vcxproj", "{D0F1C892-57F4-4758-A2EE-BFB58DB20987}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbis", "libvorbis\libvorbis.vcxproj", "{CBD64DDC-70CE-470B-B5ED-E12B59196EE7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luaext", "luaext\luaext.vcxproj", "{51007BE8-C720-4A9F-A1BF-C2AA31179E02}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib-5.1", "lua-lib-5.1\lua-lib-5.1.vcxproj", "{71F4FF55-2018-4950-9820-251D7C3CDD31}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib-5.2", "lua-lib-5.2\lua-lib-5.2.vcxproj", "{7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mongoose", "mongoose\mongoose.vcxproj", "{D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfmt", "sfmt\sfmt.vcxproj", "{1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite", "sqlite\sqlite.vcxproj", "{A9935050-2E54-4674-80F8-CFC45A2C106A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml", "tinyxml\tinyxml.vcxproj", "{991EBC54-28FF-44A1-863E-E70617782825}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tlsf", "tlsf\tlsf.vcxproj", "{1E78302D-CF63-4922-8113-DCCD24F94087}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "untz", "untz\untz.vcxproj", "{76508AAD-7030-4FD2-9D05-99184AF2BAF5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{E6C55A0C-B5B7-4963-8F77-19F1624B9F47}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-box2d", "moai-lib-box2d\moai-lib-box2d.vcxproj", "{BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-chipmunk", "moai-lib-chipmunk\moai-lib-chipmunk.vcxproj", "{899650A9-86F0-42DF-90D3-E046F4EC2092}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-core", "moai-lib-core\moai-lib-core.vcxproj", "{AA2BD0BE-D174-4F8F-A7F7-B924128FED00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-fmod-designer", "moai-lib-fmod-designer\moai-lib-fmod-designer.vcxproj", "{7B02E245-7904-4DAA-AD0C-2C9CE881F35B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-fmod-ex", "moai-lib-fmod-ex\moai-lib-fmod-ex.vcxproj", "{E91C1EC3-9421-41F1-95C8-77E4F796F6E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-harness", "moai-lib-harness\moai-lib-harness.vcxproj", "{397A08C8-EF50-470A-9100-5C78FC0F332D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-luaext", "moai-lib-luaext\moai-lib-luaext.vcxproj", "{30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-http-client", "moai-lib-http-client\moai-lib-http-client.vcxproj", "{CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-http-server", "moai-lib-http-server\moai-lib-http-server.vcxproj", "{327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-sim", "moai-lib-sim\moai-engine.vcxproj", "{FA856173-3823-4FFF-8207-32DB9C1711FA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-test", "moai-lib-test\moai-lib-test.vcxproj", "{6B898B13-E6F1-473C-A020-328DA0D50FB9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-untz", "moai-lib-untz\moai-lib-untz.vcxproj", "{C699BB79-8F3F-48A3-A06A-2D4E0EA73360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-util", "moai-lib-util\moai-lib-util.vcxproj", "{9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-gfx", "zl-lib-gfx\zl-lib-gfx.vcxproj", "{15EA6761-E3C5-4035-97EE-4F74A5ACEE96}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-util", "zl-lib-util\zl-lib-util.vcxproj", "{E97A3E3D-01D5-4210-BCA0-A6D816624F1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-vfs", "zl-lib-vfs\zl-lib-vfs.vcxproj", "{1E2D4A61-74EA-46FB-896D-6926DBCA43D0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-5.1", "lua-5.1\lua-5.1.vcxproj", "{CCE1639A-B6FD-4144-A309-741B55DC835D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-5.2", "lua-5.2\lua-5.2.vcxproj", "{1058A5FD-6F00-4D33-BBDC-274077672B1B}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luac-5.1", "luac-5.1\luac-5.1.vcxproj", "{3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luac-5.2", "luac-5.2\luac-5.2.vcxproj", "{01540EF6-65BB-486D-AE7F-02845FDCA479}" - ProjectSection(ProjectDependencies) = postProject - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minilua", "minilua\minilua.vcxproj", "{0ADB3D95-A750-4A3F-B2EB-560A7E29C465}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "buildvm", "buildvm\buildvm.vcxproj", "{157EB94D-71FA-4E48-A230-6196B1DF1B6C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luajit", "luajit\luajit.vcxproj", "{ECCF265E-EB98-45B6-BDB9-FF826302BF5E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luajit-lib", "luajit-lib\luajit-lib.vcxproj", "{2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glewinfo", "glewinfo\glewinfo.vcxproj", "{D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hexdump", "hexdump\hexdump.vcxproj", "{F83A5925-1AD8-4D5D-A134-85AFF1466766}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "visualinfo", "visualinfo\visualinfo.vcxproj", "{CC196C96-AE3D-4E3A-A405-620F83104EB7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "work", "work\work.vcxproj", "{A130115C-B50F-436E-8C90-4243E310DC9C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdl", "sdl\sdl.vcxproj", "{AD871809-7119-436F-A8AA-2EAF63B35A3C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai", "moai-exe\moai.vcxproj", "{83DE7C0A-667A-4B75-8D00-B575501BC289}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-fmod", "moai-exe-fmod\moai-fmod.vcxproj", "{50162269-783B-46FA-A636-ACA4CAF31EE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-server", "moai-exe-server\moai-server.vcxproj", "{4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-test", "moai-exe-test\moai-test.vcxproj", "{E2A74094-D98E-40F2-9123-6E12BD6BBB5D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug-Lua-5.1|Win32 = Debug-Lua-5.1|Win32 - Debug-Lua-5.1|x64 = Debug-Lua-5.1|x64 - Debug-Lua-5.2|Win32 = Debug-Lua-5.2|Win32 - Debug-Lua-5.2|x64 = Debug-Lua-5.2|x64 - Debug-LuaJIT|Win32 = Debug-LuaJIT|Win32 - Debug-LuaJIT|x64 = Debug-LuaJIT|x64 - Release-Lua-5.1|Win32 = Release-Lua-5.1|Win32 - Release-Lua-5.1|x64 = Release-Lua-5.1|x64 - Release-Lua-5.2|Win32 = Release-Lua-5.2|Win32 - Release-Lua-5.2|x64 = Release-Lua-5.2|x64 - Release-LuaJIT|Win32 = Release-LuaJIT|Win32 - Release-LuaJIT|x64 = Release-LuaJIT|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {2C12AE60-0D24-4200-99BB-CB49CBA3003F}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {52496C82-2EDB-4649-8509-451891F6A3DE}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {991EBC54-28FF-44A1-863E-E70617782825}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1E78302D-CF63-4922-8113-DCCD24F94087}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {899650A9-86F0-42DF-90D3-E046F4EC2092}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {397A08C8-EF50-470A-9100-5C78FC0F332D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {A130115C-B50F-436E-8C90-4243E310DC9C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {50162269-783B-46FA-A636-ACA4CAF31EE0}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|Win32.ActiveCfg = Debug-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|Win32.Build.0 = Debug-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|x64.ActiveCfg = Debug-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.1|x64.Build.0 = Debug-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|Win32.ActiveCfg = Debug-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|Win32.Build.0 = Debug-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|x64.ActiveCfg = Debug-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-Lua-5.2|x64.Build.0 = Debug-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|Win32.ActiveCfg = Debug-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|Win32.Build.0 = Debug-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|x64.ActiveCfg = Debug-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug-LuaJIT|x64.Build.0 = Debug-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|Win32.ActiveCfg = Release-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|Win32.Build.0 = Release-Lua-5.1|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|x64.ActiveCfg = Release-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.1|x64.Build.0 = Release-Lua-5.1|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|Win32.ActiveCfg = Release-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|Win32.Build.0 = Release-Lua-5.2|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|x64.ActiveCfg = Release-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-Lua-5.2|x64.Build.0 = Release-Lua-5.2|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|Win32.ActiveCfg = Release-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|Win32.Build.0 = Release-LuaJIT|Win32 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|x64.ActiveCfg = Release-LuaJIT|x64 - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release-LuaJIT|x64.Build.0 = Release-LuaJIT|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} = {3C05055B-3444-43CB-8793-D469F0D40706} - {2C12AE60-0D24-4200-99BB-CB49CBA3003F} = {3C05055B-3444-43CB-8793-D469F0D40706} - {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} = {3C05055B-3444-43CB-8793-D469F0D40706} - {860D46BC-EC6B-43C3-B335-3479F096FB1B} = {3C05055B-3444-43CB-8793-D469F0D40706} - {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} = {3C05055B-3444-43CB-8793-D469F0D40706} - {48580411-0A48-46F9-87A6-CF5C9B81D146} = {3C05055B-3444-43CB-8793-D469F0D40706} - {52496C82-2EDB-4649-8509-451891F6A3DE} = {3C05055B-3444-43CB-8793-D469F0D40706} - {956FFE71-66F4-457C-8C88-9F075E4FDE27} = {3C05055B-3444-43CB-8793-D469F0D40706} - {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} = {3C05055B-3444-43CB-8793-D469F0D40706} - {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} = {3C05055B-3444-43CB-8793-D469F0D40706} - {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} = {3C05055B-3444-43CB-8793-D469F0D40706} - {E4BFD291-B8CF-4D71-9E86-658CD227428D} = {3C05055B-3444-43CB-8793-D469F0D40706} - {D0F1C892-57F4-4758-A2EE-BFB58DB20987} = {3C05055B-3444-43CB-8793-D469F0D40706} - {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} = {3C05055B-3444-43CB-8793-D469F0D40706} - {51007BE8-C720-4A9F-A1BF-C2AA31179E02} = {3C05055B-3444-43CB-8793-D469F0D40706} - {71F4FF55-2018-4950-9820-251D7C3CDD31} = {3C05055B-3444-43CB-8793-D469F0D40706} - {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {3C05055B-3444-43CB-8793-D469F0D40706} - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} = {3C05055B-3444-43CB-8793-D469F0D40706} - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} = {3C05055B-3444-43CB-8793-D469F0D40706} - {A9935050-2E54-4674-80F8-CFC45A2C106A} = {3C05055B-3444-43CB-8793-D469F0D40706} - {991EBC54-28FF-44A1-863E-E70617782825} = {3C05055B-3444-43CB-8793-D469F0D40706} - {1E78302D-CF63-4922-8113-DCCD24F94087} = {3C05055B-3444-43CB-8793-D469F0D40706} - {76508AAD-7030-4FD2-9D05-99184AF2BAF5} = {3C05055B-3444-43CB-8793-D469F0D40706} - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {3C05055B-3444-43CB-8793-D469F0D40706} - {AD871809-7119-436F-A8AA-2EAF63B35A3C} = {3C05055B-3444-43CB-8793-D469F0D40706} - {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {899650A9-86F0-42DF-90D3-E046F4EC2092} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {7B02E245-7904-4DAA-AD0C-2C9CE881F35B} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {E91C1EC3-9421-41F1-95C8-77E4F796F6E9} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {397A08C8-EF50-470A-9100-5C78FC0F332D} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {FA856173-3823-4FFF-8207-32DB9C1711FA} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {6B898B13-E6F1-473C-A020-328DA0D50FB9} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} - {CCE1639A-B6FD-4144-A309-741B55DC835D} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {1058A5FD-6F00-4D33-BBDC-274077672B1B} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {01540EF6-65BB-486D-AE7F-02845FDCA479} = {15EA2916-A80B-49D1-8489-93D12ED9D969} - {0ADB3D95-A750-4A3F-B2EB-560A7E29C465} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {157EB94D-71FA-4E48-A230-6196B1DF1B6C} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {ECCF265E-EB98-45B6-BDB9-FF826302BF5E} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} - {83DE7C0A-667A-4B75-8D00-B575501BC289} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {50162269-783B-46FA-A636-ACA4CAF31EE0} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {E2A74094-D98E-40F2-9123-6E12BD6BBB5D} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} - {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - {F83A5925-1AD8-4D5D-A134-85AFF1466766} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - {CC196C96-AE3D-4E3A-A405-620F83104EB7} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - {A130115C-B50F-436E-8C90-4243E310DC9C} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - AMDCaPersistentConfig = Debug|Win32 - AMDCaPersistentStartup = moai (Utilities\moai) - AMDCaProjectFile = C:\Documents and Settings\Patrick\My Documents\git\moai\vs2008\CodeAnalyst\moai.caw - EndGlobalSection -EndGlobal diff --git a/vs2010/mongoose/mongoose.vcxproj b/vs2010/mongoose/mongoose.vcxproj deleted file mode 100644 index 4532ca6077..0000000000 --- a/vs2010/mongoose/mongoose.vcxproj +++ /dev/null @@ -1,486 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} - mongoose - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/msbuild.xml b/vs2010/msbuild.xml deleted file mode 100644 index b154b3829c..0000000000 --- a/vs2010/msbuild.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/vs2010/sdl/sdl.vcxproj b/vs2010/sdl/sdl.vcxproj deleted file mode 100644 index ca840e4e44..0000000000 --- a/vs2010/sdl/sdl.vcxproj +++ /dev/null @@ -1,730 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {AD871809-7119-436F-A8AA-2EAF63B35A3C} - sdl - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/sdl/sdl.vcxproj.filters b/vs2010/sdl/sdl.vcxproj.filters deleted file mode 100644 index 7c5176b526..0000000000 --- a/vs2010/sdl/sdl.vcxproj.filters +++ /dev/null @@ -1,352 +0,0 @@ - - - - - {83c79055-f636-4b58-9d66-b4e4aebf37bf} - - - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - API Headers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/sfmt/sfmt.vcxproj b/vs2010/sfmt/sfmt.vcxproj deleted file mode 100644 index 23bbab32d3..0000000000 --- a/vs2010/sfmt/sfmt.vcxproj +++ /dev/null @@ -1,500 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} - sfmt - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/sqlite/sqlite.vcxproj b/vs2010/sqlite/sqlite.vcxproj deleted file mode 100644 index 6f3d9d1584..0000000000 --- a/vs2010/sqlite/sqlite.vcxproj +++ /dev/null @@ -1,517 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {A9935050-2E54-4674-80F8-CFC45A2C106A} - sqlite - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - $(IntDir) - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/tinyxml/tinyxml.vcxproj b/vs2010/tinyxml/tinyxml.vcxproj deleted file mode 100644 index 59c9a835d2..0000000000 --- a/vs2010/tinyxml/tinyxml.vcxproj +++ /dev/null @@ -1,512 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {991EBC54-28FF-44A1-863E-E70617782825} - tinyxml - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/tlsf/tlsf.vcxproj b/vs2010/tlsf/tlsf.vcxproj deleted file mode 100644 index 748c8767ef..0000000000 --- a/vs2010/tlsf/tlsf.vcxproj +++ /dev/null @@ -1,481 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {1E78302D-CF63-4922-8113-DCCD24F94087} - tlsf - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - %(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - %(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - %(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - %(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2010/untz/untz.vcxproj b/vs2010/untz/untz.vcxproj deleted file mode 100644 index 0d97210a13..0000000000 --- a/vs2010/untz/untz.vcxproj +++ /dev/null @@ -1,566 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {76508AAD-7030-4FD2-9D05-99184AF2BAF5} - untz - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;__WINDOWS_DS__;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;__WINDOWS_DS__;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;__WINDOWS_DS__;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;__WINDOWS_DS__;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;__WINDOWS_DS__;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - Cdecl - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;__WINDOWS_DS__;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsCpp - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - - - \ No newline at end of file diff --git a/vs2010/visualinfo/visualinfo.vcxproj b/vs2010/visualinfo/visualinfo.vcxproj deleted file mode 100644 index e060b296e1..0000000000 --- a/vs2010/visualinfo/visualinfo.vcxproj +++ /dev/null @@ -1,677 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {CC196C96-AE3D-4E3A-A405-620F83104EB7} - visualinfo - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" -xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" - - - - - - - - {48580411-0a48-46f9-87a6-cf5c9b81d146} - false - - - {1e2d4a61-74ea-46fb-896d-6926dbca43d0} - false - - - {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} - false - - - - - - \ No newline at end of file diff --git a/vs2010/work/work.vcxproj b/vs2010/work/work.vcxproj deleted file mode 100644 index 239b8f054c..0000000000 --- a/vs2010/work/work.vcxproj +++ /dev/null @@ -1,754 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {A130115C-B50F-436E-8C90-4243E310DC9C} - work - Win32Proj - - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - NotSet - false - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;GLUTHOST_USE_LUAEXT;GLUTHOST_USE_PARTICLE_PRESETS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;GLUTHOST_USE_LUAEXT;GLUTHOST_USE_PARTICLE_PRESETS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_DLL;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;$(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;GLUTHOST_USE_LUAEXT;GLUTHOST_USE_PARTICLE_PRESETS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX86 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;$(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_DLL;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - false - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - NotSet - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - - - false - - - MachineX64 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;$(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;GLUTHOST_USE_LUAEXT;GLUTHOST_USE_PARTICLE_PRESETS;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX86 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - X64 - - - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;$(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_DLL;%(PreprocessorDefinitions) - MultiThreadedDLL - false - false - false - - - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) - false - true - Console - true - true - false - - - MachineX64 - - - xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" - - - - - - - - - - - - - - - - - - - - - - - - - - {baaf0611-4ba9-4bdd-9d83-822f3b23aba3} - false - - - {899650a9-86f0-42df-90d3-e046f4ec2092} - false - - - {aa2bd0be-d174-4f8f-a7f7-b924128fed00} - false - - - {397a08c8-ef50-470a-9100-5c78fc0f332d} - false - - - {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} - false - - - {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} - false - - - {30d318c3-18a8-40b4-adac-3360cdcb4dd4} - false - - - {fa856173-3823-4fff-8207-32db9c1711fa} - false - - - {6b898b13-e6f1-473c-a020-328da0d50fb9} - false - - - {c699bb79-8f3f-48a3-a06a-2d4e0ea73360} - false - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - - - - - \ No newline at end of file diff --git a/vs2010/zl-lib-gfx/zl-lib-gfx.vcxproj b/vs2010/zl-lib-gfx/zl-lib-gfx.vcxproj deleted file mode 100644 index 881d9544b5..0000000000 --- a/vs2010/zl-lib-gfx/zl-lib-gfx.vcxproj +++ /dev/null @@ -1,656 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} - zl-lib-gfx - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - iphlpapi.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - iphlpapi.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - iphlpapi.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - - - \ No newline at end of file diff --git a/vs2010/zl-lib-util/zl-lib-util.vcxproj b/vs2010/zl-lib-util/zl-lib-util.vcxproj deleted file mode 100644 index 24d2405a42..0000000000 --- a/vs2010/zl-lib-util/zl-lib-util.vcxproj +++ /dev/null @@ -1,864 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} - zl-lib-util - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - false - - - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - contrib.lib;expat.lib;jansson.lib;libcrypto.lib;libjpg.lib;libpng.lib;libssl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - {562b9eef-2a2e-46e1-8a28-550c86cdf9f6} - false - - - {860d46bc-ec6b-43c3-b335-3479f096fb1b} - false - - - {52496c82-2edb-4649-8509-451891f6a3de} - false - - - {956ffe71-66f4-457c-8c88-9f075e4fde27} - false - - - {1f65fe7f-80d7-4380-bdd3-2546d7c2dff0} - false - - - {e4bfd291-b8cf-4d71-9e86-658cd227428d} - false - - - {d0f1c892-57f4-4758-a2ee-bfb58db20987} - false - - - {1dc6bd91-b45f-442a-ae6c-88ab5dcf0ce2} - false - - - {a9935050-2e54-4674-80f8-cfc45a2c106a} - false - - - {991ebc54-28ff-44a1-863e-e70617782825} - false - - - - - - \ No newline at end of file diff --git a/vs2010/zl-lib-util/zl-lib-util.vcxproj.filters b/vs2010/zl-lib-util/zl-lib-util.vcxproj.filters deleted file mode 100644 index 5f295be7b6..0000000000 --- a/vs2010/zl-lib-util/zl-lib-util.vcxproj.filters +++ /dev/null @@ -1,501 +0,0 @@ - - - - - {638ca30a-eb05-4cae-b4e8-1ab2051ac574} - - - {5b003239-caa7-4cfa-b062-53b369f36307} - - - {1a424aca-d08f-4697-bf0b-c285762c8b76} - - - {85880e49-6631-4d55-98e2-35238c1b2ead} - - - {3c733a8c-dd63-416e-87fb-b7621b3abea5} - - - {ec0eb5a6-f73e-4340-a61e-a8e7dc5256f7} - - - {abbe3f8c-4979-4a4d-9615-1cd4604561d6} - - - {29a65f59-ce5d-493d-8792-ec25e026a5a0} - - - {b5a094f8-015f-4a22-b5fd-cacd1b5accb9} - - - {2e1d403f-f2c2-475f-9753-ea871fa61f41} - - - {eb53b491-ef2f-4b1a-bc58-bd2af7f2cc29} - - - {d347566c-f0f4-4570-ba37-574c07542438} - - - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - stl - - - stl - - - stl - - - stl - - - stl - - - stl - - - templates - - - templates - - - templates - - - templates - - - templates - - - templates - - - templates - - - time - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - stream - - - stream - - - stream - - - stream - - - stream - - - stream - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - zip - - - zip - - - gfxObjects - - - gfxObjects - - - parser - - - parser - - - parser - - - parser - - - parser - - - xml - - - - - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - util - - - stl - - - time - - - time - - - time - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - stream - - - stream - - - stream - - - stream - - - stream - - - stream - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\encoding - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - stream\hash - - - zip - - - zip - - - gfxObjects - - - parser - - - parser - - - parser - - - parser - - - parser - - - xml - - - - \ No newline at end of file diff --git a/vs2010/zl-lib-vfs/zl-lib-vfs.vcxproj b/vs2010/zl-lib-vfs/zl-lib-vfs.vcxproj deleted file mode 100644 index 6828497454..0000000000 --- a/vs2010/zl-lib-vfs/zl-lib-vfs.vcxproj +++ /dev/null @@ -1,705 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} - zl-lib-vfs - Win32Proj - - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - %(ForcedIncludeFiles) - - - false - - - tlsf.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - %(ForcedIncludeFiles) - - - tlsf.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - %(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - tlsf.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - %(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - tlsf.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - %(ForcedIncludeFiles) - - - false - - - tlsf.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - %(ForcedIncludeFiles) - - - tlsf.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - %(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - tlsf.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - %(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - tlsf.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - ProgramDatabase - %(ForcedIncludeFiles) - - - false - - - tlsf.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreadedDebugDLL - false - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - %(ForcedIncludeFiles) - - - tlsf.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - Full - false - Speed - false - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - NotSet - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level4 - - - %(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - tlsf.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - true - - - - - - - - - - - - - X64 - - - Full - true - Size - true - true - ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) - WIN32;_LIB;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_STATIC;XML_STATIC;%(PreprocessorDefinitions) - true - Sync - MultiThreadedDLL - false - StreamingSIMDExtensions - false - false - false - Use - pch.h - $(OutDir)$(ProjectName).pdb - Level3 - ProgramDatabase - %(ForcedIncludeFiles) - - - /LTCG %(AdditionalOptions) - tlsf.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).lib - ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) - - - xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\windows\bin\" - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {1e78302d-cf63-4922-8113-dccd24f94087} - false - - - {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} - false - - - - - - \ No newline at end of file diff --git a/vs2010/zlib/zlib.vcxproj b/vs2010/zlib/zlib.vcxproj deleted file mode 100644 index e52b798248..0000000000 --- a/vs2010/zlib/zlib.vcxproj +++ /dev/null @@ -1,507 +0,0 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} - zlib - Win32Proj - - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - NotSet - false - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Disabled - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - Full - true - Size - true - false - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - X64 - - - Full - true - Size - true - ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - $(OutDir)$(ProjectName).pdb - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vs2015/.gitignore b/vs2015/.gitignore new file mode 100644 index 0000000000..e9b4b4bee0 --- /dev/null +++ b/vs2015/.gitignore @@ -0,0 +1,15 @@ +.vs/ +bin/ +ipch/ +Win32/ +x64/ +Debug*/ +Release*/ +CodeAnalyst/ +*.vcproj +*.opendb +*.opensdf +*.user +*.ncb +*.suo +*.sdf diff --git a/vs2015/box2d/box2d.vcxproj b/vs2015/box2d/box2d.vcxproj new file mode 100644 index 0000000000..7eddd5daa6 --- /dev/null +++ b/vs2015/box2d/box2d.vcxproj @@ -0,0 +1,289 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} + box2d + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + Unicode + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\box2d-2.3.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\box2d-2.3.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\box2d-2.3.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\box2d-2.3.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/box2d/box2d.vcxproj.filters b/vs2015/box2d/box2d.vcxproj.filters new file mode 100644 index 0000000000..dbfa6783a5 --- /dev/null +++ b/vs2015/box2d/box2d.vcxproj.filters @@ -0,0 +1,307 @@ + + + + + {7c70d25b-d854-4eb3-af95-c5894b1946d6} + + + {0b34f63b-6114-4e4e-a40f-0d7c39834f95} + + + {947cbe5d-cb4c-430f-b7c6-320ec3c4a6af} + + + {82c36a64-e425-4902-8740-36425288a3f1} + + + {98726924-cfb3-49ed-aef4-be4f9c86b4ce} + + + {f129471d-38ee-49dd-9176-5a65cfa12f6e} + + + {71e5f545-81ee-460b-aa3a-1a9b2db69637} + + + + + + Collision\Shapes + + + Collision\Shapes + + + Collision\Shapes + + + Collision\Shapes + + + Collision\Shapes + + + Collision + + + Collision + + + Collision + + + Collision + + + Collision + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Rope + + + + + Collision\Shapes + + + Collision\Shapes + + + Collision\Shapes + + + Collision\Shapes + + + Collision + + + Collision + + + Collision + + + Collision + + + Collision + + + Collision + + + Collision + + + Collision + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Contacts + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Dynamics\Joints + + + Rope + + + \ No newline at end of file diff --git a/vs2015/buildvm/buildvm-post.bat b/vs2015/buildvm/buildvm-post.bat new file mode 100644 index 0000000000..bac31c9efb --- /dev/null +++ b/vs2015/buildvm/buildvm-post.bat @@ -0,0 +1,15 @@ +set buildvm=%1 +set outdir=%2 + +if not exist %outdir% mkdir -p %outdir% + +set src=..\..\3rdparty\luajit-2.0.3\src +set sources=%src%\lib_base.c %src%\lib_math.c %src%\lib_bit.c %src%\lib_string.c %src%\lib_table.c %src%\lib_io.c %src%\lib_os.c %src%\lib_package.c %src%\lib_debug.c %src%\lib_jit.c %src%\lib_ffi.c + +%buildvm% -m peobj -o %outdir%\lj_vm.obj %sources% +%buildvm% -m bcdef -o %outdir%\lj_bcdef.h %sources% +%buildvm% -m ffdef -o %outdir%\lj_ffdef.h %sources% +%buildvm% -m libdef -o %outdir%\lj_libdef.h %sources% +%buildvm% -m recdef -o %outdir%\lj_recdef.h %sources% +%buildvm% -m vmdef -o %outdir%\vmdef.lua %sources% +%buildvm% -m folddef -o %outdir%\lj_folddef.h %src%\lj_opt_fold.c diff --git a/vs2015/buildvm/buildvm.vcxproj b/vs2015/buildvm/buildvm.vcxproj new file mode 100644 index 0000000000..7e1633ed51 --- /dev/null +++ b/vs2015/buildvm/buildvm.vcxproj @@ -0,0 +1,254 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {157EB94D-71FA-4E48-A230-6196B1DF1B6C} + buildvm + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.3\src;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + X64 + + + Disabled + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + Full + true + Size + true + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.3\src;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + X64 + + + Full + true + Size + true + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + buildvm-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + {0adb3d95-a750-4a3f-b2eb-560a7e29c465} + false + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/contrib/contrib.vcxproj b/vs2015/contrib/contrib.vcxproj new file mode 100644 index 0000000000..d85abd2b91 --- /dev/null +++ b/vs2015/contrib/contrib.vcxproj @@ -0,0 +1,204 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} + contrib + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\contrib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/expat/expat.vcxproj b/vs2015/expat/expat.vcxproj new file mode 100644 index 0000000000..87de51f0ad --- /dev/null +++ b/vs2015/expat/expat.vcxproj @@ -0,0 +1,220 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + {860D46BC-EC6B-43C3-B335-3479F096FB1B} + expat + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_MEMMOVE;XML_STATIC;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/freetype/freetype.vcxproj b/vs2015/freetype/freetype.vcxproj new file mode 100644 index 0000000000..5208a24116 --- /dev/null +++ b/vs2015/freetype/freetype.vcxproj @@ -0,0 +1,607 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} + + + + StaticLibrary + false + NotSet + v140 + + + StaticLibrary + false + NotSet + v140 + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + false + + + $(IntDir) + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + false + + + $(IntDir) + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Disabled + ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(IntDir) + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(IntDir) + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + Disabled + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + EnableFastChecks + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MaxSpeed + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/freetype/freetype.vcxproj.filters b/vs2015/freetype/freetype.vcxproj.filters similarity index 97% rename from vs2010/freetype/freetype.vcxproj.filters rename to vs2015/freetype/freetype.vcxproj.filters index 8fb0cf22be..6db25f49d7 100644 --- a/vs2010/freetype/freetype.vcxproj.filters +++ b/vs2015/freetype/freetype.vcxproj.filters @@ -1,155 +1,155 @@ - - - - - {fd200dda-5e6d-4796-bfae-793a5fa9bfd3} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {ad522192-7de5-43c2-8fb9-2ac33fbf679b} - - - {fbefacd3-8e15-4848-9b4b-5066a036ab65} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - Source Files\FT_MODULES - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - + + + + + {fd200dda-5e6d-4796-bfae-793a5fa9bfd3} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {ad522192-7de5-43c2-8fb9-2ac33fbf679b} + + + {fbefacd3-8e15-4848-9b4b-5066a036ab65} + h;hpp;hxx;hm;inl + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + Source Files\FT_MODULES + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + \ No newline at end of file diff --git a/vs2015/glew/glew.vcxproj b/vs2015/glew/glew.vcxproj new file mode 100644 index 0000000000..1c3a34043d --- /dev/null +++ b/vs2015/glew/glew.vcxproj @@ -0,0 +1,192 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {48580411-0A48-46F9-87A6-CF5C9B81D146} + glew + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/glewinfo/glewinfo.vcxproj b/vs2015/glewinfo/glewinfo.vcxproj new file mode 100644 index 0000000000..ab2add6948 --- /dev/null +++ b/vs2015/glewinfo/glewinfo.vcxproj @@ -0,0 +1,255 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3} + glewinfo + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" +xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + + + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + {48580411-0a48-46f9-87a6-cf5c9b81d146} + false + + + {1e2d4a61-74ea-46fb-896d-6926dbca43d0} + false + + + {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} + false + + + + + + \ No newline at end of file diff --git a/vs2015/hexdump/hexdump.vcxproj b/vs2015/hexdump/hexdump.vcxproj new file mode 100644 index 0000000000..d836cc95af --- /dev/null +++ b/vs2015/hexdump/hexdump.vcxproj @@ -0,0 +1,260 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F83A5925-1AD8-4D5D-A134-85AFF1466766} + hexdump + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + + + false + + + MachineX86 + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;_BOOL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" +xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + + + + + + + X64 + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.1.2\Box2D;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-util.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + {1e2d4a61-74ea-46fb-896d-6926dbca43d0} + false + + + {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} + false + + + + + + \ No newline at end of file diff --git a/vs2008/hexdump/main.cpp b/vs2015/hexdump/main.cpp similarity index 100% rename from vs2008/hexdump/main.cpp rename to vs2015/hexdump/main.cpp diff --git a/vs2015/jansson/jansson.vcxproj b/vs2015/jansson/jansson.vcxproj new file mode 100644 index 0000000000..d1a4846884 --- /dev/null +++ b/vs2015/jansson/jansson.vcxproj @@ -0,0 +1,245 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + {52496C82-2EDB-4649-8509-451891F6A3DE} + jansson + Win32Proj + 8.1 + + + + StaticLibrary + false + v140 + NotSet + + + StaticLibrary + false + v140 + NotSet + + + StaticLibrary + true + v140 + NotSet + + + StaticLibrary + v140 + NotSet + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_STDINT_H;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + false + true + Sync + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_STDINT_H;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + false + false + pch.h + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + true + Sync + + + opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) + NotSet + $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) + false + $(ProjectDir)exports.def + true + Console + + + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + MinSpace + Size + false + ..\..\src;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_STDINT_H;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + ..\..\src;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;HAVE_STDINT_H;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + pch.h + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + + + opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) + $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) + false + $(ProjectDir)exports.def + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/kissfft/kissfft.vcxproj b/vs2015/kissfft/kissfft.vcxproj new file mode 100644 index 0000000000..560f4e4acc --- /dev/null +++ b/vs2015/kissfft/kissfft.vcxproj @@ -0,0 +1,205 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + {23FA2A9C-429A-4BE6-A540-F80B061EE58A} + kissfft + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\kissfft;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\kissfft;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\kissfft;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\kissfft;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2010/libcares/libcares.vcxproj b/vs2015/libcares/libcares.vcxproj similarity index 98% rename from vs2010/libcares/libcares.vcxproj rename to vs2015/libcares/libcares.vcxproj index 6ace999092..9ff6f58f47 100644 --- a/vs2010/libcares/libcares.vcxproj +++ b/vs2015/libcares/libcares.vcxproj @@ -1,766 +1,766 @@ - - - - - Debug-Lua-5.1 - Win32 - - - Debug-Lua-5.1 - x64 - - - Debug-Lua-5.2 - Win32 - - - Debug-Lua-5.2 - x64 - - - Debug-LuaJIT - Win32 - - - Debug-LuaJIT - x64 - - - Release-Lua-5.1 - Win32 - - - Release-Lua-5.1 - x64 - - - Release-Lua-5.2 - Win32 - - - Release-Lua-5.2 - x64 - - - Release-LuaJIT - Win32 - - - Release-LuaJIT - x64 - - - - {61DF1CB3-8AAE-4FDD-8471-297FE355165C} - libcares - Win32Proj - - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - NotSet - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - StaticLibrary - false - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - ..\bin\$(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\ - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - %(ForcedUsingFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Debug/libcurl.tlb - - - - - Disabled - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - .\Debug/libcurl.pch - .\Debug/ - .\Debug/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Debug/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - - - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - zipfs/zipfs_replace.h;%(ForcedUsingFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\Release/libcurl.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - .\Release/libcurl.pch - .\Release/ - .\Release/ - $(OutDir)$(ProjectName).pdb - true - TurnOffAllWarnings - true - ProgramDatabase - CompileAsC - zl-vfs/zl_replace.h;%(ForcedIncludeFiles) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - true - .\Release/libcurl.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug-Lua-5.1 + Win32 + + + Debug-Lua-5.1 + x64 + + + Debug-Lua-5.2 + Win32 + + + Debug-Lua-5.2 + x64 + + + Debug-LuaJIT + Win32 + + + Debug-LuaJIT + x64 + + + Release-Lua-5.1 + Win32 + + + Release-Lua-5.1 + x64 + + + Release-Lua-5.2 + Win32 + + + Release-Lua-5.2 + x64 + + + Release-LuaJIT + Win32 + + + Release-LuaJIT + x64 + + + + {61DF1CB3-8AAE-4FDD-8471-297FE355165C} + libcares + Win32Proj + + + + StaticLibrary + false + NotSet + + + StaticLibrary + false + NotSet + + + StaticLibrary + false + NotSet + + + StaticLibrary + false + NotSet + + + StaticLibrary + false + NotSet + + + StaticLibrary + false + NotSet + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + StaticLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/libcurl.pch + .\Release/ + .\Release/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/libcurl.pch + .\Release/ + .\Release/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + .\Debug/libcurl.pch + .\Debug/ + .\Debug/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + .\Debug/libcurl.pch + .\Debug/ + .\Debug/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + .\Debug/libcurl.pch + .\Debug/ + .\Debug/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + .\Debug/libcurl.pch + .\Debug/ + .\Debug/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/libcurl.pch + .\Release/ + .\Release/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/libcurl.pch + .\Release/ + .\Release/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + .\Debug/libcurl.pch + .\Debug/ + .\Debug/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + .\Debug/libcurl.pch + .\Debug/ + .\Debug/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;CARES_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/libcurl.pch + .\Release/ + .\Release/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/libcurl.pch + .\Release/ + .\Release/ + $(OutDir)$(ProjectName).pdb + true + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/libcrypto/libcrypto.vcxproj b/vs2015/libcrypto/libcrypto.vcxproj new file mode 100644 index 0000000000..e3884290dc --- /dev/null +++ b/vs2015/libcrypto/libcrypto.vcxproj @@ -0,0 +1,808 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {956FFE71-66F4-457C-8C88-9F075E4FDE27} + libcrypto + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_ASM;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_JPAKE;OPENSSL_NO_KRB5;OPENSSL_NO_MD2;OPENSSL_NO_MDC2;OPENSSL_NO_RC5;OPENSSL_NO_RIPEMD;OPENSSL_NO_STATIC_ENGINE;OPENSSL_NO_WHIRLPOOL;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + 4068;%(DisableSpecificWarnings) + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_ASM;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_JPAKE;OPENSSL_NO_KRB5;OPENSSL_NO_MD2;OPENSSL_NO_MDC2;OPENSSL_NO_RC5;OPENSSL_NO_RIPEMD;OPENSSL_NO_STATIC_ENGINE;OPENSSL_NO_WHIRLPOOL;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_ASM;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_JPAKE;OPENSSL_NO_KRB5;OPENSSL_NO_MD2;OPENSSL_NO_MDC2;OPENSSL_NO_RC5;OPENSSL_NO_RIPEMD;OPENSSL_NO_STATIC_ENGINE;OPENSSL_NO_WHIRLPOOL;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + 4068;%(DisableSpecificWarnings) + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_ASM;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_JPAKE;OPENSSL_NO_KRB5;OPENSSL_NO_MD2;OPENSSL_NO_MDC2;OPENSSL_NO_RC5;OPENSSL_NO_RIPEMD;OPENSSL_NO_STATIC_ENGINE;OPENSSL_NO_WHIRLPOOL;OPENSSL_SYSNAME_WIN32;WIN32_LEAN_AND_MEAN;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/libcrypto/libcrypto.vcxproj.filters b/vs2015/libcrypto/libcrypto.vcxproj.filters new file mode 100644 index 0000000000..6bb7681864 --- /dev/null +++ b/vs2015/libcrypto/libcrypto.vcxproj.filters @@ -0,0 +1,1925 @@ + + + + + {d6c480e0-64e1-49d8-9e19-851a388e1f53} + + + {6dc20c53-0d0a-4081-8fa4-b514748c39a0} + + + {dde45d06-d1df-48a5-9f91-c881a7ddad9d} + + + {cd5d582f-3445-477f-8e42-e0c9c8032bcf} + + + {63b9e0c5-ae4f-4b03-8ae2-76ee1cd44867} + + + {c6e68c3a-cccb-4fe5-9a4b-efbed40f7fbf} + + + {b6c37592-a07c-4f12-b9dc-93563b9c625e} + + + {5f93f782-fcb8-4d37-ba09-cd5c69c858d0} + + + {393e918b-221d-4cd2-ad71-e84d349ab696} + + + {3dbf93dd-7220-4615-a7cd-993bd198f38f} + + + {97378466-4c67-479a-bc69-0f64f0f7dba7} + + + {87ca39c6-27c5-44b6-a66b-08e0e7951253} + + + {a26a5829-48c7-4269-968d-b7bf4874352d} + + + {342c46b9-1f4d-46c5-8bd2-95cdcb02170f} + + + {91e1d939-1d60-4433-9f86-4a88234cc709} + + + {301cc97b-888c-4e0e-b9bc-26ffab2669a7} + + + {da0656ab-23a0-4674-823f-fa40bb4f8574} + + + {27d588d9-04df-4ebe-af13-93dc83ee1834} + + + {667572d9-3c75-4650-86d6-52bab81942de} + + + {11da3ac6-547f-41dc-bc63-958baa9af258} + + + {fec1eebf-cb0f-4099-9311-84548feb3f2a} + + + {bd7ac231-71ce-454a-9047-f73816e4c75b} + + + {d516b3c8-81f8-4696-aad8-d9f301d1888a} + + + {0ac750d6-2233-4aec-81ab-3081da9a7a6e} + + + {2957d51e-6d6a-4c61-b251-19499f7a3c28} + + + {47b8c8b3-9a53-4c86-9eb8-ec06d8854b72} + + + {6e8d8729-c0dd-4d63-95ec-e1d21b91cbf1} + + + {de8db171-712d-4b6f-a24a-d68fcd4a740c} + + + {46100ce3-a1db-4839-b20e-9253ad31c7bf} + + + {e6a8ac76-c4af-4a05-b854-ec69d0c4ae3a} + + + {94ce6c4f-d88e-44eb-84c9-cbabf6df17db} + + + {ab91e436-e20a-49fe-95c0-b44480afd2ca} + + + {aff7d767-95b8-43cb-933d-661d40202ca7} + + + {f3064978-d4ff-4296-8134-46010fec333d} + + + {18b22eeb-8415-4f8f-8c18-fff16764b1d1} + + + {a1110f09-946c-42e6-b443-b91c285a80e8} + + + {5d1e9e5b-2bdc-4e6f-a95f-66aacef242cc} + + + {8068dc42-d4be-4800-9107-1eeb6fb4be8d} + + + {95348050-ef61-4410-bace-6f70e63f4a40} + + + {59a13dcc-9598-4aee-962c-56b5b2069cba} + + + {76c64418-c46f-4e0f-b8fd-ef66b495f22f} + + + {0bc5adbd-bf91-4d8d-ba29-eb365e355b4a} + + + + + aes + + + aes + + + des + + + des + + + des + + + des + + + des + + + comp + + + rc2 + + + rc2 + + + rc4 + + + rc4 + + + md5 + + + md5 + + + sha + + + sha + + + md4 + + + md4 + + + rand + + + rand + + + x509 + + + x509 + + + evp + + + evp + + + ocsp + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + stack + + + stack + + + bn + + + bn + + + bn + + + lhash + + + objects + + + objects + + + objects + + + objects + + + buffer + + + rsa + + + rsa + + + hmac + + + pem + + + pem + + + dsa + + + dsa + + + dh + + + pkcs7 + + + x509v3 + + + x509v3 + + + x509v3 + + + conf + + + conf + + + conf + + + pkcs12 + + + ts + + + txt_db + + + pqueue + + + + + + engine + + + engine + + + seed + + + seed + + + ecdsa + + + ecdsa + + + ec + + + ec + + + ecdh + + + ecdh + + + cms + + + cms + + + camellia + + + camellia + + + + + aes + + + aes + + + aes + + + aes + + + aes + + + aes + + + aes + + + aes + + + aes + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + des + + + comp + + + comp + + + comp + + + comp + + + rc2 + + + rc2 + + + rc2 + + + rc2 + + + rc2 + + + rc4 + + + rc4 + + + md5 + + + md5 + + + sha + + + sha + + + sha + + + sha + + + sha + + + sha + + + md4 + + + md4 + + + rand + + + rand + + + rand + + + rand + + + rand + + + rand + + + rand + + + rand + + + rand + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + x509 + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + bio + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + evp + + + err + + + err + + + err + + + ocsp + + + ocsp + + + ocsp + + + ocsp + + + ocsp + + + ocsp + + + ocsp + + + ocsp + + + ocsp + + + ui + + + ui + + + ui + + + ui + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + asn1 + + + stack + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + bn + + + lhash + + + lhash + + + objects + + + objects + + + objects + + + objects + + + objects + + + buffer + + + buffer + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + rsa + + + hmac + + + hmac + + + hmac + + + pem + + + pem + + + pem + + + pem + + + pem + + + pem + + + pem + + + pem + + + pem + + + pem + + + pem + + + pem + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dsa + + + dh + + + dh + + + dh + + + dh + + + dh + + + dh + + + dh + + + dh + + + dh + + + dh + + + pkcs7 + + + pkcs7 + + + pkcs7 + + + pkcs7 + + + pkcs7 + + + pkcs7 + + + pkcs7 + + + pkcs7 + + + pkcs7 + + + modes + + + modes + + + modes + + + modes + + + modes + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + x509v3 + + + conf + + + conf + + + conf + + + conf + + + conf + + + conf + + + conf + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + pkcs12 + + + dso + + + dso + + + dso + + + dso + + + dso + + + dso + + + dso + + + dso + + + dso + + + ts + + + ts + + + ts + + + ts + + + ts + + + ts + + + ts + + + ts + + + ts + + + ts + + + ts + + + txt_db + + + pqueue + + + + + + + + + + + + + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + engine + + + seed + + + seed + + + seed + + + seed + + + seed + + + ecdsa + + + ecdsa + + + ecdsa + + + ecdsa + + + ecdsa + + + ecdsa + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ec + + + ecdh + + + ecdh + + + ecdh + + + ecdh + + + cms + + + cms + + + cms + + + cms + + + cms + + + cms + + + cms + + + cms + + + cms + + + cms + + + cms + + + cms + + + camellia + + + camellia + + + camellia + + + camellia + + + camellia + + + camellia + + + camellia + + + + + bio + + + bio + + + err + + + dso + + + \ No newline at end of file diff --git a/vs2015/libcurl/libcurl.vcxproj b/vs2015/libcurl/libcurl.vcxproj new file mode 100644 index 0000000000..5f0ba38ec1 --- /dev/null +++ b/vs2015/libcurl/libcurl.vcxproj @@ -0,0 +1,402 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} + libcurl + Win32Proj + + + + StaticLibrary + false + NotSet + v140 + + + StaticLibrary + false + NotSet + v140 + + + StaticLibrary + false + Unicode + v140 + + + StaticLibrary + false + Unicode + v140 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/libcurl.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/libcurl.bsc + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/libcurl.tlb + + + + + Disabled + ..\..\src;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;BUILDING_LIBCURL;CURL_STATICLIB;USE_SSL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(IntDir)$(TargetName).pch + $(IntDir) + $(IntDir) + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + true + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Debug/libcurl.bsc + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/libcurl/libcurl.vcxproj.filters b/vs2015/libcurl/libcurl.vcxproj.filters similarity index 97% rename from vs2010/libcurl/libcurl.vcxproj.filters rename to vs2015/libcurl/libcurl.vcxproj.filters index e5ce52da3c..8f15fedff0 100644 --- a/vs2010/libcurl/libcurl.vcxproj.filters +++ b/vs2015/libcurl/libcurl.vcxproj.filters @@ -1,436 +1,436 @@ - - - - - {ca89758b-f2c1-4d27-b80f-c528c31c318e} - - - {173cf23d-fe26-4dd7-8521-7641202dd655} - - - {73673ecd-f2a9-4a02-90aa-e41e1e5b1aff} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - + + + + + {ca89758b-f2c1-4d27-b80f-c528c31c318e} + + + {173cf23d-fe26-4dd7-8521-7641202dd655} + + + {73673ecd-f2a9-4a02-90aa-e41e1e5b1aff} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + \ No newline at end of file diff --git a/vs2015/libjpg/libjpg.vcxproj b/vs2015/libjpg/libjpg.vcxproj new file mode 100644 index 0000000000..5219c1fd6d --- /dev/null +++ b/vs2015/libjpg/libjpg.vcxproj @@ -0,0 +1,254 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} + libjpg + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/libogg/libogg.vcxproj b/vs2015/libogg/libogg.vcxproj new file mode 100644 index 0000000000..4f0c96e39f --- /dev/null +++ b/vs2015/libogg/libogg.vcxproj @@ -0,0 +1,204 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} + libogg + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/libpng/libpng.vcxproj b/vs2015/libpng/libpng.vcxproj new file mode 100644 index 0000000000..ac2ec77745 --- /dev/null +++ b/vs2015/libpng/libpng.vcxproj @@ -0,0 +1,219 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E4BFD291-B8CF-4D71-9E86-658CD227428D} + libpng + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/libpvr/libpvr.vcxproj b/vs2015/libpvr/libpvr.vcxproj new file mode 100644 index 0000000000..668388bc83 --- /dev/null +++ b/vs2015/libpvr/libpvr.vcxproj @@ -0,0 +1,209 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003} + libpvr + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/libssl/libssl.vcxproj b/vs2015/libssl/libssl.vcxproj new file mode 100644 index 0000000000..4d2cad858a --- /dev/null +++ b/vs2015/libssl/libssl.vcxproj @@ -0,0 +1,254 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D0F1C892-57F4-4758-A2EE-BFB58DB20987} + libssl + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_MDC2;OPENSSL_NO_RIPEMD;OPENSSL_NO_WHIRLPOOL;OPENSSL_NO_STATIC_ENGINE;WIN32_LEAN_AND_MEAN;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + 4068;%(DisableSpecificWarnings) + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_MDC2;OPENSSL_NO_RIPEMD;OPENSSL_NO_WHIRLPOOL;OPENSSL_NO_STATIC_ENGINE;WIN32_LEAN_AND_MEAN;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_MDC2;OPENSSL_NO_RIPEMD;OPENSSL_NO_WHIRLPOOL;OPENSSL_NO_STATIC_ENGINE;WIN32_LEAN_AND_MEAN;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + 4068;%(DisableSpecificWarnings) + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;OPENSSL_SYSNAME_WIN32;DSO_WIN32;L_ENDIAN;MK1MF_BUILD;MK1MF_PLATFORM_VC_WIN32;OPENSSL_NO_BF;OPENSSL_NO_CAST;OPENSSL_NO_IDEA;OPENSSL_NO_MDC2;OPENSSL_NO_RIPEMD;OPENSSL_NO_WHIRLPOOL;OPENSSL_NO_STATIC_ENGINE;WIN32_LEAN_AND_MEAN;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/libtess/libtess.vcxproj b/vs2015/libtess/libtess.vcxproj new file mode 100644 index 0000000000..aecdea55c3 --- /dev/null +++ b/vs2015/libtess/libtess.vcxproj @@ -0,0 +1,215 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE} + libtess + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\libtess2\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\libtess2\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\libtess2\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\libtess2\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;PNG_NO_STDIO;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/libvorbis/libvorbis.vcxproj b/vs2015/libvorbis/libvorbis.vcxproj new file mode 100644 index 0000000000..68b59fa811 --- /dev/null +++ b/vs2015/libvorbis/libvorbis.vcxproj @@ -0,0 +1,266 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} + libvorbis + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/libvorbis/libvorbis.vcxproj.filters b/vs2015/libvorbis/libvorbis.vcxproj.filters similarity index 98% rename from vs2010/libvorbis/libvorbis.vcxproj.filters rename to vs2015/libvorbis/libvorbis.vcxproj.filters index 745ae5c479..6e2731374a 100644 --- a/vs2010/libvorbis/libvorbis.vcxproj.filters +++ b/vs2015/libvorbis/libvorbis.vcxproj.filters @@ -1,136 +1,136 @@ - - - - - {8aca2643-c1a1-4ac3-9a3a-54885441f676} - - - {56ac0dea-187e-4a2c-9e01-2f1a2c38a075} - - - {5ee55ee2-917b-4266-9866-c5eb7872011d} - - - {87875e71-5512-4300-9f3e-da10535f7227} - - - {36e9e5f8-f12f-400b-93c3-9ba7c08ee61d} - - - - - books\coupled - - - books\coupled - - - books\floor - - - books\uncoupled - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - modes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + {8aca2643-c1a1-4ac3-9a3a-54885441f676} + + + {56ac0dea-187e-4a2c-9e01-2f1a2c38a075} + + + {5ee55ee2-917b-4266-9866-c5eb7872011d} + + + {87875e71-5512-4300-9f3e-da10535f7227} + + + {36e9e5f8-f12f-400b-93c3-9ba7c08ee61d} + + + + + books\coupled + + + books\coupled + + + books\floor + + + books\uncoupled + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + modes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/libwebp/libwebp.vcxproj b/vs2015/libwebp/libwebp.vcxproj new file mode 100644 index 0000000000..a4d52bc7ae --- /dev/null +++ b/vs2015/libwebp/libwebp.vcxproj @@ -0,0 +1,280 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {02BD34AA-8475-47E4-BB24-749587616A40} + libwebp + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + zipfs/zipfs_replace.h;%(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\jpeg-8c;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/libwebp/libwebp.vcxproj.filters b/vs2015/libwebp/libwebp.vcxproj.filters new file mode 100644 index 0000000000..8f041b3a00 --- /dev/null +++ b/vs2015/libwebp/libwebp.vcxproj.filters @@ -0,0 +1,267 @@ + + + + + {25022db4-ca34-4293-826c-958585111c13} + + + {070ac3c7-2fb2-431a-af3c-9fd68519eac5} + + + {b59993b3-8ac0-409d-926d-a43b54d1c782} + + + {c70c435c-562f-4d32-90a7-4fd80ddd9c1e} + + + {a1e35d56-bcf6-4031-894f-62e87a8a6520} + + + {13f5f517-7e7f-4ea4-b65d-f0838844138f} + + + + + dec + + + dec + + + dec + + + dec + + + dec + + + dec + + + dec + + + dec + + + dec + + + dec + + + demux + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + mux + + + mux + + + mux + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + + + dec + + + dec + + + dec + + + dec + + + dec + + + dsp + + + dsp + + + dsp + + + dsp + + + dsp + + + mux + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + utils + + + webp + + + webp + + + webp + + + webp + + + webp + + + webp + + + webp + + + \ No newline at end of file diff --git a/vs2015/lua-5.1/lua-5.1.vcxproj b/vs2015/lua-5.1/lua-5.1.vcxproj new file mode 100644 index 0000000000..9a1ed64b2c --- /dev/null +++ b/vs2015/lua-5.1/lua-5.1.vcxproj @@ -0,0 +1,249 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CCE1639A-B6FD-4144-A309-741B55DC835D} + lua-5.1 + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)lua.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)lua.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + \ No newline at end of file diff --git a/vs2015/lua-5.2/lua-5.2.vcxproj b/vs2015/lua-5.2/lua-5.2.vcxproj new file mode 100644 index 0000000000..53e90858df --- /dev/null +++ b/vs2015/lua-5.2/lua-5.2.vcxproj @@ -0,0 +1,249 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1058A5FD-6F00-4D33-BBDC-274077672B1B} + lua-5.2 + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)lua.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)lua.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + \ No newline at end of file diff --git a/vs2015/lua-dll/lua-5.1.3.def b/vs2015/lua-dll/lua-5.1.3.def new file mode 100644 index 0000000000..c451131b13 --- /dev/null +++ b/vs2015/lua-dll/lua-5.1.3.def @@ -0,0 +1,130 @@ +EXPORTS + lua_tolstring + lua_typename + lua_pushfstring + lua_pushvfstring + lua_getlocal + lua_getupvalue + lua_setlocal + lua_setupvalue + lua_topointer + lua_iscfunction + lua_isnumber + lua_isstring + lua_isuserdata + lua_toboolean + lua_type + lua_equal + lua_lessthan + lua_rawequal + lua_checkstack + lua_cpcall + lua_error + lua_getmetatable + lua_gettop + lua_load + lua_next + lua_pcall + lua_pushthread + lua_setfenv + lua_setmetatable + lua_resume + lua_status + lua_yield + lua_dump + lua_gc + lua_gethook + lua_gethookcount + lua_gethookmask + lua_getinfo + lua_getstack + lua_sethook + lua_getallocf + lua_tocfunction + lua_atpanic + lua_tointeger + lua_tonumber + lua_tothread + lua_newstate + lua_newthread + lua_objlen + lua_touserdata + lua_close + lua_call + lua_concat + lua_createtable + lua_getfenv + lua_getfield + lua_gettable + lua_insert + lua_pushboolean + lua_pushcclosure + lua_pushinteger + lua_pushlightuserdata + lua_pushlstring + lua_pushnil + lua_pushnumber + lua_pushstring + lua_pushvalue + lua_rawget + lua_rawgeti + lua_rawset + lua_rawseti + lua_remove + lua_replace + lua_setfield + lua_settable + lua_settop + lua_xmove + lua_newuserdata + lua_setallocf + luaL_prepbuffer + luaL_checklstring + luaL_findtable + luaL_gsub + luaL_optlstring + luaL_newmetatable + luaL_argerror + luaL_callmeta + luaL_checkoption + luaL_error + luaL_getmetafield + luaL_loadbuffer + luaL_loadfile + luaL_loadstring + luaL_ref + luaL_typerror + luaL_checkinteger + luaL_optinteger + luaL_checknumber + luaL_optnumber + luaL_newstate + luaL_openlib + luaL_addlstring + luaL_addstring + luaL_addvalue + luaL_buffinit + luaL_checkany + luaL_checkstack + luaL_checktype + luaL_pushresult + luaL_register + luaL_unref + luaL_where + luaL_checkudata + luaopen_base + luaopen_debug + luaopen_io + luaopen_math + luaopen_os + luaopen_package + luaopen_string + luaopen_table + luaL_openlibs + luaU_dump + luaM_toobig + luaM_realloc_ + luaS_newlstr + luaD_growstack + luaF_newproto + \ No newline at end of file diff --git a/vs2015/lua-lib-5.1/lua-lib-5.1.vcxproj b/vs2015/lua-lib-5.1/lua-lib-5.1.vcxproj new file mode 100644 index 0000000000..f3f5d1e18f --- /dev/null +++ b/vs2015/lua-lib-5.1/lua-lib-5.1.vcxproj @@ -0,0 +1,251 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {71F4FF55-2018-4950-9820-251D7C3CDD31} + lua-lib-5.1 + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/lua-lib-5.2/lua-lib-5.2.vcxproj b/vs2015/lua-lib-5.2/lua-lib-5.2.vcxproj new file mode 100644 index 0000000000..1500cea4a6 --- /dev/null +++ b/vs2015/lua-lib-5.2/lua-lib-5.2.vcxproj @@ -0,0 +1,255 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} + lua-lib-5.2 + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.1.2\src;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;LUA_COMPAT_MODULE;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/luac-5.1/luac-5.1.vcxproj b/vs2015/luac-5.1/luac-5.1.vcxproj new file mode 100644 index 0000000000..cb3579db40 --- /dev/null +++ b/vs2015/luac-5.1/luac-5.1.vcxproj @@ -0,0 +1,249 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E} + luac-5.1 + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)luac.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.1.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)luac.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + \ No newline at end of file diff --git a/vs2015/luac-5.2/luac-5.2.vcxproj b/vs2015/luac-5.2/luac-5.2.vcxproj new file mode 100644 index 0000000000..6bb339ed37 --- /dev/null +++ b/vs2015/luac-5.2/luac-5.2.vcxproj @@ -0,0 +1,249 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {01540EF6-65BB-486D-AE7F-02845FDCA479} + luac-5.2 + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)luac.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.2.2\src;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS;LUA_COMPAT_ALL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + lua-lib-5.2.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)luac.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + \ No newline at end of file diff --git a/vs2015/luaext/luaext.vcxproj b/vs2015/luaext/luaext.vcxproj new file mode 100644 index 0000000000..b79cbb041b --- /dev/null +++ b/vs2015/luaext/luaext.vcxproj @@ -0,0 +1,265 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {51007BE8-C720-4A9F-A1BF-C2AA31179E02} + luaext + Win32Proj + 8.1 + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + true + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + true + Sync + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + true + Sync + + + opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) + NotSet + $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) + false + $(ProjectDir)exports.def + true + Console + + + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + MinSpace + Size + false + ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + ..\..\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + + + opengl32.lib;glu32.lib;glut32.lib;glew32.lib;fmodex_vc.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;%(AdditionalDependencies) + $(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib;..\..\3rdparty\openGL\lib;..\..\3rdparty\FMOD\lib;%(AdditionalLibraryDirectories) + false + $(ProjectDir)exports.def + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) + ..\..\3rdparty\luasocket-2.0.2\src;%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/luaext/luaext.vcxproj.filters b/vs2015/luaext/luaext.vcxproj.filters similarity index 95% rename from vs2010/luaext/luaext.vcxproj.filters rename to vs2015/luaext/luaext.vcxproj.filters index 1df68b694e..43c0de0071 100644 --- a/vs2010/luaext/luaext.vcxproj.filters +++ b/vs2015/luaext/luaext.vcxproj.filters @@ -1,144 +1,144 @@ - - - - - {4173dda7-cdf2-4384-a2e8-a9b96ddfe6a0} - - - {fb6c0066-ced3-4ea1-99c7-36ee378652e1} - - - {78b9c6a9-8f40-46e7-998b-0b5303713fd8} - - - {8a9c6f09-05eb-4252-a09a-cb2794e75dfd} - - - {66485d9e-8765-4827-ae26-7a621a946e93} - - - {3d9da368-fe8a-43e2-afc3-f54337c5a576} - - - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luacrypto - - - luacurl - - - luasql - - - luasql - - - luafilesystem - - - luasocket-embed - - - luasocket-embed - - - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luasocket - - - luacrypto - - - luasql - - - luafilesystem - - - luasocket-embed - - - luasocket-embed - - + + + + + {4173dda7-cdf2-4384-a2e8-a9b96ddfe6a0} + + + {fb6c0066-ced3-4ea1-99c7-36ee378652e1} + + + {78b9c6a9-8f40-46e7-998b-0b5303713fd8} + + + {8a9c6f09-05eb-4252-a09a-cb2794e75dfd} + + + {66485d9e-8765-4827-ae26-7a621a946e93} + + + {3d9da368-fe8a-43e2-afc3-f54337c5a576} + + + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luacurl + + + luasql + + + luasql + + + luafilesystem + + + luasocket-embed + + + luasocket-embed + + + luacrypto + + + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasocket + + + luasql + + + luafilesystem + + + luasocket-embed + + + luasocket-embed + + + luacrypto + + \ No newline at end of file diff --git a/vs2015/luajit-lib/luajit-lib.vcxproj b/vs2015/luajit-lib/luajit-lib.vcxproj new file mode 100644 index 0000000000..dcb744c9ff --- /dev/null +++ b/vs2015/luajit-lib/luajit-lib.vcxproj @@ -0,0 +1,351 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} + luajit-lib + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.3\src;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + lj_vm.obj;%(AdditionalDependencies) + $(TargetDir)luajit;%(AdditionalLibraryDirectories) + + + + + + + + + X64 + + + Disabled + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + lj_vm.obj;%(AdditionalDependencies) + $(TargetDir)luajit;%(AdditionalLibraryDirectories) + + + + + + + + + Full + true + Size + true + false + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.3\src;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + lj_vm.obj;%(AdditionalDependencies) + $(TargetDir)luajit;%(AdditionalLibraryDirectories) + + + + + + + + + X64 + + + Full + true + Size + true + $(TargetDir)luajit;..\..\3rdparty\luajit-2.0.1\src;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + lj_vm.obj;%(AdditionalDependencies) + $(TargetDir)luajit;%(AdditionalLibraryDirectories) + + + + + + + + + {157eb94d-71fa-4e48-a230-6196b1df1b6c} + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/luajit/luajit.vcxproj b/vs2015/luajit/luajit.vcxproj new file mode 100644 index 0000000000..aed82ba5c0 --- /dev/null +++ b/vs2015/luajit/luajit.vcxproj @@ -0,0 +1,259 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E} + luajit + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\luajit-2.0.3\src;%(AdditionalIncludeDirectories) + WIN32;DEBUG;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)lua.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" +xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\luajit-2.0.3\src;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + + + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\lua-5.1.3\src;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + false + + + luajit-lib.lib;zl-lib-vfs.lib;zlib.lib;%(AdditionalDependencies) + $(OutDir)lua.exe + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + {2bbf2db4-fdc4-478a-be1b-9ba2c14ce237} + false + + + + + + + + + \ No newline at end of file diff --git a/vs2015/minilua/minilua-post.bat b/vs2015/minilua/minilua-post.bat new file mode 100644 index 0000000000..2109a57d5d --- /dev/null +++ b/vs2015/minilua/minilua-post.bat @@ -0,0 +1,6 @@ +set minilua=%1 +set outdir=%2 +set luajit=..\..\3rdparty\luajit-2.0.3 + +if not exist %outdir% mkdir -p %outdir% +%minilua% %luajit%\dynasm\dynasm.lua -LN -D WIN -D JIT -D FFI -o %outdir%\buildvm_arch.h %luajit%\src\vm_x86.dasc diff --git a/vs2015/minilua/minilua.vcxproj b/vs2015/minilua/minilua.vcxproj new file mode 100644 index 0000000000..a013759fb8 --- /dev/null +++ b/vs2015/minilua/minilua.vcxproj @@ -0,0 +1,241 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465} + minilua + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + X64 + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + Full + true + Size + true + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + X64 + + + Full + true + Size + true + %(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + true + Sync + false + + + false + + + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + minilua-post.bat $(OutDir)$(TargetName) $(OutDir)luajit + + + + + + \ No newline at end of file diff --git a/vs2010/moai-exe-fmod/moai-fmod.vcxproj b/vs2015/moai-exe-fmod/moai-fmod.vcxproj similarity index 98% rename from vs2010/moai-exe-fmod/moai-fmod.vcxproj rename to vs2015/moai-exe-fmod/moai-fmod.vcxproj index a384c7e518..57427a83f3 100644 --- a/vs2010/moai-exe-fmod/moai-fmod.vcxproj +++ b/vs2015/moai-exe-fmod/moai-fmod.vcxproj @@ -1,5 +1,5 @@  - + Debug-Lua-5.1 @@ -60,58 +60,70 @@ Application NotSet false + v140 Application NotSet false + v140 Application NotSet false + v140 Application NotSet false + v140 Application NotSet false + v140 Application NotSet false + v140 Application Unicode true + v140 Application Unicode + v140 Application Unicode true + v140 Application Unicode + v140 Application Unicode true + v140 Application Unicode + v140 @@ -704,15 +716,9 @@ {baaf0611-4ba9-4bdd-9d83-822f3b23aba3} - - {899650a9-86f0-42df-90d3-e046f4ec2092} - {aa2bd0be-d174-4f8f-a7f7-b924128fed00} - - {7b02e245-7904-4daa-ad0c-2c9ce881f35b} - {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} diff --git a/vs2015/moai-exe-server/moai-server.vcxproj b/vs2015/moai-exe-server/moai-server.vcxproj new file mode 100644 index 0000000000..2c1fd582f5 --- /dev/null +++ b/vs2015/moai-exe-server/moai-server.vcxproj @@ -0,0 +1,280 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2} + moai-server-lua-5.1 + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX86 + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" +xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX86 + + + + + + + + + X64 + + + ..\..\src;..\..\src\config;..\..\src\config-default;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;AKU_WITH_BOX2D=0;AKU_WITH_CHIPMUNK=0;AKU_WITH_FMOD_DESIGNER=0;AKU_WITH_FMOD_EX=0;AKU_WITH_HARNESS=0;AKU_WITH_HTTP_CLIENT=1;AKU_WITH_HTTP_SERVER=1;AKU_WITH_LUAEXT=1;AKU_WITH_SIM=0;AKU_WITH_TEST=0;AKU_WITH_UNTZ=0;AKU_WITH_UTIL=1;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + moai-lib-core.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + {ab0dd232-1af9-4b16-a0f2-5ebf32250f6b} + + + {aa2bd0be-d174-4f8f-a7f7-b924128fed00} + + + {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} + + + {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} + + + {30d318c3-18a8-40b4-adac-3360cdcb4dd4} + + + {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} + + + + + + \ No newline at end of file diff --git a/vs2015/moai-exe-test/moai-test.vcxproj b/vs2015/moai-exe-test/moai-test.vcxproj new file mode 100644 index 0000000000..31d394ab33 --- /dev/null +++ b/vs2015/moai-exe-test/moai-test.vcxproj @@ -0,0 +1,293 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D} + moai-test-lua-5.1 + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX86 + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX64 + + + + + + + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX86 + + + + + + + + + X64 + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.0\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;AKU_WITH_TEST=1;DECLSPEC=;SDL_MAIN_HANDLED;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + sdl.lib;moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-test.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\freeglut-2.8.1\include;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX64 + + + + + + + + + + + + + + + + + + + {baaf0611-4ba9-4bdd-9d83-822f3b23aba3} + + + {aa2bd0be-d174-4f8f-a7f7-b924128fed00} + + + {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} + + + {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} + + + {30d318c3-18a8-40b4-adac-3360cdcb4dd4} + + + {fa856173-3823-4fff-8207-32db9c1711fa} + + + {6b898b13-e6f1-473c-a020-328da0d50fb9} + + + {c699bb79-8f3f-48a3-a06a-2d4e0ea73360} + + + {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} + + + {ad871809-7119-436f-a8aa-2eaf63b35a3c} + + + + + + \ No newline at end of file diff --git a/vs2015/moai-exe/moai.vcxproj b/vs2015/moai-exe/moai.vcxproj new file mode 100644 index 0000000000..089f5fdc7f --- /dev/null +++ b/vs2015/moai-exe/moai.vcxproj @@ -0,0 +1,402 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {83DE7C0A-667A-4B75-8D00-B575501BC289} + moai-lua-5.1 + Win32Proj + 8.1 + + + + Application + false + v140 + + + Application + false + v140 + + + Application + true + v140 + + + Application + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;AKU_WITH_SDL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + false + false + + + Level3 + ProgramDatabase + %(ForcedIncludeFiles);zl-vfs/zl_replace.h + true + Sync + true + + + true + false + + + zlib.lib;zl-lib-vfs.lib;box2d.lib;contrib.lib;expat.lib;freetype.lib;glew.lib;jansson.lib;kissfft.lib;tinyxml.lib;libcrypto.lib;libssl.lib;libcurl.lib;libjpg.lib;libpng.lib;libpvr.lib;libwebp.lib;libogg.lib;libvorbis.lib;libtess.lib;sdl.lib;zl-lib-core.lib;zl-lib-crypto.lib;zl-lib-gfx.lib;moai-lib-core.lib;moai-lib-crypto.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-image-jpg.lib;moai-lib-image-png.lib;moai-lib-image-pvr.lib;moai-lib-image-webp.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;opengl32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;AKU_WITH_SDL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + true + + + zlib.lib;zl-lib-vfs.lib;box2d.lib;contrib.lib;expat.lib;freetype.lib;glew.lib;jansson.lib;kissfft.lib;tinyxml.lib;libcrypto.lib;libssl.lib;libcurl.lib;libjpg.lib;libpng.lib;libpvr.lib;libwebp.lib;libogg.lib;libvorbis.lib;libtess.lib;sdl.lib;zl-lib-core.lib;zl-lib-crypto.lib;zl-lib-gfx.lib;moai-lib-core.lib;moai-lib-crypto.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-image-jpg.lib;moai-lib-image-png.lib;moai-lib-image-pvr.lib;moai-lib-image-webp.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;opengl32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;AKU_WITH_SDL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + + + Level3 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + true + + + zlib.lib;zl-lib-vfs.lib;box2d.lib;contrib.lib;expat.lib;freetype.lib;glew.lib;jansson.lib;kissfft.lib;tinyxml.lib;libcrypto.lib;libssl.lib;libcurl.lib;libjpg.lib;libpng.lib;libpvr.lib;libwebp.lib;libogg.lib;libvorbis.lib;libtess.lib;sdl.lib;zl-lib-core.lib;zl-lib-crypto.lib;zl-lib-gfx.lib;moai-lib-core.lib;moai-lib-crypto.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-image-jpg.lib;moai-lib-image-png.lib;moai-lib-image-pvr.lib;moai-lib-image-webp.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;opengl32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX86 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;DECLSPEC=;SDL_MAIN_HANDLED;AKU_WITH_SDL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + true + + + zlib.lib;zl-lib-vfs.lib;box2d.lib;contrib.lib;expat.lib;freetype.lib;glew.lib;jansson.lib;kissfft.lib;tinyxml.lib;libcrypto.lib;libssl.lib;libcurl.lib;libjpg.lib;libpng.lib;libpvr.lib;libwebp.lib;libogg.lib;libvorbis.lib;libtess.lib;sdl.lib;zl-lib-core.lib;zl-lib-crypto.lib;zl-lib-gfx.lib;moai-lib-core.lib;moai-lib-crypto.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-image-jpg.lib;moai-lib-image-png.lib;moai-lib-image-pvr.lib;moai-lib-image-webp.lib;moai-lib-untz.lib;moai-lib-util.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;opengl32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;imm32.lib;version.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + {ab0dd232-1af9-4b16-a0f2-5ebf32250f6b} + + + {562b9eef-2a2e-46e1-8a28-550c86cdf9f6} + + + {860d46bc-ec6b-43c3-b335-3479f096fb1b} + + + {97d147f3-4dbc-45cd-87eb-6c90eb6efe21} + + + {48580411-0a48-46f9-87a6-cf5c9b81d146} + + + {52496c82-2edb-4649-8509-451891f6a3de} + + + {23fa2a9c-429a-4be6-a540-f80b061ee58a} + + + {956ffe71-66f4-457c-8c88-9f075e4fde27} + + + {41beb1cb-88c0-4c0f-b24e-f5871cf9ee49} + + + {1f65fe7f-80d7-4380-bdd3-2546d7c2dff0} + + + {3986e679-6e11-4b7a-a00d-9669dedbbc1e} + + + {e4bfd291-b8cf-4d71-9e86-658cd227428d} + + + {ead743fa-900e-4e4b-8f4a-7ad7f6b2f003} + + + {d0f1c892-57f4-4758-a2ee-bfb58db20987} + + + {6de5e8c5-e477-4cee-8824-73e3c3c483de} + + + {cbd64ddc-70ce-470b-b5ed-e12b59196ee7} + + + {02bd34aa-8475-47e4-bb24-749587616a40} + + + {71f4ff55-2018-4950-9820-251d7c3cdd31} + + + {51007be8-c720-4a9f-a1bf-c2aa31179e02} + + + {baaf0611-4ba9-4bdd-9d83-822f3b23aba3} + + + {aa2bd0be-d174-4f8f-a7f7-b924128fed00} + + + {a5f1dfa8-7fdb-4d71-b926-350a011c98f9} + + + {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} + + + {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} + + + {7294031c-51d0-4fed-8468-a03766274951} + + + {dcf29cd5-afde-4c7a-9bed-0679d09eaa9d} + + + {985ce67a-b78b-4a50-a033-5a50a04f645e} + + + {99e440cc-f4d1-427e-9ab0-0ba2f2d1f89d} + + + {30d318c3-18a8-40b4-adac-3360cdcb4dd4} + + + {1aa4543c-f443-4529-afbe-c335f295a27a} + + + {fa856173-3823-4fff-8207-32db9c1711fa} + + + {c699bb79-8f3f-48a3-a06a-2d4e0ea73360} + + + {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} + + + {d7555f5d-ecfb-4a80-bab6-7a549f19f9a7} + + + {ad871809-7119-436f-a8aa-2eaf63b35a3c} + + + {1dc6bd91-b45f-442a-ae6c-88ab5dcf0ce2} + + + {a9935050-2e54-4674-80f8-cfc45a2c106a} + + + {991ebc54-28ff-44a1-863e-e70617782825} + + + {1e78302d-cf63-4922-8113-dccd24f94087} + + + {76508aad-7030-4fd2-9d05-99184af2baf5} + + + {e97a3e3d-01d5-4210-bca0-a6d816624f1a} + + + {5234f482-e45e-48e1-83f1-c56eec64c0ee} + + + {15ea6761-e3c5-4035-97ee-4f74a5acee96} + + + {1e2d4a61-74ea-46fb-896d-6926dbca43d0} + + + {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-box2d/moai-lib-box2d.vcxproj b/vs2015/moai-lib-box2d/moai-lib-box2d.vcxproj new file mode 100644 index 0000000000..dc0c153a83 --- /dev/null +++ b/vs2015/moai-lib-box2d/moai-lib-box2d.vcxproj @@ -0,0 +1,274 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} + moai-lib-box2d + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\box2d-2.3.0;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + false + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\box2d-2.3.0;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\box2d-2.3.0;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\box2d-2.3.0;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\freetype-2.4.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-core/moai-lib-core.vcxproj b/vs2015/moai-lib-core/moai-lib-core.vcxproj new file mode 100644 index 0000000000..dfc193891c --- /dev/null +++ b/vs2015/moai-lib-core/moai-lib-core.vcxproj @@ -0,0 +1,291 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} + moai-lib-core + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-crypto/moai-lib-crypto.vcxproj b/vs2015/moai-lib-crypto/moai-lib-crypto.vcxproj new file mode 100644 index 0000000000..7fb4ae13a9 --- /dev/null +++ b/vs2015/moai-lib-crypto/moai-lib-crypto.vcxproj @@ -0,0 +1,224 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9} + moai-lib-crypto + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj b/vs2015/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj similarity index 97% rename from vs2010/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj rename to vs2015/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj index 8d9842b354..9c102a83ea 100644 --- a/vs2010/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj +++ b/vs2015/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj @@ -1,5 +1,5 @@  - + Debug-Lua-5.1 @@ -60,61 +60,73 @@ StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 @@ -223,13 +235,12 @@ Disabled ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false @@ -340,13 +351,12 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" Disabled ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false @@ -457,13 +467,12 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" Disabled ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false @@ -609,12 +618,6 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - diff --git a/vs2010/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj.filters b/vs2015/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj.filters similarity index 100% rename from vs2010/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj.filters rename to vs2015/moai-lib-fmod-designer/moai-lib-fmod-designer.vcxproj.filters diff --git a/vs2010/moai-lib-fmod-ex/moai-lib-fmod-ex.vcxproj b/vs2015/moai-lib-fmod-ex/moai-lib-fmod-ex.vcxproj similarity index 97% rename from vs2010/moai-lib-fmod-ex/moai-lib-fmod-ex.vcxproj rename to vs2015/moai-lib-fmod-ex/moai-lib-fmod-ex.vcxproj index e5f60b33b1..d8ab3bc027 100644 --- a/vs2010/moai-lib-fmod-ex/moai-lib-fmod-ex.vcxproj +++ b/vs2015/moai-lib-fmod-ex/moai-lib-fmod-ex.vcxproj @@ -1,5 +1,5 @@  - + Debug-Lua-5.1 @@ -60,61 +60,73 @@ StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 @@ -223,13 +235,12 @@ Disabled ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false @@ -340,13 +351,12 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" Disabled ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false @@ -457,13 +467,12 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" Disabled ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false @@ -582,12 +591,6 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - diff --git a/vs2010/moai-lib-harness/moai-lib-harness.vcxproj b/vs2015/moai-lib-harness/moai-lib-harness.vcxproj similarity index 97% rename from vs2010/moai-lib-harness/moai-lib-harness.vcxproj rename to vs2015/moai-lib-harness/moai-lib-harness.vcxproj index 872906a785..98597d1112 100644 --- a/vs2010/moai-lib-harness/moai-lib-harness.vcxproj +++ b/vs2015/moai-lib-harness/moai-lib-harness.vcxproj @@ -1,5 +1,5 @@  - + Debug-Lua-5.1 @@ -60,61 +60,73 @@ StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 StaticLibrary NotSet false + v140 @@ -223,13 +235,12 @@ Disabled ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;AKU_STATIC;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false $(OutDir)$(ProjectName).pdb Level3 @@ -336,13 +347,12 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" Disabled ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\lua-5.2.2\src;..\..\3rdparty;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;XML_STATIC;LUA_COMPAT_MODULE;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false $(OutDir)$(ProjectName).pdb Level3 @@ -449,13 +459,12 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" Disabled ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\luajit-2.0.1\src;..\..\3rdparty;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) + WIN32;DEBUG;_DEBUG;XML_STATIC;MOAI_WITH_LUAJIT=1;%(PreprocessorDefinitions) true true EnableFastChecks MultiThreadedDebugDLL false - false false $(OutDir)$(ProjectName).pdb Level3 @@ -566,12 +575,6 @@ xcopy /yr "$(OutDir)$(TargetName).lib" "..\..\bin\win32\$(Configuration)\" - - - {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} - false - - diff --git a/vs2015/moai-lib-http-client/moai-lib-http-client.vcxproj b/vs2015/moai-lib-http-client/moai-lib-http-client.vcxproj new file mode 100644 index 0000000000..80a1afad4d --- /dev/null +++ b/vs2015/moai-lib-http-client/moai-lib-http-client.vcxproj @@ -0,0 +1,247 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} + moai-lib-http-client + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;HAVE_BOOL_T;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;HAVE_BOOL_T;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;HAVE_BOOL_T;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\c-ares-1.7.5;..\..\3rdparty\curl-7.19.7\lib;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;CURL_STATICLIB;HAVE_BOOL_T;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-http-server/moai-lib-http-server.vcxproj b/vs2015/moai-lib-http-server/moai-lib-http-server.vcxproj new file mode 100644 index 0000000000..2ca21ed916 --- /dev/null +++ b/vs2015/moai-lib-http-server/moai-lib-http-server.vcxproj @@ -0,0 +1,239 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} + moai-lib-http-server + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-image-jpg/moai-lib-image-jpg.vcxproj b/vs2015/moai-lib-image-jpg/moai-lib-image-jpg.vcxproj new file mode 100644 index 0000000000..b8168dce75 --- /dev/null +++ b/vs2015/moai-lib-image-jpg/moai-lib-image-jpg.vcxproj @@ -0,0 +1,223 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7294031C-51D0-4FED-8468-A03766274951} + moai-lib-image-jpg + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-image-png/moai-lib-image-png.vcxproj b/vs2015/moai-lib-image-png/moai-lib-image-png.vcxproj new file mode 100644 index 0000000000..cf55b4e2ed --- /dev/null +++ b/vs2015/moai-lib-image-png/moai-lib-image-png.vcxproj @@ -0,0 +1,223 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D} + moai-lib-image-png + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lpng140;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lpng140;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lpng140;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lpng140;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-image-pvr/moai-lib-image-pvr.vcxproj b/vs2015/moai-lib-image-pvr/moai-lib-image-pvr.vcxproj new file mode 100644 index 0000000000..a660e08e04 --- /dev/null +++ b/vs2015/moai-lib-image-pvr/moai-lib-image-pvr.vcxproj @@ -0,0 +1,223 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {985CE67A-B78B-4A50-A033-5A50A04F645E} + moai-lib-image-pvr + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\libpvr-3.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\libpvr-3.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\libpvr-3.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\libpvr-3.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-image-webp/moai-lib-image-webp.vcxproj b/vs2015/moai-lib-image-webp/moai-lib-image-webp.vcxproj new file mode 100644 index 0000000000..a39912f5ab --- /dev/null +++ b/vs2015/moai-lib-image-webp/moai-lib-image-webp.vcxproj @@ -0,0 +1,223 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D} + moai-lib-image-jpg + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-luaext/moai-lib-luaext.vcxproj b/vs2015/moai-lib-luaext/moai-lib-luaext.vcxproj new file mode 100644 index 0000000000..fafc001646 --- /dev/null +++ b/vs2015/moai-lib-luaext/moai-lib-luaext.vcxproj @@ -0,0 +1,207 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} + moai-lib-luaext + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + Cdecl + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + MinSpace + Size + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + Cdecl + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-sdl/moai-lib-sdl.vcxproj b/vs2015/moai-lib-sdl/moai-lib-sdl.vcxproj new file mode 100644 index 0000000000..0ea873703a --- /dev/null +++ b/vs2015/moai-lib-sdl/moai-lib-sdl.vcxproj @@ -0,0 +1,224 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + {1AA4543C-F443-4529-AFBE-C335F295A27A} + moai-lib-sdl + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sdl2-2.0.4\include;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-sim/moai-engine.vcxproj b/vs2015/moai-lib-sim/moai-engine.vcxproj new file mode 100644 index 0000000000..3a87b8a32e --- /dev/null +++ b/vs2015/moai-lib-sim/moai-engine.vcxproj @@ -0,0 +1,578 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + moai-lib-sim + {FA856173-3823-4FFF-8207-32DB9C1711FA} + moai-lib-sim + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\kissfft;..\..\3rdparty\libtess2\include;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\kissfft;..\..\3rdparty\libtess2\include;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\kissfft;..\..\3rdparty\libtess2\include;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\kissfft;..\..\3rdparty\libtess2\include;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\jpeg-8c;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-sim/moai-engine.vcxproj.filters b/vs2015/moai-lib-sim/moai-engine.vcxproj.filters new file mode 100644 index 0000000000..0c447b0705 --- /dev/null +++ b/vs2015/moai-lib-sim/moai-engine.vcxproj.filters @@ -0,0 +1,845 @@ + + + + + {ba17a1a4-fa7c-4073-8f91-57e8ec8a70a3} + + + {85116861-6a89-4d14-a89a-d3e50356df60} + + + {43d76d67-f075-4624-93c1-3d11d55ed4b9} + + + {d294cb72-beb1-415c-87d0-da41f6592c90} + + + {43c61fae-d827-4788-8af8-46be92b8de97} + + + {f83be7b1-d4d2-4d05-9a24-6eacbc9485c0} + + + {d7cfe3f4-9e8d-42ad-913b-ccfd8001524a} + + + {57b19275-cbf4-45db-a6d8-19b759c0a6c0} + + + {fe266c7a-3af2-4989-ae48-01cf85414c4f} + + + {c9421e62-d5f3-4c36-847a-22d075840800} + + + {a15e9f22-4fe4-47f3-a78d-4c1fcfd9c24e} + + + {29e63eaa-7c3e-4fe4-858e-63444b44e084} + + + {5c837ea4-de29-41cb-bb1b-320308e75e40} + + + {bd700d13-9e62-43ea-ba4f-877ef48f56f9} + + + {f4ab8ae5-2f23-4159-b4b7-04e187889cc4} + + + {7dbec36e-18a9-4a18-9600-e8ce480f6eb3} + + + {3f54e247-57ac-4a90-9f40-b8d7fba10602} + + + {0244b9ab-69a3-4ae4-b72f-dd601e7b8302} + + + {84655189-d3fc-48b9-aae3-5986ae40af31} + + + {b9e518e8-5f57-4ce4-95be-aabb672d0379} + + + {6027aae3-a95c-4247-80e7-04d421f0c538} + + + {5ce2e89a-938c-42cf-82cc-05555a82e7be} + + + {5fd62ee0-a303-45ac-9ff5-0410bcb360ec} + + + {1811a509-0376-4b94-9995-d747f628f055} + + + {e2c540e9-ffd3-47da-8543-33c149f62281} + + + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + gfx\shaders + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + action + + + action + + + anim + + + anim + + + anim + + + anim + + + anim + + + camera + + + camera + + + camera + + + camera + + + font + + + font + + + font + + + collision + + + collision + + + collision + + + font + + + font + + + font + + + input + + + input + + + input + + + input + + + input + + + input + + + input + + + input + + + input + + + font + + + font + + + font + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + vector + + + vector + + + vector + + + vector + + + vector + + + vector + + + vector + + + vector + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input + + + action + + + anim + + + anim + + + grid + + + grid + + + grid + + + grid + + + image + + + image + + + image + + + image + + + image + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + action + + + action + + + anim + + + anim + + + anim + + + anim + + + anim + + + camera + + + camera + + + camera + + + camera + + + font + + + font + + + font + + + font + + + collision + + + collision + + + collision + + + font + + + font + + + font + + + input + + + input + + + input + + + input + + + input + + + input + + + input + + + input + + + input + + + font + + + font + + + font + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + particles + + + vector + + + vector + + + vector + + + vector + + + vector + + + vector + + + vector + + + vector + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input\deck + + + input + + + action + + + anim + + + anim + + + grid + + + grid + + + grid + + + grid + + + image + + + image + + + image + + + image + + + image + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + gfx + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + text + + + \ No newline at end of file diff --git a/vs2015/moai-lib-test/moai-lib-test.vcxproj b/vs2015/moai-lib-test/moai-lib-test.vcxproj new file mode 100644 index 0000000000..8a3c9d4278 --- /dev/null +++ b/vs2015/moai-lib-test/moai-lib-test.vcxproj @@ -0,0 +1,214 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6B898B13-E6F1-473C-A020-328DA0D50FB9} + moai-lib-test + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + Cdecl + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + MinSpace + Size + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\luacrypto-0.2.0\src;..\..\3rdparty\luasocket-2.0.2\src;..\..\3rdparty\luasocket-2.0.2-embed;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + Cdecl + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/moai-lib-test/moai-lib-test.vcxproj.filters b/vs2015/moai-lib-test/moai-lib-test.vcxproj.filters similarity index 100% rename from vs2010/moai-lib-test/moai-lib-test.vcxproj.filters rename to vs2015/moai-lib-test/moai-lib-test.vcxproj.filters diff --git a/vs2015/moai-lib-untz/moai-lib-untz.vcxproj b/vs2015/moai-lib-untz/moai-lib-untz.vcxproj new file mode 100644 index 0000000000..95ed96bc9e --- /dev/null +++ b/vs2015/moai-lib-untz/moai-lib-untz.vcxproj @@ -0,0 +1,213 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} + moai-lib-untz + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + Cdecl + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + MinSpace + Size + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + false + false + $(OutDir)$(ProjectName).pdb + Level3 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + ..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;..\..\3rdparty\untz\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + false + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + Cdecl + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/moai-lib-util/moai-lib-util.vcxproj b/vs2015/moai-lib-util/moai-lib-util.vcxproj new file mode 100644 index 0000000000..12c108f5f2 --- /dev/null +++ b/vs2015/moai-lib-util/moai-lib-util.vcxproj @@ -0,0 +1,299 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} + moai-lib-util + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\kissfft;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\kissfft;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\kissfft;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\sfmt-1.4;..\..\3rdparty\jansson-2.7\src-win32;..\..\3rdparty\jansson-2.7\src;..\..\3rdparty\kissfft;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\openssl-1.0.0d\include-win32;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/moai.sln b/vs2015/moai.sln new file mode 100644 index 0000000000..8f8377d339 --- /dev/null +++ b/vs2015/moai.sln @@ -0,0 +1,729 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rd Party", "3rd Party", "{3C05055B-3444-43CB-8793-D469F0D40706}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{E2D67AF9-792C-4F3B-B969-4914EFF4B03F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lua", "Lua", "{15EA2916-A80B-49D1-8489-93D12ED9D969}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "LuaJIT", "LuaJIT", "{F4E9AE38-D526-42DC-B307-9C9D973C4BCD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Moai", "Moai", "{EE001E46-5A97-4A19-BC07-0F4E176C023A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Util", "Util", "{0A0F956C-BC16-4A42-939E-6EA89A1F142E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "box2d", "box2d\box2d.vcxproj", "{AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "contrib", "contrib\contrib.vcxproj", "{562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "expat", "expat\expat.vcxproj", "{860D46BC-EC6B-43C3-B335-3479F096FB1B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype\freetype.vcxproj", "{97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "glew\glew.vcxproj", "{48580411-0A48-46F9-87A6-CF5C9B81D146}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jansson", "jansson\jansson.vcxproj", "{52496C82-2EDB-4649-8509-451891F6A3DE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcrypto", "libcrypto\libcrypto.vcxproj", "{956FFE71-66F4-457C-8C88-9F075E4FDE27}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "libcurl\libcurl.vcxproj", "{41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpg", "libjpg\libjpg.vcxproj", "{1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libogg\libogg.vcxproj", "{3986E679-6E11-4B7A-A00D-9669DEDBBC1E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng\libpng.vcxproj", "{E4BFD291-B8CF-4D71-9E86-658CD227428D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssl", "libssl\libssl.vcxproj", "{D0F1C892-57F4-4758-A2EE-BFB58DB20987}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbis", "libvorbis\libvorbis.vcxproj", "{CBD64DDC-70CE-470B-B5ED-E12B59196EE7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luaext", "luaext\luaext.vcxproj", "{51007BE8-C720-4A9F-A1BF-C2AA31179E02}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib-5.1", "lua-lib-5.1\lua-lib-5.1.vcxproj", "{71F4FF55-2018-4950-9820-251D7C3CDD31}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-lib-5.2", "lua-lib-5.2\lua-lib-5.2.vcxproj", "{7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mongoose", "mongoose\mongoose.vcxproj", "{D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfmt", "sfmt\sfmt.vcxproj", "{1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite", "sqlite\sqlite.vcxproj", "{A9935050-2E54-4674-80F8-CFC45A2C106A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml", "tinyxml\tinyxml.vcxproj", "{991EBC54-28FF-44A1-863E-E70617782825}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tlsf", "tlsf\tlsf.vcxproj", "{1E78302D-CF63-4922-8113-DCCD24F94087}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "untz", "untz\untz.vcxproj", "{76508AAD-7030-4FD2-9D05-99184AF2BAF5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcxproj", "{E6C55A0C-B5B7-4963-8F77-19F1624B9F47}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-box2d", "moai-lib-box2d\moai-lib-box2d.vcxproj", "{BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-core", "moai-lib-core\moai-lib-core.vcxproj", "{AA2BD0BE-D174-4F8F-A7F7-B924128FED00}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-luaext", "moai-lib-luaext\moai-lib-luaext.vcxproj", "{30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-http-client", "moai-lib-http-client\moai-lib-http-client.vcxproj", "{CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-http-server", "moai-lib-http-server\moai-lib-http-server.vcxproj", "{327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-sim", "moai-lib-sim\moai-engine.vcxproj", "{FA856173-3823-4FFF-8207-32DB9C1711FA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-test", "moai-lib-test\moai-lib-test.vcxproj", "{6B898B13-E6F1-473C-A020-328DA0D50FB9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-untz", "moai-lib-untz\moai-lib-untz.vcxproj", "{C699BB79-8F3F-48A3-A06A-2D4E0EA73360}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-util", "moai-lib-util\moai-lib-util.vcxproj", "{9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-gfx", "zl-lib-gfx\zl-lib-gfx.vcxproj", "{15EA6761-E3C5-4035-97EE-4F74A5ACEE96}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-vfs", "zl-lib-vfs\zl-lib-vfs.vcxproj", "{1E2D4A61-74EA-46FB-896D-6926DBCA43D0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-5.1", "lua-5.1\lua-5.1.vcxproj", "{CCE1639A-B6FD-4144-A309-741B55DC835D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-5.2", "lua-5.2\lua-5.2.vcxproj", "{1058A5FD-6F00-4D33-BBDC-274077672B1B}" + ProjectSection(ProjectDependencies) = postProject + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luac-5.1", "luac-5.1\luac-5.1.vcxproj", "{3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luac-5.2", "luac-5.2\luac-5.2.vcxproj", "{01540EF6-65BB-486D-AE7F-02845FDCA479}" + ProjectSection(ProjectDependencies) = postProject + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minilua", "minilua\minilua.vcxproj", "{0ADB3D95-A750-4A3F-B2EB-560A7E29C465}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "buildvm", "buildvm\buildvm.vcxproj", "{157EB94D-71FA-4E48-A230-6196B1DF1B6C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luajit", "luajit\luajit.vcxproj", "{ECCF265E-EB98-45B6-BDB9-FF826302BF5E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "luajit-lib", "luajit-lib\luajit-lib.vcxproj", "{2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glewinfo", "glewinfo\glewinfo.vcxproj", "{D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hexdump", "hexdump\hexdump.vcxproj", "{F83A5925-1AD8-4D5D-A134-85AFF1466766}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "visualinfo", "visualinfo\visualinfo.vcxproj", "{CC196C96-AE3D-4E3A-A405-620F83104EB7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "work", "work\work.vcxproj", "{A130115C-B50F-436E-8C90-4243E310DC9C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdl", "sdl\sdl.vcxproj", "{AD871809-7119-436F-A8AA-2EAF63B35A3C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai", "moai-exe\moai.vcxproj", "{83DE7C0A-667A-4B75-8D00-B575501BC289}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-server", "moai-exe-server\moai-server.vcxproj", "{4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-test", "moai-exe-test\moai-test.vcxproj", "{E2A74094-D98E-40F2-9123-6E12BD6BBB5D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpvr", "libpvr\libpvr.vcxproj", "{EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwebp", "libwebp\libwebp.vcxproj", "{02BD34AA-8475-47E4-BB24-749587616A40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kissfft", "kissfft\kissfft.vcxproj", "{23FA2A9C-429A-4BE6-A540-F80B061EE58A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-core", "zl-lib-core\zl-lib-core.vcxproj", "{E97A3E3D-01D5-4210-BCA0-A6D816624F1A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zl-lib-crypto", "zl-lib-crypto\zl-lib-crypto.vcxproj", "{5234F482-E45E-48E1-83F1-C56EEC64C0EE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-image-jpg", "moai-lib-image-jpg\moai-lib-image-jpg.vcxproj", "{7294031C-51D0-4FED-8468-A03766274951}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-image-png", "moai-lib-image-png\moai-lib-image-png.vcxproj", "{DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-image-pvr", "moai-lib-image-pvr\moai-lib-image-pvr.vcxproj", "{985CE67A-B78B-4A50-A033-5A50A04F645E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-image-webp", "moai-lib-image-webp\moai-lib-image-webp.vcxproj", "{99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-sdl", "moai-lib-sdl\moai-lib-sdl.vcxproj", "{1AA4543C-F443-4529-AFBE-C335F295A27A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moai-lib-crypto", "moai-lib-crypto\moai-lib-crypto.vcxproj", "{A5F1DFA8-7FDB-4D71-B926-350A011C98F9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtess", "libtess\libtess.vcxproj", "{6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug|Win32.ActiveCfg = Debug|Win32 + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug|Win32.Build.0 = Debug|Win32 + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug|x64.ActiveCfg = Debug|x64 + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Debug|x64.Build.0 = Debug|x64 + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release|Win32.ActiveCfg = Release|Win32 + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release|Win32.Build.0 = Release|Win32 + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release|x64.ActiveCfg = Release|x64 + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B}.Release|x64.Build.0 = Release|x64 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug|Win32.ActiveCfg = Debug|Win32 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug|Win32.Build.0 = Debug|Win32 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug|x64.ActiveCfg = Debug|x64 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Debug|x64.Build.0 = Debug|x64 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release|Win32.ActiveCfg = Release|Win32 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release|Win32.Build.0 = Release|Win32 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release|x64.ActiveCfg = Release|x64 + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6}.Release|x64.Build.0 = Release|x64 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug|Win32.ActiveCfg = Debug|Win32 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug|Win32.Build.0 = Debug|Win32 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug|x64.ActiveCfg = Debug|x64 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Debug|x64.Build.0 = Debug|x64 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release|Win32.ActiveCfg = Release|Win32 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release|Win32.Build.0 = Release|Win32 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release|x64.ActiveCfg = Release|x64 + {860D46BC-EC6B-43C3-B335-3479F096FB1B}.Release|x64.Build.0 = Release|x64 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug|Win32.ActiveCfg = Debug|Win32 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug|Win32.Build.0 = Debug|Win32 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug|x64.ActiveCfg = Debug|x64 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Debug|x64.Build.0 = Debug|x64 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release|Win32.ActiveCfg = Release|Win32 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release|Win32.Build.0 = Release|Win32 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release|x64.ActiveCfg = Release|x64 + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21}.Release|x64.Build.0 = Release|x64 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug|Win32.ActiveCfg = Debug|Win32 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug|Win32.Build.0 = Debug|Win32 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug|x64.ActiveCfg = Debug|x64 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Debug|x64.Build.0 = Debug|x64 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release|Win32.ActiveCfg = Release|Win32 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release|Win32.Build.0 = Release|Win32 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release|x64.ActiveCfg = Release|x64 + {48580411-0A48-46F9-87A6-CF5C9B81D146}.Release|x64.Build.0 = Release|x64 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug|Win32.Build.0 = Debug|Win32 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug|x64.ActiveCfg = Debug|x64 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Debug|x64.Build.0 = Debug|x64 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Release|Win32.ActiveCfg = Release|Win32 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Release|Win32.Build.0 = Release|Win32 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Release|x64.ActiveCfg = Release|x64 + {52496C82-2EDB-4649-8509-451891F6A3DE}.Release|x64.Build.0 = Release|x64 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug|Win32.ActiveCfg = Debug|Win32 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug|Win32.Build.0 = Debug|Win32 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug|x64.ActiveCfg = Debug|x64 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Debug|x64.Build.0 = Debug|x64 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release|Win32.ActiveCfg = Release|Win32 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release|Win32.Build.0 = Release|Win32 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release|x64.ActiveCfg = Release|x64 + {956FFE71-66F4-457C-8C88-9F075E4FDE27}.Release|x64.Build.0 = Release|x64 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug|Win32.ActiveCfg = Debug|Win32 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug|Win32.Build.0 = Debug|Win32 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug|x64.ActiveCfg = Debug|x64 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Debug|x64.Build.0 = Debug|x64 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release|Win32.ActiveCfg = Release|Win32 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release|Win32.Build.0 = Release|Win32 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release|x64.ActiveCfg = Release|x64 + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49}.Release|x64.Build.0 = Release|x64 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug|Win32.Build.0 = Debug|Win32 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug|x64.ActiveCfg = Debug|x64 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Debug|x64.Build.0 = Debug|x64 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release|Win32.ActiveCfg = Release|Win32 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release|Win32.Build.0 = Release|Win32 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release|x64.ActiveCfg = Release|x64 + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0}.Release|x64.Build.0 = Release|x64 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug|Win32.Build.0 = Debug|Win32 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug|x64.ActiveCfg = Debug|x64 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Debug|x64.Build.0 = Debug|x64 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release|Win32.ActiveCfg = Release|Win32 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release|Win32.Build.0 = Release|Win32 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release|x64.ActiveCfg = Release|x64 + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E}.Release|x64.Build.0 = Release|x64 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug|Win32.ActiveCfg = Debug|Win32 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug|Win32.Build.0 = Debug|Win32 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug|x64.ActiveCfg = Debug|x64 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Debug|x64.Build.0 = Debug|x64 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release|Win32.ActiveCfg = Release|Win32 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release|Win32.Build.0 = Release|Win32 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release|x64.ActiveCfg = Release|x64 + {E4BFD291-B8CF-4D71-9E86-658CD227428D}.Release|x64.Build.0 = Release|x64 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug|Win32.ActiveCfg = Debug|Win32 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug|Win32.Build.0 = Debug|Win32 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug|x64.ActiveCfg = Debug|x64 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Debug|x64.Build.0 = Debug|x64 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release|Win32.ActiveCfg = Release|Win32 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release|Win32.Build.0 = Release|Win32 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release|x64.ActiveCfg = Release|x64 + {D0F1C892-57F4-4758-A2EE-BFB58DB20987}.Release|x64.Build.0 = Release|x64 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug|Win32.ActiveCfg = Debug|Win32 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug|Win32.Build.0 = Debug|Win32 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug|x64.ActiveCfg = Debug|x64 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Debug|x64.Build.0 = Debug|x64 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release|Win32.ActiveCfg = Release|Win32 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release|Win32.Build.0 = Release|Win32 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release|x64.ActiveCfg = Release|x64 + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7}.Release|x64.Build.0 = Release|x64 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug|Win32.ActiveCfg = Debug|Win32 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug|Win32.Build.0 = Debug|Win32 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug|x64.ActiveCfg = Debug|x64 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Debug|x64.Build.0 = Debug|x64 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release|Win32.ActiveCfg = Release|Win32 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release|Win32.Build.0 = Release|Win32 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release|x64.ActiveCfg = Release|x64 + {51007BE8-C720-4A9F-A1BF-C2AA31179E02}.Release|x64.Build.0 = Release|x64 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug|Win32.ActiveCfg = Debug|Win32 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug|Win32.Build.0 = Debug|Win32 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug|x64.ActiveCfg = Debug|x64 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Debug|x64.Build.0 = Debug|x64 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release|Win32.ActiveCfg = Release|Win32 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release|Win32.Build.0 = Release|Win32 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release|x64.ActiveCfg = Release|x64 + {71F4FF55-2018-4950-9820-251D7C3CDD31}.Release|x64.Build.0 = Release|x64 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug|Win32.ActiveCfg = Debug|Win32 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug|Win32.Build.0 = Debug|Win32 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug|x64.ActiveCfg = Debug|x64 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Debug|x64.Build.0 = Debug|x64 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release|Win32.ActiveCfg = Release|Win32 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release|Win32.Build.0 = Release|Win32 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release|x64.ActiveCfg = Release|x64 + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9}.Release|x64.Build.0 = Release|x64 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug|Win32.Build.0 = Debug|Win32 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug|x64.ActiveCfg = Debug|x64 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Debug|x64.Build.0 = Debug|x64 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release|Win32.ActiveCfg = Release|Win32 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release|Win32.Build.0 = Release|Win32 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release|x64.ActiveCfg = Release|x64 + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7}.Release|x64.Build.0 = Release|x64 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug|Win32.ActiveCfg = Debug|Win32 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug|Win32.Build.0 = Debug|Win32 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug|x64.ActiveCfg = Debug|x64 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Debug|x64.Build.0 = Debug|x64 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release|Win32.ActiveCfg = Release|Win32 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release|Win32.Build.0 = Release|Win32 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release|x64.ActiveCfg = Release|x64 + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2}.Release|x64.Build.0 = Release|x64 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug|Win32.Build.0 = Debug|Win32 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug|x64.ActiveCfg = Debug|x64 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Debug|x64.Build.0 = Debug|x64 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release|Win32.ActiveCfg = Release|Win32 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release|Win32.Build.0 = Release|Win32 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release|x64.ActiveCfg = Release|x64 + {A9935050-2E54-4674-80F8-CFC45A2C106A}.Release|x64.Build.0 = Release|x64 + {991EBC54-28FF-44A1-863E-E70617782825}.Debug|Win32.ActiveCfg = Debug|Win32 + {991EBC54-28FF-44A1-863E-E70617782825}.Debug|Win32.Build.0 = Debug|Win32 + {991EBC54-28FF-44A1-863E-E70617782825}.Debug|x64.ActiveCfg = Debug|x64 + {991EBC54-28FF-44A1-863E-E70617782825}.Debug|x64.Build.0 = Debug|x64 + {991EBC54-28FF-44A1-863E-E70617782825}.Release|Win32.ActiveCfg = Release|Win32 + {991EBC54-28FF-44A1-863E-E70617782825}.Release|Win32.Build.0 = Release|Win32 + {991EBC54-28FF-44A1-863E-E70617782825}.Release|x64.ActiveCfg = Release|x64 + {991EBC54-28FF-44A1-863E-E70617782825}.Release|x64.Build.0 = Release|x64 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug|Win32.Build.0 = Debug|Win32 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug|x64.ActiveCfg = Debug|x64 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Debug|x64.Build.0 = Debug|x64 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Release|Win32.ActiveCfg = Release|Win32 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Release|Win32.Build.0 = Release|Win32 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Release|x64.ActiveCfg = Release|x64 + {1E78302D-CF63-4922-8113-DCCD24F94087}.Release|x64.Build.0 = Release|x64 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug|Win32.ActiveCfg = Debug|Win32 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug|Win32.Build.0 = Debug|Win32 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug|x64.ActiveCfg = Debug|x64 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Debug|x64.Build.0 = Debug|x64 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release|Win32.ActiveCfg = Release|Win32 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release|Win32.Build.0 = Release|Win32 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release|x64.ActiveCfg = Release|x64 + {76508AAD-7030-4FD2-9D05-99184AF2BAF5}.Release|x64.Build.0 = Release|x64 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug|Win32.ActiveCfg = Debug|Win32 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug|Win32.Build.0 = Debug|Win32 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug|x64.ActiveCfg = Debug|x64 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Debug|x64.Build.0 = Debug|x64 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release|Win32.ActiveCfg = Release|Win32 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release|Win32.Build.0 = Release|Win32 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release|x64.ActiveCfg = Release|x64 + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47}.Release|x64.Build.0 = Release|x64 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug|Win32.ActiveCfg = Debug|Win32 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug|Win32.Build.0 = Debug|Win32 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug|x64.ActiveCfg = Debug|x64 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Debug|x64.Build.0 = Debug|x64 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release|Win32.ActiveCfg = Release|Win32 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release|Win32.Build.0 = Release|Win32 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release|x64.ActiveCfg = Release|x64 + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3}.Release|x64.Build.0 = Release|x64 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug|Win32.ActiveCfg = Debug|Win32 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug|Win32.Build.0 = Debug|Win32 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug|x64.ActiveCfg = Debug|x64 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Debug|x64.Build.0 = Debug|x64 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release|Win32.ActiveCfg = Release|Win32 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release|Win32.Build.0 = Release|Win32 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release|x64.ActiveCfg = Release|x64 + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00}.Release|x64.Build.0 = Release|x64 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug|Win32.ActiveCfg = Debug|Win32 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug|Win32.Build.0 = Debug|Win32 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug|x64.ActiveCfg = Debug|x64 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Debug|x64.Build.0 = Debug|x64 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release|Win32.ActiveCfg = Release|Win32 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release|Win32.Build.0 = Release|Win32 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release|x64.ActiveCfg = Release|x64 + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4}.Release|x64.Build.0 = Release|x64 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug|Win32.ActiveCfg = Debug|Win32 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug|Win32.Build.0 = Debug|Win32 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug|x64.ActiveCfg = Debug|x64 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Debug|x64.Build.0 = Debug|x64 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release|Win32.ActiveCfg = Release|Win32 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release|Win32.Build.0 = Release|Win32 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release|x64.ActiveCfg = Release|x64 + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C}.Release|x64.Build.0 = Release|x64 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug|Win32.Build.0 = Debug|Win32 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug|x64.ActiveCfg = Debug|x64 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Debug|x64.Build.0 = Debug|x64 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release|Win32.ActiveCfg = Release|Win32 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release|Win32.Build.0 = Release|Win32 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release|x64.ActiveCfg = Release|x64 + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC}.Release|x64.Build.0 = Release|x64 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug|Win32.ActiveCfg = Debug|Win32 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug|Win32.Build.0 = Debug|Win32 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug|x64.ActiveCfg = Debug|x64 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Debug|x64.Build.0 = Debug|x64 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release|Win32.ActiveCfg = Release|Win32 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release|Win32.Build.0 = Release|Win32 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release|x64.ActiveCfg = Release|x64 + {FA856173-3823-4FFF-8207-32DB9C1711FA}.Release|x64.Build.0 = Release|x64 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug|Win32.Build.0 = Debug|Win32 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug|x64.ActiveCfg = Debug|x64 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Debug|x64.Build.0 = Debug|x64 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release|Win32.ActiveCfg = Release|Win32 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release|Win32.Build.0 = Release|Win32 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release|x64.ActiveCfg = Release|x64 + {6B898B13-E6F1-473C-A020-328DA0D50FB9}.Release|x64.Build.0 = Release|x64 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug|Win32.ActiveCfg = Debug|Win32 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug|Win32.Build.0 = Debug|Win32 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug|x64.ActiveCfg = Debug|x64 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Debug|x64.Build.0 = Debug|x64 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release|Win32.ActiveCfg = Release|Win32 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release|Win32.Build.0 = Release|Win32 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release|x64.ActiveCfg = Release|x64 + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360}.Release|x64.Build.0 = Release|x64 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug|Win32.ActiveCfg = Debug|Win32 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug|Win32.Build.0 = Debug|Win32 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug|x64.ActiveCfg = Debug|x64 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Debug|x64.Build.0 = Debug|x64 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release|Win32.ActiveCfg = Release|Win32 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release|Win32.Build.0 = Release|Win32 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release|x64.ActiveCfg = Release|x64 + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D}.Release|x64.Build.0 = Release|x64 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug|Win32.ActiveCfg = Debug|Win32 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug|Win32.Build.0 = Debug|Win32 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug|x64.ActiveCfg = Debug|x64 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Debug|x64.Build.0 = Debug|x64 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release|Win32.ActiveCfg = Release|Win32 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release|Win32.Build.0 = Release|Win32 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release|x64.ActiveCfg = Release|x64 + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96}.Release|x64.Build.0 = Release|x64 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug|Win32.Build.0 = Debug|Win32 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug|x64.ActiveCfg = Debug|x64 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Debug|x64.Build.0 = Debug|x64 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release|Win32.ActiveCfg = Release|Win32 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release|Win32.Build.0 = Release|Win32 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release|x64.ActiveCfg = Release|x64 + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0}.Release|x64.Build.0 = Release|x64 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug|Win32.Build.0 = Debug|Win32 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug|x64.ActiveCfg = Debug|x64 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Debug|x64.Build.0 = Debug|x64 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release|Win32.ActiveCfg = Release|Win32 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release|Win32.Build.0 = Release|Win32 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release|x64.ActiveCfg = Release|x64 + {CCE1639A-B6FD-4144-A309-741B55DC835D}.Release|x64.Build.0 = Release|x64 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug|Win32.ActiveCfg = Debug|Win32 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug|Win32.Build.0 = Debug|Win32 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug|x64.ActiveCfg = Debug|x64 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Debug|x64.Build.0 = Debug|x64 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release|Win32.ActiveCfg = Release|Win32 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release|Win32.Build.0 = Release|Win32 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release|x64.ActiveCfg = Release|x64 + {1058A5FD-6F00-4D33-BBDC-274077672B1B}.Release|x64.Build.0 = Release|x64 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug|Win32.Build.0 = Debug|Win32 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug|x64.ActiveCfg = Debug|x64 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Debug|x64.Build.0 = Debug|x64 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release|Win32.ActiveCfg = Release|Win32 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release|Win32.Build.0 = Release|Win32 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release|x64.ActiveCfg = Release|x64 + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E}.Release|x64.Build.0 = Release|x64 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug|Win32.ActiveCfg = Debug|Win32 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug|Win32.Build.0 = Debug|Win32 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug|x64.ActiveCfg = Debug|x64 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Debug|x64.Build.0 = Debug|x64 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release|Win32.ActiveCfg = Release|Win32 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release|Win32.Build.0 = Release|Win32 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release|x64.ActiveCfg = Release|x64 + {01540EF6-65BB-486D-AE7F-02845FDCA479}.Release|x64.Build.0 = Release|x64 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug|Win32.ActiveCfg = Debug|Win32 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug|Win32.Build.0 = Debug|Win32 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug|x64.ActiveCfg = Debug|x64 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Debug|x64.Build.0 = Debug|x64 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release|Win32.ActiveCfg = Release|Win32 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release|Win32.Build.0 = Release|Win32 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release|x64.ActiveCfg = Release|x64 + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465}.Release|x64.Build.0 = Release|x64 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug|Win32.ActiveCfg = Debug|Win32 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug|Win32.Build.0 = Debug|Win32 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug|x64.ActiveCfg = Debug|x64 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Debug|x64.Build.0 = Debug|x64 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release|Win32.ActiveCfg = Release|Win32 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release|Win32.Build.0 = Release|Win32 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release|x64.ActiveCfg = Release|x64 + {157EB94D-71FA-4E48-A230-6196B1DF1B6C}.Release|x64.Build.0 = Release|x64 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug|Win32.ActiveCfg = Debug|Win32 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug|Win32.Build.0 = Debug|Win32 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug|x64.ActiveCfg = Debug|x64 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Debug|x64.Build.0 = Debug|x64 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release|Win32.ActiveCfg = Release|Win32 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release|Win32.Build.0 = Release|Win32 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release|x64.ActiveCfg = Release|x64 + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E}.Release|x64.Build.0 = Release|x64 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug|Win32.Build.0 = Debug|Win32 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug|x64.ActiveCfg = Debug|x64 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Debug|x64.Build.0 = Debug|x64 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release|Win32.ActiveCfg = Release|Win32 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release|Win32.Build.0 = Release|Win32 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release|x64.ActiveCfg = Release|x64 + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237}.Release|x64.Build.0 = Release|x64 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug|Win32.Build.0 = Debug|Win32 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug|x64.ActiveCfg = Debug|x64 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Debug|x64.Build.0 = Debug|x64 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release|Win32.ActiveCfg = Release|Win32 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release|Win32.Build.0 = Release|Win32 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release|x64.ActiveCfg = Release|x64 + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3}.Release|x64.Build.0 = Release|x64 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug|Win32.ActiveCfg = Debug|Win32 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug|Win32.Build.0 = Debug|Win32 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug|x64.ActiveCfg = Debug|x64 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Debug|x64.Build.0 = Debug|x64 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release|Win32.ActiveCfg = Release|Win32 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release|Win32.Build.0 = Release|Win32 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release|x64.ActiveCfg = Release|x64 + {F83A5925-1AD8-4D5D-A134-85AFF1466766}.Release|x64.Build.0 = Release|x64 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug|Win32.ActiveCfg = Debug|Win32 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug|Win32.Build.0 = Debug|Win32 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug|x64.ActiveCfg = Debug|x64 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Debug|x64.Build.0 = Debug|x64 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release|Win32.ActiveCfg = Release|Win32 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release|Win32.Build.0 = Release|Win32 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release|x64.ActiveCfg = Release|x64 + {CC196C96-AE3D-4E3A-A405-620F83104EB7}.Release|x64.Build.0 = Release|x64 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug|Win32.ActiveCfg = Debug|Win32 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug|Win32.Build.0 = Debug|Win32 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug|x64.ActiveCfg = Debug|x64 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Debug|x64.Build.0 = Debug|x64 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Release|Win32.ActiveCfg = Release|Win32 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Release|Win32.Build.0 = Release|Win32 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Release|x64.ActiveCfg = Release|x64 + {A130115C-B50F-436E-8C90-4243E310DC9C}.Release|x64.Build.0 = Release|x64 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug|Win32.Build.0 = Debug|Win32 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug|x64.ActiveCfg = Debug|x64 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Debug|x64.Build.0 = Debug|x64 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release|Win32.ActiveCfg = Release|Win32 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release|Win32.Build.0 = Release|Win32 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release|x64.ActiveCfg = Release|x64 + {AD871809-7119-436F-A8AA-2EAF63B35A3C}.Release|x64.Build.0 = Release|x64 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug|Win32.ActiveCfg = Debug|Win32 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug|Win32.Build.0 = Debug|Win32 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug|x64.ActiveCfg = Debug|x64 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Debug|x64.Build.0 = Debug|x64 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release|Win32.ActiveCfg = Release|Win32 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release|Win32.Build.0 = Release|Win32 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release|x64.ActiveCfg = Release|x64 + {83DE7C0A-667A-4B75-8D00-B575501BC289}.Release|x64.Build.0 = Release|x64 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug|Win32.ActiveCfg = Debug|Win32 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug|Win32.Build.0 = Debug|Win32 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug|x64.ActiveCfg = Debug|x64 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Debug|x64.Build.0 = Debug|x64 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release|Win32.ActiveCfg = Release|Win32 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release|Win32.Build.0 = Release|Win32 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release|x64.ActiveCfg = Release|x64 + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2}.Release|x64.Build.0 = Release|x64 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug|Win32.ActiveCfg = Debug|Win32 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug|Win32.Build.0 = Debug|Win32 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug|x64.ActiveCfg = Debug|x64 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Debug|x64.Build.0 = Debug|x64 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release|Win32.ActiveCfg = Release|Win32 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release|Win32.Build.0 = Release|Win32 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release|x64.ActiveCfg = Release|x64 + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D}.Release|x64.Build.0 = Release|x64 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Debug|Win32.ActiveCfg = Debug|Win32 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Debug|Win32.Build.0 = Debug|Win32 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Debug|x64.ActiveCfg = Debug|x64 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Debug|x64.Build.0 = Debug|x64 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Release|Win32.ActiveCfg = Release|Win32 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Release|Win32.Build.0 = Release|Win32 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Release|x64.ActiveCfg = Release|x64 + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003}.Release|x64.Build.0 = Release|x64 + {02BD34AA-8475-47E4-BB24-749587616A40}.Debug|Win32.ActiveCfg = Debug|Win32 + {02BD34AA-8475-47E4-BB24-749587616A40}.Debug|Win32.Build.0 = Debug|Win32 + {02BD34AA-8475-47E4-BB24-749587616A40}.Debug|x64.ActiveCfg = Debug|x64 + {02BD34AA-8475-47E4-BB24-749587616A40}.Debug|x64.Build.0 = Debug|x64 + {02BD34AA-8475-47E4-BB24-749587616A40}.Release|Win32.ActiveCfg = Release|Win32 + {02BD34AA-8475-47E4-BB24-749587616A40}.Release|Win32.Build.0 = Release|Win32 + {02BD34AA-8475-47E4-BB24-749587616A40}.Release|x64.ActiveCfg = Release|x64 + {02BD34AA-8475-47E4-BB24-749587616A40}.Release|x64.Build.0 = Release|x64 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Debug|Win32.ActiveCfg = Debug|Win32 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Debug|Win32.Build.0 = Debug|Win32 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Debug|x64.ActiveCfg = Debug|x64 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Debug|x64.Build.0 = Debug|x64 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Release|Win32.ActiveCfg = Release|Win32 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Release|Win32.Build.0 = Release|Win32 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Release|x64.ActiveCfg = Release|x64 + {23FA2A9C-429A-4BE6-A540-F80B061EE58A}.Release|x64.Build.0 = Release|x64 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug|Win32.ActiveCfg = Debug|Win32 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug|Win32.Build.0 = Debug|Win32 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug|x64.ActiveCfg = Debug|x64 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Debug|x64.Build.0 = Debug|x64 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release|Win32.ActiveCfg = Release|Win32 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release|Win32.Build.0 = Release|Win32 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release|x64.ActiveCfg = Release|x64 + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A}.Release|x64.Build.0 = Release|x64 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Debug|Win32.Build.0 = Debug|Win32 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Debug|x64.ActiveCfg = Debug|x64 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Debug|x64.Build.0 = Debug|x64 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Release|Win32.ActiveCfg = Release|Win32 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Release|Win32.Build.0 = Release|Win32 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Release|x64.ActiveCfg = Release|x64 + {5234F482-E45E-48E1-83F1-C56EEC64C0EE}.Release|x64.Build.0 = Release|x64 + {7294031C-51D0-4FED-8468-A03766274951}.Debug|Win32.ActiveCfg = Debug|Win32 + {7294031C-51D0-4FED-8468-A03766274951}.Debug|Win32.Build.0 = Debug|Win32 + {7294031C-51D0-4FED-8468-A03766274951}.Debug|x64.ActiveCfg = Debug|x64 + {7294031C-51D0-4FED-8468-A03766274951}.Debug|x64.Build.0 = Debug|x64 + {7294031C-51D0-4FED-8468-A03766274951}.Release|Win32.ActiveCfg = Release|Win32 + {7294031C-51D0-4FED-8468-A03766274951}.Release|Win32.Build.0 = Release|Win32 + {7294031C-51D0-4FED-8468-A03766274951}.Release|x64.ActiveCfg = Release|x64 + {7294031C-51D0-4FED-8468-A03766274951}.Release|x64.Build.0 = Release|x64 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Debug|Win32.ActiveCfg = Debug|Win32 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Debug|Win32.Build.0 = Debug|Win32 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Debug|x64.ActiveCfg = Debug|x64 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Debug|x64.Build.0 = Debug|x64 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Release|Win32.ActiveCfg = Release|Win32 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Release|Win32.Build.0 = Release|Win32 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Release|x64.ActiveCfg = Release|x64 + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D}.Release|x64.Build.0 = Release|x64 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Debug|Win32.ActiveCfg = Debug|Win32 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Debug|Win32.Build.0 = Debug|Win32 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Debug|x64.ActiveCfg = Debug|x64 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Debug|x64.Build.0 = Debug|x64 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Release|Win32.ActiveCfg = Release|Win32 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Release|Win32.Build.0 = Release|Win32 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Release|x64.ActiveCfg = Release|x64 + {985CE67A-B78B-4A50-A033-5A50A04F645E}.Release|x64.Build.0 = Release|x64 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Debug|Win32.ActiveCfg = Debug|Win32 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Debug|Win32.Build.0 = Debug|Win32 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Debug|x64.ActiveCfg = Debug|x64 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Debug|x64.Build.0 = Debug|x64 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Release|Win32.ActiveCfg = Release|Win32 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Release|Win32.Build.0 = Release|Win32 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Release|x64.ActiveCfg = Release|x64 + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D}.Release|x64.Build.0 = Release|x64 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Debug|Win32.ActiveCfg = Debug|Win32 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Debug|Win32.Build.0 = Debug|Win32 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Debug|x64.ActiveCfg = Debug|x64 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Debug|x64.Build.0 = Debug|x64 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Release|Win32.ActiveCfg = Release|Win32 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Release|Win32.Build.0 = Release|Win32 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Release|x64.ActiveCfg = Release|x64 + {1AA4543C-F443-4529-AFBE-C335F295A27A}.Release|x64.Build.0 = Release|x64 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Debug|Win32.Build.0 = Debug|Win32 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Debug|x64.ActiveCfg = Debug|x64 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Debug|x64.Build.0 = Debug|x64 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Release|Win32.ActiveCfg = Release|Win32 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Release|Win32.Build.0 = Release|Win32 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Release|x64.ActiveCfg = Release|x64 + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9}.Release|x64.Build.0 = Release|x64 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Debug|Win32.Build.0 = Debug|Win32 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Debug|x64.ActiveCfg = Debug|x64 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Debug|x64.Build.0 = Debug|x64 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Release|Win32.ActiveCfg = Release|Win32 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Release|Win32.Build.0 = Release|Win32 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Release|x64.ActiveCfg = Release|x64 + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {AB0DD232-1AF9-4B16-A0F2-5EBF32250F6B} = {3C05055B-3444-43CB-8793-D469F0D40706} + {562B9EEF-2A2E-46E1-8A28-550C86CDF9F6} = {3C05055B-3444-43CB-8793-D469F0D40706} + {860D46BC-EC6B-43C3-B335-3479F096FB1B} = {3C05055B-3444-43CB-8793-D469F0D40706} + {97D147F3-4DBC-45CD-87EB-6C90EB6EFE21} = {3C05055B-3444-43CB-8793-D469F0D40706} + {48580411-0A48-46F9-87A6-CF5C9B81D146} = {3C05055B-3444-43CB-8793-D469F0D40706} + {52496C82-2EDB-4649-8509-451891F6A3DE} = {3C05055B-3444-43CB-8793-D469F0D40706} + {956FFE71-66F4-457C-8C88-9F075E4FDE27} = {3C05055B-3444-43CB-8793-D469F0D40706} + {41BEB1CB-88C0-4C0F-B24E-F5871CF9EE49} = {3C05055B-3444-43CB-8793-D469F0D40706} + {1F65FE7F-80D7-4380-BDD3-2546D7C2DFF0} = {3C05055B-3444-43CB-8793-D469F0D40706} + {3986E679-6E11-4B7A-A00D-9669DEDBBC1E} = {3C05055B-3444-43CB-8793-D469F0D40706} + {E4BFD291-B8CF-4D71-9E86-658CD227428D} = {3C05055B-3444-43CB-8793-D469F0D40706} + {D0F1C892-57F4-4758-A2EE-BFB58DB20987} = {3C05055B-3444-43CB-8793-D469F0D40706} + {CBD64DDC-70CE-470B-B5ED-E12B59196EE7} = {3C05055B-3444-43CB-8793-D469F0D40706} + {51007BE8-C720-4A9F-A1BF-C2AA31179E02} = {3C05055B-3444-43CB-8793-D469F0D40706} + {71F4FF55-2018-4950-9820-251D7C3CDD31} = {3C05055B-3444-43CB-8793-D469F0D40706} + {7F4F2D90-99B8-45A2-A089-CBC3DF5F34B9} = {3C05055B-3444-43CB-8793-D469F0D40706} + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} = {3C05055B-3444-43CB-8793-D469F0D40706} + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} = {3C05055B-3444-43CB-8793-D469F0D40706} + {A9935050-2E54-4674-80F8-CFC45A2C106A} = {3C05055B-3444-43CB-8793-D469F0D40706} + {991EBC54-28FF-44A1-863E-E70617782825} = {3C05055B-3444-43CB-8793-D469F0D40706} + {1E78302D-CF63-4922-8113-DCCD24F94087} = {3C05055B-3444-43CB-8793-D469F0D40706} + {76508AAD-7030-4FD2-9D05-99184AF2BAF5} = {3C05055B-3444-43CB-8793-D469F0D40706} + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} = {3C05055B-3444-43CB-8793-D469F0D40706} + {BAAF0611-4BA9-4BDD-9D83-822F3B23ABA3} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {AA2BD0BE-D174-4F8F-A7F7-B924128FED00} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {30D318C3-18A8-40B4-ADAC-3360CDCB4DD4} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {CAF76E4C-0B1B-424D-B36E-BA0D974A7A0C} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {327AAD13-D2A2-4BBF-A68D-88E7DBF4E5FC} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {FA856173-3823-4FFF-8207-32DB9C1711FA} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {6B898B13-E6F1-473C-A020-328DA0D50FB9} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {C699BB79-8F3F-48A3-A06A-2D4E0EA73360} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {9CF1DC0D-A3C1-45C2-98EC-F4F30B6BB49D} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {CCE1639A-B6FD-4144-A309-741B55DC835D} = {15EA2916-A80B-49D1-8489-93D12ED9D969} + {1058A5FD-6F00-4D33-BBDC-274077672B1B} = {15EA2916-A80B-49D1-8489-93D12ED9D969} + {3AC1F428-E1A9-44D5-9A7C-F03BDCBCF92E} = {15EA2916-A80B-49D1-8489-93D12ED9D969} + {01540EF6-65BB-486D-AE7F-02845FDCA479} = {15EA2916-A80B-49D1-8489-93D12ED9D969} + {0ADB3D95-A750-4A3F-B2EB-560A7E29C465} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} + {157EB94D-71FA-4E48-A230-6196B1DF1B6C} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} + {ECCF265E-EB98-45B6-BDB9-FF826302BF5E} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} + {2BBF2DB4-FDC4-478A-BE1B-9BA2C14CE237} = {F4E9AE38-D526-42DC-B307-9C9D973C4BCD} + {D898C9F0-C6D3-4A22-ADCE-763394B7F9E3} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} + {F83A5925-1AD8-4D5D-A134-85AFF1466766} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} + {CC196C96-AE3D-4E3A-A405-620F83104EB7} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} + {A130115C-B50F-436E-8C90-4243E310DC9C} = {0A0F956C-BC16-4A42-939E-6EA89A1F142E} + {AD871809-7119-436F-A8AA-2EAF63B35A3C} = {3C05055B-3444-43CB-8793-D469F0D40706} + {83DE7C0A-667A-4B75-8D00-B575501BC289} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} + {4AAABD66-E60E-45BD-9F14-D0DD5F5F26E2} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} + {E2A74094-D98E-40F2-9123-6E12BD6BBB5D} = {EE001E46-5A97-4A19-BC07-0F4E176C023A} + {EAD743FA-900E-4E4B-8F4A-7AD7F6B2F003} = {3C05055B-3444-43CB-8793-D469F0D40706} + {02BD34AA-8475-47E4-BB24-749587616A40} = {3C05055B-3444-43CB-8793-D469F0D40706} + {23FA2A9C-429A-4BE6-A540-F80B061EE58A} = {3C05055B-3444-43CB-8793-D469F0D40706} + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {5234F482-E45E-48E1-83F1-C56EEC64C0EE} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {7294031C-51D0-4FED-8468-A03766274951} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {DCF29CD5-AFDE-4C7A-9BED-0679D09EAA9D} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {985CE67A-B78B-4A50-A033-5A50A04F645E} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {99E440CC-F4D1-427E-9AB0-0BA2F2D1F89D} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {1AA4543C-F443-4529-AFBE-C335F295A27A} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {A5F1DFA8-7FDB-4D71-B926-350A011C98F9} = {E2D67AF9-792C-4F3B-B969-4914EFF4B03F} + {6DE5E8C5-E477-4CEE-8824-73E3C3C483DE} = {3C05055B-3444-43CB-8793-D469F0D40706} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + AMDCaPersistentConfig = Debug|Win32 + AMDCaPersistentStartup = moai (Utilities\moai) + AMDCaProjectFile = C:\Documents and Settings\Patrick\My Documents\git\moai\vs2008\CodeAnalyst\moai.caw + EndGlobalSection +EndGlobal diff --git a/vs2015/mongoose/mongoose.vcxproj b/vs2015/mongoose/mongoose.vcxproj new file mode 100644 index 0000000000..3ed54b23f2 --- /dev/null +++ b/vs2015/mongoose/mongoose.vcxproj @@ -0,0 +1,190 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D7555F5D-ECFB-4A80-BAB6-7A549F19F9A7} + mongoose + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\mongoose;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2008/msbuild.xml b/vs2015/msbuild.xml similarity index 100% rename from vs2008/msbuild.xml rename to vs2015/msbuild.xml diff --git a/vs2015/sdl/sdl.vcxproj b/vs2015/sdl/sdl.vcxproj new file mode 100644 index 0000000000..046ef0b0da --- /dev/null +++ b/vs2015/sdl/sdl.vcxproj @@ -0,0 +1,483 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {AD871809-7119-436F-A8AA-2EAF63B35A3C} + sdl + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\sdl2-2.0.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;HAVE_LIBC;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_config_windows.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_dynapi.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\sdl2-2.0.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;HAVE_LIBC;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_config_windows.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_dynapi.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\sdl2-2.0.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;HAVE_LIBC;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_config_windows.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_dynapi.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\sdl2-2.0.4\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DECLSPEC=;HAVE_LIBC;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_config_windows.h;../3rdparty/sdl2-2.0.4/include-moai/SDL_dynapi.h;%(ForcedIncludeFiles) + %(ForcedUsingFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/sdl/sdl.vcxproj.filters b/vs2015/sdl/sdl.vcxproj.filters new file mode 100644 index 0000000000..e4f24126ac --- /dev/null +++ b/vs2015/sdl/sdl.vcxproj.filters @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + thread + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + include + + + + + + + + + + + + + + + + + + + + + + + + + + + {6f62133a-c5aa-41f6-8eee-1bfbe7f01f2a} + + + {e90bfaef-81ce-4f37-9538-bd77106a7b11} + + + \ No newline at end of file diff --git a/vs2015/sfmt/sfmt.vcxproj b/vs2015/sfmt/sfmt.vcxproj new file mode 100644 index 0000000000..82eb5665f6 --- /dev/null +++ b/vs2015/sfmt/sfmt.vcxproj @@ -0,0 +1,204 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1DC6BD91-B45F-442A-AE6C-88AB5DCF0CE2} + sfmt + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\sfmt-1.4;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/sqlite/sqlite.vcxproj b/vs2015/sqlite/sqlite.vcxproj new file mode 100644 index 0000000000..4e379676e4 --- /dev/null +++ b/vs2015/sqlite/sqlite.vcxproj @@ -0,0 +1,201 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A9935050-2E54-4674-80F8-CFC45A2C106A} + sqlite + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\sqlite-3.6.16;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;SQLITE_ENABLE_COLUMN_METADATA;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + $(IntDir) + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/tinyxml/tinyxml.vcxproj b/vs2015/tinyxml/tinyxml.vcxproj new file mode 100644 index 0000000000..710af1ccc1 --- /dev/null +++ b/vs2015/tinyxml/tinyxml.vcxproj @@ -0,0 +1,200 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {991EBC54-28FF-44A1-863E-E70617782825} + tinyxml + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\tinyxml;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;TIXML_USE_STL;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/tlsf/tlsf.vcxproj b/vs2015/tlsf/tlsf.vcxproj new file mode 100644 index 0000000000..935717619e --- /dev/null +++ b/vs2015/tlsf/tlsf.vcxproj @@ -0,0 +1,189 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1E78302D-CF63-4922-8113-DCCD24F94087} + tlsf + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + %(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\tlsf-2.0;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/untz/untz.vcxproj b/vs2015/untz/untz.vcxproj new file mode 100644 index 0000000000..5df4d921e8 --- /dev/null +++ b/vs2015/untz/untz.vcxproj @@ -0,0 +1,244 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {76508AAD-7030-4FD2-9D05-99184AF2BAF5} + untz + Win32Proj + 8.1 + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + true + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;__WINDOWS_DS__;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;__WINDOWS_DS__;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + Cdecl + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;__WINDOWS_DS__;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\untz\src;..\..\3rdparty\untz\src\native\win;..\..\3rdparty\untz\include;..\..\3rdparty\libogg-1.2.2\include;..\..\3rdparty\libvorbis-1.3.2\include;..\..\3rdparty\rtaudio-4.0.8\include;..\..\3rdparty\rtaudio-4.0.8;%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;__WINDOWS_DS__;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + + + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsCpp + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2010/untz/untz.vcxproj.filters b/vs2015/untz/untz.vcxproj.filters similarity index 93% rename from vs2010/untz/untz.vcxproj.filters rename to vs2015/untz/untz.vcxproj.filters index a92071417f..25e80edbc4 100644 --- a/vs2010/untz/untz.vcxproj.filters +++ b/vs2015/untz/untz.vcxproj.filters @@ -1,171 +1,165 @@ - - - - - {fc975537-9c24-446a-a5b5-66ac792f6656} - - - {aa14afb4-0941-47dd-b01b-5c7ccc459474} - - - {77e25c53-9e8a-4109-93f6-fca2817d4535} - - - {05dc5fff-a842-4d79-a282-cdd48b9e6673} - - - {c4e345a1-aed6-4e93-9494-2962d6c1a187} - - - {22c7387a-359e-4bf8-870f-0298b8c194d4} - - - - - API - - - API - - - API - - - Source - - - Source - - - Source - - - Source - - - Source - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Native - - - Source\Native - - - Source\Native - - - Source\Threading - - - Source\Threading - - - Source\Threading - - - Source\Threading - - - Source\Threading - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - - - Source - - - Source - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Audio Sources - - - Source\Native - - - Source\Native - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - - RTAudio - - + + + + + {fc975537-9c24-446a-a5b5-66ac792f6656} + + + {aa14afb4-0941-47dd-b01b-5c7ccc459474} + + + {77e25c53-9e8a-4109-93f6-fca2817d4535} + + + {05dc5fff-a842-4d79-a282-cdd48b9e6673} + + + {c4e345a1-aed6-4e93-9494-2962d6c1a187} + + + {22c7387a-359e-4bf8-870f-0298b8c194d4} + + + + + API + + + API + + + API + + + Source + + + Source + + + Source + + + Source + + + Source + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Native + + + Source\Native + + + Source\Native + + + Source\Threading + + + Source\Threading + + + Source\Threading + + + Source\Threading + + + Source\Threading + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + + + + Source + + + Source + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Audio Sources + + + Source\Native + + + Source\Native + + + RTAudio + + + RTAudio + + + RTAudio + + + RTAudio + + \ No newline at end of file diff --git a/vs2015/visualinfo/visualinfo.vcxproj b/vs2015/visualinfo/visualinfo.vcxproj new file mode 100644 index 0000000000..6ac1679d87 --- /dev/null +++ b/vs2015/visualinfo/visualinfo.vcxproj @@ -0,0 +1,255 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CC196C96-AE3D-4E3A-A405-620F83104EB7} + visualinfo + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + + + + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" +xcopy /yr "$(OutDir)$(TargetName).pdb" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;GLEW_STATIC;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + + + + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + zl-lib-vfs.lib;zlib.lib;glu32.lib;glew.lib;opengl32.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + {48580411-0a48-46f9-87a6-cf5c9b81d146} + false + + + {1e2d4a61-74ea-46fb-896d-6926dbca43d0} + false + + + {e6c55a0c-b5b7-4963-8f77-19f1624b9f47} + false + + + + + + \ No newline at end of file diff --git a/vs2015/work/work.vcxproj b/vs2015/work/work.vcxproj new file mode 100644 index 0000000000..9db5bd328c --- /dev/null +++ b/vs2015/work/work.vcxproj @@ -0,0 +1,306 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A130115C-B50F-436E-8C90-4243E310DC9C} + work + Win32Proj + + + + Application + NotSet + false + v140 + + + Application + NotSet + false + v140 + + + Application + Unicode + true + v140 + + + Application + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;GLUTHOST_USE_LUAEXT;GLUTHOST_USE_PARTICLE_PRESETS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX86 + + + xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_DEBUG;_BOOL;AKU_DLL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + false + + + false + + + moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) + NotSet + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) + false + true + Console + + + false + + + MachineX64 + + + xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" + + + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;GLUTHOST_USE_LUAEXT;GLUTHOST_USE_PARTICLE_PRESETS;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX86 + + + xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" + + + + + X64 + + + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\glut-3.7.6-bin;..\..\3rdparty\glew-1.5.6\include;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\sqlite-3.6.16;..\..\3rdparty\tinyxml;..\..\3rdparty\curl-7.19.7\include;..\..\3rdparty\lpng140;..\..\3rdparty\expat-2.0.1\lib;..\..\3rdparty\jansson-2.1\src;..\..\3rdparty\freetype-2.4.4\include;..\..\3rdparty\box2d-2.2.1;..\..\3rdparty\chipmunk-5.3.4\include;%(AdditionalIncludeDirectories) + WIN32;_CONSOLE;_CRTDBG_MAP_ALLOC;_WINDOWS;_BOOL;TRUE_AND_FALSE_DEFINED;_USE_32BIT_TIME_T;_CRT_SECURE_NO_WARNINGS;AKU_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + false + false + false + + + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + + + false + + + moai-lib-box2d.lib;moai-lib-chipmunk.lib;moai-lib-core.lib;moai-lib-harness.lib;moai-lib-luaext.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;glut32.lib;dsound.lib;strmiids.lib;advapi32.lib;comctl32.lib;oleaut32.lib;rpcrt4.lib;winmm.lib;wldap32.lib;ws2_32.lib;wsock32.lib;iphlpapi.lib;psapi.lib;%(AdditionalDependencies) + ..\bin\$(Platform)\$(Configuration)\;..\..\3rdparty\glut-3.7.6-bin;%(AdditionalLibraryDirectories) + false + true + Console + true + true + false + + + MachineX64 + + + xcopy /yr "..\..\3rdparty\glut-3.7.6-bin\glut32.dll" "$(OutDir)" + + + + + + + + + + + + + + + + + + + + + + + + + + {baaf0611-4ba9-4bdd-9d83-822f3b23aba3} + false + + + {aa2bd0be-d174-4f8f-a7f7-b924128fed00} + false + + + {caf76e4c-0b1b-424d-b36e-ba0d974a7a0c} + false + + + {327aad13-d2a2-4bbf-a68d-88e7dbf4e5fc} + false + + + {30d318c3-18a8-40b4-adac-3360cdcb4dd4} + false + + + {fa856173-3823-4fff-8207-32db9c1711fa} + false + + + {6b898b13-e6f1-473c-a020-328da0d50fb9} + false + + + {c699bb79-8f3f-48a3-a06a-2d4e0ea73360} + false + + + {9cf1dc0d-a3c1-45c2-98ec-f4f30b6bb49d} + false + + + + + + \ No newline at end of file diff --git a/vs2015/zl-lib-core/zl-lib-core.vcxproj b/vs2015/zl-lib-core/zl-lib-core.vcxproj new file mode 100644 index 0000000000..9769fa9291 --- /dev/null +++ b/vs2015/zl-lib-core/zl-lib-core.vcxproj @@ -0,0 +1,394 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E97A3E3D-01D5-4210-BCA0-A6D816624F1A} + zl-lib-core + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + false + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0d\include-win32;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + \ No newline at end of file diff --git a/vs2015/zl-lib-core/zl-lib-core.vcxproj.filters b/vs2015/zl-lib-core/zl-lib-core.vcxproj.filters new file mode 100644 index 0000000000..8d671233a3 --- /dev/null +++ b/vs2015/zl-lib-core/zl-lib-core.vcxproj.filters @@ -0,0 +1,504 @@ + + + + + {638ca30a-eb05-4cae-b4e8-1ab2051ac574} + + + {5b003239-caa7-4cfa-b062-53b369f36307} + + + {1a424aca-d08f-4697-bf0b-c285762c8b76} + + + {85880e49-6631-4d55-98e2-35238c1b2ead} + + + {3c733a8c-dd63-416e-87fb-b7621b3abea5} + + + {ec0eb5a6-f73e-4340-a61e-a8e7dc5256f7} + + + {abbe3f8c-4979-4a4d-9615-1cd4604561d6} + + + {29a65f59-ce5d-493d-8792-ec25e026a5a0} + + + {b5a094f8-015f-4a22-b5fd-cacd1b5accb9} + + + {2e1d403f-f2c2-475f-9753-ea871fa61f41} + + + {eb53b491-ef2f-4b1a-bc58-bd2af7f2cc29} + + + {d347566c-f0f4-4570-ba37-574c07542438} + + + {ee52e811-e07f-4ed9-b694-a0611b8cbf40} + + + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + stl + + + stl + + + stl + + + stl + + + stl + + + stl + + + templates + + + templates + + + templates + + + templates + + + templates + + + templates + + + templates + + + time + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + stream + + + stream + + + stream + + + stream + + + stream\encoding + + + stream\encoding + + + stream\encoding + + + stream\encoding + + + stream\encoding + + + stream\hash + + + stream\hash + + + stream\hash + + + stream\hash + + + zip + + + zip + + + gfxObjects + + + gfxObjects + + + parser + + + parser + + + parser + + + parser + + + parser + + + xml + + + + + stream + + + util + + + stream\encoding + + + socket + + + socket + + + socket + + + math + + + math + + + util + + + + + + stream + + + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + stl + + + time + + + time + + + time + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + stream + + + stream + + + stream + + + stream + + + stream\encoding + + + stream\encoding + + + stream\encoding + + + stream\encoding + + + stream\encoding + + + stream\hash + + + stream\hash + + + stream\hash + + + stream\hash + + + zip + + + zip + + + gfxObjects + + + parser + + + parser + + + parser + + + parser + + + parser + + + xml + + + + stream + + + stream\encoding + + + socket + + + socket + + + math + + + math + + + util + + + + + + stream + + + \ No newline at end of file diff --git a/vs2015/zl-lib-crypto/zl-lib-crypto.vcxproj b/vs2015/zl-lib-crypto/zl-lib-crypto.vcxproj new file mode 100644 index 0000000000..b53bdf253f --- /dev/null +++ b/vs2015/zl-lib-crypto/zl-lib-crypto.vcxproj @@ -0,0 +1,251 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5234F482-E45E-48E1-83F1-C56EEC64C0EE} + zl-lib-crypto + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + false + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty;..\..\3rdparty\lua-5.1.3\src;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\tinyxml;..\..\3rdparty\expat-2.1.0\lib;..\..\3rdparty\ooid-0.99;..\..\3rdparty\openssl-1.0.0m\include-win32;..\..\3rdparty\openssl-1.0.0m\include;..\..\3rdparty\openssl-1.0.0m\crypto;..\..\3rdparty\openssl-1.0.0m\crypto\asn1;..\..\3rdparty\openssl-1.0.0m\crypto\evp;..\..\3rdparty\openssl-1.0.0m;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/zl-lib-gfx/zl-lib-gfx.vcxproj b/vs2015/zl-lib-gfx/zl-lib-gfx.vcxproj new file mode 100644 index 0000000000..c66295360a --- /dev/null +++ b/vs2015/zl-lib-gfx/zl-lib-gfx.vcxproj @@ -0,0 +1,250 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + {15EA6761-E3C5-4035-97EE-4F74A5ACEE96} + zl-lib-gfx + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + \ No newline at end of file diff --git a/vs2015/zl-lib-vfs/zl-lib-vfs.vcxproj b/vs2015/zl-lib-vfs/zl-lib-vfs.vcxproj new file mode 100644 index 0000000000..8d760508b9 --- /dev/null +++ b/vs2015/zl-lib-vfs/zl-lib-vfs.vcxproj @@ -0,0 +1,267 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1E2D4A61-74EA-46FB-896D-6926DBCA43D0} + zl-lib-vfs + Win32Proj + + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + StaticLibrary + NotSet + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + ProgramDatabase + %(ForcedIncludeFiles) + true + true + + + false + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;_DEBUG;%(PreprocessorDefinitions) + true + Sync + EnableFastChecks + MultiThreadedDebugDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + %(ForcedIncludeFiles) + true + true + + + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + Full + false + Speed + false + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level4 + + + %(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + true + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + X64 + + + Full + true + Size + true + true + ..\..\src;..\..\src\config;..\..\src\config-default;..\..\3rdparty\tlsf-2.0;..\..\3rdparty\zlib-1.2.3;..\..\3rdparty\glew-1.5.6\include;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;NDEBUG;%(PreprocessorDefinitions) + true + Sync + MultiThreadedDLL + false + false + false + Use + pch.h + $(OutDir)$(ProjectName).pdb + Level3 + ProgramDatabase + %(ForcedIncludeFiles) + true + true + + + /LTCG %(AdditionalOptions) + ..\bin\$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories) + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vs2015/zl-lib-vfs/zl-lib-vfs.vcxproj.filters b/vs2015/zl-lib-vfs/zl-lib-vfs.vcxproj.filters new file mode 100644 index 0000000000..64d1991887 --- /dev/null +++ b/vs2015/zl-lib-vfs/zl-lib-vfs.vcxproj.filters @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + common + + + common + + + + + {36e6a161-2a52-4709-9344-f9aaa95a9477} + + + \ No newline at end of file diff --git a/vs2015/zlib/zlib.vcxproj b/vs2015/zlib/zlib.vcxproj new file mode 100644 index 0000000000..b75eeeb072 --- /dev/null +++ b/vs2015/zlib/zlib.vcxproj @@ -0,0 +1,211 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E6C55A0C-B5B7-4963-8F77-19F1624B9F47} + zlib + Win32Proj + + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + NotSet + false + v140 + + + StaticLibrary + Unicode + true + v140 + + + StaticLibrary + Unicode + v140 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + ..\bin\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Disabled + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;DEBUG;_DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + Full + true + Size + true + false + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + + + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + X64 + + + Full + true + Size + true + ..\..\src;..\..\3rdparty\zlib-1.2.3;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + MultiThreadedDLL + $(OutDir)$(ProjectName).pdb + TurnOffAllWarnings + ProgramDatabase + CompileAsC + zl-vfs/zl_replace.h;%(ForcedIncludeFiles) + true + Sync + false + + + xcopy /yr "$(OutDir)$(TargetFileName)" "..\..\bin\$(Platform)\$(Configuration)\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xcode/ios-static/moai-ios-static.xcodeproj/project.pbxproj b/xcode/ios-static/moai-ios-static.xcodeproj/project.pbxproj index 550b81e5dd..81c1116395 100755 --- a/xcode/ios-static/moai-ios-static.xcodeproj/project.pbxproj +++ b/xcode/ios-static/moai-ios-static.xcodeproj/project.pbxproj @@ -27,7 +27,6 @@ CD236699180A5DC3006A7236 /* EventKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD236698180A5DC3006A7236 /* EventKit.framework */; }; CD30078A1A12D87400C9CD1D /* main.lua in Resources */ = {isa = PBXBuildFile; fileRef = CD3007891A12D87400C9CD1D /* main.lua */; }; CD4C4163180A6A8600C02381 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4C4162180A6A8600C02381 /* MobileCoreServices.framework */; }; - CD4DF2B51A12E35B00E9A523 /* libmoai-ios-3rdparty-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4DF2A81A12E35B00E9A523 /* libmoai-ios-3rdparty-core.a */; }; CD4DF2B61A12E35B00E9A523 /* libmoai-ios-3rdparty-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4DF2A91A12E35B00E9A523 /* libmoai-ios-3rdparty-crypto.a */; }; CD4DF2B71A12E35B00E9A523 /* libmoai-ios-billing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4DF2AA1A12E35B00E9A523 /* libmoai-ios-billing.a */; }; CD4DF2B81A12E35B00E9A523 /* libmoai-ios-box2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4DF2AB1A12E35B00E9A523 /* libmoai-ios-box2d.a */; }; @@ -40,13 +39,23 @@ CD4DF2BF1A12E35B00E9A523 /* libmoai-ios-zl-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4DF2B21A12E35B00E9A523 /* libmoai-ios-zl-crypto.a */; }; CD4DF2C01A12E35B00E9A523 /* libmoai-ios-zl-vfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4DF2B31A12E35B00E9A523 /* libmoai-ios-zl-vfs.a */; }; CD4DF2C11A12E35B00E9A523 /* libmoai-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4DF2B41A12E35B00E9A523 /* libmoai-ios.a */; }; - CD76CB6E1BD4B288008AB56C /* libmoai-ios-image-jpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6A1BD4B288008AB56C /* libmoai-ios-image-jpg.a */; settings = {ASSET_TAGS = (); }; }; - CD76CB6F1BD4B288008AB56C /* libmoai-ios-image-png.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6B1BD4B288008AB56C /* libmoai-ios-image-png.a */; settings = {ASSET_TAGS = (); }; }; - CD76CB701BD4B288008AB56C /* libmoai-ios-image-pvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6C1BD4B288008AB56C /* libmoai-ios-image-pvr.a */; settings = {ASSET_TAGS = (); }; }; - CD76CB711BD4B288008AB56C /* libmoai-ios-image-webp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6D1BD4B288008AB56C /* libmoai-ios-image-webp.a */; settings = {ASSET_TAGS = (); }; }; + CD76CB6E1BD4B288008AB56C /* libmoai-ios-image-jpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6A1BD4B288008AB56C /* libmoai-ios-image-jpg.a */; }; + CD76CB6F1BD4B288008AB56C /* libmoai-ios-image-png.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6B1BD4B288008AB56C /* libmoai-ios-image-png.a */; }; + CD76CB701BD4B288008AB56C /* libmoai-ios-image-pvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6C1BD4B288008AB56C /* libmoai-ios-image-pvr.a */; }; + CD76CB711BD4B288008AB56C /* libmoai-ios-image-webp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD76CB6D1BD4B288008AB56C /* libmoai-ios-image-webp.a */; }; CD795FEB17F09B9F006AEB47 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD795FEA17F09B9F006AEB47 /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; CD79ECBF1B1FAB2100863789 /* lua in Resources */ = {isa = PBXBuildFile; fileRef = CD79ECBE1B1FAB2100863789 /* lua */; }; CD79ECC11B1FAB5200863789 /* libmoai-ios-http-server.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD79ECC01B1FAB5200863789 /* libmoai-ios-http-server.a */; }; + CD8317851BED415C00745C8A /* libmoai-ios-3rdparty-contrib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83177B1BED415C00745C8A /* libmoai-ios-3rdparty-contrib.a */; }; + CD8317861BED415C00745C8A /* libmoai-ios-3rdparty-expat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83177C1BED415C00745C8A /* libmoai-ios-3rdparty-expat.a */; }; + CD8317871BED415C00745C8A /* libmoai-ios-3rdparty-freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83177D1BED415C00745C8A /* libmoai-ios-3rdparty-freetype.a */; }; + CD8317881BED415C00745C8A /* libmoai-ios-3rdparty-jannson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83177E1BED415C00745C8A /* libmoai-ios-3rdparty-jannson.a */; }; + CD8317891BED415C00745C8A /* libmoai-ios-3rdparty-liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83177F1BED415C00745C8A /* libmoai-ios-3rdparty-liblua.a */; }; + CD83178A1BED415C00745C8A /* libmoai-ios-3rdparty-libtess.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317801BED415C00745C8A /* libmoai-ios-3rdparty-libtess.a */; }; + CD83178B1BED415C00745C8A /* libmoai-ios-3rdparty-sfmt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317811BED415C00745C8A /* libmoai-ios-3rdparty-sfmt.a */; }; + CD83178C1BED415C00745C8A /* libmoai-ios-3rdparty-tinyxml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317821BED415C00745C8A /* libmoai-ios-3rdparty-tinyxml.a */; }; + CD83178D1BED415C00745C8A /* libmoai-ios-3rdparty-tlsf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317831BED415C00745C8A /* libmoai-ios-3rdparty-tlsf.a */; }; + CD83178E1BED415C00745C8A /* libmoai-ios-3rdparty-zlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317841BED415C00745C8A /* libmoai-ios-3rdparty-zlib.a */; }; CD9F769E1808DEDC0001EF0C /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD9F769D1808DEDC0001EF0C /* AdSupport.framework */; }; CDBA1E4F1B1E44FA00DCDC75 /* libmoai-ios-apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDBA1E4D1B1E44FA00DCDC75 /* libmoai-ios-apple.a */; }; CDBA1E501B1E44FA00DCDC75 /* libmoai-ios-movie.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDBA1E4E1B1E44FA00DCDC75 /* libmoai-ios-movie.a */; }; @@ -69,6 +78,10 @@ CDC963D11A12C6B000F9CA22 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC963CA1A12C6B000F9CA22 /* main.mm */; }; CDC963D41A12C6B000F9CA22 /* MOAIAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC963CC1A12C6B000F9CA22 /* MOAIAppDelegate.mm */; }; CDC963D71A12C6B000F9CA22 /* MOAIView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC963CE1A12C6B000F9CA22 /* MOAIView.mm */; }; + CDDAD1781C8E56A200AA656F /* MOAICommandThread.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDDAD1711C8E56A200AA656F /* MOAICommandThread.mm */; }; + CDDAD1791C8E56A200AA656F /* MOAIContextMgr.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDDAD1731C8E56A200AA656F /* MOAIContextMgr.mm */; }; + CDDAD17A1C8E56A200AA656F /* MOAIRenderer.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDDAD1751C8E56A200AA656F /* MOAIRenderer.mm */; }; + CDDAD17B1C8E56A200AA656F /* MOAIRendererAsync.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDDAD1771C8E56A200AA656F /* MOAIRendererAsync.mm */; }; CDFD7E1F1A08B16C00A94E6B /* aku_modules_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDFD7E191A08B16C00A94E6B /* aku_modules_ios.mm */; }; CDFD7E221A08B16C00A94E6B /* aku_modules_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDFD7E1A1A08B16C00A94E6B /* aku_modules_util.cpp */; }; CDFD7E251A08B16C00A94E6B /* aku_modules.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDFD7E1C1A08B16C00A94E6B /* aku_modules.cpp */; }; @@ -98,7 +111,6 @@ CD236698180A5DC3006A7236 /* EventKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EventKit.framework; path = System/Library/Frameworks/EventKit.framework; sourceTree = SDKROOT; }; CD3007891A12D87400C9CD1D /* main.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.lua; sourceTree = ""; }; CD4C4162180A6A8600C02381 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - CD4DF2A81A12E35B00E9A523 /* libmoai-ios-3rdparty-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-core.a"; path = "../../lib/ios/libmoai-ios-3rdparty-core.a"; sourceTree = ""; }; CD4DF2A91A12E35B00E9A523 /* libmoai-ios-3rdparty-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-crypto.a"; path = "../../lib/ios/libmoai-ios-3rdparty-crypto.a"; sourceTree = ""; }; CD4DF2AA1A12E35B00E9A523 /* libmoai-ios-billing.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-billing.a"; path = "../../lib/ios/libmoai-ios-billing.a"; sourceTree = ""; }; CD4DF2AB1A12E35B00E9A523 /* libmoai-ios-box2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-box2d.a"; path = "../../lib/ios/libmoai-ios-box2d.a"; sourceTree = ""; }; @@ -120,6 +132,16 @@ CD795FEA17F09B9F006AEB47 /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; CD79ECBE1B1FAB2100863789 /* lua */ = {isa = PBXFileReference; lastKnownFileType = folder; path = lua; sourceTree = ""; }; CD79ECC01B1FAB5200863789 /* libmoai-ios-http-server.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-http-server.a"; path = "../../lib/ios/libmoai-ios-http-server.a"; sourceTree = ""; }; + CD83177B1BED415C00745C8A /* libmoai-ios-3rdparty-contrib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-contrib.a"; path = "../../lib/ios/libmoai-ios-3rdparty-contrib.a"; sourceTree = ""; }; + CD83177C1BED415C00745C8A /* libmoai-ios-3rdparty-expat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-expat.a"; path = "../../lib/ios/libmoai-ios-3rdparty-expat.a"; sourceTree = ""; }; + CD83177D1BED415C00745C8A /* libmoai-ios-3rdparty-freetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-freetype.a"; path = "../../lib/ios/libmoai-ios-3rdparty-freetype.a"; sourceTree = ""; }; + CD83177E1BED415C00745C8A /* libmoai-ios-3rdparty-jannson.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-jannson.a"; path = "../../lib/ios/libmoai-ios-3rdparty-jannson.a"; sourceTree = ""; }; + CD83177F1BED415C00745C8A /* libmoai-ios-3rdparty-liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-liblua.a"; path = "../../lib/ios/libmoai-ios-3rdparty-liblua.a"; sourceTree = ""; }; + CD8317801BED415C00745C8A /* libmoai-ios-3rdparty-libtess.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-libtess.a"; path = "../../lib/ios/libmoai-ios-3rdparty-libtess.a"; sourceTree = ""; }; + CD8317811BED415C00745C8A /* libmoai-ios-3rdparty-sfmt.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-sfmt.a"; path = "../../lib/ios/libmoai-ios-3rdparty-sfmt.a"; sourceTree = ""; }; + CD8317821BED415C00745C8A /* libmoai-ios-3rdparty-tinyxml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-tinyxml.a"; path = "../../lib/ios/libmoai-ios-3rdparty-tinyxml.a"; sourceTree = ""; }; + CD8317831BED415C00745C8A /* libmoai-ios-3rdparty-tlsf.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-tlsf.a"; path = "../../lib/ios/libmoai-ios-3rdparty-tlsf.a"; sourceTree = ""; }; + CD8317841BED415C00745C8A /* libmoai-ios-3rdparty-zlib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-zlib.a"; path = "../../lib/ios/libmoai-ios-3rdparty-zlib.a"; sourceTree = ""; }; CD9F769D1808DEDC0001EF0C /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; CDBA1E4D1B1E44FA00DCDC75 /* libmoai-ios-apple.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-apple.a"; path = "../../lib/ios/libmoai-ios-apple.a"; sourceTree = ""; }; CDBA1E4E1B1E44FA00DCDC75 /* libmoai-ios-movie.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-movie.a"; path = "../../lib/ios/libmoai-ios-movie.a"; sourceTree = ""; }; @@ -144,13 +166,21 @@ CDC963CC1A12C6B000F9CA22 /* MOAIAppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIAppDelegate.mm; path = "../../src/host-ios/MOAIAppDelegate.mm"; sourceTree = ""; }; CDC963CD1A12C6B000F9CA22 /* MOAIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIView.h; path = "../../src/host-ios/MOAIView.h"; sourceTree = ""; }; CDC963CE1A12C6B000F9CA22 /* MOAIView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIView.mm; path = "../../src/host-ios/MOAIView.mm"; sourceTree = ""; }; + CDDAD1701C8E56A200AA656F /* MOAICommandThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAICommandThread.h; path = "../../src/host-ios/MOAICommandThread.h"; sourceTree = ""; }; + CDDAD1711C8E56A200AA656F /* MOAICommandThread.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAICommandThread.mm; path = "../../src/host-ios/MOAICommandThread.mm"; sourceTree = ""; }; + CDDAD1721C8E56A200AA656F /* MOAIContextMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIContextMgr.h; path = "../../src/host-ios/MOAIContextMgr.h"; sourceTree = ""; }; + CDDAD1731C8E56A200AA656F /* MOAIContextMgr.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIContextMgr.mm; path = "../../src/host-ios/MOAIContextMgr.mm"; sourceTree = ""; }; + CDDAD1741C8E56A200AA656F /* MOAIRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIRenderer.h; path = "../../src/host-ios/MOAIRenderer.h"; sourceTree = ""; }; + CDDAD1751C8E56A200AA656F /* MOAIRenderer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIRenderer.mm; path = "../../src/host-ios/MOAIRenderer.mm"; sourceTree = ""; }; + CDDAD1761C8E56A200AA656F /* MOAIRendererAsync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIRendererAsync.h; path = "../../src/host-ios/MOAIRendererAsync.h"; sourceTree = ""; }; + CDDAD1771C8E56A200AA656F /* MOAIRendererAsync.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIRendererAsync.mm; path = "../../src/host-ios/MOAIRendererAsync.mm"; sourceTree = ""; }; CDFD7E181A08B16C00A94E6B /* aku_modules_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aku_modules_ios.h; path = "../../src/host-modules/aku_modules_ios.h"; sourceTree = SOURCE_ROOT; }; CDFD7E191A08B16C00A94E6B /* aku_modules_ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = aku_modules_ios.mm; path = "../../src/host-modules/aku_modules_ios.mm"; sourceTree = SOURCE_ROOT; }; CDFD7E1A1A08B16C00A94E6B /* aku_modules_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aku_modules_util.cpp; path = "../../src/host-modules/aku_modules_util.cpp"; sourceTree = SOURCE_ROOT; }; CDFD7E1B1A08B16C00A94E6B /* aku_modules_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aku_modules_util.h; path = "../../src/host-modules/aku_modules_util.h"; sourceTree = SOURCE_ROOT; }; CDFD7E1C1A08B16C00A94E6B /* aku_modules.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = aku_modules.cpp; path = "../../src/host-modules/aku_modules.cpp"; sourceTree = SOURCE_ROOT; }; CDFD7E1D1A08B16C00A94E6B /* aku_modules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aku_modules.h; path = "../../src/host-modules/aku_modules.h"; sourceTree = SOURCE_ROOT; }; - CDFD7E4C1A08BC2700A94E6B /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = "../../3rdparty/facebook-ios-sdk-3.14.1/FacebookSDK.framework"; sourceTree = ""; }; + CDFD7E4C1A08BC2700A94E6B /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = "../../3rdparty/facebook-ios-sdk-4.5.1/FBSDKShareKit.framework"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -160,13 +190,15 @@ files = ( CD4DF2C11A12E35B00E9A523 /* libmoai-ios.a in Frameworks */, CDBA1E4F1B1E44FA00DCDC75 /* libmoai-ios-apple.a in Frameworks */, - CD4DF2B51A12E35B00E9A523 /* libmoai-ios-3rdparty-core.a in Frameworks */, CD4DF2B61A12E35B00E9A523 /* libmoai-ios-3rdparty-crypto.a in Frameworks */, CD4DF2B71A12E35B00E9A523 /* libmoai-ios-billing.a in Frameworks */, CD4DF2B81A12E35B00E9A523 /* libmoai-ios-box2d.a in Frameworks */, + CD83178A1BED415C00745C8A /* libmoai-ios-3rdparty-libtess.a in Frameworks */, + CD8317861BED415C00745C8A /* libmoai-ios-3rdparty-expat.a in Frameworks */, CD4DF2B91A12E35B00E9A523 /* libmoai-ios-crypto.a in Frameworks */, CD4DF2BA1A12E35B00E9A523 /* libmoai-ios-http-client.a in Frameworks */, CD76CB701BD4B288008AB56C /* libmoai-ios-image-pvr.a in Frameworks */, + CD83178C1BED415C00745C8A /* libmoai-ios-3rdparty-tinyxml.a in Frameworks */, CD79ECC11B1FAB5200863789 /* libmoai-ios-http-server.a in Frameworks */, CD4DF2BB1A12E35B00E9A523 /* libmoai-ios-luaext.a in Frameworks */, CDBA1E501B1E44FA00DCDC75 /* libmoai-ios-movie.a in Frameworks */, @@ -175,26 +207,33 @@ CD76CB6F1BD4B288008AB56C /* libmoai-ios-image-png.a in Frameworks */, CD4DF2BE1A12E35B00E9A523 /* libmoai-ios-zl-core.a in Frameworks */, CD4DF2BF1A12E35B00E9A523 /* libmoai-ios-zl-crypto.a in Frameworks */, + CD83178B1BED415C00745C8A /* libmoai-ios-3rdparty-sfmt.a in Frameworks */, CD4DF2C01A12E35B00E9A523 /* libmoai-ios-zl-vfs.a in Frameworks */, + CD8317851BED415C00745C8A /* libmoai-ios-3rdparty-contrib.a in Frameworks */, CD9F769E1808DEDC0001EF0C /* AdSupport.framework in Frameworks */, CD76CB6E1BD4B288008AB56C /* libmoai-ios-image-jpg.a in Frameworks */, 03CC910C13B3C48400B2724C /* AudioToolbox.framework in Frameworks */, CD236689180A5CFC006A7236 /* AVFoundation.framework in Frameworks */, 43BA2EF317733819007DCDF0 /* CFNetwork.framework in Frameworks */, + CD8317871BED415C00745C8A /* libmoai-ios-3rdparty-freetype.a in Frameworks */, 03CC910413B3C47600B2724C /* CoreAudio.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, + CD8317891BED415C00745C8A /* libmoai-ios-3rdparty-liblua.a in Frameworks */, 03CC90FE13B3C46A00B2724C /* CoreLocation.framework in Frameworks */, CD23668D180A5D40006A7236 /* CoreMedia.framework in Frameworks */, CD236691180A5D77006A7236 /* CoreMotion.framework in Frameworks */, 0711070513C637F000EE7C53 /* CoreTelephony.framework in Frameworks */, CD236699180A5DC3006A7236 /* EventKit.framework in Frameworks */, + CD8317881BED415C00745C8A /* libmoai-ios-3rdparty-jannson.a in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 079530CE1447A0FF00143A72 /* MediaPlayer.framework in Frameworks */, 665383F7160A8466003D5529 /* MessageUI.framework in Frameworks */, CD4C4163180A6A8600C02381 /* MobileCoreServices.framework in Frameworks */, + CD83178E1BED415C00745C8A /* libmoai-ios-3rdparty-zlib.a in Frameworks */, 03CC90F813B3C45A00B2724C /* OpenGLES.framework in Frameworks */, 03CC912213B3C4A400B2724C /* QuartzCore.framework in Frameworks */, CD76CB711BD4B288008AB56C /* libmoai-ios-image-webp.a in Frameworks */, + CD83178D1BED415C00745C8A /* libmoai-ios-3rdparty-tlsf.a in Frameworks */, CD795FEB17F09B9F006AEB47 /* Social.framework in Frameworks */, 03CC912C13B3C4C000B2724C /* StoreKit.framework in Frameworks */, 03CC911C13B3C49400B2724C /* SystemConfiguration.framework in Frameworks */, @@ -294,8 +333,17 @@ CD4DF2A71A12E30E00E9A523 /* Moai */ = { isa = PBXGroup; children = ( - CD4DF2A81A12E35B00E9A523 /* libmoai-ios-3rdparty-core.a */, + CD83177B1BED415C00745C8A /* libmoai-ios-3rdparty-contrib.a */, CD4DF2A91A12E35B00E9A523 /* libmoai-ios-3rdparty-crypto.a */, + CD83177C1BED415C00745C8A /* libmoai-ios-3rdparty-expat.a */, + CD83177D1BED415C00745C8A /* libmoai-ios-3rdparty-freetype.a */, + CD83177E1BED415C00745C8A /* libmoai-ios-3rdparty-jannson.a */, + CD83177F1BED415C00745C8A /* libmoai-ios-3rdparty-liblua.a */, + CD8317801BED415C00745C8A /* libmoai-ios-3rdparty-libtess.a */, + CD8317811BED415C00745C8A /* libmoai-ios-3rdparty-sfmt.a */, + CD8317821BED415C00745C8A /* libmoai-ios-3rdparty-tinyxml.a */, + CD8317831BED415C00745C8A /* libmoai-ios-3rdparty-tlsf.a */, + CD8317841BED415C00745C8A /* libmoai-ios-3rdparty-zlib.a */, CDBA1E4D1B1E44FA00DCDC75 /* libmoai-ios-apple.a */, CD4DF2AA1A12E35B00E9A523 /* libmoai-ios-billing.a */, CD4DF2AB1A12E35B00E9A523 /* libmoai-ios-box2d.a */, @@ -324,6 +372,14 @@ CDC963CA1A12C6B000F9CA22 /* main.mm */, CDC963CB1A12C6B000F9CA22 /* MOAIAppDelegate.h */, CDC963CC1A12C6B000F9CA22 /* MOAIAppDelegate.mm */, + CDDAD1701C8E56A200AA656F /* MOAICommandThread.h */, + CDDAD1711C8E56A200AA656F /* MOAICommandThread.mm */, + CDDAD1721C8E56A200AA656F /* MOAIContextMgr.h */, + CDDAD1731C8E56A200AA656F /* MOAIContextMgr.mm */, + CDDAD1741C8E56A200AA656F /* MOAIRenderer.h */, + CDDAD1751C8E56A200AA656F /* MOAIRenderer.mm */, + CDDAD1761C8E56A200AA656F /* MOAIRendererAsync.h */, + CDDAD1771C8E56A200AA656F /* MOAIRendererAsync.mm */, CDC963CD1A12C6B000F9CA22 /* MOAIView.h */, CDC963CE1A12C6B000F9CA22 /* MOAIView.mm */, ); @@ -374,7 +430,7 @@ attributes = { LastUpgradeCheck = 0460; }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MoaiSample" */; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "moai-ios-static" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; @@ -445,9 +501,13 @@ files = ( CDC963D41A12C6B000F9CA22 /* MOAIAppDelegate.mm in Sources */, CDFD7E251A08B16C00A94E6B /* aku_modules.cpp in Sources */, + CDDAD1791C8E56A200AA656F /* MOAIContextMgr.mm in Sources */, CDC963D71A12C6B000F9CA22 /* MOAIView.mm in Sources */, + CDDAD1781C8E56A200AA656F /* MOAICommandThread.mm in Sources */, CDFD7E221A08B16C00A94E6B /* aku_modules_util.cpp in Sources */, CDFD7E1F1A08B16C00A94E6B /* aku_modules_ios.mm in Sources */, + CDDAD17B1C8E56A200AA656F /* MOAIRendererAsync.mm in Sources */, + CDDAD17A1C8E56A200AA656F /* MOAIRenderer.mm in Sources */, CDC963D11A12C6B000F9CA22 /* main.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -481,6 +541,8 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", + _DEBUG, + DEBUG, "AKU_WITH_APPLE=1", "AKU_WITH_IOS=1", ); @@ -513,6 +575,7 @@ GCC_C_LANGUAGE_STANDARD = c99; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", + NDEBUG, "AKU_WITH_APPLE=1", "AKU_WITH_IOS=1", ); @@ -547,7 +610,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MoaiSample" */ = { + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "moai-ios-static" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, diff --git a/xcode/ios-static/moai-ios-static.xcodeproj/project.xcworkspace/xcshareddata/moai-ios-static.xcscmblueprint b/xcode/ios-static/moai-ios-static.xcodeproj/project.xcworkspace/xcshareddata/moai-ios-static.xcscmblueprint new file mode 100644 index 0000000000..aba2517a4c --- /dev/null +++ b/xcode/ios-static/moai-ios-static.xcodeproj/project.xcworkspace/xcshareddata/moai-ios-static.xcscmblueprint @@ -0,0 +1,30 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "63C4897045D0EF88507AD257AEF500CB53038CE0", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "63C4897045D0EF88507AD257AEF500CB53038CE0" : 0, + "DE072679D3B61AA77D9DD9650241084BC6FA3713" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "1CE8BDE3-4B91-46EF-B29A-33104254C877", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "63C4897045D0EF88507AD257AEF500CB53038CE0" : "moai-dev\/", + "DE072679D3B61AA77D9DD9650241084BC6FA3713" : "..\/.." + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "moai-ios-static", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "xcode\/ios-static\/moai-ios-static.xcodeproj", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:fallguyconsulting\/moai-dev.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "63C4897045D0EF88507AD257AEF500CB53038CE0" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "bitbucket.org:pointinside\/ios-pimapslib.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "DE072679D3B61AA77D9DD9650241084BC6FA3713" + } + ] +} \ No newline at end of file diff --git a/xcode/ios/moai-ios.xcodeproj/project.pbxproj b/xcode/ios/moai-ios.xcodeproj/project.pbxproj index 404cf21cd4..7cb0108bd4 100755 --- a/xcode/ios/moai-ios.xcodeproj/project.pbxproj +++ b/xcode/ios/moai-ios.xcodeproj/project.pbxproj @@ -35,17 +35,18 @@ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 43BA2EF317733819007DCDF0 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43BA2EF217733819007DCDF0 /* CFNetwork.framework */; }; 665383F7160A8466003D5529 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 665383F6160A8466003D5529 /* MessageUI.framework */; }; + CD081D5D1C190D8500782278 /* MOAIContextMgr.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD081D5C1C190D8500782278 /* MOAIContextMgr.mm */; }; CD236689180A5CFC006A7236 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD236688180A5CFC006A7236 /* AVFoundation.framework */; }; CD23668D180A5D40006A7236 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD23668C180A5D40006A7236 /* CoreMedia.framework */; }; CD236691180A5D77006A7236 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD236690180A5D77006A7236 /* CoreMotion.framework */; }; CD236699180A5DC3006A7236 /* EventKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD236698180A5DC3006A7236 /* EventKit.framework */; }; + CD2600AE1C1D1C90009C7ADB /* MOAIRenderer.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD2600AD1C1D1C90009C7ADB /* MOAIRenderer.mm */; }; CD30078A1A12D87400C9CD1D /* main.lua in Resources */ = {isa = PBXBuildFile; fileRef = CD3007891A12D87400C9CD1D /* main.lua */; }; CD4C4163180A6A8600C02381 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD4C4162180A6A8600C02381 /* MobileCoreServices.framework */; }; CD51622B1BCDDB31000718FB /* libmoai-ios-image-jpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD51621C1BCDDB20000718FB /* libmoai-ios-image-jpg.a */; }; CD51622C1BCDDB31000718FB /* libmoai-ios-image-png.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD51621E1BCDDB20000718FB /* libmoai-ios-image-png.a */; }; CD51622D1BCDDB31000718FB /* libmoai-ios-image-pvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD5162201BCDDB20000718FB /* libmoai-ios-image-pvr.a */; }; CD51622E1BCDDB31000718FB /* libmoai-ios-image-webp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD5162221BCDDB20000718FB /* libmoai-ios-image-webp.a */; }; - CD598D801AD86FA000478C49 /* libmoai-ios-3rdparty-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD598D231AD86F3500478C49 /* libmoai-ios-3rdparty-core.a */; }; CD598D811AD86FA000478C49 /* libmoai-ios-3rdparty-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD598D251AD86F3500478C49 /* libmoai-ios-3rdparty-crypto.a */; }; CD598D821AD86FA000478C49 /* libmoai-ios-apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD598D211AD86F3500478C49 /* libmoai-ios-apple.a */; }; CD598D831AD86FA000478C49 /* libmoai-ios-box2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD598D2D1AD86F3500478C49 /* libmoai-ios-box2d.a */; }; @@ -63,6 +64,16 @@ CD598D8F1AD86FCC00478C49 /* libmoai-ios-billing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD598D2B1AD86F3500478C49 /* libmoai-ios-billing.a */; }; CD6F1F4E1A79CE1800E772A0 /* lua in Resources */ = {isa = PBXBuildFile; fileRef = CD6F1F4D1A79CE1800E772A0 /* lua */; }; CD795FEB17F09B9F006AEB47 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD795FEA17F09B9F006AEB47 /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + CD8317681BED3DBC00745C8A /* libmoai-ios-3rdparty-contrib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317531BED3DAB00745C8A /* libmoai-ios-3rdparty-contrib.a */; }; + CD8317691BED3DBC00745C8A /* libmoai-ios-3rdparty-expat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317551BED3DAB00745C8A /* libmoai-ios-3rdparty-expat.a */; }; + CD83176A1BED3DBC00745C8A /* libmoai-ios-3rdparty-freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317571BED3DAB00745C8A /* libmoai-ios-3rdparty-freetype.a */; }; + CD83176B1BED3DBC00745C8A /* libmoai-ios-3rdparty-jannson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317591BED3DAB00745C8A /* libmoai-ios-3rdparty-jannson.a */; }; + CD83176C1BED3DBC00745C8A /* libmoai-ios-3rdparty-liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83175B1BED3DAB00745C8A /* libmoai-ios-3rdparty-liblua.a */; }; + CD83176D1BED3DBC00745C8A /* libmoai-ios-3rdparty-libtess.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83175D1BED3DAB00745C8A /* libmoai-ios-3rdparty-libtess.a */; }; + CD83176E1BED3DBC00745C8A /* libmoai-ios-3rdparty-sfmt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD83175F1BED3DAB00745C8A /* libmoai-ios-3rdparty-sfmt.a */; }; + CD8317701BED3DBC00745C8A /* libmoai-ios-3rdparty-tinyxml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317631BED3DAB00745C8A /* libmoai-ios-3rdparty-tinyxml.a */; }; + CD8317711BED3DBC00745C8A /* libmoai-ios-3rdparty-tlsf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317651BED3DAB00745C8A /* libmoai-ios-3rdparty-tlsf.a */; }; + CD8317721BED3DBC00745C8A /* libmoai-ios-3rdparty-zlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8317671BED3DAB00745C8A /* libmoai-ios-3rdparty-zlib.a */; }; CD9F769E1808DEDC0001EF0C /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD9F769D1808DEDC0001EF0C /* AdSupport.framework */; }; CDBA1ED61B1E738F00DCDC75 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CDBA1EC61B1E738F00DCDC75 /* Default-568h@2x.png */; }; CDBA1ED91B1E738F00DCDC75 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = CDBA1EC71B1E738F00DCDC75 /* Default.png */; }; @@ -84,6 +95,8 @@ CDC963D11A12C6B000F9CA22 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC963CA1A12C6B000F9CA22 /* main.mm */; }; CDC963D41A12C6B000F9CA22 /* MOAIAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC963CC1A12C6B000F9CA22 /* MOAIAppDelegate.mm */; }; CDC963D71A12C6B000F9CA22 /* MOAIView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC963CE1A12C6B000F9CA22 /* MOAIView.mm */; }; + CDE655AE1C0AFA0E004493DD /* MOAIRendererAsync.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDE655AA1C0AFA0E004493DD /* MOAIRendererAsync.mm */; }; + CDE655AF1C0AFA0E004493DD /* MOAICommandThread.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDE655AC1C0AFA0E004493DD /* MOAICommandThread.mm */; }; CDFD7E1F1A08B16C00A94E6B /* aku_modules_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDFD7E191A08B16C00A94E6B /* aku_modules_ios.mm */; }; CDFD7E221A08B16C00A94E6B /* aku_modules_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDFD7E1A1A08B16C00A94E6B /* aku_modules_util.cpp */; }; CDFD7E251A08B16C00A94E6B /* aku_modules.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDFD7E1C1A08B16C00A94E6B /* aku_modules.cpp */; }; @@ -188,13 +201,6 @@ remoteGlobalIDString = CD257BA21A6255380057A53A; remoteInfo = "libmoai-ios-apple"; }; - CD598D221AD86F3500478C49 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 0379C5961333ECD800E89DDC; - remoteInfo = "libmoai-ios-3rdparty-core"; - }; CD598D241AD86F3500478C49 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; @@ -517,6 +523,146 @@ remoteGlobalIDString = CD6D752517EE415D00964415; remoteInfo = "libmoai-osx-zl-vfs"; }; + CD83170A1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD8315C81BED3AE900745C8A; + remoteInfo = "libmoai-ios-3rdparty-contrib"; + }; + CD83170C1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD830D741BED355500745C8A; + remoteInfo = "libmoai-ios-3rdparty-expat"; + }; + CD83170E1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD83152D1BED3A8100745C8A; + remoteInfo = "libmoai-ios-3rdparty-freetype"; + }; + CD8317101BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD830E4B1BED356D00745C8A; + remoteInfo = "libmoai-ios-3rdparty-jansson"; + }; + CD8317121BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD83167E1BED3C1800745C8A; + remoteInfo = "libmoai-ios-3rdparty-liblua"; + }; + CD8317141BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD8316231BED3BC100745C8A; + remoteInfo = "libmoai-ios-3rdparty-libtess"; + }; + CD8317161BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD8313551BED394D00745C8A; + remoteInfo = "libmoai-ios-3rdparty-sfmt"; + }; + CD83171A1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD8311A71BED379600745C8A; + remoteInfo = "libmoai-ios-3rdparty-tinyxml"; + }; + CD83171C1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD83142C1BED395600745C8A; + remoteInfo = "libmoai-ios-3rdparty-tlsf"; + }; + CD83171E1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = CD83127E1BED38F600745C8A; + remoteInfo = "libmoai-ios-3rdparty-zlib"; + }; + CD8317521BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD8316221BED3AE900745C8A; + remoteInfo = "libmoai-ios-3rdparty-contrib"; + }; + CD8317541BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD830E4A1BED355500745C8A; + remoteInfo = "libmoai-ios-3rdparty-expat"; + }; + CD8317561BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD8315C71BED3A8100745C8A; + remoteInfo = "libmoai-ios-3rdparty-freetype"; + }; + CD8317581BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD830F211BED356D00745C8A; + remoteInfo = "libmoai-ios-3rdparty-jansson"; + }; + CD83175A1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD8316C91BED3C1800745C8A; + remoteInfo = "libmoai-ios-3rdparty-liblua"; + }; + CD83175C1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD83167D1BED3BC100745C8A; + remoteInfo = "libmoai-ios-3rdparty-libtess"; + }; + CD83175E1BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD83142B1BED394D00745C8A; + remoteInfo = "libmoai-ios-3rdparty-sfmt"; + }; + CD8317621BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD83127D1BED379600745C8A; + remoteInfo = "libmoai-ios-3rdparty-tinyxml"; + }; + CD8317641BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD8315021BED395600745C8A; + remoteInfo = "libmoai-ios-3rdparty-tlsf"; + }; + CD8317661BED3DAB00745C8A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = CD8313541BED38F600745C8A; + remoteInfo = "libmoai-ios-3rdparty-zlib"; + }; CDC097EC1AE9C7EA002E325F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; @@ -538,13 +684,6 @@ remoteGlobalIDString = CD257B251A6255380057A53A; remoteInfo = "libmoai-ios-apple"; }; - CDC097F31AE9C868002E325F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 0379C3D51333ECD800E89DDC; - remoteInfo = "libmoai-ios-3rdparty-core"; - }; CDC097F51AE9C868002E325F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 03CC90AE13B3C39D00B2724C /* libmoai.xcodeproj */; @@ -672,10 +811,14 @@ 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 43BA2EF217733819007DCDF0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 665383F6160A8466003D5529 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + CD081D5B1C190D8500782278 /* MOAIContextMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIContextMgr.h; path = "../../src/host-ios/MOAIContextMgr.h"; sourceTree = ""; }; + CD081D5C1C190D8500782278 /* MOAIContextMgr.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIContextMgr.mm; path = "../../src/host-ios/MOAIContextMgr.mm"; sourceTree = ""; }; CD236688180A5CFC006A7236 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; CD23668C180A5D40006A7236 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; CD236690180A5D77006A7236 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; CD236698180A5DC3006A7236 /* EventKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EventKit.framework; path = System/Library/Frameworks/EventKit.framework; sourceTree = SDKROOT; }; + CD2600AC1C1D1C90009C7ADB /* MOAIRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIRenderer.h; path = "../../src/host-ios/MOAIRenderer.h"; sourceTree = ""; }; + CD2600AD1C1D1C90009C7ADB /* MOAIRenderer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIRenderer.mm; path = "../../src/host-ios/MOAIRenderer.mm"; sourceTree = ""; }; CD3007891A12D87400C9CD1D /* main.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.lua; sourceTree = ""; }; CD4C4162180A6A8600C02381 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; CD6F1F4D1A79CE1800E772A0 /* lua */ = {isa = PBXFileReference; lastKnownFileType = folder; path = lua; sourceTree = ""; }; @@ -702,6 +845,10 @@ CDC963CC1A12C6B000F9CA22 /* MOAIAppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIAppDelegate.mm; path = "../../src/host-ios/MOAIAppDelegate.mm"; sourceTree = ""; }; CDC963CD1A12C6B000F9CA22 /* MOAIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIView.h; path = "../../src/host-ios/MOAIView.h"; sourceTree = ""; }; CDC963CE1A12C6B000F9CA22 /* MOAIView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIView.mm; path = "../../src/host-ios/MOAIView.mm"; sourceTree = ""; }; + CDE655A91C0AFA0E004493DD /* MOAIRendererAsync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIRendererAsync.h; path = "../../src/host-ios/MOAIRendererAsync.h"; sourceTree = ""; }; + CDE655AA1C0AFA0E004493DD /* MOAIRendererAsync.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIRendererAsync.mm; path = "../../src/host-ios/MOAIRendererAsync.mm"; sourceTree = ""; }; + CDE655AB1C0AFA0E004493DD /* MOAICommandThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAICommandThread.h; path = "../../src/host-ios/MOAICommandThread.h"; sourceTree = ""; }; + CDE655AC1C0AFA0E004493DD /* MOAICommandThread.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAICommandThread.mm; path = "../../src/host-ios/MOAICommandThread.mm"; sourceTree = ""; }; CDF389EE1A51D39000BDEB4D /* aku_modules_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aku_modules_config.h; path = "../../src/host-modules/aku_modules_config.h"; sourceTree = ""; }; CDF389EF1A51D39000BDEB4D /* aku_modules_ios_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aku_modules_ios_config.h; path = "../../src/host-modules/aku_modules_ios_config.h"; sourceTree = ""; }; CDFD7E181A08B16C00A94E6B /* aku_modules_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = aku_modules_ios.h; path = "../../src/host-modules/aku_modules_ios.h"; sourceTree = SOURCE_ROOT; }; @@ -722,8 +869,17 @@ buildActionMask = 2147483647; files = ( CD598D8E1AD86FA000478C49 /* libmoai-ios.a in Frameworks */, - CD598D801AD86FA000478C49 /* libmoai-ios-3rdparty-core.a in Frameworks */, + CD8317681BED3DBC00745C8A /* libmoai-ios-3rdparty-contrib.a in Frameworks */, CD598D811AD86FA000478C49 /* libmoai-ios-3rdparty-crypto.a in Frameworks */, + CD8317691BED3DBC00745C8A /* libmoai-ios-3rdparty-expat.a in Frameworks */, + CD83176A1BED3DBC00745C8A /* libmoai-ios-3rdparty-freetype.a in Frameworks */, + CD83176B1BED3DBC00745C8A /* libmoai-ios-3rdparty-jannson.a in Frameworks */, + CD83176C1BED3DBC00745C8A /* libmoai-ios-3rdparty-liblua.a in Frameworks */, + CD83176D1BED3DBC00745C8A /* libmoai-ios-3rdparty-libtess.a in Frameworks */, + CD83176E1BED3DBC00745C8A /* libmoai-ios-3rdparty-sfmt.a in Frameworks */, + CD8317701BED3DBC00745C8A /* libmoai-ios-3rdparty-tinyxml.a in Frameworks */, + CD8317711BED3DBC00745C8A /* libmoai-ios-3rdparty-tlsf.a in Frameworks */, + CD8317721BED3DBC00745C8A /* libmoai-ios-3rdparty-zlib.a in Frameworks */, CD598D821AD86FA000478C49 /* libmoai-ios-apple.a in Frameworks */, CD598D8F1AD86FCC00478C49 /* libmoai-ios-billing.a in Frameworks */, CD598D831AD86FA000478C49 /* libmoai-ios-box2d.a in Frameworks */, @@ -863,8 +1019,17 @@ children = ( CD598D1F1AD86F3500478C49 /* libmoai-ios.a */, CD598D211AD86F3500478C49 /* libmoai-ios-apple.a */, - CD598D231AD86F3500478C49 /* libmoai-ios-3rdparty-core.a */, + CD8317531BED3DAB00745C8A /* libmoai-ios-3rdparty-contrib.a */, CD598D251AD86F3500478C49 /* libmoai-ios-3rdparty-crypto.a */, + CD8317551BED3DAB00745C8A /* libmoai-ios-3rdparty-expat.a */, + CD8317571BED3DAB00745C8A /* libmoai-ios-3rdparty-freetype.a */, + CD8317591BED3DAB00745C8A /* libmoai-ios-3rdparty-jannson.a */, + CD83175B1BED3DAB00745C8A /* libmoai-ios-3rdparty-liblua.a */, + CD83175D1BED3DAB00745C8A /* libmoai-ios-3rdparty-libtess.a */, + CD83175F1BED3DAB00745C8A /* libmoai-ios-3rdparty-sfmt.a */, + CD8317631BED3DAB00745C8A /* libmoai-ios-3rdparty-tinyxml.a */, + CD8317651BED3DAB00745C8A /* libmoai-ios-3rdparty-tlsf.a */, + CD8317671BED3DAB00745C8A /* libmoai-ios-3rdparty-zlib.a */, CD598D271AD86F3500478C49 /* libmoai-ios-adcolony.a */, CD598D291AD86F3500478C49 /* libmoai-ios-audio-sampler.a */, CD598D2B1AD86F3500478C49 /* libmoai-ios-billing.a */, @@ -929,6 +1094,14 @@ CDC963CA1A12C6B000F9CA22 /* main.mm */, CDC963CB1A12C6B000F9CA22 /* MOAIAppDelegate.h */, CDC963CC1A12C6B000F9CA22 /* MOAIAppDelegate.mm */, + CDE655AB1C0AFA0E004493DD /* MOAICommandThread.h */, + CDE655AC1C0AFA0E004493DD /* MOAICommandThread.mm */, + CD081D5B1C190D8500782278 /* MOAIContextMgr.h */, + CD081D5C1C190D8500782278 /* MOAIContextMgr.mm */, + CD2600AC1C1D1C90009C7ADB /* MOAIRenderer.h */, + CD2600AD1C1D1C90009C7ADB /* MOAIRenderer.mm */, + CDE655A91C0AFA0E004493DD /* MOAIRendererAsync.h */, + CDE655AA1C0AFA0E004493DD /* MOAIRendererAsync.mm */, CDC963CD1A12C6B000F9CA22 /* MOAIView.h */, CDC963CE1A12C6B000F9CA22 /* MOAIView.mm */, ); @@ -967,8 +1140,17 @@ dependencies = ( CDF389ED1A51CF5A00BDEB4D /* PBXTargetDependency */, CDC097F01AE9C868002E325F /* PBXTargetDependency */, - CDC097F41AE9C868002E325F /* PBXTargetDependency */, + CD83170B1BED3DAB00745C8A /* PBXTargetDependency */, CDC097F61AE9C868002E325F /* PBXTargetDependency */, + CD83170D1BED3DAB00745C8A /* PBXTargetDependency */, + CD83170F1BED3DAB00745C8A /* PBXTargetDependency */, + CD8317111BED3DAB00745C8A /* PBXTargetDependency */, + CD8317131BED3DAB00745C8A /* PBXTargetDependency */, + CD8317151BED3DAB00745C8A /* PBXTargetDependency */, + CD8317171BED3DAB00745C8A /* PBXTargetDependency */, + CD83171B1BED3DAB00745C8A /* PBXTargetDependency */, + CD83171D1BED3DAB00745C8A /* PBXTargetDependency */, + CD83171F1BED3DAB00745C8A /* PBXTargetDependency */, CDC097F21AE9C868002E325F /* PBXTargetDependency */, CDC0980E1AE9C88A002E325F /* PBXTargetDependency */, CDC097F81AE9C868002E325F /* PBXTargetDependency */, @@ -999,7 +1181,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0720; TargetAttributes = { 1D6058900D05DD3D006BFB54 = { DevelopmentTeam = BUD786NAA6; @@ -1106,13 +1288,6 @@ remoteRef = CD598D201AD86F3500478C49 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - CD598D231AD86F3500478C49 /* libmoai-ios-3rdparty-core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libmoai-ios-3rdparty-core.a"; - remoteRef = CD598D221AD86F3500478C49 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; CD598D251AD86F3500478C49 /* libmoai-ios-3rdparty-crypto.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1435,6 +1610,76 @@ remoteRef = CD598D7E1AD86F3500478C49 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + CD8317531BED3DAB00745C8A /* libmoai-ios-3rdparty-contrib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-contrib.a"; + remoteRef = CD8317521BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD8317551BED3DAB00745C8A /* libmoai-ios-3rdparty-expat.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-expat.a"; + remoteRef = CD8317541BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD8317571BED3DAB00745C8A /* libmoai-ios-3rdparty-freetype.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-freetype.a"; + remoteRef = CD8317561BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD8317591BED3DAB00745C8A /* libmoai-ios-3rdparty-jannson.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-jannson.a"; + remoteRef = CD8317581BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD83175B1BED3DAB00745C8A /* libmoai-ios-3rdparty-liblua.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-liblua.a"; + remoteRef = CD83175A1BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD83175D1BED3DAB00745C8A /* libmoai-ios-3rdparty-libtess.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-libtess.a"; + remoteRef = CD83175C1BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD83175F1BED3DAB00745C8A /* libmoai-ios-3rdparty-sfmt.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-sfmt.a"; + remoteRef = CD83175E1BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD8317631BED3DAB00745C8A /* libmoai-ios-3rdparty-tinyxml.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-tinyxml.a"; + remoteRef = CD8317621BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD8317651BED3DAB00745C8A /* libmoai-ios-3rdparty-tlsf.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-tlsf.a"; + remoteRef = CD8317641BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CD8317671BED3DAB00745C8A /* libmoai-ios-3rdparty-zlib.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libmoai-ios-3rdparty-zlib.a"; + remoteRef = CD8317661BED3DAB00745C8A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; CDC097ED1AE9C7EA002E325F /* libmoai-ios-movie.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1507,12 +1752,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + CD081D5D1C190D8500782278 /* MOAIContextMgr.mm in Sources */, + CDE655AE1C0AFA0E004493DD /* MOAIRendererAsync.mm in Sources */, CDC963D41A12C6B000F9CA22 /* MOAIAppDelegate.mm in Sources */, CDFD7E251A08B16C00A94E6B /* aku_modules.cpp in Sources */, + CDE655AF1C0AFA0E004493DD /* MOAICommandThread.mm in Sources */, CDC963D71A12C6B000F9CA22 /* MOAIView.mm in Sources */, CDFD7E221A08B16C00A94E6B /* aku_modules_util.cpp in Sources */, CDFD7E1F1A08B16C00A94E6B /* aku_modules_ios.mm in Sources */, CDC963D11A12C6B000F9CA22 /* main.mm in Sources */, + CD2600AE1C1D1C90009C7ADB /* MOAIRenderer.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1539,6 +1788,56 @@ name = "libmoai-ios-image-webp"; targetProxy = CD5161EE1BCDDB20000718FB /* PBXContainerItemProxy */; }; + CD83170B1BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-contrib"; + targetProxy = CD83170A1BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD83170D1BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-expat"; + targetProxy = CD83170C1BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD83170F1BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-freetype"; + targetProxy = CD83170E1BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD8317111BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-jansson"; + targetProxy = CD8317101BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD8317131BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-liblua"; + targetProxy = CD8317121BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD8317151BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-libtess"; + targetProxy = CD8317141BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD8317171BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-sfmt"; + targetProxy = CD8317161BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD83171B1BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-tinyxml"; + targetProxy = CD83171A1BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD83171D1BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-tlsf"; + targetProxy = CD83171C1BED3DAB00745C8A /* PBXContainerItemProxy */; + }; + CD83171F1BED3DAB00745C8A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "libmoai-ios-3rdparty-zlib"; + targetProxy = CD83171E1BED3DAB00745C8A /* PBXContainerItemProxy */; + }; CDC097F01AE9C868002E325F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "libmoai-ios"; @@ -1549,11 +1848,6 @@ name = "libmoai-ios-apple"; targetProxy = CDC097F11AE9C868002E325F /* PBXContainerItemProxy */; }; - CDC097F41AE9C868002E325F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "libmoai-ios-3rdparty-core"; - targetProxy = CDC097F31AE9C868002E325F /* PBXContainerItemProxy */; - }; CDC097F61AE9C868002E325F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "libmoai-ios-3rdparty-crypto"; @@ -1663,13 +1957,15 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "../../3rdparty/MobileAppTracking-ios-2.6/sdk-ios", - "../../3rdparty/facebook-ios-sdk-3.14.1", + "../../3rdparty/facebook-ios-sdk-4.5.1", ../../3rdparty/TapjoySDK_iOS_v10.0.2/Libraries/Tapjoy.embeddedframework, "../../3rdparty/vungle-2.0.1/vunglepub.embeddedframework", ); GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", + DEBUG, + _DEBUG, "AKU_WITH_APPLE=1", "AKU_WITH_IOS=1", ); @@ -1743,12 +2039,13 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "../../3rdparty/MobileAppTracking-ios-2.6/sdk-ios", - "../../3rdparty/facebook-ios-sdk-3.14.1", + "../../3rdparty/facebook-ios-sdk-4.5.1", ../../3rdparty/TapjoySDK_iOS_v10.0.2/Libraries/Tapjoy.embeddedframework, "../../3rdparty/vungle-2.0.1/vunglepub.embeddedframework", ); GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", + NDEBUG, "AKU_WITH_APPLE=1", "AKU_WITH_IOS=1", ); diff --git a/xcode/ios/moai-ios.xcodeproj/project.xcworkspace/xcshareddata/moai-ios.xcscmblueprint b/xcode/ios/moai-ios.xcodeproj/project.xcworkspace/xcshareddata/moai-ios.xcscmblueprint new file mode 100644 index 0000000000..0e8ea3e40e --- /dev/null +++ b/xcode/ios/moai-ios.xcodeproj/project.xcworkspace/xcshareddata/moai-ios.xcscmblueprint @@ -0,0 +1,44 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "63C4897045D0EF88507AD257AEF500CB53038CE0", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "DE072679D3B61AA77D9DD9650241084BC6FA3713" : 0, + "0BE2D393D91F44FADD1C4CA1AAED513D7753907E" : 0, + "7BB53B1506E6E1939A1DD83892672A1FDD165695" : 0, + "63C4897045D0EF88507AD257AEF500CB53038CE0" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "9CCA7776-63D6-4DF0-AE81-B70EB1BDF459", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "DE072679D3B61AA77D9DD9650241084BC6FA3713" : "..\/..", + "0BE2D393D91F44FADD1C4CA1AAED513D7753907E" : "moai-dev\/3rdparty\/kissfft\/", + "7BB53B1506E6E1939A1DD83892672A1FDD165695" : "", + "63C4897045D0EF88507AD257AEF500CB53038CE0" : "moai-dev\/" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "moai-ios", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "xcode\/ios\/moai-ios.xcodeproj", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/itdaniher\/kissfft.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "0BE2D393D91F44FADD1C4CA1AAED513D7753907E" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:fallguyconsulting\/moai-dev.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "63C4897045D0EF88507AD257AEF500CB53038CE0" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/moai\/zipline-studio.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "7BB53B1506E6E1939A1DD83892672A1FDD165695" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "bitbucket.org:pointinside\/ios-pimapslib.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "DE072679D3B61AA77D9DD9650241084BC6FA3713" + } + ] +} \ No newline at end of file diff --git a/xcode/ios/moai-ios.xcodeproj/xcshareddata/xcschemes/moai-ios.xcscheme b/xcode/ios/moai-ios.xcodeproj/xcshareddata/xcschemes/moai-ios.xcscheme index 65cb0a466b..22e1d35543 100644 --- a/xcode/ios/moai-ios.xcodeproj/xcshareddata/xcschemes/moai-ios.xcscheme +++ b/xcode/ios/moai-ios.xcodeproj/xcshareddata/xcschemes/moai-ios.xcscheme @@ -1,6 +1,6 @@ /dev/null 2>&1; then + export CCACHE_LOGFILE=/tmp/cache.debug + export CCACHE_MAXSIZE=10G + export CCACHE_CPP2=true + export CCACHE_HARDLINK=true + export CCACHE_SLOPPINESS=file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches + exec ccache /usr/bin/clang "$@" +else + exec clang "$@" +fi diff --git a/xcode/util/ccache-clang++ b/xcode/util/ccache-clang++ new file mode 100755 index 0000000000..8cdeae215a --- /dev/null +++ b/xcode/util/ccache-clang++ @@ -0,0 +1,14 @@ +#!/bin/sh + +#https://pspdfkit.com/blog/2015/ccache-for-fun-and-profit/ + +if type -p ccache >/dev/null 2>&1; then + export CCACHE_LOGFILE=/tmp/cache.debug + export CCACHE_MAXSIZE=10G + export CCACHE_CPP2=true + export CCACHE_HARDLINK=true + export CCACHE_SLOPPINESS=file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches + exec ccache /usr/bin/clang++ "$@" +else + exec clang++ "$@" +fi