big cocos reworks

- remove cocos2dx folder
 - change all include paths in cocos2d to be relative
This commit is contained in:
HJfod 2022-10-17 15:46:36 +03:00
parent f68530e943
commit 662a9e99f5
456 changed files with 916 additions and 2208 deletions

View file

@ -60,11 +60,7 @@ target_sources(${PROJECT_NAME} INTERFACE ${GEODE_CODEGEN_PATH}/Geode/GeneratedSo
target_include_directories(${PROJECT_NAME} INTERFACE
${GEODE_CODEGEN_PATH}
${GEODE_LOADER_PATH}/include
${GEODE_LOADER_PATH}/include/Geode/cocos/
${GEODE_LOADER_PATH}/include/Geode/cocos/cocos2dx
${GEODE_LOADER_PATH}/include/Geode/cocos/cocos2dx/include
${GEODE_LOADER_PATH}/include/Geode/cocos/cocos2dx/support/zip_support
${GEODE_LOADER_PATH}/include/Geode/cocos/cocos2dx/kazmath/include
${GEODE_LOADER_PATH}/include/Geode/cocos/include
${GEODE_LOADER_PATH}/include/Geode/cocos/extensions
${GEODE_LOADER_PATH}/include/Geode/fmod
)
@ -97,9 +93,12 @@ elseif(EXISTS ${GEODE_PLATFORM_BIN_PATH})
"${GEODE_LOADER_PATH}/include/Geode/DefaultInclude.hpp"
"${GEODE_LOADER_PATH}/include/Geode/Loader.hpp"
"${GEODE_LOADER_PATH}/include/Geode/UI.hpp"
"${GEODE_LOADER_PATH}/include/Geode/cocos/cocos2dx/include/cocos2d.h"
"${GEODE_LOADER_PATH}/include/Geode/cocos/include/cocos2d.h"
"${GEODE_LOADER_PATH}/include/Geode/cocos/extensions/cocos-ext.h"
)
else()
message(FATAL_ERROR "No valid loader binary to link to! Install a pre-built binary for version ${PROJECT_VERSION} with Geode CLI or build it from source.")
message(FATAL_ERROR
"No valid loader binary to link to! Install prebuilts with `geode sdk install-prebuilts` "
"or build Geode from source."
)
endif()

View file

@ -121,7 +121,7 @@ target_precompile_headers(${PROJECT_NAME} PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/include/Geode/UI.hpp"
# "${CMAKE_CURRENT_SOURCE_DIR}/include/Geode/Bindings.hpp"
# "${CMAKE_CURRENT_SOURCE_DIR}/include/Geode/Modify.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/Geode/cocos/cocos2dx/include/cocos2d.h"
"${CMAKE_CURRENT_SOURCE_DIR}/include/Geode/cocos/include/cocos2d.h"
"${CMAKE_CURRENT_SOURCE_DIR}/include/Geode/cocos/extensions/cocos-ext.h"
)

View file

@ -28,8 +28,8 @@ THE SOFTWARE.
#define __CCCAMERA_H__
#include "cocoa/CCObject.h"
#include "ccMacros.h"
#include "kazmath/mat4.h"
#include "include/ccMacros.h"
#include "kazmath/include/kazmath/mat4.h"
#include <string>
NS_CC_BEGIN

View file

@ -27,7 +27,7 @@ THE SOFTWARE.
#define __CCCONFIGURATION_H__
#include "cocoa/CCObject.h"
#include "CCGL.h"
#include "platform/CCGL.h"
#include "cocoa/CCString.h"
#include <string>

View file

@ -29,13 +29,13 @@ THE SOFTWARE.
#include "platform/CCPlatformMacros.h"
#include "cocoa/CCObject.h"
#include "ccTypes.h"
#include "include/ccTypes.h"
#include "cocoa/CCGeometry.h"
#include "cocoa/CCArray.h"
#include "CCGL.h"
#include "kazmath/mat4.h"
#include "platform/CCGL.h"
#include "kazmath/include/kazmath/mat4.h"
#include "label_nodes/CCLabelAtlas.h"
#include "ccTypeInfo.h"
#include "include/ccTypeInfo.h"
NS_CC_BEGIN

View file

@ -5,12 +5,7 @@ project(cocos-headers CXX)
add_library(cocos2d INTERFACE)
target_include_directories(cocos2d INTERFACE
cocos2dx
cocos2dx/include
cocos2dx/kazmath/include
cocos2dx/platform/win32
cocos2dx/platform/third_party/win32
cocos2dx/platform/third_party/win32/OGLES
include
extensions
)

View file

@ -27,9 +27,9 @@ THE SOFTWARE.
#ifndef __ACTIONS_CCACTION_H__
#define __ACTIONS_CCACTION_H__
#include "cocoa/CCObject.h"
#include "cocoa/CCGeometry.h"
#include "platform/CCPlatformMacros.h"
#include "../cocoa/CCObject.h"
#include "../cocoa/CCGeometry.h"
#include "../platform/CCPlatformMacros.h"
NS_CC_BEGIN

View file

@ -40,8 +40,8 @@
#include <vector>
#include "CCActionInterval.h"
#include "base_nodes/CCNode.h"
#include "cocoa/CCGeometry.h"
#include "../base_nodes/CCNode.h"
#include "../cocoa/CCGeometry.h"
NS_CC_BEGIN;

View file

@ -28,7 +28,7 @@ THE SOFTWARE.
#define __CCINSTANT_ACTION_H__
#include <string>
#include "ccTypeInfo.h"
#include "../include/ccTypeInfo.h"
#include "CCAction.h"
NS_CC_BEGIN

View file

@ -27,11 +27,11 @@ THE SOFTWARE.
#ifndef __ACTION_CCINTERVAL_ACTION_H__
#define __ACTION_CCINTERVAL_ACTION_H__
#include "base_nodes/CCNode.h"
#include "../base_nodes/CCNode.h"
#include "CCAction.h"
#include "CCProtocols.h"
#include "sprite_nodes/CCSpriteFrame.h"
#include "sprite_nodes/CCAnimation.h"
#include "../include/CCProtocols.h"
#include "../sprite_nodes/CCSpriteFrame.h"
#include "../sprite_nodes/CCAnimation.h"
#include <vector>
NS_CC_BEGIN

View file

@ -29,8 +29,8 @@ THE SOFTWARE.
#define __ACTION_CCACTION_MANAGER_H__
#include "CCAction.h"
#include "cocoa/CCArray.h"
#include "cocoa/CCObject.h"
#include "../cocoa/CCArray.h"
#include "../cocoa/CCObject.h"
NS_CC_BEGIN

View file

@ -28,8 +28,8 @@ THE SOFTWARE.
#define __CCATLAS_NODE_H__
#include "CCNode.h"
#include "CCProtocols.h"
#include "ccTypes.h"
#include "../include/CCProtocols.h"
#include "../include/ccTypes.h"
NS_CC_BEGIN

View file

