mirror of https://github.com/axmolengine/axmol.git
Merge remote-tracking branch 'cocos2d/v3' into xcode_6_3_tests_compiles
This commit is contained in:
commit
510d502631
|
@ -118,47 +118,13 @@ tests/*/publish/
|
|||
project.properties
|
||||
|
||||
# Ignore prebuilt libraries folder
|
||||
/external/xxhash/
|
||||
/external/curl/
|
||||
/external/edtaa3func/
|
||||
/external/freetype2/
|
||||
/external/glfw3/
|
||||
/external/jpeg/
|
||||
/external/json/
|
||||
/external/linux-specific/
|
||||
/external/lua/
|
||||
/external/png/
|
||||
/external/sqlite3/
|
||||
/external/tiff/
|
||||
/external/tinyxml2/
|
||||
/external/unzip/
|
||||
/external/webp/
|
||||
/external/websockets/
|
||||
/external/win32-specific/
|
||||
/external/winrt-specific/
|
||||
/external/winrt_8.1-specific/
|
||||
/external/wp8-specific/
|
||||
/external/wp_8.1-specific/
|
||||
/external/version.json
|
||||
/external/*
|
||||
!/external/config.json
|
||||
/templates/lua-template-runtime/runtime
|
||||
/v*-deps-*.zip
|
||||
/v*-lua-runtime-*.zip
|
||||
/tools/fbx-conv/
|
||||
external/chipmunk
|
||||
tests/cpp-tests/Resources/audio
|
||||
/external/Box2D/
|
||||
/external/ConvertUTF/
|
||||
/external/audio/
|
||||
/external/xxtea/
|
||||
/external/protobuf-lite/
|
||||
/external/flatbuffers/
|
||||
/external/android/
|
||||
/external/ios/
|
||||
/external/linux/
|
||||
/external/mac/
|
||||
/external/win32/
|
||||
/external/winrt_8.1/
|
||||
/external/wp_8.1/
|
||||
/tests/js-tests/
|
||||
/tests/lua-empty-test/src/cocos/
|
||||
/tests/lua-game-controller-test/src/cocos/
|
||||
|
|
|
@ -1154,7 +1154,6 @@
|
|||
1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; };
|
||||
29031E0719BFE8D400EFA1DF /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29031E0619BFE8D400EFA1DF /* libchipmunk.a */; };
|
||||
29031E0919BFE8DE00EFA1DF /* libchipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 29031E0819BFE8DE00EFA1DF /* libchipmunk.a */; };
|
||||
2905E9CD1ACD3D8C00092DD2 /* libz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2905E9CC1ACD3D8C00092DD2 /* libz.a */; };
|
||||
292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; };
|
||||
292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; };
|
||||
292DB13F19B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; };
|
||||
|
@ -4029,7 +4028,6 @@
|
|||
files = (
|
||||
29031E0719BFE8D400EFA1DF /* libchipmunk.a in Frameworks */,
|
||||
15AE1C1A19AAE3C800C27E9E /* libwebsockets.a in Frameworks */,
|
||||
2905E9CD1ACD3D8C00092DD2 /* libz.a in Frameworks */,
|
||||
292F1A6B1A5250F700E479F8 /* libssl.a in Frameworks */,
|
||||
292F1A631A52447100E479F8 /* libcrypto.a in Frameworks */,
|
||||
B217704E1977ED9F009EE11B /* libsqlite3.dylib in Frameworks */,
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8\freetype;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<PreprocessorDefinitions>WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
@ -140,7 +140,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8\freetype;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<PreprocessorDefinitions>WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
@ -156,7 +156,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8\freetype;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<PreprocessorDefinitions>WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
@ -172,7 +172,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8\freetype;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<PreprocessorDefinitions>WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
@ -188,7 +188,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8\freetype;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<PreprocessorDefinitions>WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
@ -204,7 +204,7 @@
|
|||
<ClCompile>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\wp8;$(EngineRoot)external\jpeg\include\wp8;$(EngineRoot)external\tiff\include\wp8;$(EngineRoot)external\freetype2\include\wp8\freetype;$(EngineRoot)external\wp8-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(IntermediateOutputPath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<PreprocessorDefinitions>WP8_SHADER_COMPILER;CC_USE_PHYSICS=0;CC_STATIC;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
|
|
|
@ -113,32 +113,32 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_Windows_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_Windows_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_Windows_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_Windows_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_Windows_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_Windows_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_Windows_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_Windows_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_Windows_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_Windows_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_Windows_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_Windows_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
|
|
@ -85,22 +85,22 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IgnoreImportLibrary>false</IgnoreImportLibrary>
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.1</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.1</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
|
|
@ -72,18 +72,18 @@
|
|||
<GenerateManifest>false</GenerateManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.0</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.0</TargetName>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.0</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.0</TargetName>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.0</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.0</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<TargetName>libcocos2d_v3.5_WindowsPhone_8.0</TargetName>
|
||||
<TargetName>libcocos2d_v3.6_WindowsPhone_8.0</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,8 @@ THE SOFTWARE.
|
|||
#include "3d/CCAABB.h"
|
||||
#include "3d/CCRay.h"
|
||||
#include <vector>
|
||||
|
||||
#include "base/CCEventListenerCustom.h"
|
||||
#include "base/CCEventDispatcher.h"
|
||||
NS_CC_BEGIN
|
||||
|
||||
/**
|
||||
|
@ -100,9 +101,9 @@ public:
|
|||
DetailMap();
|
||||
DetailMap(const char * detailMapSrc, float size = 35);
|
||||
/*detail Image source file path*/
|
||||
std::string detailMapSrc;
|
||||
std::string _detailMapSrc;
|
||||
/*detailMapSize determine how many tiles that Terrain represent*/
|
||||
float detailMapSize;
|
||||
float _detailMapSize;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -122,40 +123,40 @@ public:
|
|||
/**
|
||||
*deterimine the chunk size,chunk is the minimal subdivision of the Terrain
|
||||
*/
|
||||
Size chunkSize;
|
||||
Size _chunkSize;
|
||||
/**height Map source path*/
|
||||
std::string heightMapSrc;
|
||||
std::string _heightMapSrc;
|
||||
/**the source path of the alpha map*/
|
||||
char* alphaMapSrc;
|
||||
char* _alphaMapSrc;
|
||||
/**detail maps*/
|
||||
DetailMap detailMaps[4];
|
||||
DetailMap _detailMaps[4];
|
||||
/**terrain Maximum height*/
|
||||
float mapHeight;
|
||||
float _mapHeight;
|
||||
/**terrain scale factor,you can combine setScale later.*/
|
||||
float mapScale;
|
||||
float _mapScale;
|
||||
/**the amount of detailmap*/
|
||||
int _detailMapAmount;
|
||||
/**the skirt height ratio, only effect when terrain use skirt to fix crack*/
|
||||
float skirtHeightRatio;
|
||||
float _skirtHeightRatio;
|
||||
};
|
||||
private:
|
||||
|
||||
struct ChunkIndices
|
||||
{
|
||||
GLuint indices;
|
||||
unsigned short size;
|
||||
GLuint _indices;
|
||||
unsigned short _size;
|
||||
};
|
||||
|
||||
struct ChunkLODIndices
|
||||
{
|
||||
int relativeLod[5];
|
||||
int _relativeLod[5];
|
||||
ChunkIndices _chunkIndices;
|
||||
};
|
||||
|
||||
|
||||
struct ChunkLODIndicesSkirt
|
||||
{
|
||||
int selfLod;
|
||||
int _selfLod;
|
||||
ChunkIndices _chunkIndices;
|
||||
};
|
||||
/*
|
||||
|
@ -167,13 +168,13 @@ private:
|
|||
TerrainVertexData(){};
|
||||
TerrainVertexData(Vec3 v1, Tex2F v2)
|
||||
{
|
||||
position = v1;
|
||||
texcoord = v2;
|
||||
_position = v1;
|
||||
_texcoord = v2;
|
||||
};
|
||||
/*the vertex's attributes*/
|
||||
cocos2d::Vec3 position;
|
||||
cocos2d::Tex2F texcoord;
|
||||
cocos2d::Vec3 normal;
|
||||
cocos2d::Vec3 _position;
|
||||
cocos2d::Tex2F _texcoord;
|
||||
cocos2d::Vec3 _normal;
|
||||
};
|
||||
|
||||
struct QuadTree;
|
||||
|
@ -187,12 +188,12 @@ private:
|
|||
/**destructor*/
|
||||
~Chunk();
|
||||
/*vertices*/
|
||||
std::vector<TerrainVertexData> vertices;
|
||||
std::vector<TerrainVertexData> _originalVertices;
|
||||
/*LOD indices*/
|
||||
struct LOD{
|
||||
std::vector<GLushort> indices;
|
||||
std::vector<GLushort> _indices;
|
||||
};
|
||||
GLuint vbo[2];
|
||||
GLuint _vbo;
|
||||
ChunkIndices _chunkIndices;
|
||||
/**we now support four levels of detail*/
|
||||
LOD _lod[4];
|
||||
|
@ -230,16 +231,16 @@ private:
|
|||
QuadTree * _parent;
|
||||
|
||||
/**the position X in terrain space*/
|
||||
int pos_x;
|
||||
int _posX;
|
||||
/**the position Y in terrain space*/
|
||||
int pos_y;
|
||||
int _posY;
|
||||
/**parent terrain*/
|
||||
Terrain * _terrain;
|
||||
/**chunk size*/
|
||||
Size _size;
|
||||
/**chunk's estimated slope*/
|
||||
float _slope;
|
||||
std::vector<TerrainVertexData> vertices_tmp;
|
||||
std::vector<TerrainVertexData> _currentVertices;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -272,7 +273,8 @@ private:
|
|||
int _height;
|
||||
int _width;
|
||||
QuadTree * _parent;
|
||||
AABB _aabb;
|
||||
/**AABB's cache (in local space)*/
|
||||
AABB _localAABB;
|
||||
/**AABB's cache (in world space)*/
|
||||
AABB _worldSpaceAABB;
|
||||
Terrain * _terrain;
|
||||
|
@ -381,15 +383,7 @@ public:
|
|||
*/
|
||||
QuadTree * getQuadTree();
|
||||
|
||||
//following methods are internal use only
|
||||
ChunkIndices lookForIndicesLODSkrit(int selfLod, bool * result);
|
||||
|
||||
ChunkIndices lookForIndicesLOD(int neighborLod[4], int selfLod, bool * result);
|
||||
|
||||
ChunkIndices insertIndicesLOD(int neighborLod[4], int selfLod, GLushort * indices, int size);
|
||||
|
||||
ChunkIndices insertIndicesLODSkirt(int selfLod, GLushort * indices, int size);
|
||||
|
||||
void reload();
|
||||
protected:
|
||||
|
||||
Terrain();
|
||||
|
@ -418,7 +412,16 @@ protected:
|
|||
/**
|
||||
* cache all unifrom loactions in GLSL.
|
||||
**/
|
||||
void cacheUniformLocation();
|
||||
void cacheUniformAttribLocation();
|
||||
|
||||
//IBO generate & cache
|
||||
ChunkIndices lookForIndicesLODSkrit(int selfLod, bool * result);
|
||||
|
||||
ChunkIndices lookForIndicesLOD(int neighborLod[4], int selfLod, bool * result);
|
||||
|
||||
ChunkIndices insertIndicesLOD(int neighborLod[4], int selfLod, GLushort * indices, int size);
|
||||
|
||||
ChunkIndices insertIndicesLODSkirt(int selfLod, GLushort * indices, int size);
|
||||
protected:
|
||||
std::vector <ChunkLODIndices> _chunkLodIndicesSet;
|
||||
std::vector<ChunkLODIndicesSkirt> _chunkLodIndicesSkirtSet;
|
||||
|
@ -444,6 +447,8 @@ protected:
|
|||
Mat4 _oldCameraModelMatrix;
|
||||
Mat4 _terrainModelMatrix;
|
||||
GLuint _normalLocation;
|
||||
GLuint _positionLocation;
|
||||
GLuint _texcordLocation;
|
||||
float _maxHeight;
|
||||
float _minHeight;
|
||||
CrackFixedType _crackFixedType;
|
||||
|
@ -453,6 +458,9 @@ protected:
|
|||
GLint _alphaMapLocation;
|
||||
GLint _alphaIsHasAlphaMapLocation;
|
||||
GLint _detailMapSizeLocation[4];
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
||||
EventListenerCustom* _backToForegroundListener;
|
||||
#endif
|
||||
};
|
||||
|
||||
// end of actions group
|
||||
|
|
|
@ -70,6 +70,8 @@ void Cocos2dRenderer::Resume()
|
|||
else
|
||||
{
|
||||
Application::getInstance()->applicationWillEnterForeground();
|
||||
cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,8 +79,8 @@ void Cocos2dRenderer::Pause()
|
|||
{
|
||||
if (Director::getInstance()->getOpenGLView()) {
|
||||
Application::getInstance()->applicationDidEnterBackground();
|
||||
//cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
|
||||
//cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
|
||||
cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,9 +137,4 @@ void Cocos2dRenderer::QueuePointerEvent(cocos2d::PointerEventType type, Windows:
|
|||
GLViewImpl::sharedOpenGLView()->QueuePointerEvent(type, args);
|
||||
}
|
||||
|
||||
void Cocos2dRenderer::QueueKeyBoardEvent(cocos2d::Cocos2dKeyEvent type, Windows::UI::Core::KeyEventArgs^ e)
|
||||
{
|
||||
//GLViewImpl::sharedOpenGLView()->QueuePointerEvent(type, e);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ namespace cocos2d
|
|||
~Cocos2dRenderer();
|
||||
void Draw(GLsizei width, GLsizei height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation);
|
||||
void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args);
|
||||
void QueueKeyBoardEvent(Cocos2dKeyEvent type, Windows::UI::Core::KeyEventArgs^ e);
|
||||
void Pause();
|
||||
void Resume();
|
||||
void DeviceLost();
|
||||
|
|
|
@ -613,7 +613,7 @@ unsigned char* CCFreeTypeFont::loadFont(const char *pFontName, ssize_t *size)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
return FileUtils::sharedFileUtils()->getFileData(fullpath.c_str(), "rb", size);
|
||||
return FileUtils::getInstance()->getFileData(fullpath.c_str(), "rb", size);
|
||||
}
|
||||
|
||||
unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, ssize_t *size)
|
||||
|
|
|
@ -389,8 +389,9 @@ void GLViewImpl::UpdateWindowSize()
|
|||
ResolutionPolicy resPolicy=view->getResolutionPolicy();
|
||||
view->setFrameSize(width, height);
|
||||
view->setDesignResolutionSize(resSize.width, resSize.height, resPolicy);
|
||||
Director::getInstance()->setViewport();
|
||||
Director::sharedDirector()->setProjection(Director::sharedDirector()->getProjection());
|
||||
auto director = Director::getInstance();
|
||||
director->setViewport();
|
||||
director->setProjection(director->getProjection());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ void CC_DLL CCLogIPAddresses()
|
|||
if (hn->IPInformation != nullptr)
|
||||
{
|
||||
std::string s = PlatformStringToString(hn->DisplayName);
|
||||
CCLog("IP Address: %s:", s.c_str());
|
||||
log("IP Address: %s:", s.c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -11,44 +11,6 @@
|
|||
-- @param #char heightMap
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- set the MaxDetailAmount.
|
||||
-- @function [parent=#Terrain] setMaxDetailMapAmount
|
||||
-- @param self
|
||||
-- @param #int maxValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- show the wireline instead of the surface,Debug Use only.<br>
|
||||
-- Note only support desktop platform
|
||||
-- @function [parent=#Terrain] setDrawWire
|
||||
-- @param self
|
||||
-- @param #bool boolValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- Switch frustum Culling Flag<br>
|
||||
-- Note frustum culling will remarkable improve your terrain rendering performance.
|
||||
-- @function [parent=#Terrain] setIsEnableFrustumCull
|
||||
-- @param self
|
||||
-- @param #bool boolValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- set the Detail Map
|
||||
-- @function [parent=#Terrain] setDetailMap
|
||||
-- @param self
|
||||
-- @param #unsigned int index
|
||||
-- @param #cc.Terrain::DetailMap detailMap
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- reset the heightmap data.
|
||||
-- @function [parent=#Terrain] resetHeightMap
|
||||
-- @param self
|
||||
-- @param #char heightMap
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- set the alpha map
|
||||
-- @function [parent=#Terrain] setAlphaMap
|
||||
|
@ -82,16 +44,6 @@
|
|||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- Set threshold distance of each LOD level,must equal or gereater than the chunk size<br>
|
||||
-- Note when invoke initHeightMap, the LOD distance will be automatic calculated.
|
||||
-- @function [parent=#Terrain] setLODDistance
|
||||
-- @param self
|
||||
-- @param #float lod1
|
||||
-- @param #float lod2
|
||||
-- @param #float lod3
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- get the normal of the specified pistion in terrain<br>
|
||||
-- return the normal vector of the specified position of the terrain.<br>
|
||||
|
@ -102,6 +54,28 @@
|
|||
-- @param #int pixelY
|
||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||
|
||||
--------------------------------
|
||||
-- show the wireline instead of the surface,Debug Use only.<br>
|
||||
-- Note only support desktop platform
|
||||
-- @function [parent=#Terrain] setDrawWire
|
||||
-- @param self
|
||||
-- @param #bool boolValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Terrain] reload
|
||||
-- @param self
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- set the Detail Map
|
||||
-- @function [parent=#Terrain] setDetailMap
|
||||
-- @param self
|
||||
-- @param #unsigned int index
|
||||
-- @param #cc.Terrain::DetailMap detailMap
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- get height from the raw height filed
|
||||
-- @function [parent=#Terrain] getImageHeight
|
||||
|
@ -110,6 +84,29 @@
|
|||
-- @param #int pixelY
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get the terrain's mininal height.
|
||||
-- @function [parent=#Terrain] getMinHeight
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- Set threshold distance of each LOD level,must equal or gereater than the chunk size<br>
|
||||
-- Note when invoke initHeightMap, the LOD distance will be automatic calculated.
|
||||
-- @function [parent=#Terrain] setLODDistance
|
||||
-- @param self
|
||||
-- @param #float lod1
|
||||
-- @param #float lod2
|
||||
-- @param #float lod3
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- reset the heightmap data.
|
||||
-- @function [parent=#Terrain] resetHeightMap
|
||||
-- @param self
|
||||
-- @param #char heightMap
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- get the terrain's maximum height.
|
||||
-- @function [parent=#Terrain] getMaxHeight
|
||||
|
@ -117,10 +114,19 @@
|
|||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- get the terrain's mininal height.
|
||||
-- @function [parent=#Terrain] getMinHeight
|
||||
-- set the MaxDetailAmount.
|
||||
-- @function [parent=#Terrain] setMaxDetailMapAmount
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
-- @param #int maxValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
-- Switch frustum Culling Flag<br>
|
||||
-- Note frustum culling will remarkable improve your terrain rendering performance.
|
||||
-- @function [parent=#Terrain] setIsEnableFrustumCull
|
||||
-- @param self
|
||||
-- @param #bool boolValue
|
||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
|
|
|
@ -3459,260 +3459,6 @@ int lua_cocos2dx_3d_Terrain_initHeightMap(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:setMaxDetailMapAmount");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setMaxDetailMapAmount(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setDrawWire(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setIsEnableFrustumCull(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
unsigned int arg0;
|
||||
cocos2d::Terrain::DetailMap arg1;
|
||||
|
||||
ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap");
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR DetailMap
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setDetailMap(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char* arg0;
|
||||
|
||||
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str();
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->resetHeightMap(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setAlphaMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -3957,62 +3703,6 @@ int lua_cocos2dx_3d_Terrain_initProperties(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 3)
|
||||
{
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance");
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance");
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setLODDistance(arg0, arg1, arg2);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -4066,6 +3756,157 @@ int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setDrawWire(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_reload(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->reload();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:reload",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_reload'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 2)
|
||||
{
|
||||
unsigned int arg0;
|
||||
cocos2d::Terrain::DetailMap arg1;
|
||||
|
||||
ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap");
|
||||
|
||||
#pragma warning NO CONVERSION TO NATIVE FOR DetailMap
|
||||
ok = false;
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setDetailMap(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -4119,53 +3960,6 @@ int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getMaxHeight();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMaxHeight",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -4213,6 +4007,259 @@ int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 3)
|
||||
{
|
||||
double arg0;
|
||||
double arg1;
|
||||
double arg2;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance");
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance");
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setLODDistance(arg0, arg1, arg2);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
const char* arg0;
|
||||
|
||||
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str();
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->resetHeightMap(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getMaxHeight();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMaxHeight",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:setMaxDetailMapAmount");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setMaxDetailMapAmount(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Terrain* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setIsEnableFrustumCull(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int lua_cocos2dx_3d_Terrain_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (Terrain)");
|
||||
|
@ -4226,21 +4273,22 @@ int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S)
|
|||
|
||||
tolua_beginmodule(tolua_S,"Terrain");
|
||||
tolua_function(tolua_S,"initHeightMap",lua_cocos2dx_3d_Terrain_initHeightMap);
|
||||
tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount);
|
||||
tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire);
|
||||
tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull);
|
||||
tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap);
|
||||
tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap);
|
||||
tolua_function(tolua_S,"setAlphaMap",lua_cocos2dx_3d_Terrain_setAlphaMap);
|
||||
tolua_function(tolua_S,"setSkirtHeightRatio",lua_cocos2dx_3d_Terrain_setSkirtHeightRatio);
|
||||
tolua_function(tolua_S,"convertToTerrainSpace",lua_cocos2dx_3d_Terrain_convertToTerrainSpace);
|
||||
tolua_function(tolua_S,"initTextures",lua_cocos2dx_3d_Terrain_initTextures);
|
||||
tolua_function(tolua_S,"initProperties",lua_cocos2dx_3d_Terrain_initProperties);
|
||||
tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance);
|
||||
tolua_function(tolua_S,"getNormal",lua_cocos2dx_3d_Terrain_getNormal);
|
||||
tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire);
|
||||
tolua_function(tolua_S,"reload",lua_cocos2dx_3d_Terrain_reload);
|
||||
tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap);
|
||||
tolua_function(tolua_S,"getImageHeight",lua_cocos2dx_3d_Terrain_getImageHeight);
|
||||
tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight);
|
||||
tolua_function(tolua_S,"getMinHeight",lua_cocos2dx_3d_Terrain_getMinHeight);
|
||||
tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance);
|
||||
tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap);
|
||||
tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight);
|
||||
tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount);
|
||||
tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::Terrain).name();
|
||||
g_luaType[typeName] = "cc.Terrain";
|
||||
|
|
|
@ -101,6 +101,7 @@ int register_all_cocos2dx_3d(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_3d_h__
|
||||
|
|
|
@ -233,22 +233,22 @@ bool luaval_to_terraindata(lua_State* L, int lo, cocos2d::Terrain::TerrainData*
|
|||
lua_gettable(L,lo);
|
||||
if (!lua_isnil(L, -1))
|
||||
{
|
||||
luaval_to_size(L, -1, &(outValue->chunkSize));
|
||||
luaval_to_size(L, -1, &(outValue->_chunkSize));
|
||||
}
|
||||
else
|
||||
{
|
||||
outValue->chunkSize = cocos2d::Size(32, 32);
|
||||
outValue->_chunkSize = cocos2d::Size(32, 32);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "heightMapSrc");
|
||||
lua_gettable(L,lo);
|
||||
outValue->heightMapSrc = tolua_tocppstring(L, -1, "");
|
||||
outValue->_heightMapSrc = tolua_tocppstring(L, -1, "");
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "alphaMapSrc");
|
||||
lua_gettable(L,lo);
|
||||
outValue->alphaMapSrc = const_cast<char*>(tolua_tocppstring(L, -1, ""));
|
||||
outValue->_alphaMapSrc = const_cast<char*>(tolua_tocppstring(L, -1, ""));
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "detailMaps");
|
||||
|
@ -264,12 +264,12 @@ bool luaval_to_terraindata(lua_State* L, int lo, cocos2d::Terrain::TerrainData*
|
|||
{
|
||||
lua_pushstring(L, "detailMapSrc");
|
||||
lua_gettable(L,-2);
|
||||
outValue->detailMaps[i].detailMapSrc = tolua_tocppstring(L, -1, "");
|
||||
outValue->_detailMaps[i]._detailMapSrc = tolua_tocppstring(L, -1, "");
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "detailMapSize");
|
||||
lua_gettable(L,-2);
|
||||
outValue->detailMaps[i].detailMapSize = lua_isnil(L,-1) ? 0.0f : (float)lua_tonumber(L,-1);
|
||||
outValue->_detailMaps[i]._detailMapSize = lua_isnil(L,-1) ? 0.0f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
@ -279,12 +279,12 @@ bool luaval_to_terraindata(lua_State* L, int lo, cocos2d::Terrain::TerrainData*
|
|||
|
||||
lua_pushstring(L, "mapHeight");
|
||||
lua_gettable(L,lo);
|
||||
outValue->mapHeight = lua_isnil(L,-1) ? 2.0f : (float)lua_tonumber(L,-1);
|
||||
outValue->_mapHeight = lua_isnil(L,-1) ? 2.0f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "mapScale");
|
||||
lua_gettable(L,lo);
|
||||
outValue->mapScale = lua_isnil(L,-1) ? 0.1f : (float)lua_tonumber(L,-1);
|
||||
outValue->_mapScale = lua_isnil(L,-1) ? 0.1f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "_detailMapAmount");
|
||||
|
@ -294,7 +294,7 @@ bool luaval_to_terraindata(lua_State* L, int lo, cocos2d::Terrain::TerrainData*
|
|||
|
||||
lua_pushstring(L, "skirtHeightRatio");
|
||||
lua_gettable(L,lo);
|
||||
outValue->skirtHeightRatio = lua_isnil(L,-1) ? 1.0f : (float)lua_tonumber(L,-1);
|
||||
outValue->_skirtHeightRatio = lua_isnil(L,-1) ? 1.0f : (float)lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
}
|
||||
|
||||
|
@ -308,20 +308,20 @@ void terraindata_to_luaval(lua_State* L,const cocos2d::Terrain::TerrainData& inV
|
|||
|
||||
lua_newtable(L);
|
||||
lua_pushstring(L, "chunkSize");
|
||||
size_to_luaval(L, inValue.chunkSize);
|
||||
size_to_luaval(L, inValue._chunkSize);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
if (inValue.heightMapSrc.length() > 0)
|
||||
if (inValue._heightMapSrc.length() > 0)
|
||||
{
|
||||
lua_pushstring(L, "heightMapSrc");
|
||||
lua_pushstring(L, inValue.heightMapSrc.c_str());
|
||||
lua_pushstring(L, inValue._heightMapSrc.c_str());
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
if (nullptr != inValue.alphaMapSrc)
|
||||
if (nullptr != inValue._alphaMapSrc)
|
||||
{
|
||||
lua_pushstring(L, "alphaMapSrc");
|
||||
lua_pushstring(L, inValue.alphaMapSrc);
|
||||
lua_pushstring(L, inValue._alphaMapSrc);
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
|
@ -334,11 +334,11 @@ void terraindata_to_luaval(lua_State* L,const cocos2d::Terrain::TerrainData& inV
|
|||
lua_newtable(L);
|
||||
|
||||
lua_pushstring(L, "detailMapSrc");
|
||||
lua_pushstring(L, inValue.detailMaps[i].detailMapSrc.c_str());
|
||||
lua_pushstring(L, inValue._detailMaps[i]._detailMapSrc.c_str());
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "detailMapSize");
|
||||
lua_pushnumber(L, (lua_Number)inValue.detailMaps[i].detailMapSize);
|
||||
lua_pushnumber(L, (lua_Number)inValue._detailMaps[i]._detailMapSize);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_rawset(L, -3);
|
||||
|
@ -347,11 +347,11 @@ void terraindata_to_luaval(lua_State* L,const cocos2d::Terrain::TerrainData& inV
|
|||
|
||||
|
||||
lua_pushstring(L, "mapHeight");
|
||||
lua_pushnumber(L, (lua_Number)inValue.mapHeight);
|
||||
lua_pushnumber(L, (lua_Number)inValue._mapHeight);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "mapScale");
|
||||
lua_pushnumber(L, (lua_Number)inValue.mapScale);
|
||||
lua_pushnumber(L, (lua_Number)inValue._mapScale);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "_detailMapAmount");
|
||||
|
@ -359,7 +359,7 @@ void terraindata_to_luaval(lua_State* L,const cocos2d::Terrain::TerrainData& inV
|
|||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "skirtHeightRatio");
|
||||
lua_pushnumber(L, (lua_Number)inValue.skirtHeightRatio);
|
||||
lua_pushnumber(L, (lua_Number)inValue._skirtHeightRatio);
|
||||
lua_rawset(L, -3);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,511 +0,0 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define ZEXPORT WINAPI
|
||||
# ifdef WIN32
|
||||
# define ZEXPORTVA WINAPIV
|
||||
# else
|
||||
# define ZEXPORTVA FAR CDECL
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__BEOS__)
|
||||
# ifdef ZLIB_DLL
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXPORT __declspec(dllexport)
|
||||
# define ZEXPORTVA __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXPORT __declspec(dllimport)
|
||||
# define ZEXPORTVA __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ZEXTERN
|
||||
# define ZEXTERN extern
|
||||
#endif
|
||||
#ifndef ZEXPORT
|
||||
# define ZEXPORT
|
||||
#endif
|
||||
#ifndef ZEXPORTVA
|
||||
# define ZEXPORTVA
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#if 1 /* was set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := cocos_zlib_static
|
||||
LOCAL_MODULE_FILENAME := zlib
|
||||
LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/libz.a
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../include
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2177,103 +2177,13 @@
|
|||
"external/freetype2/include/win32/freetype2/tttables.h",
|
||||
"external/freetype2/include/win32/freetype2/tttags.h",
|
||||
"external/freetype2/include/win32/freetype2/ttunpat.h",
|
||||
"external/freetype2/include/winrt/README.txt",
|
||||
"external/freetype2/include/winrt/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/winrt/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/winrt/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/winrt/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/winrt/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/winrt/freetype/freetype.h",
|
||||
"external/freetype2/include/winrt/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/winrt/freetype/ftautoh.h",
|
||||
"external/freetype2/include/winrt/freetype/ftbbox.h",
|
||||
"external/freetype2/include/winrt/freetype/ftbdf.h",
|
||||
"external/freetype2/include/winrt/freetype/ftbitmap.h",
|
||||
"external/freetype2/include/winrt/freetype/ftbzip2.h",
|
||||
"external/freetype2/include/winrt/freetype/ftcache.h",
|
||||
"external/freetype2/include/winrt/freetype/ftcffdrv.h",
|
||||
"external/freetype2/include/winrt/freetype/ftchapters.h",
|
||||
"external/freetype2/include/winrt/freetype/ftcid.h",
|
||||
"external/freetype2/include/winrt/freetype/fterrdef.h",
|
||||
"external/freetype2/include/winrt/freetype/fterrors.h",
|
||||
"external/freetype2/include/winrt/freetype/ftgasp.h",
|
||||
"external/freetype2/include/winrt/freetype/ftglyph.h",
|
||||
"external/freetype2/include/winrt/freetype/ftgxval.h",
|
||||
"external/freetype2/include/winrt/freetype/ftgzip.h",
|
||||
"external/freetype2/include/winrt/freetype/ftimage.h",
|
||||
"external/freetype2/include/winrt/freetype/ftincrem.h",
|
||||
"external/freetype2/include/winrt/freetype/ftlcdfil.h",
|
||||
"external/freetype2/include/winrt/freetype/ftlist.h",
|
||||
"external/freetype2/include/winrt/freetype/ftlzw.h",
|
||||
"external/freetype2/include/winrt/freetype/ftmac.h",
|
||||
"external/freetype2/include/winrt/freetype/ftmm.h",
|
||||
"external/freetype2/include/winrt/freetype/ftmodapi.h",
|
||||
"external/freetype2/include/winrt/freetype/ftmoderr.h",
|
||||
"external/freetype2/include/winrt/freetype/ftotval.h",
|
||||
"external/freetype2/include/winrt/freetype/ftoutln.h",
|
||||
"external/freetype2/include/winrt/freetype/ftpfr.h",
|
||||
"external/freetype2/include/winrt/freetype/ftrender.h",
|
||||
"external/freetype2/include/winrt/freetype/ftsizes.h",
|
||||
"external/freetype2/include/winrt/freetype/ftsnames.h",
|
||||
"external/freetype2/include/winrt/freetype/ftstroke.h",
|
||||
"external/freetype2/include/winrt/freetype/ftsynth.h",
|
||||
"external/freetype2/include/winrt/freetype/ftsystem.h",
|
||||
"external/freetype2/include/winrt/freetype/fttrigon.h",
|
||||
"external/freetype2/include/winrt/freetype/ftttdrv.h",
|
||||
"external/freetype2/include/winrt/freetype/fttypes.h",
|
||||
"external/freetype2/include/winrt/freetype/ftwinfnt.h",
|
||||
"external/freetype2/include/winrt/freetype/ftxf86.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/autohint.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftcalc.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftdebug.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftdriver.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftgloadr.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftmemory.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftobjs.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftpic.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftrfork.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftserv.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftstream.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/fttrace.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/ftvalid.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/internal.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/psaux.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/pshints.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svbdf.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svcid.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svgldict.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svgxval.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svkern.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svmm.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svotval.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svpfr.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svpostnm.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svprop.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svpscmap.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svpsinfo.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svsfnt.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svttcmap.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svtteng.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svttglyf.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svwinfnt.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/services/svxf86nm.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/sfnt.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/t1types.h",
|
||||
"external/freetype2/include/winrt/freetype/internal/tttypes.h",
|
||||
"external/freetype2/include/winrt/freetype/t1tables.h",
|
||||
"external/freetype2/include/winrt/freetype/ttnameid.h",
|
||||
"external/freetype2/include/winrt/freetype/tttables.h",
|
||||
"external/freetype2/include/winrt/freetype/tttags.h",
|
||||
"external/freetype2/include/winrt/freetype/ttunpat.h",
|
||||
"external/freetype2/include/winrt/ft2build.h",
|
||||
"external/freetype2/include/winrt/proj.winrt/freetype.vcxproj",
|
||||
"external/freetype2/include/winrt/proj.winrt/freetype.vcxproj.filters",
|
||||
"external/freetype2/include/winrt_8.1/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/freetype.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/ft2build.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/ftautoh.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/ftbbox.h",
|
||||
|
@ -2355,14 +2265,16 @@
|
|||
"external/freetype2/include/winrt_8.1/freetype/tttables.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/tttags.h",
|
||||
"external/freetype2/include/winrt_8.1/freetype/ttunpat.h",
|
||||
"external/freetype2/include/winrt_8.1/ft2build.h",
|
||||
"external/freetype2/include/wp8/README.txt",
|
||||
"external/freetype2/include/wp8/freetype/FTL.TXT",
|
||||
"external/freetype2/include/wp8/freetype/GPLv2.TXT",
|
||||
"external/freetype2/include/wp8/freetype/LICENSE.TXT",
|
||||
"external/freetype2/include/wp8/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/wp8/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/wp8/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/wp8/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/wp8/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/wp8/freetype/freetype.h",
|
||||
"external/freetype2/include/wp8/freetype/ft2build.h",
|
||||
"external/freetype2/include/wp8/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/wp8/freetype/ftautoh.h",
|
||||
"external/freetype2/include/wp8/freetype/ftbbox.h",
|
||||
|
@ -2444,16 +2356,13 @@
|
|||
"external/freetype2/include/wp8/freetype/tttables.h",
|
||||
"external/freetype2/include/wp8/freetype/tttags.h",
|
||||
"external/freetype2/include/wp8/freetype/ttunpat.h",
|
||||
"external/freetype2/include/wp8/ft2build.h",
|
||||
"external/freetype2/include/wp8/proj.wp8/freetype.sln",
|
||||
"external/freetype2/include/wp8/proj.wp8/freetype.vcxproj",
|
||||
"external/freetype2/include/wp8/proj.wp8/freetype.vcxproj.filters",
|
||||
"external/freetype2/include/wp_8.1/freetype/config/ftconfig.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/config/ftheader.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/config/ftmodule.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/config/ftoption.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/config/ftstdlib.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/freetype.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/ft2build.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/ftadvanc.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/ftautoh.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/ftbbox.h",
|
||||
|
@ -2535,7 +2444,6 @@
|
|||
"external/freetype2/include/wp_8.1/freetype/tttables.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/tttags.h",
|
||||
"external/freetype2/include/wp_8.1/freetype/ttunpat.h",
|
||||
"external/freetype2/include/wp_8.1/ft2build.h",
|
||||
"external/freetype2/prebuilt/android/Android.mk",
|
||||
"external/freetype2/prebuilt/android/armeabi-v7a/libfreetype.a",
|
||||
"external/freetype2/prebuilt/android/armeabi/libfreetype.a",
|
||||
|
@ -2545,8 +2453,6 @@
|
|||
"external/freetype2/prebuilt/linux/64-bit/libfreetype.a",
|
||||
"external/freetype2/prebuilt/mac/libfreetype.a",
|
||||
"external/freetype2/prebuilt/win32/freetype250.lib",
|
||||
"external/freetype2/prebuilt/winrt/ARM/freetype.lib",
|
||||
"external/freetype2/prebuilt/winrt/Win32/freetype.lib",
|
||||
"external/freetype2/prebuilt/winrt_8.1/arm/freetype250.lib",
|
||||
"external/freetype2/prebuilt/winrt_8.1/win32/freetype250.lib",
|
||||
"external/freetype2/prebuilt/wp8/ARM/freetype.lib",
|
||||
|
|
|
@ -70,6 +70,8 @@ void Cocos2dRenderer::Resume()
|
|||
else
|
||||
{
|
||||
Application::getInstance()->applicationWillEnterForeground();
|
||||
cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,8 +79,8 @@ void Cocos2dRenderer::Pause()
|
|||
{
|
||||
if (Director::getInstance()->getOpenGLView()) {
|
||||
Application::getInstance()->applicationDidEnterBackground();
|
||||
//cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
|
||||
//cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
|
||||
cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,9 +137,4 @@ void Cocos2dRenderer::QueuePointerEvent(cocos2d::PointerEventType type, Windows:
|
|||
GLViewImpl::sharedOpenGLView()->QueuePointerEvent(type, args);
|
||||
}
|
||||
|
||||
void Cocos2dRenderer::QueueKeyBoardEvent(cocos2d::Cocos2dKeyEvent type, Windows::UI::Core::KeyEventArgs^ e)
|
||||
{
|
||||
//GLViewImpl::sharedOpenGLView()->QueuePointerEvent(type, e);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ namespace cocos2d
|
|||
~Cocos2dRenderer();
|
||||
void Draw(GLsizei width, GLsizei height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation);
|
||||
void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args);
|
||||
void QueueKeyBoardEvent(Cocos2dKeyEvent type, Windows::UI::Core::KeyEventArgs^ e);
|
||||
void Pause();
|
||||
void Resume();
|
||||
void DeviceLost();
|
||||
|
|
|
@ -21,7 +21,7 @@ TerrainSimple::TerrainSimple()
|
|||
_camera->setPosition3D(Vec3(-1,1.6,4));
|
||||
addChild(_camera);
|
||||
|
||||
Terrain::DetailMap r("TerrainTest/dirt.dds"),g("TerrainTest/Grass2.dds"),b("TerrainTest/road.dds"),a("TerrainTest/GreenSkin.jpg");
|
||||
Terrain::DetailMap r("TerrainTest/dirt.jpg"),g("TerrainTest/Grass2.jpg"),b("TerrainTest/road.jpg"),a("TerrainTest/GreenSkin.jpg");
|
||||
|
||||
Terrain::TerrainData data("TerrainTest/heightmap16.jpg","TerrainTest/alphamap.png",r,g,b,a);
|
||||
|
||||
|
@ -71,19 +71,18 @@ void TerrainSimple::onTouchesMoved(const std::vector<cocos2d::Touch*>& touches,
|
|||
|
||||
std::string TerrainWalkThru::title() const
|
||||
{
|
||||
return " ";
|
||||
return "Player walk around in terrain";
|
||||
}
|
||||
|
||||
std::string TerrainWalkThru::subtitle() const
|
||||
{
|
||||
return " ";
|
||||
return "touch to move";
|
||||
}
|
||||
|
||||
TerrainWalkThru::TerrainWalkThru()
|
||||
{
|
||||
auto listener = EventListenerTouchAllAtOnce::create();
|
||||
listener->onTouchesBegan = CC_CALLBACK_2(TerrainWalkThru::onTouchesBegan, this);
|
||||
listener->onTouchesMoved = CC_CALLBACK_2(TerrainWalkThru::onTouchesMoved, this);
|
||||
listener->onTouchesEnded = CC_CALLBACK_2(TerrainWalkThru::onTouchesEnd, this);
|
||||
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
|
||||
|
||||
|
@ -94,7 +93,7 @@ TerrainWalkThru::TerrainWalkThru()
|
|||
_camera->setCameraFlag(CameraFlag::USER1);
|
||||
addChild(_camera);
|
||||
|
||||
Terrain::DetailMap r("TerrainTest/dirt.dds"),g("TerrainTest/Grass2.dds",10),b("TerrainTest/road.dds"),a("TerrainTest/GreenSkin.jpg",20);
|
||||
Terrain::DetailMap r("TerrainTest/dirt.jpg"),g("TerrainTest/Grass2.jpg",10),b("TerrainTest/road.jpg"),a("TerrainTest/GreenSkin.jpg",20);
|
||||
|
||||
Terrain::TerrainData data("TerrainTest/heightmap16.jpg","TerrainTest/alphamap.png",r,g,b,a,Size(32,32),40.0f,2);
|
||||
_terrain = Terrain::create(data,Terrain::CrackFixedType::SKIRT);
|
||||
|
@ -119,46 +118,10 @@ TerrainWalkThru::TerrainWalkThru()
|
|||
_camera->setPosition3D(_player->getPosition3D()+camera_offset);
|
||||
_camera->setRotation3D(Vec3(-45,0,0));
|
||||
|
||||
forward = Label::createWithSystemFont("forward","arial",22);
|
||||
forward->setPosition(0,200);
|
||||
forward->setAnchorPoint(Vec2(0,0));
|
||||
|
||||
backward = Label::createWithSystemFont("backward","arial",22);
|
||||
backward->setPosition(0,250);
|
||||
backward->setAnchorPoint(Vec2(0,0));
|
||||
|
||||
left = Label::createWithSystemFont("turn Left","arial",22);
|
||||
left->setPosition(0,100);
|
||||
left->setAnchorPoint(Vec2(0,0));
|
||||
|
||||
right = Label::createWithSystemFont("turn right","arial",22);
|
||||
right->setPosition(0,150);
|
||||
right->setAnchorPoint(Vec2(0,0));
|
||||
addChild(_player);
|
||||
addChild(_terrain);
|
||||
}
|
||||
|
||||
void TerrainWalkThru::onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
|
||||
{
|
||||
float delta = Director::getInstance()->getDeltaTime();
|
||||
auto touch = touches[0];
|
||||
auto location = touch->getLocation();
|
||||
auto PreviousLocation = touch->getPreviousLocation();
|
||||
Point newPos = PreviousLocation - location;
|
||||
|
||||
Vec3 cameraDir;
|
||||
Vec3 cameraRightDir;
|
||||
_camera->getNodeToWorldTransform().getForwardVector(&cameraDir);
|
||||
cameraDir.normalize();
|
||||
cameraDir.y=0;
|
||||
_camera->getNodeToWorldTransform().getRightVector(&cameraRightDir);
|
||||
cameraRightDir.normalize();
|
||||
cameraRightDir.y=0;
|
||||
Vec3 cameraPos= _camera->getPosition3D();
|
||||
cameraPos+=cameraDir*newPos.y*0.5*delta;
|
||||
cameraPos+=cameraRightDir*newPos.x*0.5*delta;
|
||||
_camera->setPosition3D(cameraPos);
|
||||
}
|
||||
|
||||
void TerrainWalkThru::onTouchesBegan(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event)
|
||||
{
|
||||
|
@ -276,7 +239,6 @@ void Player::update(float dt)
|
|||
player->setRotationQuat(headingQ*q2);
|
||||
auto vec_offset =Vec4(camera_offset.x,camera_offset.y,camera_offset.z,1);
|
||||
vec_offset = player->getNodeToWorldTransform()*vec_offset;
|
||||
// _cam->setRotation3D(player->getRotation3D());
|
||||
_cam->setPosition3D(player->getPosition3D() + camera_offset);
|
||||
updateState();
|
||||
}
|
||||
|
|
|
@ -64,14 +64,9 @@ public:
|
|||
TerrainWalkThru();
|
||||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
void onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
||||
void onTouchesBegan(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
||||
void onTouchesEnd(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
|
||||
protected:
|
||||
cocos2d::Label* forward;
|
||||
cocos2d::Label* backward;
|
||||
cocos2d::Label* left;
|
||||
cocos2d::Label* right;
|
||||
cocos2d::Camera* _camera;
|
||||
cocos2d::Terrain* _terrain;
|
||||
Player * _player;
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
Binary file not shown.
After Width: | Height: | Size: 132 KiB |
Loading…
Reference in New Issue