fix compiler error in wp8

This commit is contained in:
koowolf 2014-04-10 15:15:17 +08:00
parent 35b2271b0d
commit aa51e5dd22
6 changed files with 85 additions and 74 deletions

View File

@ -210,20 +210,22 @@
</ClCompile>
<ClCompile Include="..\base\atitc.cpp" />
<ClCompile Include="..\base\CCAffineTransform.cpp" />
<ClCompile Include="..\base\CCArray.cpp" />
<ClCompile Include="..\base\CCAutoreleasePool.cpp" />
<ClCompile Include="..\base\CCConsole.cpp" />
<ClCompile Include="..\base\CCData.cpp" />
<ClCompile Include="..\base\CCDataVisitor.cpp" />
<ClCompile Include="..\base\CCDictionary.cpp" />
<ClCompile Include="..\base\CCGeometry.cpp" />
<ClCompile Include="..\base\CCNS.cpp" />
<ClCompile Include="..\base\CCRef.cpp" />
<ClCompile Include="..\base\CCSet.cpp" />
<ClCompile Include="..\base\CCString.cpp" />
<ClCompile Include="..\base\CCValue.cpp" />
<ClCompile Include="..\base\etc1.cpp" />
<ClCompile Include="..\base\s3tc.cpp" />
<ClCompile Include="..\deprecated\CCArray.cpp" />
<ClCompile Include="..\deprecated\CCDeprecated.cpp" />
<ClCompile Include="..\deprecated\CCDictionary.cpp" />
<ClCompile Include="..\deprecated\CCNotificationCenter.cpp" />
<ClCompile Include="..\deprecated\CCSet.cpp" />
<ClCompile Include="..\deprecated\CCString.cpp" />
<ClCompile Include="..\math\kazmath\kazmath\aabb.c">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
@ -560,7 +562,6 @@
<ClCompile Include="CCComponent.cpp" />
<ClCompile Include="CCComponentContainer.cpp" />
<ClCompile Include="CCConfiguration.cpp" />
<ClCompile Include="CCDeprecated.cpp" />
<ClCompile Include="CCDirector.cpp" />
<ClCompile Include="CCDrawingPrimitives.cpp" />
<ClCompile Include="CCDrawNode.cpp" />
@ -617,7 +618,6 @@
<ClCompile Include="CCMenuItem.cpp" />
<ClCompile Include="CCMotionStreak.cpp" />
<ClCompile Include="CCNode.cpp" />
<ClCompile Include="CCNotificationCenter.cpp" />
<ClCompile Include="CCParallaxNode.cpp" />
<ClCompile Include="CCParticleBatchNode.cpp" />
<ClCompile Include="CCParticleExamples.cpp" />
@ -698,28 +698,30 @@
<ClInclude Include="..\..\external\xxhash\xxhash.h" />
<ClInclude Include="..\base\atitc.h" />
<ClInclude Include="..\base\CCAffineTransform.h" />
<ClInclude Include="..\base\CCArray.h" />
<ClInclude Include="..\base\CCAutoreleasePool.h" />
<ClInclude Include="..\base\CCBool.h" />
<ClInclude Include="..\base\CCConsole.h" />
<ClInclude Include="..\base\CCData.h" />
<ClInclude Include="..\base\CCDataVisitor.h" />
<ClInclude Include="..\base\CCDictionary.h" />
<ClInclude Include="..\base\CCDouble.h" />
<ClInclude Include="..\base\CCFloat.h" />
<ClInclude Include="..\base\CCGeometry.h" />
<ClInclude Include="..\base\CCInteger.h" />
<ClInclude Include="..\base\CCMap.h" />
<ClInclude Include="..\base\CCNS.h" />
<ClInclude Include="..\base\CCRef.h" />
<ClInclude Include="..\base\CCPlatformConfig.h" />
<ClInclude Include="..\base\CCPlatformMacros.h" />
<ClInclude Include="..\base\CCSet.h" />
<ClInclude Include="..\base\CCString.h" />
<ClInclude Include="..\base\CCValue.h" />
<ClInclude Include="..\base\CCVector.h" />
<ClInclude Include="..\base\etc1.h" />
<ClInclude Include="..\base\s3tc.h" />
<ClInclude Include="..\deprecated\CCArray.h" />
<ClInclude Include="..\deprecated\CCBool.h" />
<ClInclude Include="..\deprecated\CCDeprecated.h" />
<ClInclude Include="..\deprecated\CCDictionary.h" />
<ClInclude Include="..\deprecated\CCDouble.h" />
<ClInclude Include="..\deprecated\CCFloat.h" />
<ClInclude Include="..\deprecated\CCInteger.h" />
<ClInclude Include="..\deprecated\CCNotificationCenter.h" />
<ClInclude Include="..\deprecated\CCSet.h" />
<ClInclude Include="..\deprecated\CCString.h" />
<ClInclude Include="..\math\kazmath\kazmath\aabb.h" />
<ClInclude Include="..\math\kazmath\kazmath\GL\mat4stack.h" />
<ClInclude Include="..\math\kazmath\kazmath\GL\matrix.h" />
@ -769,7 +771,6 @@
<ClInclude Include="CCComponentContainer.h" />
<ClInclude Include="ccConfig.h" />
<ClInclude Include="CCConfiguration.h" />
<ClInclude Include="CCDeprecated.h" />
<ClInclude Include="CCDirector.h" />
<ClInclude Include="CCDrawingPrimitives.h" />
<ClInclude Include="CCDrawNode.h" />
@ -812,7 +813,6 @@
<ClInclude Include="CCMenuItem.h" />
<ClInclude Include="CCMotionStreak.h" />
<ClInclude Include="CCNode.h" />
<ClInclude Include="CCNotificationCenter.h" />
<ClInclude Include="CCParallaxNode.h" />
<ClInclude Include="CCParticleBatchNode.h" />
<ClInclude Include="CCParticleExamples.h" />