@ -24,7 +24,7 @@ THE SOFTWARE.
#ifndef __CC_GL_BUFFERED_NODE__
#define __CC_GL_BUFFERED_NODE__
#include <CCGL.h>
#include "../platform/CCGL.h"
class CCGLBufferedNode
{

View file

@ -28,15 +28,15 @@
#ifndef __PLATFORM_CCNODE_H__
#define __PLATFORM_CCNODE_H__
#include "ccMacros.h"
#include "cocoa/CCAffineTransform.h"
#include "cocoa/CCArray.h"
#include "CCGL.h"
#include "shaders/ccGLStateCache.h"
#include "shaders/CCGLProgram.h"
#include "kazmath/kazmath.h"
#include "script_support/CCScriptSupport.h"
#include "CCProtocols.h"
#include "../include/ccMacros.h"
#include "../cocoa/CCAffineTransform.h"
#include "../cocoa/CCArray.h"
#include "../platform/CCGL.h"
#include "../shaders/ccGLStateCache.h"
#include "../shaders/CCGLProgram.h"
#include "../kazmath/include/kazmath/kazmath.h"
#include "../script_support/CCScriptSupport.h"
#include "../include/CCProtocols.h"
NS_CC_BEGIN

View file

@ -26,7 +26,7 @@ THE SOFTWARE.
#define __COCOA_CGAFFINETRANSFORM_H__
#include "CCGeometry.h"
#include "platform/CCPlatformMacros.h"
#include "../platform/CCPlatformMacros.h"
NS_CC_BEGIN

View file

@ -25,7 +25,7 @@ THE SOFTWARE.
#ifndef __CCARRAY_H__
#define __CCARRAY_H__
#include "support/data_support/ccCArray.h"
#include "../support/data_support/ccCArray.h"
/**
* @addtogroup data_structures

View file

@ -25,7 +25,7 @@
#ifndef __CCDATAVISITOR_H__
#define __CCDATAVISITOR_H__
#include "platform/CCPlatformMacros.h"
#include "../platform/CCPlatformMacros.h"
#include <string>
NS_CC_BEGIN

View file

@ -25,7 +25,7 @@ THE SOFTWARE.
#ifndef __CCDICTIONARY_H__
#define __CCDICTIONARY_H__
#include "support/data_support/uthash.h"
#include "../support/data_support/uthash.h"
#include "CCObject.h"
#include "CCArray.h"
#include "CCString.h"

View file

@ -25,7 +25,7 @@ THE SOFTWARE.
#ifndef __CCGEMETRY_H__
#define __CCGEMETRY_H__
#include "platform/CCPlatformMacros.h"
#include "../platform/CCPlatformMacros.h"
#include "CCObject.h"
#include <math.h>

View file

@ -26,11 +26,11 @@ THE SOFTWARE.
#define __CCOBJECT_H__
#include "CCDataVisitor.h"
#include "ccMacros.h"
#include "../include/ccMacros.h"
#include <unordered_map>
// Geode macros
#include <Geode/DefaultInclude.hpp>
#include "../../DefaultInclude.hpp"
#ifdef EMSCRIPTEN
#include <GLES2/gl2.h>

View file

@ -25,7 +25,7 @@ THE SOFTWARE.
#ifndef __CC_ZONE_H__
#define __CC_ZONE_H__
#include "platform/CCPlatformMacros.h"
#include "../platform/CCPlatformMacros.h"
#include <stdio.h>
NS_CC_BEGIN

View file

@ -1,328 +0,0 @@
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011 Zynga Inc.
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __COCOS2D_H__
#define __COCOS2D_H__
// 0x00 HI ME LO
// 00 02 01 00
#define COCOS2D_VERSION 0x00020100
// Geode macros
#include <Geode/DefaultInclude.hpp>
//
// all cocos2d include files
//
#include "ccConfig.h"
// actions
#include "actions/CCAction.h"
#include "actions/CCActionInterval.h"
#include "actions/CCActionCamera.h"
#include "actions/CCActionManager.h"
#include "actions/CCActionEase.h"
#include "actions/CCActionPageTurn3D.h"
#include "actions/CCActionGrid.h"
#include "actions/CCActionProgressTimer.h"
#include "actions/CCActionGrid3D.h"
#include "actions/CCActionTiledGrid.h"
#include "actions/CCActionInstant.h"
#include "actions/CCActionTween.h"
#include "actions/CCActionCatmullRom.h"
// base_nodes
#include "base_nodes/CCNode.h"
#include "base_nodes/CCAtlasNode.h"
// cocoa
#include "cocoa/CCAffineTransform.h"
#include "cocoa/CCDictionary.h"
#include "cocoa/CCObject.h"
#include "cocoa/CCArray.h"
#include "cocoa/CCGeometry.h"
#include "cocoa/CCSet.h"
#include "cocoa/CCAutoreleasePool.h"
#include "cocoa/CCInteger.h"
#include "cocoa/CCFloat.h"
#include "cocoa/CCDouble.h"
#include "cocoa/CCBool.h"
#include "cocoa/CCString.h"
#include "cocoa/CCNS.h"
#include "cocoa/CCZone.h"
// draw nodes
#include "draw_nodes/CCDrawingPrimitives.h"
#include "draw_nodes/CCDrawNode.h"
// effects
#include "effects/CCGrabber.h"
#include "effects/CCGrid.h"
// include
#include "CCEventType.h"
#include "CCProtocols.h"
#include "ccConfig.h"
#include "ccMacros.h"
#include "ccTypes.h"
// kazmath
#include "kazmath/include/kazmath/kazmath.h"
#include "kazmath/include/kazmath/GL/matrix.h"
// keypad_dispatcher
#include "keypad_dispatcher/CCKeypadDelegate.h"
#include "keypad_dispatcher/CCKeypadDispatcher.h"
// label_nodes
#include "label_nodes/CCLabelAtlas.h"
#include "label_nodes/CCLabelTTF.h"
#include "label_nodes/CCLabelBMFont.h"
// layers_scenes_transitions_nodes
#include "layers_scenes_transitions_nodes/CCLayer.h"
#include "layers_scenes_transitions_nodes/CCScene.h"
#include "layers_scenes_transitions_nodes/CCTransition.h"
#include "layers_scenes_transitions_nodes/CCTransitionPageTurn.h"
#include "layers_scenes_transitions_nodes/CCTransitionProgress.h"
// menu_nodes
#include "menu_nodes/CCMenu.h"
#include "menu_nodes/CCMenuItem.h"
// misc_nodes
#include "misc_nodes/CCClippingNode.h"
#include "misc_nodes/CCMotionStreak.h"
#include "misc_nodes/CCProgressTimer.h"
#include "misc_nodes/CCRenderTexture.h"
// particle_nodes
#include "particle_nodes/CCParticleBatchNode.h"
#include "particle_nodes/CCParticleSystem.h"
#include "particle_nodes/CCParticleExamples.h"
#include "particle_nodes/CCParticleSystemQuad.h"
// platform
#include "platform/CCDevice.h"
#include "platform/CCCommon.h"
#include "platform/CCFileUtils.h"
#include "platform/CCImage.h"
#include "platform/CCSAXParser.h"
#include "platform/CCThread.h"
#include "platform/platform.h"
#include "platform/CCPlatformConfig.h"
#include "platform/CCPlatformMacros.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "platform/ios/CCAccelerometer.h"
#include "platform/ios/CCApplication.h"
#include "platform/ios/CCEGLView.h"
#include "platform/ios/CCGL.h"
#include "platform/ios/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "platform/android/CCAccelerometer.h"
#include "platform/android/CCApplication.h"
#include "platform/android/CCEGLView.h"
#include "platform/android/CCGL.h"
#include "platform/android/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
#include "platform/blackberry/CCAccelerometer.h"
#include "platform/blackberry/CCApplication.h"
#include "platform/blackberry/CCEGLView.h"
#include "platform/blackberry/CCGL.h"
#include "platform/blackberry/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#include "platform/win32/CCAccelerometer.h"
#include "platform/win32/CCApplication.h"
#include "platform/win32/CCEGLView.h"
#include "platform/win32/CCGL.h"
#include "platform/win32/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
#include "platform/winrt/CCApplication.h"
#include "platform/winrt/CCEGLView.h"
#include "platform/winrt/CCGL.h"
#include "platform/winrt/CCStdC.h"
#include "platform/winrt/CCAccelerometer.h"
#include "platform/winrt/CCPrecompiledShaders.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
#include "platform/winrt/CCApplication.h"
#include "platform/wp8/CCEGLView.h"
#include "platform/winrt/CCGL.h"
#include "platform/winrt/CCStdC.h"
#include "platform/winrt/CCAccelerometer.h"
#include "platform/winrt/CCPrecompiledShaders.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WP8
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
#include "platform/mac/CCAccelerometer.h"
#include "platform/mac/CCApplication.h"
#include "platform/mac/CCEGLView.h"
#include "platform/mac/CCGL.h"
#include "platform/mac/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
#include "platform/linux/CCAccelerometer.h"
#include "platform/linux/CCApplication.h"
#include "platform/linux/CCEGLView.h"
#include "platform/linux/CCGL.h"
#include "platform/linux/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
// MARMALADE CHANGE
// Added for Marmalade support
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE)
#include "platform/Marmalade/CCAccelerometer.h"
#include "platform/Marmalade/CCApplication.h"
#include "platform/Marmalade/CCEGLView.h"
#include "platform/Marmalade/CCGL.h"
#include "platform/Marmalade/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
#if (CC_TARGET_PLATFORM == CC_PLATFORM_NACL)
#include "platform/nacl/CCAccelerometer.h"
#include "platform/nacl/CCApplication.h"
#include "platform/nacl/CCEGLView.h"
#include "platform/nacl/CCGL.h"
#include "platform/nacl/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
#if (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN)
#include "platform/emscripten/CCAccelerometer.h"
#include "platform/emscripten/CCApplication.h"
#include "platform/emscripten/CCEGLView.h"
#include "platform/emscripten/CCGL.h"
#include "platform/emscripten/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN
#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)
#include "platform/tizen/CCAccelerometer.h"
#include "platform/tizen/CCApplication.h"
#include "platform/tizen/CCEGLView.h"
#include "platform/tizen/CCGL.h"
#include "platform/tizen/CCStdC.h"
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN
// script_support
#include "script_support/CCScriptSupport.h"
// shaders
#include "shaders/CCGLProgram.h"
#include "shaders/ccGLStateCache.h"
#include "shaders/CCShaderCache.h"
#include "shaders/ccShaders.h"
// sprite_nodes
#include "sprite_nodes/CCAnimation.h"
#include "sprite_nodes/CCAnimationCache.h"
#include "sprite_nodes/CCSprite.h"
#include "sprite_nodes/CCSpriteBatchNode.h"
#include "sprite_nodes/CCSpriteFrame.h"
#include "sprite_nodes/CCSpriteFrameCache.h"
// support
#include "support/ccUTF8.h"
#include "support/CCNotificationCenter.h"
#include "support/CCPointExtension.h"
#include "support/CCProfiling.h"
#include "support/user_default/CCUserDefault.h"
#include "support/CCVertex.h"
#include "support/tinyxml2/tinyxml2.h"
#include "support/zip_support/ZipUtils.h"
// text_input_node
#include "text_input_node/CCIMEDelegate.h"
#include "text_input_node/CCIMEDispatcher.h"
#include "text_input_node/CCTextFieldTTF.h"
// textures
#include "textures/CCTexture2D.h"
#include "textures/CCTextureAtlas.h"
#include "textures/CCTextureCache.h"
#include "textures/CCTexturePVR.h"
// tilemap_parallax_nodes
#include "tilemap_parallax_nodes/CCParallaxNode.h"
#include "tilemap_parallax_nodes/CCTMXLayer.h"
#include "tilemap_parallax_nodes/CCTMXObjectGroup.h"
#include "tilemap_parallax_nodes/CCTMXTiledMap.h"
#include "tilemap_parallax_nodes/CCTMXXMLParser.h"
#include "tilemap_parallax_nodes/CCTileMapAtlas.h"
// touch_dispatcher
#include "touch_dispatcher/CCTouch.h"
#include "touch_dispatcher/CCTouchDelegateProtocol.h"
#include "touch_dispatcher/CCTouchDispatcher.h"
#include "touch_dispatcher/CCTouchHandler.h"
// root
#include "CCCamera.h"
#include "CCConfiguration.h"
#include "CCDirector.h"
#include "CCScheduler.h"
// component
#include "support/component/CCComponent.h"
#include "support/component/CCComponentContainer.h"
//robtop
#include "robtop/keyboard_dispatcher/CCKeyboardDelegate.h"
#include "robtop/keyboard_dispatcher/CCKeyboardDispatcher.h"
#include "robtop/mouse_dispatcher/CCMouseDelegate.h"
#include "robtop/mouse_dispatcher/CCMouseDispatcher.h"
#include "robtop/content/CCContentManager.h"
#include "robtop/scene_nodes/CCSceneTransitionDelegate.h"
#include "robtop/xml/DS_Dictionary.h"
// #include "robtop/glfw/glfw3.h"
NS_CC_BEGIN
CC_DLL const char* cocos2dVersion();
NS_CC_END
#endif // __COCOS2D_H__

View file

@ -1,50 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __PLATFORM_WINRT_UIACCELEROMETER_H__
#define __PLATFORM_WINRT_UIACCELEROMETER_H__
#include "platform/CCAccelerometerDelegate.h"
NS_CC_BEGIN
class CC_DLL CCAccelerometer
{
GEODE_FRIEND_MODIFY
public:
CCAccelerometer();
~CCAccelerometer();
void setDelegate(CCAccelerometerDelegate* pDelegate);
void setAccelerometerInterval(float interval);
private:
CCAcceleration m_obAccelerationValue;
CCAccelerometerDelegate* m_pAccelDelegate;
Windows::Devices::Sensors::Accelerometer^ m_accelerometer;
};
NS_CC_END
#endif

View file

@ -1,97 +0,0 @@
/****************************************************************************
Copyright (c) 2010-2013 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_APPLICATION_WINRT_H__
#define __CC_APPLICATION_WINRT_H__
#include "CCStdC.h"
#include "platform/CCCommon.h"
#include "platform/CCApplicationProtocol.h"
#include <string>
NS_CC_BEGIN
class CCRect;
class CC_DLL CCApplication : public CCApplicationProtocol
{
GEODE_FRIEND_MODIFY
public:
CCApplication();
virtual ~CCApplication();
/**
@brief Run the message loop.
*/
int run();
/**
@brief Get current applicaiton instance.
@return Current application instance pointer.
*/
static CCApplication* sharedApplication();
GEODE_ADD(
static CCApplication* get();
);
/* override functions */
virtual void setAnimationInterval(double interval);
virtual ccLanguageType getCurrentLanguage();
/**
@brief Get target platform
*/
virtual TargetPlatform getTargetPlatform();
/**
* Sets the Resource root path.
* @deprecated Please use CCFileUtils::sharedFileUtils()->setSearchPaths() instead.
*/
CC_DEPRECATED_ATTRIBUTE void setResourceRootPath(const gd::string& rootResDir);
/**
* Gets the Resource root path.
* @deprecated Please use CCFileUtils::sharedFileUtils()->getSearchPaths() instead.
*/
CC_DEPRECATED_ATTRIBUTE const gd::string& getResourceRootPath(void);
void setStartupScriptFilename(const gd::string& startupScriptFile);
const gd::string& getStartupScriptFilename(void)
{
return m_startupScriptFilename;
}
protected:
LARGE_INTEGER m_nAnimationInterval;
gd::string m_resourceRootPath;
gd::string m_startupScriptFilename;
static CCApplication * sm_pSharedApplication;
};
NS_CC_END
#endif // __CC_APPLICATION_WINRT_H__

View file

@ -1,158 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_EGLVIEW_WINRT_H__
#define __CC_EGLVIEW_WINRT_H__
#include "CCStdC.h"
#include "platform/CCCommon.h"
#include "cocoa/CCGeometry.h"
#include "platform/CCEGLViewProtocol.h"
#include <agile.h>
#include <wrl/client.h>
#include <agile.h>
#include <DirectXMath.h>
#include "esUtil.h"
NS_CC_BEGIN
class CCEGL;
class CCEGLView;
ref class WinRTWindow sealed
{
public:
WinRTWindow(Windows::UI::Core::CoreWindow^ window);
void Initialize(Windows::UI::Core::CoreWindow^ window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ panel);
void setIMEKeyboardState(bool bOpen);
void swapBuffers();
private:
CCPoint GetCCPoint(Windows::UI::Core::PointerEventArgs^ args);
void OnTextKeyDown(Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e);
void OnTextKeyUp(Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e);
void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args);
void OnPointerMoved(Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^ args);
void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args);
void OnLogicalDpiChanged(Platform::Object^ sender);
void OnOrientationChanged(Platform::Object^ sender);
void OnDisplayContentsInvalidated(Platform::Object^ sender);
void OnRendering(Platform::Object^ sender, Platform::Object^ args);
void OnSuspending();
void ResizeWindow();
void ShowKeyboard(Windows::UI::ViewManagement::InputPane^ inputPane, Windows::UI::ViewManagement::InputPaneVisibilityEventArgs^ args);
void HideKeyboard(Windows::UI::ViewManagement::InputPane^ inputPane, Windows::UI::ViewManagement::InputPaneVisibilityEventArgs^ args);
Platform::Agile<Windows::UI::Core::CoreWindow> m_window;
Windows::Foundation::Point m_lastPoint;
Windows::Foundation::EventRegistrationToken m_eventToken;
bool m_lastPointValid;
bool m_textInputEnabled;
Microsoft::WRL::ComPtr<IWinrtEglWindow> m_eglWindow;
ESContext m_esContext;
Windows::UI::Xaml::Controls::TextBox^ m_textBox;
Windows::UI::Xaml::Controls::Button^ m_dummy;
friend CCEGLView;
};
class CC_DLL CCEGLView : public CCEGLViewProtocol
{
GEODE_FRIEND_MODIFY
public:
CCEGLView();
virtual ~CCEGLView();
/* override functions */
virtual bool isOpenGLReady();
virtual void end();
virtual void swapBuffers();
virtual void setFrameSize(float width, float height);
virtual void setIMEKeyboardState(bool bOpen);
void ShowKeyboard(Windows::Foundation::Rect r);
void HideKeyboard(Windows::Foundation::Rect r);
virtual bool Create(Windows::UI::Core::CoreWindow^ window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ panel);
void UpdateForWindowSizeChange();
void OnRendering();
void OnSuspending();
private:
Windows::Foundation::EventRegistrationToken m_eventToken;
Windows::Foundation::Point m_lastPoint;
bool m_lastPointValid;
public:
// winrt platform functions
Windows::UI::Core::CoreWindow^ getWindow() { return m_window.Get(); };
int Run();
void resize(int width, int height);
/*
* Set zoom factor for frame. This method is for debugging big resolution (e.g.new ipad) app on desktop.
*/
void setFrameZoomFactor(float fZoomFactor);
float getFrameZoomFactor();
void centerWindow();
void showCursor(bool state);
// static function
/**
@brief get the shared main open gl window
*/
static CCEGLView* sharedOpenGLView();
GEODE_ADD(
static CCEGLView* get();
);
protected:
private:
Platform::Agile<Windows::UI::Core::CoreWindow> m_window;
bool m_running;
bool m_initialized;
bool m_bSupportTouch;
float m_fFrameZoomFactor;
WinRTWindow^ m_winRTWindow;
Windows::Foundation::Rect m_keyboardRect;
};
NS_CC_END
#endif // end of __CC_EGLVIEW_WINRT_H__