View File

@ -103,6 +103,9 @@
<Filter Include="xxhash">
<UniqueIdentifier>{a36c6808-a8d6-43f4-bfb0-e08ee2747a21}</UniqueIdentifier>
</Filter>
<Filter Include="deprecated">
<UniqueIdentifier>{5598fb0c-c012-45b6-8e43-447e7891b61d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
@ -376,7 +379,6 @@
<Filter>tilemap_parallax_nodes</Filter>
</ClCompile>
<ClCompile Include="CCConfiguration.cpp" />
<ClCompile Include="CCDeprecated.cpp" />
<ClCompile Include="CCDirector.cpp" />
<ClCompile Include="ccFPSImages.c" />
<ClCompile Include="CCScheduler.cpp" />
@ -385,9 +387,6 @@
<ClCompile Include="base64.cpp">
<Filter>support</Filter>
</ClCompile>
<ClCompile Include="CCNotificationCenter.cpp">
<Filter>support</Filter>
</ClCompile>
<ClCompile Include="CCProfiling.cpp">
<Filter>support</Filter>
</ClCompile>
@ -430,9 +429,6 @@
<ClCompile Include="..\base\CCAffineTransform.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\CCArray.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\CCAutoreleasePool.cpp">
<Filter>base</Filter>
</ClCompile>
@ -442,9 +438,6 @@
<ClCompile Include="..\base\CCDataVisitor.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\CCDictionary.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\CCGeometry.cpp">
<Filter>base</Filter>
</ClCompile>
@ -454,12 +447,6 @@
<ClCompile Include="..\base\CCRef.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\CCSet.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="..\base\CCString.cpp">
<Filter>base</Filter>
</ClCompile>
<ClCompile Include="ccUtils.cpp">
<Filter>support</Filter>
</ClCompile>
@ -611,6 +598,24 @@
<ClCompile Include="..\..\external\xxhash\xxhash.c">
<Filter>xxhash</Filter>
</ClCompile>
<ClCompile Include="..\deprecated\CCArray.cpp">
<Filter>deprecated</Filter>
</ClCompile>
<ClCompile Include="..\deprecated\CCDeprecated.cpp">
<Filter>deprecated</Filter>
</ClCompile>
<ClCompile Include="..\deprecated\CCDictionary.cpp">
<Filter>deprecated</Filter>
</ClCompile>
<ClCompile Include="..\deprecated\CCNotificationCenter.cpp">
<Filter>deprecated</Filter>
</ClCompile>
<ClCompile Include="..\deprecated\CCSet.cpp">
<Filter>deprecated</Filter>
</ClCompile>
<ClCompile Include="..\deprecated\CCString.cpp">
<Filter>deprecated</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\physics\CCPhysicsBody.h">
@ -679,9 +684,6 @@
<ClInclude Include="ccConfig.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="CCDeprecated.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="CCEventType.h">
<Filter>include</Filter>
</ClInclude>
@ -980,9 +982,6 @@
<ClInclude Include="base64.h">
<Filter>support</Filter>
</ClInclude>
<ClInclude Include="CCNotificationCenter.h">
<Filter>support</Filter>
</ClInclude>
<ClInclude Include="CCProfiling.h">
<Filter>support</Filter>
</ClInclude>
@ -1034,48 +1033,24 @@
<ClInclude Include="..\base\CCAffineTransform.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCArray.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCAutoreleasePool.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCBool.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCData.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCDataVisitor.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCDictionary.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCDouble.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCFloat.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCGeometry.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCInteger.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCNS.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCRef.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCSet.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="..\base\CCString.h">
<Filter>base</Filter>
</ClInclude>
<ClInclude Include="CCEventListenerMouse.h">
<Filter>event_dispatcher</Filter>
</ClInclude>
@ -1239,5 +1214,35 @@
<ClInclude Include="..\..\external\xxhash\xxhash.h">
<Filter>xxhash</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCArray.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCBool.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCDeprecated.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCDictionary.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCDouble.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCFloat.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCInteger.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCNotificationCenter.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCSet.h">
<Filter>deprecated</Filter>
</ClInclude>
<ClInclude Include="..\deprecated\CCString.h">
<Filter>deprecated</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -7,7 +7,7 @@
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d\platform\wp8;$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\gui;$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)cocos\math\kazmath\include;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(EngineRoot)cocos\2d\platform\wp8;$(EngineRoot)cocos\2d\platform\winrt;$(EngineRoot)\external\winrt-specific\angle\include;$(EngineRoot)\external\winrt-specific;$(EngineRoot)cocos\2d;$(EngineRoot)cocos\math\kazmath;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\2d\renderer;$(EngineRoot)cocos\gui;$(EngineRoot)cocos;$(EngineRoot)cocos\base;$(EngineRoot)cocos\physics;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external;$(EngineRoot)cocos\editor-support;$(EngineRoot);$(EngineRoot)cocos\math\kazmath\include;$(EngineRoot)cocos\deprecated;$(GeneratedFilesDir)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>true</CompileAsWinRT>
<MultiProcessorCompilation>true</MultiProcessorCompilation>