View file

@ -1,65 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_FILEUTILS_WINRT_H__
#define __CC_FILEUTILS_WINRT_H__
#include "platform/CCFileUtils.h"
#include "platform/CCPlatformMacros.h"
#include "ccTypes.h"
#include "ccTypeInfo.h"
#include <string>
#include <vector>
NS_CC_BEGIN
/**
* @addtogroup platform
* @{
*/
//! @brief Helper class to handle file operations
class CC_DLL CCFileUtilsWinRT : public CCFileUtils
{
GEODE_FRIEND_MODIFY
friend class CCFileUtils;
CCFileUtilsWinRT();
public:
/* override funtions */
bool init();
virtual gd::string getWritablePath();
virtual bool isFileExist(const gd::string& strFilePath);
virtual bool isAbsolutePath(const gd::string& strPath);
static gd::string getAppPath();
};
// end of platform group
/// @}
NS_CC_END
#endif // __CC_FILEUTILS_WINRT_H__

View file

@ -1,140 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __PLATFORM_WINRT_FREETYPE_H__
#define __PLATFORM_WINRT_FREETYPE_H__
#include "platform/CCCommon.h"
#include "platform/CCImage.h"
#include <string>
#include <vector>
#include <memory>
#define generic GenericFromFreeTypeLibrary
#define internal InternalFromFreeTypeLibrary
#include <ft2build.h>
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
#include <freetype/ftoutln.h>
#include <freetype/fttrigon.h>
#undef generic
#undef internal
NS_CC_BEGIN
typedef struct TGlyph_
{
FT_UInt index; // glyph index
FT_Vector pos; // glyph origin on the baseline
FT_Glyph image; // glyph image
} TGlyph, *PGlyph;
typedef struct FontBufferInfo
{
unsigned char* pBuffer;
unsigned long size;
} FontBufferInfo;
typedef struct FTWordInfo
{
gd::vector<TGlyph> glyphs; // glyphs for the word
FT_BBox bbox; // bounding box containing all of the glyphs in the word
} FTWordInfo;
typedef struct FTLineInfo
{
gd::vector<TGlyph> glyphs; // glyphs for the line text
FT_BBox bbox; // bounding box containing all of the glyphs in the line
unsigned int width; // width of the line
FT_Vector pen; // current pen position
} FTLineInfo;
class CC_DLL CCFreeTypeFont
{
GEODE_FRIEND_MODIFY
public:
CCFreeTypeFont();
~CCFreeTypeFont();
bool initWithString(
const char* pText,
const char* pFontName,
int nSize,
int width,
int height
);
unsigned char* getBitmap(
CCImage::ETextAlign eAlignMask,
int* outWidth,
int* outHeight
);
private:
unsigned char* loadFont(const char *pFontName, unsigned long *size);
unsigned char* CCFreeTypeFont::loadSystemFont(const char *pFontName, unsigned long *size);
FT_Error CCFreeTypeFont::initGlyphs(const char* text);
FT_Error CCFreeTypeFont::initWordGlyphs(gd::vector<TGlyph>& glyphs, const gd::string& text, FT_Vector& pen);
void compute_bbox(gd::vector<TGlyph>& glyphs, FT_BBox *abbox);
void drawText(FTLineInfo* pInfo, unsigned char* pBuffer, FT_Vector *pen);
void draw_bitmap(unsigned char* pBuffer, FT_Bitmap* bitmap,FT_Int x,FT_Int y);
void initWords(const char* text);
FT_Vector getPenForAlignment(FTLineInfo* pInfo, CCImage::ETextAlign eAlignMask, int lineNumber, int totalLines);
FT_Error addWord(const gd::string& word);
void newLine();
void endLine();
const gd::string m_space;
gd::string m_text;
gd::string m_fontName;
FT_Face m_face;
gd::vector<FTLineInfo*> m_lines;
int m_inWidth; // requested width of text box
int m_inHeight; // requested height of text box
int m_width; // final bitMap width
int m_height; // final bitMap height
int m_textWidth; // width of text text after word wrapping and line breaks
int m_textHeight; // height of text text after word wrapping and line breaks
int m_lineHeight; // height of a line for the font size
int m_windowWidth; // the width of the window
FTLineInfo* m_currentLine; // the current line object to add words to.
};
NS_CC_END
#endif

View file

@ -1,31 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCGL_H__
#define __CCGL_H__
#include "CCGL_Angle.h"
#endif // __CCGL_H__

View file

@ -1,45 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCGL_ANGLE_H__
#define __CCGL_ANGLE_H__
#include "../third_party/winrt/angleproject/include/GLES2/gl2.h"
#include "../third_party/winrt/angleproject/include/GLES2/gl2ext.h"
#include "../third_party/winrt/angleproject/src/common/winrtangle.h"
#define GL_BGRA GL_BGRA_EXT
#define glClearDepth glClearDepthf
#define glDeleteVertexArrays glDeleteVertexArraysOES
#define glGenVertexArrays glGenVertexArraysOES
#define glBindVertexArray glBindVertexArrayOES
#define glMapBuffer glMapBufferOES
#define glUnmapBuffer glUnmapBufferOES
#define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES
#define GL_WRITE_ONLY GL_WRITE_ONLY_OES
#endif // __CCGL_ANGLE_H__

View file

@ -1,43 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCGL_GL2DX_H__
#define __CCGL_GL2DX_H__
#include "gl2dx.h"
#ifndef GLchar
typedef char GLchar;
#endif
#define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8
// These macros are only for making CCTexturePVR.cpp complied without errors since they are not included in GLEW.
#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#endif // __CCGL_GL2DX_H__

View file

@ -1,57 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCPTHREADWINRT_H__
#define __CCPTHREADWINRT_H__
#include "platform/CCPlatformMacros.h"
#include <Windows.h>
NS_CC_BEGIN
typedef HANDLE pthread_t;
typedef HANDLE pthread_mutex_t;
typedef int pthread_cond_t;
#define pthread_cond_wait(x, y)
void pthread_mutex_init(pthread_mutex_t* m, void* attributes);
int pthread_mutex_lock(pthread_mutex_t* m);
int pthread_mutex_unlock(pthread_mutex_t* m);
void pthread_mutex_destroy(pthread_mutex_t* m);
#define pthread_cond_destroy(x)
#define pthread_cond_signal(x)
#define pthread_cond_init(x, y)
NS_CC_END
#endif // __CCPTHREADWINRT_H__

View file

@ -1,54 +0,0 @@
/****************************************************************************
Copyright (c) 2010-2013 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCPLATFORMDEFINE_H__
#define __CCPLATFORMDEFINE_H__
#if defined(_USRDLL)
#define CC_DLL __declspec(dllexport)
#else /* use a DLL library */
#define CC_DLL __declspec(dllimport)
#endif
#include <assert.h>
#if CC_DISABLE_ASSERT > 0
#define CC_ASSERT(cond)
#else
#define CC_ASSERT(cond) assert(cond)
#endif
#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam
/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#endif /* __CCPLATFORMDEFINE_H__*/

View file

@ -1,98 +0,0 @@
/****************************************************************************
Copyright (c) 2010-2013 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_PRECOMPILED_SHADERS_H__
#define __CC_PRECOMPILED_SHADERS_H__
#include "platform/CCCommon.h"
#include "CCGL.h"
#include <string>
#include <vector>
#include <map>
NS_CC_BEGIN
typedef struct _PrecompiledProgram
{
const char* key;
const unsigned char* program;
int length;
} PrecompiledProgram;
typedef struct _CompiledProgram
{
gd::string key;
gd::vector<unsigned char> program;
int length;
} CompiledProgram;
#if 0
const unsigned char gKey[] = "hello";
const unsigned char gProgram[] = "world";
PrecompiledShader gFoo = {gKey, gProgram, 100};
PrecompiledShader shaders[] = {gFoo, gFoo};
#endif
class CC_DLL CCPrecompiledShaders
{
GEODE_FRIEND_MODIFY
public:
CCPrecompiledShaders();
virtual ~CCPrecompiledShaders();
/**
@brief Get current precompiled shaders instance.
@return Current precompiled shaders instance pointer.
*/
static CCPrecompiledShaders* sharedPrecompiledShaders();
gd::string addShaders(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray);
bool addProgram(GLuint program, const gd::string& id);
bool loadProgram(GLuint program, const GLchar* vShaderByteArray, const GLchar* fShaderByteArray);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
void savePrecompiledShaders();
#endif
protected:
void savePrecompiledPrograms(Windows::Storage::StorageFolder^ folder);
void loadPrecompiledPrograms();
void Init();
gd::map<gd::string, CompiledProgram*> m_programs;
gd::map<gd::string, PrecompiledProgram*> m_precompiledPrograms;
bool m_isDirty;
};
NS_CC_END
#endif // __CC_PRECOMPILED_SHADERS_H__

View file

@ -1,89 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CC_STD_C_H__
#define __CC_STD_C_H__
#include "platform/CCPlatformMacros.h"
#include <float.h>
// for math.h on win32 platform
#if !defined(_USE_MATH_DEFINES)
#define _USE_MATH_DEFINES // make M_PI can be use
#endif
#if !defined(isnan)
#define isnan _isnan
#endif
#ifndef snprintf
#define snprintf _snprintf
#endif
#include <math.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// for MIN MAX and sys/time.h on win32 platform
#define MIN min
#define MAX max
#if _MSC_VER >= 1600
#include <stdint.h>
#else
#include "./compat/stdint.h"
#endif
#define _WINSOCKAPI_
// Structure timeval has define in winsock.h, include windows.h for it.
#if CC_TARGET_PLATFORM == CC_PLATFORM_WP8
#include <WinSock2.h>
#elif CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
#include <Windows.h>
//#include <WinSock2.h>
#undef timeval
struct timeval
{
long tv_sec; // seconds
long tv_usec; // microSeconds
};
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WP8
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};
int CC_DLL gettimeofday(struct timeval *, struct timezone *);
#endif // __CC_STD_C_H__

View file

@ -1,55 +0,0 @@
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org
Copyright (c) Microsoft Open Technologies, Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#ifndef __CCWINRT_UTILS_H__
#define __CCWINRT_UTILS_H__
#include "platform/CCPlatformMacros.h"
#include "cocoa/CCDictionary.h"
#include <wrl/client.h>
#include <ppl.h>
#include <ppltasks.h>
#include <string>
NS_CC_BEGIN
std::wstring CC_DLL CCUtf8ToUnicode(const char * pszUtf8Str, unsigned len = -1);
gd::string CC_DLL CCUnicodeToUtf8(const wchar_t* pwszStr);
gd::string PlatformStringToString(Platform::String^ s);
// Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels.
float ConvertDipsToPixels(float dips);
float getScaledDPIValue(float v);
Concurrency::task<Platform::Array<byte>^> ReadDataAsync(Platform::String^ path);
NS_CC_END
#endif // __CCWINRT_UTILS_H__

View file

@ -1,78 +0,0 @@
//-----------------------------------------------------------------------------------------------
// Copyright (c) 2012 Andrew Garrison
//-----------------------------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//-----------------------------------------------------------------------------------------------
#pragma once
#include <wrl/client.h>
#include <d3d11_1.h>
#include <d2d1_1.h>
#include <d2d1effects.h>
#include <dwrite_1.h>
#include <wincodec.h>
#include <agile.h>
#include <DirectXMath.h>
#include "DirectXHelper.h"
#pragma warning (disable: 4449)
using namespace Windows::UI::ViewManagement;
// Helper class that initializes DirectX APIs
ref class DirectXBase abstract
{
internal:
DirectXBase();
public:
virtual void Initialize(Windows::UI::Core::CoreWindow^ window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ panel, float dpi);
virtual void CreateDeviceIndependentResources();
virtual void CreateDeviceResources();
virtual void SetDpi(float dpi);
virtual void CreateWindowSizeDependentResources();
virtual void UpdateForWindowSizeChange();
virtual void Present();
virtual float ConvertDipsToPixels(float dips);
protected private:
Platform::Agile<Windows::UI::Core::CoreWindow> m_window;
Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ m_panel;
// Direct2D Objects
Microsoft::WRL::ComPtr<ID2D1Factory1> m_d2dFactory;
Microsoft::WRL::ComPtr<ID2D1Device> m_d2dDevice;
Microsoft::WRL::ComPtr<ID2D1DeviceContext> m_d2dContext;
Microsoft::WRL::ComPtr<ID2D1Bitmap1> m_d2dTargetBitmap;
// DirectWrite & Windows Imaging Component Objects
Microsoft::WRL::ComPtr<IDWriteFactory1> m_dwriteFactory;
Microsoft::WRL::ComPtr<IWICImagingFactory2> m_wicFactory;
// Direct3D Objects
Microsoft::WRL::ComPtr<ID3D11Device1> m_d3dDevice;
Microsoft::WRL::ComPtr<ID3D11DeviceContext1> m_d3dContext;
Microsoft::WRL::ComPtr<IDXGISwapChain1> m_swapChain;
Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_renderTargetView;
Microsoft::WRL::ComPtr<ID3D11DepthStencilView> m_depthStencilView;
D3D_FEATURE_LEVEL m_featureLevel;
Windows::Foundation::Size m_renderTargetSize;
Windows::Foundation::Rect m_windowBounds;
float m_dpi;
};
#pragma warning (default: 4449)