View File

@ -32,11 +32,12 @@ THE SOFTWARE.
#include "CCPlatformMacros.h"
#include <float.h>
#include <BaseTsd.h>
//typedef SSIZE_T ssize_t;
// ssize_t was redefined as int in libwebsockets.h.
// Therefore, to avoid conflict, we needs the same definition.
typedef int ssize_t;
#ifndef __SSIZE_T
#define __SSIZE_T
typedef SSIZE_T ssize_t;
#endif // __SSIZE_T
// for math.h on win32 platform

View File

@ -118,13 +118,13 @@ bool CCEditBoxImplWp8::initWithSize( const Size& size )
void CCEditBoxImplWp8::setFont( const char* pFontName, int fontSize )
{
if(m_pLabel != NULL) {
m_pLabel->setSystemFontName(pFontName);
m_pLabel->setSystemFontSize(fontSize);
m_pLabel->setFontName(pFontName);
m_pLabel->setFontSize(fontSize);
}
if(m_pLabelPlaceHolder != NULL) {
m_pLabelPlaceHolder->setSystemFontName(pFontName);
m_pLabelPlaceHolder->setSystemFontSize(fontSize);
m_pLabelPlaceHolder->setFontName(pFontName);
m_pLabelPlaceHolder->setFontSize(fontSize);
}
}
@ -137,8 +137,8 @@ void CCEditBoxImplWp8::setFontColor( const Color3B& color )
void CCEditBoxImplWp8::setPlaceholderFont( const char* pFontName, int fontSize )
{
if(m_pLabelPlaceHolder != NULL) {
m_pLabelPlaceHolder->setSystemFontName(pFontName);
m_pLabelPlaceHolder->setSystemFontSize(fontSize);
m_pLabelPlaceHolder->setFontName(pFontName);
m_pLabelPlaceHolder->setFontSize(fontSize);
}
}

View File

@ -42,7 +42,12 @@ extern "C" {
#define strcasecmp stricmp
#define getdtablesize() 30000
typedef int ssize_t;
#include <BaseTsd.h>
#ifndef __SSIZE_T
#define __SSIZE_T
typedef SSIZE_T ssize_t;
#endif // __SSIZE_T
#define LWS_VISIBLE