View file

@ -1,32 +0,0 @@
//-----------------------------------------------------------------------------------------------
// Copyright (c) 2012 Andrew Garrison
//-----------------------------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//-----------------------------------------------------------------------------------------------
#pragma once
// Helper utilities to make Win32 APIs work with exceptions.
namespace DX
{
inline void ThrowIfFailed(HRESULT hr)
{
if (FAILED(hr))
{
// Set a breakpoint on this line to catch Win32 API errors.
throw Platform::Exception::CreateException(hr);
}
}
}

View file

@ -1,247 +0,0 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006-2008 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#ifndef _MSC_STDINT_H_ // [
#define _MSC_STDINT_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <limits.h>
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
// or compiler give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
#ifdef __cplusplus
extern "C" {
#endif
# include <wchar.h>
#ifdef __cplusplus
}
#endif
// Define _W64 macros to mark types changing their size, like intptr_t.
#ifndef _W64
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
# define _W64 __w64
# else
# define _W64
# endif
#endif
// 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
// 7.18.1.2 Minimum-width integer types
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
// 7.18.1.3 Fastest minimum-width integer types
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
// 7.18.1.4 Integer types capable of holding object pointers
#ifdef _WIN64 // [
typedef signed __int64 intptr_t;
typedef unsigned __int64 uintptr_t;
#else // _WIN64 ][
typedef _W64 signed int intptr_t;
typedef _W64 unsigned int uintptr_t;
#endif // _WIN64 ]
// 7.18.1.5 Greatest-width integer types
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
// 7.18.2 Limits of specified-width integer types
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
// 7.18.2.1 Limits of exact-width integer types
#define INT8_MIN ((int8_t)_I8_MIN)
#define INT8_MAX _I8_MAX
#define INT16_MIN ((int16_t)_I16_MIN)
#define INT16_MAX _I16_MAX
#define INT32_MIN ((int32_t)_I32_MIN)
#define INT32_MAX _I32_MAX
#define INT64_MIN ((int64_t)_I64_MIN)
#define INT64_MAX _I64_MAX
#define UINT8_MAX _UI8_MAX
#define UINT16_MAX _UI16_MAX
#define UINT32_MAX _UI32_MAX
#define UINT64_MAX _UI64_MAX
// 7.18.2.2 Limits of minimum-width integer types
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
// 7.18.2.3 Limits of fastest minimum-width integer types
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
// 7.18.2.4 Limits of integer types capable of holding object pointers
#ifdef _WIN64 // [
# define INTPTR_MIN INT64_MIN
# define INTPTR_MAX INT64_MAX
# define UINTPTR_MAX UINT64_MAX
#else // _WIN64 ][
# define INTPTR_MIN INT32_MIN
# define INTPTR_MAX INT32_MAX
# define UINTPTR_MAX UINT32_MAX
#endif // _WIN64 ]
// 7.18.2.5 Limits of greatest-width integer types
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
// 7.18.3 Limits of other integer types
#ifdef _WIN64 // [
# define PTRDIFF_MIN _I64_MIN
# define PTRDIFF_MAX _I64_MAX
#else // _WIN64 ][
# define PTRDIFF_MIN _I32_MIN
# define PTRDIFF_MAX _I32_MAX
#endif // _WIN64 ]
#define SIG_ATOMIC_MIN INT_MIN
#define SIG_ATOMIC_MAX INT_MAX
#ifndef SIZE_MAX // [
# ifdef _WIN64 // [
# define SIZE_MAX _UI64_MAX
# else // _WIN64 ][
# define SIZE_MAX _UI32_MAX
# endif // _WIN64 ]
#endif // SIZE_MAX ]
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
#ifndef WCHAR_MIN // [
# define WCHAR_MIN 0
#endif // WCHAR_MIN ]
#ifndef WCHAR_MAX // [
# define WCHAR_MAX _UI16_MAX
#endif // WCHAR_MAX ]
#define WINT_MIN 0
#define WINT_MAX _UI16_MAX
#endif // __STDC_LIMIT_MACROS ]
// 7.18.4 Limits of other integer types
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
// 7.18.4.1 Macros for minimum-width integer constants
#define INT8_C(val) val##i8
#define INT16_C(val) val##i16
#define INT32_C(val) val##i32
#define INT64_C(val) val##i64
#define UINT8_C(val) val##ui8
#define UINT16_C(val) val##ui16
#define UINT32_C(val) val##ui32
#define UINT64_C(val) val##ui64
// 7.18.4.2 Macros for greatest-width integer constants
#define INTMAX_C INT64_C
#define UINTMAX_C UINT64_C
#endif // __STDC_CONSTANT_MACROS ]
#endif // _MSC_STDINT_H_ ]

View file

@ -1,93 +0,0 @@
/*
* sha1.h
* Copyright (C) The Internet Society (2001). All Rights Reserved.
* This document and translations of it may be copied and furnished to others,
* and derivative works that comment on or otherwise explain it or assist in its
* implementation may be prepared, copied, published and distributed, in whole or in part,
* without restriction of any kind, provided that the above copyright notice and this paragraph
* are included on all such copies and derivative works. However, this document itself may not
* be modified in any way, such as by removing the copyright notice or references to the Internet Society
* or other Internet organizations, except as needed for the purpose of developing Internet standards in
* which case the procedures for copyrights defined in the Internet Standards process must be followed,
* or as required to translate it into languages other than English.
*
* The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
*
* This document and the information contained herein is provided on an "AS IS" basis and
* THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS
* OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
*
* Description:
* This is the header file for code which implements the Secure
* Hashing Algorithm 1 as defined in FIPS PUB 180-1 published
* April 17, 1995.
*
* Many of the variable names in this code, especially the
* single character names, were used because those were the names
* used in the publication.
*
* Please read the file sha1.c for more information.
*
*/
#ifndef _SHA1_H_
#define _SHA1_H_
#include <stdint.h>
/*
* If you do not have the ISO standard stdint.h header file, then you
* must typdef the following:
* name meaning
* uint32_t unsigned 32 bit integer
* uint8_t unsigned 8 bit integer (i.e., unsigned char)
* int_least16_t integer of >= 16 bits
*
*/
#ifndef _SHA_enum_
#define _SHA_enum_
enum
{
shaSuccess = 0,
shaNull, /* Null pointer parameter */
shaInputTooLong, /* input data too long */
shaStateError /* called Input after Result */
};
#endif
#define SHA1HashSize 20
/*
* This structure will hold context information for the SHA-1
* hashing operation
*/
typedef struct SHA1Context
{
uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */
uint32_t Length_Low; /* Message length in bits */
uint32_t Length_High; /* Message length in bits */
/* Index into message block array */
int_least16_t Message_Block_Index;
uint8_t Message_Block[64]; /* 512-bit message blocks */
int Computed; /* Is the digest computed? */
int Corrupted; /* Is the message digest corrupted? */
} SHA1Context;
/*
* Function Prototypes
*/
int SHA1Reset( SHA1Context *);
int SHA1Input( SHA1Context *,
const uint8_t *,
unsigned int);
int SHA1Result( SHA1Context *,
uint8_t Message_Digest[SHA1HashSize]);
void SHA1ConvertMessageToString(uint8_t *hash_binary, char* hash_string);
#endif

View file

@ -30,8 +30,8 @@
#ifndef __CCDRAWNODES_CCDRAW_NODE_H__
#define __CCDRAWNODES_CCDRAW_NODE_H__
#include "base_nodes/CCNode.h"
#include "ccTypes.h"
#include "../base_nodes/CCNode.h"
#include "../include/ccTypes.h"
NS_CC_BEGIN

View file

@ -40,9 +40,9 @@ THE SOFTWARE.
#define __CCDRAWING_PRIMITIVES__
#include "ccTypes.h"
#include "ccMacros.h"
#include "cocoa/CCGeometry.h" // for CCPoint
#include "../include/ccTypes.h"
#include "../include/ccMacros.h"
#include "../cocoa/CCGeometry.h" // for CCPoint
/**
@file

View file

@ -25,9 +25,9 @@ THE SOFTWARE.
#ifndef __EFFECTS_CCGRABBER_H__
#define __EFFECTS_CCGRABBER_H__
#include "CCConfiguration.h"
#include "cocoa/CCObject.h"
#include "CCGL.h"
#include "../CCConfiguration.h"
#include "../cocoa/CCObject.h"
#include "../platform/CCGL.h"
NS_CC_BEGIN

View file

@ -25,15 +25,15 @@ THE SOFTWARE.
#ifndef __EFFECTS_CCGRID_H__
#define __EFFECTS_CCGRID_H__
#include "cocoa/CCObject.h"
#include "base_nodes/CCNode.h"
#include "CCCamera.h"
#include "ccTypes.h"
#include "textures/CCTexture2D.h"
#include "CCDirector.h"
#include "kazmath/mat4.h"
#include "../cocoa/CCObject.h"
#include "../base_nodes/CCNode.h"
#include "../CCCamera.h"
#include "../include/ccTypes.h"
#include "../textures/CCTexture2D.h"
#include "../CCDirector.h"
#include "../kazmath/include/kazmath/mat4.h"
#ifdef EMSCRIPTEN
#include "base_nodes/CCGLBufferedNode.h"
#include "../base_nodes/CCGLBufferedNode.h"
#endif // EMSCRIPTEN
NS_CC_BEGIN

View file

@ -26,13 +26,13 @@
#ifndef __AssetsManager__
#define __AssetsManager__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8)
#include <string>
#include <curl/curl.h>
#include <pthread.h>
#include "../../platform/IncludeCurl.h"
#include "../../platform/IncludePThread.h"
NS_CC_EXT_BEGIN

View file

@ -32,7 +32,7 @@
#include "CCInvocation.h"
#include "CCControlUtils.h"
#include "cocos2d.h"
#include "../../../include/cocos2d.h"
NS_CC_EXT_BEGIN

View file

@ -34,7 +34,7 @@
#ifndef __CCCONTROL_UTILS_H__
#define __CCCONTROL_UTILS_H__
#include "sprite_nodes/CCSprite.h"
#include "../../../sprite_nodes/CCSprite.h"
#include "../../ExtensionMacros.h"
NS_CC_EXT_BEGIN

View file

@ -30,7 +30,7 @@
#ifndef __CCINVOCATION_H__
#define __CCINVOCATION_H__
#include "cocoa/CCObject.h"
#include "../../../cocoa/CCObject.h"
#include "../../ExtensionMacros.h"
NS_CC_EXT_BEGIN

View file

@ -28,7 +28,7 @@ THE SOFTWARE.
#ifndef __CCScale9Sprite_H__
#define __CCScale9Sprite_H__
#include "cocos2d.h"
#include "../../../include/cocos2d.h"
#include "../../ExtensionMacros.h"
NS_CC_EXT_BEGIN

View file

@ -26,8 +26,8 @@
#ifndef __CCEDITTEXT_H__
#define __CCEDITTEXT_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../../include/cocos2d.h"
#include "../../ExtensionMacros.h"
#include "../CCControlExtension/CCControlExtensions.h"
NS_CC_EXT_BEGIN

View file

@ -26,8 +26,8 @@
#ifndef __CCEditBoxIMPL_H__
#define __CCEditBoxIMPL_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../../include/cocos2d.h"
#include "../../ExtensionMacros.h"
#include "CCEditBox.h"
NS_CC_EXT_BEGIN

View file

@ -26,11 +26,11 @@
#ifndef __CCEDITBOXIMPLANDROID_H__
#define __CCEDITBOXIMPLANDROID_H__
#include "cocos2d.h"
#include "../../../include/cocos2d.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#include "ExtensionMacros.h"
#include "../../ExtensionMacros.h"
#include "CCEditBoxImpl.h"
NS_CC_EXT_BEGIN

View file

@ -26,11 +26,11 @@
#ifndef __CCEditBoxIMPLIOS_H__
#define __CCEditBoxIMPLIOS_H__
#include "cocos2d.h"
#include "../../../include/cocos2d.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "ExtensionMacros.h"
#include "../../ExtensionMacros.h"
#include "CCEditBoxImpl.h"
#import <Foundation/Foundation.h>

View file

@ -26,14 +26,14 @@
#ifndef __CCEditBoxIMPLMAC_H__
#define __CCEditBoxIMPLMAC_H__
#include "cocos2d.h"
#include "../../../include/cocos2d.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#include "ExtensionMacros.h"
#include "../../ExtensionMacros.h"
#include "CCEditBoxImpl.h"
@interface CustomNSTextField : NSTextField

View file

@ -27,11 +27,11 @@
#ifndef __CCEDITBOXIMPLTIZEN_H__
#define __CCEDITBOXIMPLTIZEN_H__
#include "cocos2d.h"
#include "../../../include/cocos2d.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)
#include "ExtensionMacros.h"
#include "../../ExtensionMacros.h"
#include "CCEditBoxImpl.h"
NS_CC_EXT_BEGIN

View file

@ -26,11 +26,11 @@
#ifndef __CCEditBoxIMPLWIN_H__
#define __CCEditBoxIMPLWIN_H__
#include "cocos2d.h"
#include "../../../include/cocos2d.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#include "ExtensionMacros.h"
#include "../../ExtensionMacros.h"
#include "CCEditBoxImpl.h"
NS_CC_EXT_BEGIN

View file

@ -24,7 +24,7 @@ THE SOFTWARE.
#ifndef __CCEditBoxIMPLWP8_H__
#define __CCEditBoxIMPLWP8_H__
#include "ExtensionMacros.h"
#include "../../ExtensionMacros.h"
#include "CCEditBoxImpl.h"
NS_CC_EXT_BEGIN

View file

@ -26,8 +26,8 @@
#ifndef __CCSCROLLVIEW_H__
#define __CCSCROLLVIEW_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../../include/cocos2d.h"
#include "../../ExtensionMacros.h"
NS_CC_EXT_BEGIN

View file

@ -26,8 +26,8 @@
#ifndef __CCSORTING_H__
#define __CCSORTING_H__
#include "cocoa/CCArray.h"
#include "ExtensionMacros.h"
#include "../../../cocoa/CCArray.h"
#include "../../ExtensionMacros.h"
NS_CC_EXT_BEGIN
/**

View file

@ -26,7 +26,7 @@
#ifndef __CCTABLEVIEWCELL_H__
#define __CCTABLEVIEWCELL_H__
#include "base_nodes/CCNode.h"
#include "../../../base_nodes/CCNode.h"
#include "CCSorting.h"
NS_CC_EXT_BEGIN

View file

@ -2,7 +2,7 @@
#define __COCOS2D_EXT_H__
#include "ExtensionMacros.h"
#include "ccMacros.h"
#include "../include/ccMacros.h"
#include "GUI/CCControlExtension/CCControlExtensions.h"
#include "GUI/CCScrollView/CCScrollView.h"

View file

@ -26,8 +26,8 @@
#ifndef __CCHTTPREQUEST_H__
#define __CCHTTPREQUEST_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
#include "HttpRequest.h"
#include "HttpResponse.h"

View file

@ -25,8 +25,8 @@
#ifndef __HTTP_REQUEST_H__
#define __HTTP_REQUEST_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
NS_CC_EXT_BEGIN

View file

@ -25,8 +25,8 @@
#ifndef __HTTP_RESPONSE__
#define __HTTP_RESPONSE__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
#include "HttpRequest.h"
NS_CC_EXT_BEGIN

View file

@ -30,9 +30,9 @@
#ifndef __CC_WEBSOCKET_H__
#define __CC_WEBSOCKET_H__
#include "ExtensionMacros.h"
#include "cocos2d.h"
#include "libwebsockets.h"
#include "../ExtensionMacros.h"
#include "../../include/cocos2d.h"
#include <libwebsockets.h>
#include <list>
NS_CC_EXT_BEGIN

View file

@ -23,8 +23,8 @@
#ifndef __PHYSICSNODES_DEBUGNODE_H__
#define __PHYSICSNODES_DEBUGNODE_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
#if CC_ENABLE_CHIPMUNK_INTEGRATION

View file

@ -22,8 +22,8 @@
#ifndef __PHYSICSNODES_CCPHYSICSSPRITE_H__
#define __PHYSICSNODES_CCPHYSICSSPRITE_H__
#include "cocos2d.h"
#include "ExtensionMacros.h"
#include "../../include/cocos2d.h"
#include "../ExtensionMacros.h"
#if CC_ENABLE_CHIPMUNK_INTEGRATION
#include "chipmunk.h"

View file

@ -26,7 +26,7 @@
#ifndef SPINE_ANIMATIONSTATE_H_
#define SPINE_ANIMATIONSTATE_H_
#include <spine/AnimationStateData.h>
#include "AnimationStateData.h"
namespace cocos2d { namespace extension {

View file

@ -26,8 +26,8 @@
#ifndef SPINE_ANIMATIONSTATEDATA_H_
#define SPINE_ANIMATIONSTATEDATA_H_
#include <spine/Animation.h>
#include <spine/SkeletonData.h>
#include "Animation.h"
#include "SkeletonData.h"
namespace cocos2d { namespace extension {

View file

@ -26,8 +26,8 @@
#ifndef SPINE_ATLASATTACHMENTLOADER_H_
#define SPINE_ATLASATTACHMENTLOADER_H_
#include <spine/AttachmentLoader.h>
#include <spine/Atlas.h>
#include "AttachmentLoader.h"
#include "Atlas.h"
namespace cocos2d { namespace extension {

View file

@ -26,8 +26,8 @@
#ifndef SPINE_ATTACHMENTLOADER_H_
#define SPINE_ATTACHMENTLOADER_H_
#include <spine/Attachment.h>
#include <spine/Skin.h>
#include "Attachment.h"
#include "Skin.h"
namespace cocos2d { namespace extension {

View file

@ -26,7 +26,7 @@
#ifndef SPINE_BONE_H_
#define SPINE_BONE_H_
#include <spine/BoneData.h>
#include "BoneData.h"
namespace cocos2d { namespace extension {

View file

@ -26,8 +26,8 @@
#ifndef SPINE_CCSKELETON_H_
#define SPINE_CCSKELETON_H_
#include <spine/spine.h>
#include "cocos2d.h"
#include "spine.h"
#include "../../include/cocos2d.h"
namespace cocos2d { namespace extension {

View file

@ -26,9 +26,9 @@
#ifndef SPINE_CCSKELETONANIMATION_H_
#define SPINE_CCSKELETONANIMATION_H_
#include <spine/spine.h>
#include <spine/CCSkeleton.h>
#include "cocos2d.h"
#include "spine.h"
#include "CCSkeleton.h"
#include "../../include/cocos2d.h"
namespace cocos2d { namespace extension {

View file

@ -26,9 +26,9 @@
#ifndef SPINE_REGIONATTACHMENT_H_
#define SPINE_REGIONATTACHMENT_H_
#include <spine/Attachment.h>
#include <spine/Atlas.h>
#include <spine/Slot.h>
#include "Attachment.h"
#include "Atlas.h"
#include "Slot.h"
namespace cocos2d { namespace extension {

View file

@ -26,9 +26,9 @@
#ifndef SPINE_SKELETON_H_
#define SPINE_SKELETON_H_
#include <spine/SkeletonData.h>
#include <spine/Slot.h>
#include <spine/Skin.h>
#include "SkeletonData.h"
#include "Slot.h"
#include "Skin.h"
namespace cocos2d { namespace extension {

View file

@ -26,10 +26,10 @@
#ifndef SPINE_SKELETONDATA_H_
#define SPINE_SKELETONDATA_H_
#include <spine/BoneData.h>
#include <spine/SlotData.h>
#include <spine/Skin.h>
#include <spine/Animation.h>
#include "BoneData.h"
#include "SlotData.h"
#include "Skin.h"
#include "Animation.h"
namespace cocos2d { namespace extension {

View file

@ -26,11 +26,11 @@
#ifndef SPINE_SKELETONJSON_H_
#define SPINE_SKELETONJSON_H_
#include <spine/Attachment.h>
#include <spine/AttachmentLoader.h>
#include <spine/SkeletonData.h>
#include <spine/Atlas.h>
#include <spine/Animation.h>
#include "Attachment.h"
#include "AttachmentLoader.h"
#include "SkeletonData.h"
#include "Atlas.h"
#include "Animation.h"
namespace cocos2d { namespace extension {

View file

@ -26,7 +26,7 @@
#ifndef SPINE_SKIN_H_
#define SPINE_SKIN_H_
#include <spine/Attachment.h>
#include "Attachment.h"
namespace cocos2d { namespace extension {

View file

@ -26,9 +26,9 @@
#ifndef SPINE_SLOT_H_
#define SPINE_SLOT_H_
#include <spine/Bone.h>
#include <spine/Attachment.h>
#include <spine/SlotData.h>
#include "Bone.h"
#include "Attachment.h"
#include "SlotData.h"
namespace cocos2d { namespace extension {

View file

@ -26,7 +26,7 @@
#ifndef SPINE_SLOTDATA_H_
#define SPINE_SLOTDATA_H_
#include <spine/BoneData.h>
#include "BoneData.h"
namespace cocos2d { namespace extension {

View file

@ -82,11 +82,11 @@
#include <stdlib.h>
#include <string.h>
#include <spine/Skeleton.h>
#include <spine/RegionAttachment.h>
#include <spine/Animation.h>
#include <spine/Atlas.h>
#include <spine/AttachmentLoader.h>
#include "Skeleton.h"
#include "RegionAttachment.h"
#include "Animation.h"
#include "Atlas.h"
#include "AttachmentLoader.h"
namespace cocos2d { namespace extension {

View file

@ -26,10 +26,10 @@
#ifndef SPINE_COCOS2DX_H_
#define SPINE_COCOS2DX_H_
#include <spine/spine.h>
#include "cocos2d.h"
#include <spine/CCSkeleton.h>
#include <spine/CCSkeletonAnimation.h>
#include "spine.h"
#include "../../include/cocos2d.h"
#include "CCSkeleton.h"
#include "CCSkeletonAnimation.h"
namespace cocos2d { namespace extension {

Some files were not shown because too many files have changed in this diff Show more